@font-face{font-family:'Bungee';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/bungee-latin-400-normal.woff2') format('woff2')}
@font-face{font-family:'Bungee Shade';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/bungee-shade-latin-400-normal.woff2') format('woff2')}
@font-face{font-family:'Atkinson Hyperlegible';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2')}
@font-face{font-family:'Atkinson Hyperlegible';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2')}

/* Layout: one-screen arcade cabinet — HUD strip, 16:9 big-top canvas, touch pad below (or overlaid in landscape). Single dark look by design. */
:root{
  --night:#170b2c; --plum:#2b1446; --saffron:#ffb21e; --crimson:#e3364e; --teal:#18b6a6; --cream:#fff2da; --muted:#b9a6cf;
  --display:'Bungee', 'Impact', 'Arial Black', sans-serif;
  --shade:'Bungee Shade', 'Bungee', 'Impact', sans-serif;
  --body:'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme:dark;
}
[hidden]{display:none!important}
html,body{margin:0}
html{scroll-behavior:smooth}
html.playing,html.playing body{overflow:hidden}
body{background:var(--night);color:var(--cream);font-family:var(--body);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.app{flex:1;min-height:0;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding-inline:16px;padding-block:8px}
.hud{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;font-family:var(--display);font-size:clamp(11px,2.2vw,15px);letter-spacing:.04em;box-sizing:border-box}
.hud .grow{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--saffron)}
.hud .stat{display:flex;flex-direction:column;align-items:flex-end;line-height:1.05;font-variant-numeric:tabular-nums}
.hud .stat small{font-family:var(--body);font-weight:700;font-size:10px;letter-spacing:.12em;color:var(--muted);text-transform:uppercase}
.hud .lives{color:var(--crimson);letter-spacing:.1em}
.iconbtn{font:inherit;background:var(--plum);color:var(--cream);border:1px solid #4a2b6b;border-radius:8px;width:34px;height:34px;display:grid;place-items:center;cursor:pointer;padding:0}
.iconbtn:focus-visible,.btn:focus-visible{outline:3px solid var(--saffron);outline-offset:2px}
.stagebox{container-type:size;position:relative;line-height:0;border-radius:6px;overflow:hidden;box-shadow:0 0 0 2px #3a1d5c,0 10px 40px rgba(0,0,0,.5)}
canvas{display:block;touch-action:none}
.overlay#ovTitle{background:linear-gradient(180deg,rgba(18,7,34,.86) 0%,rgba(18,7,34,.7) 55%,rgba(18,7,34,.25) 80%,rgba(18,7,34,.1) 100%)}
.overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(6px,2vh,14px);background:rgba(18,7,34,.82);line-height:1.3;text-align:center;padding:12px;box-sizing:border-box;overflow:auto}
.overlay h1{font-family:var(--shade);font-weight:400;font-size:clamp(28px,7vw,72px);margin:0;color:var(--saffron);text-wrap:balance;line-height:1}
.overlay h2{font-family:var(--display);font-weight:400;font-size:clamp(20px,4.5vw,40px);margin:0;color:var(--saffron)}
.overlay p{margin:0;max-width:52ch;color:var(--cream);font-size:clamp(12px,1.8vw,16px)}
.overlay .tag{font-family:var(--display);font-size:clamp(10px,1.6vw,14px);letter-spacing:.2em;color:var(--teal)}
.row{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.btn{font-family:var(--display);font-size:clamp(13px,2vw,18px);letter-spacing:.05em;padding:10px 20px;border-radius:999px;border:0;background:var(--crimson);color:var(--cream);cursor:pointer;box-shadow:0 4px 0 #8f1a2e}
.btn:active{transform:translateY(2px);box-shadow:0 2px 0 #8f1a2e}
.btn.alt{background:var(--plum);box-shadow:0 4px 0 #120624;border:1px solid #4a2b6b}
.acts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;width:min(100%,640px)}
.act{font-family:var(--display);font-size:clamp(9px,1.4vw,12px);background:var(--plum);color:var(--cream);border:1px solid #4a2b6b;border-radius:10px;padding:8px 4px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:2px;line-height:1.2}
.act b{font-size:clamp(16px,3vw,24px);color:var(--saffron);font-weight:400}
.act[disabled]{opacity:.35;cursor:not-allowed}
.medals{font-size:clamp(20px,4vw,34px);letter-spacing:.15em;line-height:1}
.keys{font-size:12px;color:var(--muted)}
.pad{display:none;width:100%;max-width:640px;justify-content:space-between;align-items:center;gap:12px;touch-action:none}
.pad .lr{display:flex;gap:12px}
.pbtn{width:74px;height:74px;border-radius:50%;border:2px solid rgba(255,242,218,.35);background:rgba(43,20,70,.75);color:var(--cream);font-family:var(--display);font-size:16px;display:grid;place-items:center;touch-action:none;padding:0}
.pbtn.jump{width:96px;height:96px;background:rgba(227,54,78,.85);border-color:rgba(255,242,218,.5)}
.pbtn.on{background:var(--saffron);color:var(--night)}
.pbtn svg{width:30px;height:30px;fill:currentColor}
@media (pointer:coarse){ .pad{display:flex} .keys{display:none} }
@media (max-width:560px){ .hud .stat.hi{display:none} }
@media (hover:hover) and (pointer:fine){ .pad{display:flex;max-width:460px} .pbtn{width:48px;height:48px;cursor:pointer} .pbtn svg{width:22px;height:22px} .pbtn.jump{width:auto;height:48px;border-radius:999px;padding:0 22px;font-size:14px} }
@media (pointer:coarse) and (orientation:landscape){
  .app{gap:4px;padding-block:4px}
  .pad{position:fixed;left:0;right:0;bottom:calc(10px + env(safe-area-inset-bottom,0px));max-width:none;padding-inline:max(18px,env(safe-area-inset-left,0px));box-sizing:border-box;pointer-events:none}
  .pad .pbtn{pointer-events:auto;opacity:.8}
  .pbtn{width:64px;height:64px}.pbtn.jump{width:84px;height:84px}
}
.rotate{display:none;margin:0;font-size:12px;color:var(--muted)}
@media (pointer:coarse) and (orientation:portrait){ .rotate{display:block} }
@container (max-height:300px){ .overlay p:not(.keys){display:none} .overlay h1{font-size:30px} .act{padding:4px 2px} .btn{padding:7px 14px} }
@container (max-height:200px){ .overlay .tag{display:none} .acts{gap:4px} .act b{font-size:14px} }
@media (prefers-reduced-motion:reduce){.btn:active{transform:none}}

/* ---------- page shell: the stage fills the screen; the About section and footer sit below it ---------- */
.stage{height:100vh;height:100dvh;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);box-sizing:border-box}
.topbar{display:flex;align-items:center;gap:12px;padding:6px 16px;min-height:40px;box-sizing:border-box;border-bottom:1px solid #2f1a4a}
.topbar .brand{display:flex;align-items:center;flex:none}
.topbar .brand img{height:26px;width:auto;display:block}
.topbar .brand .wordmark{font-family:var(--display);color:var(--cream);font-size:15px;letter-spacing:.06em}
.topbar .name{font-family:var(--display);color:var(--saffron);font-size:15px;letter-spacing:.05em;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar a.how{color:var(--muted);font-size:13px;text-decoration:none;white-space:nowrap}
.topbar a.how:hover,.topbar a.how:focus-visible{color:var(--cream);text-decoration:underline}
@media (max-height:500px){ .topbar{min-height:32px;padding-block:3px} .topbar .brand img{height:20px} .topbar .name{font-size:13px} }
.about{-webkit-user-select:text;user-select:text;max-width:68ch;margin:0 auto;padding-inline:20px;padding-block:56px 32px;line-height:1.6;font-size:16px}
.about h2{font-family:var(--display);font-weight:400;color:var(--saffron);font-size:clamp(22px,4vw,30px);line-height:1.2;margin:40px 0 12px;text-wrap:balance}
.about h2:first-child{margin-top:0}
.about h3{font-family:var(--display);font-weight:400;color:var(--cream);font-size:17px;margin:22px 0 4px;letter-spacing:.03em}
.about p,.about li{color:#e6dcef}
.about ol,.about ul{padding-left:1.2em}
.about li{margin:6px 0}
.about strong{color:var(--cream)}
.about a{color:var(--saffron)}
.about .controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-top:12px}
.about .controls div{background:var(--plum);border:1px solid #4a2b6b;border-radius:10px;padding:12px 14px}
.about .controls h3{margin-top:0}
.about .controls p{margin:0;font-size:15px}
.about .cta{display:inline-block;margin-top:8px}
kbd{font-family:var(--display);font-size:12px;background:#120624;border:1px solid #4a2b6b;border-bottom-width:3px;border-radius:6px;padding:1px 6px;color:var(--cream)}
.site-footer{-webkit-user-select:text;user-select:text;border-top:1px solid #2f1a4a;padding-inline:20px;padding-block:24px calc(24px + env(safe-area-inset-bottom,0px));text-align:center;color:var(--muted);font-size:14px;line-height:1.7}
.site-footer a{color:var(--cream)}
.site-footer img{height:30px;width:auto;display:block;margin:0 auto 10px}
