/* Squipy Beam Bike: neon grid light-bike duel. Animations use transform/opacity only (no animated filters). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --bg: #060914; --cream: #e8eef8; --purple: #a78bfa; --cyan: #3df0ff; --gold: #fbbf24; --pink: #ff4fd8; }
html, body { height: 100%; background: var(--bg); color: var(--cream); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
#app { height: 100%; display: flex; flex-direction: column;
  background: radial-gradient(ellipse 70% 45% at 50% -5%, rgba(124, 58, 237, 0.24), transparent 55%), radial-gradient(ellipse 50% 40% at 90% 85%, rgba(61, 240, 255, 0.1), transparent 50%), var(--bg); }
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: max(.45rem, env(safe-area-inset-top)) .85rem .3rem; flex-shrink: 0; }
.home-link { color: #7dd3fc; text-decoration: none; font-size: .78rem; font-weight: 650; letter-spacing: .06em; }
.logo { font-size: .95rem; font-weight: 800; letter-spacing: .08em; }
.logo span { color: var(--cyan); text-shadow: 0 0 12px rgba(61, 240, 255, .55); }
.version { font-size: .62rem; letter-spacing: .1em; opacity: .45; color: #86efac; }
.hud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem .7rem; padding: .1rem .6rem .35rem; flex-shrink: 0; }
.hud[hidden] { display: none !important; }
.round { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.scores { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; }
.scores li { display: flex; align-items: center; gap: .35rem; padding: .22rem .55rem; border-radius: .5rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); font-size: .78rem; font-weight: 700; }
.scores li.out { opacity: .4; }
.scores .dot { width: .6rem; height: .6rem; border-radius: 2px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.scores .pips { letter-spacing: .1em; color: var(--c); font-variant-numeric: tabular-nums; }
.stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0; touch-action: none; overflow: hidden; }
#game { position: absolute; inset: 0; display: block; background: #05040f; touch-action: none; }
.time { position: absolute; top: .55rem; left: .7rem; z-index: 5; font-size: .85rem; font-weight: 800; letter-spacing: .08em; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 8px rgba(167,139,250,.8); pointer-events: none; }
.pause-btn { position: absolute; top: .45rem; right: .6rem; z-index: 8; width: 2.7rem; height: 2.3rem; display: flex; gap: .3rem; align-items: center; justify-content: center; border-radius: .2rem .7rem .2rem .7rem; border: 1.5px solid rgba(61,240,255,.7); background: rgba(10,8,34,.6); box-shadow: 0 0 12px rgba(61,240,255,.25); cursor: pointer; }
.pause-btn span { width: .32rem; height: 1rem; border-radius: 2px; background: #3df0ff; }
.minimap { position: absolute; z-index: 5; right: .6rem; top: 3.2rem; width: 96px; height: 96px; border-radius: .45rem; border: 1px solid rgba(167,139,250,.55); pointer-events: none; opacity: .92; }
.count { position: absolute; left: 50%; top: 38%; z-index: 6; transform: translate(-50%, -50%); font-size: clamp(3rem, 14vw, 6rem); font-weight: 900; color: #fff; text-shadow: 0 0 22px #a78bfa, 0 0 6px #3df0ff; pointer-events: none; }
.count.tick { animation: cnt .45s ease-out both; }
@keyframes cnt { from { opacity: 0; transform: translate(-50%, -50%) scale(1.35); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.banner { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-size: clamp(1.4rem, 6vw, 2.6rem); font-weight: 900; letter-spacing: .08em; text-align: center; pointer-events: none; color: #fff; text-shadow: 0 0 18px var(--bc, var(--cyan)), 0 0 4px var(--bc, var(--cyan)); white-space: nowrap; z-index: 6; }
.banner[hidden] { display: none; }
.banner.pop { animation: pop .5s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.touch-pad { position: absolute; inset: auto 0 max(.6rem, env(safe-area-inset-bottom)) 0; display: flex; justify-content: space-between; padding: 0 max(.75rem, env(safe-area-inset-left)); pointer-events: none; z-index: 7; }
.touch-pad[hidden] { display: none; }
.tbtn { pointer-events: auto; width: 4.2rem; height: 4.2rem; border-radius: 50%; border: 2px solid rgba(61,240,255,.45); background: rgba(8,16,30,.55); color: var(--cyan); font-size: 1.5rem; touch-action: none; opacity: .8; transition: transform .08s, opacity .08s; }
.tbtn:active, .tbtn.on { transform: scale(.92); opacity: 1; }
.hint { flex-shrink: 0; text-align: center; font-size: .68rem; opacity: .42; padding: .25rem .75rem max(.45rem, env(safe-area-inset-bottom)); }
.overlay { position: fixed; inset: var(--rg-bar, 0) 0 0 0; z-index: 40; display: grid; place-items: center; padding: 1rem; background: rgba(4, 7, 16, .74); overflow-y: auto; }
.overlay[hidden] { display: none !important; }
.panel { width: min(27rem, 100%); padding: 1.3rem 1.15rem 1.1rem; border-radius: 1rem; border: 1px solid rgba(61, 240, 255, .3); background: linear-gradient(165deg, #141a30, #0a0e1b); box-shadow: 0 22px 50px rgba(0,0,0,.5), 0 0 30px rgba(61,240,255,.06); text-align: center; animation: rise .35s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.small-panel { width: min(16rem, 100%); }
.eyebrow { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #7dd3fc; opacity: .85; margin-bottom: .35rem; }
.panel h2 { font-size: 1.55rem; font-weight: 850; letter-spacing: .02em; margin-bottom: .45rem; background: linear-gradient(90deg, #c4b5fd, #3df0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subtitle, .small { font-size: .84rem; line-height: 1.45; opacity: .78; margin-bottom: .8rem; }
.small { font-size: .78rem; }
.tabs { display: flex; gap: .35rem; justify-content: center; margin: .3rem 0 .8rem; }
.tab { flex: 1; padding: .5rem; border-radius: .55rem; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: inherit; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.tab[aria-selected="true"] { border-color: var(--cyan); background: rgba(61,240,255,.12); color: #fff; box-shadow: 0 0 14px rgba(61,240,255,.18); }
.field { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: .5rem 0; }
.flabel { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; opacity: .65; text-align: left; }
.seg { display: inline-flex; border-radius: .55rem; border: 1px solid rgba(255,255,255,.12); overflow: hidden; }
.seg button { padding: .42rem .7rem; background: transparent; border: 0; color: inherit; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.seg button + button { border-left: 1px solid rgba(255,255,255,.1); }
.seg button[aria-checked="true"] { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: .8rem 0 .4rem; }
.btn { min-width: 6.5rem; padding: .58rem .95rem; border-radius: .55rem; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.07); color: inherit; font: inherit; font-weight: 750; font-size: .9rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn.primary { background: linear-gradient(135deg, #a78bfa, #7c3aed); border-color: transparent; color: #fff; box-shadow: 0 0 18px rgba(167,139,250,.3); }
.btn.ghost { background: transparent; }
.btn.tiny { min-width: 0; padding: .25rem .5rem; font-size: .72rem; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, .tab:focus-visible, .seg button:focus-visible, .tbtn:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.join { display: flex; gap: .45rem; align-items: center; justify-content: center; margin-top: .6rem; flex-wrap: wrap; }
.join input { width: 7.5rem; padding: .52rem .6rem; border-radius: .55rem; border: 1px solid rgba(61,240,255,.35); background: #070c1a; color: #fff; font: inherit; font-size: 1rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; text-align: center; -webkit-user-select: text; user-select: text; }
.code-line { font-size: .9rem; margin-bottom: .3rem; }
.code-line strong { font-size: 1.6rem; letter-spacing: .25em; color: var(--cyan); text-shadow: 0 0 12px rgba(61,240,255,.5); margin-left: .3rem; }
.small a { color: #7dd3fc; }
.seats { list-style: none; display: grid; gap: .3rem; margin: .6rem 0; text-align: left; }
.seats li { display: flex; align-items: center; gap: .5rem; padding: .38rem .6rem; border-radius: .5rem; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); font-size: .84rem; }
.seats .dot { width: .65rem; height: .65rem; border-radius: 2px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.seats .empty { opacity: .45; }
.net-status { min-height: 1.1em; font-size: .78rem; color: #fcd34d; margin-top: .4rem; }
.final { font-size: 1.05rem; font-weight: 800; margin: .4rem 0; }
.hint-keys { font-size: .7rem; opacity: .5; margin-top: .55rem; }
kbd { display: inline-block; min-width: 1.15rem; padding: .06rem .28rem; border-radius: .25rem; border: 1px solid rgba(255,255,255,.25); font: inherit; font-size: .68rem; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  /* gentler versions, not removed */
  .banner.pop { animation: fade .6s ease-out both; }
  .panel { animation: fade .45s ease-out both; }
  .tbtn { transition-duration: .15s; }
  .count.tick { animation: fade .5s ease-out both; }
  .tbtn:active, .tbtn.on { transform: scale(.97); }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.stage.touch .touch-pad { bottom: max(.5rem, env(safe-area-inset-bottom)); }
