@font-face{font-family:PosterSans;src:url('assets/poster-sans.ttf');font-weight:700;font-display:swap}
@font-face{font-family:Arcade;src:url('assets/arcade.woff') format('woff');font-weight:900;font-display:swap}
:root{color-scheme:dark;--bg:#100e21;--panel:#1a172d;--ink:#fff3e7;--muted:#c7bfda;--line:#4d3c66;--neon:#fc987e;--gold:#ffd29b;--mint:#6af3d2}
*{box-sizing:border-box}[hidden]{display:none!important}
html{scroll-behavior:smooth}
body{margin:0;background:radial-gradient(ellipse at 80% 20%,#27183e 0%,transparent 60%),var(--bg);color:var(--ink);font:1rem/1.5 system-ui,sans-serif}
.dock{width:min(100% - 2rem,75rem);margin-inline:auto}.top{border-bottom:1px solid #392e4d;background:#100d1f}.top .dock,.brand,.section-top,.actions,.mission-actions,.hud{display:flex;align-items:center;gap:.75rem}.top .dock,.section-top,.hud{justify-content:space-between}.top .dock{min-height:4.2rem}.brand{color:var(--ink);text-decoration:none;font:900 1.18rem Arcade,system-ui}.brand img{border-radius:50%;border:1px solid var(--neon)}.token{color:var(--mint);font-weight:850;letter-spacing:.06em;font-size:.83rem;text-align:right}.token small{font-size:inherit;color:var(--muted)}
.stage{isolation:isolate;position:relative;min-height:clamp(30rem,50vw,39rem);margin-top:1rem;display:flex;align-items:center;border:1px solid var(--line);background:#17152f url('assets/run.webp') 66% 49%/cover;box-shadow:0 2rem 5rem #08061499;overflow:hidden;border-radius:.8rem}
.stage::before{content:'';inset:0;position:absolute;z-index:-1;background:linear-gradient(90deg,#100d23f7 0%,#110b23ed 16%,#170a25b3 39%,transparent 76%),linear-gradient(0deg,#100a20a6,transparent 40%)}
.mission{padding:clamp(1.5rem,6vw,4.85rem);width:100%}.eyebrow{letter-spacing:.19em;color:var(--mint);font-size:.78rem;font-weight:900;margin:0 0 1rem}.eyebrow span{color:var(--neon);margin-right:.4rem}
h1,h2,h3{margin:0}h1{font:900 clamp(2.75rem,8.25vw,7.3rem)/.9 Arcade,system-ui;letter-spacing:-.065em;text-shadow:0 .05em #322147}.mission h1 em{font-style:normal;color:var(--neon);text-shadow:0 .048em #8e375c}.mission>p:not(.eyebrow){font-size:clamp(1.25rem,2.5vw,1.8rem);font-weight:700;margin:1.15rem 0 1.4rem}.mission-actions,.actions{flex-wrap:wrap}.scene-stamp{position:absolute;bottom:1rem;right:1.1rem;color:#fff7eb;text-shadow:0 1px 7px #100a20;font-weight:900;font-size:.76rem;letter-spacing:.14em}.scene-stamp b{display:block;color:var(--gold);font-size:1.2rem;letter-spacing:.1em;text-align:right}
button,.button{display:inline-flex;min-height:2.9rem;align-items:center;justify-content:center;border:1px solid #736089;background:#211935;color:var(--ink);border-radius:.38rem;padding:.6rem .95rem;font:800 .9rem/1.15 system-ui,sans-serif;cursor:pointer;text-decoration:none;text-align:center}.hot{background:var(--neon);border-color:var(--neon);color:#1b1023;box-shadow:0 .24rem #9e405b}button:hover,.button:hover{filter:brightness(1.12)}button:disabled,.button[aria-disabled=true]{opacity:.53;cursor:not-allowed}:focus-visible{outline:3px solid var(--mint);outline-offset:3px}
.game,.shop{margin:1.5rem 0 2.5rem;padding:clamp(1rem,4vw,2.55rem);border:1px solid var(--line);border-radius:.8rem;background:linear-gradient(135deg,#221936,#171328)}.game{scroll-margin-top:1rem}.section-top{padding-bottom:.65rem}.section-top h2,.section-top h3,.section-top span{font-size:.83rem;letter-spacing:.09em;font-weight:850}.section-top span{color:var(--muted)}.hud{background:#0f1022;border:1px solid var(--line);padding:.5rem 1rem;font:800 .85rem/1.5 system-ui;flex-wrap:wrap}.hud b{color:var(--gold);margin-left:.25rem}
canvas{display:block;width:100%;height:auto}#track{background:#100c24;max-height:440px;object-fit:contain}#poster{background:#1d1536;border-radius:.32rem;box-shadow:0 1.3rem 3rem #0e0928aa}
.shop{display:grid;grid-template-columns:minmax(0,.72fr) minmax(0,1fr);align-items:center;gap:clamp(1.45rem,6vw,5rem);scroll-margin-top:1rem}.controls h2{font:900 clamp(2.1rem,5.3vw,4.6rem)/1 Arcade,system-ui;letter-spacing:-.055em;color:var(--gold)}.controls>p:not(.eyebrow){margin:.72rem 0 1.5rem;color:var(--muted)}form,#custom-field{display:grid;gap:.5rem}label{font-weight:750}label:not(:first-child),#custom-field{margin-top:.35rem}input,select,textarea{border:1px solid #6c5886;border-radius:.4rem;min-height:3rem;width:100%;font:inherit;color:inherit;background:#110e24;padding:.6rem .8rem}input::placeholder{color:#bfb7d4}select{padding-right:1.4rem;text-overflow:ellipsis}.error{color:#ffad9f;margin:0}.actions{margin-top:.9rem}.actions>*{flex:1}.note,.status{color:var(--muted);font-size:.86rem;margin:.68rem 0 0}.status{color:var(--mint)}.status:empty{display:none}textarea{margin-top:.55rem}#result{font-weight:750;color:var(--gold)}
@media(max-width:750px){.shop{grid-template-columns:1fr}.stage{min-height:33rem;align-items:end;background-position:64% 35%}.stage::before{background:linear-gradient(0deg,#120b22 5%,#140b24ed 29%,#180e2a46 64%,transparent 95%)}.scene-stamp{top:1rem;bottom:auto}.token small{display:none}.mission{padding:1.3rem}.mission-actions{gap:.55rem}.hud{padding-inline:.5rem}}
@media(max-width:350px){.dock{width:calc(100% - 1.1rem)}.mission-actions .button{flex-basis:100%}.preview .hot{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* The lobby and its two destinations occupy independent screens. */
body{background:#160c25;color:#fff0da}
main{min-height:100svh;display:grid;align-items:center;background:linear-gradient(110deg,#120821cc,#190d2b85),url('assets/night-street.webp') center 55%/cover fixed}
.lobby{min-height:100svh;position:relative;isolation:isolate;display:flex;align-items:center;overflow:hidden;padding:36px max(5vw,24px);background:linear-gradient(90deg,#130b21d9,transparent 85%)}
.key-art{position:absolute;right:3%;height:96%;width:53%;object-fit:contain;filter:drop-shadow(0 12px 28px #06030b);z-index:-1}
.menu{width:min(40vw,500px);text-shadow:0 3px 18px #10071f}
.rating{letter-spacing:.14em;color:#ffd179;font-size:clamp(1rem,2vw,1.65rem)}
.menu h1{font:900 clamp(3rem,6.7vw,7rem)/.9 Arcade,system-ui;letter-spacing:-.065em;color:#fff0d7;margin:1rem 0 2rem}
.menu h1 em{font-style:normal;color:#ffc16b;text-shadow:0 4px #771b32}
.menu-choice{display:flex;width:100%;justify-content:flex-start;text-align:left;gap:1rem;padding:.9rem 1.2rem;margin:.65rem 0;min-height:4.3rem;background:linear-gradient(110deg,#25102def,#46172ee8);border:1px solid #d29865;border-radius:3px;color:#fff4dd;box-shadow:0 5px 15px #16051680;font-size:1.27rem}
.menu-choice b{font-size:1.3rem;color:#ffc16b}.menu-choice small{display:block;margin-top:.23rem;font:.87rem/1.22 system-ui;color:#e4ccdc}
.menu-choice.play{background:linear-gradient(105deg,#ffe1a1,#ffb155);color:#331225;border-color:#ffebbd}.menu-choice.play small,.menu-choice.play b{color:#59293b}
.game,.shop{width:min(calc(100% - 2rem),1050px);margin:2rem auto;background:linear-gradient(120deg,#251329fa,#150d22fa);border-color:#966848;box-shadow:0 1rem 4rem #0b061eaa}
.shop{border-top:4px solid #ffc276}.shop h2{color:#ffcb7d}.shop #back-menu{margin-bottom:1.4rem;min-height:44px}
#track{border:1px solid #816d7c}.game .hud{background:#231a31;color:#ffe2ad}
@media(max-width:740px){
main{background-attachment:scroll}
.lobby{height:100svh;min-height:370px;padding:0;display:grid;grid-template-rows:minmax(0,1fr) auto;justify-items:center;background:linear-gradient(0deg,#130c1df5,#13082080)}
.key-art{position:static;width:100%;height:100%;object-fit:contain;padding:.35rem .45rem 0;z-index:0}
.menu{width:min(100%,570px);padding:.35rem .8rem max(.65rem,env(safe-area-inset-bottom));display:grid;grid-template-columns:.9fr 1.1fr;gap:.5rem}
.menu .rating,.menu h1{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;margin:0}
.menu-choice{margin:0;min-height:54px;padding:.55rem .28rem;justify-content:center;text-align:center;font-size:clamp(.84rem,3.6vw,1.1rem);gap:.35rem}
.menu-choice small{display:none}.menu-choice b{font-size:1rem}
.shop,.game{width:calc(100% - 1rem);margin:.6rem auto}.shop #back-menu{margin-bottom:.8rem}
}
#track{width:100%;height:auto;aspect-ratio:800/510;max-height:57svh;object-fit:contain;background:#160e27}.game .actions button{touch-action:none;user-select:none;-webkit-user-select:none;flex:1}#boost{background:#ffd480;color:#331929}#boost:disabled{background:#352941;color:#d5c3cc}.game .actions{flex-wrap:nowrap}
