: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; gap: 8px; pointer-events: none; }
.hbox { background: rgba(1, 10, 44, .72); border: 1px solid rgba(0, 252, 254, .4); padding: 4px 14px; text-align: center; min-width: 84px;
  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); }

#pad { position: fixed; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: flex-end; padding: 0 12px; gap: 10px; }
.pbtn { width: 96px; height: 96px; border: 2px solid rgba(0, 252, 254, .7); background: rgba(1, 10, 44, .55); color: var(--cyan);
  font-size: 40px; font-weight: 900; border-radius: 22px; touch-action: none; }
.pbtn.small { width: 72px; height: 52px; font-size: 24px; border-radius: 16px; }
.pbtn.on { background: rgba(0, 252, 254, .35); color: #fff; }
.pmid { display: flex; flex-direction: column; gap: 8px; }
@media (hover: hover) and (pointer: fine) { #pad { display: none; } }

.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, .78); overflow-y: auto; }
.screen[hidden], #hud[hidden], #pad[hidden] { display: none; }
.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: #ffb12b; text-shadow: 0 0 24px rgba(255, 177, 43, .5); }
h2 { margin: 0; font-size: 38px; font-weight: 900; font-style: italic; color: #ff5c8a; }
.sub { color: var(--muted); margin: 10px 0 14px; }
.pick { margin: 18px 0 8px; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--cyan); }
.big { font-size: 64px; font-weight: 900; margin: 6px 0 0; color: var(--cyan); }
.newbest { font-size: 22px; font-weight: 800; color: #ffd84a; margin: 0 0 8px; }
.diffs { display: flex; flex-direction: column; gap: 12px; margin: 10px 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.medium { background: #ffd84a; } .diff.hard { background: #ff5c8a; }
.diff.go { background: var(--cyan); } .diff.alt { background: #2b3f7a; color: var(--ink); }
.how { font-size: 15px; color: var(--muted); border-top: 1px solid rgba(0, 252, 254, .25); padding-top: 10px; }
.how p { margin: 6px 0; } .how b { color: var(--ink); }
.sw { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin: 0 4px 0 8px; border-radius: 3px; }
.sw.jump { background: #ffd84a; } .sw.boost { background: #4dff9a; } .sw.ice { background: #bfe9ff; } .sw.crumble { background: #c77b3d; }
.home { display: inline-block; color: var(--muted); text-decoration: none; font-weight: 700; padding: 10px; }
.home:hover { color: var(--cyan); }
