:root {
  --you: #2de2ff; --them: #ff4fd8; --ink: #e6f2ff; --dim: #5f6f8a; --bg: #000;
  --display: "Orbitron", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow-x: hidden; }
body { font-family: ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  background: radial-gradient(120% 80% at 50% -10%, #0a1426 0%, #000 60%) fixed; }
button { font: inherit; color: inherit; }
.app { min-height: 100%; display: flex; flex-direction: column; padding: 14px var(--gutter) 10px; max-width: 1600px; margin: 0 auto; }

.bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 12px; }
.brand { font-family: var(--display); font-weight: 900; letter-spacing: 0.22em; font-size: 15px; display: flex; gap: 10px; align-items: baseline; }
.brand .vs { font-weight: 500; font-size: 10px; color: var(--dim); letter-spacing: 0.2em; }
.you { color: var(--you); text-shadow: 0 0 12px rgba(45,226,255,0.7); }
.them { color: var(--them); text-shadow: 0 0 12px rgba(255,79,216,0.7); }
.score { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: 0.08em; display: flex; gap: 10px; }
.score .dash { color: var(--dim); }
.score span { transition: transform 0.25s ease, text-shadow 0.25s ease; display: inline-block; }
.score span.bump { transform: scale(1.35); }
.right { justify-self: end; display: flex; align-items: center; gap: 14px; }
.pick { display: flex; border: 1px solid rgba(255,255,255,0.18); border-radius: 6px; overflow: hidden; }
.pick a { font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: 0.18em; padding: 5px 8px; color: var(--dim); text-decoration: none; }
.pick a.on { color: #000; background: var(--them); }
.pick a:focus-visible { outline: 2px solid var(--them); outline-offset: -2px; }
.stats { font-family: var(--mono); font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.icon { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(120,180,255,0.18); background: rgba(255,255,255,0.02); cursor: pointer; display: grid; place-items: center; }
.icon svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon .x { display: none; }
.icon.muted .wave { display: none; }
.icon.muted .x { display: inline; stroke: var(--them); }
.icon:hover { border-color: rgba(120,180,255,0.4); }

.stage { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 18px; min-height: 0; }
.arena-wrap { position: relative; aspect-ratio: 1; height: min(calc(100vh - 110px), 62vw); max-width: 100%; border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(90,180,255,0.14), 0 0 60px rgba(45,140,255,0.08); touch-action: none; }
#arena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.brain-wrap { position: relative; min-height: 300px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(90% 70% at 50% 30%, rgba(14,28,56,0.55), rgba(0,0,0,0.9)); box-shadow: inset 0 0 0 1px rgba(90,180,255,0.08); }
#brain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.zoom { position: absolute; top: 10px; right: 10px; width: min(270px, 46%); padding: 9px 11px 10px; border-radius: 10px;
  background: rgba(2,6,16,0.82); backdrop-filter: blur(4px); box-shadow: 0 0 0 1px rgba(120,180,255,0.16), 0 0 24px rgba(40,120,255,0.12);
  font-family: var(--mono); font-size: 10.5px; line-height: 1.4; color: #b9c8e0; pointer-events: none; opacity: 0; transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease; }
.zoom.on { opacity: 1; transform: none; }
.zoom .zh { display: flex; gap: 6px; align-items: baseline; margin-bottom: 4px; flex-wrap: wrap; }
.zoom .zn { font-weight: 700; letter-spacing: 0.04em; font-size: 11px; }
.zoom .zf, .zoom .zs { font-size: 9px; padding: 0 5px; border-radius: 6px; border: 1px solid rgba(160,190,240,0.25); color: #9fb2d0; }
.zoom .zs { border-color: rgba(255,196,90,0.55); color: #ffc45a; }
.zoom .zr { color: #e6f2ff; font-size: 11.5px; }
.zoom .ze { color: #7f91ad; font-size: 9.5px; margin-top: 1px; }
.zoom .zc { margin-top: 5px; font-size: 9.5px; color: #8fa0bb; }
.zoom .zc.ok { color: #ffd690; }
.zoom .dim { color: #6f7f99; }
.zoom .za { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 9px; color: #6f7f99; }
.zoom .za i { flex: 1; height: 4px; border-radius: 2px; background: rgba(120,160,220,0.12); overflow: hidden; }
.zoom .za b { display: block; height: 100%; width: 0; background: #7ff0ff; box-shadow: 0 0 6px rgba(127,240,255,0.8); }
.zoom .za em { font-style: normal; color: #b9c8e0; min-width: 30px; text-align: right; }
.zoom .zk { margin-top: 5px; font-size: 9px; color: #6f7f99; display: flex; align-items: center; gap: 4px; }
.zoom .zk span { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.zoom .zk .e { background: #ffc45a; } .zoom .zk .n { background: #9678ff; margin-left: 4px; }

.overlay { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; transition: background 0.4s ease; }
.overlay.dim { background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); }
.panel { text-align: center; padding: 20px; transition: opacity 0.3s ease, transform 0.3s ease; }
.panel.hide { opacity: 0; transform: scale(0.96); }
.big { font-family: var(--display); font-weight: 900; font-size: clamp(30px, 6vw, 64px); letter-spacing: 0.12em; }
.big.count { font-size: clamp(64px, 14vw, 150px); color: var(--ink); text-shadow: 0 0 30px rgba(120,200,255,0.8); animation: pop 0.5s ease-out; }
.sub { margin-top: 10px; color: #a9b8d0; font-size: 14px; line-height: 1.5; }
.go-hint { margin-top: 18px; font-family: var(--display); font-size: 12px; letter-spacing: 0.3em; color: var(--ink); opacity: 0.85; animation: breathe 1.8s ease-in-out infinite; }
.status { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-top: 12px; }
.spinner { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; border: 2px solid rgba(45,226,255,0.15); border-top-color: var(--you); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { opacity: 0.35; } }
@keyframes pop { from { transform: scale(1.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.touch { display: none; }
.hint { margin-top: 8px; text-align: center; font-family: var(--mono); font-size: 11px; color: #3c4a60; }
.hint .mob { display: none; }

@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .app { padding-top: 10px; }
  html, body { height: auto; min-height: 100%; }
  .app { min-height: 100vh; }
  .stage { grid-template-columns: minmax(0, 1fr); gap: 12px; flex: 0 0 auto; }
  .arena-wrap { width: 100%; height: auto; }
  .brain-wrap { aspect-ratio: 0.6; min-height: 0; }
  .zoom { width: auto; left: 10px; right: 10px; top: 8px; }
  .score { font-size: 22px; }
  .brand { font-size: 13px; letter-spacing: 0.16em; }
  .right { gap: 8px; }
  .stats { font-size: 10.5px; }
}
@media (pointer: coarse) {
  .touch { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; order: 3; }
  .turn { flex: 1; height: 54px; border-radius: 12px; border: 1px solid rgba(45,226,255,0.25); background: rgba(45,226,255,0.05); display: grid; place-items: center; }
  .turn svg { width: 22px; height: 22px; fill: none; stroke: var(--you); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
  .hint .desk { display: none; }
  .hint .mob { display: inline; }
}

.brain-wrap { position: relative; }
.views { position: absolute; left: 8px; top: 8px; z-index: 2; background: rgba(0,0,0,0.45); }
