:root { color-scheme: dark; font-family: 'Courier New', monospace; color: #e4eaf5; background: #090e19; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 50% 35%, #18233b 0, transparent 65%); min-height: 100vh; }
button, select, input { font: inherit; }
a { color: #88dacb; text-underline-offset: 4px; }
button { cursor: pointer; border: 1px solid #52617c; background: #1b2941; color: #ecf5ff; padding: 10px 16px; font-weight: bold; }
button:hover { background: #304665; } button:disabled { opacity: .4; cursor: default; }
:focus-visible { outline: 3px solid #ffc978; outline-offset: 4px; }
.arcade-shell { width: min(900px, calc(100% - 32px)); margin: auto; }
header { display: flex; justify-content: space-between; gap: 16px; padding: 26px 0; font-size: 12px; }
.tag, .eyebrow { color: #86a0ba; letter-spacing: 2px; font-size: 11px; }
.title-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 0 24px; }
.eyebrow { margin: 0 0 10px; } h1 { font-size: clamp(36px, 8vw, 62px); line-height: 1; margin: 0; letter-spacing: -3px; } h1 span { color: #88dacb; }
.subtitle { font-size: 12px; line-height: 1.8; color: #94a5ba; text-align: right; }
.cabinet { border: 1px solid #3a4b66; padding: 8px; background: #111b2b; box-shadow: 0 20px 60px #0005; }
.hud { display: flex; justify-content: space-between; gap: 10px; padding: 12px 10px 18px; font-size: 11px; color: #8d9db5; }.hud b { display: block; margin-top: 6px; color: #ffc978; font-size: 17px; }
.hud small { display: block; margin-top: 3px; color: #88dacb; font-size: 8px; letter-spacing: .08em; }
.screen { position: relative; overflow: hidden; background-color: #070b1a; background-image: radial-gradient(circle at 20% 40%, #718bb8 1px, transparent 1px), radial-gradient(circle at 60% 70%, #334966 1px, transparent 1px), linear-gradient(160deg, #121c36, #080b19 65%); background-size: 137px 103px, 79px 61px, 100% 100%; }
canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; touch-action: none; }
.overlay { position: absolute; z-index: 3; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px; text-align: center; background: linear-gradient(180deg, #070b1acc, #070b1a9e 58%, #070b1acc); }
.overlay h2 { margin: 4px 0 8px; color: #edf3ff; font-size: clamp(22px, 5vw, 34px); }
.overlay p { max-width: 520px; }
.overlay > button { margin-top: 8px; min-width: 190px; color: #08111d; background: #88dacb; border-color: #b9fff1; }
.overlay > button:hover { background: #a9f2e5; }
.overlay[hidden], .overlay [hidden] { display: none !important; }
.console { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 8px 4px; font-size: 11px; color: #aabacf; }.console button { padding: 7px 12px; } kbd { font-family: inherit; color: #ecf5ff; }
.hint { text-align: center; color: #91a3ba; font-size: 12px; line-height: 1.8; margin: 22px 0 28px; }
.touch-controls { display: flex; justify-content: center; gap: 12px; margin-top: 15px; }.touch-controls button { touch-action: none; user-select: none; min-width: 52px; min-height: 46px; }
@media (pointer: fine) { .touch-controls { display: none; } }
.art-lab { border-top: 1px solid #2b3850; padding: 20px 0; font-size: 12px; color: #aabacf; line-height: 1.7; }summary { cursor: pointer; color: #dae4f4; }summary span { color: #7e93af; }.upload-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }.upload-row label { display: grid; gap: 6px; }.upload-row input { max-width: 260px; }select { padding: 8px; background: #1b2941; color: white; }footer { border-top: 1px solid #27364a; padding: 20px 0 30px; font-size: 10px; color: #7186a2; display: flex; justify-content: space-between; gap: 12px; }.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 540px) { .subtitle, .tag { display: none; }.hud { font-size: 9px; padding-inline: 3px; }.hud b { font-size: 14px; }.console { font-size: 9px; }.overlay .eyebrow { display: none; }.overlay p:not(.eyebrow) { font-size: 11px; margin: 8px 0; }.overlay button { padding: 9px 18px; } }
@media (max-width: 700px) and (pointer: coarse) { body { overscroll-behavior: none; } .arcade-shell { width: 100%; padding: 0 10px; } header { padding: 14px 0; } .title-row { padding: 8px 0 14px; } .cabinet { padding: 4px; } .touch-controls { display: none; } .hint { margin: 12px 0 18px; } .art-lab { display: none; } }
.mobile-portrait-gate { display: none; }
.mobile-stick { display: none; }
.leaderboard { display: none; }.overlay form { display: grid; gap: 7px; margin: 12px 0 2px; }.overlay form label { color: #ffc978; font-size: 11px; }.overlay form input { width: 70px; padding: 8px; text-align: center; text-transform: uppercase; letter-spacing: 3px; color: #fff; background: #111b2b; border: 1px solid #52617c; }.overlay form button { padding: 8px 12px; }
.overlay-scores { width: min(260px, 90%); margin: 8px auto 12px; padding-left: 24px; color: #dce8f4; font-size: 11px; text-align: left; }.overlay-scores li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }.overlay-scores time { color: #8195ac; font-size: 9px; }
@media (pointer: coarse) and (orientation: portrait) {
  .mobile-portrait-gate { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px; text-align: center; color: #e4eaf5; background: #080d18; }
  .mobile-portrait-gate strong { font-size: 20px; color: #88dacb; }
  .mobile-portrait-gate span { color: #aabacf; font-size: 12px; }
  .rotate-icon { font-size: 58px; line-height: 1; color: #ffc978; transform: rotate(-35deg); }
}
@media (pointer: coarse) and (orientation: landscape) {
  html, body { width: 100%; height: 100%; min-height: 100svh; overflow: hidden; background: #070b1a; }
  .arcade-shell { width: 100vw; height: 100dvh; padding: 0; display: block; }
  header, .title-row, .console, .hint, .art-lab, footer, .touch-controls { display: none; }
  .cabinet { width: 100vw; height: 100dvh; min-height: 0; padding: 0; border: 0; box-shadow: none; background: #070b1a; }
  .hud { position: absolute; z-index: 2; inset: 0 0 auto; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); background: linear-gradient(#070b1acc, transparent); font-size: 9px; pointer-events: none; }
  .hud b { margin-top: 2px; font-size: 12px; }
  .screen { width: 100vw; height: 100svh; min-height: 0; display: block; }
  canvas { width: 100vw; height: 100svh; image-rendering: pixelated; }
  .overlay { padding: 12px; overflow: auto; }
  .overlay h2 { font-size: clamp(20px, 5vw, 30px); }
  .overlay-scores { width: min(320px, 92vw); margin: 4px auto 8px; font-size: 10px; }
  .overlay-scores li { padding: 1px 0; }
  .mobile-stick { position: absolute; z-index: 4; left: auto; right: max(18px, env(safe-area-inset-right)); top: auto; bottom: max(18px, env(safe-area-inset-bottom)); display: grid; place-items: center; width: clamp(112px, 18vw, 180px); height: clamp(112px, 18vw, 180px); border: 1px solid #b9eaff55; border-radius: 50%; background: #16334b38; opacity: .8; touch-action: none; }
  .mobile-stick span { width: 40%; height: 40%; border: 1px solid #d8f6ff88; border-radius: 50%; background: #80dfff38; transform: translate(var(--stick-x, 0), var(--stick-y, 0)); }
}
