:root{font-family:'Microsoft YaHei','PingFang SC',sans-serif;color:#194e50;background:#30b5c7;font-synthesis:none;--ink:#194e50;--sea:#30b5c7;--cream:#fff8df;--gold:#ffd06c;--teal:#086c70}
*{box-sizing:border-box}html,body{margin:0;min-width:320px;width:100%;height:100%;overflow:hidden}body{font-size:16px}button{font:inherit;cursor:pointer;border:0}button:disabled{cursor:default}button:focus-visible,[tabindex]:focus-visible{outline:3px solid #ffab38;outline-offset:4px}button{touch-action:manipulation}img{max-width:100%;user-select:none;-webkit-user-drag:none}[hidden]{display:none!important}h1,h2,h3,p{margin:0}main{height:100dvh}.sprite{object-fit:contain;pointer-events:none}.primary{background:#086c70;color:#fffbea;border:1px solid #06575b;border-bottom-width:4px;border-radius:16px;padding:13px 24px;font-weight:700;letter-spacing:.03em;box-shadow:0 5px 18px #07383a16;transition:background .18s,translate .18s}.primary:hover{background:#095c60;translate:0 -2px}.primary:active{translate:0 1px}.quiet{border:1px solid #1a67662e;background:#fff9e5e8;padding:9px 15px;border-radius:12px;color:#27605c}.quiet:hover{background:#fff}.eyebrow{display:block;font-size:12px;letter-spacing:.14em;font-weight:700;color:#6b8173}.actions{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}.close{display:grid;place-items:center;font-size:29px;color:#486c66;width:40px;height:40px;border-radius:50%;background:#f1f1e3;flex-shrink:0}.close:hover{background:#e5e9d7}
/* Full-screen story opening */
.opening{isolation:isolate;position:relative;height:100dvh;overflow:hidden;background:var(--sea)}.opening-land{position:absolute;inset:0;background:url('../../images/scenes/voyage-map.jpg') center/cover no-repeat;filter:saturate(.92);z-index:-2;opacity:.82}.opening:after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#ecf7dfef 0%,#e7f6dfed 30%,#e7f6dfa0 53%,#30b5c700 80%)}.opening-content{position:absolute;left:9%;top:50%;transform:translateY(-50%);width:530px;max-width:58%}.opening .eyebrow{color:#467467;margin-bottom:24px}h1{color:#155653;font-size:clamp(48px,5.5vw,84px);font-weight:900;line-height:1.2;letter-spacing:.05em;text-shadow:0 3px #ffffff88}h1 span{display:block;font-size:.36em;letter-spacing:.24em;color:#a57734;margin-top:14px;font-weight:700}.opening-story{font-size:18px;line-height:1.95;margin:27px 0 25px;color:#2c655b}.begin{min-width:220px;font-size:20px;padding:16px 26px;display:flex;justify-content:space-between;align-items:center;gap:35px}.begin span{font-size:27px}.opening-note{font-size:12px;line-height:1.9;color:#537b70;margin-top:22px}.opening-mouse{position:absolute;height:60%;width:34%;object-fit:contain;right:5%;bottom:10%;filter:drop-shadow(0 16px 10px #124e4a27);animation:welcome 1.4s ease-out both}@keyframes welcome{from{opacity:0;translate:20px 10px}to{opacity:1;translate:0 0}}
/* Fixed geography: art and nodes always share one coordinate plane */
.world{position:relative;isolation:isolate;width:100%;height:100dvh;background:var(--sea);display:grid;place-items:center}.map-board{position:relative;width:min(100vw,150dvh);aspect-ratio:3/2;background:url('../../images/scenes/voyage-map.jpg') center/100% 100% no-repeat}.map-board:before{content:'';position:absolute;inset:-1px;background:var(--sea);pointer-events:none;z-index:1;mask-image:linear-gradient(#000,transparent 5%,transparent 95%,#000),linear-gradient(90deg,#000,transparent 5%,transparent 95%,#000)}#map-nodes{position:absolute;inset:0;z-index:2}.map-toolbar{position:absolute;top:18px;left:22px;right:22px;display:flex;align-items:center;justify-content:space-between;gap:14px;z-index:5}.map-toolbar p{font-size:14px;color:#114e55;background:#fff7dded;border-radius:30px;padding:10px 20px;box-shadow:0 3px 8px #075d6a13}.map-caption{position:absolute;bottom:15px;left:50%;translate:-50% 0;text-align:center;z-index:5;width:max-content;max-width:94%;padding:11px 25px;background:#fff9e5ed;border-radius:18px;box-shadow:0 4px 20px #0d4d5514}.map-caption p{font-size:16px;font-weight:700}.map-caption small{display:block;font-size:11px;color:#718475;margin-top:5px}.node{position:absolute;transform:translate(-50%,-50%);width:160px;min-height:76px;background:transparent;color:#204d42;display:flex;align-items:center;flex-direction:column;justify-content:center;overflow:visible;isolation:isolate;padding:0;z-index:2}.disc{display:grid;place-items:center;width:clamp(42px,4.8vw,70px);height:clamp(42px,4.8vw,70px);background:radial-gradient(circle at 42% 35%,#fff9d3,#fcd47b 65%,#cc9e3e);border:3px solid #fff2b2;border-radius:50%;box-shadow:0 5px 0 #a77e38,0 8px 12px #604d2633;font-size:25px;font-weight:800;color:#826529}.disc img{width:95%;height:95%;object-fit:contain}.node:disabled .disc{filter:saturate(.3);background:#e7dfb6;border-color:#e9e5c7;box-shadow:0 4px #a49c7c}.node:disabled .disc img{width:76%;height:76%;opacity:.85}.node-name{margin-top:10px;background:#fff8dcf5;padding:4px 12px;border-radius:8px;white-space:nowrap;font-size:clamp(11px,1.1vw,16px);font-weight:700;box-shadow:0 2px 4px #47774a20}.node:disabled .node-name{color:#677b68;background:#edf0d7dc}.node.current{z-index:9}.current .disc{box-shadow:0 5px #a77e38,0 0 0 7px #fff7b866,0 0 30px #fff2a0}.node:not(:disabled):hover .disc{scale:1.08}.marker{position:absolute;left:50%;bottom:calc(100% + 13px);translate:-50% 0;width:44px;height:48px;z-index:30;filter:drop-shadow(0 3px 6px #684e2760);animation:float-star 2s ease-in-out infinite;pointer-events:none}.marker img{width:100%;height:100%}.node.done .disc{background:#fff3b4}.node.done .disc img{width:110%;height:110%}@keyframes float-star{50%{translate:-50% -8px}}
/* Mission shell contains only the current task */
dialog{padding:0;border:0;color:var(--ink)}#mission{width:min(1360px,calc(100vw - 40px));height:min(820px,calc(100dvh - 40px));max-width:none;max-height:none;margin:auto;background:#fff9e8;border-radius:26px;box-shadow:0 28px 100px #103e5077;overflow:hidden}dialog::backdrop{background:#07363d9e;backdrop-filter:blur(4px)}.mission-head{height:78px;padding:13px 22px 12px 27px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e5dfc7;gap:15px}.mission-head span{font-size:11px;letter-spacing:.1em;color:#758977}.mission-head h2{font-size:24px;line-height:1.45}.mission-body{height:calc(100% - 78px);display:grid;grid-template-columns:245px minmax(0,1fr);gap:0}.brief{padding:20px 22px;overflow-y:auto;display:flex;align-items:stretch;flex-direction:column;border-right:1px solid #e8e0c5;gap:17px;line-height:1.8;font-size:14px}#skill-art{height:110px;flex-shrink:0;display:flex;justify-content:center}#skill-art img{width:100%;height:100%;object-fit:contain}.task-card{border-left:3px solid #e9bc65;padding-left:13px}.task-card .eyebrow{font-size:10px;margin-bottom:7px}#instruction{font-weight:700;color:#1d5957}#task-status{font-size:12px;color:#857249;background:#f2edcf;border-radius:9px;padding:9px 10px}#hint{margin-top:auto;font-size:12px}#hint-text{font-size:12px;color:#776944;background:#fff1c5;padding:10px;border-radius:9px}.play-wrap{min-width:0;min-height:0;display:flex;flex-direction:column;padding:15px;gap:9px}#feedback{height:auto;min-height:34px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:13px;color:#436d64;padding:0 10px}.arena{position:relative;min-height:0;flex:1;isolation:isolate;overflow:hidden;border-radius:18px;user-select:none;background-position:center;background-size:cover;border:1px solid #e7e1b9}.arena:before{content:'';position:absolute;inset:0;z-index:-1;background:#fff9df22}.theme-camp{background-image:url('../../images/scenes/camp.jpg')}.theme-forest{background-image:url('../../images/scenes/forest.jpg')}.theme-creek{background-image:url('../../images/scenes/creek-crossing.jpg');background-size:100% 100%}.scene-title{position:absolute;top:18px;left:50%;translate:-50% 0;text-align:center;z-index:2;width:max-content;max-width:90%;font-size:18px;font-weight:700;background:#fff8dfe8;padding:10px 20px;border-radius:14px;box-shadow:0 3px 8px #47654c16}.scene-note{position:absolute;bottom:12%;width:100%;text-align:center;font-size:13px;color:#23615b}.art{position:absolute;transform:translate(-50%,-50%);overflow:visible;pointer-events:none;touch-action:none;filter:drop-shadow(0 9px 6px #224d4c29)}.art [data-ink]{pointer-events:fill;cursor:pointer}.spent{opacity:0!important;pointer-events:none!important;visibility:hidden!important}.dragging{visibility:hidden!important}.art.spent [data-ink]{pointer-events:none}.object-label{position:absolute;transform:translateX(-50%);white-space:nowrap;background:#fff8dfe8;padding:5px 12px;border-radius:8px;font-size:13px;font-weight:700}.drop-glow{filter:drop-shadow(0 0 13px #fff78b)!important}.drag-ghost{position:fixed!important;transform:none!important;pointer-events:none!important;z-index:10000!important;margin:0!important;visibility:visible!important;filter:drop-shadow(0 8px 6px #17454844)}.drag-ghost *{pointer-events:none!important}.packed{filter:drop-shadow(0 0 20px #fff791)}
/* Visible 180 degree door hinge */
.door-frame{position:absolute;left:50%;top:53%;width:225px;height:300px;translate:-50% -50%;perspective:850px}.door-back{position:absolute;width:100%;height:100%;object-fit:fill;pointer-events:none}.door-frame #door{left:50%!important;top:50%!important;width:84%!important;height:91%!important;transform-origin:10% 50%;transition:transform 1.55s cubic-bezier(.23,.63,.25,1);transform:translate(-50%,-50%) rotateY(0deg);transform-style:preserve-3d}.door-frame.opened #door{transform:translate(-50%,-50%) rotateY(-180deg);filter:brightness(.85) drop-shadow(6px 10px 10px #194c4633)}
/* Scroll document: enough content at every window size */
.paper-panel{position:absolute;inset:6% 12%;display:flex;flex-direction:column;background:#fffae8;border:1px solid #ead4a7;border-radius:16px;box-shadow:0 14px 30px #19484925;overflow:hidden}.paper-top{background:#f1e4be;padding:15px 20px;font-size:18px;font-weight:700;flex-shrink:0}.paper-top small{display:block;font-size:11px;font-weight:400;margin-top:5px;color:#6a775a}.scrollbox{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0;scrollbar-width:auto;scrollbar-color:#9aaf8a #f3e9cc}.journal-page{min-height:320px;padding:30px 30px 25px;border-bottom:1px dashed #decda0;display:flex;flex-direction:column;align-items:flex-start;gap:15px;line-height:1.9}.journal-page span{color:#9c895e;font-size:11px;letter-spacing:.13em}.journal-page h3{font-size:21px}.journal-page p{font-size:15px}.journal-page img{height:90px;width:90px;align-self:center}.journal-page.scroll-end{min-height:260px}.journal-foot{padding:9px 15px;font-size:10px;color:#9c895e;text-align:center;border-top:1px solid #ecdfbf;flex-shrink:0}
/* Perpendicular creek and a single continuous bridge surface */
/* Native vertical slats join left-to-right; all pieces share the creek's image plane. */
.bridge-scene{container-type:size;background:#c9dfb1}
.bridge-world{position:absolute;left:50%;top:50%;translate:-50% -50%;width:min(100cqw,calc(100cqh * 1672 / 940));aspect-ratio:1672/940;background:url('../../images/scenes/creek-crossing.jpg') center/100% 100% no-repeat;overflow:hidden}
.loose-plank{position:absolute;translate:-50% -50%;width:10%;aspect-ratio:var(--module-ratio);cursor:grab;touch-action:none;filter:drop-shadow(0 2px 1px #164d4b44)}
.loose-plank img{display:block;width:100%;height:auto;object-fit:contain;pointer-events:none}
.bridge-deck{position:absolute;left:38%;top:52%;width:30%;aspect-ratio:calc(3 * var(--module-ratio));isolation:isolate}
.bridge-frame{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.bridge-back{z-index:0}.bridge-front{z-index:3}
.bridge-slot{position:absolute;left:calc(var(--slot) * 100% / 3);top:0;width:calc(100% / 3);height:100%;outline:1px dashed #fff6bc;outline-offset:-2px;display:grid;place-items:center;background:#c4ebd54f;z-index:1}
.bridge-slot span{writing-mode:vertical-rl;letter-spacing:.1em;font-size:clamp(8px,1.6cqh,13px);line-height:1;color:#fffbdb;text-shadow:0 1px 3px #133c42;pointer-events:none}
.bridge-slot.filled{outline:0;background:transparent}
.bridge-slot img{position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain;pointer-events:none}
.bridge-deck.complete{filter:drop-shadow(0 0 8px #fff58d)}
.crossing-mouse{position:absolute;left:30%;top:65%;width:7.5%;aspect-ratio:5/6;translate:-50% -50%;pointer-events:none;z-index:5;opacity:1}
.crossing-mouse img{width:100%;height:100%;object-fit:contain}.bridge-repaired .crossing-mouse{animation:cross-bridge 2s linear both}
@keyframes cross-bridge{0%{left:30%}90%{left:77%}100%{left:80%}}
.is-selected{filter:drop-shadow(0 0 9px #43acff)}.is-selected:before{content:''}.art.is-selected{background:#b9e3ff88;border-radius:12px;outline:3px solid #3197d7;outline-offset:-7px}.chart-open{animation:open-chart .8s ease both}@keyframes open-chart{to{scale:1.25}}
/* Circuit uses only previously learned clicks */
/* In-game context menus, no input fields or native clipboard */
.copy-panel{position:absolute;top:50%;left:50%;translate:-50% -50%;width:78%;max-width:600px;background:#fffbecec;border:1px solid #d5dac2;box-shadow:0 12px 35px #1c4f4b22;border-radius:20px;padding:22px 28px}.radio-label{font-size:15px;font-weight:700;margin-bottom:20px;display:flex;align-items:center;gap:8px}.signal-dot{width:9px;height:9px;background:#6ebc8a;border-radius:50%;box-shadow:0 0 0 4px #71bc8b20}.field-label{font-size:12px;color:#6d806b;line-height:1.6;margin-bottom:9px}.source-text{display:flex;align-items:center;justify-content:space-between;border:1px solid #9cbec6;background:#e9f5f1;padding:13px 16px;border-radius:10px}.source-text span{background:#3e87ce;color:#fff;padding:4px 10px;font-family:Consolas,monospace;font-size:23px;letter-spacing:.1em;cursor:context-menu}.source-text small{font-size:11px;color:#6c8e83}.transfer-arrow{text-align:center;font-size:20px;color:#92a995;padding:6px}.paste-target{border:2px dashed #a4ba9a;background:#f1f4e3;border-radius:10px;padding:17px;color:#83937d;font-size:15px;cursor:context-menu;min-height:58px}.paste-target.pasted{color:#1a6863;background:#dff0d9;border-color:#7ab097;font-family:Consolas,monospace;font-size:21px;padding:14px}.copy-state{font-size:11px;line-height:1.7;color:#71826e;margin:12px 0 15px;min-height:19px}.copy-panel .primary{width:100%;font-size:15px}.context-menu{position:fixed;z-index:11000;width:190px;border:1px solid #d7d4b6;background:#fffdf0;padding:7px;border-radius:12px;box-shadow:0 12px 40px #123c4c55;user-select:none}.menu-caption{font-size:10px;color:#87917b;display:block;padding:5px 9px}.context-menu button{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:11px 10px;background:#edf2df;border-radius:7px;color:#245c53;font-size:15px}.context-menu button:hover{background:#d5e8cb}.context-menu button:disabled{opacity:.4}.context-menu small{display:block;font-size:10px;padding:7px;color:#7a826d}
/* Story consequence replaces replay / score grinding */
.result-scene{background-image:linear-gradient(#eaf6dfdd,#fff4d4e8),url('../../images/scenes/camp.jpg')}.result{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:22px;gap:17px}.result-art{height:150px;position:relative;width:230px}.result-art>img:first-child{width:180px;height:100%;position:absolute;left:0}.result-art .result-star{position:absolute;right:0;top:10%;width:90px;height:90px;filter:drop-shadow(0 6px 6px #bd8e4955)}.result h3{font-size:30px}.result p{font-size:16px;line-height:1.8;max-width:550px}.result .next-story{font-size:14px;color:#738068;max-width:440px}.result .eyebrow{font-size:11px}.result .actions{margin-top:8px}.result .quiet{font-size:13px}
/* Finale is earned from the entire journey, no repeated final challenge */
.ending{position:fixed;inset:0;background:linear-gradient(130deg,#123f55,#285a68 45%,#247b87);isolation:isolate;display:grid;place-items:center;overflow:auto}.ending-sea{position:absolute;inset:0;overflow:hidden;z-index:-1;background:radial-gradient(ellipse at 85% 80%,#99cbad66,transparent 50%)}.ending-lighthouse-rig{position:absolute;right:5%;bottom:0;width:min(28vw,45.25dvh);aspect-ratio:253/369}.ending-lighthouse{position:relative;display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 12px 20px #07283b55);opacity:.8}.light-source{position:absolute;left:53%;top:19%;width:0;height:0;transform-origin:0 0;animation:beacon 7s ease-in-out infinite}.light-beam{position:absolute;right:0;top:0;width:100vmax;height:55vmin;transform:translateY(-50%);background:linear-gradient(90deg,#fff5b300,#fff5b344);clip-path:polygon(0 0,100% 50%,0 100%);pointer-events:none}@keyframes beacon{0%,100%{transform:rotate(-7deg);opacity:.8}50%{transform:rotate(7deg);opacity:.4}}.ending-card{width:min(630px,92%);padding:35px 30px;display:flex;flex-direction:column;align-items:center;gap:17px;text-align:center;background:#fff9e8f5;border:1px solid #fff9d5;border-radius:28px;box-shadow:0 15px 80px #002f3e55;margin:25px 0;animation:welcome 1s ease-out both}.ending-card .medal{height:190px;width:190px;object-fit:contain;filter:drop-shadow(0 10px 12px #cbab5b40)}.ending h2{font-size:39px;color:#88662d;letter-spacing:.06em}.ending-card p{font-size:15px;line-height:1.9;color:#5d7b6c}.ending-card .mastery{font-size:16px;color:#23675c;font-weight:700;margin-top:3px}.skill-seals{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}.skill-seals span{background:#e8eed8;border-radius:30px;color:#447860;font-size:11px;padding:8px 10px}.ending-card .primary{margin-top:8px;font-size:14px}
@media(max-width:1050px){.mission-body{grid-template-columns:205px minmax(0,1fr)}.brief{padding:17px;font-size:13px;gap:13px}#skill-art{height:85px}.copy-panel{padding:20px;width:86%}.scene-title{font-size:15px}.result-art{height:110px}.result{gap:12px}.result h3{font-size:25px}.result p{font-size:14px}.node{width:135px}.opening-mouse{right:1%;width:39%}.opening-content{left:7%}}
@media(max-height:670px) and (min-width:761px){#mission{height:calc(100dvh - 20px);width:calc(100vw - 20px)}.mission-head{height:64px;padding:8px 18px}.mission-head h2{font-size:21px}.mission-body{height:calc(100% - 64px)}.brief{padding:14px;gap:11px;line-height:1.65;font-size:12px}#skill-art{height:65px}.play-wrap{padding:10px;gap:4px}#feedback{font-size:11px;min-height:27px}.scene-title{font-size:14px;top:12px}.door-frame{height:240px;width:185px}.paper-panel{inset:5% 10%}.paper-top{padding:10px 15px;font-size:15px}.copy-panel{padding:16px 22px}.radio-label{margin-bottom:10px;font-size:13px}.source-text{padding:9px 13px}.source-text span{font-size:20px}.field-label{margin-bottom:6px;font-size:11px}.transfer-arrow{padding:2px}.paste-target{min-height:46px;padding:12px}.paste-target.pasted{padding:9px}.copy-state{margin:8px 0}.copy-panel .primary{padding:10px}.result{gap:9px}.result-art{height:90px}.result h3{font-size:24px}.result .primary{padding:10px 16px;font-size:13px}.result p{font-size:13px}.circuit-switch{height:58px;width:58px}.circuit-switch span{font-size:20px}.ending-card{padding:20px;gap:12px}.ending-card .medal{height:120px;width:120px}.ending h2{font-size:32px}.opening .eyebrow{margin-bottom:14px}.opening-story{margin:19px 0;font-size:16px}.opening-note{margin-top:13px}.map-caption{bottom:10px;padding:8px 20px}.map-toolbar{top:10px}.map-toolbar p{font-size:12px}.marker{bottom:calc(100% + 8px);width:36px;height:40px}}
@media(max-width:760px){#mission{width:100vw;height:100dvh;border-radius:0}.mission-head{height:66px;padding:10px 16px}.mission-head h2{font-size:21px}.mission-head span{font-size:10px}.mission-body{height:calc(100% - 66px);display:flex;flex-direction:column}.brief{border-right:0;border-bottom:1px solid #e8dfc6;padding:12px 17px;display:grid;grid-template-columns:64px minmax(0,1fr);gap:7px 12px;overflow-y:auto;max-height:32%;flex-shrink:0;font-size:11px;line-height:1.6}#skill-art{grid-column:1;grid-row:1/3;height:66px}#story{grid-column:2}.task-card{grid-column:2;border:0;padding:0}.task-card .eyebrow{display:none}#task-status{grid-column:1/3;padding:5px 8px;font-size:10px}#hint{grid-column:1/3;margin:0;padding:6px;font-size:11px}#hint-text{grid-column:1/3;font-size:11px;padding:6px}.play-wrap{flex:1;padding:9px;gap:5px}.arena{border-radius:14px}#feedback{font-size:11px;min-height:34px;line-height:1.55}.scene-title{font-size:13px;top:12px;padding:8px 12px}.art{max-width:30%;max-height:55%}.door-frame{height:min(280px,66%);width:190px;top:55%}.door-frame #door{max-width:none;max-height:none}.object-label{font-size:11px;padding:4px 8px}.paper-panel{inset:5% 6%}.paper-top{font-size:14px;padding:12px 15px}.paper-top small{font-size:10px}.journal-page{padding:22px;min-height:300px}.journal-page h3{font-size:19px}.journal-page p{font-size:13px}.copy-panel{width:91%;padding:17px;border-radius:15px}.radio-label{font-size:13px;margin-bottom:13px}.field-label{font-size:11px}.source-text{padding:10px 12px}.source-text span{font-size:21px}.transfer-arrow{padding:3px}.paste-target{padding:13px;min-height:50px;font-size:13px}.paste-target.pasted{padding:10px}.copy-state{font-size:10px;margin:9px 0}.copy-panel .primary{font-size:13px;padding:11px}.circuit-panel{inset:18% 5% 8%}.circuit-switch{width:58px;height:58px;border-width:4px}.circuit-switch span{font-size:21px}.circuit-caption{font-size:11px}.circuit-caption b{font-size:17px}.scene-note{font-size:11px;padding:0 12px}.result{padding:18px;gap:13px}.result-art{height:100px}.result h3{font-size:24px}.result p{font-size:13px}.result .next-story{font-size:12px}.result .primary{font-size:13px;padding:11px 16px}.result .quiet{font-size:12px}.opening-content{left:8%;top:10%;transform:none;max-width:84%;width:84%}.opening .eyebrow{font-size:10px;margin-bottom:16px}h1{font-size:clamp(43px,8vw,62px)}.opening-story{font-size:14px;line-height:1.85;margin:20px 0}.begin{min-width:190px;font-size:17px;padding:13px 22px}.opening-note{font-size:10px;margin-top:16px}.opening-mouse{height:34%;width:43%;bottom:3%;right:6%}.opening:after{background:linear-gradient(180deg,#eaf8e5f7,#eaf8e5e6 46%,#eaf8e530 75%)}.opening-land{background-size:auto 100%;background-position:65% center}.map-toolbar{top:16px;left:12px;right:12px;align-items:flex-start;gap:8px}.map-toolbar p{font-size:11px;max-width:68%;padding:10px 12px;line-height:1.7}.map-toolbar .quiet{font-size:11px;padding:9px}.map-caption{bottom:25px;padding:13px 18px;max-width:90%}.map-caption p{font-size:14px}.map-caption small{font-size:10px}.disc{width:44px;height:44px;font-size:20px;border-width:2px;box-shadow:0 3px #a77e38}.node{width:105px;min-height:44px}.node-name{font-size:10px;margin-top:5px;padding:3px 6px}.marker{width:30px;height:32px;bottom:calc(100% + 4px)}.ending-card{padding:25px 19px;gap:15px}.ending-card .eyebrow{font-size:10px}.ending-card .medal{height:155px;width:155px}.ending h2{font-size:32px}.ending-card p{font-size:12px}.ending-card .mastery{font-size:14px}.ending-card .primary{font-size:12px}.skill-seals{gap:6px}.skill-seals span{font-size:10px}.ending-lighthouse-rig{width:min(45vw,48dvh);right:-12%}.ending-lighthouse{opacity:.45}}
@media(max-width:500px){.disc{width:38px;height:38px}.node{width:94px}.node-name{font-size:9px;margin-top:4px;padding:3px 5px}.marker{bottom:calc(100% + 5px);height:26px;width:26px}.node.current .disc{box-shadow:0 3px #a77e38,0 0 0 4px #fff7b877}.map-board{width:100vw}.map-toolbar p{max-width:65%}.map-caption small{max-width:260px;line-height:1.7}.ending-card{gap:12px}.ending-card .medal{height:140px;width:140px}.result-art{height:90px}}
@media(max-height:540px) and (max-width:760px){.brief{max-height:30%;grid-template-columns:1fr;padding:8px 12px;gap:5px}#skill-art,#story{display:none}.task-card,#task-status,#hint,#hint-text{grid-column:1}.play-wrap{padding:6px}.scene-title{font-size:11px}.copy-panel{padding:10px 14px}.radio-label{margin-bottom:6px;font-size:11px}.source-text{padding:5px 8px}.source-text span{font-size:16px}.source-text small{font-size:9px}.field-label{font-size:9px;margin-bottom:4px}.paste-target{min-height:32px;padding:8px}.paste-target.pasted{padding:5px}.copy-state{font-size:9px;margin:4px 0}.copy-panel .primary{font-size:10px;padding:7px}.transfer-arrow{font-size:12px}.circuit-switch{width:43px;height:43px}.circuit-switch span{font-size:16px}.circuit-switch small{font-size:8px}.circuit-caption{top:5%;font-size:9px}.circuit-caption b{font-size:12px;margin-top:2px}.camp-lamp span{font-size:9px}.result{gap:6px;padding:10px}.result-art{height:55px}.result .eyebrow{font-size:9px}.result h3{font-size:17px}.result p,.result .next-story{font-size:10px}.result .primary,.result .quiet{font-size:10px;padding:7px 10px}.opening-content{top:7%}.opening-note{display:none}.opening-mouse{height:70%;width:32%;bottom:4%;right:0}.opening-story{font-size:12px;margin:10px 0}.opening .eyebrow{font-size:9px;margin-bottom:10px}h1{font-size:34px}.begin{font-size:14px;padding:8px 15px;min-width:160px}.map-toolbar{top:5px}.map-toolbar p{font-size:9px;padding:7px 9px}.map-caption{bottom:5px;padding:6px 12px}.map-caption p{font-size:11px}.map-caption small{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important}.door-frame #door{transition-duration:.2s}}
.drag-ghost{translate:none!important}
@media(max-height:540px){.ending-card{padding:15px;gap:8px;margin:10px}.ending-card .medal{width:90px;height:90px}.ending h2{font-size:27px}.ending-card .eyebrow{font-size:9px}.ending-card p{font-size:11px;line-height:1.6}.ending-card .mastery{font-size:12px}.ending-card .primary{font-size:11px;padding:9px 16px;margin-top:3px}.skill-seals span{font-size:9px;padding:6px 8px}}
@media(max-height:400px){.ending-card{display:grid;grid-template-columns:100px minmax(0,1fr);gap:7px 14px;padding:16px;width:min(570px,92%)}.ending-card>.eyebrow{grid-column:1/3}.ending-card .medal{grid-column:1;grid-row:2/5;width:100px;height:100px}.ending-card h2,.ending-card p{grid-column:2}.ending-card .skill-seals,.ending-card .primary{grid-column:1/3}.ending h2{font-size:26px}.ending-card .mastery{font-size:11px}.ending-card .primary{margin-top:2px}}
.ending-card{animation:award-reveal .8s ease-out both}
@keyframes award-reveal{from{opacity:0;scale:.98}to{opacity:1;scale:1}}
/* Keep the radio controls and separate bridge pieces visible in short windows. */
@media(max-width:380px){
 .copy-panel{padding:8px}
 .copy-panel .radio-label{margin-bottom:5px}
 .copy-panel .source-text{padding:4px 8px}
 .copy-panel .transfer-arrow{padding:2px}
 .copy-panel .paste-target{min-height:36px;padding:7px}
 .copy-panel .copy-state{margin:4px 0}
 .copy-panel .primary{padding:8px}
}
@media(max-height:540px) and (max-width:760px){
 .scene-title{top:5px;padding:4px 10px}
 .circuit-caption b{display:inline;margin:0 0 0 7px}
 .copy-panel{width:94%;max-height:calc(100% - 12px);overflow-y:auto;padding:8px 10px;display:grid;grid-template-columns:1fr 1fr;gap:4px 10px}
 .copy-panel .radio-label{grid-column:1/3;margin:0;font-size:10px}
 .copy-panel .field-label{margin:0;font-size:9px}
 .copy-panel .field-label:nth-of-type(1){grid-column:1;grid-row:2}
 .copy-panel .field-label:nth-of-type(2){grid-column:2;grid-row:2}
 .copy-panel .source-text{grid-column:1;grid-row:3;padding:4px 6px;min-width:0}
 .copy-panel .source-text span{font-size:14px;padding:3px 6px}
 .copy-panel .paste-target{grid-column:2;grid-row:3;padding:6px;min-height:32px;display:flex;align-items:center;font-size:10px}
 .copy-panel .paste-target.pasted{font-size:14px}
 .copy-panel .transfer-arrow{display:none}
 .copy-panel .copy-state{grid-column:1;grid-row:4;margin:0;align-self:center;font-size:9px;min-height:0}
 .copy-panel .primary{grid-column:2;grid-row:4;padding:6px;font-size:10px;align-self:center}
}
/* Story objects retain their original proportions and visibly reflect each action. */
.energy-case{position:absolute;bottom:10%;left:50%;translate:-50% 0;width:min(290px,80%);padding:10px 18px;border:3px solid #9b7b4b;border-radius:16px;background:#fff3cfe8;text-align:center;box-shadow:0 7px 0 #8e744b44}
.energy-case>span{font-size:12px;font-weight:700;color:#685839}.energy-case>div{display:flex;justify-content:center;gap:14px;margin-top:6px}.energy-case i{width:45px;height:45px;border:1px dashed #b59761;border-radius:9px;background:#dac69955}.energy-case img{width:100%;height:100%}
.supply-bundles{position:absolute;left:50%;bottom:6%;translate:-50% 0;display:flex;align-items:center;justify-content:center;gap:9px;background:#fff7dfed;border-radius:12px;padding:8px 16px;width:max-content;max-width:90%;font-size:12px;font-weight:700}.supply-bundles img{width:28px;height:42px}
.terminal-window{position:absolute;inset:6%;border:6px solid #557c76;border-bottom-width:12px;border-radius:18px;background:linear-gradient(145deg,#edf6e9,#d5e9e6);box-shadow:0 12px 24px #164f472d;overflow:hidden;container-type:size}
.terminal-bar{height:38px;display:flex;align-items:center;gap:8px;padding:0 15px;background:#335f59;color:#fff9df;font-size:13px}.terminal-bar small{margin-left:auto;color:#bfdbca;font-size:11px}.terminal-dot{width:8px;height:8px;background:#b8d994;border-radius:50%}.terminal-instruction{position:absolute;top:19%;width:100%;text-align:center;font-size:14px;color:#446c65}.terminal-foot{position:absolute;bottom:0;width:100%;padding:9px;background:#c4dcd14d;text-align:center;font-size:11px;color:#5f7d71}
.terminal-window .art{max-height:43%;max-width:30%}.terminal-window .object-label{font-size:13px;background:#f8f9e9}.chart-preview{position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;gap:8px;padding:20px;background:radial-gradient(circle at 50% 60%,#fff9da,#f1e5bf);text-align:center}.chart-heading{font-size:24px;font-weight:700;color:#796336}.chart-heading small{display:block;margin-top:5px;font-size:11px;font-weight:400;letter-spacing:.12em}.chart-route{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;padding:15px 5px;background:#fff9e777;border-top:1px solid #cfba7a;border-bottom:1px solid #cfba7a;font-size:14px}.chart-route span{min-width:65px}.chart-route small{font-size:10px;color:#6d7f62}.chart-route i{color:#9f843f;font-size:20px;font-style:normal}.coordinate-card small{display:block;color:#8d7b4e;font-size:12px}.coordinate-card strong{display:block;font-size:36px;letter-spacing:.12em;margin-top:3px;color:#295d58}.chart-preview p{font-size:12px;line-height:1.7;max-width:330px}.chart-preview .primary{font-size:13px;padding:11px 18px}.chart-open{animation:none}
/* Three physical rocker switches in a series supply chain. */
.power-scene .circuit-panel{position:absolute;inset:17% 6% 5%;border:3px solid #78988b;background:linear-gradient(140deg,#fcf9e8,#e9efd9);border-radius:19px;box-shadow:0 10px 24px #214f4933;container-type:size}
.power-scene .circuit-caption{position:absolute;top:4%;width:100%;font-size:clamp(9px,2.8cqh,13px);text-align:center;color:#6b816c}.power-scene .circuit-caption b{display:block;margin-top:3px;font-size:clamp(12px,4.6cqh,21px);color:#2b6256}
.power-chain{position:absolute;left:5%;right:5%;top:22%;height:39%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.power-stage{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;min-height:0}.power-stage h3{font-size:clamp(10px,3.7cqh,17px);color:#405e50;line-height:1.2}.power-scene .circuit-switch{position:relative;left:auto;top:auto;translate:none;display:block;flex:none;width:clamp(37px,14cqh,70px);height:clamp(46px,18cqh,90px);padding:5px;border:2px solid #6d776b;border-radius:9px;background:linear-gradient(125deg,#d8d3b9,#b6b59f);box-shadow:0 3px 0 #8b8e7b,0 5px 8px #34514422;color:#ebeee3}
.power-scene .switch-face{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:6% 0;border-radius:5px;border:1px solid #273f3b;background:linear-gradient(#3b514b 0%,#718179 48%,#718179 50%,#354941 100%);box-shadow:inset 0 5px 4px #112f2b88,inset 0 -3px 1px #b9c5ae;transform:perspective(180px) rotateX(-14deg);transition:transform .15s,background .15s}
.power-scene .switch-face i{font-size:clamp(11px,4.8cqh,21px);font-style:normal;font-family:Arial,sans-serif;line-height:1.15;color:#c2cbbb}.power-scene .circuit-switch small{position:absolute;left:50%;top:calc(100% + 5px);translate:-50% 0;white-space:nowrap;font-size:clamp(8px,2.9cqh,12px);color:#6d7560;line-height:1.2}.power-scene .circuit-switch.on{border-color:#668367;background:linear-gradient(125deg,#e2d8b8,#b5bea0);box-shadow:0 3px 0 #788a70,0 5px 8px #34514422}.power-scene .circuit-switch.on .switch-face{transform:perspective(180px) rotateX(14deg);background:linear-gradient(#346b54,#578567 49%,#3b6d54 51%,#244b3c);box-shadow:inset 0 3px 2px #b4d4a8,inset 0 -5px 4px #153a2e88}.power-scene .circuit-switch.on .switch-face i:first-child{color:#efffc7;text-shadow:0 0 7px #e8ff9c}
.line-state{font-size:clamp(8px,2.7cqh,11px);margin-top:clamp(17px,5cqh,25px);color:#81917c;white-space:nowrap}.line-state:before{content:'';display:inline-block;width:5px;height:5px;border-radius:50%;background:#b6bda8;margin-right:4px;vertical-align:1px}.live .line-state{color:#437657}.live .line-state:before{background:#72ae65;box-shadow:0 0 4px #8bc96d}.chain-link{position:absolute;top:39%;left:calc(100% - 8px);font-size:clamp(16px,6cqh,28px);font-style:normal;color:#bcc6ac}.live .chain-link{color:#6ca36b}
.power-loads{position:absolute;left:8%;right:8%;top:66%;height:20%;display:grid;grid-template-columns:1fr 1fr;gap:12px}.power-scene .camp-lamp,.power-scene .camp-radio{position:relative;top:auto;left:auto;translate:none;width:100%;height:100%;max-width:none;min-height:0;min-width:0;display:grid;grid-template-columns:40% minmax(0,1fr);align-items:center;gap:5px;filter:none;background:#fffcef66;border-radius:9px}.power-loads svg{min-height:0;min-width:0;display:block;width:100%;height:100%;overflow:visible}.power-scene .camp-lamp span,.power-scene .camp-radio span{font-size:clamp(9px,3.1cqh,13px);color:#7b8469;line-height:1.5}.lamp-bulb{fill:#c2c6a7}.lit .lamp-bulb{fill:#fff6a9;filter:drop-shadow(0 3px 5px #f1c854)}.power-scene .lit span,.power-scene .receiving span{color:#3f7050}.radio-screen{fill:#385c54}.radio-wave{opacity:0}.receiving .radio-screen{fill:#d3ef9e}.receiving .radio-wave{opacity:1}
.power-message{position:absolute;left:5%;right:5%;bottom:3%;min-height:7%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:clamp(8px,2.7cqh,12px);line-height:1.5;color:#657958}.powered .power-message{color:#2a6d4f;font-weight:700}
@media(max-width:760px){.terminal-window{inset:7% 4%;border-width:4px;border-bottom-width:9px}.terminal-bar{height:30px;font-size:11px;padding:0 10px}.terminal-bar small{font-size:9px}.terminal-instruction{font-size:12px}.terminal-window .object-label{font-size:11px}.terminal-foot{font-size:9px;padding:7px}.chart-preview{padding:14px;gap:6px}.chart-route{gap:5px;font-size:12px}.chart-route span{min-width:50px}.chart-route i{font-size:15px}.chart-heading{font-size:21px}.chart-preview p{font-size:11px}.coordinate-card strong{font-size:30px}.power-scene .circuit-panel{inset:17% 3% 5%}.power-chain{left:3%;right:3%}.power-loads{left:4%;right:4%;gap:6px}}
@media(max-height:540px) and (max-width:760px){.energy-case{bottom:5%;padding:4px 12px;width:220px}.energy-case>span{font-size:9px}.energy-case>div{margin-top:2px;gap:12px}.energy-case i{height:26px;width:30px}.supply-bundles{bottom:3%;font-size:9px;padding:4px 10px}.supply-bundles img{height:28px;width:19px}.terminal-bar{height:24px;font-size:10px}.terminal-instruction{top:22%;font-size:10px}.terminal-window .object-label{top:77%!important;font-size:9px;padding:2px 8px}.terminal-foot{font-size:8px;padding:3px}.chart-preview{padding:8px 14px;gap:3px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto 1fr auto}.chart-heading{grid-column:1/3;font-size:14px}.chart-heading small{display:inline;font-size:9px;margin-left:10px}.chart-route{font-size:10px;gap:5px;padding:5px;grid-column:1;grid-row:2;height:100%}.chart-route span{min-width:30px}.chart-route small{font-size:8px}.chart-route i{font-size:12px}.coordinate-card{grid-column:2;grid-row:2}.coordinate-card strong{font-size:23px}.coordinate-card small{font-size:9px}.chart-preview p{font-size:9px;grid-column:1;grid-row:3}.chart-preview .primary{font-size:10px;padding:6px 9px;grid-column:2;grid-row:3}.power-scene .circuit-panel{inset:16% 3% 2%;border-width:2px;border-radius:12px}.power-scene .circuit-caption b{display:inline;font-size:11px;margin-left:7px}.power-chain{top:19%;height:43%}.power-scene .circuit-switch{width:32px;height:38px;padding:3px;border-radius:6px}.power-scene .switch-face{border-radius:3px}.power-scene .switch-face i{font-size:10px}.power-scene .circuit-switch small{top:calc(100% + 3px);font-size:8px}.power-stage h3{font-size:9px}.line-state{font-size:8px;margin-top:15px}.chain-link{font-size:16px}.power-loads{top:69%;height:18%}.power-message{bottom:2%;font-size:8px}.power-scene .camp-lamp span,.power-scene .camp-radio span{font-size:8px}}

#bag [data-packed]{opacity:0}#bag.packed [data-packed]{opacity:1}#bag.packed image:not([data-packed]){opacity:0}
