/* In-game gestures belong to the game; forms and reading elsewhere retain selection. */
body.quest-app{overflow:hidden;overscroll-behavior:none;background:#102c38}body.quest-app #app{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;height:100vh;height:100dvh;overflow:hidden}body.quest-app #app img{-webkit-user-drag:none;user-drag:none}body.quest-app input,body.quest-app textarea,body.quest-app [contenteditable=true]{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}body.quest-app button{touch-action:manipulation;-webkit-touch-callout:none}body.quest-app canvas,body.quest-app .game-board{touch-action:none}body.quest-app #overlay{overscroll-behavior:contain;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.quest-fullscreen{font-size:23px}.quest-app .play-shell{height:100dvh;max-width:1280px;display:flex;flex-direction:column;margin:0 auto;padding:0 max(16px,env(safe-area-inset-left)) env(safe-area-inset-bottom);overflow:hidden;background:#fbf7ee}.quest-app .play-header{flex:0 0 auto;min-height:64px;height:auto;padding:9px 0;gap:8px}.quest-app .play-header .tools{gap:5px;flex-wrap:wrap}.quest-app .play-header .icon-btn{width:44px;min-width:44px;height:44px}.quest-app .wind-quick-tools{flex:0 0 auto;padding-bottom:8px}.quest-app .progress{flex:0 0 4px;margin:0 0 10px}.quest-app #play-content{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding-bottom:18px;-webkit-overflow-scrolling:touch}.quest-app .game-layout{margin-top:0}.quest-app .game-card{margin-top:0}.quest-app .finish-card{overflow:auto;margin-top:10px}.quest-app .map-view{height:100dvh}.quest-app .wind-quick-tools .wind-button{font-size:12px;min-height:44px}.quest-app .intro-page{min-height:0}.quest-app .stage-top{gap:8px}
.wind-story{border:1px solid #cddac9;background:#edf2e5;padding:10px 13px;border-radius:13px;margin:12px 0}.wind-story summary{font-size:13px;font-weight:850;cursor:pointer;min-height:28px;display:flex;align-items:center;gap:9px}.wind-story summary img{width:32px;height:32px;object-fit:contain}.wind-story .companion{margin:12px 0 0}.wind-help{border:1px solid #c5d4cd;border-radius:14px;padding:10px 13px;margin-top:14px;background:#eff2e9}.wind-help summary{font-size:13px;font-weight:850;cursor:pointer;min-height:30px}.wind-journey{display:flex;gap:6px;margin:0 0 13px}.wind-journey span{height:5px;border-radius:9px;background:#d4dacf;flex:1}.wind-journey span.done{background:#bd9140}.wind-journey span.current{background:#1b8977;box-shadow:0 0 0 2px #1b897728}
@media(max-width:700px){.quest-app .play-shell{padding:env(safe-area-inset-top) 12px env(safe-area-inset-bottom)}.quest-app .play-header{flex-wrap:nowrap;min-height:58px}.quest-app .play-header>.brand{flex:0 0 auto;font-size:0;gap:0}.quest-app .play-header>.brand img{width:32px;height:32px}.quest-app .play-header .quest-label,.quest-app .demo-pill{display:none}.quest-app .play-header .tools{justify-content:space-between;flex:1;flex-wrap:nowrap;gap:3px}.quest-app .play-header .menu-exit{padding:9px 10px;min-height:44px;font-size:12px}.quest-app .game-card{padding:17px 14px 18px;border-radius:20px}.quest-app .game-card h1{font-size:clamp(23px,6vw,30px);line-height:1.14;margin:8px 0}.quest-app .game-card>.instruction{font-size:14px;line-height:1.45;margin:8px 0 12px}.quest-app .stage-top{font-size:10px}.quest-app .game-note{font-size:12px;margin-bottom:0}.quest-app .wind-story{margin:7px 0 12px}.quest-app .wind-story .companion p{font-size:13px}.quest-wind-playing .game-layout{display:block}.quest-wind-playing .stage-sidebar{display:none}.quest-wind-playing .game-card{background:linear-gradient(140deg,#f8f2e0,#edf3e6);box-shadow:none;border:1px solid #dfdfcc}.quest-wind-playing .wind-journey{margin-bottom:10px}.quest-wind-playing .wind-board{margin:0}.quest-wind-playing .wind-status{font-size:12px;padding:10px 12px;margin:10px 0 0}.quest-wind-playing .wind-explain{font-size:13px;margin-top:10px}.quest-wind-playing .wind-toolbar{gap:7px;margin:10px 0}.quest-wind-playing .wind-button{min-height:46px;border-radius:12px}.quest-wind-playing .wind-alternative{margin:12px 0 0}.quest-wind-playing .wind-alternative summary{min-height:30px}.quest-wind-playing .wind-shadow-illustration{aspect-ratio:3.4;margin-bottom:12px}.quest-wind-playing .wind-telegraph{padding-top:43%}.quest-wind-playing .wind-code-slots{font-size:29px}.quest-wind-playing .wind-alphabet{margin:12px 0}.quest-wind-playing .wind-alphabet div{padding:9px 6px}}
@media(prefers-reduced-motion:reduce){.wind-journey span{box-shadow:none}}
@media(max-width:700px){.quest-wind-playing .game-card{padding:12px 12px 16px}.quest-wind-playing .game-card h1{font-size:25px;margin:5px 0}.quest-wind-playing .game-card>.instruction{font-size:13px;margin:6px 0;line-height:1.4}.quest-wind-playing .wind-story{margin:5px 0 9px;padding:3px 8px;background:#edf2e5;border-radius:10px}.quest-wind-playing .wind-story summary{font-size:12px;min-height:30px}.quest-wind-playing .wind-story summary img{width:24px;height:24px}.quest-wind-playing .wind-journey{margin:0 0 6px}.quest-wind-playing .game-board{margin:8px 0 0;padding:0;gap:0}.quest-wind-playing .wind-goalstrip{margin:0 0 9px}.quest-wind-playing .wind-camera-scene,.quest-wind-playing .wind-scene{border-radius:17px}}
/* A game is one screen. Only deliberately opened help sheets may scroll. */
.quest-app #play-content{overflow:hidden;padding-bottom:0}.quest-app .game-layout{height:100%;min-height:0;align-items:stretch}.quest-app .game-card{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}.quest-app .stage-top,.quest-app .game-card>h1,.quest-app .game-card>.instruction,.quest-story-button{flex:0 0 auto}.quest-app .game-board{flex:1;min-height:0;overflow:hidden;padding:8px 0;gap:10px}.quest-app .game-note{flex:0 0 auto;font-size:12px;line-height:1.3;margin:8px 0 0}.quest-story-button{display:flex;align-items:center;justify-content:center;gap:7px;background:#eaf0e1;border:1px solid #d6decf;color:#2b5d53;border-radius:10px;min-height:44px;font-size:12px;font-weight:800;margin:4px 0}.quest-story-button img{width:27px;height:27px}.quest-app .game-board .object-cloud span{font-size:clamp(24px,7dvh,44px)}.quest-app .game-board .object-cloud{gap:9px}.quest-app .game-board .choices{gap:8px}.quest-app .game-board .choice{min-height:44px;padding:9px 14px}.quest-wind-playing .wind-quick-tools{display:none}.quest-wind-playing .stage-top{min-height:44px;font-size:9px;letter-spacing:.7px}.quest-wind-playing .wind-stage-picker{font-size:11px;min-height:44px;padding:7px 12px;flex-shrink:0}.quest-wind-playing .game-card>#game-note{display:none}.quest-wind-playing .game-board{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;gap:7px;padding:0;margin:8px 0 0}.quest-wind-playing .game-board:not(:has(.wind-goalstrip)){grid-template-rows:minmax(0,1fr) auto}.quest-wind-playing .wind-goalstrip{margin:0;flex-shrink:0}.quest-wind-playing .wind-goalstrip>span{min-height:23px;height:25px;border-radius:8px}.quest-wind-playing .wind-scene,.quest-wind-playing .wind-camera-scene,.quest-wind-playing .wind-lights-scene{height:100%;min-height:0;aspect-ratio:auto;width:100%;overflow:hidden}.quest-wind-playing .wind-canvas,.quest-wind-playing .wind-portal-fallback{width:100%;height:100%;aspect-ratio:auto}.quest-wind-playing .wind-shadow-pair{height:100%;min-height:0;padding:9px;border-radius:15px;background:linear-gradient(#132e38aa,#132e38aa),url('assets/wind-shadowforge.webp') center/cover}.quest-wind-playing .wind-shadow-pair>div{display:flex;flex-direction:column;min-height:0}.quest-wind-playing .wind-shadow-pair p{color:#fff3d1;font-size:11px;min-height:30px;margin:0 0 5px}.quest-wind-playing .wind-shadow-pair canvas{flex:1;min-height:0;height:100%;width:100%;aspect-ratio:auto}.wind-controls{min-height:0;display:flex;flex-direction:column;gap:6px}.quest-wind-playing .wind-controls>.wind-toolbar{margin:0}.quest-wind-playing .wind-controls .wind-toolbar:empty{display:none}.quest-wind-playing .wind-status{font-size:11px;line-height:1.35;padding:5px 8px;margin:0;border-radius:8px;min-height:28px;max-height:44px;overflow:hidden;order:8}.quest-wind-playing .wind-windmeter{margin:0;gap:3px;font-size:11px}.quest-wind-playing .wind-windmeter small{font-size:10px;line-height:1.3}.quest-wind-playing .wind-windmeter>div{height:17px}.quest-wind-playing .wind-charge{height:7px;margin:0}.quest-wind-playing .wind-controls .wind-button{padding:9px 8px;font-size:12px}.quest-wind-playing .wind-range{margin:0;gap:0;font-size:10px}.quest-wind-playing .wind-range input{height:36px;min-height:36px;margin:0}.quest-wind-playing .wind-match{margin:0;gap:3px;font-size:11px}.quest-wind-playing .wind-color-target{padding:7px 10px;margin:0}.quest-wind-playing .wind-color-target p{font-size:12px}.quest-wind-playing .wind-color-target span{flex-basis:27px;height:27px}.quest-wind-playing .wind-swatches{margin:0;gap:6px}.quest-wind-playing .wind-swatches button{min-height:44px;padding:5px!important;font-size:10px!important;display:flex;align-items:center;justify-content:center;gap:7px}.quest-wind-playing .wind-swatches button:before{width:18px;height:18px;margin:0;border-radius:5px 2px;flex-shrink:0}.quest-wind-playing .wind-crystal-pad button{min-height:44px;padding:5px;font-size:10px}.quest-wind-playing .wind-crystal-pad button:before{display:inline;margin-right:6px;font-size:18px}.quest-wind-playing .wind-light-instruction{margin:0;padding:6px 9px;font-size:12px;line-height:1.4}.quest-wind-playing .wind-light-slots{margin:0;gap:8px}.quest-wind-playing .wind-light-slots span{width:33px;height:32px;border-radius:9px;font-size:24px}.quest-wind-playing .wind-lights{bottom:8%}.quest-wind-playing .lantern-glass{height:clamp(50px,15dvh,110px)}.quest-wind-playing .wind-lantern b{margin-top:5px;padding:4px 3px;font-size:10px}.quest-wind-playing .wind-toolbar>*{flex:1 1 100px}.wind-sheet{order:7;margin:0}.wind-sheet>summary{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;background:#e4ecde;border:1px solid #c7d6c4;border-radius:11px;list-style:none;font-size:12px;font-weight:850;cursor:pointer}.wind-sheet>summary::-webkit-details-marker{display:none}.wind-sheet[open]:before{content:'';position:fixed;inset:0;background:#0a2738b8;z-index:1300;backdrop-filter:blur(5px)}.wind-sheet-body{position:fixed;z-index:1301;inset:max(20px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));max-width:650px;margin:auto;overflow:auto;overscroll-behavior:contain;padding:20px;border-radius:22px;background:#fbf7ee;box-shadow:0 20px 60px #001c3055}.wind-sheet-body>p{font-size:14px;line-height:1.6}.wind-sheet-body>.wind-button{margin:4px}.wind-sheet-body>.wind-button:first-child{position:sticky;top:0;float:right;background:#1d6559;color:#fff5d8;z-index:2}.wind-sheet-body h2{clear:both;font-size:25px}.wind-sheet-body .wind-help,.wind-sheet-body .wind-alternative{margin:13px 0}.wind-sheet-body .wind-range{font-size:13px!important;margin:14px 0!important}.wind-sheet-body input[type=range]{min-height:44px!important}.wind-sheet-body .wind-button{min-height:44px}.quest-wind-playing .wind-sheet-body .wind-small{font-size:13px}
@media(max-width:700px){.quest-app .game-layout{display:block}.quest-app .stage-sidebar{display:none}.quest-app .game-card{padding:10px 11px;border-radius:17px}.quest-app .play-shell{padding:env(safe-area-inset-top) 9px max(5px,env(safe-area-inset-bottom))}.quest-app .progress{margin-bottom:7px}.quest-wind-playing .game-card h1{font-size:23px;line-height:1.1;margin:3px 0}.quest-wind-playing .game-card>.instruction{font-size:12px;line-height:1.35;margin:4px 0}.quest-wind-playing .wind-controls{gap:5px}.quest-wind-playing .wind-toolbar{flex-wrap:nowrap}.quest-wind-playing .wind-toolbar button{font-size:11px;padding:7px}.quest-wind-playing .wind-controls>.wind-range{flex:0 0 43px}.quest-wind-playing .wind-scene-badge{font-size:10px;max-width:calc(100% - 20px);padding:6px 9px;left:10px;top:10px}.quest-wind-playing .wind-locks{bottom:10px;gap:9px}.quest-wind-playing .wind-locks span{width:33px;height:33px;font-size:13px}.quest-wind-playing .wind-sheet>summary{font-size:11px}}
@media(max-height:650px){.quest-wind-playing .wind-status{display:none}.quest-wind-playing .stage-top{min-height:32px}.quest-wind-playing .wind-stage-picker{min-height:36px}.quest-wind-playing .wind-goalstrip{display:none}.quest-wind-playing .wind-windmeter small{display:none}.quest-wind-playing .wind-sheet>summary{min-height:36px}.quest-wind-playing .wind-toolbar button{min-height:40px}.quest-wind-playing .lantern-glass{height:50px}.quest-wind-playing .game-card>.instruction{font-size:11px}}
/* Painted, individually interactive firefly lanterns replace schematic jars. */
.quest-wind-playing .wind-lights-scene{background-image:linear-gradient(0deg,#0b17282e,transparent 70%),url('assets/wind-airmail-studio.webp');background-position:center;background-size:cover}.quest-wind-playing .aurora-board .wind-lights-scene{background-image:linear-gradient(0deg,#0b17282e,transparent 70%),url('assets/aurora-pulsepost.webp')}.wind-light-cables{display:none}.quest-wind-playing .wind-lights{bottom:7%;left:1%;right:1%;gap:0}.wind-lantern-art{display:block;width:100%;aspect-ratio:1;background-image:url('assets/wind-lanterns.webp');background-size:300% 100%;background-repeat:no-repeat;filter:brightness(.7) saturate(.8) drop-shadow(0 8px 6px #071a30b8);transition:filter .17s,transform .17s}.wind-lantern[data-light="0"] .wind-lantern-art{background-position:0 50%}.wind-lantern[data-light="1"] .wind-lantern-art{background-position:50% 50%}.wind-lantern[data-light="2"] .wind-lantern-art{background-position:100% 50%}.wind-lantern{position:relative;isolation:isolate}.wind-lantern:before{content:'';position:absolute;inset:7% -3% 20%;border-radius:50%;background:radial-gradient(ellipse,color-mix(in srgb,var(--light),transparent 10%),transparent 65%);opacity:0;transform:scale(.7);transition:opacity .16s,transform .2s;z-index:-1}.wind-lantern.on:before{opacity:.8;transform:scale(1.25)}.wind-lantern.on .wind-lantern-art{filter:brightness(1.4) saturate(1.2) drop-shadow(0 0 10px var(--light));transform:translateY(-4px) scale(1.07)}.wind-lantern-flare{position:absolute;left:40%;top:30%;font-size:clamp(20px,7vw,36px);color:#fff9cf;text-shadow:0 0 12px var(--light);opacity:0;transform:scale(.5) rotate(-25deg);transition:opacity .15s,transform .2s;pointer-events:none}.wind-lantern.on .wind-lantern-flare{opacity:1;transform:scale(1.4) rotate(10deg)}.quest-wind-playing .wind-lantern b{min-height:28px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px #071c3e77;border:1px solid #cba76247;letter-spacing:.1px}.wind-lantern.on b{background:#fff4d5!important;color:#3b3530!important;outline:2px solid var(--light)}.wind-lantern:focus-visible{outline:3px solid #fff4b1;outline-offset:-2px;border-radius:13px}.wind-lantern[disabled]{opacity:1}
@media(prefers-reduced-motion:reduce){.wind-lantern-art,.wind-lantern-flare,.wind-lantern:before{transition:none!important;transform:none!important}}
.quest-wind-playing .game-board{grid-template-columns:minmax(0,1fr);justify-content:stretch;align-items:stretch}
@media(max-height:650px){.quest-wind-playing .game-board{grid-template-rows:minmax(0,1fr) auto}}
@media(max-height:500px) and (min-width:600px){.quest-wind-playing .game-board{grid-template-columns:minmax(0,1fr) minmax(200px,.75fr);grid-template-rows:minmax(0,1fr);column-gap:12px}.quest-wind-playing .wind-controls{grid-column:2;grid-row:1}.quest-wind-playing .wind-scene,.quest-wind-playing .wind-camera-scene,.quest-wind-playing .wind-lights-scene,.quest-wind-playing .wind-shadow-pair{grid-column:1;grid-row:1}.quest-wind-playing .game-card{padding:8px 12px}.quest-wind-playing .game-card h1{font-size:20px;margin:2px 0}.quest-wind-playing .stage-top{min-height:30px}.quest-wind-playing .play-header{min-height:48px}.quest-wind-playing .game-card>.instruction{margin:2px 0}}
/* Hand-painted flying ship: assembly and forgiving sky flight. */
.wind-skyforge{background:url('assets/wind-skyforge.webp') center/cover}.wind-skyflight{background:url('assets/wind-skyflight.webp') center/cover;touch-action:none;cursor:crosshair}.wind-ship-art{display:block;background-image:url('assets/wind-ship-parts.webp');background-size:200% 200%;background-repeat:no-repeat;aspect-ratio:1;pointer-events:none}.ship-hull{background-position:0 0}.ship-art-0{background-position:100% 0}.ship-art-1{background-position:0 100%}.ship-art-2{background-position:100% 100%}.wind-ship-assembly{position:absolute;left:50%;top:51%;width:min(80%,330px);aspect-ratio:1;transform:translate(-50%,-40%);filter:drop-shadow(0 12px 8px #14293c66)}.wind-ship-assembly>.ship-hull{position:absolute;inset:0;z-index:3}.wind-ship-slot{position:absolute;border:0;background:none;padding:0;cursor:pointer;min-width:44px;min-height:44px}.ship-0{left:17%;top:-20%;width:75%;z-index:1}.ship-1{left:18%;top:45%;width:60%;z-index:4}.ship-2{left:70%;top:36%;width:35%;z-index:5}.wind-ship-slot>.wind-ship-art{width:100%;filter:grayscale(1) brightness(2);opacity:.35;transition:opacity .3s,filter .3s}.wind-ship-slot.expected>.wind-ship-art{opacity:.8;filter:brightness(1.5) drop-shadow(0 0 9px #ffecb4)}.wind-ship-slot.fitted>.wind-ship-art{opacity:1;filter:none}.wind-ship-slot b{position:absolute;bottom:0;left:50%;transform:translateX(-50%);padding:5px 8px;border-radius:9px;background:#153b48e8;color:#ffedc1;font-size:10px;white-space:nowrap}.wind-ship-slot.fitted b{display:none}.wind-part-tray{display:flex;gap:7px;justify-content:center}.quest-wind-playing .wind-part-tray button{flex:1;min-height:80px;border:1px solid #d2b979;padding:3px 6px!important;border-radius:13px;background:linear-gradient(135deg,#fffae8,#e8d9b4);font-size:12px;touch-action:none}.wind-part-tray .wind-ship-art{width:65px;max-width:100%;margin:auto}.wind-part-tray button[aria-pressed=true]{outline:3px solid #d8901e;background:#fff0b8;box-shadow:0 0 17px #ffd26c66}.wind-part-tray button:disabled{opacity:.38}.wind-part-tray b{display:block;font-size:11px;line-height:1.4}.wind-drag-piece{position:fixed;width:95px;height:95px;transform:translate(-50%,-50%);z-index:1299;filter:drop-shadow(0 5px 8px #0006);pointer-events:none}.ship-ready .ship-art-2{animation:wind-propeller .38s linear infinite}.wind-flying-ship{position:absolute;width:clamp(72px,23%,145px);aspect-ratio:1;left:15%;top:83%;transform:translate(-50%,-50%) rotate(var(--ship-bank,0deg));pointer-events:none;z-index:3}.wind-flying-ship .wind-ship-assembly{inset:0;transform:none;width:100%;top:0;left:0}.wind-flight-ring{position:absolute;width:clamp(48px,17%,75px);aspect-ratio:1;min-height:44px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(ellipse,#fff7c13b,transparent 60%);border:5px solid #ffe4a1;box-shadow:inset 2px 1px 2px #fffefa,inset -2px -2px 2px #b77b26,0 0 15px #ffc36188,0 4px 7px #193c4a66;cursor:pointer;color:#fffbd4;font-size:25px;transition:opacity .4s,scale .4s}.wind-flight-ring:after{content:'';position:absolute;inset:-8px;border:1px solid #fff1bc88;border-radius:50%}.wind-flight-ring i{font-style:normal;text-shadow:0 0 8px #b66800}.wind-flight-ring.collected{opacity:0;scale:1.4;pointer-events:none}.wind-flight-course{position:absolute;width:24px;height:24px;border:2px solid #fff6ce;border-radius:50%;box-shadow:0 0 14px #ffeeb7;transform:translate(-50%,-50%);pointer-events:none;opacity:.8}.wind-flight-course.arrived{opacity:0}.wind-flight-arrows{display:flex;gap:7px}.wind-flight-arrows button{flex:1;font-size:21px!important}.wind-skyflight.flight-complete:after{content:'';position:absolute;inset:0;background:radial-gradient(circle at 83% 16%,#fff5a89c,transparent 70%);pointer-events:none;animation:wind-arrival 1.5s ease-in both}.wind-ship-slot:focus-visible{outline:3px solid #fff4bf;border-radius:14px}
@keyframes wind-propeller{to{transform:rotate(360deg)}}@keyframes wind-arrival{from{opacity:0}to{opacity:1}}
@media(max-height:650px){.wind-part-tray .wind-ship-art{width:47px}.quest-wind-playing .wind-part-tray button{min-height:67px}}
@media(prefers-reduced-motion:reduce){.ship-ready .ship-art-2,.wind-skyflight.flight-complete:after{animation:none!important}.wind-flight-ring,.wind-ship-slot>.wind-ship-art{transition:none!important}.wind-flying-ship{rotate:none}}

.wind-skyforge{container-type:size}.wind-skyforge .wind-ship-assembly{width:min(82cqw,74cqh,330px)}
.quest-wind-playing .wind-status{height:44px;min-height:44px;flex:0 0 44px}.quest-wind-playing .wind-light-instruction{height:42px;min-height:42px;display:flex;align-items:center;justify-content:center}.quest-wind-playing .game-card:has([data-wind-stage=pulsepost])>.instruction{display:none}
@media(max-height:650px){.quest-wind-playing .wind-status{display:block;height:30px;min-height:30px;max-height:30px;flex-basis:30px;font-size:10px;line-height:1.3;padding:3px 7px}.quest-wind-playing .wind-controls{gap:4px}.quest-wind-playing .wind-light-instruction{height:36px;min-height:36px;font-size:11px}}
.wind-skyflight{background-position:center top}
.quest-wind-playing .game-layout{display:block}.quest-wind-playing .stage-sidebar{display:none}.quest-wind-playing .game-card{max-width:1080px;margin:0 auto;width:100%}
.wind-skyflight{container-type:size}.wind-skyflight .wind-flying-ship{width:clamp(64px,21cqh,115px);top:78%}
/* Complex detective controls use the same single-screen rule. */
.quest-app .game-card:has(.detective-board)>.instruction,.quest-app .game-card:has(.detective-board)>.quest-story-button,.quest-app .game-card:has(.detective-board)>#game-note{display:none}.quest-app .det-fixed-board{display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;justify-content:stretch;align-items:stretch;gap:6px;padding:0;margin-top:8px}.det-fixed-scene{container-type:size;min-height:0;min-width:0;overflow:hidden;display:flex;justify-content:center;align-items:center}.det-fixed-scene>.det-scene-wrap,.det-fixed-scene>.det-route,.det-fixed-scene>.det-stars{width:min(100cqw,100cqh);max-width:100%;height:auto;max-height:100%;aspect-ratio:1;margin:0}.det-fixed-scene>.det-puzzle{width:min(100cqw,150cqh);max-width:100%;aspect-ratio:3/2;margin:0;gap:5px}.det-fixed-scene .det-fragment{aspect-ratio:1;min-height:0;padding:0}.det-fixed-controls{display:flex;flex-direction:column;min-height:0;gap:5px}.det-fixed-controls>.det-status{height:42px;min-height:42px;max-height:42px;overflow:hidden;font-size:11px;line-height:1.35;padding:4px 8px;margin:0;order:9}.det-fixed-controls>.det-toolbar{flex-wrap:nowrap;margin:0;gap:6px}.quest-app .det-fixed-controls>.det-toolbar .det-btn{min-width:0;flex:1;width:auto;max-width:none;padding:7px;font-size:11px;min-height:44px;justify-content:center}.det-fixed-controls .det-evidence{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:0;padding:0}.det-fixed-controls .det-evidence li{font-size:10px;line-height:1.25;padding:4px 7px;min-height:24px;border-radius:8px}.det-fixed-board .det-fixed-scene>.det-dossiers{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:100%}.det-fixed-board .det-dossiers .det-btn{min-height:44px;font-size:12px;padding:9px;line-height:1.3}.det-fixed-board .det-dossiers .det-btn span{font-size:11px;line-height:1.3}.det-fixed-scene>.det-timeline{height:100%;max-height:100%;width:100%;gap:5px;margin:0;grid-template-rows:repeat(5,minmax(44px,1fr))}.det-fixed-scene .det-timeline .det-btn{height:100%;min-height:44px;font-size:12px;line-height:1.25;padding:5px 8px;gap:8px}.det-fixed-scene .det-timeline li{min-height:0}.det-fixed-board .det-cipher{display:grid;grid-template-columns:65px minmax(0,1fr);align-items:center;gap:7px;width:100%;padding:10px;height:100%;max-height:100%}.det-fixed-board .det-cipher .det-disk{width:63px;height:63px;margin:0;grid-column:1;grid-row:1/span 2}.det-fixed-board .det-cipher .det-code{font-size:23px;line-height:1.1;margin:2px;letter-spacing:2px}.det-fixed-board .det-cipher .det-pairs{grid-column:1/-1;display:flex;gap:4px;justify-content:center}.det-fixed-board .det-cipher .det-pairs>span{padding:5px;min-width:30px;font-size:15px}.det-fixed-board .det-cipher .det-toolbar{margin:0;gap:5px;flex-wrap:nowrap}.det-fixed-board .det-cipher .det-toolbar .det-btn{min-width:44px;min-height:44px;padding:5px}.det-fixed-board .det-cipher .det-small{font-size:10px;line-height:1.3;margin:0}.det-fixed-board .det-wave{width:100%;padding:10px}.det-fixed-board .det-range{margin:7px 0;font-size:12px}.det-fixed-board .det-range input{height:36px;min-height:36px;margin:0}.det-fixed-board .det-wave svg{max-height:135px}.det-sheet{order:8}.det-sheet .det-notes{font-size:13px}.det-sheet .det-fact{min-height:44px}.det-sheet .det-star-reference svg{width:200px;max-width:100%;height:200px}.det-sheet .det-reference{max-height:65dvh}.det-fixed-board .det-sheet>summary{min-height:44px;font-size:11px}
@media(max-height:650px){.det-fixed-controls>.det-status{height:30px;min-height:30px;max-height:30px;font-size:10px}.det-fixed-board .det-sheet>summary{min-height:36px}.det-fixed-board .det-cipher .det-disk{width:53px;height:53px}.det-fixed-board .det-wave svg{max-height:85px}.det-fixed-scene .det-timeline .det-btn{font-size:11px}.det-fixed-controls .det-evidence li{font-size:9px;min-height:22px}.det-fixed-controls{gap:4px}}
.quest-app .game-board:has(>.maze-grid){container-type:size;padding:0;gap:8px}.quest-app .game-board>.maze-grid{width:min(100cqw,calc(100cqh - 56px),260px);gap:4px;padding:8px}.quest-app .game-board>.dpad{display:grid;grid-template-columns:repeat(4,44px);grid-template-rows:44px;gap:7px}.quest-app .game-board>.dpad button{grid-area:auto!important;min-height:44px;min-width:44px;font-size:22px}.quest-app .game-board .maze-cell{font-size:clamp(16px,5cqh,25px)}.quest-app .game-board .maze-ico{max-width:100%;max-height:100%}
.quest-title-row{display:flex;align-items:center;gap:8px;flex:0 0 auto;min-height:44px;margin:5px 0}.quest-app .quest-title-row>h1{flex:1;min-width:0;margin:0!important}.quest-app .quest-title-row>.quest-story-button{margin:0;width:44px;height:44px;flex:0 0 44px;font-size:21px;font-weight:900;padding:0}
.quest-app .game-board:has(>.race-track){container-type:size;padding:0;gap:6px}.quest-app .game-board>.race-track{flex:1;min-height:0;max-height:calc(100% - 50px);display:flex;flex-direction:column}.quest-app .race-track>.race-asphalt{flex:1;min-height:100px;height:auto;container-type:size}.quest-app .race-track .race-count{font-size:12px;margin-top:5px}.quest-app .race-track .lane-signs{font-size:10px;margin-bottom:5px}.quest-app .race-track .race-player,.quest-app .race-track .race-foe{width:auto;height:clamp(44px,26cqh,90px);aspect-ratio:2/3;margin-left:0;transform:translateX(-50%)}.quest-app .race-track+.race-controls{gap:10px;flex:0 0 44px}
.wind-native-hud{position:fixed;inset:0;background:transparent;pointer-events:none;z-index:1500;color:#fff;user-select:none;-webkit-touch-callout:none}.wind-native-hud header{position:absolute;inset:max(12px,env(safe-area-inset-top)) 12px auto;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;border-radius:17px;background:#133c4ccf}.wind-native-hud button{pointer-events:auto;min-height:44px;border:1px solid #ffeeaf;background:#f8edcb;color:#21463e;border-radius:12px;padding:10px 15px;font:800 13px inherit}.wind-native-hud p{position:absolute;left:20px;right:20px;bottom:105px;text-align:center;padding:12px;border-radius:15px;background:#133c4cd9;font-size:16px;line-height:1.4}.wind-native-hud>button{position:absolute;left:25px;right:25px;bottom:max(34px,env(safe-area-inset-bottom))}.wind-native-hud>button:disabled{opacity:.65}
.quest-app .game-board>.build-board{height:100%;min-height:0;gap:5px}.quest-app .build-board .mini-caption{font-size:11px;margin:2px 0}.quest-app .build-plan{gap:3px;min-width:0}.quest-app .build-step{flex:1;min-width:0;width:auto;min-height:58px;max-width:65px;gap:1px}.quest-app .build-step svg,.quest-app .build-step .dress-art{width:100%;max-width:48px;height:39px}.quest-app .build-arrow{font-size:14px;flex:0 0 10px}.quest-app .build-parts{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;min-height:0}.quest-app .build-part{min-width:0;min-height:75px;padding:4px;font-size:10px;line-height:1.2;border-width:2px}.quest-app .build-part svg,.quest-app .build-part .dress-art{width:100%;height:45px;max-width:64px}.quest-app .build-part span{max-width:100%;overflow-wrap:anywhere}

/* The separately maintained Atelier shares the same fixed game viewport. */
.quest-app .atelier-board{container-type:size;display:flex;flex-direction:column;align-items:stretch;gap:6px}.quest-app .atelier-board>.mini-caption{flex:0 0 auto;font-size:11px;line-height:1.25;margin:0}.quest-app .atelier-board .atelier-sample,.quest-app .atelier-board .atelier-sketch,.quest-app .atelier-board .atelier-mix-bowl,.quest-app .atelier-board .atelier-doll{margin:0;min-height:0;overflow:hidden}.quest-app .atelier-board .atelier-art{height:100%;max-height:100%;width:100%;max-width:100%;object-fit:contain;border-radius:13px}.quest-app .atelier-board>.atelier-sample{height:27%;flex:0 1 27%}.quest-app .atelier-board>.atelier-stitch{flex:1;min-height:90px;max-height:none;aspect-ratio:auto}.quest-app .atelier-board .atelier-mannequin-wrap,.quest-app .atelier-board .atelier-bobbin{flex:1;min-height:0;display:grid;place-items:center}.quest-app .atelier-board .atelier-mannequin-wrap .atelier-art{object-fit:contain}.quest-app .atelier-board .atelier-measure-sample{margin:2px 0;padding:8px;font-size:11px;flex:0 0 auto}.quest-app .atelier-board .atelier-measure-sample b{max-width:55%;flex-shrink:0}.quest-app .atelier-board .atelier-len-bar{min-width:0;flex-shrink:1}.quest-app .atelier-board .atelier-notch{min-height:44px;min-width:38px}.quest-app .atelier-board .atelier-wind-meter{flex:0 0 16px;margin-top:5px}.quest-app .atelier-board .atelier-button-board{flex:1;display:flex;flex-direction:column;justify-content:space-evenly;gap:8px}.quest-app .atelier-board .atelier-hole,.quest-app .atelier-board .atelier-btn-drag{width:calc(56px * var(--s));height:calc(56px * var(--s));min-height:44px;min-width:44px}.quest-app .atelier-board .atelier-hole-ring{min-height:0;min-width:0}.quest-app .atelier-board .atelier-piece,.quest-app .atelier-board .atelier-pot{width:calc((100cqw - 24px)/4);max-width:80px;min-height:64px;padding:5px;font-size:11px}.quest-app .atelier-board .atelier-piece-pic,.quest-app .atelier-board .atelier-pot-pic{height:clamp(32px,13cqh,65px);margin-bottom:3px;object-fit:cover}.quest-app .atelier-board[data-atelier="outfit"],.quest-app .atelier-board[data-atelier="dyemix"],.quest-app .atelier-board[data-atelier="drapeturn"]{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto minmax(0,1fr) auto;align-items:stretch}.quest-app .atelier-board[data-atelier="outfit"]>.mini-caption,.quest-app .atelier-board>.atelier-pieces,.quest-app .atelier-board[data-atelier="drapeturn"]>.mini-caption,.quest-app .atelier-board>.atelier-drape-actions{grid-column:1/-1}.quest-app .atelier-board>.atelier-outfit-sample{min-height:0}.quest-app .atelier-board>.atelier-drape{min-height:0;touch-action:none}.quest-app .atelier-board[data-atelier="dyemix"]{grid-template-rows:auto minmax(0,1fr) auto auto auto}.quest-app .atelier-board[data-atelier="dyemix"]>.mini-caption,.quest-app .atelier-board>.atelier-pots,.quest-app .atelier-board>[data-clear]{grid-column:1/-1}.quest-app .atelier-board[data-atelier="dyemix"]>.atelier-sample{height:100%;min-height:0}.quest-app .atelier-board .atelier-drape-actions{flex-wrap:nowrap;gap:4px;margin:0}.quest-app .atelier-board .atelier-drape-actions .choice{min-width:44px;padding:7px}.quest-app .atelier-board .atelier-drape-actions .btn{min-height:44px;padding:8px;font-size:11px}.quest-app .atelier-board .atelier-drape-hint{font-size:10px;bottom:4px;padding:3px;background:#173d3bb8}.quest-app .atelier-board .atelier-pleat-scheme{margin:2px 0}.quest-app .atelier-board[data-atelier="pleatfold"]>.atelier-sample{flex:1;height:auto}.quest-app .atelier-board .atelier-pleat-scheme b{width:32px;height:32px}.quest-app .atelier-board .atelier-pieces,.quest-app .atelier-board .atelier-pots{gap:6px;align-items:end}.quest-app .atelier-board .atelier-sketch{display:grid;place-items:center}
.quest-app .game-board:has(>.object-cloud){container-type:size}.quest-app .game-board>.equation{font-size:clamp(24px,8cqh,38px);line-height:1.1}.quest-app .game-board .object-cloud .dino-token{width:clamp(32px,15cqw,50px);height:clamp(36px,16cqh,60px);font-size:clamp(24px,12cqh,40px);line-height:1;display:grid;place-items:center;min-width:0}.quest-app .game-board .object-cloud .math-plus{font-size:24px;line-height:1}.quest-app .game-board .object-cloud .dino-token img{max-width:100%;max-height:100%;object-fit:contain}

/* Stories and household-code forms remain reachable even with a software keyboard. */
.quest-reading-phase #play-content{overflow-y:auto;padding-bottom:18px}.quest-reading-phase .game-layout{height:auto;min-height:100%}.quest-reading-phase .game-card{height:auto;overflow:visible}.quest-reading-phase .finish-card{min-height:0;flex:1;overflow-y:auto}
@media(max-height:650px){
.quest-app .game-board{gap:6px;padding:4px 0}.quest-app .game-board>.mini-caption{font-size:11px;line-height:1.2;margin:0}.quest-app .game-board>.choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.quest-app .game-board>.name-choices{display:flex;flex-direction:column}.quest-app .game-board .choice{min-width:44px;min-height:44px;padding:7px;font-size:20px;line-height:1.2}.quest-app .game-board .choice.long{font-size:12px}.quest-app .game-board>.traffic{flex-direction:row;padding:8px;gap:7px}.quest-app .game-board>.traffic i{width:35px;height:35px}.quest-app .game-board .sign-plate{font-size:12px;line-height:1.3;padding:6px;margin:0}.quest-app .game-board .wheel-btn,.quest-app .game-board .car-btn{min-height:72px;padding:4px}.quest-app .game-board .wheel-btn svg,.quest-app .game-board .car-btn svg{height:60px}.quest-app .game-board .garage.numbered{height:78px;font-size:29px;padding-bottom:5px}.quest-app .game-board .garage .door-no{font-size:14px;top:4px}.quest-app .game-board .player-chip{min-height:0;height:55px;font-size:12px}.quest-app .game-board .player-chip svg{height:42px}.quest-app .game-board .tank{height:125px}.quest-app .game-board .sample{font-size:54px;line-height:1;max-height:90px}.quest-app .game-board .sample svg{max-height:88px}.quest-app .game-board .car-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.quest-app .game-board .car-btn svg{height:65px}.quest-app .game-board .pump-row{gap:5px}.quest-app .game-board .pump{min-height:44px;font-size:12px;padding:8px}.quest-app .game-board .build-parts{gap:5px}.quest-app .game-board .build-part{min-height:59px;padding:3px;font-size:9px}.quest-app .game-board .build-part svg,.quest-app .game-board .build-part .dress-art{height:31px}.quest-app .game-board .build-step{min-height:46px}.quest-app .game-board .build-step svg,.quest-app .game-board .build-step .dress-art{height:29px}.quest-app .game-board .build-board>.btn{min-height:44px;padding:7px 10px;font-size:11px}.quest-app .game-board .ballet-sample,.quest-app .game-board .dino-sample{min-height:0;height:115px;margin:0;padding:5px;width:100%;overflow:hidden}.quest-app .game-board .ballet-sample .portrait,.quest-app .game-board .dino-sample .portrait{height:100%;max-height:100%;object-fit:contain}.quest-app .game-board .mirror-btn,.quest-app .game-board .spot-btn{min-height:65px;padding:4px}.quest-app .game-board .mirror-btn .ballet-art,.quest-app .game-board .spot-btn .ballet-art{height:60px;object-fit:contain}.quest-app .game-board .shadow-sample{font-size:50px;line-height:1;margin:0;padding:8px}.quest-app .game-board:has(>.traffic)>.choices .choice,.quest-app .game-board:has(>.ballet-sample)>.choices .choice{font-size:12px;overflow-wrap:normal}
}
@media(max-height:650px){.quest-app .game-board .recall-sample{min-height:0;height:70px}.quest-app .game-board .recall-sample svg{height:70px;max-height:70px}.quest-app .game-board .recall-sample+[data-action="peek-car"]{min-height:44px;padding:7px 10px;font-size:12px}}

.quest-app:has(.atelier-board) .wind-quick-tools{display:none}.quest-app:has(.atelier-board) .stage-top .wind-button{min-height:44px;font-size:11px;padding:7px 10px;flex-shrink:0}
/* Three illustrated assembly rounds, retaining a fixed game viewport. */
.wind-forge-assembly{position:absolute;left:50%;top:50%;transform:translate(-50%,-43%);width:min(82cqw,72cqh,330px);aspect-ratio:1;filter:drop-shadow(0 8px 7px #102b3d66)}.wind-forge-base,.wind-forge-slot{position:absolute;display:block}.wind-forge-art{display:block;width:100%;height:100%;background-repeat:no-repeat;pointer-events:none}.wind-forge-slot{border:0;padding:0;background:transparent;min-width:44px;min-height:44px;cursor:pointer}.wind-forge-slot>.wind-forge-art{opacity:.25;filter:grayscale(1) brightness(2.2);transition:filter .25s,opacity .25s}.wind-forge-slot.expected>.wind-forge-art{opacity:.8;filter:brightness(1.6) drop-shadow(0 0 7px #ffe99d)}.wind-forge-slot.fitted>.wind-forge-art{opacity:1;filter:none}.wind-forge-slot b{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:10px;padding:4px 7px;border-radius:7px;white-space:nowrap;background:#153b48ec;color:#fff0ca;opacity:0;pointer-events:none}.wind-forge-slot.expected b{opacity:1}.wind-forge-slot.fitted b{display:none}.wind-part-tray .wind-forge-art{height:48px;width:100%;max-width:78px;margin:auto}.quest-wind-playing .wind-part-tray button{min-width:0;flex:1 1 0;padding:4px!important}.wind-part-tray:has(button:nth-child(5)) b{font-size:9px}.wind-forge-art.wind-drag-piece{width:90px;height:90px}.wind-forge-assembly[data-kind=suit]{width:min(78cqw,64cqh,290px);top:49%;transform:translate(-50%,-50%)}.wind-forge-assembly[data-kind=balloon]{width:min(80cqw,74cqh,325px)}.wind-forge-slot:focus-visible{outline:3px solid #f4c158;border-radius:14px}.wind-flight-ring.next{border-color:#a7ffee;box-shadow:0 0 0 3px #236856,0 0 20px #8effe7}.wind-skyflight[data-flight-round="1"]{background-position:35% top}.wind-skyflight[data-flight-round="2"]{background-position:75% top}.wind-ar-only{background:url('assets/wind-arcompass.webp') center/cover}.wind-ar-invitation{position:absolute;inset:auto 14px 18px;padding:15px;border-radius:20px;background:#102c3be8;color:#fff2ce;text-align:center}.wind-ar-invitation b{font-size:19px}.wind-ar-invitation p{font-size:13px;margin:8px 0;line-height:1.5}.wind-ar-invitation span{font-size:12px;color:#a9e5db}.wind-ar-only .wind-portal-host{position:absolute;inset:0;pointer-events:none}.wind-board[data-wind-stage=chromalens] .wind-goalstrip{gap:4px}.wind-board[data-wind-stage=chromalens] .wind-goalstrip span{min-width:0;flex:1}.wind-board[data-wind-stage=magnetbridge] .wind-goalstrip{gap:5px}.wind-board[data-wind-stage=magnetbridge] .wind-goalstrip span{min-width:0;flex:1}
@media(max-height:650px){.wind-part-tray .wind-forge-art{height:37px}.quest-wind-playing .wind-part-tray button{min-height:60px}.wind-ar-invitation{bottom:10px;padding:10px}.wind-ar-invitation p{margin:5px 0;font-size:11px}.wind-ar-invitation b{font-size:16px}}
@media(prefers-reduced-motion:reduce){.wind-forge-slot>.wind-forge-art{transition:none}}
.wind-gloves-fit{display:block;position:absolute;inset:0;opacity:.25;filter:grayscale(1) brightness(2)}.wind-gloves-fit .wind-forge-art{position:absolute;top:0;width:27%;height:100%}.wind-gloves-fit .glove-left{left:0}.wind-gloves-fit .glove-right{right:0}.wind-forge-slot.expected .wind-gloves-fit{opacity:.8;filter:brightness(1.6) drop-shadow(0 0 7px #ffe99d)}.wind-forge-slot.fitted .wind-gloves-fit{opacity:1;filter:none}

.quest-wind-playing .wind-board[data-wind-stage=pulsepost] .wind-light-slots{flex-wrap:wrap;max-width:205px;width:100%;justify-self:center;row-gap:6px}.quest-wind-playing .wind-board[data-wind-stage=pulsepost] .wind-light-slots span{flex:0 0 33px}.wind-board[data-wind-stage=pulsepost] .wind-goalstrip{gap:4px}.wind-board[data-wind-stage=pulsepost] .wind-goalstrip>span{min-width:0;flex:1}
/* Sensor stages have one deliberate start action, then all space goes to play. */
.wind-board [data-sensor-start]{background:linear-gradient(135deg,#156c62,#0b494e);color:#fff4cd;border-color:#b99757;box-shadow:0 3px 0 #073c40,0 0 0 2px #d4b96833;font-weight:850;letter-spacing:.3px;min-height:48px}
.wind-board [data-sensor-start][hidden],.wind-board[data-sensor-started=true] .wind-sensor-note{display:none!important}
.wind-sensor-note{margin:0;color:#46685e;font-size:12px;line-height:1.4;text-align:center}
.quest-wind-playing .wind-sensor-note{font-size:11px}
.wind-board[data-sensor-started=true] .wind-toolbar:has([data-sensor-start]){display:none}
/* Each camera target stays named; a short voiced card introduces the next colour. */
.quest-wind-playing .wind-color-target{gap:12px;min-height:54px;border:1px solid var(--wind-target,#d6decf);background:#f9fbf1}
.wind-color-target>div{display:grid;gap:0;text-align:left}.wind-color-target small{font-size:10px;letter-spacing:.5px;color:#52766a}.wind-color-target strong{font-size:20px;line-height:1.2;color:#173f3d}.quest-wind-playing .wind-color-target span{height:36px;flex-basis:36px;border:3px solid white;box-shadow:0 0 0 1px #153b3b25}
.wind-color-cue{position:absolute;left:12px;right:12px;top:50%;transform:translateY(-40%) scale(.96);padding:15px;display:grid;justify-items:center;gap:5px;border:2px solid var(--wind-target);border-radius:20px;background:#fffbedf5;box-shadow:0 8px 40px #06222f44;color:#163e3e;opacity:0;visibility:hidden;transition:opacity .25s,transform .25s,visibility .25s;pointer-events:none;text-align:center}
.wind-color-cue.shown{opacity:1;visibility:visible;transform:translateY(-50%) scale(1)}.wind-color-cue i{color:var(--wind-target);font-style:normal;font-size:24px}.wind-color-cue small{font-size:11px;color:#52766a}.wind-color-cue strong{font-size:28px;line-height:1.1}.wind-color-cue>span{font-size:12px;line-height:1.4;max-width:260px}
@media(prefers-reduced-motion:reduce){.wind-color-cue{transition:none}}
.wind-board [data-wind="show-lights"]{background-color:#197b52;background-image:linear-gradient(140deg,#23945e,#126644);color:#fff9df;border:1px solid #0d593b;box-shadow:0 3px 0 #0e4b34,inset 0 1px 0 #c4f1bf66;font-weight:900}
.quest-wind-playing .wind-controls [data-wind="show-lights"]{font-size:17px;min-height:50px;letter-spacing:.2px}.wind-board [data-wind="show-lights"]:disabled{opacity:.7}

/* Painted clue cards cast a 10px shadow: keep it inside the cover, never over the form text. */
.clue-cover{display:flex;flex-direction:column;align-items:center;width:100%;max-width:100%}
.quest-app .clue-card>.clue-cover{flex:none;padding-bottom:18px}
.quest-app .clue-card .clue-cover>:is(.clue-art,.scratch,.bubble-clue){flex:none;max-width:100%;margin:8px auto 10px}
.quest-app .clue-card .scratch-tip{margin:0 0 2px;max-width:100%}
.quest-app .clue-card>.code-form{flex:none;width:100%;max-width:360px;position:relative;z-index:1}
.quest-app .clue-card>:is(.clue-heading,.clue-riddle,.companion){flex:none;position:relative;z-index:1}

/* Keep the clipped live region out of the viewport scroll extent. */
body.quest-app #live{position:fixed;top:0;left:0}
.quest-app .game-board:has(.racers-match-grid){position:relative;justify-content:flex-start;overflow-y:auto;gap:8px;padding:4px 0;overscroll-behavior:contain}.quest-app .game-board:has(.racers-match-grid)>*{flex-shrink:0}.quest-app .game-board:has(.racers-fuel-scene){position:relative;overflow-y:auto;justify-content:flex-start}.quest-app .racers-sample{height:125px;min-height:125px}.quest-app .racers-sample .racers-top-car{height:120px}.quest-app .racers-match-grid .car-btn{min-height:92px}.quest-app .racers-match-grid .racers-top-car{height:88px;min-height:88px}
.quest-app .game-board:has(.racers-route){position:relative;overflow-y:auto;justify-content:flex-start;gap:4px;padding:2px 0}.quest-app .racers-route{gap:5px;flex-shrink:0}.quest-app .road-grid{width:min(100%,min(330px,43dvh))}.quest-app .road-go{min-height:44px}.quest-app .road-tile{min-height:44px}
.quest-app .game-board:has(.racers-traffic){position:relative;justify-content:flex-start;overflow-y:auto;gap:4px;padding:2px 0}.quest-app .racers-traffic{flex-shrink:0;gap:5px}.quest-app .traffic-switch{min-height:58px}.quest-app .traffic-scene{flex-shrink:0}

/* Светофоры расположены рядом с ожидающими машинами. */
.quest-app .traffic-scene{width:min(100%, 420px, 57dvh)}.quest-app .traffic-switch{position:absolute;z-index:6;display:flex;flex-direction:column;gap:0;min-height:0;width:45px;height:72px;padding:3px;border-radius:11px;transform:translate(-50%,-50%);background:#fff9ebed;box-shadow:0 3px 6px #17251c80}.quest-app .traffic-switch.up{left:66%;top:78%}.quest-app .traffic-switch.right{left:18%;top:30%}.quest-app .traffic-switch.active{box-shadow:0 0 12px #75d78d,0 3px 6px #17251c80}.quest-app .traffic-light-art{width:23px;height:46px}.quest-app .traffic-direction{font-size:17px;line-height:17px;color:#253f35}.quest-app .traffic-rule{font-size:12px}

/* Подсказка первого уровня показывает следующее нажатие. */
.quest-app .traffic-hint::after{content:"";position:absolute;z-index:10;left:50%;top:50%;width:58px;height:58px;border:4px solid #fff8be;border-radius:50%;box-shadow:0 0 0 4px #ffbd25,0 0 16px 6px #ffdf52;pointer-events:none;transform:translate(-50%,-50%) scale(.8);animation:traffic-hint-tap 1.1s ease-in-out infinite}.quest-app .traffic-hint{z-index:8}@keyframes traffic-hint-tap{0%,100%{transform:translate(-50%,-50%) scale(.85);opacity:1}50%{transform:translate(-50%,-50%) scale(1.18);opacity:.65}}@media(prefers-reduced-motion:reduce){.quest-app .traffic-hint::after{animation:none;opacity:1;transform:translate(-50%,-50%)}}

/* Подсказка следующего действия в первом уровне квеста «Гонщики». */
.quest-app .racers-hint{outline:4px solid #fff5a5!important;outline-offset:3px;box-shadow:0 0 0 6px #ffc02f,0 0 20px 8px #ffdf52!important;animation:racers-hint-pulse 1.1s ease-in-out infinite!important;z-index:8}@keyframes racers-hint-pulse{0%,100%{outline-offset:2px;filter:brightness(1)}50%{outline-offset:7px;filter:brightness(1.15)}}@media(prefers-reduced-motion:reduce){.quest-app .racers-hint{animation:none!important}}

/* Числовая тропа динозавра. */
.quest-app .dino-steps{width:100%;display:flex;flex-direction:column;align-items:center;gap:12px}.quest-app .dino-steps-scene{position:relative;width:min(100%,340px);min-height:195px;display:flex;align-items:flex-end;justify-content:center;padding:18px 10px;background:linear-gradient(#eaf8c866,#317d3b66),url(assets/map-dino.webp) center 60%/cover;border:4px solid #659d58;border-radius:22px;overflow:hidden;box-shadow:0 5px 0 #447747}.quest-app .dino-steps-friend{position:absolute;top:12px;left:12px;width:72px;height:72px;object-fit:cover;border-radius:50%;border:3px solid #fff1b7;box-shadow:0 3px 8px #234c3266}.quest-app .dino-bridge{display:flex;gap:5px;align-items:center;justify-content:center;width:100%;padding:12px 4px;border-radius:18px;background:#5b3e2de0;box-shadow:0 5px 0 #382b24}.quest-app .dino-bridge span,.quest-app .dino-step-stone{display:grid;place-items:center;width:clamp(38px,11vw,51px);height:48px;border:3px solid #fff2b0;border-radius:13px;background:linear-gradient(145deg,#fff3bc,#dfb863);color:#543d25;font-size:21px;font-weight:900;box-shadow:0 4px 0 #98723b}.quest-app .dino-step-options{display:flex;justify-content:center;flex-wrap:wrap;gap:9px}.quest-app .dino-step-stone{width:58px;height:55px}.quest-app .dino-step-stone:disabled{opacity:.45}

.quest-app .dino-round-game{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}.quest-app .dino-round-game .dino-cloud{max-width:100%}.quest-app .dino-round-game .memory-grid{width:min(100%,320px)}.quest-app .dino-round-game .memory-tile{min-height:54px}.quest-app .dino-round-game .dino-round-choice{touch-action:manipulation}.quest-app .dino-round-game .catch-field{width:min(100%,340px)}
.quest-app .dino-round-game .catch-orb{animation:none}.quest-app .dino-round-game .catch-orb span{animation:dino-spark-glow 1.8s ease-in-out infinite}@keyframes dino-spark-glow{50%{filter:brightness(1.35);opacity:.8}}@media(prefers-reduced-motion:reduce){.quest-app .dino-round-game .catch-orb span{animation:none}}
/* Give the dinosaur maze the available width while retaining the touch controls. */
.quest-app .game-board:has(.dino-maze){gap:4px;padding:3px 0;justify-content:center}.quest-app .game-board:has(.dino-maze) .dino-maze{width:min(100%,360px,max(220px,calc(100dvh - 290px)));box-sizing:border-box}.quest-app .game-board:has(.dino-maze) .dino-maze-level{margin:0;font-size:clamp(11px,3vw,14px);line-height:1.2}.quest-app .game-board:has(.dino-maze) .dpad{gap:5px}
@media(max-height:650px){.quest-app .game-card:has(.dino-maze) .quest-title-row h1{font-size:18px;line-height:1.05;margin:2px 0}.quest-app .game-card:has(.dino-maze)>.instruction{font-size:12px;line-height:1.2;margin:2px 0}.quest-app .game-card:has(.dino-maze)>.game-note{margin-top:3px}}
.quest-app .dino-maze{border:4px solid #557b42;background:linear-gradient(#ffffff16,#2e4f2344),url('assets/dino-party-atlas.jpg') 0 0/200% 200%;gap:2px!important;touch-action:none;overflow:hidden}
.quest-app .dino-maze .maze-cell{border:0;border-radius:36%;background:#deb881d6;box-shadow:inset 0 2px 4px #fff1bfaa,0 2px 3px #382a1688;touch-action:none}
.quest-app .dino-maze .maze-cell.wall{background:#32633399;box-shadow:none}
.quest-app .dino-maze .maze-cell.branch{background:#a56839d9;box-shadow:inset 0 2px 5px #513c2d}
.quest-app .dino-maze-fern,.quest-app .dino-maze-branch{width:95%;height:95%;object-fit:cover;border-radius:45%;pointer-events:none;filter:drop-shadow(1px 3px 2px #1c3d1a)}
.quest-app .dino-maze-branch{filter:sepia(.9) saturate(1.5) drop-shadow(1px 2px 2px #3b2414);transform:rotate(-35deg) scale(.82)}
.quest-app .dino-maze-baby{width:115%;height:115%;object-fit:contain;filter:drop-shadow(0 4px 3px #263921);pointer-events:none}
.quest-app .dino-maze .maze-star{font-size:clamp(25px,9vw,43px);filter:drop-shadow(0 0 7px #fff2a9);animation:dino-glitter 1.2s infinite}
.det-fixed-board .det-fixed-scene:has(.det-cipher){align-items:stretch;overflow:auto}
.det-fixed-board .det-cipher{height:auto;max-height:none;min-height:0;align-content:center;grid-template-columns: minmax(76px,28%) minmax(0,1fr);grid-template-rows:auto auto auto auto auto;gap:5px 10px;padding:8px;background:linear-gradient(145deg,#f9f0d9,#e2d1a6);border:2px solid #b68d51;border-radius:18px;color:#244347}
.det-fixed-board .det-cipher-head{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;font-size:12px;gap:8px}
.det-fixed-board .det-cipher-head span{font-size:10px;color:#706146}
.det-fixed-board .det-cipher .det-disk{grid-column:1;grid-row:2/4;width:min(100%,105px);height:auto;aspect-ratio:1;margin:auto;gap:10px}
.det-fixed-board .det-cipher .det-disk:before{inset:14%;box-shadow:inset 0 0 0 5px #ddc998}
.det-fixed-board .det-cipher .det-disk span,.det-fixed-board .det-cipher .det-disk b{font-size:clamp(17px,5vw,25px)}
.det-fixed-board .det-cipher .det-key{grid-column:2;font-size:13px;font-weight:900;line-height:1.25;margin:0;text-align:center}
.det-fixed-board .det-cipher .det-toolbar{grid-column:2;margin:0;gap:4px}
.det-fixed-board .det-cipher .det-toolbar strong{min-width:0;flex:1;font-size:12px}
.det-fixed-board .det-cipher .det-cipher-word{grid-column:1/-1;text-align:center;background:#fff9e8;border-radius:12px;padding:4px}
.det-fixed-board .det-cipher-word>span{font-size:10px;font-weight:800;color:#706146}
.det-fixed-board .det-cipher .det-code{font-size:20px;line-height:1.1;margin:1px}
.det-fixed-board .det-cipher-pairs{gap:4px;flex-wrap:wrap}
.det-fixed-board .det-cipher-pairs span{min-width:32px;padding:2px 5px;font-size:15px;line-height:1.1}
.det-fixed-board .det-cipher-pairs i{font-size:11px;line-height:1}
.det-fixed-board .det-cipher .det-answer-form{grid-column:1/-1;display:flex;align-items:end;gap:6px;margin:0}
.det-fixed-board .det-cipher .det-answer-form label{min-width:0;font-size:11px;line-height:1.2}
.det-fixed-board .det-cipher .det-answer-form input{min-height:44px;margin-top:3px;font-size:16px;padding:6px}
.det-fixed-board .det-cipher .det-answer-form>.det-btn{min-width:90px;flex:0 0 auto;padding:8px}
.det-fixed-board .det-fixed-scene:has(.det-cipher){align-items:flex-start}
.quest-app .det-fixed-board .det-cipher{height:auto;max-height:none}
.quest-app .det-fixed-board .det-cipher .det-toolbar{display:grid;grid-template-columns:44px minmax(70px,1fr) 44px;align-items:center}
.quest-app .det-fixed-board .det-cipher .det-toolbar .det-btn{width:44px;min-width:44px;max-width:44px;padding:4px}
.quest-app .det-fixed-board .det-cipher .det-toolbar strong{white-space:nowrap;text-align:center}
.quest-app .det-fixed-board .det-cipher{grid-template-columns:minmax(100px,38%) minmax(0,1fr);gap:10px;padding:14px}
.quest-app .det-fixed-board .det-cipher-head{font-size:15px}
.quest-app .det-fixed-board .det-cipher-head span{font-size:12px}
.quest-app .det-fixed-board .det-cipher .det-disk{width:min(100%,145px)}
.quest-app .det-fixed-board .det-cipher .det-disk span,.quest-app .det-fixed-board .det-cipher .det-disk b{font-size:clamp(24px,8vw,36px)}
.quest-app .det-fixed-board .det-cipher .det-key{font-size:16px}
.quest-app .det-fixed-board .det-cipher .det-toolbar{grid-template-columns:48px minmax(70px,1fr) 48px}
.quest-app .det-fixed-board .det-cipher .det-toolbar .det-btn{width:48px;min-width:48px;max-width:48px;min-height:48px;font-size:19px}
.quest-app .det-fixed-board .det-cipher .det-toolbar strong{font-size:14px}
.quest-app .det-fixed-board .det-cipher-word{padding:8px}
.quest-app .det-fixed-board .det-cipher-word>span{font-size:12px}
.quest-app .det-fixed-board .det-cipher .det-code{font-size:27px}
.quest-app .det-fixed-board .det-cipher-pairs span{min-width:40px;padding:4px 7px;font-size:19px}
.quest-app .det-fixed-board .det-cipher .det-answer-form label{font-size:13px}
.quest-app .det-fixed-board .det-cipher .det-answer-form input,.quest-app .det-fixed-board .det-cipher .det-answer-form>.det-btn{min-height:50px}
.detective .map-node.label-left p,.detective .map-node.label-right p{position:absolute;top:50%;width:min(120px,32vw);margin:0;padding:5px 6px;font-size:10px;line-height:1.2;transform:translateY(-50%);z-index:3}
.detective .map-node.label-left p{right:calc(50% + 35px)}
.detective .map-node.label-right p{left:calc(50% + 35px)}
.det-fixed-scene:has(.det-deduction){align-items:flex-start;overflow:auto}
.det-deduction{width:100%;padding:10px;border:2px solid #9a7b4c;border-radius:17px;background:linear-gradient(145deg,#f8eed7,#dbc99f);color:#203e43}
.det-deduction-header{display:flex;justify-content:space-between;gap:6px;align-items:center;font-size:12px;color:#6a4c28}
.det-deduction-header span{font-size:11px}
.det-deduction-facts{margin-top:7px;padding:8px;border-radius:12px;background:#fff9e9;box-shadow:inset 0 0 0 1px #d8c69c}
.det-deduction h3{font-size:13px;line-height:1.2;margin:0 0 4px}
.det-deduction-fact{display:flex;align-items:center;gap:6px;min-height:36px;font-size:12px;line-height:1.25}
.det-deduction-fact input{width:21px;height:21px;flex:none;accent-color:#1b766a}
.det-deduction-fact b{color:#aa7235}
.det-deduction-title{margin:9px 0 5px!important}
.det-deduction-people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.det-deduction-people .det-btn{min-width:0;min-height:75px;padding:7px;text-align:left;background:#fff9ed;border:1px solid #bea97b;line-height:1.2}
.det-deduction-people .det-btn strong{display:block;font-size:12px;margin-bottom:4px}
.det-deduction-people .det-btn>span{display:block;font-size:11px;font-weight:600;line-height:1.25}
.det-deduction-avatar{display:inline-grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#dce9db}
.det-fixed-board[data-detective-stage="timeline"] .det-fixed-scene{padding:9px;border:2px solid #a68859;border-radius:18px;background:linear-gradient(150deg,#f7edd5,#dbc89f)}
.det-fixed-board[data-detective-stage="timeline"] .det-timeline{gap:8px;touch-action:none;list-style:none}
.det-fixed-board[data-detective-stage="timeline"] .det-timeline li{touch-action:none;transition:opacity .15s,transform .15s}
.det-fixed-board[data-detective-stage="timeline"] .det-timeline .det-btn{touch-action:none;border:1px solid #c5ad7d;background:#fff9eb;box-shadow:0 3px 0 #ad9364;font-size:clamp(12px,3.5vw,15px);line-height:1.25;padding:7px 10px}
.det-fixed-board[data-detective-stage="timeline"] .det-timeline .det-btn b{display:grid;place-items:center;flex:none;width:31px;height:31px;border-radius:50%;background:#e7d2a2;color:#71502b;font-size:17px}
.det-fixed-board[data-detective-stage="timeline"] .det-timeline .det-btn i{color:#9c7b49;font-size:23px}
.det-fixed-board[data-detective-stage="timeline"] .det-timeline li.drag-source{opacity:.5;transform:scale(.97)}
.det-fixed-board[data-detective-stage="timeline"] .det-timeline li.drag-target .det-btn{outline:3px solid #298675;background:#e2f1df}
.det-fixed-board[data-detective-stage="wave"] .det-fixed-scene{align-items:center;padding:8px}
.quest-app .det-fixed-board[data-detective-stage="wave"] .det-wave{width:100%;padding:14px;border:3px solid #b38a53;border-radius:20px;background:linear-gradient(145deg,#2a4851,#10242f);box-shadow:0 7px 0 #745b3d,0 13px 24px #122e3855,inset 0 1px 0 #f5db9b77}
.det-wave-heading{display:flex;align-items:center;gap:8px;margin-bottom:9px;color:#f4d79a;font-size:11px;letter-spacing:.08em}
.det-wave-heading>span:last-child{margin-left:auto;color:#ffe18d;font-size:19px}
.det-wave-light{width:10px;height:10px;border-radius:50%;background:#76edca;box-shadow:0 0 9px #80ffda}
.quest-app .det-fixed-board[data-detective-stage="wave"] .det-wave svg{max-height:none;aspect-ratio:400/170;border:2px solid #638c88;border-radius:11px;background:radial-gradient(ellipse at center,#214c55,#091f2b);box-shadow:inset 0 0 20px #030c13}
.det-fixed-board[data-detective-stage="wave"] .det-wave path{filter:drop-shadow(0 0 4px currentColor)}
.det-fixed-board[data-detective-stage="wave"] .det-wave p{margin:8px 2px 0;font-size:12px}
.det-fixed-board[data-detective-stage="wave"] .det-fixed-controls>.det-range{margin:0;padding:8px 12px;border:1px solid #d6c79e;border-radius:12px;background:#f8efd9;color:#294b4b;font-size:14px}
.det-fixed-board[data-detective-stage="wave"] .det-range output{color:#996329;background:#fffcf0;border-radius:8px;padding:1px 8px}
.det-fixed-board[data-detective-stage="wave"] .det-range input{accent-color:#218a7a;min-height:38px;width:100%}
.det-fixed-board[data-detective-stage="wave"] .det-toolbar [data-det="check"]{background:#14796e;color:white;border-color:#0e665c}
@media(max-height:650px){.quest-app .det-fixed-board[data-detective-stage="wave"] .det-wave{padding:8px}.det-wave-heading{margin-bottom:3px}.det-fixed-board[data-detective-stage="wave"] .det-fixed-controls>.det-range{padding:4px 9px}}
.det-fixed-scene:has(.det-constellation){align-items:center;overflow:auto}
.det-constellation{width:100%;max-width:390px;padding:10px;border:2px solid #b7975d;border-radius:18px;background:linear-gradient(150deg,#2e4560,#101e39);box-shadow:0 6px 0 #8a6c45;color:#ffe5aa}
.det-constellation-head{display:flex;justify-content:space-between;align-items:center;font-size:12px;letter-spacing:.03em}
.det-constellation-head span{font-size:20px;color:#ffdf7c}
.det-constellation-reference{display:flex;align-items:center;gap:10px;padding:5px 10px;margin:4px 0 8px;border-radius:11px;background:#ffffff18;font-size:12px;font-weight:800}
.det-constellation-reference svg{width:70px;height:70px;flex:none;border-radius:8px;background:#152f48}
.det-constellation-reference line{stroke:#f6d27b;stroke-width:2}.det-constellation-reference circle{fill:#fff2bd}
.det-constellation-reference small{font-size:11px;line-height:1.2;color:#dbe6e0}
.det-constellation .det-stars{width:min(100%,260px);height:auto;aspect-ratio:1;margin:auto;border:1px solid #7997a0;background:radial-gradient(circle at 22% 30%,#fce3a780 0 1px,transparent 2px),radial-gradient(circle at 75% 70%,#a5dbef99 0 1px,transparent 2px),radial-gradient(ellipse at 60% 20%,#455d88,#101b35 75%);background-size:47px 53px,61px 57px,100% 100%}
.det-constellation .det-stars button{color:#ffe69a;text-shadow:0 0 9px #ffda7c,0 0 20px #fff0a5}
.det-fixed-board[data-detective-stage="constellation"] .det-toolbar [data-det="check"]{background:#14796e;border-color:#0b625b;color:#fff}
@media(max-height:650px){.det-constellation .det-stars{width:min(100%,190px)}.det-constellation-reference svg{width:50px;height:50px}}
.pirate-round{width:100%;max-width:420px;margin:auto;text-align:center;background:#e3f6ef;border:2px solid #59a9a6;border-radius:20px;padding:10px;color:#194a51}
.pirate-level{font-weight:900;font-size:14px;color:#175e66}.pirate-prompt{font-weight:850;font-size:15px;line-height:1.3;margin:5px 0 8px}
.pirate-options,.pirate-memory,.pirate-sparks{display:grid;grid-template-columns:repeat(auto-fit,minmax(62px,1fr));gap:8px;justify-content:center}
.pirate-choice{min-height:58px;min-width:0;border:2px solid #c8aa70;border-radius:15px;background:#fff8e1;font-size:26px;font-weight:900;color:#194a51}
.pirate-shells,.pirate-pattern{padding:16px 5px;background:#fbe8b7;border-radius:15px;font-size:34px;line-height:1.5;margin-bottom:9px}
.pirate-maze{display:grid;grid-template-columns:repeat(5,1fr);gap:3px;max-width:300px;margin:auto}.pirate-maze .pirate-choice{min-height:0;aspect-ratio:1;padding:0;background:#b9e3d4;font-size:22px}.pirate-maze .rock{background:#719c8e}
.pirate-harbor{position:relative;min-height:240px;height:min(42vh,330px);border:3px solid #d6b873;border-radius:16px;overflow:hidden;background:url('assets/pirate-harbor.png') center 55%/cover}
.pirate-boats{position:absolute;inset:22% 4% 15%;display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap}
.pirate-boat{position:relative;width:78px;height:94px;border:0;padding:0;background:transparent;filter:drop-shadow(0 4px 3px #164a6280)}
.pirate-sail{position:absolute;left:28px;top:5px;width:39px;height:51px;background:linear-gradient(120deg,#fffdf0,#f1dca3);clip-path:polygon(5% 0,100% 85%,5% 100%);border-radius:4px}
.pirate-sail:before{content:'';position:absolute;left:0;top:0;width:4px;height:100%;background:#7f5435}
.pirate-hull{position:absolute;left:4px;right:4px;bottom:5px;height:31px;background:linear-gradient(#bd793f,#704024);border:3px solid #704024;border-radius:4px 4px 35px 35px;display:grid;place-items:center;color:#fff8dc;font-size:19px}
.pirate-boat.chosen{opacity:.35;filter:grayscale(.6)}
.pirate-memory{grid-template-columns:repeat(4,1fr)}.pirate-sparks{min-height:180px;align-items:center}.pirate-sparks .pirate-choice{background:#6eb5c8}
.pirate-boat{width:92px;height:100px;background:url('assets/pirate-sailing-ship.png') center/contain no-repeat}
.pirate-boat .pirate-sail{display:none}
.pirate-boat .pirate-hull{left:50%;right:auto;bottom:10%;transform:translateX(-50%);width:26px;height:26px;border:2px solid #fff1c7;border-radius:50%;background:#704024ee;color:white;font-size:17px;box-shadow:0 2px 4px #1b2f3b88}
.quest-app .game-board:has(.pirate-maze-round){gap:3px;padding:2px 0}
.quest-app .pirate-maze-round{padding:6px;max-width:380px}
.quest-app .pirate-maze-round .pirate-prompt{margin:2px 0 5px;font-size:13px}
.pirate-maze-scene{padding:5px;border:3px solid #c6a96d;border-radius:18px;background:linear-gradient(#0f94b999,#086e9ba8),url('assets/pirate-harbor.png') center 53%/cover}
.pirate-sea-maze{width:min(100%,350px,max(220px,calc(100dvh - 300px)));max-width:none;aspect-ratio:1;gap:3px;touch-action:none}
.pirate-sea-cell{min-width:0;min-height:0;padding:0;border:1px solid #b8f4e1;border-radius:38%;background:#b6e9d1d9;box-shadow:inset 0 2px 4px #fff9,0 2px 3px #104c6966;font-size:clamp(20px,7vw,32px);touch-action:none}
.pirate-sea-cell.rock{background:#37758baa;border-color:#5c959c}.pirate-sea-cell.debris{background:#dbba79e8}
.pirate-sea-cell img{width:110%;height:110%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 2px #143d4e88)}
.pirate-dpad{display:flex;justify-content:center;gap:5px;margin-top:5px}.pirate-dpad button{min-width:48px;min-height:44px;border:1px solid #75a7a0;border-radius:10px;background:#fff8e6;color:#155e68;font-size:22px;font-weight:900}
.pirate-rock-art{display:inline-block;width:70%;height:55%;border-radius:45% 50% 32% 35%;background:linear-gradient(145deg,#ccd4c9 4%,#778b86 45%,#425c5b);border:2px solid #506a68;box-shadow:inset 5px 4px 0 #e5ece666,0 3px 2px #16495a66;transform:rotate(-8deg)}
.pirate-log-art{display:inline-block;width:75%;height:30%;border-radius:9px;background:repeating-linear-gradient(0deg,#79502c 0 3px,#b37d43 3px 7px);border:2px solid #704829;box-shadow:0 3px 2px #184c5b77;transform:rotate(-25deg)}
.pirate-sea-maze{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr))}
.quest-app .game-board:has(.pirate-color){padding:2px 0}
.pirate-color{width:100%;max-width:390px;margin:auto;padding:10px;border:2px solid #bd985b;border-radius:20px;background:linear-gradient(145deg,#f7e6b9,#d4bd85);color:#1f5254;text-align:center}
.pirate-color-head{display:flex;justify-content:space-between;font-size:13px;color:#694b29}.pirate-color>p{font-size:15px;font-weight:850;line-height:1.25;margin:5px 0 8px}
.pirate-camera{position:relative;height:min(35dvh,270px);min-height:150px;overflow:hidden;border:3px solid #967348;border-radius:16px;background:#173b49}
.pirate-camera video{width:100%;height:100%;object-fit:cover}.pirate-camera-frame{position:absolute;width:30%;height:30%;left:35%;top:35%;border:3px solid #fff3b5;border-radius:12px;box-shadow:0 0 0 999px #132d3738;pointer-events:none}
.pirate-camera-message{position:absolute;inset:0;display:grid;place-items:center;padding:20px;color:white;background:#14303dcc;font-weight:800}.pirate-camera-message[hidden]{display:none}
.pirate-color-progress{display:flex;justify-content:center;gap:10px;margin:9px 0}.pirate-color-progress span{width:30px;height:30px;border-radius:50%;background:var(--color);border:3px solid #fff8dc;opacity:.4;box-shadow:0 2px 3px #735d3866}.pirate-color-progress span.found{opacity:1;box-shadow:0 0 0 2px #2d8f6b,0 0 10px var(--color)}
.pirate-color-meter{height:10px;border-radius:10px;background:#b9a47c;overflow:hidden}.pirate-color-meter i{display:block;height:100%;width:0;background:linear-gradient(90deg,#4da889,#d7ea85);transition:width .1s}
.pirate-color-start{min-height:44px;margin-top:8px;padding:8px 18px;border-radius:12px;background:#14796e;color:white;font-weight:850}.pirate-color-start[hidden]{display:none}
.quest-app .game-board:has(.pirate-treasure){padding:2px 0;gap:3px}
.pirate-treasure{width:100%;max-width:390px;margin:auto;padding:8px;border:2px solid #b68b4a;border-radius:18px;background:linear-gradient(145deg,#f5e6bc,#d6b87c);color:#224b4a;text-align:center}
.pirate-treasure-head{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#735022}.pirate-treasure>p{margin:3px 0 5px;font-size:13px;line-height:1.2;font-weight:850}
.pirate-treasure-field{width:min(100%,350px,max(220px,calc(100dvh - 280px)));margin:auto;position:relative;border:3px solid #997140;border-radius:14px;overflow:hidden;background:#608f83}
.pirate-treasure-field canvas{width:100%;display:block;aspect-ratio:1;touch-action:none;cursor:crosshair}.pirate-treasure-loading{position:absolute;inset:40% 0;color:white;font-weight:800;pointer-events:none}
.pirate-treasure-bar{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-top:6px;font-size:13px}.pirate-treasure-bar button{min-height:44px;padding:7px 13px;border-radius:11px;background:#14796e;color:white;font-weight:850}
.quest-app .game-board:has(.pirate-diff){padding:2px 0;gap:2px}
.pirate-diff{width:100%;max-width:390px;margin:auto;padding:6px;border:2px solid #b9965b;border-radius:16px;background:linear-gradient(145deg,#f9edca,#dec58a);color:#28504c;text-align:center}
.pirate-diff-head{display:flex;justify-content:space-between;gap:6px;align-items:center;color:#6f4b27;font-size:12px}.pirate-diff-head span{font-size:11px}
.pirate-diff>p{font-size:13px;line-height:1.2;font-weight:850;margin:3px 0}
.pirate-diff-pictures{display:grid;justify-items:center;gap:5px}
.pirate-diff-picture{position:relative;width:min(100%,240px,max(130px,calc((100dvh - 285px)/2)));aspect-ratio:1;overflow:hidden;border:3px solid #9e7846;border-radius:12px;background:#8cc2a7}
.pirate-diff-scene{display:block;width:100%;height:100%;object-fit:cover}
.pirate-diff-target{position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;border:0;border-radius:50%;padding:4px;background:transparent;display:grid;place-items:center;touch-action:manipulation}
.pirate-diff-target img{width:70%;height:70%;object-fit:contain;filter:drop-shadow(0 2px 2px #203b36a8);pointer-events:none}.pirate-diff-target.found{opacity:1;outline:3px solid #5eefb3;background:#1ca97d44}
.pirate-diff-count{font-size:13px;font-weight:800;margin-top:4px}.pirate-diff-count strong{color:#14796e}
.quest-app .game-board:has(.pirate-chest-game){padding:2px 0;gap:3px}
.pirate-chest-game{width:100%;max-width:410px;margin:auto;padding:8px;border:2px solid #c69d57;border-radius:18px;background:linear-gradient(150deg,#fbefd0,#dfc18a);color:#244c4d;text-align:center}
.pirate-chest-head{display:flex;justify-content:space-between;gap:5px;color:#70491f;font-size:12px}.pirate-chest-game>p:first-of-type{margin:3px 0 6px;font-size:14px;line-height:1.2;font-weight:850}
.pirate-chest-scene{position:relative;height:clamp(120px,25dvh,190px);overflow:hidden;border:2px solid #bd9359;border-radius:14px;background:linear-gradient(#ffffff05,#2d6d7030),url('assets/pirate-diff-beach.jpg') center 60%/cover;display:flex;justify-content:center;align-items:center}
.pirate-chest-drop{position:relative;width:clamp(125px,42vw,190px);height:100%;border:0;background:transparent;touch-action:manipulation;filter:drop-shadow(0 5px 4px #28444180)}
.pirate-chest-drop>img{width:100%;height:100%;object-fit:contain;pointer-events:none}.pirate-chest-drop [data-chest-count]{position:absolute;right:7%;bottom:10%;padding:3px 7px;border-radius:12px;background:#fff6d9;color:#70411e;font-weight:900;font-size:12px}
.pirate-chest-loot{position:absolute;left:20%;right:20%;top:42%;height:28%;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;pointer-events:none}.pirate-chest-loot img{width:27%;height:75%;object-fit:contain;filter:drop-shadow(0 2px 2px #5d300b88)}
.pirate-chest-drop.drop-ready{filter:drop-shadow(0 0 10px #fff69b) drop-shadow(0 0 5px #fff18c)}
.pirate-chest-items{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:7px}
.pirate-chest-item{min-width:0;min-height:68px;height:clamp(68px,11dvh,86px);padding:3px 2px;border:2px solid #c7ae7e;border-radius:12px;background:#fff9eb;display:flex;flex-direction:column;align-items:center;justify-content:center;touch-action:none;user-select:none}
.pirate-chest-item img{width:100%;height:calc(100% - 16px);object-fit:contain;pointer-events:none}.pirate-chest-item span{font-size:clamp(9px,2.6vw,11px);line-height:1.05;font-weight:800;white-space:normal}.pirate-chest-item.selected{border-color:#188f77;box-shadow:0 0 0 2px #6fdbc0}.pirate-chest-item.collected{opacity:.35}
.pirate-chest-help{font-size:10px;line-height:1.2;margin:5px 0 0;color:#596c5c}.pirate-chest-ghost{position:fixed;z-index:9999;width:64px;height:64px;object-fit:contain;pointer-events:none;transform:translate(-50%,-50%);filter:drop-shadow(0 5px 5px #183b4580)}
.pirate-chest-hint{animation:pirate-chest-hint 1s ease-in-out infinite}@keyframes pirate-chest-hint{50%{box-shadow:0 0 0 4px #ffdc64;filter:brightness(1.15)}}
@media(max-height:650px){.pirate-chest-scene{height:120px}.pirate-chest-item{height:64px;min-height:64px}.pirate-chest-help{font-size:9px}}
.quest-app .game-board:has(.prepare-ship-game){padding:2px 0;gap:3px}
.prepare-ship-game{width:100%;max-width:410px;margin:auto;padding:8px;border:2px solid #c49a57;border-radius:18px;background:linear-gradient(145deg,#fff0cd,#dfc08a);color:#204b50;text-align:center}
.prepare-head{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:12px;color:#704a23}.prepare-ship-game>p:first-of-type{font-size:15px;line-height:1.2;font-weight:900;margin:4px 0 7px}
.prepare-scene{position:relative;height:clamp(180px,34dvh,270px);border:3px solid #b9935d;border-radius:15px;overflow:hidden;background:url('assets/pirate-harbor.png') center 54%/cover;display:flex;justify-content:center;align-items:center}
.prepare-ship{position:relative;width:96%;height:100%;padding:0;border:0;background:transparent;touch-action:manipulation}
.prepare-vessel{position:absolute;inset:0;display:block;pointer-events:none;filter:drop-shadow(0 5px 3px #17495a77)}.prepare-hull{position:absolute;width:100%;height:100%;inset:0;object-fit:contain}
.prepare-installed{position:absolute;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 2px #1e353c88)}
.prepare-installed-sail{left:31%;top:19%;width:38%;height:44%}.prepare-installed-wheel{left:18%;top:46%;width:14%;height:17%}.prepare-installed-anchor{left:20%;top:68%;width:15%;height:19%}.prepare-installed-flag{left:43.5%;top:5%;width:14%;height:17%}.prepare-installed-buoy{left:71%;top:69%;width:14%;height:17%}
.prepare-ship.drop-ready{filter:drop-shadow(0 0 8px #fff697)}.prepare-count{position:absolute;right:8px;bottom:8px;padding:3px 8px;border-radius:12px;background:#fff7dc;color:#704b25;font-size:12px;font-weight:900;pointer-events:none}
.prepare-items{display:flex;justify-content:center;gap:10px;margin-top:7px}.prepare-item{width:min(39%,135px);height:clamp(80px,15dvh,110px);padding:4px;border:2px solid #c7ac76;border-radius:13px;background:#fff9eb;display:flex;flex-direction:column;align-items:center;justify-content:center;touch-action:none;user-select:none}
.prepare-item img{width:100%;height:calc(100% - 19px);object-fit:contain;pointer-events:none}.prepare-item span{font-size:12px;line-height:1.1;font-weight:850}.prepare-item.selected{border-color:#188f77;box-shadow:0 0 0 2px #76ddc3}.prepare-item.placed{opacity:.38}
.prepare-help{margin:5px 0 0;font-size:10px;line-height:1.2;color:#5e6c5d}.prepare-ghost{position:fixed;z-index:9999;width:75px;height:75px;object-fit:contain;pointer-events:none;transform:translate(-50%,-50%);filter:drop-shadow(0 5px 5px #183b4580)}
.prepare-hint{animation:prepare-hint 1s ease-in-out infinite}@keyframes prepare-hint{50%{box-shadow:0 0 0 4px #ffdc64;filter:brightness(1.15)}}
.prepare-vessel.ship-departing{animation:prepare-depart 2.1s ease-in forwards}@keyframes prepare-depart{to{transform:translateX(110%) scale(.65);opacity:.8}}
@media(max-height:650px){.prepare-scene{height:clamp(160px,30dvh,190px)}.prepare-item{height:72px;min-height:72px}.prepare-help{font-size:9px}}
@media(prefers-reduced-motion:reduce){.prepare-vessel.ship-departing{animation-duration:.1s}.prepare-hint{animation:none;outline:3px solid #ffdc64}}
.quest-app .game-board:has(.pirate8-game){padding:2px 0;gap:3px}
.pirate8-game{width:100%;max-width:400px;margin:auto;padding:8px;border:2px solid #be9657;border-radius:18px;background:linear-gradient(145deg,#fff0cb,#dfc28d);color:#214d50;text-align:center}
.pirate8-head{display:flex;justify-content:space-between;gap:6px;color:#6f4c28;font-size:12px}.pirate8-instruction{min-height:34px;margin:4px 0 6px;font-size:14px;line-height:1.2;font-weight:900}
.p8-route{width:min(100%,290px,max(190px,calc(100dvh - 360px)));aspect-ratio:1;margin:auto;display:grid;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(5,1fr);gap:3px;padding:5px;border:3px solid #b99b62;border-radius:16px;background:linear-gradient(#198ebbb3,#0c7399a8),url('assets/pirate-harbor.png') center 55%/cover}
.p8-route-cell{min-width:0;min-height:0;border-radius:35%;background:#a4ddcbbb;border:1px solid #d3fff2}.p8-route-cell.visited{background:#f5e2a7c9}.p8-route-cell img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 2px #1c596099)}
.p8-small{margin:4px 0;font-size:12px;font-weight:850}.p8-chest{height:clamp(110px,22dvh,165px);position:relative;border:2px solid #bb975c;border-radius:14px;background:url('assets/pirate-diff-beach.jpg') center 57%/cover;display:flex;justify-content:center}
.p8-chest img{height:100%;width:auto;max-width:65%;object-fit:contain;filter:drop-shadow(0 3px 3px #183a3877)}.p8-chest b{position:absolute;bottom:4px;left:50%;transform:translateX(-50%);white-space:nowrap;border-radius:10px;background:#fff9e8ed;padding:3px 8px;font-size:12px}
.p8-coins{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;margin:8px 0}.p8-coins button{width:52px;height:52px;border:0;border-radius:50%;background:url('assets/pirate-item-coin.png') center/contain no-repeat;display:grid;place-items:center;font-size:19px;font-weight:900;color:white;text-shadow:0 1px 3px #000,0 0 4px #000}.p8-coins button:disabled{opacity:.3}
.p8-actions{display:flex;gap:6px;justify-content:center}.p8-actions button{min-width:110px;min-height:44px;padding:6px 12px;border:1px solid #9c855c;border-radius:10px;background:#fff8e6;color:#25504c;font-weight:850}.p8-actions button:last-child{background:#14796e;color:white}
.p8-harbor{height:min(36dvh,265px);min-height:180px}.p8-maze{max-width:330px}.p8-key{position:relative;display:inline-block;width:60%;height:20%;border-radius:9px;background:#e7b63b;transform:rotate(-35deg);box-shadow:0 2px 3px #5d472b88}.p8-key:before{content:'';position:absolute;left:-5%;top:-80%;width:40%;height:180%;border:4px solid #e7b63b;border-radius:50%;background:transparent}.p8-key:after{content:'';position:absolute;right:10%;top:50%;width:18%;height:100%;background:#d69d21}
@media(max-height:650px){.pirate8-instruction{min-height:0;font-size:12px}.p8-harbor{height:160px;min-height:160px}.p8-chest{height:105px}.p8-coins button{width:44px;height:44px}}
.p8-pairs{width:min(100%,350px);margin:0 auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.p8-pairs button{min-width:0;aspect-ratio:1;min-height:48px;padding:5px;border:2px solid #b79458;border-radius:12px;background:linear-gradient(145deg,#286e72,#153f4b);color:#f6d581;font-size:27px;box-shadow:0 3px 0 #967446}
.p8-pairs button:has(img){background:#fff8e8}.p8-pairs button.matched{opacity:.55}.p8-pairs img{width:100%;height:100%;object-fit:contain;pointer-events:none}
.space-game{padding:12px;border-radius:22px;background:radial-gradient(circle at 50% 15%,#364c89,#111a42 80%);color:white;text-align:center;min-height:300px;box-shadow:inset 0 0 0 2px #99b8f766}.space-head{display:inline-block;padding:6px 16px;border-radius:20px;background:#fff;color:#24396a;font-weight:800}.space-task{font-weight:700;line-height:1.3}.space-choices,.space-stars{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:16px auto}.space-button,.space-launch{min-width:58px;min-height:58px;border:2px solid #b2d4ff;border-radius:16px;background:linear-gradient(#465d98,#263b77);color:#fff;font-size:28px;box-shadow:0 4px 0 #101d49;touch-action:manipulation}.space-button.done{opacity:.35;pointer-events:none}.space-launch{font-size:18px;padding:10px 20px;background:#8a4322}.space-sequence{padding:15px;background:#121d4a;border-radius:16px;font-size:clamp(19px,6vw,30px);line-height:1.6}.space-sequence .done{opacity:.35}.space-memory,.space-maze{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;max-width:340px;margin:auto}.space-maze{grid-template-columns:repeat(5,1fr);gap:4px}.space-maze .space-button{min-width:0;min-height:0;aspect-ratio:1;font-size:clamp(18px,6vw,28px)}.space-maze .wall{background:#1b2446}.space-arrows{margin:8px auto}.space-arrows .space-button{min-height:44px;min-width:50px}.space-stars{min-height:150px;align-items:center}.space-stars .space-button{background:#604b94}@media(max-height:650px){.space-game{padding:7px;min-height:0}.space-task{margin:6px}.space-choices,.space-stars{margin:8px auto}.space-button{min-height:48px}.space-sequence{padding:7px}}
.captain-console{position:relative;overflow:hidden;border-radius:22px;padding:14px 12px 18px;text-align:center;color:#fff;background:linear-gradient(#08133470,#081334cc),url('assets/space-cockpit-9.jpg') center/cover;box-shadow:inset 0 0 0 2px #63d4ed,0 10px 24px #09153066;min-height:330px}.captain-badge{display:inline-block;padding:6px 14px;border:1px solid #78ddec;border-radius:20px;background:#102d4eeb;font-weight:800;letter-spacing:.04em}.captain-rule{max-width:420px;margin:10px auto;padding:8px;border-radius:12px;background:#0b1c39ee;font-weight:700;line-height:1.35}.captain-instruments{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:12px auto;max-width:450px}.captain-instrument{padding:7px 3px;border-radius:15px;background:linear-gradient(#2b617beF,#112f4deF);border:1px solid #70d9ed;font-weight:700;font-size:clamp(12px,3.5vw,16px)}.captain-dial{display:flex;flex-direction:column;justify-content:center;align-items:center;width:64px;height:64px;max-width:100%;margin:6px auto;border-radius:50%;border:3px solid #f1ad3c;background:radial-gradient(circle,#193e5a,#071627);box-shadow:0 0 10px #f4b23d88}.captain-dial.ready{border-color:#62efbf;box-shadow:0 0 14px #62efbfa0}.captain-dial b{font-size:26px}.captain-dial small{font-size:10px}.captain-adjust{display:flex;gap:4px;justify-content:center}.captain-adjust button,.captain-launch{border:1px solid #86e5f4;border-radius:12px;background:linear-gradient(#317c9b,#174361);color:white;font-weight:800;min-width:44px;min-height:44px;font-size:24px;touch-action:manipulation}.captain-launch{padding:8px 18px;background:linear-gradient(#fbbb4f,#b45b22);font-size:17px;box-shadow:0 4px 0 #68391d}.captain-tip{font-size:12px;background:#0b1c39dd;display:table;margin:10px auto 0;padding:4px 10px;border-radius:10px}.captain-console.launching{animation:captain-glow .7s ease-in-out infinite alternate}@keyframes captain-glow{to{box-shadow:inset 0 0 35px #ffd166,0 0 22px #87e7ff}}@media(max-width:350px){.captain-console{padding:9px 5px}.captain-adjust button{min-width:44px}.captain-instruments{gap:3px}}@media(prefers-reduced-motion:reduce){.captain-console.launching{animation:none}}
.space-course{padding:12px;border:2px solid #61c7df;border-radius:22px;text-align:center;color:white;background:linear-gradient(#06122966,#061229bb),url('assets/space-station-9.jpg') center/cover}.course-grid{max-width:330px;margin:auto;display:grid;grid-template-columns:repeat(5,1fr);gap:4px;padding:5px;border:1px solid #9ddcfa;border-radius:12px;background:#061b33bd}.course-cell{min-width:0;aspect-ratio:1;border:1px solid #9ad8e777;border-radius:10px;background:#256b8d8c;color:#fff;font-size:clamp(20px,6vw,30px);touch-action:manipulation}.course-cell.obstacle{background:#293047a8}.course-status{display:table;margin:10px auto 0;padding:6px 12px;border-radius:14px;background:#061b33ed;font-weight:700}
.shield-game{padding:12px;border-radius:22px;text-align:center;color:white;background:linear-gradient(#06122955,#061229cc),url('assets/space-station-9.jpg') center/cover;box-shadow:inset 0 0 0 2px #62d5ee}.shield-arena{position:relative;margin:10px auto;width:min(100%,260px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,#134265b0,#06142bcc 75%);box-shadow:inset 0 0 35px #54cbe266}.shield-ship{position:absolute;left:33%;top:28%;width:34%;height:44%;object-fit:contain}.shield-side{position:absolute;width:26%;height:19%;border:2px solid #97f1ff;border-radius:28px;background:linear-gradient(#4adffbb0,#1296c15c);box-shadow:0 0 15px #4adffb;touch-action:manipulation}.shield-side.side-0{left:37%;top:3%}.shield-side.side-1{right:1%;top:40%}.shield-side.side-2{left:37%;bottom:3%}.shield-side.side-3{left:1%;top:40%}.shield-threat{position:absolute;font-size:29px;z-index:1;pointer-events:none;animation:threat-pulse 1.2s infinite alternate}.shield-threat.side-0{left:45%;top:0}.shield-threat.side-1{right:0;top:40%}.shield-threat.side-2{left:45%;bottom:0}.shield-threat.side-3{left:0;top:40%}@keyframes threat-pulse{to{transform:scale(1.22)}}.shield-flash{box-shadow:0 0 24px #64f7ff,inset 0 0 40px #62f0ff}@media(prefers-reduced-motion:reduce){.shield-threat{animation:none}}
.repair-game{padding:12px;border-radius:22px;text-align:center;color:white;background:linear-gradient(#06122988,#061229dd),url('assets/space-station-9.jpg') center/cover;box-shadow:inset 0 0 0 2px #62d5ee}.repair-parts,.repair-tools{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}.repair-part,.repair-tools button,.repair-safety{min-width:64px;min-height:55px;border:1px solid #83dff4;border-radius:12px;background:linear-gradient(#41849a,#17415e);color:white;font-weight:700;touch-action:manipulation}.repair-part span,.repair-tools span{display:block;font-size:24px}.repair-part small,.repair-tools small{display:block;font-size:11px}.repair-part.selected{box-shadow:0 0 12px #ffe28a;border-color:#ffe28a}.repair-part.done{opacity:.4}.repair-detail{margin:8px auto;padding:8px;border-radius:14px;background:#061b33e8}.repair-detail p{margin:4px}.repair-safety{padding:5px 10px;min-height:44px}.repair-safety.ready{background:#166752}
.cipher-game{padding:12px;border-radius:22px;text-align:center;color:white;background:linear-gradient(#06122999,#061229dd),url('assets/space-station-9.jpg') center/cover;box-shadow:inset 0 0 0 2px #62d5ee}.cipher-key,.cipher-message,.cipher-letters{display:flex;justify-content:center;gap:5px;flex-wrap:wrap;margin:10px auto}.cipher-key span,.cipher-message span{min-width:40px;padding:6px;border-radius:9px;background:#102b48e8;border:1px solid #5cbcd3;font-weight:800}.cipher-key b,.cipher-message b{color:#ffe391;font-size:22px}.cipher-message span{min-width:38px;display:flex;flex-direction:column}.cipher-message .current{border-color:#ffdf75;box-shadow:0 0 10px #ffe391}.cipher-message small{font-size:17px}.cipher-letters button{min-width:46px;min-height:46px;border-radius:12px;border:1px solid #8de9f4;color:white;font-size:22px;font-weight:800;background:linear-gradient(#3c879d,#16445c)}
.scan-game{padding:12px;border-radius:22px;text-align:center;color:white;background:#102b45;box-shadow:inset 0 0 0 2px #62d5ee}.scan-world{position:relative;max-width:370px;margin:auto;aspect-ratio:1.5;background:url('assets/space-planet-9.jpg') center/cover;border:2px solid #80ddec;border-radius:16px;touch-action:none}.scan-marker{position:absolute;transform:translate(-50%,-50%);width:48px;height:48px;border:2px solid #8afff1;border-radius:50%;background:#0a555fc9;color:#fff;font-size:27px;box-shadow:0 0 16px #80f7e9}.scan-marker.found{background:#208065}.scan-clues,.scan-answers{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin:8px auto}.scan-clues span,.scan-answers button{padding:7px;border:1px solid #7acfe2;border-radius:10px;background:#1b4e66;color:white;font-weight:700;font-size:13px}.scan-answers button{min-height:44px}
.dock-game{padding:12px;border-radius:22px;text-align:center;color:white;background:linear-gradient(#06122988,#061229dd),url('assets/space-station-9.jpg') center/cover;box-shadow:inset 0 0 0 2px #62d5ee}.dock-grid{max-width:300px;margin:auto;display:grid;grid-template-columns:repeat(5,1fr);gap:3px;padding:5px;background:#051c35b0;border-radius:12px}.dock-cell{display:grid;place-items:center;min-width:0;aspect-ratio:1;border:1px solid #7cd7eb77;border-radius:9px;background:#1d627080;color:#9ad9ee;font-size:28px}.dock-cell img{width:90%;height:90%;object-fit:contain}.dock-cell.wall{background:#526b7e;color:#c4d5e1}.dock-cell.goal{background:#d9a73b;color:#fff1a4;box-shadow:0 0 12px #ffdc82}.dock-controls{display:flex;justify-content:center;gap:8px;margin:10px}.dock-controls button{min-width:50px;min-height:46px;border:1px solid #83dff4;border-radius:12px;background:linear-gradient(#41849a,#17415e);color:white;font-weight:800;font-size:24px}
.beacon-game{padding:12px;border-radius:22px;text-align:center;color:white;background:linear-gradient(#06122988,#061229cc),url('assets/space-station-9.jpg') center/cover;box-shadow:inset 0 0 0 2px #62d5ee}.beacon-core{padding:8px;border-radius:30px 30px 14px 14px;background:linear-gradient(#325a70dd,#102739ed);border:2px solid #8cd4df}.beacon-core.lit{box-shadow:0 0 30px #ffd976,inset 0 0 25px #fff0ae}.beacon-light{font-size:32px;color:#ffdc76;text-shadow:0 0 20px #ffe58a}.beacon-slots,.beacon-items{display:flex;justify-content:center;gap:5px;flex-wrap:wrap}.beacon-items{margin-top:12px}.beacon-slot,.beacon-item{min-width:48px;min-height:68px;border:2px solid #80cfdf;border-radius:12px;background:#102b48df;color:white;font-weight:700;touch-action:none}.beacon-slot{border-color:var(--crystal);background:#071829de}.beacon-slot .crystal{opacity:.25}.beacon-slot.filled .crystal{opacity:1}.beacon-item.selected{outline:3px solid white}.beacon-item:disabled{opacity:.25}.beacon-slot small,.beacon-item small{display:block;font-size:10px}.crystal{display:block;width:25px;height:30px;margin:3px auto;background:radial-gradient(circle at 35% 25%,white,var(--crystal) 42%,#154259);box-shadow:0 0 9px var(--crystal)}.crystal.orb{border-radius:50%}.crystal.diamond{clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}.crystal.star{clip-path:polygon(50% 0,62% 35%,100% 35%,70% 57%,80% 95%,50% 72%,20% 95%,30% 57%,0 35%,38% 35%)}
.course-cell img{width:90%;height:90%;object-fit:contain;vertical-align:middle}
.shield-threat{width:42px;height:42px;object-fit:contain}.quest-app .game-board:has(.repair-game){justify-content:flex-start;align-items:stretch}.repair-game{flex:1}.game-card:has(.scan-game) .stage-top>span:last-child{white-space:nowrap}
.repair-parts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:340px;margin:12px auto}.repair-part{min-height:78px}.repair-part span{font-size:34px}.repair-part small{font-size:12px}@media(max-height:650px){.repair-part{min-height:54px}.repair-part span{font-size:24px}}
.shield-threat.side-0{animation:asteroid-top 1.5s ease-in-out infinite alternate}.shield-threat.side-1{animation:asteroid-right 1.5s ease-in-out infinite alternate}.shield-threat.side-2{animation:asteroid-bottom 1.5s ease-in-out infinite alternate}.shield-threat.side-3{animation:asteroid-left 1.5s ease-in-out infinite alternate}@keyframes asteroid-top{from{transform:translateY(-12px) scale(.8)}to{transform:translateY(12px) scale(1.1)}}@keyframes asteroid-right{from{transform:translateX(12px) scale(.8)}to{transform:translateX(-12px) scale(1.1)}}@keyframes asteroid-bottom{from{transform:translateY(12px) scale(.8)}to{transform:translateY(-12px) scale(1.1)}}@keyframes asteroid-left{from{transform:translateX(-12px) scale(.8)}to{transform:translateX(12px) scale(1.1)}}@media(prefers-reduced-motion:reduce){.shield-threat.side-0,.shield-threat.side-1,.shield-threat.side-2,.shield-threat.side-3{animation:none}}
.repair-parts{padding:9px;border-radius:16px;border:1px solid #84dbeb;background:linear-gradient(#071b3055,#071b3099),url('assets/space-station-9.jpg') center/cover}.repair-part{box-shadow:0 4px 12px #00111d99}
.scan-lens{position:absolute;z-index:4;pointer-events:none;width:62px;height:62px;transform:translate(-50%,-50%);border:3px solid #b6fff3;border-radius:50%;background:radial-gradient(circle,#aafff322,#3be9d43d);box-shadow:0 0 17px #4ffff1,inset 0 0 10px #8ffff4}.scan-lens:after{content:'✛';display:grid;place-items:center;height:100%;color:#e2fff9;font-size:20px;text-shadow:0 0 8px #4ffff1}
.solar-game{width:100%;padding:8px;border-radius:20px;text-align:center;color:#fff;background:linear-gradient(#06152baa,#06152bd9),url('assets/space-station-9.jpg') center/cover;box-shadow:inset 0 0 0 2px #62d5ee}.solar-rule{margin:6px auto;padding:6px 9px;border-radius:10px;background:#071a34e8;font-weight:700;line-height:1.2;font-size:clamp(12px,3.4vw,15px)}.solar-axis{display:flex;align-items:center;gap:5px;padding:5px;border:1px solid #8ee3ef;border-radius:14px;background:#061c36d9}.solar-sun{width:40px;flex:none;display:flex;flex-direction:column;align-items:center;color:#ffd873;font-weight:800;font-size:30px;text-shadow:0 0 12px #ffbb34}.solar-sun small{font-size:9px}.solar-slots{flex:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.solar-slot,.solar-item{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:54px;padding:2px;border:1px solid #8ac9dd;border-radius:11px;background:linear-gradient(#234b68dd,#0b2942ee);color:white;font-weight:700;touch-action:none}.solar-slot.filled{border-color:#7ae3c5;background:#194e5bd9}.solar-slot small,.solar-item small{font-size:clamp(8px,2.5vw,11px);line-height:1.1}.solar-number{position:absolute;top:2px;left:4px;font-size:9px;color:#ffda80}.solar-empty{font-size:24px;color:#78bbd0}.solar-tip{margin:6px 0;font-size:11px;line-height:1.15}.solar-bank{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.solar-item.selected{outline:2px solid #ffe398;box-shadow:0 0 12px #ffe398}.solar-planet{display:block;width:43px;height:43px;max-width:100%;background-image:url('assets/space-planets-atlas.png');background-size:400% 200%;background-repeat:no-repeat;filter:drop-shadow(0 2px 4px #000a)}.solar-planet-0{background-position:0% 0%}.solar-planet-1{background-position:33.333% 0%}.solar-planet-2{background-position:66.667% 0%}.solar-planet-3{background-position:100% 0%}.solar-planet-4{background-position:0% 100%}.solar-planet-5{background-position:33.333% 100%}.solar-planet-6{background-position:66.667% 100%}.solar-planet-7{background-position:100% 100%}.solar-ghost{position:fixed;z-index:9999;pointer-events:none;transform:translate(-50%,-50%) scale(1.25);filter:drop-shadow(0 0 10px #86eaff)}@media(max-height:650px){.solar-game{padding:5px}.solar-rule{margin:4px auto;padding:4px}.solar-axis{padding:3px}.solar-slot,.solar-item{min-height:47px}.solar-planet{width:35px;height:35px}.solar-tip{margin:3px 0;font-size:10px}}
.game-card:has(.solar-game) .stage-top>span:last-child{white-space:nowrap}.game-card:has(.solar-game) .game-board{justify-content:flex-start}.solar-game .captain-badge{font-size:13px;padding:4px 10px;white-space:nowrap}@media(max-height:650px){.game-card:has(.solar-game) .stage-top{font-size:9px}.game-card:has(.solar-game) .quest-title-row h1{font-size:19px;line-height:1.08;margin:3px 0}.game-card:has(.solar-game)>.instruction{font-size:12px;line-height:1.2;margin:3px 0 5px}.game-card:has(.solar-game) .game-board{padding:2px 0}.solar-game .captain-badge{font-size:11px;padding:3px 10px}.solar-slot,.solar-item{min-height:44px}.solar-planet{width:29px;height:29px}.solar-slot small,.solar-item small{font-size:9px}.solar-rule{font-size:11px;line-height:1.1}.solar-tip{font-size:10px;line-height:1.05}.solar-axis{gap:3px}.solar-slots,.solar-bank{gap:3px}.solar-sun{width:34px;font-size:24px}}
.game-card:has(.solar-orbital)>.stage-top,.game-card:has(.solar-orbital)>.quest-title-row,.game-card:has(.solar-orbital)>.instruction{display:none}.game-card:has(.solar-orbital){padding:6px 7px 8px}.game-card:has(.solar-orbital) .game-board{align-items:stretch;justify-content:flex-start;padding:0;overflow:hidden}.game-card:has(.solar-orbital) .game-note{margin:2px 0 0;min-height:16px;font-size:11px}.solar-orbital{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-height:0;padding:6px;background:radial-gradient(ellipse at 50% 70%,#285d8f 0%,#102548 48%,#07112e 100%);border:1px solid #8ad6f0;box-shadow:inset 0 0 28px #2784b74a,0 6px 18px #142b4355}.solar-head{width:100%;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:4px 8px;border-radius:12px;background:linear-gradient(#386481,#163653);border:1px solid #79c9db;box-shadow:inset 0 1px 2px #d6fcff77;color:white;font-size:13px}.solar-head span{white-space:nowrap;color:#ffe496;font-size:11px}.solar-orbital .solar-rule{width:100%;margin:4px 0;padding:4px 6px;font-size:12px;line-height:1.15}.solar-orbits{position:relative;flex:none;width:min(100%,380px);aspect-ratio:1/.84;overflow:hidden;border-radius:18px;background:radial-gradient(circle at 50% 83.333%,#f9c75b33 0%,#0e2647aa 36%,#07112edd 78%);box-shadow:inset 0 0 20px #4ab9e044}.solar-orbit-ring{position:absolute;left:50%;top:83.333%;width:var(--radius);aspect-ratio:1;border:1px solid #a3e0f88c;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 5px #71ccfa38;pointer-events:none}.solar-center-sun{position:absolute;z-index:2;left:50%;top:83.333%;transform:translate(-50%,-50%);width:30px;height:30px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fffbc2,#ffdd51 35%,#f8920c 72%,#d4550d);box-shadow:0 0 9px #ffe678,0 0 22px #ffb52abf,0 0 38px #ff9d4355}.solar-center-sun small{position:absolute;top:100%;left:50%;transform:translateX(-50%);font-size:9px;font-weight:800;color:#ffeaa9;text-shadow:0 1px 3px #000}.solar-orbit-slot{position:absolute;z-index:3;transform:translate(-50%,-50%);width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:1px dashed #b3ebff;border-radius:50%;background:radial-gradient(circle at 35% 25%,#659bb6df,#143351df);box-shadow:0 2px 6px #0009,inset 0 1px 5px #d7fbff55}.solar-orbit-slot.filled{border-style:solid;border-color:#8affd2;background:radial-gradient(circle,#1e5d6f,#102b49);box-shadow:0 0 11px #62d9e889}.solar-orbit-slot .solar-number{top:1px;left:4px;color:#ffebaa;font-size:10px;text-shadow:0 1px 3px #000}.solar-orbit-slot .solar-empty{font-size:20px;line-height:1}.solar-orbit-slot .solar-planet{width:37px;height:37px}.solar-orbital .solar-tip{margin:3px 0;font-size:10px;line-height:1.15}.solar-orbital .solar-bank{width:100%;margin-top:auto;gap:4px}.solar-orbital .solar-item{min-height:49px;background:linear-gradient(#396886,#14334f);box-shadow:inset 0 1px 2px #d5f5ff66,0 3px 5px #0008}.solar-orbital .solar-item .solar-planet{width:35px;height:35px}.solar-orbital .solar-item small{font-size:10px}@media(max-height:650px){.solar-orbital{padding:4px}.solar-head{font-size:11px;padding:3px 7px}.solar-head span{font-size:10px}.solar-orbital .solar-rule{font-size:11px;margin:3px 0;padding:3px}.solar-orbital .solar-tip{font-size:9px;margin:2px 0}.solar-orbital .solar-item{min-height:44px}.solar-orbital .solar-item .solar-planet{width:30px;height:30px}.solar-orbital .solar-item small{font-size:9px}}
.solar-orbital .solar-orbits{flex:1 1 auto;width:100%;max-width:none;min-height:0;aspect-ratio:auto}.solar-orbital .solar-orbit-ring{height:var(--orbit-height);aspect-ratio:auto}.solar-orbital .solar-bank{margin-top:5px}.solar-orbital .solar-item{min-height:65px}.solar-orbital .solar-item .solar-planet{width:50px;height:50px}.solar-orbit-slot .solar-planet{width:42px;height:42px}.solar-center-sun{width:38px;height:38px}@media(max-height:650px){.solar-orbital .solar-item{min-height:56px}.solar-orbital .solar-item .solar-planet{width:42px;height:42px}.solar-orbit-slot .solar-planet{width:40px;height:40px}.solar-center-sun{width:34px;height:34px}}
.game-card:has(.shield-reaction)>.stage-top,.game-card:has(.shield-reaction)>.quest-title-row,.game-card:has(.shield-reaction)>.instruction{display:none}.game-card:has(.shield-reaction){padding:6px 7px 8px}.game-card:has(.shield-reaction) .game-board{align-items:stretch;justify-content:flex-start;padding:0}.game-card:has(.shield-reaction) .game-note{margin:3px 0 0;font-size:11px}.shield-reaction{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:space-between;width:100%;padding:8px;background:linear-gradient(#06122933,#06122999),url('assets/space-shield-scene.jpg') center/cover;box-shadow:inset 0 0 0 2px #77dff2,0 8px 22px #06183166}.shield-hud{width:100%;display:flex;align-items:center;justify-content:space-between;gap:5px;padding:6px 10px;border:1px solid #8beaff;border-radius:14px;background:linear-gradient(#467c9cdd,#12314be8);color:white;box-shadow:inset 0 1px 3px #e5ffff77;font-size:12px}.shield-hud span{color:#ffe69f;white-space:nowrap}.shield-instruction{margin:4px 0;padding:5px 8px;border-radius:10px;background:#061b35dd;color:#eafaff;font-weight:700;font-size:clamp(12px,3.4vw,15px);line-height:1.15}.shield-battle{position:relative;flex:0 1 auto;width:min(100%,390px);min-height:0;aspect-ratio:1;border-radius:50%;overflow:hidden;background:radial-gradient(circle,#15567b4d,#06132c44 65%,#08152c22);box-shadow:inset 0 0 35px #55d9f147}.shield-orbit{position:absolute;inset:9%;border:1px solid #95eaff77;border-radius:50%;box-shadow:0 0 16px #46d8fc55,inset 0 0 28px #50d8ff33}.shield-rocket{left:50%;top:50%;width:35%;height:42%;transform:translate(-50%,-50%);filter:drop-shadow(0 0 12px #73ddffcc);animation:shield-rocket-float 2.4s ease-in-out infinite alternate}.shield-asteroid{position:absolute;z-index:3;width:18%;height:18%;object-fit:contain;transform:translate(-50%,-50%);filter:drop-shadow(0 0 9px #ffa154cc);will-change:left,top}.shield-approach-0{animation:shield-fly-0 var(--flight) linear forwards}.shield-approach-1{animation:shield-fly-1 var(--flight) linear forwards}.shield-approach-2{animation:shield-fly-2 var(--flight) linear forwards}.shield-approach-3{animation:shield-fly-3 var(--flight) linear forwards}@keyframes shield-fly-0{from{left:50%;top:-10%}to{left:50%;top:25%}}@keyframes shield-fly-1{from{left:110%;top:50%}to{left:75%;top:50%}}@keyframes shield-fly-2{from{left:50%;top:110%}to{left:50%;top:75%}}@keyframes shield-fly-3{from{left:-10%;top:50%}to{left:25%;top:50%}}@keyframes shield-rocket-float{to{transform:translate(-50%,-52%)}}.shield-arc{position:absolute;z-index:4;left:50%;top:50%;width:60%;height:60%;border:5px solid transparent;border-top-color:#d8ffff;border-right-color:#6beaff;border-radius:50%;opacity:0;pointer-events:none;filter:drop-shadow(0 0 5px #36dfff) drop-shadow(0 0 13px #29aaff);transform:translate(-50%,-50%) rotate(-45deg)}.shield-arc.active{opacity:1;animation:shield-arc-flash .9s ease-out forwards}.shield-arc-1{transform:translate(-50%,-50%) rotate(45deg)}.shield-arc-2{transform:translate(-50%,-50%) rotate(135deg)}.shield-arc-3{transform:translate(-50%,-50%) rotate(225deg)}@keyframes shield-arc-flash{0%{opacity:0;filter:brightness(2) drop-shadow(0 0 12px #fff)}20%,65%{opacity:1}100%{opacity:0}}.shield-burst{position:absolute;z-index:5;width:1px;height:1px;pointer-events:none}.shield-burst-0{left:50%;top:25%}.shield-burst-1{left:75%;top:50%}.shield-burst-2{left:50%;top:75%}.shield-burst-3{left:25%;top:50%}.shield-flare{position:absolute;left:-20px;top:-20px;width:40px;height:40px;border-radius:50%;background:radial-gradient(circle,#fff,#bafaff 25%,#45dcff88 55%,transparent 72%);animation:shield-flare .8s ease-out forwards}.shield-fragment{position:absolute;width:17px;height:15px;background:url('assets/space-asteroid-9.png') center/contain no-repeat;animation:shield-fragment .9s ease-out forwards}.shield-fragment.f-0{--dx:-58px;--dy:-40px}.shield-fragment.f-1{--dx:-24px;--dy:-70px}.shield-fragment.f-2{--dx:24px;--dy:-64px}.shield-fragment.f-3{--dx:62px;--dy:-35px}.shield-fragment.f-4{--dx:66px;--dy:25px}.shield-fragment.f-5{--dx:28px;--dy:61px}.shield-fragment.f-6{--dx:-30px;--dy:61px}.shield-fragment.f-7{--dx:-66px;--dy:24px}@keyframes shield-flare{from{transform:scale(.3);opacity:1}to{transform:scale(2.3);opacity:0}}@keyframes shield-fragment{from{transform:translate(-50%,-50%) scale(1);opacity:1}to{transform:translate(var(--dx),var(--dy)) rotate(160deg) scale(.35);opacity:0}}.shield-impact{animation:shield-impact .25s linear 2}@keyframes shield-impact{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}.shield-status{margin:4px 0;color:#fff6cf;font-size:13px;font-weight:800;text-shadow:0 1px 3px #000}.shield-controls{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.shield-control{min-width:44px;min-height:54px;border:1px solid #99f4ff;border-radius:14px;background:linear-gradient(#65b8cdeb,#205677eb 55%,#123753);color:white;box-shadow:inset 0 2px 3px #e2ffff99,0 4px 0 #09233a,0 0 10px #4cceff66;font-weight:800;touch-action:manipulation}.shield-control span{display:block;font-size:25px;line-height:1}.shield-control small{font-size:10px}.shield-control.active{background:linear-gradient(#caffff,#29b8e2);color:#103e61;box-shadow:0 0 20px #82f9ff}.shield-paused *{animation-play-state:paused!important}@media(max-height:650px){.shield-reaction{padding:5px}.shield-hud{padding:4px 7px;font-size:11px}.shield-instruction{margin:3px 0;padding:3px;font-size:11px}.shield-control{min-height:46px}.shield-status{margin:2px 0;font-size:11px}}@media(prefers-reduced-motion:reduce){.shield-rocket,.shield-asteroid,.shield-impact,.shield-fragment,.shield-flare{animation:none!important}.shield-asteroid.shield-approach-0{left:50%;top:15%}.shield-asteroid.shield-approach-1{left:85%;top:50%}.shield-asteroid.shield-approach-2{left:50%;top:85%}.shield-asteroid.shield-approach-3{left:15%;top:50%}}
@keyframes shield-fly-0{from{left:50%;top:0%}to{left:50%;top:25%}}@keyframes shield-fly-1{from{left:100%;top:50%}to{left:75%;top:50%}}@keyframes shield-fly-2{from{left:50%;top:100%}to{left:50%;top:75%}}@keyframes shield-fly-3{from{left:0%;top:50%}to{left:25%;top:50%}}
@media(prefers-reduced-motion:reduce){.shield-arc.active{animation:none;opacity:1}.shield-paused .shield-arc.active{opacity:1}}
.shield-battle{touch-action:manipulation;cursor:pointer}.shield-touch-marks{position:absolute;inset:0;pointer-events:none;color:#c2fbffbb;text-shadow:0 0 8px #59e9ff}.shield-touch-marks .touch-mark{position:absolute;font-size:clamp(18px,5vw,25px);font-weight:800;line-height:1}.shield-touch-marks .up{left:50%;top:20%;transform:translate(-50%,-50%)}.shield-touch-marks .right{left:80%;top:50%;transform:translate(-50%,-50%)}.shield-touch-marks .down{left:50%;top:80%;transform:translate(-50%,-50%)}.shield-touch-marks .left{left:20%;top:50%;transform:translate(-50%,-50%)}

/* Космическая экспедиция: игровая сцена занимает доступную высоту. */
.game-card:has(:is(.captain-console,.repair-game,.cipher-game,.scan-game,.dock-game,.beacon-game))>.stage-top,
.game-card:has(:is(.captain-console,.repair-game,.cipher-game,.scan-game,.dock-game,.beacon-game))>.quest-title-row,
.game-card:has(:is(.captain-console,.repair-game,.cipher-game,.scan-game,.dock-game,.beacon-game))>.instruction{display:none}
.game-card:has(:is(.captain-console,.repair-game,.cipher-game,.scan-game,.dock-game,.beacon-game)){padding:6px 7px 8px}
.game-card:has(:is(.captain-console,.repair-game,.cipher-game,.scan-game,.dock-game,.beacon-game)) .game-board{align-items:stretch;justify-content:flex-start;padding:0;min-height:0}
.game-card:has(:is(.captain-console,.repair-game,.cipher-game,.scan-game,.dock-game,.beacon-game)) .game-note{margin:3px 0 0;font-size:11px}
:is(.captain-console,.repair-game,.cipher-game,.scan-game,.dock-game,.beacon-game){flex:1 1 auto;min-height:0;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;gap:5px;padding:8px;overflow-y:auto}
:is(.captain-console,.repair-game,.cipher-game,.scan-game,.dock-game,.beacon-game) .captain-badge{flex:none;font-size:clamp(11px,3.3vw,14px);padding:5px 10px}
:is(.captain-console,.repair-game,.cipher-game,.scan-game,.dock-game,.beacon-game) .captain-rule{flex:none;width:100%;margin:0;padding:6px;font-size:clamp(12px,3.4vw,15px)}
.captain-instruments{width:100%;margin:0;gap:6px}.captain-instrument{display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;min-height:clamp(150px,25vh,210px)}.captain-dial{width:clamp(64px,19vw,90px);height:clamp(64px,19vw,90px)}.captain-adjust{width:100%}.captain-adjust button{flex:1;max-width:62px}.captain-tip{margin:0}
.repair-parts{width:100%;max-width:none;margin:0;flex:1 1 auto;min-height:0;grid-auto-rows:minmax(54px,1fr)}.repair-part{min-height:0}.repair-detail{width:100%;margin:0}.repair-tools button{flex:1;min-width:55px}.repair-game .course-status{margin:0}
.cipher-key,.cipher-message,.cipher-letters{width:100%;margin:0;align-content:center}.cipher-key{flex:1 1 auto}.cipher-message{flex:1 1 auto}.cipher-letters{flex:1 1 auto}.cipher-key span{min-width:55px;font-size:clamp(14px,4vw,19px)}.cipher-message span{min-width:40px;justify-content:center}.cipher-letters button{flex:1;max-width:70px;min-height:54px}
.scan-world{width:100%;max-width:none;min-height:100px;flex:1 1 auto;aspect-ratio:auto;margin:0}.scan-clues,.scan-answers{width:100%;margin:0}.scan-clues span,.scan-answers button{flex:1;min-width:0}.scan-answers button{min-width:75px}
.dock-grid{flex:1 1 0;min-height:0;width:auto;max-width:100%;aspect-ratio:1;grid-template-rows:repeat(5,minmax(0,1fr));margin:0}.dock-cell{aspect-ratio:auto}.dock-controls{width:100%;flex:none;margin:0}.dock-controls button{flex:1;max-width:80px}
.beacon-core{width:100%;flex:1 1 auto;min-height:0;display:flex;flex-direction:column;justify-content:space-evenly}.beacon-items{width:100%;margin:0;flex:1 1 auto;align-content:center}.beacon-slot,.beacon-item{flex:1;max-width:95px;min-width:48px;min-height:clamp(68px,13vh,108px)}.crystal{width:clamp(25px,9vw,42px);height:clamp(30px,11vw,50px)}
@media(max-height:650px){:is(.captain-console,.repair-game,.cipher-game,.scan-game,.dock-game,.beacon-game){gap:3px;padding:5px}.captain-instrument{min-height:125px}.captain-dial{width:60px;height:60px}.repair-parts{padding:5px}.repair-detail{padding:4px}.repair-tools button{min-height:48px}.repair-part span,.repair-tools span{font-size:22px}.repair-game .course-status{padding:3px 8px}.scan-clues span,.scan-answers button{padding:4px;font-size:11px}.beacon-slot,.beacon-item{min-height:65px}.crystal{width:26px;height:30px}}
.cipher-header{width:100%;display:flex;align-items:center;justify-content:center;gap:8px}.cipher-help{flex:none;width:44px;height:44px;border:1px solid #a7f2ff;border-radius:50%;background:linear-gradient(#4c95ae,#143c5b);color:white;font-weight:900;font-size:24px;touch-action:manipulation}.cipher-keyboard{width:100%;display:flex;flex-direction:column;justify-content:space-evenly;gap:3px;flex:1;min-height:0;padding:5px;border:1px solid #72d9ef;border-radius:14px;background:#061b33cc}.cipher-key-title{font-size:clamp(11px,3vw,14px);color:#ffe798;font-weight:800}.cipher-keyboard .cipher-key{flex:none;gap:3px;margin:0}.cipher-keyboard .cipher-key span{flex:1;min-width:42px;padding:4px 1px;font-size:clamp(12px,3.4vw,16px)}.cipher-keyboard .cipher-key b{font-size:clamp(17px,4.5vw,23px)}.cipher-game .cipher-message{flex:0 1 auto}.cipher-game .cipher-letters{flex:0 1 auto}.cipher-prompt{margin:0;font-weight:800;color:#ffecb4;font-size:clamp(12px,3.3vw,15px)}.cipher-dialog{max-width:min(90vw,420px);max-height:85vh;overflow:auto;border:2px solid #82eaff;border-radius:20px;padding:20px;background:#102c4a;color:white;text-align:left;line-height:1.45;box-shadow:0 10px 40px #0009}.cipher-dialog::backdrop{background:#061123cc}.cipher-dialog h2{margin:0 0 10px;font-size:21px}.cipher-dialog button{min-height:44px;padding:8px 18px;border:1px solid #97eaff;border-radius:12px;background:#347995;color:#fff;font-weight:800}@media(max-height:650px){.cipher-header .captain-badge{font-size:10px}.cipher-game .captain-rule{font-size:11px;padding:3px}.cipher-keyboard{padding:3px;gap:1px}.cipher-key-title{font-size:10px}.cipher-keyboard .cipher-key span{padding:2px 1px}.cipher-message{gap:3px}.cipher-message span{padding:2px;min-width:35px}.cipher-letters button{min-height:44px}.cipher-prompt{font-size:11px}}
/* Сигнальная консоль: ключи, сообщение и выбор занимают доступную высоту. */
.cipher-game{justify-content:flex-start;gap:clamp(5px,1.1vh,10px);padding:clamp(7px,2.3vw,12px);background:radial-gradient(ellipse at 50% 0,#2d7595a8,transparent 48%),linear-gradient(#071a32d9,#07142bf0),url('assets/space-station-9.jpg') center/cover}
.cipher-header{flex:none;justify-content:space-between;gap:8px;text-align:left}.cipher-heading{min-width:0}.cipher-eyebrow{display:block;margin:0 0 3px 2px;color:#8cd9e7;font-size:clamp(8px,2.5vw,10px);font-weight:800;letter-spacing:.09em}.cipher-header .captain-badge{display:flex;align-items:center;gap:7px;justify-content:space-between;padding:0;background:none;border:0;color:#fff;font-size:clamp(12px,3.6vw,17px);letter-spacing:.02em}.cipher-header .captain-badge span{flex:none;padding:4px 7px;border-radius:8px;background:#326883;color:#d8faff;font-size:11px}.cipher-help{width:44px;height:44px;box-shadow:inset 0 1px 2px #d8ffff88,0 3px 10px #0016}
.cipher-game .captain-rule{padding:6px 8px;border:1px solid #5798ad80;background:#0a2743db;text-align:left;font-size:clamp(11px,3.2vw,14px)}
.cipher-keyboard{display:grid;grid-template-rows:repeat(2,minmax(0,1fr));gap:clamp(5px,1vh,9px);flex:1 1 0;min-height:0;padding:0;border:0;background:none}.cipher-key-group{display:flex;flex-direction:column;justify-content:center;gap:clamp(4px,1vh,9px);min-height:0;padding:clamp(6px,2vw,10px);border:1px solid #547e9c;border-radius:14px;background:linear-gradient(130deg,#183d5aeb,#10283ff2);box-shadow:inset 0 1px #c9f9ff24}.cipher-key-group.is-active{border-color:#68d9e8;box-shadow:inset 3px 0 #66e4f0,0 0 14px #37c8e21c}.cipher-key-title{display:flex;align-items:center;gap:6px;text-align:left;color:#cbeef2;font-size:clamp(11px,3.2vw,14px)}.cipher-key-title span{display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:#317d96;color:white;font-size:12px}.cipher-keyboard .cipher-key{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px}.cipher-keyboard .cipher-key span{display:flex;align-items:center;justify-content:center;gap:2px;min-width:0;min-height:clamp(36px,5.8vh,48px);padding:3px 1px;border-radius:8px;border-color:#4e98b0;background:#081d33;color:#eefaff;font-size:clamp(12px,3.5vw,17px)}.cipher-keyboard .cipher-key b{color:#ffe18c;font-size:clamp(17px,5vw,23px)}
.cipher-signal{width:100%;flex:none;padding:7px 8px;border:1px solid #857a55;border-radius:14px;background:linear-gradient(120deg,#393a35e8,#172a3bf2)}.cipher-signal-title{display:flex;justify-content:space-between;gap:5px;margin:0 0 5px;color:#f8dc92;font-size:clamp(9px,2.7vw,11px);font-weight:800;letter-spacing:.05em}.cipher-game .cipher-message{display:flex;flex-wrap:nowrap;justify-content:center;gap:4px;margin:0}.cipher-message span{flex:1;max-width:53px;min-width:0;min-height:clamp(42px,7vh,60px);padding:2px;border-color:#65849b;background:#10283c}.cipher-message .current{border-color:#ffd879;background:#285066;box-shadow:0 0 10px #f8c65f66}.cipher-message b{font-size:clamp(18px,5.5vw,25px)}.cipher-message small{font-size:clamp(14px,4vw,18px);line-height:1}
.cipher-prompt{width:100%;text-align:left;margin:0;padding:0 3px;font-size:clamp(11px,3.2vw,15px)}.cipher-game .cipher-letters{display:flex;flex-wrap:nowrap;gap:5px;margin:0}.cipher-letters button{flex:1;min-width:0;max-width:none;min-height:clamp(44px,7vh,62px);border-radius:11px;background:linear-gradient(#56a9b9,#23617b);box-shadow:inset 0 1px 2px #d5ffff88,0 3px 0 #0c3045;font-size:clamp(20px,6vw,27px)}
@media(max-height:650px){.cipher-game{gap:4px;padding:6px}.cipher-eyebrow{font-size:8px;margin-bottom:1px}.cipher-game .captain-rule{font-size:11px;padding:4px 6px}.cipher-keyboard{gap:4px}.cipher-key-group{padding:4px 6px;gap:3px}.cipher-key-title{font-size:11px}.cipher-key-title span{width:19px;height:19px}.cipher-keyboard .cipher-key span{min-height:32px}.cipher-signal{padding:4px 6px}.cipher-signal-title{margin-bottom:3px}.cipher-message span{min-height:38px}.cipher-letters button{min-height:44px}}
.cipher-keyboard{align-self:stretch;width:100%}.cipher-key-group{width:100%}.cipher-keyboard .cipher-key{width:100%;max-width:none}.cipher-keyboard .cipher-key span{min-height:clamp(36px,7vh,58px)}
@media(max-height:650px){.cipher-keyboard .cipher-key span{min-height:32px}}
.cipher-keyboard{grid-template-columns:minmax(0,1fr);justify-content:stretch}
/* Сканер планеты: поле исследования и карточки обнаруженных улик. */
.scan-game{justify-content:flex-start;gap:clamp(4px,.9vh,8px);padding:clamp(6px,2vw,10px);background:radial-gradient(ellipse at 50% 0,#377b97aa,transparent 42%),linear-gradient(#0a2239,#07182f)}.scan-header{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:6px}.scan-eyebrow{display:block;color:#8ed7e7;font-size:clamp(8px,2.5vw,10px);font-weight:800;letter-spacing:.08em}.scan-header .captain-badge{display:flex;align-items:center;gap:7px;padding:0!important;border:0;background:none;font-size:clamp(12px,3.5vw,16px)!important}.scan-header .captain-badge span{padding:4px 6px;border-radius:7px;background:#306c82;font-size:11px}.scan-counter{padding:4px 9px;border:1px solid #63cbd4;border-radius:11px;background:#123d50;color:#b7f3ec;font-size:12px;white-space:nowrap}.scan-counter b{font-size:19px;color:#fff}.scan-counter small{display:block;font-size:8px;letter-spacing:.08em}.scan-game .captain-rule{padding:5px 8px;text-align:left;border:1px solid #5ca0ad80;font-size:clamp(11px,3.2vw,14px)}
.scan-world{position:relative;overflow:hidden;min-height:110px;border-color:#6bbacb;box-shadow:inset 0 0 22px #06162788}.scan-world:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(#081d371a,transparent 30%,#06182a55)}.scan-marker{z-index:3;width:52px;height:52px;border:0;background:transparent;box-shadow:none;color:#fff5b5;text-shadow:0 0 6px #fff8bf,0 0 11px #ffe783;opacity:.7;font-size:15px;touch-action:manipulation}.scan-marker span{display:block}.scan-marker.found{border:2px solid #adfff0;background:#187b76dc;box-shadow:0 0 18px #7cfbe9;color:#fff;font-size:25px;opacity:1}.scan-marker.racers-hint{opacity:1;background:#26a79b88;border:2px solid #d6fffa}.scan-world-label{position:absolute;z-index:2;left:8px;right:8px;bottom:7px;display:flex;justify-content:space-between;gap:4px;pointer-events:none;color:#dbfff9;text-shadow:0 1px 4px #001b22;font-weight:800;font-size:clamp(8px,2.3vw,10px)}.scan-lens{z-index:5}
.scan-evidence{width:100%;flex:none;padding:6px;border:1px solid #53869e;border-radius:13px;background:#102d42}.scan-evidence-title{display:flex;justify-content:space-between;color:#a3e5e7;font-weight:800;letter-spacing:.07em;font-size:10px}.scan-clues{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:5px 0 0}.scan-clues .scan-clue{display:flex;align-items:center;gap:5px;min-width:0;padding:4px;border:1px solid #48708a;border-radius:9px;background:#16354a;color:#b2c9d3;font-size:clamp(10px,2.8vw,12px);line-height:1.1;text-align:left}.scan-clues .scan-clue.is-found{border-color:#8aebd4;background:#20594f;color:#f3fff9}.scan-clue>b{display:grid;place-items:center;flex:none;width:29px;height:29px;border-radius:8px;background:#2c596a;color:#aee9eb;font-size:18px}.scan-clue.is-found>b{background:#4ea18b;color:#fff6bd}.scan-clue>span{padding:0;border:0;background:none;color:inherit;font:inherit}.scan-answers{flex:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:0}.scan-answers button{min-width:0;min-height:48px;padding:4px;border:1px solid #87dfe9;border-radius:10px;background:linear-gradient(#397a8e,#1c5268);color:#fff;font-weight:800;font-size:clamp(10px,2.8vw,13px);line-height:1.1;touch-action:manipulation}
@media(max-height:650px){.scan-game{gap:3px;padding:5px}.scan-header .captain-badge{font-size:11px!important}.scan-counter{padding:2px 6px}.scan-counter b{font-size:15px}.scan-game .captain-rule{padding:4px 6px;font-size:11px}.scan-evidence{padding:4px}.scan-clues{margin-top:3px}.scan-clue>b{width:25px;height:25px}.scan-answers button{min-height:44px}}
.scan-header>div:first-child{min-width:0}.scan-header .captain-badge{white-space:nowrap}
/* Стыковка: мультяшная станция и тактильное поле навигации. */
.dock-game{justify-content:flex-start;gap:clamp(5px,1vh,9px);padding:clamp(6px,2vw,10px);background:radial-gradient(ellipse at 50% 0,#3b86a099,transparent 45%),linear-gradient(#0a243c,#07172e);border:1px solid #77d2e3}.dock-game .captain-badge{padding:5px 12px;border:1px solid #67bacf;background:linear-gradient(#286582,#103450);font-size:clamp(12px,3.6vw,16px);box-shadow:inset 0 1px #bffaff66}.dock-game .captain-rule{padding:6px 8px;border:1px solid #5397a77a;background:#0a2743e8;font-size:clamp(11px,3.2vw,14px);line-height:1.2}.dock-grid{align-self:center;width:min(100%,480px);max-width:100%;flex:1 1 0;min-height:0;aspect-ratio:auto;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));gap:3px;padding:clamp(5px,1.8vw,9px);border:1px solid #6ecadd;border-radius:18px;background:linear-gradient(#071d3230,#071d3240),url('assets/space-dock-station.png') center/cover;box-shadow:inset 0 0 24px #001321,0 7px 18px #0006}.dock-cell{position:relative;display:grid;place-items:center;min-width:0;min-height:0;aspect-ratio:auto;padding:2px;border:1px solid #a7e8ef70;border-radius:9px;background:linear-gradient(145deg,#34869a4a,#0e425d45);box-shadow:inset 0 1px #c5ffff30;color:#dcfcff;touch-action:manipulation}.dock-cell.ship{border-color:#a1f7ff;background:#2faccd48}.dock-cell img{position:relative;z-index:2;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 5px #55ebffc9)}.dock-cell.wall{border:2px solid #7aa1a8;background:linear-gradient(145deg,#798e94,#374f5a 48%,#172d3a);box-shadow:inset 0 2px 3px #d5fcff88,0 3px 6px #001a}.dock-obstacle{display:block;width:75%;height:56%;border:2px solid #abc8cf;border-radius:5px;background:repeating-linear-gradient(135deg,#f6b63c 0 5px,#394452 5px 10px);box-shadow:0 2px 5px #06111b}.dock-cell.goal{border:1px solid #ffe38c;background:radial-gradient(circle,#ffefb38c,#f4a62f60 50%,#32607955);box-shadow:inset 0 0 12px #ffe99799,0 0 10px #ffd66c77}.dock-hatch{display:block;width:70%;aspect-ratio:1;border:3px solid #ffe9a5;border-radius:50%;background:radial-gradient(circle,#fff9d1 0 12%,#72dff4 17% 40%,#0e6684 45% 58%,#f5b348 62%);box-shadow:0 0 12px #83efff,inset 0 0 8px #fff}.dock-controls{gap:7px}.dock-controls button{border-color:#a4effa;border-radius:12px;background:linear-gradient(#5da8b9,#286680 55%,#16425d);box-shadow:inset 0 1px #e6ffffaa,0 3px 0 #0a253a;font-size:clamp(22px,6vw,28px);touch-action:manipulation}.dock-cell.racers-hint{border-color:#fff0a0;background:#ffe88480;box-shadow:0 0 12px #fff1a0}
@media(max-height:650px){.dock-game{gap:4px;padding:5px}.dock-game .captain-badge{font-size:11px;padding:4px 8px}.dock-game .captain-rule{font-size:11px;padding:4px 6px}.dock-grid{padding:5px;gap:2px}.dock-controls button{min-height:44px}}
/* Шесть на шесть: одинаковые квадратные клетки на мобильных экранах. */
.dock-grid{flex:0 1 auto;width:min(100%,480px);height:auto;aspect-ratio:1;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(6,minmax(0,1fr));gap:1px;padding:3px}.dock-cell{aspect-ratio:1;border-radius:7px}.dock-obstacle{border-width:1px}.dock-hatch{border-width:2px}@media(max-height:650px){.dock-grid{gap:1px;padding:3px}}
@media(max-width:350px){.dock-game{padding-left:3px;padding-right:3px}}
.route-game{justify-content:flex-start;gap:4px;padding:6px;background:radial-gradient(ellipse at 50% 0,#3a7d99aa,transparent 40%),linear-gradient(#0a213e,#07142a);overflow-y:auto}.route-head{width:100%;display:flex;justify-content:space-between;align-items:center;gap:4px}.route-head .captain-badge{padding:4px 8px;font-size:clamp(10px,3vw,14px)}.route-help{width:44px;height:44px;flex:none;border:1px solid #a4eafa;border-radius:50%;background:#215c76;color:white;font-weight:900;font-size:23px}.route-game .captain-rule{margin:0;padding:5px;font-size:clamp(10px,3vw,14px);line-height:1.2;text-align:left}.route-stats{width:100%;display:flex;flex-wrap:wrap;justify-content:space-between;gap:3px;padding:4px 6px;border-radius:9px;background:#102e49;color:#b8eff4;font-weight:800;font-size:clamp(9px,2.6vw,12px)}.route-map{position:relative;flex:1 1 auto;width:100%;min-height:140px;border:1px solid #64c8de;border-radius:16px;overflow:hidden;background:linear-gradient(#07163255,#07163244),url('assets/space-dock-station.png') center/cover;box-shadow:inset 0 0 25px #06112b}.route-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.route-lines line{stroke:#a6dce1;stroke-width:3;opacity:.72}.route-lines line.chosen{stroke:#ffe37b;stroke-width:6;opacity:1}.route-lines line.gate{stroke:#fbad83;stroke-dasharray:6 4}.route-lines text{paint-order:stroke;stroke:#102d47;stroke-width:5;fill:#fff5c6;font-weight:900;font-size:16px;text-anchor:middle}.route-node{position:absolute;left:calc((var(--col) + .5)*25%);top:calc((var(--row) + .5)*33.3333%);transform:translate(-50%,-50%);width:clamp(44px,12vw,58px);height:clamp(44px,12vw,58px);padding:1px;border:2px solid #80d8eb;border-radius:50%;background:radial-gradient(circle at 35% 25%,#76c0d4,#245879 65%,#102b49);color:#f3feff;box-shadow:0 3px 9px #0019;touch-action:manipulation}.route-node span{display:block;font-size:clamp(17px,5vw,24px);line-height:1}.route-node small{display:block;font-size:10px;font-weight:900;line-height:1}.route-node.required{border-color:#ffdc85}.route-node.blocked{border-color:#e88a8a;background:radial-gradient(circle,#a9565b,#592c42);color:#fff}.route-node.visited{box-shadow:0 0 11px #ffe586;border-color:#ffe586}.route-node.current{outline:2px solid white}.route-node.racers-hint{transform:translate(-50%,-50%)}.route-shield,.route-actions button,.route-dialog button{min-height:44px;border:1px solid #8ce3ed;border-radius:10px;background:linear-gradient(#428ea4,#1b536c);color:white;font-weight:800;touch-action:manipulation}.route-shield{width:100%;min-height:38px}.route-shield.on{background:#287d6c}.route-actions{width:100%;display:flex;gap:4px}.route-actions button{flex:1;min-width:0;font-size:clamp(11px,3vw,14px)}.route-actions button:last-child{background:linear-gradient(#e8ad4c,#a55c26)}.route-actions button:disabled{opacity:.4}.route-status{margin:0;color:#ffe99c;font-size:11px}.route-dialog{max-width:min(90vw,420px);max-height:85vh;overflow:auto;border:2px solid #82eaff;border-radius:20px;padding:20px;background:#102c4a;color:white;text-align:left;line-height:1.4}.route-dialog::backdrop{background:#061123cc}.route-dialog button{padding:8px 20px}.route-fly{animation:route-launch 1.4s ease-in-out infinite alternate}@keyframes route-launch{to{filter:brightness(1.5);box-shadow:inset 0 0 60px #a8ecff}}@media(prefers-reduced-motion:reduce){.route-fly{animation:none}}@media(max-height:650px){.route-game{gap:2px;padding:4px}.route-head .captain-badge{font-size:10px!important}.route-game .captain-rule{font-size:10px!important;padding:3px}.route-stats{font-size:9px;padding:3px}.route-help{width:44px;height:44px}.route-node{width:44px;height:44px}.route-node span{font-size:17px}.route-actions button{min-height:44px}.route-shield{min-height:35px}}
.route-voyager{position:absolute;z-index:5;width:36px;height:36px;object-fit:contain;transform:translate(-50%,-50%);filter:drop-shadow(0 0 8px #b6fbff);pointer-events:none}
@media(max-width:380px){body.quest-app:has(.space-rules-button) .play-header>.brand{display:none}body.quest-app:has(.space-rules-button) .play-header .tools{gap:1px}body.quest-app:has(.space-rules-button) .play-header .menu-exit{padding-left:6px;padding-right:6px}}
/* Балетная академия · волшебная акварельная лента */
.game-card:has(.ballet-ribbon-game)>.stage-top,.game-card:has(.ballet-ribbon-game)>.quest-title-row,.game-card:has(.ballet-ribbon-game)>.instruction{display:none}.game-card:has(.ballet-ribbon-game){padding:6px 7px 8px}.game-card:has(.ballet-ribbon-game) .game-board{align-items:stretch;justify-content:flex-start;padding:0;min-height:0}.game-card:has(.ballet-ribbon-game) .game-note{margin:3px 0 0;font-size:11px}.ballet-ribbon-game{display:flex;flex:1;min-height:0;width:100%;flex-direction:column;align-items:stretch;gap:5px;padding:7px;border:1px solid #df9cae;border-radius:20px;color:#563348;background:linear-gradient(#fff5e9d9,#fbe5e8e8),url('assets/ballet-cover.jpg') center/cover;box-shadow:inset 0 0 0 2px #fffaee,0 8px 18px #a8677255}.ribbon-head{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:6px 9px;border:1px solid #d98ba2;border-radius:13px;background:linear-gradient(#fff8f0,#f5dce1);font-size:clamp(11px,3.2vw,14px);letter-spacing:.02em}.ribbon-head span{white-space:nowrap;font-size:11px;color:#9b4769;font-weight:800}.ribbon-instruction{margin:0;padding:5px 7px;border-radius:10px;background:#fff7f1e8;color:#6c3d51;font-size:clamp(11px,3vw,14px);font-weight:700;line-height:1.2}.ribbon-stage{position:relative;flex:1;min-height:150px;overflow:hidden;border:2px solid #e3a1ad;border-radius:16px;background:linear-gradient(#fff2e46b,#ffe6e354),url('assets/ballet-ribbon-pink.jpg') center/cover;touch-action:none;box-shadow:inset 0 0 24px #e7a7a982}.ribbon-stage svg{width:100%;height:100%;overflow:visible}.ribbon-track-glow,.ribbon-track,.ribbon-trail{fill:none;stroke-linejoin:round;stroke-linecap:round}.ribbon-track-glow{stroke:#fff9e9;stroke-width:9;opacity:.8}.ribbon-track{stroke:#c56f91;stroke-width:2;stroke-dasharray:1 2;opacity:.7}.ribbon-trail{stroke:#d33777;stroke-width:3;filter:drop-shadow(0 0 2px #fff1b7)}.ribbon-marker{fill:#f9e6a7;stroke:#c17d51;stroke-width:.55}.ribbon-marker.done{fill:#ed82a5;stroke:#fff4cb}.ribbon-next{fill:#fff8d8;stroke:#e18587;stroke-width:.7}.ribbon-cursor-halo{fill:#fff8d6;opacity:.55}.ribbon-cursor{fill:#c93175;stroke:#fff5d2;stroke-width:1}.ribbon-obstacle circle{fill:#a54f69;stroke:#fff3ce;stroke-width:1}.ribbon-obstacle text{fill:#ffe8b4;font-size:7px;text-anchor:middle}.ribbon-start,.ribbon-finish{position:absolute;bottom:6px;font-size:9px;font-weight:900;color:#853f62;text-shadow:0 1px #fff}.ribbon-start{left:8px}.ribbon-finish{right:8px}.ribbon-progress{text-align:center;color:#884862;font-size:12px;font-weight:800}.ribbon-actions{display:flex;gap:5px}.ribbon-actions button{min-width:0;min-height:44px;flex:1;padding:4px;border:1px solid #cd8ca1;border-radius:11px;background:linear-gradient(#fffaf3,#f3d4dd);color:#713d57;font-size:12px;font-weight:800;touch-action:manipulation}.ribbon-actions button[aria-pressed=true]{background:linear-gradient(#dc7ea0,#b84e79);border-color:#ae4671;color:white;box-shadow:0 2px 7px #b5628288}.ribbon-note{margin:0;color:#7c4e61;font-size:11px;line-height:1.15;text-align:center}@media(max-height:650px){.ballet-ribbon-game{gap:3px;padding:5px}.ribbon-head{padding:4px 7px;font-size:11px}.ribbon-instruction{font-size:11px;padding:3px}.ribbon-progress,.ribbon-note{font-size:10px}.ribbon-actions button{min-height:44px}}@media(prefers-reduced-motion:reduce){.ballet-ribbon-game *{animation:none!important}}
/* Мягкая ткань и акварельный блеск движущейся ленты. */
.ribbon-track-glow,.ribbon-track,.ribbon-trail-shadow,.ribbon-trail,.ribbon-trail-glaze,.ribbon-trail-thread{fill:none;stroke-linecap:round;stroke-linejoin:round}.ribbon-track-glow{stroke:#fff9ed;stroke-width:8.2;opacity:.78}.ribbon-track{stroke:#d99aa9;stroke-width:1.15;stroke-dasharray:1.1 2.4;opacity:.65}.ribbon-trail-shadow{stroke:#87334f;stroke-width:6.4;opacity:.3;filter:blur(.8px)}.ribbon-trail{stroke:url(#ribbon-watercolor);stroke-width:5.8;opacity:1}.ribbon-trail-glaze{stroke:url(#ribbon-shine);stroke-width:5.4;opacity:.52}.ribbon-trail-thread{stroke:#fff2d2;stroke-width:.6;opacity:.75}.ribbon-cursor-halo{fill:#ffefc5;opacity:.5;filter:blur(1px)}.ribbon-cursor{fill:url(#ribbon-watercolor);stroke:#fff3ce;stroke-width:1.1;filter:drop-shadow(0 .6px 1px #9d486b)}.ribbon-cursor-detail{fill:none;stroke:#fff5d5;stroke-width:.65;stroke-linecap:round;opacity:.95;pointer-events:none}
/* Балетная академия: сравнение с зеркальным отражением */
.game-card:has(.ballet-mirror-game)>.stage-top,.game-card:has(.ballet-mirror-game)>.quest-title-row,.game-card:has(.ballet-mirror-game)>.instruction{display:none}.game-card:has(.ballet-mirror-game){padding:6px 7px 8px}.game-card:has(.ballet-mirror-game) .game-board{align-items:stretch;justify-content:flex-start;padding:0;min-height:0}.game-card:has(.ballet-mirror-game) .game-note{margin:3px 0 0;font-size:11px}.ballet-mirror-game{display:flex;flex:1;min-height:0;flex-direction:column;gap:5px;width:100%;padding:7px;border:1px solid #d79aa9;border-radius:20px;background:linear-gradient(#fff3e9ee,#f7dfe6ee),url('assets/ballet-cover.jpg') center/cover;color:#65374e;box-shadow:inset 0 0 0 2px #fff9eb}.mirror-head{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:6px 8px;border:1px solid #db9bae;border-radius:12px;background:#fff8f1e8;font-size:clamp(11px,3.4vw,14px)}.mirror-head span{white-space:nowrap;color:#9a4d6b;font-size:11px;font-weight:800}.mirror-instruction{margin:0;padding:5px 8px;border-radius:10px;background:#fff8f2e8;line-height:1.2;font-size:clamp(11px,3vw,14px);font-weight:700}.mirror-compare{display:flex;flex:1;min-height:0;align-items:center;justify-content:center;gap:6px}.mirror-panel{display:flex;flex:1;min-width:0;min-height:0;flex-direction:column;align-items:center;gap:4px}.mirror-label{padding:3px 10px;border-radius:10px;background:#fff7e7;color:#80465d;font-size:11px;font-weight:800}.mirror-figure{position:relative;width:min(100%,calc((100dvh - 280px)*.75));aspect-ratio:3/4;border:3px solid #ddac62;border-radius:18px 18px 12px 12px;background:#f5d9cb;box-shadow:0 3px 7px #8b5a4f55,inset 0 0 0 1px #fff7ce}.mirror-figure img{width:100%;height:100%;object-fit:fill;display:block;border-radius:14px 14px 9px 9px}.mirror-figure.reflection img{transform:scaleX(-1)}.mirror-prop{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:44px;height:44px;display:grid;place-items:center;padding:0;border:0;background:transparent;z-index:2;color:var(--color);touch-action:manipulation}.mirror-prop>span,.mirror-choice>span{display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle at 35% 25%,#fffce3,var(--color) 48%,#a5556c 100%);border:1px solid #fff5d6;color:#fff6d9;text-shadow:0 1px 2px #7e3857;box-shadow:0 1px 4px #643d4c99,inset 0 1px #fff9;line-height:1}.mirror-prop>span{width:22px;height:22px;font-size:17px}.mirror-prop.selected>span{outline:2px solid #fff7c0;box-shadow:0 0 10px #fff5ba}.prop-0{--color:#d7648b}.prop-1{--color:#d9a438}.prop-2{--color:#6293bc}.prop-3{--color:#a477b5}.mirror-status{text-align:center;font-size:12px;font-weight:800;color:#8d4763}.mirror-options{display:flex;flex:none;min-height:62px;justify-content:center;gap:5px;align-items:stretch}.mirror-options p{display:grid;place-items:center;margin:0;padding:6px 10px;border-radius:12px;background:#fff8f1bd;color:#814a61;font-weight:700;font-size:12px}.mirror-choice{display:flex;flex:1;max-width:95px;min-width:0;min-height:60px;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:1px solid #d69aac;border-radius:12px;background:linear-gradient(#fff8ef,#f3d3dc);color:#754156;font-weight:800;touch-action:manipulation}.mirror-choice>span{width:26px;height:26px;font-size:20px}.mirror-choice small{font-size:10px}.mirror-prop.racers-hint{background:transparent!important}.mirror-prop.racers-hint>span{outline:3px solid #fff9ba;box-shadow:0 0 12px #fffab4}@media(max-height:650px){.ballet-mirror-game{gap:3px;padding:5px}.mirror-head{padding:4px 6px;font-size:11px}.mirror-instruction{padding:3px 6px;font-size:11px}.mirror-label{padding:2px 8px;font-size:10px}.mirror-status{font-size:11px}.mirror-options{min-height:52px}.mirror-choice{min-height:52px}.mirror-choice>span{width:23px;height:23px;font-size:18px}}
.mirror-figure{height:min(44vh,calc(100dvh - 280px));aspect-ratio:auto;overflow:hidden}.mirror-figure img{object-fit:cover}.mirror-prop>span{width:16px;height:16px;font-size:12px}

/* Once the scratch card is uncovered, a swipe on the picture scrolls the clue. */
.scratch.open{touch-action:pan-y}
.quest-app .clue-card{padding-bottom:calc(24px + var(--clue-keyboard-space, 0px))}
.game-card:has(.ballet-repair)>.stage-top,.game-card:has(.ballet-repair)>.quest-title-row,.game-card:has(.ballet-repair)>.instruction{display:none}.game-card:has(.ballet-repair){padding:6px 7px 8px}.game-card:has(.ballet-repair) .game-board{align-items:stretch;justify-content:flex-start;padding:0;min-height:0}.game-card:has(.ballet-repair) .game-note{margin:2px 0;font-size:11px}.ballet-repair{display:flex;flex:1;min-height:0;flex-direction:column;gap:5px;width:100%;padding:7px;border:1px solid #d797a7;border-radius:20px;background:#fff2e7;color:#693b4c}.ballet-repair header{display:flex;justify-content:space-between;align-items:center;gap:5px;padding:6px 8px;background:#fff9f1;border-radius:12px;font-size:clamp(10px,3vw,14px)}.ballet-repair header span{white-space:nowrap;font-size:11px}.repair-task{margin:0;padding:6px;border-radius:10px;background:#fff9f1;font-weight:800;text-align:center;font-size:clamp(12px,3vw,15px)}.repair-workshop{position:relative;flex:1;min-height:140px;border:2px solid #e2b087;border-radius:15px;background:url('assets/ballet-repair-atelier.jpg') center 34%/cover;overflow:hidden}.repair-seam{position:absolute;left:13%;right:13%;top:42%;display:flex;justify-content:space-between;align-items:center;border-top:3px dashed #b34869;opacity:.4}.repair-seam.active{opacity:1;touch-action:none}.repair-stitch{width:44px;height:44px;min-width:0;display:grid;place-items:center;margin-top:-23px;border:2px solid #fff3d1;border-radius:50%;background:#b54271;color:#fff9d7;font-weight:900;font-size:24px;touch-action:none}.repair-stitch.done{background:#61a284}.repair-progress{text-align:center;font-size:12px;font-weight:800}.repair-options{min-height:65px;display:flex;gap:5px;justify-content:center}.repair-options p{margin:0;padding:8px;border-radius:12px;background:#fff9f1;text-align:center;font-size:12px;font-weight:700}.repair-options button{flex:1;max-width:130px;min-width:0;min-height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #d798a5;border-radius:12px;background:linear-gradient(#fffaf1,#f4d7df);color:#713e52;font-weight:800;touch-action:manipulation}.repair-options button span{font-size:25px;line-height:1}.repair-options small{font-size:11px;line-height:1.1}@media(max-height:650px){.ballet-repair{gap:3px;padding:5px}.repair-task{padding:4px;font-size:11px}.repair-options{min-height:50px}.repair-options button{min-height:50px}.repair-options button span{font-size:20px}}
/* Watercolor movable costume details and placement feedback. */
.repair-sprite{display:block;flex:none;width:100%;height:100%;background-image:url('assets/ballet-repair-sprites.png');background-size:400% 300%;background-position:var(--sx) var(--sy);background-repeat:no-repeat;filter:drop-shadow(0 2px 2px #693d4a66);pointer-events:none}.repair-options button{touch-action:none}.repair-options button .repair-sprite{width:51px;height:51px;max-width:90%}.repair-options button.selected{outline:3px solid #f6c86a;background:#fff4cb}.repair-options small{font-size:10px}.repair-target{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:72px;height:72px;border:3px dashed #fff7c6;border-radius:50%;background:#ffdf9288;box-shadow:0 0 18px #ffefa9,inset 0 0 15px #fff5cf;color:#fff9d3;font-size:24px;z-index:4;animation:repair-target-glow 1.4s infinite alternate}.repair-target.over,.repair-target.selected{background:#7bcda5aa;box-shadow:0 0 24px #fff2a6;transform:translate(-50%,-50%) scale(1.1)}.repair-ghost{position:fixed;width:72px;height:72px;z-index:9999;pointer-events:none;transform:translate(-50%,-50%) scale(1.18)}.repair-placed{position:absolute;width:65px;height:65px;transform:translate(-50%,-50%);z-index:2;pointer-events:none;animation:repair-pop .45s ease-out}.repair-placed-thread{left:70%;top:37%;width:48px;height:48px}.repair-placed-ribbon{left:50%;top:31%}.repair-placed-shoe{left:50%;top:73%;width:76px;height:76px}.repair-placed-jewel{left:50%;top:43%;width:46px;height:46px}.repair-sparkle{position:absolute;left:var(--x);top:var(--y);z-index:5;color:#fff9c2;font-size:40px;text-shadow:0 0 8px #ffda43,0 0 18px #fff;pointer-events:none;animation:repair-sparkle .9s ease-out forwards}.repair-sparkle i,.repair-sparkle b{position:absolute;font-style:normal;font-size:25px}.repair-sparkle i{left:-28px;top:8px}.repair-sparkle b{left:32px;top:-20px}@keyframes repair-pop{from{opacity:0;transform:translate(-50%,-50%) scale(.5)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@keyframes repair-sparkle{0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}35%{opacity:1}100%{opacity:0;transform:translate(-50%,-50%) scale(1.7)}}@keyframes repair-target-glow{to{box-shadow:0 0 25px #fff6bd,inset 0 0 25px #fff9e3}}@media(prefers-reduced-motion:reduce){.repair-target,.repair-placed,.repair-sparkle{animation:none}.repair-sparkle{display:none}}@media(max-height:650px){.repair-options button .repair-sprite{width:40px;height:40px}.repair-target{width:58px;height:58px}}
/* Restore the painted spotlight stage and keep all four choices usable on mobile. */
.quest-app .game-board:has(.ballet-spotlight-grid){justify-content:center}.ballet-spotlight-grid{width:min(100%,440px);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:auto}.quest-app .ballet-spotlight-grid .spot-btn{width:100%;aspect-ratio:1;min-height:44px;padding:4px;border:2px solid #dfb1bd;border-radius:16px;background:#fff5ed;touch-action:manipulation}.quest-app .ballet-spotlight-grid .spot-btn .ballet-art{display:block;width:100%;height:100%;object-fit:cover;border-radius:11px}@media(max-height:650px){.ballet-spotlight-grid{width:min(100%,min(330px,47dvh));gap:6px}}
.quest-app .game-board:has(.ballet-bow-scene){justify-content:center}.ballet-bow-scene{width:min(100%,390px);min-height:0;display:flex;flex-direction:column;align-items:center;gap:8px}.ballet-bow-scene>img{width:min(100%,min(360px,45dvh));aspect-ratio:1;object-fit:cover;border:3px solid #e6bec8;border-radius:20px}.ballet-bow-choices{display:flex;width:100%;gap:6px}.quest-app .ballet-bow-choices .choice{flex:1;min-width:0;min-height:48px;font-size:12px}
.game-card:has(.ballet-light)>.stage-top,.game-card:has(.ballet-light)>.quest-title-row,.game-card:has(.ballet-light)>.instruction{display:none}.game-card:has(.ballet-light){padding:6px 7px 8px}.game-card:has(.ballet-light) .game-board{align-items:stretch;justify-content:flex-start;padding:0;min-height:0}.game-card:has(.ballet-light) .game-note{margin:2px 0;font-size:11px}.ballet-light{display:flex;flex:1;min-height:0;flex-direction:column;gap:5px;width:100%;padding:7px;border:1px solid #d797a7;border-radius:20px;background:#fff2eb;color:#693b4c}.ballet-light header{display:flex;justify-content:space-between;align-items:center;gap:5px;padding:6px 8px;background:#fffaf1;border-radius:12px;font-size:clamp(10px,3vw,14px)}.ballet-light header span{white-space:nowrap;font-size:11px}.ballet-light-task{margin:0;padding:6px;border-radius:10px;background:#fff9f1;font-weight:800;text-align:center;font-size:clamp(12px,3vw,15px)}.ballet-light-scene{position:relative;flex:1;min-height:130px;border:2px solid #dda4a8;border-radius:16px;background:url('assets/ballet-light-stage.jpg') center/cover;overflow:hidden;touch-action:none;isolation:isolate}.ballet-light-beam{position:absolute;left:var(--x);top:var(--y);width:min(42vw,175px);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle,var(--light) 0%,transparent 72%);filter:blur(4px);opacity:.75;mix-blend-mode:screen;pointer-events:none}.ballet-light-mark{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:58px;min-height:58px;border:2px solid #fff5d5;border-radius:16px;background:#75455ea8;color:#fff8df;text-shadow:0 1px 4px #50233e;touch-action:none}.ballet-light-mark span{font-size:28px;line-height:1}.ballet-light-mark small{font-size:10px;font-weight:800}.ballet-light-mark.done{background:#508a70d9;border-color:#d8ffd5}.ballet-light-mark.done::after{content:'✓';position:absolute;right:-5px;top:-8px;border-radius:50%;background:#fff9ce;color:#38725d;font-weight:900;padding:1px 5px}.ballet-light-status{text-align:center;font-size:12px;font-weight:800}.ballet-light-controls{display:flex;gap:5px}.ballet-light-controls button{flex:1;min-width:0;min-height:48px;border:1px solid #d7a4ad;border-radius:11px;background:#fff8f2;color:#653b50;font-size:11px;font-weight:800}.ballet-light-controls button[aria-pressed=true]{background:#f8d5dc;box-shadow:inset 0 0 0 2px #c77798}.ballet-light-controls i{display:block;width:22px;height:22px;margin:0 auto 2px;border:2px solid white;border-radius:50%;background:var(--swatch);box-shadow:0 1px 3px #865366}.ballet-light-controls .light-red{background:#fb729a}.ballet-light-controls .light-green{background:#71d282}.ballet-light-controls .light-blue{background:#72bdf4}.ballet-light-tip{margin:0;text-align:center;font-size:10px;font-weight:700}@media(max-height:650px){.ballet-light{gap:3px;padding:5px}.ballet-light-task{padding:4px;font-size:11px}.ballet-light-controls button{min-height:44px}.ballet-light-controls i{width:18px;height:18px}}
/* Compact stage navigation for the ballet quest. */
.quest-app .ballet-stage-picker{font-size:10px;font-weight:900;letter-spacing:-.3px}.ballet-episodes .wind-episode{min-height:54px}.map-view.ballet .map-top{flex-wrap:wrap}.ballet-map-picker{min-height:44px;padding:8px 14px;border:1px solid #b7778d;border-radius:12px;background:#fff7efe8;color:#69394f;font-weight:850}.map-view.ballet .ballet-map-picker{margin-left:auto}@media(max-width:400px){.quest-app .play-header:has(.ballet-stage-picker){gap:2px}.quest-app .play-header:has(.ballet-stage-picker) .tools{gap:1px}.quest-app .play-header:has(.ballet-stage-picker) .menu-exit{padding-left:7px;padding-right:7px}}
@media(max-width:400px){.quest-app .play-header:has(.ballet-stage-picker){margin-inline:-8px}}
@media(max-width:400px){.quest-app .play-header:has(.ballet-stage-picker){margin-inline:-10px}}
@media(max-width:400px){.quest-app .play-header:has(.ballet-stage-picker) .tools{transform:translateX(-4px)}}
/* Painted stage props and a visible coloured beam track the finger. */
.ballet-light-scene .ballet-light-ray{position:absolute;inset:0;z-index:2;pointer-events:none;clip-path:polygon(47% 0,53% 0,calc(var(--x) + 18%) calc(var(--y) + 8%),calc(var(--x) - 18%) calc(var(--y) + 8%));background:linear-gradient(to bottom,color-mix(in srgb,var(--light) 85%,white) 0%,color-mix(in srgb,var(--light) 65%,transparent) 50%,color-mix(in srgb,var(--light) 35%,transparent) 100%);opacity:.65;filter:blur(3px);transition:opacity .15s}.ballet-light-scene .ballet-light-beam{z-index:3;opacity:.9;background:radial-gradient(ellipse,color-mix(in srgb,var(--light) 86%,white) 0%,var(--light) 33%,transparent 72%);filter:blur(5px);mix-blend-mode:screen}.ballet-light-scene[data-light-on=false] .ballet-light-ray,.ballet-light-scene[data-light-on=false] .ballet-light-beam{opacity:0}.ballet-light-lamp{position:absolute;z-index:6;left:50%;top:0;transform:translateX(-50%);width:62px;height:62px;background:url('assets/ballet-light-props.png') 100% 50%/400% 100% no-repeat;pointer-events:none;filter:drop-shadow(0 3px 3px #4c264e99)}.ballet-light-scene .ballet-light-mark{z-index:4;width:78px;height:94px;border:0;background:transparent;text-shadow:none;box-shadow:none}.ballet-light-scene .ballet-light-prop{width:75px;height:70px;display:block;background:url('assets/ballet-light-props.png') var(--sprite) 50%/400% 100% no-repeat;filter:drop-shadow(0 4px 4px #44254a99);pointer-events:none}.ballet-light-scene .ballet-light-mark small{padding:2px 6px;border-radius:8px;background:#fff8ebea;color:#5f3450;text-shadow:none;box-shadow:0 1px 3px #46243755}.ballet-light-scene .ballet-light-mark.done{background:transparent;border:0}.ballet-light-scene .ballet-light-mark.done::after{right:1px;top:3px}.ballet-light-scene .ballet-light-mark.racers-hint{background:#fff4bd55;border-radius:25px}@media(max-height:650px){.ballet-light-scene .ballet-light-mark{width:70px;height:82px}.ballet-light-scene .ballet-light-prop{width:66px;height:60px}.ballet-light-lamp{width:52px;height:52px}}
/* Keep the named light channels distinct from their mixed colours. */
.ballet-light-controls .light-red{background:#ed202d}.ballet-light-controls .light-blue{background:#245bdc}.ballet-light-controls .light-white{background:#fffaf1}.ballet-light-controls button{font-size:clamp(9px,2.7vw,11px)}
.game-card:has(.ballet-conductor)>.stage-top,.game-card:has(.ballet-conductor)>.quest-title-row,.game-card:has(.ballet-conductor)>.instruction{display:none}.game-card:has(.ballet-conductor){padding:6px 7px 8px}.game-card:has(.ballet-conductor) .game-board{align-items:stretch;justify-content:flex-start;padding:0;min-height:0}.game-card:has(.ballet-conductor) .game-note{margin:2px 0;font-size:11px}.ballet-conductor{display:flex;flex:1;min-height:0;flex-direction:column;gap:5px;width:100%;padding:7px;border:1px solid #d797a7;border-radius:20px;background:#fff2eb;color:#693b4c}.ballet-conductor header{display:flex;justify-content:space-between;align-items:center;gap:5px;padding:6px 8px;background:#fffaf1;border-radius:12px;font-size:clamp(10px,3vw,14px)}.ballet-conductor header span{white-space:nowrap;font-size:11px}.conductor-task{margin:0;padding:6px;border-radius:10px;background:#fff9f1;font-weight:800;text-align:center;font-size:clamp(12px,3vw,15px)}.conductor-scene{position:relative;flex:1;min-height:130px;border:2px solid #dca4ac;border-radius:16px;overflow:hidden;background:#f9e2da}.conductor-scene img{width:100%;height:100%;display:block;object-fit:cover;object-position:center}.conductor-halo{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 45%,transparent 40%,#4b174622 100%)}.conductor-beats{display:flex;justify-content:center;gap:clamp(6px,2vw,14px);padding:2px}.conductor-beats span{width:29px;height:29px;display:grid;place-items:center;border:2px solid #d5a7ab;border-radius:50%;background:#f5e1da;color:#b77c91;font-size:16px}.conductor-beats span.lit,.conductor-beats span.done{background:#ffdb79;color:#ad446d;border-color:#fff4cb;box-shadow:0 0 15px #ffc848}.conductor-mode,.conductor-actions{display:flex;gap:6px}.conductor-mode button,.conductor-actions button{flex:1;min-width:0;min-height:44px;border:1px solid #d4a1ad;border-radius:11px;background:#fff8f2;color:#653b50;font-size:12px;font-weight:800}.conductor-mode button[aria-pressed=true]{background:#f4cedc;box-shadow:inset 0 0 0 2px #bd6d91}.conductor-actions [data-conductor=beat]{background:#cc7295;color:white;border-color:#a85679}.conductor-actions button:disabled,.conductor-mode button:disabled{opacity:.5}.conductor-note{margin:0;text-align:center;font-size:10px;font-weight:700}@media(max-height:650px){.ballet-conductor{gap:3px;padding:5px}.conductor-task{padding:4px;font-size:11px}.conductor-beats span{width:23px;height:23px;font-size:12px}.conductor-mode button,.conductor-actions button{min-height:44px}}
/* Keep ballet stage names beside their own markers without covering neighbours. */
.map-view.ballet .map-node{width:0}.map-view.ballet .map-node p{position:absolute;box-sizing:border-box;width:96px;max-width:30vw;right:32px;top:50%;transform:translateY(-50%);margin:0;padding:5px 4px;line-height:1.2;font-size:10px;text-align:center;overflow-wrap:normal;word-break:normal;hyphens:none}.map-view.ballet .map-node:is(.ballet-node-2,.ballet-node-5,.ballet-node-6,.ballet-node-7) p{right:auto;left:32px}.map-view.ballet .map-node:is(.ballet-node-5,.ballet-node-7) p{width:78px}
.map-view.ballet{display:grid;grid-template-rows:auto minmax(0,1fr) auto}.map-view.ballet .map-top{position:relative;gap:6px;padding:12px 14px 8px}.map-view.ballet .map-scroll{height:auto;min-height:0;padding:35px 0 65px}.map-view.ballet .map-bottom{position:relative;padding:10px 14px calc(10px + env(safe-area-inset-bottom))}
/* Keep stage markers on the painted path while labels fit beside them. */
.dino .map-node.label-left p,.dino .map-node.label-right p{width:max-content;max-width:min(138px,39vw);white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none;font-size:10px}
.detective .map-node:nth-child(n) p{font-size:10px}
.detective .map-node:is(.map-node-1,.map-node-3,.map-node-5,.map-node-7) p,.detective .map-node:is(.map-node-2,.map-node-4,.map-node-6,.map-node-8) p{position:absolute;top:50%;width:72px;margin:0;padding:4px;font-size:10px;line-height:1.15;transform:translateY(-50%);z-index:3}
.detective .map-node:is(.map-node-1,.map-node-3,.map-node-5,.map-node-7) p{right:calc(50% + 34px)}
.detective .map-node:is(.map-node-2,.map-node-4,.map-node-6,.map-node-8) p{left:calc(50% + 34px)}
.space .map-node.map-node-8 p{margin-top:5px}
.wind .map-node:is(.map-node-5,.map-node-6,.map-node-8) p{position:absolute;top:50%;width:70px;margin:0;padding:4px;font-size:10px;line-height:1.15;transform:translateY(-50%);z-index:3}
.wind .map-node.map-node-5 p{right:calc(50% + 34px)}
.wind .map-node:is(.map-node-6,.map-node-8) p{left:calc(50% + 34px)}
.wind-forge-base{pointer-events:none}
.space .map-node.map-node-8 p{margin-top:0}
.wind .map-node.map-node-6 p{width:60px}

/* Assembly already paints its shadows inside each SVG. Avoid nested offscreen filters
   and continuous brightness repaints on mobile/PWA GPU compositors. */
.quest-app .build-board .build-part svg,.quest-app .build-board .build-step svg{filter:none}
.quest-app .build-board .racers-hint{animation:none!important;filter:none!important;outline-offset:3px}

.trial-complete{min-height:85dvh;display:grid;place-items:center;padding-block:24px;text-align:center}
.trial-complete .dialog-content{max-width:540px}
.trial-complete .actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
.trial-complete h1{font-size:clamp(28px,6vw,42px)}
.trial-complete .mascot{width:100px;height:100px;object-fit:contain}

/* Courier: keep the whole portrait route available on mobile screens. */
.quest-app .game-card:has(.det-courier-route)>.stage-top,.quest-app .game-card:has(.det-courier-route)>.quest-title-row{display:none}
.quest-app .game-card:has(.det-courier-route){padding:6px 7px 8px}
.quest-app .det-fixed-board[data-detective-stage=route]{margin-top:0;gap:5px}
.quest-app .det-fixed-board[data-detective-stage=route] .det-fixed-scene{align-items:stretch}
.quest-app .det-fixed-board[data-detective-stage=route] .det-fixed-scene>.det-courier-route{width:100%;height:100%;max-width:none;max-height:none;aspect-ratio:auto;background-position:center}
.quest-app .det-fixed-board[data-detective-stage=route] .det-courier-heading,.quest-app .det-fixed-board[data-detective-stage=route] .det-courier-path{display:none}
.quest-app .det-fixed-board[data-detective-stage=route] .det-fixed-controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px}
.quest-app .det-fixed-board[data-detective-stage=route] .det-route-state{grid-column:1/-1;grid-row:1;padding:4px;margin:0}
.quest-app .det-fixed-board[data-detective-stage=route] .det-courier-controls{display:contents}
.quest-app .det-fixed-board[data-detective-stage=route] .det-courier-controls .det-btn{grid-row:2;min-height:44px;padding:5px;font-size:11px}
.quest-app .det-fixed-board[data-detective-stage=route] .det-sheet{grid-column:3;grid-row:2;order:0}
.quest-app .det-fixed-board[data-detective-stage=route] .det-sheet>summary{min-height:44px;padding:6px;display:flex;justify-content:center;align-items:center;font-size:11px}
.quest-app .det-fixed-board[data-detective-stage=route] .det-status:empty{display:none}
.quest-app .det-fixed-board[data-detective-stage=route] .det-status:not(:empty){grid-column:1/-1;height:auto;min-height:0;max-height:none;padding:4px 7px;margin:0}
.quest-app .det-courier-route .det-btn{width:76px;max-width:76px;min-height:54px;font-size:11px}
.quest-app .det-courier-route .det-btn .det-node-picture{width:52px;height:37px}

.quest-app .game-card:has(.det-courier-route)>h1{display:none}
.quest-app .det-fixed-board[data-detective-stage=route] .det-fixed-controls{grid-template-rows:auto 44px auto;align-items:stretch}
.quest-app .det-fixed-board[data-detective-stage=route] .det-courier-controls .det-btn{height:44px;min-height:44px;line-height:1.1}

.quest-app .det-fixed-board[data-detective-stage=route] .det-sheet{margin:0;min-width:0}
.quest-app .det-fixed-board[data-detective-stage=route] .det-sheet>summary{height:44px;box-sizing:border-box}

.quest-app .det-courier-route .det-route-cost{position:absolute;z-index:1;display:grid;place-items:center;transform:translate(-50%,-50%);width:27px;height:27px;border:2px solid #e7c574;border-radius:50%;background:#fff5d5;color:#173f4b;font-size:15px;line-height:1;font-weight:900;box-shadow:0 2px 4px #101d26aa;pointer-events:none}

/* Detective stage 7: a readable briefing before the investigation. */
.quest-app .game-card:has(.det-deduction)>.stage-top,.quest-app .game-card:has(.det-deduction)>.quest-title-row,.quest-app .game-card:has(.det-deduction)>h1{display:none}
.quest-app .game-card:has(.det-deduction){padding:6px 7px 8px}
.quest-app .det-fixed-board[data-detective-stage=deduction]{margin-top:0;gap:4px}
.quest-app .det-fixed-board[data-detective-stage=deduction] .det-status:empty{display:none}
.quest-app .det-fixed-board[data-detective-stage=deduction] .wind-sheet-body{inset:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));max-width:430px;height:max-content;max-height:calc(100dvh - 24px);padding:0;background:#fff9eb;border:2px solid #e5c478;overflow:auto;box-sizing:border-box}
.det-brief-art{height:clamp(65px,16dvh,125px);display:grid;place-items:center;background:linear-gradient(0deg,#102d3fc2,#102d3f22),url('assets/detective.webp') center 40%/cover;color:#ffe2a0;font-size:36px;text-shadow:0 2px 12px #000}
.det-brief-copy{padding:14px 18px 16px;color:#234b4a}.det-brief-kicker{font-size:10px;letter-spacing:.13em;font-weight:900;color:#9b6b20}.det-brief-copy h2{margin:4px 0 8px;font-size:clamp(22px,6vw,28px);line-height:1.1;color:#183e48}.det-brief-copy .det-brief-lead{margin:0;font-size:15px;line-height:1.4;font-weight:750}.det-brief-steps{display:grid;gap:4px;margin:10px 0;padding:9px 12px;border-radius:12px;background:#e9f1e4;font-size:14px;font-weight:800}.det-brief-tip{margin:0 0 10px;font-size:13px;line-height:1.35}.det-brief-copy .det-brief-start{width:100%;min-height:48px;background:#205e55;color:#fff8df;font-size:16px}

/* Detective investigation: use the portrait screen as a complete case board. */
.quest-app .det-fixed-board[data-detective-stage=deduction] .det-fixed-scene{align-items:stretch;overflow:auto;border-radius:15px}
.quest-app .det-fixed-board[data-detective-stage=deduction] .det-deduction{box-sizing:border-box;min-height:100%;display:flex;flex-direction:column;gap:5px;padding:7px;border:2px solid #a77c38;border-radius:15px;background:linear-gradient(#102e3ee8,#173d4ceF),url('assets/detective-room.webp') center/cover;color:#fff8e8;box-shadow:inset 0 0 0 1px #e8ce88}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-header{padding:3px 5px;color:#f6dfaa;letter-spacing:.02em}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-facts{margin:0;padding:6px 8px;border:1px solid #d7b874;background:#fff9e9;box-shadow:none;color:#203f43}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-fact{min-height:44px;font-size:12px;line-height:1.2}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-title{margin:2px 3px 0!important;color:#fce5b2}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-people{flex:1;grid-auto-rows:minmax(86px,1fr);gap:5px}
.quest-app .det-fixed-board[data-detective-stage=deduction] .det-deduction-people .det-btn{min-height:86px;padding:7px;background:linear-gradient(150deg,#fffaf0,#f2e4c9);border:1px solid #d2ae68;border-radius:12px;color:#21414a;box-shadow:0 2px 5px #061a2780}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-people .det-btn strong{color:#174b4a;font-size:12px}.det-fixed-board[data-detective-stage=deduction] .det-deduction-people .det-btn>span{font-size:11px;line-height:1.25}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-avatar{background:#d8ebe0;box-shadow:0 0 0 1px #b0caba}
@media(max-height:650px){
 .det-fixed-board[data-detective-stage=deduction] .det-deduction{gap:3px;padding:5px}
 .det-fixed-board[data-detective-stage=deduction] .det-deduction-facts{padding:4px 6px}
 .det-fixed-board[data-detective-stage=deduction] .det-deduction-fact{min-height:40px;font-size:11px}
 .det-fixed-board[data-detective-stage=deduction] .det-deduction-people{grid-auto-rows:minmax(72px,1fr);gap:4px}
 .quest-app .det-fixed-board[data-detective-stage=deduction] .det-deduction-people .det-btn{min-height:72px;padding:5px}
 .det-fixed-board[data-detective-stage=deduction] .det-deduction-people .det-btn strong{font-size:11px;margin-bottom:2px}
 .det-fixed-board[data-detective-stage=deduction] .det-deduction-people .det-btn>span{font-size:10px;line-height:1.2}
 .det-fixed-board[data-detective-stage=deduction] .det-deduction-avatar{width:18px;height:18px}
}

/* Detective: a modern investigation desk with tactile evidence and portraits. */
.quest-app .det-fixed-board[data-detective-stage=deduction] .det-deduction{background:linear-gradient(#08273560,#082735a0),url('assets/detective-investigation-desk-modern.webp') center/cover;border:1px solid #6eb0ad;box-shadow:inset 0 0 0 1px #d2e9e555;gap:5px;padding:6px}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-header{color:#f9fbf6;padding:3px 5px;text-shadow:0 1px 5px #00262a}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-facts{background:#eef6f2f5;border:0;border-radius:12px;color:#163e45;padding:6px}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-facts h3{display:flex;justify-content:space-between;align-items:center;margin:0 3px 3px;color:#164c50}
.det-deduction-facts h3 small{font-size:10px;font-weight:600;color:#456b6b}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-fact{position:relative;display:flex;gap:6px;min-height:40px;border-top:1px solid #c6dbd5;font-size:12px;cursor:pointer}
.det-deduction-fact input{position:absolute!important;width:1px!important;height:1px!important;opacity:0}
.det-clue-seal{display:grid;place-items:center;flex:none;width:27px;height:27px;border-radius:9px;background:#d1e9df;color:#176454;font-weight:900}
.det-clue-text{flex:1}.det-clue-mark{display:grid;place-items:center;flex:none;width:22px;height:22px;border-radius:50%;border:1px solid #9cbbb2;color:transparent;font-weight:900}
.det-deduction-fact input:checked~.det-clue-seal{background:#237b68;color:white}.det-deduction-fact input:checked~.det-clue-mark{background:#237b68;color:white;border-color:#237b68}.det-deduction-fact input:focus-visible~.det-clue-seal{outline:3px solid #f1b93f;outline-offset:2px}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-title{color:#f6ffff;text-shadow:0 1px 4px #001e25}
.quest-app .det-fixed-board[data-detective-stage=deduction] .det-deduction-people .det-btn{display:flex;align-items:stretch;gap:6px;text-align:left;padding:5px;min-height:78px;border-radius:12px;background:#f6faf6f7;color:#173d45;border:1px solid #b9d7cc;box-shadow:0 2px 6px #001a2580}
.det-dossier-portrait{display:block;flex:0 0 35%;min-width:0;border-radius:8px;background-size:200% 200%;background-repeat:no-repeat}
.det-dossier-portrait.portrait-0{background-position:0 0}.det-dossier-portrait.portrait-1{background-position:100% 0}.det-dossier-portrait.portrait-2{background-position:0 100%}.det-dossier-portrait.portrait-3{background-position:100% 100%}
.det-dossier-info{display:flex;min-width:0;flex:1;flex-direction:column;justify-content:center;gap:3px}.det-dossier-info strong{display:block;font-size:11px;line-height:1.15;color:#134f50}.det-dossier-info>span{display:block;font-size:10px;line-height:1.18;font-weight:600}
@media(max-height:650px){.quest-app .det-fixed-board[data-detective-stage=deduction] .det-deduction{gap:3px;padding:5px}.det-fixed-board[data-detective-stage=deduction] .det-deduction-fact{min-height:38px;font-size:11px}.det-clue-seal{width:23px;height:23px}.det-clue-mark{width:19px;height:19px}.quest-app .det-fixed-board[data-detective-stage=deduction] .det-deduction-people .det-btn{min-height:72px;padding:4px;gap:4px}.det-dossier-portrait{flex-basis:30%}.det-dossier-info strong{font-size:10px}.det-dossier-info>span{font-size:9px}}
.det-fixed-board[data-detective-stage=deduction] .det-deduction-people .det-btn>.det-dossier-info{display:flex;flex-direction:column;justify-content:center}
.det-dossier-portrait{background-size:cover;background-position:center!important}
.det-person-overlay{position:fixed;z-index:1400;inset:0;display:grid;place-items:center;padding:18px;background:#061f2bd9;backdrop-filter:blur(4px)}
.det-person-sheet{box-sizing:border-box;width:min(100%,390px);max-height:calc(100dvh - 36px);overflow:auto;padding:20px;border-radius:20px;background:#f4faf5;border:2px solid #81b9aa;color:#19464c;box-shadow:0 18px 60px #00182388}
.det-person-caption{font-size:10px;font-weight:900;letter-spacing:.12em;color:#427a72}.det-person-sheet h2{font-size:24px;line-height:1.15;margin:5px 0 10px}.det-person-sheet p{font-size:14px;margin:0 0 8px}.det-person-sheet ul{list-style:none;margin:0 0 16px;padding:0;display:grid;gap:5px}.det-person-sheet li{padding:9px 11px;border-radius:9px;background:#dceee5;font-size:14px;font-weight:700}.det-person-actions{display:flex;gap:8px}.quest-app .det-person-actions .det-btn{flex:1;min-height:48px;padding:8px}.quest-app .det-person-actions [data-det=person]{background:#227864;color:white}
.det-dossier-info strong{font-size:12px!important}.det-dossier-info>span{font-size:11px!important;color:#48776f}.det-dossier-portrait{flex-basis:48%!important}
.quest-app .det-fixed-board[data-detective-stage=deduction] .det-brief-art{background-image:linear-gradient(0deg,#102d3f99,#102d3f11),url("assets/detective-investigation-desk-modern.webp");background-position:center 18%}
.det-dossier-portrait{align-self:center;aspect-ratio:1;flex:0 0 48%;background-size:200% 200%}
.det-dossier-portrait.level-0{background-image:url('assets/detective-investigation-cast-0.webp')}.det-dossier-portrait.level-1{background-image:url('assets/detective-investigation-cast-1.webp')}.det-dossier-portrait.level-2{background-image:url('assets/detective-investigation-cast-2.webp')}
.det-dossier-portrait.portrait-0{background-position:0 0!important}.det-dossier-portrait.portrait-1{background-position:100% 0!important}.det-dossier-portrait.portrait-2{background-position:0 100%!important}.det-dossier-portrait.portrait-3{background-position:100% 100%!important}
.det-clue-seal{background-image:url('assets/detective-investigation-clues.webp');background-size:300% 300%;box-shadow:0 0 0 1px #9bbfb4}
.det-clue-seal.clue-col-0{background-position-x:0}.det-clue-seal.clue-col-1{background-position-x:50%}.det-clue-seal.clue-col-2{background-position-x:100%}.det-clue-seal.clue-row-0{background-position-y:0}.det-clue-seal.clue-row-1{background-position-y:50%}.det-clue-seal.clue-row-2{background-position-y:100%}
.det-deduction-fact input:checked~.det-clue-seal{box-shadow:0 0 0 2px #237b68}
@media(min-height:651px){
 .quest-app .det-fixed-board[data-detective-stage=deduction] .det-deduction-people .det-btn{flex-direction:column;align-items:stretch;justify-content:center;gap:3px}
 .det-dossier-portrait{width:min(100%,125px);flex:0 0 auto!important;margin:0 auto}
 .det-fixed-board[data-detective-stage=deduction] .det-deduction-people .det-btn>.det-dossier-info{display:block;text-align:center}
 .det-dossier-info>span{display:inline-block!important}
}

/* The case file turns over into an illustrated modern dossier. */
.det-person-overlay{perspective:1200px}
.det-person-flip{position:relative;width:min(100%,390px);max-height:calc(100dvh - 36px);display:grid;transform-style:preserve-3d;animation:det-dossier-flip .55s cubic-bezier(.22,.7,.24,1) both}
.det-person-cover,.det-person-sheet{grid-area:1/1;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.det-person-cover{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:350px;box-sizing:border-box;border:1px solid #95c9c1;border-radius:20px;background:linear-gradient(#0a324bd9,#0d4351e8),url('assets/detective-investigation-desk-modern.webp') center/cover;color:#fff;font-size:19px}
.det-person-cover-art{width:130px!important;flex:none!important;aspect-ratio:1;border:3px solid #f4faf4;border-radius:16px;box-shadow:0 8px 24px #001b2970}
.det-person-cover small{font-size:12px;color:#d6efe8}
.det-person-sheet{transform:rotateY(180deg);width:100%;max-height:calc(100dvh - 36px);padding:16px;border:1px solid #97ccc1;border-radius:20px;background:linear-gradient(#effaf6ef,#f5faf5f5),url('assets/detective-investigation-desk-modern.webp') center/cover;box-shadow:0 20px 60px #001b2988}
.det-person-heading{display:flex;align-items:center;gap:12px;padding:7px;margin:-4px -4px 12px;border-radius:14px;background:#dcefe7}
.det-person-photo{width:82px!important;min-width:82px;flex:none!important;aspect-ratio:1;border-radius:11px;box-shadow:0 2px 8px #133b3d44}
.det-person-heading h2{font-size:clamp(19px,5.8vw,24px);margin:5px 0 0}.det-person-caption{color:#287566}
.det-person-sheet li{position:relative;padding:10px 12px 10px 30px;background:#e0f0e9}.det-person-sheet li:before{content:'✦';position:absolute;left:10px;color:#378976}
@keyframes det-dossier-flip{from{transform:rotateY(0deg) scale(.93)}to{transform:rotateY(180deg) scale(1)}}
@media(prefers-reduced-motion:reduce){.det-person-flip{animation:none;transform:rotateY(180deg)}}
/* Full paid-quest map previews only; gameplay remains restricted server-side. */
.trial-map .trial-locked{opacity:1}.trial-map .trial-locked .island{background:#f3e6c9ee;border-color:#b49b6c;color:#816c45;box-shadow:0 3px 10px #49392225}.map-padlock{width:24px;height:28px;display:block;margin:auto}.trial-map .trial-locked p{color:#3c5247;background:#fff8e5ef;padding:5px 8px;border-radius:10px;font-size:12px;line-height:1.35}.trial-map-note{position:absolute;z-index:4;top:82px;left:50%;transform:translateX(-50%);width:min(90%,590px);background:#fff8e9f5;border:1px solid #d8c394;border-radius:14px;color:#4e614d;text-align:center;padding:9px 14px;font-size:13px;font-weight:750;line-height:1.45;pointer-events:none}.trial-map .map-bottom{z-index:5}@media(max-width:600px){.trial-map-note{top:87px;padding:8px 11px;font-size:11px}.trial-map .map-top h2{font-size:17px}.trial-map .trial-locked p{font-size:11px}}
/* Trial explanation occupies its own row; it must never cover map labels or controls. */
.map-view.trial-map{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto}
.map-view.trial-map .map-top{position:relative;padding:12px 16px 8px;gap:7px;background:#fff3dfed}
.map-view.trial-map .trial-map-note{position:relative;inset:auto;transform:none;width:auto;margin:0 12px 8px;padding:8px 12px;font-size:12px}
.map-view.trial-map .map-scroll{height:auto;min-height:0;padding:35px 0 55px;overflow:auto}
.map-view.trial-map .map-bottom{position:relative;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#fff3dfed;gap:8px}
.map-view.trial-map .map-bottom .mascot{width:38px;height:38px}
.map-view.trial-map .map-bottom .btn{white-space:normal;max-width:230px;min-height:48px}
/* Compact winter maps put captions beside each stop, keeping the painted coordinates. */
.trial-map:is(.noel,.winterlight) .map-node{width:0}
.trial-map:is(.noel,.winterlight) .map-node .island{width:44px;height:44px;font-size:20px;flex-shrink:0}
.trial-map:is(.noel,.winterlight) .map-node p{position:absolute;top:50%;transform:translateY(-50%);width:90px;max-width:90px;padding:4px 5px;margin:0;font-size:10px;line-height:1.2}
.trial-map:is(.noel,.winterlight) :is(.map-node-1,.map-node-3,.map-node-5,.map-node-7) p{left:28px}
.trial-map:is(.noel,.winterlight) :is(.map-node-2,.map-node-4,.map-node-6,.map-node-8) p{right:28px}

/* Stage 8: reconstruct the observatory recording. */
.quest-app .game-card:has(.det-timeline)>.stage-top,.quest-app .game-card:has(.det-timeline)>.quest-title-row,.quest-app .game-card:has(.det-timeline)>h1{display:none}
.quest-app .game-card:has(.det-timeline){padding:6px 7px 8px}
.quest-app .det-fixed-board[data-detective-stage=timeline]{margin:0;gap:5px}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-fixed-scene{padding:6px;border:1px solid #8fc4ba;border-radius:15px;background:linear-gradient(#09293999,#092939cc),url('assets/detective-investigation-desk-modern.webp') center/cover;overflow:hidden}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline{display:grid;grid-template-rows:repeat(5,minmax(0,1fr));gap:5px;height:100%;width:100%;padding:0;margin:0;max-height:none;list-style:none}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline li{min-height:0;position:relative}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline .det-btn{display:flex;align-items:center;gap:8px;width:100%;height:100%;min-height:44px;padding:4px 6px;background:#f2faf7f5;color:#173e46;border:1px solid #a4d0c1;border-radius:11px;box-shadow:0 2px 5px #001d2b77;font-size:clamp(12px,3.5vw,15px);line-height:1.18;text-align:left}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline .det-btn b{display:grid;place-items:center;flex:0 0 25px;width:25px;height:25px;background:#1e786c;color:#fff;border-radius:50%;font-size:13px}
.det-film-still{display:block;flex:none;align-self:stretch;width:clamp(57px,18vw,85px);border-radius:7px;background-image:url('assets/detective-timeline-stills.webp');background-size:200% 300%;background-repeat:no-repeat;box-shadow:0 0 0 1px #749a95}
.det-film-still.still-storm{background-position:0 0}.det-film-still.still-window{background-position:100% 0}.det-film-still.still-power{background-position:0 50%}.det-film-still.still-move{background-position:100% 50%}.det-film-still.still-signal{background-position:0 100%}
.det-film-label{flex:1;min-width:0;font-weight:850}.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline .det-btn i{flex:none;font-size:19px;color:#57817a}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline .det-btn.selected{outline:3px solid #ffd06b;outline-offset:-3px;background:#fff7d9}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-fixed-controls{display:grid;grid-template-columns:1fr 1fr 1.35fr 1fr;gap:4px}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-toolbar{display:contents}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-toolbar .det-btn{min-height:44px;padding:4px;font-size:10px;line-height:1.1}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-sheet{grid-column:4;grid-row:1;margin:0;min-width:0}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-sheet>summary{height:44px;min-height:44px;padding:4px;box-sizing:border-box;font-size:10px}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-status:empty{display:none}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-status:not(:empty){grid-column:1/-1;height:auto;min-height:0;max-height:none;margin:0;padding:5px 8px;font-size:11px}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline-brief{inset:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));width:auto;max-width:430px;height:max-content;max-height:calc(100dvh - 24px);box-sizing:border-box;padding:18px;border:1px solid #91c8b8;background:linear-gradient(#eff9f6f2,#f5fbf7f8),url('assets/detective-investigation-desk-modern.webp') center/cover;color:#183f45}
.det-timeline-brief h2{clear:none;margin:2px 0 8px;color:#124f51;font-size:24px;line-height:1.1}.det-timeline-brief>p{font-size:14px;line-height:1.4}.det-timeline-brief .det-notes{padding:10px;border-radius:12px;background:#dcefe7}.det-timeline-brief .det-notes h3{margin:0 0 5px;font-size:15px}.det-timeline-brief .det-notes p{margin:6px 0;font-size:13px;line-height:1.3}.quest-app .det-timeline-brief>[data-det=close-help]{position:static;float:none;display:block;width:100%;min-height:44px;margin:0 0 12px;background:#207460;color:#fff}
@media(max-height:650px){.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline .det-btn{gap:5px;font-size:11px}.det-film-still{width:56px}.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline-brief{padding:13px}.det-timeline-brief h2{font-size:21px}.det-timeline-brief>p{font-size:13px;line-height:1.3}}
@media(prefers-reduced-motion:reduce){.det-fixed-board[data-detective-stage=timeline] .det-timeline li{transition:none}}
/* Preserve the painted frame proportions when the cards grow vertically. */
.det-film-still{background-size:auto 300%}
.det-film-still.still-storm,.det-film-still.still-power,.det-film-still.still-signal{background-position-x:16%}
.det-film-still.still-window,.det-film-still.still-move{background-position-x:84%}
/* A luminous story strip, not a form list. */
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline .det-btn{background:linear-gradient(105deg,#103f4ef5,#122f43ef);color:#f7fbf3;border-color:#69a9a5;box-shadow:0 2px 7px #001622a0}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline .det-btn b{background:#f5cd7b;color:#183d44}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline .det-btn i{color:#9ed5ca}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline .det-btn.selected{background:#d8eee4;color:#103f45}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-timeline li.drag-target .det-btn{background:#d8eee4;color:#103f45}
@media(max-height:650px){.det-film-still{width:72px}}
.quest-app .det-timeline-brief>[data-det=close-help]{margin:12px 0 0}
.det-timeline-brief .det-notes p{display:flex;align-items:center;gap:9px;margin:0;padding:6px 0;border-bottom:1px solid #b9d8ce}
.det-timeline-brief .det-notes p:last-child{border-bottom:0}
.det-note-picture{display:block;flex:none;width:54px;height:43px;border-radius:7px;background-image:url('assets/detective-timeline-stills.webp');background-size:auto 300%;background-repeat:no-repeat;box-shadow:0 0 0 1px #88b4aa}
.det-note-picture.still-window{background-position:84% 0}.det-note-picture.still-power{background-position:16% 50%}.det-note-picture.still-signal{background-position:16% 100%}
@media(max-height:650px){.det-timeline-brief .det-notes p{padding:4px 0;gap:7px}.det-note-picture{width:48px;height:38px}}
.det-timeline-brief .det-notes h3{font-family:Georgia,'Noto Serif',serif;font-weight:700;font-size:16px;color:#194c4b}
.det-timeline-brief .det-notes p{font-family:Georgia,'Noto Serif',serif;font-weight:400;font-size:14px;line-height:1.3;letter-spacing:.01em;color:#173f43}

/* Stage 8 controls match the observatory's illuminated recording console. */
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-toolbar .det-btn,
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-sheet>summary{background:linear-gradient(160deg,#205e69,#123b50);border:1px solid #78b6ac;border-radius:11px;color:#f4fbf5;font-weight:850;box-shadow:inset 0 1px #ffffff35,0 2px 5px #102f3b45}
.quest-app .det-fixed-board[data-detective-stage=timeline] .det-toolbar [data-det=check]{background:linear-gradient(150deg,#f9df9e,#e5b858);border-color:#f5d88d;color:#213e42;box-shadow:inset 0 1px #fff8d1,0 2px 6px #19374355}
.quest-app .det-fixed-board[data-detective-stage=timeline] :is(.det-toolbar .det-btn,.det-sheet>summary):focus-visible{outline:3px solid #f6c65f;outline-offset:2px}
.quest-app .det-fixed-board[data-detective-stage=timeline] :is(.det-toolbar .det-btn,.det-sheet>summary):active{filter:brightness(1.15);transform:translateY(1px)}

/* A consistent briefing for each detective activity, with optional game-specific aids. */
.quest-app .det-fixed-board .det-generic-brief{inset:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));width:auto;max-width:430px;height:max-content;max-height:calc(100dvh - 24px);box-sizing:border-box;padding:0;background:#fff9eb;border:2px solid #e5c478;overflow:auto}
.det-generic-brief .det-brief-art{height:clamp(58px,14dvh,110px);background-position:center;background-size:cover}
.det-generic-brief .det-brief-copy{padding:13px 17px 16px}.det-generic-brief .det-brief-story{margin:9px 0;font-size:13px;line-height:1.35;color:#335b57}
.det-brief-extra{margin:8px 0;border-radius:10px;background:#e9f1e4}.det-brief-extra>summary{min-height:44px;display:flex;align-items:center;padding:8px 10px;font-size:13px;font-weight:800;cursor:pointer}.det-brief-extra-body{padding:0 10px 10px;font-size:13px}.det-brief-extra-body img,.det-brief-extra-body svg{max-width:100%}
.quest-app .det-generic-brief .det-brief-start{position:static;float:none;display:block;width:100%;min-height:48px;margin:10px 0 0;background:#205e55;color:#fff8df}
@media(max-height:650px){.det-generic-brief .det-brief-art{height:55px}.det-generic-brief .det-brief-copy{padding:10px 14px 12px}.det-generic-brief .det-brief-copy h2{font-size:21px}.det-generic-brief .det-brief-copy .det-brief-lead{font-size:14px;line-height:1.3}.det-generic-brief .det-brief-story{font-size:12px;line-height:1.3;margin:7px 0}}
.quest-app .det-fixed-board .det-sheet>summary{min-height:44px}

/* The keeper's modern code terminal: a painted dial and live alphabet rings. */
.quest-app .game-card:has(.det-cipher)>.stage-top,.quest-app .game-card:has(.det-cipher)>.quest-title-row,.quest-app .game-card:has(.det-cipher)>h1{display:none}
.quest-app .game-card:has(.det-cipher){padding:6px 7px 8px}
.quest-app .det-fixed-board[data-detective-stage=cipher]{margin:0;gap:5px}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-fixed-scene{align-items:stretch;overflow:auto;border-radius:15px}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-cipher{box-sizing:border-box;display:grid;align-content:space-between;grid-template-columns:minmax(120px,52%) minmax(0,1fr);grid-template-rows:auto minmax(36px,1fr) auto auto auto;gap:6px;padding:9px;width:100%;height:100%;min-height:0;max-height:none;border:1px solid #70b2ae;border-radius:15px;background:linear-gradient(#082d3c88,#082d3caa),url('assets/detective-cipher-workbench.webp') center/cover;color:#f5fbf6;box-shadow:inset 0 0 0 1px #c1ebe82b}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-cipher-head{grid-column:1/-1;grid-row:1;display:flex;justify-content:space-between;gap:5px;color:#d6f2e8;font-size:12px}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-cipher-head span{font-size:10px;color:#c4dedc}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-disk{grid-column:1;grid-row:2/4;position:relative;display:block;align-self:center;justify-self:center;width:min(100%,210px);height:auto;aspect-ratio:1;margin:0;border:0;border-radius:50%;background:transparent url('assets/detective-cipher-wheel.webp') center/contain no-repeat;box-shadow:0 6px 16px #001722a8;touch-action:none;cursor:grab}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-disk:before,.quest-app .det-fixed-board[data-detective-stage=cipher] .det-disk:after{display:none}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-disk.is-dragging{cursor:grabbing}
.det-wheel{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.det-wheel text{fill:#fff9de;stroke:#12323c;stroke-width:.7px;paint-order:stroke;dominant-baseline:central;text-anchor:middle;font:800 8px Nunito,sans-serif}.det-wheel-inner{transform-origin:110px 110px;transform:rotate(var(--turn,0deg));transition:transform .18s ease}.det-disk.is-dragging .det-wheel-inner{transition:none}
.det-disk-center{position:absolute;inset:37%;display:flex;align-items:center;justify-content:center;gap:3%;border-radius:50%;color:#f9e9aa;text-shadow:0 1px 5px #001d2a;pointer-events:none}.quest-app .det-fixed-board[data-detective-stage=cipher] .det-disk-center span,.quest-app .det-fixed-board[data-detective-stage=cipher] .det-disk-center b{position:static;color:inherit;font-size:clamp(15px,5vw,26px);line-height:1}.det-disk-center i{font-style:normal;color:#8cddd5;font-size:12px}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-key{grid-column:2;grid-row:2;align-self:end;margin:0;padding:8px 5px;border-radius:10px;background:#edf8f1ed;color:#17434b;font-size:clamp(12px,3.5vw,15px);line-height:1.2;text-align:center}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-toolbar{grid-column:2;grid-row:3;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:3px;margin:0}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-toolbar .det-btn{width:44px;min-width:44px;max-width:44px;min-height:44px;padding:0;background:#245e68;color:#fff;border:1px solid #8bcac1;font-size:21px}.quest-app .det-fixed-board[data-detective-stage=cipher] .det-toolbar strong{min-width:0;white-space:normal;color:#e1f8ed;font-size:10px;line-height:1.1}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-cipher-word{grid-column:1/-1;grid-row:4;margin:0;padding:6px;border:1px solid #8dc9bf;border-radius:12px;background:#eaf8f2f2;text-align:center;color:#194950}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-cipher-word>span{font-size:11px;color:#40736f}.quest-app .det-fixed-board[data-detective-stage=cipher] .det-code{margin:2px 0;color:#154d59;font-size:clamp(20px,6vw,27px);line-height:1.1;letter-spacing:.12em}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-cipher-pairs{display:flex;justify-content:center;flex-wrap:nowrap;gap:4px}.quest-app .det-fixed-board[data-detective-stage=cipher] .det-cipher-pairs span{min-width:0;flex:1;padding:3px;border-radius:8px;background:#cfeae0;color:#184b4c;font-size:16px;line-height:1.05}.quest-app .det-fixed-board[data-detective-stage=cipher] .det-cipher-pairs i{font-size:10px}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-answer-form{grid-column:1/-1;grid-row:5;display:flex;flex-wrap:nowrap;align-items:end;gap:6px;margin:0}.quest-app .det-fixed-board[data-detective-stage=cipher] .det-answer-form label{min-width:0;flex:1;color:#f5fbf6;font-size:12px;line-height:1.1}.quest-app .det-fixed-board[data-detective-stage=cipher] .det-answer-form input{width:100%;min-height:44px;margin-top:3px;padding:6px 9px;background:#fffdf3;color:#17434b;font-size:16px}.quest-app .det-fixed-board[data-detective-stage=cipher] .det-answer-form>.det-btn{flex:0 0 auto;min-width:88px;min-height:44px;padding:5px 9px;background:#f5ce76;border-color:#f8e2a9;color:#143f44;font-size:13px}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-fixed-controls .det-status:empty{display:none}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-fixed-controls .det-status:not(:empty){height:auto;min-height:0;max-height:none;margin:0;padding:4px 8px;font-size:11px}
@media(prefers-reduced-motion:reduce){.det-wheel-inner{transition:none}}
.quest-app .det-fixed-board[data-detective-stage=cipher] .det-disk-center i{position:static;color:#8cddd5;font-style:normal;line-height:1}
.det-disk .det-wheel-rotor{position:absolute;inset:0;display:block;border-radius:50%;background:url('assets/detective-cipher-wheel.webp') center/contain no-repeat;mask-image:radial-gradient(circle closest-side,transparent 0 42%,#000 43% 72%,transparent 73%);-webkit-mask-image:radial-gradient(circle closest-side,transparent 0 42%,#000 43% 72%,transparent 73%);transform:rotate(var(--turn,0deg));transition:transform .18s ease;pointer-events:none;z-index:0}
.det-disk.is-dragging .det-wheel-rotor{transition:none}.det-disk .det-wheel{z-index:1}.det-disk .det-disk-center{z-index:2}
@media(prefers-reduced-motion:reduce){.det-disk .det-wheel-rotor{transition:none}}

/* Detective search: the painting is the field, not a square inside empty chrome. */
.quest-app .game-card:has(.det-search-board)>.stage-top,.quest-app .game-card:has(.det-search-board)>.quest-title-row,.quest-app .game-card:has(.det-search-board)>h1{display:none}
.quest-app .game-card:has(.det-search-board){padding:5px;border-radius:18px;background:#14383f;border:1px solid #86aea1;box-shadow:inset 0 1px #fff3}
.quest-app .det-fixed-board.det-search-board{margin:0;padding:0;gap:5px;grid-template-rows:minmax(0,1fr) auto}
.quest-app .det-search-board .det-fixed-scene{overflow:hidden;align-items:stretch;border-radius:13px}
.quest-app .det-search-board .det-fixed-scene>.det-search-scene{display:grid;grid-template-rows:52px minmax(0,1fr);width:100%;height:100%;max-width:none;max-height:none;aspect-ratio:auto;margin:0;border:0;border-radius:13px;background:#14333d;box-shadow:none;overflow:hidden}
.det-search-head{display:flex;justify-content:space-between;align-items:center;gap:4px;padding:3px 5px 4px 10px;background:linear-gradient(110deg,#244a50,#14343e);color:#fff2cf;z-index:2;min-width:0}
.det-search-head>div:first-child{min-width:0}.det-search-head small{display:block;font-size:8px;line-height:1.3;letter-spacing:.08em;color:#abd1c2;font-weight:800}.det-search-head strong{display:block;font-size:clamp(12px,3.6vw,17px);line-height:1.2;font-weight:900;margin-top:3px;white-space:normal;text-wrap:balance}
.det-search-tools{display:flex;align-items:center;gap:3px;flex-shrink:0}.quest-app .det-search-board .det-search-tool{box-sizing:border-box;display:grid;place-items:center;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border-radius:13px;border:1px solid #86b3aa66;background:linear-gradient(145deg,#406665,#24464b);color:#fff0bd;font-size:23px;line-height:1;box-shadow:inset 0 1px #cbe0cc33,0 2px 4px #071e2533}
.det-search-tool svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7}.det-search-tool [data-search-zoom]{font-size:21px}.det-search-tool:focus-visible,.det-search-capture:focus-visible{outline:3px solid #fff1ab;outline-offset:-4px}
.det-search-viewport{position:relative;min-width:0;min-height:0;overflow:hidden;background:#16323c;touch-action:none}
.quest-app .det-search-board canvas.det-scene{display:block;width:100%;height:100%;max-height:none;aspect-ratio:auto;touch-action:none;border-radius:0;cursor:grab;outline-offset:-3px}.det-search-viewport.is-dragging canvas.det-scene{cursor:grabbing}
.det-search-count{position:absolute;top:10px;left:10px;display:flex;gap:10px;align-items:center;padding:6px 10px;border-radius:22px;background:#102d3dd9;box-shadow:0 2px 8px #08192144;border:1px solid #fff1bd55;color:#e0ebdc;font-size:11px;font-weight:700;pointer-events:none}.det-search-count b{color:#ffe4a5;font-size:12px;letter-spacing:.05em}
.det-search-gesture{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);white-space:nowrap;max-width:95%;padding:6px 10px;border-radius:20px;color:#fff2ce;background:#102e3bd9;font-size:11px;font-weight:750;pointer-events:none;transition:opacity .2s}.is-dragging .det-search-gesture{opacity:0}
.quest-app .det-search-board .det-search-capture{position:absolute;bottom:10px;left:12px;width:calc(100% - 24px);height:48px;min-height:48px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:10px;padding:6px 8px;border-radius:15px;background:linear-gradient(120deg,#f8dfa0,#e7bb62);color:#173c40;border:1px solid #fff2c3;box-shadow:inset 0 1px #fff9,0 4px 14px #041f3155;font-size:15px;font-weight:900;line-height:1.2}
.det-search-capture>span{font-size:24px;font-weight:400}.det-search-viewport:has(.det-search-capture) .det-search-gesture{bottom:66px}
.quest-app .det-search-board .det-fixed-controls{display:block;position:relative;min-height:0;gap:0}
.quest-app .det-search-board .det-fixed-controls .det-search-evidence{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:0;padding:0;list-style:none}
.quest-app .det-search-board .det-fixed-controls .det-micro-evidence{grid-template-columns:repeat(3,minmax(0,1fr))}
.quest-app .det-search-board .det-fixed-controls .det-search-evidence li{position:relative;min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:12px;background:none;box-shadow:none}
.det-clue-card{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;height:84px;min-height:84px;margin:0;padding:4px 2px 5px;border:1px solid #bda97580;border-radius:12px;background:linear-gradient(145deg,#29474a,#19383e);color:#f7eacb;box-shadow:inset 0 1px #fff2;font:800 11px/1.1 Nunito,sans-serif;cursor:pointer;touch-action:manipulation}
.det-clue-card:focus-visible{outline:3px solid #ffc857;outline-offset:-3px}.det-clue-card:active{filter:brightness(1.06)}
.det-search-object{display:grid;grid-template-rows:minmax(0,1fr);place-items:center;width:min(100%,54px);height:54px;min-height:54px;flex:none;overflow:hidden;border-radius:9px;background:radial-gradient(ellipse at 50% 25%,#fffaf0,#e8ddbc);color:#986423;font-size:35px;line-height:1}.det-search-object img{width:100%;height:100%;min-width:0;min-height:0;object-fit:contain;display:block;pointer-events:none}.det-clue-card[data-clue=key] img,.det-clue-card[data-clue=letter] img{object-fit:cover}.det-search-object-name{max-width:100%;font-size:inherit;line-height:1.15;color:inherit!important}
.quest-app .det-search-board .det-fixed-controls .det-search-evidence .det-evidence-mark{display:none;position:absolute;right:2px;top:2px;width:20px;height:20px;place-items:center;border-radius:50%;background:#e6f5d7;border:1px solid #69ac80;color:#1a6348;font-size:14px;line-height:1;box-shadow:0 2px 4px #001b3055}
.quest-app .det-search-board .det-search-evidence li.is-found .det-clue-card{background:linear-gradient(135deg,#326653,#204b45);border-color:#90d1a7;color:#d6f6dc}.quest-app .det-search-board .det-search-evidence li.is-found .det-evidence-mark{display:grid}.det-search-evidence .is-new{animation:det-found-pop .65s ease-out}
.quest-app .det-search-board .det-fixed-controls>.det-sheet{margin:0;min-height:0}.quest-app .det-search-board .det-sheet>summary{display:none}
.quest-app .det-search-board .det-fixed-controls>.det-status{display:none;position:absolute;z-index:4;bottom:calc(100% + 12px);left:10px;right:10px;height:auto;min-height:0;max-height:none;margin:0;padding:10px 12px;border:1px solid #e2dbb5;border-radius:13px;background:#fff6ddf5;box-shadow:0 5px 18px #031c2c66;color:#254943;font-size:12px;line-height:1.3;font-weight:750;pointer-events:none}
.quest-app .det-search-board.has-search-message .det-fixed-controls>.det-status:not(:empty){display:block}
.quest-app .det-search-board[data-detective-stage=loupe] .det-fixed-controls>.det-status{bottom:calc(100% + 70px)}
@keyframes det-found-pop{0%{transform:scale(.92)}45%{transform:scale(1.06);box-shadow:0 0 15px #b8ed9b88}100%{transform:scale(1)}}
@media(max-width:350px){.det-clue-card{height:78px;min-height:78px;font-size:10px}.det-search-object{height:48px;min-height:48px;width:min(100%,48px)}.det-search-head strong{font-size:12px}.det-search-head small{font-size:7px}.det-search-head{padding-left:7px}.det-search-tools{gap:2px}}
@media(prefers-reduced-motion:reduce){.det-search-evidence .is-new{animation:none}.det-search-gesture{transition:none}}
.quest-app .det-search-board .det-sheet[open]{position:fixed;inset:0;z-index:1300}
.det-search-object>svg{width:90%;height:90%;fill:none;stroke:#956426;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 1px #fff9)}
.det-clue-viewer{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;box-sizing:border-box;width:min(360px,calc(100vw - 28px));max-height:calc(100dvh - 28px);margin:auto;padding:38px 18px 18px;border:2px solid #e5c687;border-radius:25px;background:radial-gradient(ellipse at 50% 30%,#fffdf2,#f3e8cc);color:#254943;box-shadow:0 20px 80px #001b3080;text-align:center;overflow:auto;touch-action:manipulation}
.det-clue-viewer::backdrop{background:#081f30bb;backdrop-filter:blur(5px)}.det-clue-viewer[open]{animation:det-clue-open .18s ease-out}.det-clue-view-art{display:grid;grid-template-rows:minmax(0,1fr);place-items:center;width:100%;height:min(265px,43dvh)}.det-clue-view-art img,.det-clue-view-art svg{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain;pointer-events:none}.det-clue-view-art svg{max-width:210px;max-height:210px;fill:none;stroke:#956426;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.det-clue-viewer h2{margin:10px 0 5px;font-size:25px;line-height:1.15;color:#254943}.det-clue-viewer p{margin:7px 0 16px;font-size:14px;line-height:1.3;color:#46685a}.det-clue-close{position:absolute;top:6px;right:6px;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;color:#315e54;background:#e1e9d9;font:30px/1 sans-serif;cursor:pointer}.det-clue-return{width:100%;min-height:48px;border:1px solid #176355;border-radius:14px;background:#247b65;color:#fff9df;font:850 16px/1.2 Nunito,sans-serif;padding:10px;cursor:pointer}.det-clue-viewer button:focus-visible{outline:3px solid #d39b32;outline-offset:2px}
@keyframes det-clue-open{from{opacity:0;transform:translateY(8px) scale(.97)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.det-clue-viewer[open]{animation:none}}

/* Балет: ритм — часть сцены, а следующее действие всегда заметно. */
.game-card:has(.ballet-conductor){padding:4px 5px 5px}
.game-card:has(.ballet-conductor) .game-note{margin:1px 2px 0;font-size:11px;line-height:1.2;text-align:center}
.ballet-conductor{gap:5px;padding:6px;background:linear-gradient(160deg,#fff8f4,#f7dfe9);border-color:#d6a0b6}
.ballet-conductor header{padding:5px 8px;background:transparent;font-size:13px;color:#783f59}
.ballet-conductor header span{font-size:11px;font-weight:800}
.conductor-task{padding:4px 6px;background:transparent;font-size:15px;line-height:1.2;color:#6a304d}
.conductor-scene{min-height:110px;border-radius:16px;border-color:#dca3ba}
.conductor-scene img{object-position:center 42%}
.conductor-halo{background:linear-gradient(0deg,#432447bc,transparent 32%)}
.ballet-conductor .conductor-beats{position:absolute;left:8px;right:8px;bottom:8px;gap:10px;padding:3px;z-index:1}
.ballet-conductor .conductor-beats span{width:32px;height:32px;border:2px solid #fff2d5;background:#75506edb;color:#fff8eb;box-shadow:0 2px 5px #351d3a6b}
.ballet-conductor .conductor-beats span.lit,.ballet-conductor .conductor-beats span.done{background:#ffdb79;color:#ad446d;border-color:#fff4cb;box-shadow:0 0 15px #ffc848}
.ballet-conductor .conductor-actions{flex:none;display:flex;flex-direction:column;gap:4px}
.ballet-conductor .conductor-actions button{flex:none;width:100%;min-height:44px;border-radius:14px;font-size:14px;line-height:1.2}
.ballet-conductor .conductor-actions .conductor-primary{min-height:50px;background:linear-gradient(135deg,#bd5b86,#a83f77);border-color:#9c3e6b;color:white;box-shadow:0 3px 0 #80315c;font-size:16px}
.ballet-conductor .conductor-actions .conductor-secondary{background:#fff9f4;color:#72394f;border-color:#d7a4b6}
.ballet-conductor .conductor-actions .conductor-link{min-height:44px;background:transparent;border:0;color:#795267;font-size:12px;text-decoration:underline}
.conductor-status{display:grid;place-items:center;min-height:50px;padding:8px;text-align:center;border:1px solid #e7b8ca;border-radius:14px;background:#fff5f1;color:#72394f;font-size:14px;font-weight:850;line-height:1.2}
.conductor-status.conductor-clap{background:#a83f77;color:#fff;border-color:#8e315f;font-size:17px}
.conductor-note{padding:0 3px;font-size:11px;line-height:1.2;color:#80586a}
@media(max-height:650px){.ballet-conductor{gap:3px;padding:4px}.ballet-conductor header{padding:2px 6px}.conductor-task{padding:2px 4px;font-size:13px}.ballet-conductor .conductor-actions{gap:3px}.ballet-conductor .conductor-actions .conductor-primary{min-height:46px}.conductor-note{font-size:10px}}
.conductor-mic-error{padding:6px 10px;border-radius:10px;background:#fff2e8;color:#913a3a;font-size:12px;line-height:1.3;font-weight:800;text-align:center}
/* Snow maze: keep the tilt action easy to tap on short phones. */
.aurora-snow-maze .wind-toolbar [data-sensor-start]{min-height:44px}
.aurora-snow-maze .wind-sensor-note{font-size:11px;line-height:1.3;margin:4px 0}

/* Северное сияние: камера и голос — основные игровые действия. */
.aurora-color-hunt .wind-toolbar [data-sensor-start]{min-height:44px}
.aurora-color-placeholder{position:absolute;inset:0;z-index:1;pointer-events:none;background:url('assets/aurora-color-search.png') center 55%/cover no-repeat}.aurora-color-hunt[data-sensor-started="true"] .aurora-color-placeholder{display:none}.aurora-color-hunt .wind-color-aim{z-index:2}
.game-card:has(.aurora-color-hunt)>.stage-top,.game-card:has(.aurora-color-hunt)>.instruction{display:none}
.game-card:has(.aurora-color-hunt){padding:6px 7px 7px}.game-card:has(.aurora-color-hunt)>.quest-title-row{min-height:40px;margin:0}.game-card:has(.aurora-color-hunt)>.quest-title-row h1{font-size:clamp(18px,5vw,24px);margin:2px 0}
.game-card:has(.aurora-color-hunt) .game-note{margin:2px 0;font-size:11px;line-height:1.2;text-align:center}.aurora-color-hunt .wind-sensor-note{margin:3px 0;font-size:11px;line-height:1.25}
/* Подсказка цвета не закрывает рамку наведения. */
.aurora-color-hunt .wind-color-cue,.aurora-color-hunt .wind-color-cue.shown{top:calc(62.5% + 5px);left:14%;right:14%;bottom:auto;transform:none;display:flex;align-items:center;justify-content:center;gap:6px;padding:4px 7px;border-radius:12px;line-height:1.1}
.aurora-color-hunt .wind-color-cue i,.aurora-color-hunt .wind-color-cue>span{display:none}.aurora-color-hunt .wind-color-cue small{font-size:11px}.aurora-color-hunt .wind-color-cue strong{font-size:15px}
.game-card:has(.aurora-beacon-board)>.stage-top,.game-card:has(.aurora-beacon-board)>.instruction{display:none}
.game-card:has(.aurora-beacon-board){padding:6px 7px 7px}
.game-card:has(.aurora-beacon-board)>.quest-title-row{min-height:38px;margin:0}
.game-card:has(.aurora-beacon-board)>.quest-title-row h1{font-size:clamp(17px,5vw,22px);margin:2px 0}
.game-card:has(.aurora-beacon-board) .game-note{margin:2px 0;font-size:11px;line-height:1.2;text-align:center}
.aurora-beacon-board{width:100%;min-height:0;flex:1;display:flex!important;align-items:stretch!important;padding:0!important}
.aurora-beacon{display:flex;flex-direction:column;flex:1;min-height:0;gap:4px;padding:6px;border:1px solid #8dcfe3;border-radius:18px;background:#d9f3f8;color:#123b57}
.aurora-beacon header{display:flex;justify-content:space-between;align-items:center;gap:5px;font-size:13px;font-weight:850}.aurora-beacon header span{font-size:11px;white-space:nowrap}
.beacon-task{margin:0;text-align:center;font-size:13px;font-weight:800;line-height:1.2}
.beacon-scene{position:relative;flex:1;min-height:125px;overflow:hidden;border-radius:14px;background:#174c70 url('assets/aurora-beacon.png') center center/100% 100% no-repeat;box-shadow:inset 0 0 0 2px #e9fbff99}
.beacon-beam{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.beacon-beam line{stroke:#fff9a8;stroke-width:1.2;filter:drop-shadow(0 0 3px #fff8a1)}
.beacon-crystal{position:absolute;left:var(--x);top:var(--y);width:42px;height:45px;transform:translate(-50%,-50%);filter:hue-rotate(var(--hue)) drop-shadow(0 0 4px #fff);pointer-events:none}.beacon-crystal svg{width:100%;height:100%}.beacon-crystal.charged{filter:hue-rotate(var(--hue)) drop-shadow(0 0 8px #fff9a0);transform:translate(-50%,-50%) scale(1.12)}
.beacon-aim{position:absolute;width:32px;height:32px;border:2px solid #fff9c6;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 2px #359eb688,0 0 12px #fff;pointer-events:none}.beacon-aim.on-target{background:#fff7a755}
.beacon-order{display:flex;align-items:center;justify-content:center;gap:7px;min-height:30px;font-size:12px;text-align:center;line-height:1.15}.beacon-order>span{font-weight:800;color:#386c80}.beacon-order strong{color:#17425b}.beacon-order button{min-height:44px;padding:4px 10px;border:1px solid #8fc2d5;border-radius:12px;background:#fff;color:#17425b;font-weight:800}
.beacon-meter{height:6px;border-radius:8px;background:#a8d4df;overflow:hidden}.beacon-meter span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#fbd669,#fff9bf)}
.beacon-controls{display:flex;align-items:center;justify-content:center;gap:6px}.beacon-controls button{min-height:44px;padding:7px 17px;border:0;border-radius:14px;background:#176e89;color:white;font-weight:850;white-space:nowrap}.beacon-controls button[hidden]{display:none}.beacon-controls p{margin:0;font-size:11px;line-height:1.2;text-align:center}
@media(max-height:650px){.aurora-beacon{gap:3px;padding:4px}.beacon-scene{min-height:100px}.beacon-task{font-size:12px}.beacon-controls p{font-size:10px}}

/* Кристалл откликается на луч и показывает заряд прямо на игровом поле. */
.beacon-crystal{isolation:isolate;transition:transform .2s,filter .2s}
.beacon-crystal::before{content:"";position:absolute;inset:-10px;border-radius:50%;opacity:0;pointer-events:none;background:radial-gradient(circle,#fffbdc99 0%,#84f7ff77 38%,transparent 72%);transition:opacity .16s;z-index:-1}
.beacon-crystal.targeting{transform:translate(-50%,-50%) scale(1.18);filter:hue-rotate(var(--hue)) drop-shadow(0 0 8px #fff) drop-shadow(0 0 12px #8ffaff)}
.beacon-crystal.targeting::before{opacity:1;animation:beacon-glow .7s ease-in-out infinite alternate}
.beacon-crystal.targeting::after{content:"";position:absolute;inset:-6px;border-radius:50%;background:conic-gradient(#fff6a8 var(--charge,0%),#ffffff45 0);mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2px));-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2px));pointer-events:none}
.beacon-crystal.charged::before{opacity:1;background:radial-gradient(circle,#fffbdcbb 0%,#ffe78b88 38%,transparent 72%)}
.beacon-crystal.charged{filter:hue-rotate(var(--hue)) drop-shadow(0 0 8px #fff9a0) drop-shadow(0 0 12px #ffd95c)}
@keyframes beacon-glow{from{transform:scale(.86);opacity:.7}to{transform:scale(1.2);opacity:1}}
@media(prefers-reduced-motion:reduce){.beacon-crystal.targeting::before{animation:none}}
.game-card:has(.aurora-rings-board)>.stage-top,.game-card:has(.aurora-rings-board)>.instruction{display:none}
.game-card:has(.aurora-rings-board){padding:6px 7px 7px}
.game-card:has(.aurora-rings-board)>.quest-title-row{min-height:38px;margin:0}
.game-card:has(.aurora-rings-board)>.quest-title-row h1{font-size:clamp(17px,5vw,22px);margin:2px 0}
.game-card:has(.aurora-rings-board) .game-note{margin:2px 0;font-size:11px;line-height:1.2;text-align:center}
.aurora-rings-board{width:100%;min-height:0;flex:1;display:flex!important;align-items:stretch!important;padding:0!important}
.aurora-rings{display:flex;flex-direction:column;flex:1;min-height:0;gap:4px;padding:6px;border:1px solid #89c8dd;border-radius:18px;background:#d9f3f8;color:#123b57}
.aurora-rings header{display:flex;justify-content:space-between;align-items:center;font-weight:850;font-size:13px}.aurora-rings header span{font-size:11px;white-space:nowrap}
.rings-task{margin:0;text-align:center;font-size:13px;font-weight:800;line-height:1.2}
.rings-scene{flex:1;min-height:180px;position:relative;overflow:hidden;border-radius:14px;background:#103c60 url('assets/aurora-beacon.png') center/100% 100% no-repeat;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 2px #d9f8ff99}
.rings-sky{position:absolute;inset:0;background:linear-gradient(#07335344,#082e4d33)}
.rings-board{position:relative;width:min(100%,calc((100vh - 255px) * 1));max-width:440px;max-height:100%;touch-action:none;filter:drop-shadow(0 7px 8px #002b4c99)}
.rings-metal{fill:none;stroke:#72c3d9;stroke-width:36;opacity:.93}.rings-layer:nth-of-type(even) .rings-metal{stroke:#a5dfeb}.rings-route-shadow{fill:none;stroke:#005975;stroke-width:16;stroke-linecap:round}.rings-route{fill:none;stroke:#f9e9a5;stroke-width:8;stroke-linecap:round;filter:drop-shadow(0 0 3px #fff6a5)}.rings-layer.aligned .rings-route{stroke:#fffbd1;filter:drop-shadow(0 0 6px #ffe85a)}.rings-decoy{fill:none;stroke:#d8f5f8;stroke-opacity:.75;stroke-width:5;stroke-linecap:round}.rings-touch{fill:none;stroke:transparent;stroke-width:40;pointer-events:stroke;cursor:pointer}.rings-layer:focus-visible .rings-metal{stroke:#fff4a5}.rings-target,.rings-center-route{fill:none;stroke:#fff1aa;stroke-width:8;stroke-linecap:round;filter:drop-shadow(0 0 5px #ffe980)}.rings-center-star{font-size:28px;fill:#fff8c7;pointer-events:none}.rings-goal{position:absolute;top:2px;left:50%;transform:translateX(-50%);font-size:27px;color:#fff2a7;text-shadow:0 0 9px #fff;z-index:1}.rings-lighthouse{position:absolute;bottom:0;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;color:#fff4bd;font-size:19px;line-height:1;text-shadow:0 0 7px #ffc749}.rings-lighthouse small{font-size:8px;font-weight:900;letter-spacing:1px}
.rings-bottom{display:flex;align-items:center;justify-content:space-between;gap:6px}.rings-bottom p{flex:1;margin:0;font-size:12px;text-align:center;line-height:1.15;font-weight:700}.rings-bottom button{min-height:44px;padding:5px 12px;border:1px solid #86c2d6;border-radius:13px;color:#12445a;background:#fff;font-weight:800;white-space:nowrap}.rings-how{margin:0;text-align:center;font-size:10px;line-height:1.1}
@media(max-height:650px){.aurora-rings{gap:3px;padding:4px}.rings-task{font-size:12px}.rings-scene{min-height:140px}.rings-bottom p{font-size:11px}.rings-board{width:min(100%,calc((100vh - 240px) * 1))}}

.rings-engraving{fill:none;stroke:#e9ffff;stroke-opacity:.48;stroke-width:2;stroke-dasharray:3 12;pointer-events:none}.rings-source{fill:none;stroke:#fff0ab;stroke-width:5;stroke-linecap:round;filter:drop-shadow(0 0 5px #fff49c);pointer-events:none}
.game-card:has(.aurora-color-ribbon-board)>.stage-top,.game-card:has(.aurora-color-ribbon-board)>.instruction{display:none}
.game-card:has(.aurora-color-ribbon-board){padding:6px 7px 7px}.game-card:has(.aurora-color-ribbon-board)>.quest-title-row{min-height:38px;margin:0}.game-card:has(.aurora-color-ribbon-board)>.quest-title-row h1{font-size:clamp(17px,5vw,22px);margin:2px 0}.game-card:has(.aurora-color-ribbon-board) .game-note{margin:2px 0;font-size:11px;line-height:1.2;text-align:center}
.aurora-color-ribbon-board{width:100%;min-height:0;flex:1;display:flex!important;align-items:stretch!important;padding:0!important}.aurora-color-ribbon{display:flex;flex-direction:column;flex:1;min-height:0;gap:5px;padding:6px;border:1px solid #8ccddd;border-radius:18px;background:#d9f3f8;color:#123b57}.aurora-color-ribbon header{display:flex;justify-content:space-between;align-items:center;font-weight:850;font-size:13px}.aurora-color-ribbon header span{font-size:11px;white-space:nowrap}
.ribbon-task{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:13px}.ribbon-task>span{display:flex;gap:4px}.ribbon-gem{display:grid;place-items:center;width:25px;height:25px;border:1px solid #9abccc;border-radius:50%;background:#b8d7e5;color:#6b93a6}.ribbon-gem.caught{background:#ffec99;color:#b87515;box-shadow:0 0 8px #ffe473}
.ribbon-scene{position:relative;flex:1;min-height:150px;overflow:hidden;border-radius:14px;background:#103b60 url('assets/aurora-beacon.png') center/100% 100% no-repeat;box-shadow:inset 0 0 0 2px #dcfaff99}.ribbon-scene:before{content:"";position:absolute;inset:0;background:linear-gradient(#05244d55,#062a5266);pointer-events:none}.ribbon-canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:pointer}.ribbon-sky-label{position:absolute;top:7px;left:0;right:0;text-align:center;color:#e6fcff;text-shadow:0 2px 6px #08375c;font-size:12px;font-weight:800;pointer-events:none}
.ribbon-progress{height:8px;border-radius:8px;background:#a6d2df;overflow:hidden}.ribbon-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ffe084,#fffbd4)}.ribbon-bottom{display:flex;align-items:center;gap:6px;justify-content:center}.ribbon-bottom p{flex:1;margin:0;text-align:center;font-size:12px;line-height:1.2;font-weight:750}.ribbon-bottom button{min-height:44px;padding:5px 12px;border:1px solid #86c2d6;border-radius:13px;color:#12445a;background:#fff;font-weight:800;white-space:nowrap}.ribbon-note{margin:0;text-align:center;font-size:10px;line-height:1.2}
@media(max-height:650px){.aurora-color-ribbon{gap:3px;padding:4px}.ribbon-scene{min-height:120px}.ribbon-note{font-size:10px}.ribbon-bottom p{font-size:11px}}
.rings-bridge{fill:none;stroke:#a8dfea;stroke-width:6;stroke-linecap:round;opacity:.6}.rings-bridge.lit{stroke:#fff6b1;opacity:1;filter:drop-shadow(0 0 5px #ffe770)}.rings-decoy{stroke:#e6ffff;stroke-width:7;stroke-opacity:.8}.rings-crystal{pointer-events:none}.rings-crystal circle{fill:#0d5173;stroke:#a4efff;stroke-width:2}.rings-crystal path{fill:#9ddce7;stroke:#e8fcff;stroke-width:1}.rings-crystal.lit circle{fill:#ffde78;stroke:#fff8bd;filter:drop-shadow(0 0 8px #ffe979)}.rings-crystal.lit path{fill:#fff9c8;stroke:#fff;stroke-width:1}
.game-card:has(.aurora-balance-board)>.stage-top,.game-card:has(.aurora-balance-board)>.instruction{display:none}
.game-card:has(.aurora-balance-board){padding:6px 7px 7px}.game-card:has(.aurora-balance-board)>.quest-title-row{min-height:38px;margin:0}.game-card:has(.aurora-balance-board)>.quest-title-row h1{font-size:clamp(17px,5vw,22px);margin:2px 0}.game-card:has(.aurora-balance-board) .game-note{margin:2px 0;font-size:11px;line-height:1.2;text-align:center}
.aurora-balance-board{width:100%;min-height:0;flex:1;display:flex!important;align-items:stretch!important;padding:0!important}.aurora-balance{display:flex;flex-direction:column;flex:1;min-height:0;gap:5px;padding:6px;border:1px solid #8ccddd;border-radius:18px;background:#d9f3f8;color:#123b57}.aurora-balance header{display:flex;justify-content:space-between;align-items:center;font-weight:850;font-size:13px}.aurora-balance header span{font-size:11px;white-space:nowrap}
.balance-cue{display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:13px;line-height:1.15}.balance-cue>span{display:flex;gap:4px}.balance-gem{display:grid;place-items:center;width:25px;height:25px;border:1px solid #9abccc;border-radius:50%;background:#b8d7e5;color:#6b93a6}.balance-gem.lit{background:#ffec99;color:#b87515;box-shadow:0 0 8px #ffe473}
.balance-scene{position:relative;flex:1;min-height:160px;overflow:hidden;border-radius:14px;background:#103b60 url('assets/aurora-beacon.png') center/100% 100% no-repeat;box-shadow:inset 0 0 0 2px #dcfaff99}.balance-scene:before{content:"";position:absolute;inset:0;background:linear-gradient(#05244d55,#062a5266);pointer-events:none}.balance-scene-label{position:absolute;top:8px;left:0;right:0;text-align:center;color:#e6fcff;text-shadow:0 2px 6px #08375c;font-size:12px;font-weight:800}.balance-machine{position:absolute;left:5%;right:5%;top:32%;height:38%;filter:drop-shadow(0 5px 5px #052f4ca0)}
.balance-track{position:absolute;left:3%;right:3%;top:36%;height:25px;border:3px solid #d8fdff;border-radius:20px;background:linear-gradient(#d9faff,#70c6df 50%,#2d7ca6);box-shadow:inset 0 0 8px #fff,0 0 13px #97e9f5}.balance-zone{position:absolute;top:-10px;bottom:-10px;transform:translateX(-50%);border:2px solid #fff9b2;border-radius:18px;background:#fff4a755;box-shadow:0 0 15px #fff2aa}.balance-ball{position:absolute;top:50%;width:38px;height:38px;transform:translate(-50%,-50%);border:2px solid #fff;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 30% 25%,#fff,#a7fbff 30%,#3c9bdb 75%,#1a6290);box-shadow:0 0 10px #c7ffff;color:#fff;font-size:17px;z-index:1}.balance-ball.on-target{box-shadow:0 0 10px #fff,0 0 22px #ffeb80;background:radial-gradient(circle at 30% 25%,#fff,#fff9ba 35%,#f4ba4e)}.balance-stand{position:absolute;top:calc(36% + 24px);left:50%;transform:translateX(-50%);width:0;height:0;border-left:22px solid transparent;border-right:22px solid transparent;border-bottom:65px solid #a7e7f1}.balance-base{position:absolute;top:calc(36% + 85px);left:50%;transform:translateX(-50%);width:100px;height:12px;border:2px solid #e2ffff;border-radius:10px;background:#6ac1d7}.balance-weight{position:absolute;top:3%;font-size:22px;color:#d9fbff;text-shadow:0 0 9px #b5fbff}.balance-weight.left{left:1%}.balance-weight.right{right:1%}.balance-direction{position:absolute;left:8%;right:8%;top:69%;display:flex;justify-content:space-between;color:#e5fcff;text-shadow:0 1px 5px #0a3355;font-size:10px;font-weight:800}
.balance-meter{height:8px;border-radius:8px;background:#a6d2df;overflow:hidden}.balance-meter span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ffe084,#fffbd4)}.balance-controls{display:flex;align-items:center;gap:6px;justify-content:center}.balance-controls button{min-height:44px;padding:6px 12px;border:1px solid #86c2d6;border-radius:13px;color:#12445a;background:#fff;font-weight:800;white-space:nowrap}.balance-controls button[data-balance=start]{background:#176e89;color:white;border:0}.balance-controls button[hidden]{display:none}.balance-controls p{flex:1;margin:0;text-align:center;font-size:11px;line-height:1.2}
@media(max-height:650px){.aurora-balance{gap:3px;padding:4px}.balance-scene{min-height:120px}.balance-cue{font-size:12px}.balance-controls p{font-size:10px}}
/* Задание перед этапом «Северного сияния». */
.overlay-back:has(.aurora-briefing){padding:12px;background:#092945c9}
.dialog.aurora-briefing{max-width:440px;max-height:calc(100dvh - 24px);border:2px solid #acdfe9;border-radius:24px;background:#e7f7fa;color:#163b54;box-shadow:0 18px 60px #031c38aa}
.aurora-brief-art{height:112px;background:#123e68 url('assets/aurora-beacon.png') center 27%/cover no-repeat;position:relative}.aurora-brief-art:after{content:"";position:absolute;inset:0;background:linear-gradient(transparent 35%,#e7f7fa)}.aurora-brief-art span{position:absolute;left:17px;top:15px;color:#fff1a4;text-shadow:0 0 12px #fff;font-size:26px}
.aurora-brief-copy{padding:0 20px 20px}.aurora-brief-kicker{font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#40748a}.aurora-brief-copy h2{margin:4px 0 9px;font-size:clamp(22px,6vw,29px);line-height:1.12;color:#143e5a}.aurora-brief-task{margin:0 0 8px;padding:10px 12px;border-radius:13px;background:#c7eaf2;color:#123d54;font-size:15px;line-height:1.3;font-weight:850}.aurora-brief-story{margin:0 0 14px;color:#28556b;font-size:14px;line-height:1.36}.aurora-brief-start{width:100%;min-height:48px;padding:10px 15px;border-radius:14px;background:#176f89;color:#fff}.aurora-brief-start:hover{background:#105c77}.dialog.aurora-briefing .dialog-close{right:10px;top:10px}.dialog.aurora-briefing>.narration-tools{top:10px;right:64px}
@media(max-height:650px){.aurora-brief-art{height:88px}.aurora-brief-copy{padding:0 16px 14px}.aurora-brief-copy h2{font-size:22px;margin:3px 0 7px}.aurora-brief-task{padding:8px 10px;font-size:14px;margin-bottom:6px}.aurora-brief-story{font-size:13px;line-height:1.3;margin-bottom:10px}}
/* Полярная тропа: маркеры на нарисованных сферах, подписи рядом с дорогой. */
.map-view.aurora .map-node{width:0}
.map-view.aurora .map-node .island{width:30px;height:30px;flex:none;border:2px solid #d9fbff;font-size:14px;box-shadow:0 2px 7px #16496866;background:#d7f4f7e8;color:#184c67}
.map-view.aurora .map-node.current .island{background:#ffe59d;border-color:#fff8d7;box-shadow:0 0 0 3px #fff2aa66,0 2px 8px #16496866}
.map-view.aurora .map-node.done .island{background:#95d5d4;color:#154c59}
.map-view.aurora .map-node p{position:absolute;box-sizing:border-box;top:50%;left:20px;width:100px;max-width:30vw;transform:translateY(-50%);margin:0;padding:4px 5px;border-radius:9px;font-size:10px;line-height:1.2;text-align:center;overflow-wrap:normal;word-break:normal;hyphens:none;color:#16455b;background:#e8f8fbee;border:1px solid #a6d4dd}
.map-view.aurora .map-node:is(.map-node-2,.map-node-4,.map-node-5,.map-node-7) p{left:auto;right:20px}
.map-view.aurora .map-node-4 p{top:calc(50% + 7px)}
.map-view.aurora .map-node-5 p{width:80px}
.map-view.aurora .map-node-6 p{width:70px;top:calc(50% + 8px)}
.map-view.aurora .map-node-8 p{top:calc(50% - 8px)}
.map-view.aurora .map-boat{display:none}
/* На рисунке девять огней, а этапов восемь: приглушаем лишний огонёк. */
.map-view.aurora .map-inner::before{content:"";position:absolute;left:55.5%;top:36.2%;width:9%;height:6%;transform:translate(-50%,-50%);background:radial-gradient(ellipse,#eef5e5 0 30%,#eff4df 44%,#e7efdfaa 62%,transparent 76%);pointer-events:none}
