/* The playground's tokens: neutral and borderless, surfaces one step off the canvas. Teal marks the human, as targets did. */
:root {
  --canvas: #0a0a0a; --glass: rgba(18, 18, 18, 0.78); --subtle: rgba(255, 255, 255, 0.06); --selected: rgba(255, 255, 255, 0.14);
  --line: #2e2e2e; --ink: #ededed; --body: #d4d4d4; --muted: #a3a3a3; --faint: #8a8a8a; --bad: #ff6467; --tgt: #5eead4; --gold: #f5d76e;
  --sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--canvas); color: var(--body); font: 14px/20px var(--sans); -webkit-font-smoothing: antialiased; user-select: none; }
#stage, #stage canvas { position: fixed; inset: 0; display: block; }
kbd { font: 500 12px/18px var(--mono); padding: 1px 6px; border-radius: 4px; background: var(--subtle); color: var(--muted); }
a { color: var(--tgt); }

.screen { position: fixed; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.screen.on { display: flex; }
.screen.dim { background: rgba(0, 0, 0, 0.55); }
h1 { margin: 0; font-size: clamp(34px, 6vw, 68px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); text-shadow: 0 2px 24px #000; }
h1 span { color: var(--tgt); }
.tag { margin: 10px 0 26px; font-size: 17px; color: var(--muted); }
.bar { width: min(360px, 80vw); height: 4px; margin: 28px 0 12px; border-radius: 2px; background: var(--subtle); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.15s; }
#load p { margin: 0; color: var(--body); font-variant-numeric: tabular-nums; }
#load small { margin-top: 10px; color: var(--faint); }
#load { background: radial-gradient(ellipse at center, rgba(0,0,0,0.65), rgba(0,0,0,0.15) 70%); }

#title { justify-content: flex-end; padding-bottom: 5vh; background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0) 55%); }
#title h1 { position: absolute; top: 5vh; left: 0; right: 0; }
#title .tag { position: absolute; top: calc(5vh + clamp(38px, 6.6vw, 76px)); left: 0; right: 0; margin: 0; }
#menu { list-style: none; margin: 0; padding: 6px; width: min(460px, 92vw); border-radius: 12px; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
#menu li { display: flex; align-items: baseline; gap: 10px; padding: 9px 14px; border-radius: 8px; cursor: pointer; color: var(--body); }
#menu li b { font-weight: 600; color: var(--ink); font-size: 16px; }
#menu li small { color: var(--faint); margin-left: auto; font: 500 12px var(--mono); }
#menu li.on { background: var(--selected); }
#menu li.meet b { color: var(--tgt); }
.foot { margin: 14px 0 0; color: var(--faint); font-size: 13px; }
.link { margin-top: 8px; background: none; border: 0; color: var(--faint); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
.btn { height: 34px; padding: 0 16px; border: 0; border-radius: 6px; background: var(--selected); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; }
.card { width: min(520px, 94vw); padding: 24px; border-radius: 14px; background: rgba(14, 14, 14, 0.92); text-align: left; }
.card h2 { margin: 0 0 10px; font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); font-weight: 650; }
.card p { margin: 0 0 12px; }
.card .fine { font-size: 12px; line-height: 17px; color: var(--faint); }
.eyebrow { margin: 0 0 2px !important; font-size: 13px; color: var(--muted); }
#r-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 8px 0 12px; }
#r-table td { padding: 7px 8px; font-size: 16px; }
#r-table td:first-child { width: 34px; color: var(--muted); }
#r-table td:last-child { text-align: right; font-family: var(--mono); font-size: 15px; }
#r-table tr.me { background: rgba(94, 234, 212, 0.13); }
#r-table tr.me td:nth-child(2) { color: var(--tgt); font-weight: 600; }
#r-meet { display: flex; gap: 10px; margin: 2px 0 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
#r-meet span { padding: 2px 8px; border-radius: 5px; background: var(--subtle); }
#r-meet span.me { color: var(--tgt); }

#hud { position: fixed; inset: 0; pointer-events: none; display: none; }
#hud.on { display: block; }
#top { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: flex-start; }
#event-name { font-size: 18px; font-weight: 600; color: var(--ink); text-shadow: 0 1px 8px #000; }
#event-name small { margin-left: 8px; font-size: 14px; font-weight: 400; color: var(--muted); }
#timer { font: 500 32px/36px var(--mono); color: var(--ink); text-shadow: 0 1px 10px #000; font-variant-numeric: tabular-nums; }
#board { position: absolute; top: 48px; left: 12px; margin: 0; padding: 6px; list-style: none; border-radius: 10px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); min-width: 190px; }
#board li { display: flex; gap: 8px; padding: 3px 8px; border-radius: 5px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
#board li span:last-child { margin-left: auto; font: 500 13px/20px var(--mono); color: var(--body); }
#board li.me { color: var(--tgt); background: rgba(94, 234, 212, 0.1); }
#message { position: absolute; top: 18vh; left: 0; right: 0; text-align: center; font-size: clamp(40px, 7vw, 76px); line-height: 1; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-shadow: 0 2px 22px #000; }
#message.high { top: 6vh; }
#message.bad { color: var(--bad); }
#message.good { color: var(--tgt); }
#hint { position: absolute; top: 16px; left: 0; right: 0; text-align: center; font-size: 15px; color: var(--ink); text-shadow: 0 1px 8px #000; }
#timing { position: absolute; top: 34vh; left: 0; right: 0; text-align: center; font-size: 26px; font-weight: 650; opacity: 0; }
#timing.show { opacity: 1; }
#timing.perfect { color: var(--tgt); } #timing.clean { color: var(--ink); } #timing.hit, #timing.miss { color: var(--bad); }
#pad { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
#keys { display: flex; gap: 6px; }
#keys b { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 8px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--muted); font: 500 20px var(--mono); }
#keys b.next { background: rgba(94, 234, 212, 0.2); color: var(--tgt); }
#keys b.hit { background: var(--ink); color: #000; }
#keys b.bad { background: rgba(255, 100, 103, 0.5); color: #fff; }
#cadence { width: 158px; height: 4px; border-radius: 2px; background: var(--subtle); overflow: hidden; }
#cadence i { display: block; height: 100%; width: 0; background: var(--tgt); }
#needle { position: relative; width: 150px; height: 78px; display: none; }
#needle.on { display: block; }
#needle .arc { position: absolute; inset: 0; border-radius: 150px 150px 0 0; background: var(--glass); overflow: hidden; }
#needle .sweet { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
#needle .hand { position: absolute; left: 0; bottom: 0; width: 72px; height: 3px; margin-left: 3px; background: var(--ink); transform-origin: 72px 50%; border-radius: 2px; }
#caption { position: absolute; bottom: 92px; left: 12px; max-width: min(420px, 44vw); padding: 5px 10px; border-radius: 8px; background: var(--glass); font-size: 13px; line-height: 18px; color: var(--body); opacity: 0; transition: opacity 0.18s; display: flex; flex-direction: column; }
#caption.on { opacity: 1; }
#caption b { font-size: 11px; font-weight: 500; color: var(--faint); }
#touch { position: fixed; bottom: 12px; left: 0; right: 0; display: none; justify-content: space-between; padding: 0 12px; pointer-events: none; }
#touch button { pointer-events: auto; width: 84px; height: 84px; border-radius: 16px; border: 0; background: var(--glass); color: var(--ink); font-size: 30px; touch-action: none; }
@media (pointer: coarse) { #touch { display: flex; } #pad { bottom: 106px; } #caption { display: none; } }
@media (max-width: 720px) { #board { min-width: 150px; font-size: 12px; } #caption { display: none; } }
body.capture * { transition: none !important; }
#intro { position: absolute; top: 30vh; left: 50%; transform: translateX(-50%); width: min(620px, 90vw); padding: 12px 18px; border-radius: 12px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); text-align: center; font-size: 18px; line-height: 26px; font-weight: 500; color: var(--ink); display: none; }
#intro.on { display: block; }
#board li i { flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; }
