/* Brookfield Glow Run leaderboard — blacklight / 90s theater carpet / arcade
   One display face (Bungee, the "Insert Coin / Player 1" font) + Rubik for reading. */

:root {
  --bg: #0b0520;
  --panel: rgba(18, 8, 40, 0.9);
  --panel-2: rgba(30, 14, 64, 0.92);
  --ink: #f6f1ff;
  --ink-2: #d9d0f5;
  --muted: #a99fd0;
  --line: rgba(190, 170, 255, 0.18);
  --magenta: #ff2bd6;
  --blue: #5b7fff;
  --yellow: #f4ff3a;
  --cyan: #1ff0ff;
  --green: #45f57e;
  --bulb: #ffe98a;
  --radius: 14px;
  --font-display: 'Bungee', 'Arial Black', sans-serif;
  --font-body: 'Rubik', system-ui, sans-serif;
  color-scheme: dark;
  --carpet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='none' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 46q14-22 28 0t28 0t28 0' stroke='%23ff2bd6'/%3E%3Cpath d='M128 176q12-18 24 0t24 0t24 0' stroke='%231ff0ff'/%3E%3Cpath d='M166 22l20 34h-40z' stroke='%23f4ff3a'/%3E%3Ccircle cx='58' cy='156' r='13' stroke='%238b5cff'/%3E%3Cpath d='M104 96l14 14m0-14l-14 14' stroke='%2345f57e'/%3E%3Cpath d='M212 96q-14 22 4 40' stroke='%23ff9a3c'/%3E%3Cpath d='M30 214l16-12l12 16' stroke='%231ff0ff'/%3E%3Cpath d='M92 222q10-14 20 0' stroke='%23f4ff3a'/%3E%3C/g%3E%3Cg%3E%3Ccircle cx='114' cy='30' r='4' fill='%23f4ff3a'/%3E%3Ccircle cx='24' cy='110' r='3.5' fill='%231ff0ff'/%3E%3Ccircle cx='206' cy='216' r='4' fill='%23ff2bd6'/%3E%3Ccircle cx='150' cy='120' r='3' fill='%23ff9a3c'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.45;
  overflow-x: hidden;
}

.carpet {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-color: var(--bg);
  background-image: var(--carpet), var(--carpet);
  background-size: 240px 240px, 360px 360px;
  background-position: 0 0, 97px 131px;
  opacity: 0.26;
}
.carpet::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 43, 214, 0.16), transparent 60%),
              radial-gradient(ellipse at 50% 100%, rgba(31, 240, 255, 0.12), transparent 60%);
}
.scanlines {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.18) 2px 3px);
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* ---------- Top bar ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 0; gap: 8px; }
.pill-btn {
  font-family: var(--font-display); font-size: 14px; letter-spacing: 0.02em;
  color: var(--ink); background: rgba(255,255,255,0.06); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; text-decoration: none;
}
.pill-btn:hover, .pill-btn:focus-visible { border-color: var(--cyan); box-shadow: 0 0 10px rgba(31,240,255,.4); outline: none; }
.lang { display: inline-flex; gap: 4px; }
.lang .pill-btn[aria-pressed="true"] { background: var(--magenta); border-color: var(--magenta); color: #fff; }

.logo { display: block; width: min(520px, 88vw); height: auto; margin: 6px auto 0;
  filter: drop-shadow(0 0 18px rgba(255, 43, 214, 0.35)) drop-shadow(0 0 2px rgba(91, 127, 255, 0.8)); }

.demo-ribbon {
  margin: 10px auto 0; max-width: 620px; text-align: center;
  font-family: var(--font-display); font-size: 14px; line-height: 1.5; color: #111;
  background: var(--yellow); border-radius: 8px; padding: 8px 12px;
}

/* ---------- Marquee (theater bulbs) ---------- */
.marquee {
  position: relative; margin: 18px auto 0; padding: 16px; border-radius: 22px;
  background: linear-gradient(135deg, #2a0f55, #150733 55%, #2a0f55);
  box-shadow: 0 0 0 3px #3b1a78, 0 0 40px rgba(255, 43, 214, 0.25);
}
.marquee::before, .marquee::after {
  content: ''; position: absolute; inset: 5px; border-radius: 18px; pointer-events: none;
  background-image: radial-gradient(circle, var(--bulb) 0 3px, rgba(255, 233, 138, 0.35) 4px, transparent 6px);
  background-size: 20px 20px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 7px;
}
.marquee::after { background-position: 10px 10px; animation: chase 0.9s steps(1) infinite; }
.marquee::before { animation: chase 0.9s steps(1) infinite reverse; }
@keyframes chase { 50% { opacity: 0.15; } }

.marquee-inner {
  position: relative; border-radius: 12px; padding: 22px 20px 20px; text-align: center;
  background: rgba(8, 3, 22, 0.94); border: 1px solid rgba(255,255,255,0.08);
}
.eyebrow { font-family: var(--font-display); font-size: 18px; color: var(--cyan); letter-spacing: 0.04em; text-shadow: 0 0 8px rgba(31,240,255,.7); }
.total {
  font-family: var(--font-display); font-size: clamp(48px, 12vw, 96px); line-height: 1; margin: 10px 0 6px;
  color: #fff; text-shadow: 0 0 6px #fff, 0 0 18px var(--magenta), 0 0 42px var(--magenta);
  font-variant-numeric: tabular-nums;
}
.goal-line { font-size: 19px; color: var(--ink-2); }
.goal-line strong { color: var(--yellow); font-weight: 600; }

/* Arcade power bar */
.power { position: relative; margin: 36px auto 6px; max-width: 780px; }
.power-bar {
  display: grid; grid-template-columns: repeat(40, 1fr); gap: 3px;
  padding: 6px; border-radius: 10px; background: #05010f; border: 2px solid #3b1a78;
}
.seg { height: 28px; border-radius: 3px; background: rgba(255,255,255,0.06); }
.seg.on { background: var(--c); box-shadow: 0 0 8px var(--c); }
.seg.part { background: linear-gradient(90deg, var(--c) var(--p), rgba(255,255,255,0.06) var(--p)); }
.power-marker { position: absolute; top: -8px; bottom: 30px; width: 0; border-left: 2px dashed var(--ink); }
.power-marker span {
  position: absolute; top: -24px; left: 0; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--font-display); font-size: 13px; color: var(--ink);
}
.power-scale { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-display); font-size: 16px; color: var(--muted); margin-top: 8px; }
.power-scale .goal-mark { font-size: 22px; color: var(--yellow); text-shadow: 0 0 10px rgba(244,255,58,.7); margin-right: -6px; }

.split { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 12px; font-size: 17px; color: var(--ink-2); }
.split b { font-family: var(--font-display); font-size: 18px; font-weight: 400; color: var(--ink); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

.countdown { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.cd-cell { min-width: 70px; }
.cd-num {
  font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--yellow);
  background: #05010f; border: 2px solid #3b1a78; border-radius: 8px; padding: 8px 10px 6px;
  text-shadow: 0 0 10px rgba(244,255,58,.7); font-variant-numeric: tabular-nums;
}
.cd-lbl { font-family: var(--font-display); font-size: 13px; color: var(--muted); margin-top: 6px; }
.cd-title { width: 100%; font-family: var(--font-display); font-size: 18px; color: var(--magenta); text-shadow: 0 0 8px rgba(255,43,214,.7); }

/* ---------- CTA buttons ---------- */
.cta-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 0; }
.cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 70px; padding: 10px; border-radius: 12px; text-decoration: none; cursor: pointer;
  font-family: var(--font-display); font-size: 20px; color: #fff; border: 2px solid; background: rgba(8,3,22,.85);
  transition: transform .12s, box-shadow .12s; text-align: center;
}
.cta small { font-family: var(--font-body); font-size: 14px; color: var(--ink-2); font-weight: 400; }
.cta:hover, .cta:focus-visible { transform: translateY(-2px); outline: none; }
.cta.coin { border-color: var(--yellow); box-shadow: 0 0 14px rgba(244,255,58,.35); }
.cta.coin .blink { color: var(--yellow); }
.cta.reg { border-color: var(--cyan); box-shadow: 0 0 14px rgba(31,240,255,.3); }
.cta.share { border-color: var(--magenta); box-shadow: 0 0 14px rgba(255,43,214,.3); }
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- Mode select ---------- */
.modes-title { text-align: center; font-family: var(--font-display); font-size: 16px; color: var(--muted); margin: 30px 0 12px; }
.modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 4px 2px 8px; }
.mode {
  font-family: var(--font-display); font-size: 20px; color: var(--ink-2);
  background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 16px 22px; cursor: pointer;
  min-height: 60px;
}
.mode:hover { border-color: rgba(255,43,214,.6); color: #fff; }
.mode[aria-selected="true"] { color: #fff; border-color: var(--magenta); box-shadow: 0 0 14px rgba(255,43,214,.55), inset 0 0 14px rgba(255,43,214,.25); }
.mode:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 14px; }
.panel h2 {
  margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 28px; letter-spacing: 0.01em;
  color: #fff; text-shadow: 0 0 10px rgba(255,43,214,.6);
}
.panel .sub { margin: 0 0 16px; color: var(--ink-2); font-size: 17px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.tile { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.tile .k { font-family: var(--font-display); font-size: 15px; color: var(--muted); line-height: 1.3; }
.tile .v { font-family: var(--font-display); font-size: 34px; line-height: 1.1; margin-top: 8px; color: #fff; font-variant-numeric: tabular-nums; }
.tile .d { font-size: 15px; color: var(--ink-2); margin-top: 4px; }

.leader-card { position: relative; overflow: hidden; }
.leader-card .who { font-family: var(--font-display); font-size: 26px; line-height: 1.2; margin-top: 10px; overflow-wrap: anywhere; }
.leader-card .who .gtag { vertical-align: 4px; }
.leader-card .almost { font-size: 18px; margin-top: 8px; color: var(--ink-2); }
.leader-card .almost b { color: var(--yellow); font-family: var(--font-display); font-weight: 400; }
.swatch-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); box-shadow: 0 0 12px var(--c); }

/* Prizes legend */
.prizes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.prize {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px;
}
.prize-icon { font-size: 44px; line-height: 1; filter: drop-shadow(0 0 10px rgba(244,255,58,.5)); }
.prize-name { font-size: 17px; font-weight: 600; line-height: 1.2; }
.prize-amt { font-family: var(--font-display); font-size: 22px; color: var(--yellow); }

/* ---------- High score tables ---------- */
.hs { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.hs th { font-family: var(--font-display); font-size: 15px; color: var(--muted); font-weight: 400; text-align: left; padding: 0 12px 2px; }
.hs th.num, .hs td.num { text-align: right; }
.hs td { background: var(--panel-2); padding: 12px; vertical-align: middle; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hs td:first-child { border-left: 1px solid var(--line); border-radius: 10px 0 0 10px; }
.hs td:last-child { border-right: 1px solid var(--line); border-radius: 0 10px 10px 0; }
.hs tr.hl td { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow) inset; background: rgba(244,255,58,0.08); }
.rank { font-family: var(--font-display); font-size: 22px; width: 64px; white-space: nowrap; }
.rank.r1 { color: var(--yellow); text-shadow: 0 0 8px rgba(244,255,58,.8); }
.rank.r2 { color: var(--cyan); }
.rank.r3 { color: var(--magenta); }
.score { font-family: var(--font-display); font-size: 26px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.name { font-weight: 600; font-size: 21px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.lead-name { font-weight: 600; font-size: 19px; }
.gtag { display: inline-block; font-family: var(--font-display); font-size: 14px; line-height: 1; padding: 5px 8px; border-radius: 6px; color: #0b0520; background: var(--c); }
.gdot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.move { font-family: var(--font-display); font-size: 16px; }
.move.up { color: var(--green); }
.move.down { color: #ff6b8a; }

.lights { display: flex; gap: 6px; }
.light {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); filter: grayscale(1); opacity: 0.4;
}
.light.on { filter: none; opacity: 1; border-color: var(--yellow); box-shadow: 0 0 12px rgba(244,255,58,.6); background: rgba(244,255,58,0.12); }
.next { font-size: 17px; color: var(--ink-2); margin-top: 8px; }
.next b { color: var(--yellow); font-family: var(--font-display); font-weight: 400; }
.next .pi { font-size: 20px; }
.next .sep { color: var(--muted); }
.crown { font-size: 22px; }
.icon-btn {
  background: none; border: 1px solid var(--line); color: var(--ink-2); border-radius: 8px; padding: 8px 12px;
  cursor: pointer; font-size: 15px; white-space: nowrap;
}
.icon-btn:hover, .icon-btn:focus-visible { border-color: var(--cyan); color: #fff; outline: none; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.chip {
  font-family: var(--font-display); font-size: 18px; padding: 12px 18px; border-radius: 10px; cursor: pointer; min-height: 52px;
  color: var(--ink-2); background: rgba(255,255,255,0.05); border: 2px solid var(--line);
}
.chip:hover { color: #fff; border-color: var(--c, var(--cyan)); }
.chip[aria-pressed="true"] { color: #0b0520; background: var(--c, var(--cyan)); border-color: var(--c, var(--cyan)); box-shadow: 0 0 12px var(--c, var(--cyan)); }
.search {
  flex: 1 1 260px; min-width: 0; font: inherit; font-size: 18px; color: var(--ink); background: rgba(0,0,0,0.35);
  border: 2px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
.search:focus { outline: none; border-color: var(--cyan); }

/* ---------- Pizza race: grades stacked, classes racing left → right ---------- */
.pz-row { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.pz-row:first-child { border-top: 0; }
.pz-grade { padding-top: 14px; }
.pz-grade .gtag { font-size: 18px; padding: 8px 10px; }
.pz-track {
  position: relative; height: 54px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.07));
  border: 1px solid var(--line);
}
.pz-track::before { content: ''; position: absolute; left: 2%; right: 4%; top: 50%; border-top: 2px dashed rgba(255,255,255,0.12); }
.tick-mark { position: absolute; top: -2px; transform: translateX(-50%); font-size: 16px; opacity: 0.55; }
.finish { position: absolute; right: 0; top: 0; bottom: 0; width: 10px; border-radius: 0 10px 10px 0;
  background: repeating-conic-gradient(#fff 0 25%, #0b0520 0 50%) 0 0 / 10px 10px; opacity: 0.5; }
.runner {
  position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--c); box-shadow: 0 0 10px var(--c); border: 2px solid #0b0520;
}
.runner.idle { opacity: 0.35; box-shadow: none; }
.runner.lead { width: 26px; height: 26px; box-shadow: 0 0 16px var(--c), 0 0 4px #fff; z-index: 2; }
.runner.lead::after { content: '👑'; position: absolute; left: 50%; top: -24px; transform: translateX(-50%); font-size: 18px; }
.pz-caption { margin-top: 8px; font-size: 18px; }
.pz-caption b { font-weight: 600; }
.leader-line b { color: #fff; font-size: 20px; }
.chase-line { color: var(--ink-2); margin-top: 2px; }
.chase-line .gap { font-family: var(--font-display); color: var(--yellow); font-size: 16px; }

.race-teaser { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }

/* Ticker */
.ticker { display: flex; gap: 10px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-track { display: flex; gap: 10px; animation: tick 40s linear infinite; }
.tick { flex: 0 0 auto; font-size: 17px; padding: 6px 14px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.tick b { color: var(--green); font-family: var(--font-display); font-weight: 400; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Sponsors: meter + leaderboard ---------- */
.sp-meter-wrap { text-align: center; background: rgba(8,3,22,.7); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 8px; }
.sp-total { font-family: var(--font-display); font-size: clamp(40px, 9vw, 64px); line-height: 1.1; margin: 6px 0 12px; color: #fff; text-shadow: 0 0 16px var(--magenta); }
.sp-meter { display: flex; height: 30px; border-radius: 10px; overflow: hidden; background: #05010f; border: 2px solid #3b1a78; }
.sp-seg { display: block; height: 100%; }
.sp-seg.sp { background: var(--magenta); box-shadow: 0 0 14px var(--magenta); }
.sp-seg.fam { background: var(--cyan); opacity: 0.5; }
.sp-name { gap: 12px; }
.sp-name a { color: #fff; }
.sp-logo { display: grid; place-items: center; width: 56px; height: 56px; flex: 0 0 56px; border-radius: 10px; background: #fff; overflow: hidden; }
.sp-logo img { max-width: 90%; max-height: 90%; object-fit: contain; }
.sp-initial { font-family: var(--font-display); font-size: 26px; color: #0b0520; background: var(--yellow); }
.sp-cta { display: block; margin-top: 14px; text-align: center; padding: 16px; border: 2px dashed var(--line); border-radius: 12px; color: var(--ink-2); text-decoration: none; font-size: 18px; }
.sp-cta:hover { border-color: var(--magenta); color: #fff; }

/* ---------- Race ---------- */
.chart-wrap { position: relative; width: 100%; }
.chart { display: block; overflow: visible; }
.chart text { font-family: var(--font-body); font-size: var(--fs); }
.chart .ax { fill: var(--muted); }
.chart .grid { stroke: rgba(255,255,255,0.08); }
.chart .endlbl { font-weight: 600; fill: var(--ink); font-size: calc(var(--fs) + 2px); }
.chart .endval { fill: var(--ink-2); font-weight: 400; }
.chart .mark { font-family: var(--font-display); font-size: var(--fs); }
.chart .mark.big { font-size: calc(var(--fs) + 5px); }
.tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 170px; max-width: 260px;
  background: rgba(5,1,15,0.96); border: 1px solid var(--cyan); border-radius: 10px; padding: 10px 12px;
  font-size: 15px; box-shadow: 0 0 14px rgba(31,240,255,.35); display: none;
}
.tip .th { font-family: var(--font-display); font-size: 14px; color: var(--cyan); margin-bottom: 6px; }
.tip .tr { display: flex; justify-content: space-between; gap: 10px; }
.tip .tr span:last-child { font-family: var(--font-display); font-size: 15px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 6px; font-size: 17px; color: var(--ink-2); }
.legend .sw { display: inline-block; width: 18px; height: 5px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.legend .sw.dash { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px) !important; }

.race-bars { position: relative; margin-top: 8px; }
.rb { position: absolute; left: 0; right: 0; height: 42px; transition: transform .35s ease; display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 12px; }
.rb .lbl { font-weight: 600; font-size: 19px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb .track { position: relative; height: 30px; }
.rb .fill { height: 100%; border-radius: 0 6px 6px 0; background: var(--c); box-shadow: 0 0 12px var(--c); transition: width .35s ease; min-width: 3px; }
.rb .val { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--font-display); font-size: 18px; margin-left: 10px; white-space: nowrap; transition: left .35s ease; }
.race-date { font-family: var(--font-display); font-size: 20px; color: var(--yellow); text-align: right; min-height: 26px; margin-top: 10px; }
select.chip { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
select.chip option { color: #000; }
.replay {
  font-family: var(--font-display); font-size: 18px; color: #0b0520; background: var(--yellow); border: 0; border-radius: 12px;
  padding: 14px 20px; cursor: pointer; box-shadow: 0 0 16px rgba(244,255,58,.6); min-height: 54px;
}
.replay:hover, .replay:focus-visible { box-shadow: 0 0 26px rgba(244,255,58,.9); outline: none; transform: translateY(-1px); }
.replay.big { display: block; width: 100%; font-size: clamp(17px, 2.6vw, 24px); padding: 18px 20px; margin: 4px 0 6px; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 34px rgba(244,255,58,.95); } }

/* How to play + footer */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.step { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.step::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--magenta); font-family: var(--font-display); font-size: 20px; margin-bottom: 8px; box-shadow: 0 0 10px var(--magenta); }
.step b { display: block; margin-bottom: 4px; font-size: 19px; }
.step p { margin: 0; color: var(--ink-2); font-size: 16px; }
.step a { color: var(--cyan); }
.how { margin-top: 18px; }
footer { text-align: center; color: var(--muted); font-size: 15px; padding: 26px 0 40px; }
footer a { color: var(--ink-2); }
.fine { max-width: 720px; margin: 10px auto 0; font-size: 12px; line-height: 1.5; }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(120px); z-index: 20;
  background: #05010f; border: 1px solid var(--yellow); color: #fff; border-radius: 10px; padding: 12px 18px;
  font-size: 16px; transition: transform .25s; box-shadow: 0 0 14px rgba(244,255,58,.4);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.empty { color: var(--muted); text-align: center; padding: 18px; font-size: 17px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .prizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prize-icon { font-size: 36px; }
  .prize-name { font-size: 15px; }
  .cta { font-size: 15px; min-height: 62px; }
  .cta small { display: none; }
  .power-bar { grid-template-columns: repeat(20, 1fr); }
  .seg { height: 22px; }
  .power-scale .goal-mark { font-size: 18px; margin-right: 0; }
  .cd-num { font-size: 32px; }
  .cd-cell { min-width: 60px; }
  .modes { display: grid; grid-template-columns: 1fr 1fr; }
  .mode { font-size: 18px; padding: 14px 10px; }
  .mode:last-child { grid-column: 1 / -1; }
  .chip { font-size: 16px; padding: 10px 14px; min-height: 48px; }
  .panel { padding: 16px; }
  .panel h2 { font-size: 24px; }
  .tile .v { font-size: 28px; }
  .hs thead { display: none; }
  .hs, .hs tbody { display: block; }
  .hs tr { display: grid; grid-template-columns: 52px 1fr auto; grid-template-areas: "rank name score" "rank extra share"; margin-bottom: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
  .hs tr.hl { border-color: var(--yellow); background: rgba(244,255,58,0.08); }
  .hs td, .hs td:first-child, .hs td:last-child { background: none; border: 0; border-radius: 0; padding: 10px; box-shadow: none !important; }
  .hs td.c-rank { grid-area: rank; padding-top: 14px; }
  .hs td.c-name { grid-area: name; }
  .hs td.c-score { grid-area: score; }
  .hs td.c-extra { grid-area: extra; padding-top: 0; }
  .hs td.c-share { grid-area: share; align-self: end; padding: 0 10px 10px 0; }
  .hs td.c-hide { display: none; }
  .hs tr:not(:has(.c-share)) { grid-template-areas: "rank name score" "rank extra extra"; }
  .rank { font-size: 18px; width: auto; }
  .name { font-size: 19px; }
  .score { font-size: 22px; }
  .light { width: 38px; height: 38px; font-size: 20px; }
  .pz-row { grid-template-columns: 1fr; gap: 6px; }
  .pz-grade { padding-top: 0; }
  .rb { grid-template-columns: 90px 1fr; }
  .rb .lbl { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee::before, .marquee::after, .blink, .ticker-track, .replay.big { animation: none; }
  .rb, .rb .fill, .rb .val { transition: none; }
}
