:root{color-scheme:dark;--page:#192336;--ink:#101a2a;--frame:#283950;--line:#415269;--cream:#fff3d5;--muted:#b8c7d1;--gold:#ffd478;--mint:#8bd9bd;--mono:"SFMono-Regular",Menlo,Consolas,monospace;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
*{box-sizing:border-box}body{margin:0;min-height:100svh;color:var(--cream);background-color:var(--page);background-image:radial-gradient(#2c3b50 0.8px,transparent 1px);background-size:8px 8px}button{font:inherit;cursor:pointer;touch-action:manipulation;color:inherit;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid white;outline-offset:4px}button:disabled{cursor:default}canvas{image-rendering:pixelated}
.shell{width:min(100% - 48px,1000px);margin:0 auto;padding:26px 0 30px}.mast,.tools,.brand,.hud,.level-head,.console,.route-head,.stage,.instruction,.action,.tool{display:flex;align-items:center}.mast,.hud,.console,.route-head{justify-content:space-between}.mast{margin-bottom:21px}.brand{gap:10px}.brand #logo{width:71px;height:auto}.brand h1{margin:0;line-height:1}.brand #wordmark{display:block;width:240px;height:auto;filter:drop-shadow(0 3px #101927)}.tools{gap:9px}.tool{min-height:40px;gap:8px;justify-content:center;border:1px solid #55657c;border-radius:7px;background:#26364d;padding:0 12px;font-weight:630;font-size:13px;box-shadow:0 3px #101a2a}.tool:hover,.stage:not(:disabled):hover{background:#344960}.tool b{font:900 14px var(--mono);border:1.5px solid;border-radius:50%;width:17px;height:17px;line-height:14px}.tool canvas{width:19px;height:19px}
.cabinet{border:2px solid #536379;border-radius:13px;background:var(--frame);padding:0 10px;box-shadow:inset 0 2px #65748a,0 5px 0 #101927,0 11px 25px #0f18254d}.hud{min-height:70px;padding:10px 15px 9px}.level-head{gap:14px}.level-tag{display:flex;align-items:center;gap:7px;font-family:var(--mono);font-weight:900;letter-spacing:.07em;color:var(--gold);background:#1c2a3b;border:1px solid #526075;border-radius:4px;padding:5px 8px}.level-tag span{font-size:11px}.level-tag strong{font-size:16px}.hud h2{font-size:23px;letter-spacing:.035em;line-height:1.3;margin:0}.count{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted);font-weight:650}.count strong{font:900 23px var(--mono);color:var(--cream);font-variant-numeric:tabular-nums}
.screen{-webkit-tap-highlight-color:transparent;position:relative;isolation:isolate;border:3px solid #101a29;background:#ffe3ae;box-shadow:0 1px #66758a;border-radius:5px;overflow:hidden;touch-action:manipulation;user-select:none;cursor:pointer}.screen>canvas{display:block;width:100%;height:auto}.console{gap:14px;min-height:90px;padding:14px 15px 16px}.instruction{gap:12px;min-width:0}.console>.action{flex-shrink:0;white-space:nowrap}.lamp{display:block;align-self:flex-start;flex:none;margin-top:6px;width:9px;height:9px;background:var(--mint);border:2px solid #b5f2d9;box-shadow:0 0 0 3px #203a3d}.instruction b{font-size:16px;letter-spacing:.035em}.instruction p{color:var(--muted);font-size:14px;line-height:1.5;margin:3px 0 0}.action{min-width:175px;min-height:47px;justify-content:center;gap:10px;border:2px solid #3c2f2c;background:var(--gold);color:#342e38;border-radius:7px;padding:7px 16px;font-size:18px;font-weight:850;box-shadow:inset 0 2px #ffeab1,0 4px #b57849,0 6px #142035}.action:not(:disabled):hover{background:#ffdf91}.action:not(:disabled):active{transform:translateY(2px);box-shadow:0 2px #b57849}.action:disabled{background:#34465d;color:#bdccd6;border-color:#506075;box-shadow:inset 0 1px #58677a,0 3px #182536}.play-mark{width:12px;height:14px;background:currentColor;clip-path:polygon(0 0,30% 0,30% 15%,55% 15%,55% 30%,80% 30%,80% 43%,100% 43%,100% 57%,80% 57%,80% 70%,55% 70%,55% 85%,30% 85%,30% 100%,0 100%)}kbd{font:600 11px system-ui;border:1px solid #9f8357;border-radius:4px;padding:1px 4px;opacity:.9}.route{margin-top:24px}.route-head{margin:0 2px 10px}.route h2{margin:0;font-size:16px;letter-spacing:.08em}.route-head>span{font:12px var(--mono);color:var(--muted)}.stages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.stage{min-height:63px;gap:9px;text-align:left;padding:8px 12px;border:1px solid #43526a;border-radius:6px;background:#223046}.stage canvas{width:42px;height:36px;flex:none}.stage small{display:block;font:700 10px var(--mono);letter-spacing:.12em;color:var(--muted);margin-bottom:4px}.stage strong{display:block;font-size:14px;line-height:1.3}.stage:disabled{color:#c2cbd5}.stage:disabled canvas{filter:saturate(.55);opacity:.72}.stage.current{border-color:var(--gold);background:#343b44;box-shadow:inset 3px 0 var(--gold);color:var(--cream)}.stage.current canvas{filter:none;opacity:1}.stage.current small{color:var(--gold)}.stage.done small{color:var(--mint)}
#result{position:absolute;top:7%;left:50%;transform:translateX(-50%);display:flex;gap:12px;align-items:center;min-width:max-content;background:#1d3440f5;color:var(--cream);border:2px solid #8ddac1;box-shadow:3px 4px #25363e80;border-radius:5px;padding:8px 16px;pointer-events:none}#result[hidden]{display:none}#result small{display:block;font:700 10px var(--mono);letter-spacing:.12em;color:var(--mint);margin-bottom:1px}#result strong{font-size:19px}.stamp{color:var(--mint);font-size:25px;font-weight:800}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}dialog{color:var(--cream);background:var(--frame);max-width:min(360px,90vw);padding:24px;border:2px solid #8296aa;border-radius:10px;box-shadow:0 6px #101927}dialog::backdrop{background:#0a1223b8}dialog h2{margin:0 0 12px}dialog p{font-size:15px;line-height:1.65;color:#deebee;margin:0 0 10px}dialog .action{margin-top:18px;width:100%}
@media(max-width:700px){.shell{width:calc(100% - 24px);padding:18px 0}.mast{margin-bottom:16px}.brand #logo{width:57px}.tools{gap:6px}.tool{min-width:44px;min-height:44px;padding:0 9px}.stages{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.stage{min-height:54px}.route{margin-top:19px}}
@media(max-width:520px){.brand{gap:4px}.brand #wordmark{width:clamp(122px,38vw,174px)}.tool span{display:none}.cabinet{padding:0 5px;border-radius:10px}.hud{min-height:56px;padding:8px 7px}.hud h2{font-size:18px}.level-head{gap:8px}.level-tag{display:block;text-align:center;padding:3px 5px}.level-tag span{display:block;font-size:8px}.level-tag strong{font-size:12px}.count{display:block;text-align:right;font-size:10px}.count strong{display:block;font-size:17px}.screen{border-width:2px}.console{align-items:stretch;flex-direction:column;gap:11px;padding:12px 9px 14px}.instruction{gap:9px;min-height:63px;align-items:flex-start}.instruction b{font-size:15px}.instruction p{font-size:13px}.action{width:100%;min-height:46px}.stage{padding:7px 9px;gap:6px}.stage canvas{width:35px;height:30px}.stage strong{font-size:13px}.route-head{margin-bottom:8px}#result strong{font-size:16px}#result{padding:5px 10px}}
@media(pointer:coarse){kbd{display:none}}
@media(max-height:520px) and (orientation:landscape){.shell{width:min(94%,calc((100svh - 116px)*2.16));padding:3px 0}.mast{margin:0 0 2px}.brand #logo{width:27px}.brand #wordmark{width:105px}.tool{min-width:38px;min-height:28px}.hud{min-height:29px;padding:3px 6px}.hud h2{font-size:16px}.level-tag{padding:1px 4px}.console{min-height:37px;padding:4px 5px 8px;align-items:flex-start}.instruction b{font-size:12px}.instruction p{font-size:11px;margin:0}.action{min-height:31px;font-size:14px}.route{margin-top:13px}}
#missKey{position:absolute;left:8px;bottom:8px;background:#293746ec;border:1px solid #798b8a;border-radius:4px;padding:3px 6px;color:#f3e5ce;line-height:1.2;font-size:11px;pointer-events:none}#missKey b{font:900 13px var(--mono);color:#ffb0a0}

.route-head{display:grid;grid-template-columns:auto 1fr auto;gap:12px}.menu-packs{display:flex;gap:5px}
@media(max-width:580px){.route-head{grid-template-columns:1fr auto;gap:7px}.menu-packs{grid-row:2;grid-column:1/-1}}
#chapter{font:650 13px system-ui;color:#e0f0e3;background:#29403f;border:1px solid #87ac9d;border-radius:5px;padding:4px 9px;min-height:34px;max-width:100%;cursor:pointer}
#chapter:focus-visible{outline:3px solid white;outline-offset:3px}.stage[hidden]{display:none}
@media(pointer:coarse){#chapter{min-height:44px}}
.brand .genre{display:block;margin-top:5px;color:var(--muted);font:600 clamp(11px,1.5vw,14px)/1.2 system-ui}
.game-guide{margin-top:28px;border-top:1px solid var(--line);padding:20px 2px 0}
.game-guide h2,.game-guide h3{margin:0;font-size:18px}
.game-guide h3{margin-top:18px;font-size:15px}
.game-guide p{max-width:68ch;color:var(--muted);font-size:15px;line-height:1.55;margin:7px 0 12px}
.guide-return{display:inline-block;color:var(--mint);font-weight:650;padding:8px 0;text-underline-offset:3px}
.guide-return:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.shot-example{max-width:570px;margin:18px 0}
.shot-example img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:6px}
.shot-example figcaption{margin-top:6px;color:var(--muted);font-size:13px;line-height:1.5}
.chapter-notes{max-width:68ch}
.chapter-notes details{border-bottom:1px solid var(--line)}
.chapter-notes summary{padding:12px 2px;min-height:44px;cursor:pointer;font-weight:650}
.chapter-notes summary::marker{color:var(--gold)}
.chapter-notes details[open] summary{color:var(--gold)}
.chapter-notes a{display:inline-block;padding:8px 2px 14px;color:var(--mint);text-underline-offset:3px}
.chapter-notes :is(summary,a):focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media(max-height:520px) and (orientation:landscape){.brand .genre{font-size:10px;margin-top:2px}}

@media (max-height: 520px) and (orientation: landscape) and (pointer: coarse) {
  .console > .action {
    min-height: 44px;
  }
}

.site-footer,.information{width:min(100% - 40px, 900px);margin-inline:auto}
.site-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:22px 0 32px;border-top:1px solid var(--line);font:600 14px/1.5 var(--mono)}
.site-footer nav{display:flex;flex-wrap:wrap;gap:20px}
.site-footer a,.information a{color:var(--mint);text-underline-offset:.22em}
.site-footer a:focus-visible,.information a:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.information{max-width:680px;min-height:65vh;padding:clamp(24px,6vw,70px) 0;line-height:1.7}
.information h1,.information h2{color:var(--gold);line-height:1.2}
.information h2{margin-top:1.7em}.information code{overflow-wrap:anywhere}.information .home-link{font-family:var(--mono)}
