:root {
  --bg: #070b18;
  --panel: rgba(17, 24, 52, 0.78);
  --panel-solid: #111834;
  --line: rgba(148, 163, 255, 0.16);
  --line-strong: rgba(148, 163, 255, 0.32);
  --text: #eef2ff;
  --muted: #9aa5ce;
  --cyan: #22d3ee;
  --violet: #a855f7;
  --pink: #f472b6;
  --lime: #a3e635;
  --amber: #fbbf24;
  --red: #f43f5e;
  --radius: 18px;
  --display: "Lilita One", "Outfit", system-ui, sans-serif;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1100px 700px at 10% -10%, #24206a 0%, transparent 60%),
              radial-gradient(900px 600px at 105% 0%, #0b4a5f 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  overflow: hidden;
  user-select: none;
}
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.grad { background: linear-gradient(135deg, var(--cyan), var(--violet) 60%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* icons */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
[data-icon] { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- screens ---------- */
.screen { position: fixed; inset: 0; display: none; }
.screen.active { display: block; }
#home { overflow-y: auto; padding: 0 clamp(24px, 3.5vw, 64px) 36px; scrollbar-color: #2a3358 transparent; }
#home > * { max-width: 1480px; margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.06);
  padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; white-space: nowrap;
  transition: transform .12s, background .2s, border-color .2s, filter .2s;
}
.btn:hover { background: rgba(255,255,255,0.12); border-color: var(--line-strong); }
.btn:active { transform: scale(.97); }
.btn.primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet)); border: none; color: #050816;
  font-weight: 800; padding: 12px 24px; box-shadow: 0 8px 30px rgba(168,85,247,.35);
}
.btn.primary:hover { filter: brightness(1.1); }
.btn.big { padding: 15px 30px; font-size: 18px; }
.btn.ghost { background: transparent; }
.btn.round { width: 46px; height: 46px; padding: 0; background: rgba(7,11,24,.6); backdrop-filter: blur(6px); }
.btn.round .ic { width: 20px; height: 20px; }
.pill-count { font-size: 12px; font-weight: 700; background: rgba(251,191,36,.18); color: var(--amber); border-radius: 999px; padding: 2px 8px; }

/* ---------- home ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 8px; }
.brand { font-family: var(--display); font-size: 32px; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.brand .logo { color: var(--cyan); }
.brand .logo .ic { width: 34px; height: 34px; }
.topbar-actions { display: flex; gap: 6px; }

.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: center; margin: 6px auto 22px; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 4vw, 62px); line-height: 1.02; margin: 14px 0 10px; letter-spacing: .3px; }
.lead { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 0 20px; line-height: 1.45; }
.hero-right { display: flex; justify-content: center; position: relative; }
.hero-right::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(168,85,247,.35), transparent 65%); top: 8%; }
#mascot { width: min(420px, 100%); height: auto; position: relative; }

.player { display: inline-flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 18px 6px 6px; }
.lvl { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 20px; background: conic-gradient(var(--cyan) calc(var(--p) * 1%), rgba(255,255,255,.1) 0); position: relative; }
.lvl::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--panel-solid); }
.lvl span { position: relative; }
.player .who b { display: block; font-size: 16px; }
.player .who small { color: var(--muted); font-size: 13px; }

.workout { background: linear-gradient(135deg, rgba(34,211,238,.12), rgba(168,85,247,.14)); border: 1px solid var(--line-strong); border-radius: 22px; padding: 18px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; max-width: 880px; }
.workout-info { flex: 1; min-width: 260px; }
.workout-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.workout-title .ic { color: var(--cyan); }
.workout-title small { color: var(--muted); font-weight: 500; font-size: 14px; margin-left: 4px; }
.workout-chain { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.wchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(7,11,24,.55); border: 1px solid var(--line); }
.wchip .ic { color: var(--accent); }
.workout-chain > .ic { color: var(--muted); width: 14px; height: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; display: flex; align-items: center; gap: 14px; }
.stat-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.stat-ic .ic { width: 22px; height: 22px; }
.stat .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.stat .v { font-family: var(--display); font-size: 28px; line-height: 1.1; }
.stat .v small { font-family: "Outfit", sans-serif; font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }

.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.section-head h2 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 0; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative; text-align: left; cursor: pointer; border-radius: 22px; padding: 0;
  background: var(--panel-solid); border: 1px solid var(--line); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .18s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 44px rgba(0,0,0,.45), 0 0 0 1px var(--accent); }
.card-art { position: relative; height: 128px; background: linear-gradient(140deg, var(--a1), var(--a2)); display: grid; place-items: center; overflow: hidden; }
.card-art::before, .card-art::after { content: ""; position: absolute; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); }
.card-art::before { width: 180px; height: 180px; right: -50px; top: -70px; }
.card-art::after { width: 120px; height: 120px; left: -40px; bottom: -60px; background: rgba(255,255,255,.06); }
.card-art .ic { width: 64px; height: 64px; color: #fff; filter: drop-shadow(0 4px 18px var(--accent)); position: relative; z-index: 1; transition: transform .25s; }
.card:hover .card-art .ic { transform: scale(1.12) rotate(-6deg); }
.card-new { position: absolute; top: 10px; left: 10px; z-index: 1; font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 3px 9px; border-radius: 999px; background: var(--amber); color: #1c1300; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.card h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .3px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.4; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.07); color: #cdd5f5; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.best { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.best small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.best small b { color: var(--text); font-size: 14px; }
.stars { display: inline-flex; gap: 2px; color: rgba(255,255,255,.18); }
.stars .ic { width: 18px; height: 18px; }
.stars .on { color: var(--amber); }
.play-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; color: #0b1020; background: var(--accent); flex: none; }
.play-pill .ic { width: 14px; height: 14px; }

.foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; margin-top: 30px; flex-wrap: wrap; gap: 12px; }
.foot-note .ic { color: var(--lime); }
.version { font-size: 13px; color: #6b7499; font-variant-numeric: tabular-nums; }
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }

/* ---------- play ---------- */
#play { background: #000; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.lane { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.hud { position: absolute; top: 16px; left: 16px; right: 128px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; pointer-events: none; gap: 12px; }
.hud-box { background: rgba(7,11,24,.62); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 18px; padding: 8px 18px; }
.hud-left { justify-self: start; min-width: 180px; }
.hud-center { justify-self: center; text-align: center; min-width: 190px; }
.hud-right { justify-self: end; display: flex; align-items: center; gap: 4px; padding: 12px 16px; color: var(--red); }
.hud-right .ic { width: 28px; height: 28px; }
.hud-right .ic.lost { color: rgba(255,255,255,.3); }
.hud-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.hud-value { font-family: var(--display); font-size: 38px; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.hud-info { font-size: 15px; color: var(--cyan); font-weight: 700; min-height: 18px; white-space: nowrap; }
.hud-center.urgent .hud-value { color: var(--red); animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); } }
.meter { display: flex; align-items: center; gap: 8px; margin: 4px 0 2px; }
.meter-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); min-width: 44px; }
.meter-bar { flex: 1; height: 8px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; min-width: 100px; }
.meter-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--cyan); transition: width .12s linear; }

.play-controls { position: absolute; top: 18px; right: 16px; display: flex; gap: 8px; z-index: 5; }

.flash {
  position: absolute; left: 50%; top: 36%; transform: translate(-50%, -50%);
  font-family: var(--display); font-size: clamp(38px, 5.5vw, 80px); pointer-events: none; white-space: nowrap;
  -webkit-text-stroke: 2px rgba(10,8,30,.6); text-shadow: 0 6px 30px rgba(0,0,0,.6); opacity: 0;
  display: flex; align-items: center; gap: 16px;
}
.flash .ic { width: .9em; height: .9em; -webkit-text-stroke: 0; filter: drop-shadow(0 4px 14px rgba(0,0,0,.5)); }
.flash.show { animation: flash 1s ease-out forwards; }
.flash.good { color: var(--lime); }
.flash.bad { color: var(--red); }
.flash.info { color: #fff; }
.flash.gold { color: var(--amber); }
@keyframes flash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  26% { transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -64%) scale(1); }
}

#countdown { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); font-family: var(--display); font-size: 220px; color: #fff; pointer-events: none; opacity: 0; text-shadow: 0 10px 60px rgba(34,211,238,.7); -webkit-text-stroke: 4px rgba(10,8,30,.5); }
#countdown.tick { animation: tick .95s ease-out forwards; }
@keyframes tick { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.8); } }

.center-panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(7,11,24,.8); backdrop-filter: blur(12px); border: 1px solid var(--line-strong);
  border-radius: 26px; padding: 26px 32px; text-align: center; width: min(560px, calc(100% - 48px));
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.center-panel.dock { top: auto; bottom: 22px; transform: translateX(-50%); width: min(980px, calc(100% - 48px)); padding: 18px 24px; }
.center-panel.dock .center-title { font-size: 28px; }
.center-panel.dock .howto { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.center-panel.dock .howto div { font-size: 14px; }
.center-panel.dock .checklist { margin-top: 12px; }
.center-title { font-family: var(--display); font-size: 34px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.center-title .ic { width: 34px; height: 34px; color: var(--accent, var(--cyan)); }
.center-text { color: #cfd6f6; margin-top: 8px; font-size: 16px; }
.center-text:empty { display: none; }
.howto { display: grid; gap: 8px; margin-top: 16px; text-align: left; }
.howto:empty { display: none; }
.howto div { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.05); border-radius: 12px; padding: 9px 12px; font-size: 15px; }
.howto .ic { color: var(--accent, var(--cyan)); width: 22px; height: 22px; }
.checklist { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.checklist:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; font-weight: 600; font-size: 14px; background: rgba(244,63,94,.16); color: #fecdd3; border: 1px solid rgba(244,63,94,.4); }
.chip .ic { width: 15px; height: 15px; }
.chip.ok { background: rgba(163,230,53,.14); color: #d9f99d; border-color: rgba(163,230,53,.45); }
.chip.opt { background: rgba(255,255,255,.05); color: var(--muted); border-color: var(--line); }
.center-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.center-actions:empty { display: none; }
.loader { width: 50px; height: 50px; border-radius: 50%; border: 5px solid rgba(255,255,255,.12); border-top-color: var(--cyan); animation: spin 0.9s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.sim-pad { position: absolute; bottom: 12px; left: 16px; }
.sim-hint { background: rgba(7,11,24,.7); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.sim-hint b { color: var(--text); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(3,6,15,.72); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 20; }
.modal-card {
  background: linear-gradient(170deg, #151d40, #0b1124); border: 1px solid var(--line-strong); border-radius: 28px;
  padding: 28px 32px; width: min(580px, calc(100vw - 40px)); max-height: calc(100vh - 40px); overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: popin .25s ease-out;
}
.modal-card.wide { width: min(820px, calc(100vw - 40px)); }
@keyframes popin { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-card h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 32px; letter-spacing: .3px; }
.modal-card .sub { color: var(--muted); margin: 0 0 18px; }
.res h2 { margin-bottom: 0; }
.res .result-score { font-size: 68px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.res .modal-actions { position: sticky; bottom: -28px; margin: 18px -32px -28px; padding: 14px 32px 20px; background: linear-gradient(180deg, rgba(11,17,36,0), #0b1124 30%); justify-content: center; }

.res { text-align: center; }
.res-icon { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; margin: 0 auto 8px; background: linear-gradient(140deg, var(--a1), var(--a2)); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 40%, transparent); }
.res-icon .ic { width: 38px; height: 38px; color: #fff; }
.res-kicker { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }
.res-stars { display: flex; justify-content: center; gap: 10px; margin: 10px 0 2px; }
.res-stars .ic { width: 46px; height: 46px; color: rgba(255,255,255,.14); transition: color .2s, transform .3s; }
.res-stars .ic.on { color: var(--amber); animation: starpop .45s ease-out; filter: drop-shadow(0 0 12px rgba(251,191,36,.6)); }
@keyframes starpop { 0% { transform: scale(.3) rotate(-40deg); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
.result-score { font-family: var(--display); font-size: 76px; line-height: 1; margin: 4px 0 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; background: rgba(251,191,36,.16); color: var(--amber); font-weight: 800; border: 1px solid rgba(251,191,36,.4); }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.result-grid .stat { flex-direction: column; gap: 4px; padding: 12px 8px; text-align: center; }
.result-grid .stat .ic { width: 20px; height: 20px; color: var(--accent, var(--cyan)); }
.result-grid .stat .v { font-size: 26px; }
.result-note { color: var(--muted); margin: 14px 0 0; font-size: 14.5px; }
.fine { font-size: 12px; color: #6b7499; margin-top: 6px; }
.xp { margin-top: 18px; text-align: left; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.xp-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; }
.xp-row span:last-child { color: var(--lime); }
.xp-bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.1); margin-top: 8px; overflow: hidden; }
.xp-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--lime)); transition: width 1s ease-out .3s; }
.levelup { margin-top: 8px; color: var(--amber); font-weight: 800; display: flex; align-items: center; gap: 6px; }
.unlocks { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; text-align: left; }
.unlocks .unlock:only-child { grid-column: 1 / -1; }
.unlock { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 14px; border-radius: 14px; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.35); animation: popin .4s ease-out; }
.unlock .ic { width: 26px; height: 26px; color: var(--amber); }
.unlock small { display: block; color: var(--muted); }
.next-up { margin-top: 18px; display: flex; align-items: center; gap: 12px; justify-content: center; color: var(--muted); }

.trophies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.trophy { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.trophy .t-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: rgba(251,191,36,.15); color: var(--amber); }
.trophy .t-ic .ic { width: 22px; height: 22px; }
.trophy.locked { opacity: .5; }
.trophy.locked .t-ic { background: rgba(255,255,255,.06); color: var(--muted); }
.trophy b { display: block; }
.trophy small { color: var(--muted); }

.setting { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); gap: 16px; }
.setting:last-of-type { border-bottom: none; }
.setting .lbl b { display: block; }
.setting .lbl small { color: var(--muted); }
.setting select, .setting input[type=number] { background: #0a1022; color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; font: inherit; }
.setting input[type=number] { width: 84px; }
.seg { display: inline-flex; background: #0a1022; border: 1px solid var(--line-strong); border-radius: 12px; padding: 3px; }
.seg button { border: none; background: transparent; padding: 7px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: rgba(168,85,247,.3); color: var(--text); }
.switch { position: relative; width: 48px; height: 28px; flex: none; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #2a3358; border-radius: 999px; cursor: pointer; transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--violet); }
.switch input:checked + span::after { transform: translateX(20px); }

.tips { margin: 0; padding-left: 0; list-style: none; }
.tips li { display: flex; gap: 14px; padding: 9px 0; align-items: flex-start; }
.tips li .t-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(34,211,238,.12); color: var(--cyan); }
.tips li b { display: block; }
.tips li span { color: var(--muted); }
.setup-diagram { width: 100%; height: auto; margin: 4px 0 8px; }

.summary-rows { display: grid; gap: 8px; margin-top: 16px; }
.summary-row { display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); text-align: left; }
.summary-row .s-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(140deg, var(--a1), var(--a2)); }
.summary-row .s-ic .ic { color: #fff; }
.summary-row .num { font-family: var(--display); font-size: 22px; }

/* ---------- landscape only ---------- */
.rotate-hint { display: none; position: fixed; inset: 0; z-index: 50; background: var(--bg); place-items: center; text-align: center; padding: 30px; color: var(--muted); font-size: 18px; }
.rotate-icon .ic { width: 64px; height: 64px; color: var(--cyan); }
@media (max-aspect-ratio: 1/1), (max-width: 760px) { .rotate-hint { display: grid; } }

@media (max-width: 1280px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .card-body { padding: 14px 14px 16px; }
  .card h3 { font-size: 21px; }
  .card p { font-size: 13.5px; }
  .play-pill { padding: 7px 11px; }
}
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-right { display: none; }
}
@media (max-height: 760px) {
  .hero h1 { font-size: clamp(32px, 3.4vw, 48px); margin: 10px 0 6px; }
  .lead { font-size: 16px; margin-bottom: 14px; }
  #mascot { width: min(330px, 100%); }
}

/* ---------- two players ---------- */
.players-seg { margin-left: auto; align-self: center; }
.players-seg button { padding: 8px 14px; }
.divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; transform: translateX(-50%); background: linear-gradient(180deg, #22d3ee, #a855f7, #f472b6); box-shadow: 0 0 18px rgba(168,85,247,.8); }
#play.twop .hud { right: 16px; }
#play.twop .hud-left { min-width: 150px; }
#play.twop .hud-center { min-width: 130px; }
#play.twop .hud-value { font-size: 32px; }
#play.twop .flash { font-size: clamp(30px, 3.4vw, 56px); }
#play.twop .play-controls { top: auto; bottom: 14px; left: 50%; right: auto; transform: translateX(-50%); }
#play.twop .center-panel.dock { bottom: 78px; }
#play.twop .sim-hint { white-space: normal; max-width: 44vw; }
.lane-tag { position: absolute; bottom: 14px; padding: 6px 14px; border-radius: 999px; font-family: var(--display); font-size: 20px; color: #0b1020; }
.lane:first-child .lane-tag { left: 16px; background: #22d3ee; }
.lane:nth-child(2) .lane-tag { right: 16px; background: #f472b6; }
.lane-done { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(7,11,24,.6); backdrop-filter: blur(4px); text-align: center; }
.lane-done b { display: block; font-family: var(--display); font-size: 44px; }
.lane-done span { color: var(--muted); }
.pchips { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pchips + .pchips { margin-top: 8px; }
.pchips > b { font-family: var(--display); font-weight: 400; font-size: 18px; min-width: 86px; }
.pchips.p1 > b { color: #22d3ee; } .pchips.p2 > b { color: #f472b6; }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin-top: 16px; }
.vs-col { border-radius: 20px; padding: 16px; background: rgba(255,255,255,.04); border: 2px solid var(--line); position: relative; }
.vs-col.win { border-color: var(--amber); background: rgba(251,191,36,.08); box-shadow: 0 0 30px rgba(251,191,36,.2); }
.vs-col h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 22px; }
.vs-col.p1 h3 { color: #22d3ee; } .vs-col.p2 h3 { color: #f472b6; }
.vs-col .result-score { font-size: 54px; margin: 6px 0; }
.vs-col small { color: var(--muted); display: block; }
.vs-crown { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); background: var(--amber); color: #1c1300; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 13px; display: inline-flex; gap: 4px; align-items: center; }
.vs-mid { display: grid; place-items: center; font-family: var(--display); font-size: 30px; color: var(--muted); }
