#ec-puzzle,#ec-puzzle{
            height: 100%;
            margin: 0;
            padding: 0;
            overflow: hidden;

            
            display: flex;
            justify-content: center;
            
            align-items: center;
            

            

        }
#ec-puzzle #animation_container{
            position: relative;
            

            
            box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
            background-color: #fff;
            
        }
#ec-puzzle #dom_overlay_container{
            position: absolute;
            inset: 0;
            
            width: 100% !important;
            
            height: 100% !important;
            
            pointer-events: none;

            
            
        }
#ec-puzzle #answer-bar{
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 20%;

            display: flex;
            justify-content: center;
            
            align-items: flex-end;

            padding-bottom: 2%;
            margin: 0;
            pointer-events: none;

            
            padding-left: 0;
            
            box-sizing: border-box;
            
        }
#ec-puzzle .choice-row{
            display: flex;
            justify-content: center;
            align-items: flex-end;
            gap: 7%;
            
            width: 100%;
            
            height: 100%;
            pointer-events: auto;
            
        }
#ec-puzzle .choice-card{
            appearance: none;
            border: 0;
            background: transparent;
            padding: 0;
            margin: 0;
            cursor: pointer;
            position: relative;

            
            width: 14%;
            
            aspect-ratio: 9/8;
            
            height: auto;
            

            
            min-width: 50px;

            border-radius: 14px;
            transition: transform .15s ease;
        }
#ec-puzzle .choice-card .frame{
            position: relative;
            width: 100%;
            height: 110%;
            border-radius: 14px;
            background: linear-gradient(180deg, #6fb6ff, #2f89d8 50%, #0f5fa6);
            box-shadow:
                inset 0 0 0 1px #bcd7ff,
                inset 0 6px 10px rgba(255, 255, 255, .25);
        }
#ec-puzzle .choice-card .frame::before{
            content: "";
            position: absolute;
            left: 5px;
            top: 6px;
            bottom: 6px;
            width: 3px;
            border-radius: 3px;
            opacity: .85;
        }
#ec-puzzle .choice-card img{
            position: absolute;
            inset: 6%;
            
            width: 88%;
            
            height: 92%;
            object-fit: contain;
            display: block;
            border-radius: 10px;
            background: #fff;
        }
#ec-puzzle .choice-card:hover{
            transform: translateY(-2px);
            filter: saturate(1.06);
        }
#ec-puzzle .choice-card:focus-visible{
            outline: none;
            box-shadow: 0 0 0 3px #fff, 0 0 0 6px #6fb6ff;
        }
#ec-puzzle .choice-card.wrong .frame::after{
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 14px;
            z-index: 5;
            pointer-events: none;

            
            animation: flashRed 0.8s ease-out 2 forwards;
        }
@keyframes flashRed{
            0% {
                background-color: rgba(255, 0, 0, 0.6);
            }

            100% {
                background-color: rgba(255, 0, 0, 0);
            }
        }
#ec-puzzle .choice-card.wrong{
            animation: shake 0.8s cubic-bezier(.36, .07, .19, .97) both;
        }
#ec-puzzle #target-pill{
            
            pointer-events: auto;
            

            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            top: -45%;
            padding: 0.2em 0.5em;
            font-size: 4vmin;
            font-weight: 600;
            color: #1b1b1b;
            background: linear-gradient(#e8f2ff, #d6e8ff);
            border-radius: 12px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            white-space: nowrap;
            z-index: 1100;
        }
#ec-puzzle .wellDone{
            position: absolute;
            left: 40.2%;
            bottom: 3%;
            display: flex;
            
            align-items: center;
            justify-content: center;
            
            width: 20%;
            
            aspect-ratio: 2.8 / 1;
            
            
            background-image: url('<?php echo get_template_directory_uri(); ?>/images/PlayAgainBtn.png');
            background-size: 100% 100%;
            
            background-repeat: no-repeat;
            background-color: transparent;
            
            border: none;
            cursor: pointer;
            color: #5b4010;
            
            font-weight: bold;
            font-size: 1.1rem;
            font-family: inherit;
            z-index: 16;


        }
@media (max-width: 560px){#ec-puzzle .choice-row{
                gap: 2px;
            }
#ec-puzzle .choice-card{
                width: clamp(60px, 22cqw, 90px);
                height: clamp(60px, 22cqw, 90px);
            }
#ec-puzzle .choice-card img{
                inset: 3px;
            }

        }
@media (max-width: 560px) and (orientation: portrait){#ec-puzzle.puzzle-mobile-portrait,#ec-puzzle.puzzle-mobile-portrait{
                --puzzle-frame-top: 140px;
                --puzzle-frame-height: 80px;
                --puzzle-frame-center-x: 48.5%;
                --puzzle-target-offset-x: 14px;
                --puzzle-target-offset-y: -3px;
                --puzzle-target-complete-offset-y: -3px;
                --puzzle-back-menu-complete-top: 15px;
                width: 100cqw;
                height: 100cqh;
                min-height: 100cqh;
                overflow: hidden;
                display: block;
                background: #fff;
            }
#ec-puzzle.puzzle-mobile-portrait #puzzle-scale-wrap{
                position: relative;
                width: 100cqw;
                height: min(430px, 58cqh);
                overflow: hidden;
                background: #fff;
            }
#ec-puzzle.puzzle-mobile-portrait #animation_container{
                position: absolute;
                top: 5px;
                left: 50%;
                width: var(--puzzle-stage-width, 100cqw) !important;
                height: var(--puzzle-stage-height, 75cqw) !important;
                transform: translateX(calc(-50% + 6px));
                transform-origin: top center;
                box-shadow: none;
            }
#ec-puzzle.puzzle-mobile-portrait .puzzle-canvas-frame{
                position: absolute;
                top: var(--puzzle-frame-top);
                left: var(--puzzle-frame-center-x);
                width: 99cqw;
                height: var(--puzzle-frame-height);
                transform: translateX(calc(-50% + 6px));
                background: #fff;
                border: 6px solid #447fd8;
                border-radius: 16px;
                box-sizing: border-box;
                pointer-events: none;
                z-index: 1990;
            }
#ec-puzzle.puzzle-mobile-portrait #canvas,#ec-puzzle.puzzle-mobile-portrait #dom_overlay_container{
                width: var(--puzzle-stage-width, 100cqw) !important;
                height: var(--puzzle-stage-height, 75cqw) !important;
            }
#ec-puzzle.puzzle-mobile-portrait #dom_overlay_container{
                overflow: hidden !important;
            }
#ec-puzzle.puzzle-mobile-portrait #ui-controls{
                position: absolute;
                top: 6%;
                left: 0;
                width: 100%;
                height: 0;
                z-index: 100;
            }
#ec-puzzle.puzzle-mobile-portrait #btn-exit,#ec-puzzle.puzzle-mobile-portrait #btn-sound{
                pointer-events: auto;
                position: absolute;
                top: -25px;
                width: 42px;
                height: 42px;
                background: transparent;
                border: none;
                padding: 0;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                z-index: 1000;
                transition: transform 0.1s;
            }
#ec-puzzle.puzzle-mobile-portrait #btn-exit:active,#ec-puzzle.puzzle-mobile-portrait #btn-sound:active{
                transform: scale(0.9);
            }
#ec-puzzle.puzzle-mobile-portrait #btn-exit{
                left: max(8px, calc(50% - 50cqw + 8px));
            }
#ec-puzzle.puzzle-mobile-portrait #btn-sound{
                left: max(55px, calc(50% - 50cqw + 55px));
            }
#ec-puzzle.puzzle-mobile-portrait #btn-exit img,#ec-puzzle.puzzle-mobile-portrait #btn-sound img{
                width: 100%;
                height: 100%;
                object-fit: contain;
            }
#ec-puzzle.puzzle-mobile-portrait #answer-bar{
                position: relative;
                left: 0;
                right: 0;
                bottom: auto;
                width: 100cqw;
                height: var(--puzzle-answer-height, 128px);
                padding: 10px 5px max(7px, env(safe-area-inset-bottom));
                align-items: flex-end;
                background: #fff;
                border-top: 3px solid rgba(255, 255, 255, 0.78);
                z-index: 2000;
                box-sizing: border-box;
            }
#ec-puzzle.puzzle-mobile-portrait .choice-row{
                width: 100%;
                height: calc(100% - 8px);
                gap: 3px;
                align-items: flex-end;
                justify-content: space-between;
            }
#ec-puzzle.puzzle-mobile-portrait .choice-card{
                flex: 0 0 calc((100cqw - 19px) / 4);
                width: calc((100cqw - 19px) / 4);
                max-width: none;
                min-width: 0;
                height: min(96px, calc(var(--puzzle-answer-height, 128px) - 31px));
                aspect-ratio: auto;
                border-radius: 13px;
            }
#ec-puzzle.puzzle-mobile-portrait .choice-card .frame{
                height: 100%;
                border-radius: 13px;
                box-shadow:
                    inset 0 0 0 2px #cce7ff,
                    inset 0 8px 12px rgba(255, 255, 255, .28),
                    0 2px 5px rgba(0, 68, 130, .35);
            }
#ec-puzzle.puzzle-mobile-portrait .choice-card img{
                inset: 6px;
                width: calc(100% - 12px);
                height: calc(100% - 12px);
                border-radius: 9px;
            }
#ec-puzzle.puzzle-mobile-portrait #target-pill{
                position: absolute;
                left: calc(var(--puzzle-frame-center-x) + var(--puzzle-target-offset-x));
                top: calc(var(--puzzle-frame-top) + (var(--puzzle-frame-height) / 2) + var(--puzzle-target-offset-y));
                transform: translate(-50%, -50%);
                max-width: min(72cqw, 260px);
                background: #fff;
                padding: 5px 15px 6px;
                font-size: clamp(30px, 8cqw, 40px);
                line-height: 1;
                overflow: hidden;
                text-overflow: ellipsis;
                text-align: center;
                border-radius: 10px;
                z-index: 2200;

            }
#ec-puzzle.puzzle-mobile-portrait.puzzle-game-complete #back-to-menu{
                position: absolute;
                top: var(--puzzle-back-menu-complete-top);
                bottom: auto;
                left: 50%;
                transform: translateX(-50%);
                width: min(210px, 52cqw);
                font-size: 24px;
                z-index: 5000;
            }
#ec-puzzle.puzzle-mobile-portrait.puzzle-game-complete #puzzle-scale-wrap,#ec-puzzle.puzzle-mobile-portrait.puzzle-game-complete #animation_container{
                z-index: 4000;
            }
#ec-puzzle.puzzle-mobile-portrait.puzzle-game-complete #answer-bar{
                z-index: 100;
            }
#ec-puzzle.puzzle-mobile-portrait.puzzle-game-complete .choice-row{
                position: relative;
                z-index: 1;
            }

        }
@keyframes slideInFromRight{
                from {
                    transform: translateX(120%);
                    
                    opacity: 0;
                    
                }

                to {
                    transform: translateX(0);
                    
                    opacity: 1;
                }
            }
#ec-puzzle .choice-row-enter-right{
                animation: slideInFromRight 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
            }
#ec-puzzle:not(.puzzle-mobile-portrait) #ui-controls{
                position: absolute;
                top: 7%;
                left: 0;
                width: 100%;
                height: 0;
                
                z-index: 100;
            }
#ec-puzzle:not(.puzzle-mobile-portrait) #btn-exit,#ec-puzzle:not(.puzzle-mobile-portrait) #btn-sound{
                pointer-events: auto;
                position: absolute;
                top: 15px;

                
                background: transparent;
                
                border: none;
                
                padding: 0;

                width: 45px;
                
                height: 45px;
                cursor: pointer;

                
                display: flex;
                align-items: center;
                justify-content: center;

                z-index: 1000;
                transition: transform 0.1s;
            }
#ec-puzzle:not(.puzzle-mobile-portrait) #btn-exit:active,#ec-puzzle:not(.puzzle-mobile-portrait) #btn-sound:active{
                transform: scale(0.9);
            }
#ec-puzzle:not(.puzzle-mobile-portrait) #btn-exit{
                left: 5px;
            }
#ec-puzzle:not(.puzzle-mobile-portrait) #btn-sound{
                left: 50px;
            }
#ec-puzzle:not(.puzzle-mobile-portrait) #btn-exit img,#ec-puzzle:not(.puzzle-mobile-portrait) #btn-sound img{
                width: 100%;
                height: 100%;
                object-fit: contain;
                
            }

    
@media (orientation: landscape) and (max-width:1024px) and (max-height:600px) and (hover:none) and (pointer:coarse){#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape{
        width: 100cqw;
        height: 100cqh;
        margin: 0 !important;
        overflow: hidden;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape #animation_container{
        position: relative !important;
        width: 100cqw !important;
        height: 100cqh !important;
        overflow: hidden !important;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape #canvas,#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape #dom_overlay_container{
        position: absolute !important;
        inset: 0 !important;
        width: 100cqw !important;
        height: 100cqh !important;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape #dom_overlay_container{
        overflow: visible !important;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape #ui-controls{
        --puzzle-landscape-control-size: 45px;
        position: absolute !important;
        top: max(28px, calc(env(safe-area-inset-top) + 28px)) !important;
        right: auto !important;
        left: max(8px, env(safe-area-inset-left)) !important;
        width: auto !important;
        height: var(--puzzle-landscape-control-size) !important;
        display: flex;
        align-items: center;
        gap: 14px;
        z-index: 2100;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape #btn-exit,#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape #btn-sound{
        position: relative !important;
        inset: auto !important;
        flex: 0 0 var(--puzzle-landscape-control-size);
        width: var(--puzzle-landscape-control-size) !important;
        height: var(--puzzle-landscape-control-size) !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: auto;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape #btn-exit img,#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape #btn-sound img{
        display: block;
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape #answer-bar{
        
        --puzzle-landscape-column-spacing-adjust: 0px;
        --puzzle-landscape-column-shift-min: -12px;
        --puzzle-landscape-column-shift-max: 12px;
        --puzzle-landscape-choice-frame-width: 125%;
        --puzzle-landscape-choice-frame-aspect: 1.45;
        --puzzle-landscape-choice-vertical-gap: 4px;
        --puzzle-landscape-choice-column-down-shift: 10px;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100cqw !important;
        height: 100cqh !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box;
        display: block;
        pointer-events: none;
        z-index: 2000;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape #target-pill{
        position: absolute;
        top: calc(var(--puzzle-landscape-puzzle-top) + var(--puzzle-landscape-puzzle-height) - 4px);
        right: auto;
        left: 50%;
        width: auto;
        min-width: clamp(90px, 18cqw, 150px);
        max-width: min(70cqw, var(--puzzle-landscape-puzzle-width));
        margin: 0;
        padding: 6px 18px;
        box-sizing: border-box;
        transform: translate(-50%, -100%);
        font-size: clamp(20px, 5.5cqh, 28px);
        font-weight: 700;
        line-height: 1.05;
        color: #1b1b1b;
        background: rgb(209, 218, 230);
        border: 1px solid rgba(51, 64, 74, 0.78);
        border-radius: 11px;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.45),
            0 1px 2px rgba(0, 0, 0, 0.12);
        text-align: center;
        white-space: nowrap;
        pointer-events: auto;
        z-index: 3;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape.puzzle-game-complete #target-pill{
        top: calc(var(--puzzle-landscape-complete-target-top) - 7px) !important;
        padding-top: 2px !important;
        padding-bottom: 2px !important;
        line-height: 1 !important;
        transform: translate(-50%, -50%) !important;
        z-index: 5;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape.puzzle-game-complete #back-to-menu{
        left: 50% !important;
        width: clamp(120px, 16cqw, 160px) !important;
        padding: 2px 8px !important;
        box-sizing: border-box;
        transform: translateX(-50%);
        font-size: clamp(17px, 4.5cqh, 20px);
        line-height: 1;
        white-space: nowrap;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape.puzzle-game-complete #answer-bar::before{
        content: "";
        position: absolute;
        top: max(0px, env(safe-area-inset-top));
        left: 50%;
        width: clamp(130px, 20cqw, 200px);
        aspect-ratio: 224 / 91;
        background: url("/puzzle-game/images/puzzleLogo.png") center / contain no-repeat;
        transform: translateX(-50%);
        pointer-events: none;
        z-index: 4;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-row{
        position: absolute;
        top: calc(var(--puzzle-landscape-puzzle-top) + var(--puzzle-landscape-choice-column-down-shift));
        right: auto;
        bottom: auto;
        left: 50%;
        width: calc(var(--puzzle-landscape-puzzle-width) + var(--puzzle-landscape-choice-size) + var(--puzzle-landscape-choice-size) + var(--puzzle-landscape-choice-gap) + var(--puzzle-landscape-choice-gap));
        height: calc(var(--puzzle-landscape-puzzle-height) - var(--puzzle-landscape-choice-column-down-shift));
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: var(--puzzle-landscape-choice-size) var(--puzzle-landscape-puzzle-width) var(--puzzle-landscape-choice-size);
        grid-template-rows: repeat(2, var(--puzzle-landscape-choice-size));
        column-gap: var(--puzzle-landscape-choice-gap);
        row-gap: var(--puzzle-landscape-choice-vertical-gap);
        justify-content: center;
        align-content: center;
        transform: translateX(-50%);
        pointer-events: none;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-card{
        width: var(--puzzle-landscape-choice-size) !important;
        height: var(--puzzle-landscape-choice-size) !important;
        pointer-events: auto;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-card .frame{
        position: absolute;
        top: 50%;
        left: 0;
        width: calc(var(--puzzle-landscape-choice-frame-width) - 12px);
        height: auto;
        aspect-ratio: var(--puzzle-landscape-choice-frame-aspect);
        box-sizing: content-box;
        border: 6px solid #6fb6ff;
        border-radius: 14px;
        background: #fff;
        transform: translateY(-50%);
        overflow: hidden;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-card:nth-child(odd) .frame{
        right: 0;
        left: auto;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-card:nth-child(even) .frame{
        right: auto;
        left: 0;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-card .frame::before{
        display: none;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-card img{
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        background: #fff;
        border-radius: 8px;
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-card:nth-child(1){
        grid-column: 1;
        grid-row: 1;
        left: calc(0px - clamp(var(--puzzle-landscape-column-shift-min), var(--puzzle-landscape-column-spacing-adjust), var(--puzzle-landscape-column-shift-max)));
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-card:nth-child(2){
        grid-column: 3;
        grid-row: 1;
        left: clamp(var(--puzzle-landscape-column-shift-min), var(--puzzle-landscape-column-spacing-adjust), var(--puzzle-landscape-column-shift-max));
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-card:nth-child(3){
        grid-column: 1;
        grid-row: 2;
        left: calc(0px - clamp(var(--puzzle-landscape-column-shift-min), var(--puzzle-landscape-column-spacing-adjust), var(--puzzle-landscape-column-shift-max)));
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-card:nth-child(4){
        grid-column: 3;
        grid-row: 2;
        left: clamp(var(--puzzle-landscape-column-shift-min), var(--puzzle-landscape-column-spacing-adjust), var(--puzzle-landscape-column-shift-max));
    }
@keyframes puzzleLandscapeChoiceRowIn{
        from {
            transform: translate(-50%, 100cqh);
            opacity: 0;
        }

        to {
            transform: translate(-50%, 0);
            opacity: 1;
        }
    }
#ec-puzzle.puzzle-mobile-landscape.puzzle-game-iframe-landscape .choice-row.choice-row-enter-right{
        animation: puzzleLandscapeChoiceRowIn 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
    }


    
}

#game-frame #ec-puzzle{position:relative;isolation:isolate;container-type:size;direction:ltr;font-family:Arial,sans-serif;width:100%;height:100%;min-height:0;}
#ec-puzzle *,#ec-puzzle *::before,#ec-puzzle *::after{box-sizing:content-box;}
#ec-puzzle img{max-width:none;}
#ec-puzzle #answer-bar{box-sizing:border-box;}
#game-frame.ec-puzzle-frame{display:none;position:relative;}
#ec-puzzle #ui-controls button{margin:0;}
