:root { --cyan: #00fcfe; --navy: #010a2c; --ink: #e8fbff; --muted: #8fb3c9; color-scheme: dark; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--navy); color: var(--ink);
  font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; touch-action: none; user-select: none; -webkit-user-select: none; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#hud { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 6px; padding: 0 8px; pointer-events: none; }
.hbox { background: rgba(1, 10, 44, .72); border: 1px solid rgba(0, 252, 254, .4); padding: 4px 12px; text-align: center; min-width: 78px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.hbox small { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.hbox b { font-size: 22px; font-weight: 900; color: var(--cyan); font-variant-numeric: tabular-nums; }
.hbox.combo b { color: #ffd84a; }
.hbox.combo.hot { border-color: #ff8a2b; background: rgba(90, 20, 0, .7); }
.hbox.combo.hot b { color: #ff9a3c; text-shadow: 0 0 12px rgba(255, 120, 40, .8); }
.hbox.bump { animation: bump .35s ease-out; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.hbtn { pointer-events: auto; width: 44px; height: 44px; border: 1px solid rgba(0, 252, 254, .4); background: rgba(1, 10, 44, .72); color: var(--cyan);
  font-size: 22px; border-radius: 10px; cursor: pointer; }

.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(600px 400px at 50% 20%, rgba(0, 252, 254, .15), transparent 70%), rgba(1, 10, 44, .86); overflow-y: auto; }
.screen[hidden], #hud[hidden], [hidden] { display: none !important; }
.panel { width: min(420px, 100%); text-align: center; }
h1 { margin: 6px 0 4px; font-size: 64px; line-height: .95; font-weight: 900; font-style: italic; letter-spacing: 2px;
  color: var(--cyan); text-shadow: 0 0 24px rgba(0, 252, 254, .5); }
h1 span { display: block; color: #ff5cc8; text-shadow: 0 0 24px rgba(255, 92, 200, .5); }
h2 { margin: 0; font-size: 38px; font-weight: 900; font-style: italic; color: #ff5c8a; }
.sub { color: var(--muted); margin: 10px 0 8px; }
.bestline { margin: 4px 0; color: #ffd84a; font-weight: 800; }
.big { font-size: 64px; font-weight: 900; margin: 6px 0 0; color: var(--cyan); font-variant-numeric: tabular-nums; }
.newbest { font-size: 22px; font-weight: 800; color: #ffd84a; margin: 0 0 8px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.stats div { background: rgba(0, 252, 254, .08); border: 1px solid rgba(0, 252, 254, .25); padding: 8px 6px; }
.stats b { display: block; font-size: 22px; color: var(--cyan); }
.stats small { color: var(--muted); font-size: 13px; }
.diffs { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 16px; }
.diff { font: inherit; font-size: 22px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; border: 0; padding: 14px 20px; min-height: 64px;
  color: var(--navy); cursor: pointer; clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); transition: transform .1s, filter .1s; }
.diff small { display: block; font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: none; opacity: .8; }
.diff:hover { filter: brightness(1.1); } .diff:active { transform: scale(.98); }
.diff.easy { background: #4dff9a; } .diff.go { background: var(--cyan); } .diff.alt { background: #2b3f7a; color: var(--ink); font-size: 18px; min-height: 52px; }
.how { font-size: 15px; color: var(--muted); border-top: 1px solid rgba(0, 252, 254, .25); padding-top: 10px; text-align: left; }
.how p { margin: 6px 0; } .how b { color: var(--ink); }
.home { display: inline-block; color: var(--muted); text-decoration: none; font-weight: 700; padding: 10px; }
.home:hover { color: var(--cyan); }
