.maze-game{margin:clamp(3rem,7vw,7rem) 0;padding:clamp(18px,4vw,50px);background:linear-gradient(140deg,#17291e88,#0a100dd9);border:1px solid #61795b55;color:#e7ecd8;border-radius:3px;scroll-margin-top:95px;max-width:100%;overflow:hidden}
.maze-game *{box-sizing:border-box}.maze-game [hidden]{display:none!important}.maze-game .maze-top{display:flex;justify-content:space-between;gap:24px;align-items:flex-start}.maze-game .maze-kicker{font:11px/1.5 monospace;letter-spacing:.18em;color:#b1c39c}.maze-game h2{font-size:clamp(30px,5vw,64px);line-height:1.02;letter-spacing:-.04em;margin:14px 0 20px;max-width:720px}.maze-game p{font-size:16px;line-height:1.65;max-width:65ch}.maze-game .maze-tag{border:1px solid #a8be7855;padding:8px 12px;white-space:nowrap;font:11px/1.4 monospace;color:#c7d6ac}.maze-game button{min-height:44px;border:1px solid #aab79a77;border-radius:3px;background:#223326;color:#eef2e2;font:inherit;padding:12px 18px;cursor:pointer}.maze-game button:hover{background:#34482b}.maze-game button:focus-visible,.maze-game canvas:focus-visible,.maze-game .maze-viewport:focus-visible{outline:3px solid #e7b869;outline-offset:3px}.maze-game button:disabled{opacity:.5;cursor:default}.maze-game .maze-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:20px 0}.maze-game .maze-instructions{color:#bec9b3;font-size:14px}.maze-game .maze-viewport{width:100%;overflow:auto;max-height:68vh;overscroll-behavior:contain;background:#0c140f;border:1px solid #6e815552;scroll-behavior:auto}.maze-game canvas{display:block;width:100%;height:auto;min-width:280px;touch-action:pan-x pan-y;image-rendering:auto}.maze-game .maze-viewport.zoomed canvas{width:2400px;max-width:none}.maze-game .maze-bottom{display:flex;gap:25px;justify-content:space-between;align-items:center;flex-wrap:wrap;padding-top:18px}.maze-game .maze-status{font:13px/1.6 monospace;max-width:52ch;color:#d2ddbc}.maze-game .maze-dpad{display:grid;grid-template-columns:repeat(3,52px);gap:5px;flex-shrink:0;touch-action:manipulation}.maze-game .maze-dpad button{height:48px;padding:0;font-size:23px;touch-action:none;user-select:none}.maze-game [data-dir=up]{grid-column:2}.maze-game [data-dir=left]{grid-column:1;grid-row:2}.maze-game [data-dir=down]{grid-column:2;grid-row:2}.maze-game [data-dir=right]{grid-column:3;grid-row:2}.maze-game .maze-reward{border-top:1px solid #a0b47755;margin-top:24px;padding-top:20px}.maze-game .maze-reward h3{font-size:30px;margin:0 0 12px}.maze-game .maze-choices{display:flex;gap:12px;flex-wrap:wrap}.maze-game .maze-legend{font:12px/1.7 monospace;color:#c3cfb4}.maze-game .maze-legend b{color:#f0c06e}.maze-game .maze-note{color:#a5b297;font-size:13px}.maze-jump{margin-top:12px}@media(max-width:600px){.maze-game .maze-top{display:block}.maze-game .maze-tag{display:inline-block}.maze-game .maze-bottom{gap:12px}.maze-game .maze-status{width:100%}.maze-game .maze-dpad{margin:auto}.maze-game .maze-viewport{max-height:55vh}.maze-game h2{font-size:37px}.maze-game .maze-toolbar button{flex:1}.maze-game .maze-choices{flex-direction:column}}@media(prefers-reduced-motion:reduce){.maze-game *{scroll-behavior:auto!important;transition:none!important}}

.maze-game .maze-viewport:not(.zoomed) canvas{width:min(100%,74vh);min-width:0;margin:0 auto}

.maze-game h2{white-space:normal!important;width:auto!important;max-width:100%;overflow-wrap:anywhere;text-wrap:balance}.maze-game .maze-toolbar{align-items:stretch}
/* H10 third-person forest slot. Only the third Gift game is affected. */
.maze-game .forest-frame{width:100%;height:min(760px,85svh);min-height:540px;margin-top:24px;background:#172019}.maze-game .forest-frame iframe{display:block;width:100%;height:100%;border:0}.maze-game [data-forest-start]{min-height:48px;padding:12px 22px;background:#cedbb3;color:#172019;border:0;font:inherit;cursor:pointer}@media(max-width:650px){.maze-game .forest-frame{height:78svh;min-height:590px;margin-inline:-12px;width:calc(100% + 24px)}}

/* Keep checkout accessible below Gifts, never over the playable forest.
   Switching to Paid/Free restores the existing sticky basket automatically. */
body[data-page="shop"]:has(#gifts:not([hidden]) .forest-frame:not([hidden])) .shop-basket-bar{position:relative;inset:auto;transform:none;margin:24px auto;max-width:calc(100% - 24px);width:max-content}
@media(max-width:480px){body[data-page="shop"]:has(#gifts:not([hidden]) .forest-frame:not([hidden])) .shop-basket-bar{width:calc(100% - 24px)}}
/* A modal top-layer viewport avoids transformed page ancestors and all sticky Shop UI. */
.maze-game dialog.forest-viewport{position:fixed;inset:0;width:100vw;height:100dvh;min-height:0;max-width:none;max-height:none;margin:0;padding:0;border:0;overflow:hidden;background:#172019}
.maze-game dialog.forest-viewport::backdrop{background:#101811}
.maze-game dialog.forest-viewport iframe{width:100%;height:100%;display:block;border:0}
body:has(dialog.forest-viewport[open]){overflow:hidden}

body:has(dialog.forest-viewport[open]) .clover-ambient-player{display:none!important}
