/* ============================================================
   Vets Prono 2026 — design tokens + app styles
   Dark, minimal, playful-social. Electric-blue accent.
   ============================================================ */

:root {
  /* surfaces (cool near-black) */
  --bg:        #0a0c10;
  --bg-grad:   radial-gradient(120% 80% at 50% -10%, #131722 0%, #0a0c10 60%);
  --surface:   #14181f;
  --surface-2: #1b212b;
  --surface-3: #232b37;
  --line:      rgba(255,255,255,0.07);
  --line-2:    rgba(255,255,255,0.12);

  /* text */
  --text:      #f3f5f8;
  --dim:       #9aa4b2;
  --faint:     #6b7382;

  /* accent (overridden by tweak) */
  --accent:     #2e8bff;
  --accent-2:   #5aa6ff;
  --accent-ink: #ffffff;
  --accent-glow: rgba(46,139,255,0.35);
  --accent-soft: rgba(46,139,255,0.14);

  /* outcome colors — reserved strictly for correct / wrong */
  --good:      #2fd27a;
  --good-soft: rgba(47,210,122,0.14);
  --bad:       #ff5d63;
  --bad-soft:  rgba(255,93,99,0.14);

  /* shape */
  --r-card: 22px;
  --r-chip: 16px;
  --r-pill: 999px;

  /* fixed footer nav height (excl. safe-area inset, added where needed) */
  --tabbar-h: 60px;

  --shadow: 0 6px 22px rgba(0,0,0,0.40);
  --shadow-lg: 0 18px 50px rgba(0,0,0,0.55);

  --ff-display: "Space Grotesk", system-ui, sans-serif;
  --ff-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; height: 100%;
  background: #050608;
  font-family: var(--ff-body);
  color: var(--text);
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

#root { height: 100%; }

/* ============================================================
   App shell — the app IS the full-viewport mobile web app
   ============================================================ */
.app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg-grad);
  color: var(--text);
  overflow: hidden;
}

/* header */
.appbar {
  flex-shrink: 0;
  padding: calc(16px + env(safe-area-inset-top)) 20px 12px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  position: relative; z-index: 6;
}
.appbar.detail { padding-top: calc(16px + env(safe-area-inset-top)); }
.brand { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand .kicker {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-2); font-weight: 700;
}
.brand .name {
  font-family: var(--ff-display); font-weight: 700; font-size: 22px;
  letter-spacing: -0.01em; line-height: 1;
}
.appbar-right { display: flex; align-items: center; gap: 10px; }

.pts-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 7px 12px 7px 11px;
  font-family: var(--ff-display); font-weight: 600; font-size: 14px;
  position: relative; /* hosts the win-streak fire/electric fx */
}
/* win-streak flair on the pill (same tiers + fx as the leaderboard) */
.pts-pill.fire { border-color: rgba(255,140,50,.35); box-shadow: 0 0 0 1px rgba(255,140,50,.12); }
.pts-pill.fire .lb-nametext {
  color: #ffd9a8; text-shadow: 0 0 10px rgba(255,140,50,.6);
  animation: fireText 1.2s ease-in-out infinite alternate;
}
.pts-pill.electric { border-color: rgba(120,200,255,.4); box-shadow: 0 0 0 1px rgba(120,200,255,.16); }
.pts-pill.electric .lb-nametext {
  color: #d6f4ff; text-shadow: 0 0 10px rgba(120,200,255,.8), 0 0 2px #fff;
  animation: elecText .9s steps(2, jump-none) infinite;
}
.pts-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.pts-pill .lbl { color: var(--dim); font-family: var(--ff-body); font-weight: 600; font-size: 12px; }

/* scroll body */
.scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 6px 16px 120px;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }

.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--faint); margin: 18px 4px 10px;
  display: flex; align-items: center; justify-content: space-between;
}

/* ============================================================
   Avatars
   ============================================================ */
.av {
  border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 600; color: #fff;
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10), inset 0 6px 10px rgba(255,255,255,0.12);
}
.av::after { /* subtle photo-placeholder sheen */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(150deg, rgba(255,255,255,0.18), transparent 45%);
}
.av span { position: relative; z-index: 1; }
.av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.av-stack { display: flex; }
.av-stack .av { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10), 0 0 0 2.5px var(--surface); }
.av-stack .av + .av { margin-left: -9px; }
.av-more {
  border-radius: 50%; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--dim);
  margin-left: -9px; box-shadow: 0 0 0 2.5px var(--surface);
}

/* ============================================================
   Event cards (Home)
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}
.ev {
  padding: 16px 16px 14px; margin-bottom: 12px;
  position: relative; overflow: hidden;
  transition: transform .14s ease, border-color .14s ease;
}
.ev:active { transform: scale(0.985); }
.ev.locked { border-color: var(--accent-soft); }
.ev-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.ev-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev-comp { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); font-weight: 600; }
.ev-comp .flag { width: 16px; height: 11px; border-radius: 2px; background: var(--surface-3); }
.ev-date { font-size: 11px; color: var(--faint); font-weight: 600; }

.teams { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; min-width: 0; }
/* reserve 2 lines so long names (e.g. "Bosnia and Herzegovina") keep every
   team column the same height and don't push the flag up */
.team .nm {
  font-family: var(--ff-display); font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
  text-align: center; line-height: 1.25; min-height: 2.5em;
}
.vs { font-family: var(--ff-display); font-weight: 700; font-size: 13px; color: var(--faint); padding: 0 2px; }

.crest {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 700; font-size: 14px; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14), inset 0 8px 12px rgba(255,255,255,0.10);
  position: relative; overflow: hidden;
  /* own stacking context: keeps the ::after ring inside THIS disc, never
     painting over an overlapping sibling crest's flag */
  isolation: isolate;
}
.crest-flag { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
/* subtle glossy sheen over the flag for the disc look; the inset ring lives
   here (above the flag) so dark flag regions stay visible against the dark bg */
.crest::after {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 50%;
  background: linear-gradient(160deg, rgba(255,255,255,0.22), transparent 50%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
}

.ev-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line);
}
.ev-foot .who { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }

/* countdown chip */
.countdown {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ff-display); font-weight: 600; font-size: 12px;
  color: var(--dim); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 5px 10px 5px 9px; white-space: nowrap;
}
.countdown .ico { width: 12px; height: 12px; opacity: .8; }
.countdown.soon { color: #ffd27a; border-color: rgba(255,210,122,0.25); background: rgba(255,210,122,0.08); }
.countdown.closed { color: var(--faint); }
/* last hour: the chip is a live M:SS pressure timer */
.countdown.timer {
  color: #ffd27a; border-color: rgba(255,210,122,0.3); background: rgba(255,210,122,0.1);
  font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums;
}
/* last five minutes: red, bigger, pulsing */
.countdown.timer.critical {
  color: var(--bad); border-color: rgba(255,93,99,0.5); background: var(--bad-soft);
  font-size: 15px; padding: 6px 12px 6px 10px;
  animation: critTimer 1s ease-in-out infinite;
}
@keyframes critTimer {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,93,99,0); }
  50% { box-shadow: 0 0 12px 1px rgba(255,93,99,.55); }
}

/* ---- kickoff urgency ladder on event cards ---- */
/* soonest upcoming fixture: a touch brighter than the rest */
.ev.ev-next { background: var(--surface-2); border-color: var(--line-2); }

/* last hour: amber alert; pulses when the player hasn't picked yet */
.ev.ev-urgent {
  background: var(--surface-2);
  border-color: rgba(255,210,122,0.4);
  box-shadow: 0 0 0 1px rgba(255,210,122,0.12), var(--shadow);
}
.ev.ev-urgent.nopick { animation: urgentPulse 2s ease-in-out infinite; }
@keyframes urgentPulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(255,210,122,0.12), var(--shadow); }
  50%     { box-shadow: 0 0 0 1px rgba(255,210,122,0.4), 0 0 20px rgba(255,210,122,0.3), var(--shadow); }
}

/* last five minutes: red alert, impossible to miss */
.ev.ev-critical {
  background: linear-gradient(180deg, rgba(255,93,99,0.12), rgba(255,93,99,0) 60%), var(--surface-2);
  border-color: rgba(255,93,99,0.65);
  animation: criticalPulse 1s ease-in-out infinite;
}
@keyframes criticalPulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(255,93,99,0.25), var(--shadow); }
  50%     { box-shadow: 0 0 0 2px rgba(255,93,99,0.7), 0 0 28px rgba(255,93,99,0.5), var(--shadow); }
}

/* flashing warning when it's critical and the player still hasn't picked */
.last-chance {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-bottom: 12px; padding: 8px 10px; border-radius: 10px;
  background: rgba(255,93,99,0.16); border: 1px solid rgba(255,93,99,0.45);
  color: #ff9396; font-family: var(--ff-display); font-weight: 800; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.07em;
  animation: lastChanceFlash 0.8s steps(2, jump-none) infinite;
}
@keyframes lastChanceFlash { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

@media (prefers-reduced-motion: reduce) {
  .ev.ev-urgent.nopick, .ev.ev-critical, .last-chance, .countdown.timer.critical { animation: none; }
}

/* locked-in mini badge on card */
.locked-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--accent-2);
  background: var(--accent-soft); border-radius: var(--r-pill); padding: 4px 9px;
}

/* ============================================================
   Event detail
   ============================================================ */
.detail-hero {
  text-align: center; padding: 4px 8px 8px;
}
.detail-hero .comp { font-size: 12px; color: var(--dim); font-weight: 600; margin-bottom: 16px; }
.detail-teams { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 6px; }
.detail-teams .team .nm { font-size: 15px; margin-top: 10px; }
.detail-teams .crest { width: 60px; height: 60px; font-size: 17px; }
.detail-teams .vs { font-size: 16px; }
.detail-when {
  font-family: var(--ff-display); font-weight: 600; font-size: 13px; color: var(--dim);
  margin-top: 10px;
}
.detail-kick { font-size: 12px; color: var(--faint); margin-top: 8px; }

.q-label {
  font-family: var(--ff-display); font-weight: 600; font-size: 15px;
  margin: 22px 2px 12px; display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.q-label .step {
  width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--dim);
}
.q-label .q-bonus {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-2); background: var(--accent-soft);
  border-radius: var(--r-pill); padding: 2px 8px; margin-left: 2px;
}

/* W/D/L chips */
.wdl { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.wdl .chip {
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r-chip); padding: 16px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .12s ease, border-color .14s ease, background .14s ease;
  min-height: 76px; justify-content: center;
}
.wdl .chip:active { transform: scale(0.96); }
.wdl .chip .big { font-family: var(--ff-display); font-weight: 700; font-size: 18px; }
.wdl .chip .sub { font-size: 11px; color: var(--faint); font-weight: 600; }
.wdl .chip.on {
  background: var(--accent-soft); border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 8px 22px var(--accent-glow);
}
.wdl .chip.on .big { color: var(--accent-2); }
.wdl .chip.on .sub { color: var(--accent-2); }

/* full-time score picker — two columns, up button above / down below the
   number. The number colour + glow comes from inline styles (controls.jsx),
   intensifying as the predicted score climbs. */
.score-picker {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 18px 14px 20px;
}
.score-col { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.score-team {
  font-family: var(--ff-display); font-weight: 700; font-size: 13px; color: var(--dim);
  letter-spacing: .02em;
}
.score-step {
  width: 56px; height: 40px; border-radius: 14px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s ease, background .12s ease;
}
.score-step:active { transform: scale(0.92); background: var(--surface-3); }
.score-step:disabled { opacity: .3; }
.score-num {
  font-family: var(--ff-display); font-weight: 800; line-height: 1;
  font-size: 58px; letter-spacing: -0.02em; min-height: 58px;
  display: flex; align-items: center; justify-content: center;
  transition: color .18s ease, text-shadow .18s ease, transform .18s cubic-bezier(.2,.8,.2,1);
}
.score-sep {
  font-family: var(--ff-display); font-weight: 700; font-size: 30px; color: var(--faint);
  padding: 0 2px; align-self: center; margin-top: 18px;
}
@media (prefers-reduced-motion: reduce) {
  .score-num { transition: none; }
}

/* minute picker */
.minute {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 18px 18px 20px; text-align: center;
}
.minute .val {
  font-family: var(--ff-display); font-weight: 700; line-height: 1;
  font-size: 56px; letter-spacing: -0.02em;
}
.minute .val .unit { font-size: 22px; color: var(--dim); margin-left: 4px; }
.minute .hint { font-size: 12px; color: var(--faint); margin-top: 4px; font-weight: 600; }
.minute .controls { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.stepper {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: var(--text);
  transition: transform .1s ease, background .12s ease;
}
.stepper:active { transform: scale(0.92); background: var(--surface-3); }
.stepper:disabled { opacity: .35; }

/* range slider */
.range-wrap { flex: 1; position: relative; height: 44px; display: flex; align-items: center; }
.range-track { position: absolute; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--surface-3); }
.range-fill { position: absolute; left: 0; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
input[type=range].range {
  -webkit-appearance: none; appearance: none; width: 100%; background: transparent; position: relative; z-index: 2; margin: 0;
}
input[type=range].range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent);
  box-shadow: 0 3px 10px rgba(0,0,0,0.5), 0 0 0 4px var(--accent-soft); cursor: pointer;
}
input[type=range].range::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); box-shadow: 0 3px 10px rgba(0,0,0,0.5);
}
.minute .presets { display: flex; gap: 8px; margin-top: 16px; }
.minute .preset {
  flex: 1; padding: 9px 4px; border-radius: 12px; font-size: 12px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--dim);
  transition: background .12s ease;
}
.minute .preset.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }

/* ============================================================
   Bottom action bar + lock controls
   ============================================================ */
.action-bar {
  position: fixed; left: 0; right: 0; z-index: 18;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 14px 16px 16px;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}
.summary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: var(--dim); margin-bottom: 12px; min-height: 18px; font-weight: 600;
}
.summary b { color: var(--text); font-weight: 700; }

/* tap-to-lock button */
.lock-btn {
  width: 100%; height: 56px; border-radius: 18px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--ff-display); font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 10px 30px var(--accent-glow);
  transition: transform .12s ease, opacity .15s ease, filter .15s ease;
}
.lock-btn:active { transform: scale(0.97); }
.lock-btn:disabled { opacity: .4; box-shadow: none; filter: grayscale(0.4); }

/* slide-to-lock */
.slide-lock {
  position: relative; width: 100%; height: 56px; border-radius: 18px;
  background: var(--surface-2); border: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: center; user-select: none;
}
.slide-lock.disabled { opacity: .4; }
.slide-lock .slide-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft); }
.slide-lock .slide-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ff-display); font-weight: 700; font-size: 15px; color: var(--dim);
  pointer-events: none;
}
.slide-lock .thumb {
  position: absolute; left: 4px; top: 4px; width: 48px; height: 48px; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px var(--accent-glow); z-index: 2;
}

/* hold-to-lock */
.hold-lock {
  position: relative; width: 100%; height: 56px; border-radius: 18px;
  background: var(--accent); color: var(--accent-ink); overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--ff-display); font-weight: 700; font-size: 17px;
  box-shadow: 0 10px 30px var(--accent-glow);
}
.hold-lock.disabled { opacity: .4; box-shadow: none; filter: grayscale(0.4); }
.hold-lock .hold-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,0.22); width: 0; }
.hold-lock .hold-label { position: relative; z-index: 2; display: flex; align-items: center; gap: 9px; }

/* ============================================================
   Lock-in celebration overlay (fireworks + embers + electric)
   ============================================================ */
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
/* shared with .confirm-box */
@keyframes pop { 0% { transform: scale(0); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

.lockin-overlay {
  position: fixed; inset: 0; z-index: 80; cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 32%, rgba(22,11,5,0.74), rgba(6,8,12,0.93));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: fadein .25s ease;
}

/* central card */
.lockin-card {
  position: relative; z-index: 3; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px 24px;
  animation: lockinPop .55s cubic-bezier(.2,.9,.3,1.4) both;
}
@keyframes lockinPop {
  0% { opacity: 0; transform: scale(.7) translateY(10px); }
  60% { opacity: 1; transform: scale(1.06); }
  100% { transform: scale(1); }
}
.lockin-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2);
}
.lockin-title {
  font-family: var(--ff-display); font-weight: 800; font-size: 44px; letter-spacing: .02em; line-height: 1;
  background: linear-gradient(95deg, #ffd23f, #ff7a2f 40%, #ff3d77 70%, #7c5cff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255,140,60,.55));
  animation: titleFlare 1.6s ease-in-out infinite alternate;
}
@keyframes titleFlare {
  from { filter: drop-shadow(0 0 12px rgba(255,140,60,.4)); }
  to   { filter: drop-shadow(0 0 26px rgba(255,90,120,.7)); }
}

/* matchup */
.lockin-match { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; }
.lockin-team { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 92px; }
.lockin-crest { animation: crestIn .6s cubic-bezier(.2,.9,.3,1.4) both; }
.lockin-crest .crest { box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 8px 26px rgba(0,0,0,.5); }
@keyframes crestIn { 0% { opacity: 0; transform: translateY(12px) scale(.8); } 100% { opacity: 1; transform: none; } }
.lockin-name { font-family: var(--ff-display); font-weight: 700; font-size: 13px; color: var(--text); line-height: 1.2; min-height: 2.4em; }

/* scoreline + electric sparks */
.lockin-score {
  position: relative; display: flex; align-items: center; gap: 8px;
  font-family: var(--ff-display); font-weight: 800; font-size: 56px; line-height: 1;
}
.lockin-score .ls-sep { color: var(--faint); font-size: 34px; }
.lockin-score .ls-spark { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #bfe9ff; box-shadow: 0 0 10px 2px #7fd4ff; opacity: 0; }
.lockin-score .s1 { top: -6px; left: 10%; animation: spark 1.3s ease-in-out infinite; }
.lockin-score .s2 { bottom: -4px; right: 16%; animation: spark 1.1s .35s ease-in-out infinite; }
.lockin-score .s3 { top: 30%; right: -8px; animation: spark 1.5s .6s ease-in-out infinite; }
@keyframes spark { 0%,100% { opacity: 0; transform: scale(.6); } 45% { opacity: 1; transform: scale(1.3); } }

.lockin-min { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); font-weight: 600; }
.lockin-hint { margin-top: 6px; font-size: 12px; color: var(--faint); font-weight: 600; letter-spacing: .04em; animation: hintPulse 1.4s ease-in-out infinite; }
@keyframes hintPulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

/* fireworks */
.fw-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fw { position: absolute; width: 0; height: 0; animation: fwCycle 2.8s ease-out infinite; }
@keyframes fwCycle { 0% { opacity: 1; } 70%,100% { opacity: 0; } }
.fw-flash { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; filter: blur(2px); animation: fwFlash 2.8s ease-out infinite; }
@keyframes fwFlash { 0% { transform: scale(.2); opacity: 1; } 12% { transform: scale(1.4); opacity: .9; } 30%,100% { opacity: 0; } }
.fw i { position: absolute; left: 0; top: 0; width: 5px; height: 5px; border-radius: 50%; animation: fwPart 2.8s ease-out infinite; }
@keyframes fwPart {
  0% { transform: translate(0,0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  60% { transform: translate(var(--fx), var(--fy)) scale(.7); opacity: .9; }
  100% { transform: translate(calc(var(--fx) * 1.25), calc(var(--fy) * 1.25 + 26px)) scale(.2); opacity: 0; }
}

/* fire embers */
.ember-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.ember-layer i {
  position: absolute; bottom: -12px; border-radius: 50%; filter: blur(.4px); opacity: 0;
  animation-name: emberRise; animation-iteration-count: infinite; animation-timing-function: ease-out;
}
@keyframes emberRise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  15% { opacity: .9; }
  100% { transform: translateY(-72vh) translateX(14px) scale(.3); opacity: 0; }
}

/* ---- calm pick confirmation (the party is reserved for WINNING results) ---- */
.lockin-overlay.calm {
  background: radial-gradient(120% 90% at 50% 32%, rgba(13,18,28,0.82), rgba(6,8,12,0.94));
}
.lockin-title.calm {
  background: linear-gradient(95deg, var(--text), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 14px var(--accent-glow)); animation: none;
}
.lockin-thanks { font-size: 14px; color: var(--dim); font-weight: 600; }
.lockin-next {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 2px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--ff-display); font-weight: 700; font-size: 15px;
  padding: 13px 24px; border-radius: var(--r-pill);
  box-shadow: 0 8px 22px var(--accent-glow);
  transition: transform .12s ease;
}
.lockin-next:active { transform: scale(0.97); }

/* ---- results reveal: win keeps the party, lose goes muted ---- */
.result-overlay .ls-n { color: var(--text); text-shadow: 0 0 14px rgba(255,255,255,.18); }
.result-overlay.win .ls-n { color: #ffd23f; text-shadow: 0 0 18px rgba(255,210,63,.5); }
.result-overlay.lose {
  background: radial-gradient(120% 90% at 50% 32%, rgba(14,17,23,0.82), rgba(6,8,12,0.95));
  cursor: pointer;
}
.result-overlay.lose .lockin-kicker { color: var(--faint); }
/* muted title: flat grey gradient, no flare */
.lockin-title.lose {
  background: linear-gradient(95deg, #aeb7c4, #6b7382);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: none; animation: none;
}
.result-pts {
  font-family: var(--ff-display); font-weight: 800; font-size: 30px; line-height: 1;
}
.result-pts .u { font-size: 14px; font-weight: 700; color: var(--faint); }
.result-pts.win { color: var(--good); text-shadow: 0 0 20px rgba(47,210,122,.45); }
.result-pts.bonus { color: #ffd27a; }
.result-pts.zero { color: var(--faint); }
.result-parts { justify-content: center; margin-top: -4px; }
.result-overlay.lose .score-part { color: #ffd27a; background: rgba(255,210,122,.1); }
.result-consolation { font-size: 13px; color: var(--dim); font-weight: 600; max-width: 240px; }

@media (prefers-reduced-motion: reduce) {
  .lockin-card, .lockin-crest, .lockin-title, .lockin-hint,
  .fw, .fw-flash, .fw i, .ember-layer i, .lockin-score .ls-spark { animation: none; }
  .ember-layer, .fw-layer { display: none; }
  .lockin-title { -webkit-text-fill-color: #ffce5a; color: #ffce5a; }
  .lockin-title.lose { -webkit-text-fill-color: #9aa4b2; color: #9aa4b2; }
}

/* ============================================================
   Friends' picks reveal
   ============================================================ */
.reveal { margin-top: 22px; }
.dist { display: flex; gap: 6px; margin: 12px 0 16px; }
.dist .seg { height: 8px; border-radius: 4px; }
.friend-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.friend-row:last-child { border-bottom: none; }
.friend-row .fname { flex: 1; font-weight: 600; font-size: 14px; }
.friend-pick {
  font-family: var(--ff-display); font-weight: 700; font-size: 12px;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--dim);
}
.friend-min { font-size: 12px; color: var(--faint); font-weight: 600; min-width: 38px; text-align: right; }

/* ============================================================
   My Predictions
   ============================================================ */
.pred {
  padding: 14px 16px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 14px;
}
.pred .pcrest { display: flex; }
.pred .pcrest .crest { width: 38px; height: 38px; font-size: 12px; }
.pred .pcrest .crest + .crest { margin-left: -10px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14), 0 0 0 2.5px var(--surface); }
.pred .pbody { flex: 1; min-width: 0; }
.pred .pmatch { font-family: var(--ff-display); font-weight: 600; font-size: 14px; }
.pred .pmeta { font-size: 12px; color: var(--dim); margin-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pred .pmeta .mtag {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 2px 8px; font-weight: 700; color: var(--text); font-family: var(--ff-display); font-size: 11px;
}
/* settled prediction score breakdown (Outcome / Exact score / First goal) */
.score-parts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.score-part {
  font-size: 10px; font-weight: 700; color: var(--accent-2);
  background: var(--accent-soft); border-radius: var(--r-pill); padding: 2px 7px;
}

.badge {
  font-family: var(--ff-display); font-weight: 700; font-size: 11px;
  padding: 5px 10px; border-radius: var(--r-pill); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.badge.open { background: var(--accent-soft); color: var(--accent-2); }
.badge.correct { background: var(--good-soft); color: var(--good); }
.badge.wrong { background: var(--bad-soft); color: var(--bad); }
.pts-earned { font-family: var(--ff-display); font-weight: 700; font-size: 14px; }
.pts-earned.correct { color: var(--good); }
.pts-earned.wrong { color: var(--faint); }

.seg-tabs {
  display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 4px; margin: 6px 0 4px;
}
.seg-tabs button {
  flex: 1; padding: 9px 0; border-radius: var(--r-pill); font-weight: 700; font-size: 13px;
  color: var(--dim); font-family: var(--ff-display); transition: color .12s ease;
}
.seg-tabs button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

/* ============================================================
   Groups (standings + fixtures behind an A–L chip picker)
   ============================================================ */
.group-chips {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px;
  scrollbar-width: none;
}
.group-chips::-webkit-scrollbar { display: none; }
.gchip {
  flex: 0 0 auto; min-width: 38px; height: 38px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); color: var(--dim);
  font-family: var(--ff-display); font-weight: 700; font-size: 14px;
  transition: color .12s ease, border-color .12s ease;
}
.gchip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }

.gtable-card { padding: 6px 10px; margin-bottom: 14px; }
.gtable { width: 100%; border-collapse: collapse; font-size: 12px; }
.gtable th {
  font-size: 10px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: .04em;
  padding: 7px 3px; text-align: center;
}
.gtable th.tm { text-align: left; }
.gtable td {
  padding: 8px 3px; text-align: center; border-top: 1px solid var(--line);
  color: var(--dim); font-weight: 600; font-variant-numeric: tabular-nums;
}
.gtable .tmcell {
  display: flex; align-items: center; gap: 7px; text-align: left;
  color: var(--text); font-family: var(--ff-display); max-width: 118px;
}
.gtable .tmcell .crest { flex: 0 0 auto; font-size: 8px; }
/* the name wrapper hosts the winner/runner-up fx, so the ellipsis lives on the
   inner text span — overflow:hidden here would clip the flames/bolts */
.gtable .tmname { min-width: 0; }
.gtable .tmname .lb-nametext {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gtable td.pts { color: var(--text); font-family: var(--ff-display); font-weight: 700; }
.gtable tr.q td.pos { color: var(--accent-2); font-weight: 700; }

.badge.ft { background: var(--surface-2); color: var(--dim); }

/* ============================================================
   Leaderboard
   ============================================================ */
.lb-row {
  display: flex; align-items: center; gap: 13px; padding: 13px 14px; margin-bottom: 10px;
}
.lb-row.you { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow); }
.lb-rank { width: 26px; text-align: center; font-family: var(--ff-display); font-weight: 700; font-size: 16px; color: var(--dim); }
.lb-rank.top { color: var(--accent-2); }
.lb-body { flex: 1; min-width: 0; }
.lb-name { font-family: var(--ff-display); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.lb-sub { font-size: 12px; color: var(--faint); margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.lb-score { font-family: var(--ff-display); font-weight: 700; font-size: 18px; }
.lb-score .u { font-size: 11px; color: var(--faint); font-weight: 600; margin-left: 2px; }

.streak {
  display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700;
  color: #ffb24d;
}

/* ---- streak flair: fire (3–4) / electric (5+) around the player's name.
   Also reused by the group table once a group is decided (winner = electric,
   runner-up = fire) via the .gtable .tmname wrapper. ---- */
.lb-name, .pod .pname, .gtable .tmname { position: relative; }
.lb-name .lb-nametext, .pod .pname .lb-nametext, .gtable .tmname .lb-nametext,
.pts-pill .lb-nametext { position: relative; z-index: 2; }

.streak-tag {
  display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; margin-right: 5px; padding: 1px 7px; border-radius: var(--r-pill);
}
.streak-tag.fire { color: #ff8a3d; background: rgba(255,120,40,.14); animation: fireText 1.2s ease-in-out infinite alternate; }
.streak-tag.electric { color: #7fd4ff; background: rgba(120,200,255,.15); animation: elecText .9s steps(2, jump-none) infinite; }

/* fire (3–4 match streak) */
.lb-name.fire .lb-nametext, .pod .pname.fire .lb-nametext, .gtable .tmname.fire .lb-nametext {
  color: #ffd9a8; text-shadow: 0 0 10px rgba(255,140,50,.6);
  animation: fireText 1.2s ease-in-out infinite alternate;
}
@keyframes fireText {
  from { text-shadow: 0 0 8px rgba(255,120,40,.5); }
  to   { text-shadow: 0 0 16px rgba(255,170,60,.85); }
}
.fire-fx {
  position: absolute; left: -6px; right: -6px; bottom: -3px; height: 100%;
  display: flex; align-items: flex-end; justify-content: space-around; pointer-events: none; z-index: 1;
}
.fire-fx .flame {
  color: #ff7a2f; filter: drop-shadow(0 0 4px rgba(255,120,40,.8)); transform-origin: bottom center; opacity: .85;
  animation: flameFlick .7s ease-in-out infinite; animation-delay: calc(var(--i) * -.13s);
}
.fire-fx .flame:nth-child(even) { color: #ffb340; }
@keyframes flameFlick {
  0%,100% { transform: translateY(2px) scaleY(.85) scaleX(1); opacity: .55; }
  50%     { transform: translateY(-3px) scaleY(1.15) scaleX(.92); opacity: 1; }
}

/* electric (5+ match streak) */
.lb-name.electric .lb-nametext, .pod .pname.electric .lb-nametext, .gtable .tmname.electric .lb-nametext {
  color: #d6f4ff; text-shadow: 0 0 10px rgba(120,200,255,.8), 0 0 2px #fff;
  animation: elecText .9s steps(2, jump-none) infinite;
}
@keyframes elecText {
  0%,100% { text-shadow: 0 0 8px rgba(120,200,255,.6); }
  40% { text-shadow: 0 0 16px rgba(150,220,255,1), 0 0 3px #fff; }
  55% { text-shadow: 0 0 6px rgba(120,200,255,.35); }
}
.bolt-fx { position: absolute; left: -10px; right: -10px; top: -6px; bottom: -6px; pointer-events: none; z-index: 1; }
.bolt-fx .bolt { position: absolute; width: 14px; height: 14px; color: #8fd6ff; filter: drop-shadow(0 0 5px rgba(130,210,255,.9)); opacity: 0; }
.bolt-fx .b1 { top: -8px; left: -4px; animation: boltFlash 1.1s steps(1) infinite; }
.bolt-fx .b2 { bottom: -8px; right: -2px; animation: boltFlash 1.1s .55s steps(1) infinite; }
@keyframes boltFlash {
  0%,100% { opacity: 0; transform: scale(.7) rotate(-8deg); }
  8% { opacity: 1; transform: scale(1.1) rotate(0deg); }
  16% { opacity: .2; } 24% { opacity: .9; } 34% { opacity: 0; }
}
.bolt-fx .arc { position: absolute; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #aee4ff, transparent); opacity: 0; filter: blur(.3px); }
.bolt-fx .a1 { top: 2px; left: 8%; right: 8%; animation: arcFlash 1.3s steps(1) infinite; }
.bolt-fx .a2 { bottom: 2px; left: 16%; right: 16%; animation: arcFlash 1.3s .65s steps(1) infinite; }
@keyframes arcFlash { 0%,100% { opacity: 0; } 10% { opacity: .9; } 18% { opacity: .1; } 26% { opacity: .7; } 34% { opacity: 0; } }

/* soft tier halo on the whole row */
.lb-row.streak-fire { border-color: rgba(255,140,50,.35); box-shadow: 0 0 0 1px rgba(255,140,50,.12), var(--shadow); }
.lb-row.streak-electric { border-color: rgba(120,200,255,.4); box-shadow: 0 0 0 1px rgba(120,200,255,.16), var(--shadow); }

@media (prefers-reduced-motion: reduce) {
  .fire-fx .flame, .bolt-fx .bolt, .bolt-fx .arc, .streak-tag,
  .lb-name.fire .lb-nametext, .lb-name.electric .lb-nametext,
  .pod .pname.fire .lb-nametext, .pod .pname.electric .lb-nametext,
  .gtable .tmname.fire .lb-nametext, .gtable .tmname.electric .lb-nametext,
  .pts-pill.fire .lb-nametext, .pts-pill.electric .lb-nametext { animation: none; }
}

/* podium */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 10px 0 22px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.pod .av { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10); }
.pod .stand {
  width: 100%; border-radius: 14px 14px 0 0; background: var(--surface-2); border: 1px solid var(--line);
  border-bottom: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 12px; gap: 3px;
}
.pod .stand .r { font-family: var(--ff-display); font-weight: 700; font-size: 22px; color: var(--faint); }
.pod .stand .s { font-family: var(--ff-display); font-weight: 700; font-size: 16px; }
.pod .stand .s .u { font-size: 10px; color: var(--faint); }
.pod.p1 .stand { height: 96px; background: linear-gradient(180deg, var(--accent-soft), var(--surface-2)); border-color: var(--accent); }
.pod.p1 .stand .r { color: var(--accent-2); }
.pod.p2 .stand { height: 72px; }
.pod.p3 .stand { height: 56px; }
.pod .pname { font-size: 12px; font-weight: 700; }
.pod .crown { font-size: 16px; }

/* ============================================================
   Bottom nav
   ============================================================ */
/* Full-width fixed footer bar: spans the whole screen, straight (square) edges,
   always visible — over the tabs, the match detail, and the profile screen. */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: stretch;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(15,18,24,0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-2);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.45);
}
.tabbar-inner {
  flex: 1; display: flex; align-items: center; justify-content: space-around;
  padding: 0 8px;
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 10px; border-radius: 0; color: var(--faint);
  transition: color .14s ease, background .14s ease; min-width: 48px;
}
.tab .ti { width: 22px; height: 22px; }
.tab .tl { font-size: 10px; font-weight: 700; letter-spacing: 0.02em; }
.tab.on { color: var(--accent-ink); background: var(--accent); box-shadow: 0 6px 18px var(--accent-glow); }

/* back button */
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--text);
  transition: transform .1s ease;
}
.iconbtn:active { transform: scale(0.92); }

/* ============================================================
   Empty states
   ============================================================ */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 30px; gap: 14px; color: var(--dim);
}
.empty .ei {
  width: 72px; height: 72px; border-radius: 24px; background: var(--surface);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
}
.empty h3 { font-family: var(--ff-display); font-weight: 700; font-size: 17px; color: var(--text); margin: 0; }
.empty p { font-size: 13px; margin: 0; max-width: 220px; line-height: 1.5; }
.empty .cta {
  margin-top: 6px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--ff-display); font-weight: 700; font-size: 14px;
  padding: 12px 22px; border-radius: var(--r-pill); box-shadow: 0 8px 22px var(--accent-glow);
}

/* fade/slide screen transitions */
.screen { animation: screenin .26s cubic-bezier(.2,.7,.3,1); }
@keyframes screenin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.detail-screen { animation: detailin .28s cubic-bezier(.2,.7,.3,1); }
@keyframes detailin { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ---- tap / select feedback (consistent across the app) ---------------
   tap: brief press pulse on every <button> (triggered on pointerdown).
   cardSelect: accent highlight + dip when an event card is chosen, played
   just before the next screen slides in. Both share the app's easing. */
@keyframes tap {
  0%   { transform: scale(1); }
  45%  { transform: scale(0.93); }
  100% { transform: scale(1); }
}
.tap-pulse { animation: tap .19s cubic-bezier(.2,.7,.3,1); }

@keyframes cardSelect {
  0%   { transform: scale(1);     box-shadow: var(--shadow), 0 0 0 0 var(--accent-glow); }
  40%  { transform: scale(0.975); box-shadow: var(--shadow), 0 0 0 3px var(--accent-soft); }
  100% { transform: scale(1);     box-shadow: var(--shadow), 0 0 0 0 var(--accent-glow); }
}
.card.selecting { animation: cardSelect .26s cubic-bezier(.2,.7,.3,1); border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .tap-pulse, .card.selecting { animation: none; }
}

/* ============================================================
   Loading — skeletons, spinner, retry
   ============================================================ */
.skel {
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  border-radius: 8px; flex-shrink: 0;
}
@keyframes shimmer { 0% { background-position: 180% 0; } 100% { background-position: -40% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

.skel-circle { border-radius: 50%; }
.skel-card { padding: 16px 16px 14px; margin-bottom: 12px; }
.skel-row-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.skel-teams { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.skel-team { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.skel-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.skel-listrow { display: flex; align-items: center; gap: 14px; padding: 15px 16px; margin-bottom: 12px; }
.skel-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; }

.skel-detail-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0 8px; }
.skel-detail-teams { display: flex; align-items: center; gap: 26px; }

.loading-area { animation: fadein .2s ease; }

/* spinner */
.spinner { animation: spin .85s linear infinite; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner .track { stroke: var(--line-2); }
.spinner .arc { stroke: var(--accent); }

/* slow / retry panel */
.retry { padding: 48px 30px; }
.retry .spinner { margin-bottom: 4px; }
.retry .cta { display: inline-flex; align-items: center; gap: 8px; }
.retry .small { font-size: 12px; color: var(--faint); }

/* tiny inline dots loader (subtab) */
.dots { display: inline-flex; gap: 5px; align-items: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: bounce 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-6px); opacity: 1; } }

/* small helpers */
.muted { color: var(--dim); }
.center { text-align: center; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ============================================================
   Hanko authentication (login gate + profile)
   ============================================================ */
.avatar-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  border-radius: 50%; line-height: 0;
}

/* Intro splash: a dark, on-brand cover (same near-black surface as the app,
   with an electric-blue glow behind the logo) that animates in, holds, then
   fades out (CSS-only, no timer) to reveal the login underneath. visibility
   flips to hidden at the end so it stops capturing taps. */
.splash {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(110% 70% at 50% 20%, var(--accent-soft), transparent 60%),
    radial-gradient(120% 80% at 50% -10%, #131722 0%, #0a0c10 60%),
    var(--bg);
  animation: splashOut .7s cubic-bezier(.4,0,.2,1) 1.7s forwards;
}
.splash-inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 24px;
  animation: splashIn .85s cubic-bezier(.2,.7,.3,1) both;
}
.splash-logo {
  width: 112px; height: 112px; border-radius: 28px; margin-bottom: 6px;
  object-fit: cover;
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55), 0 0 46px var(--accent-glow);
}
.splash-kicker {
  font-family: var(--ff-display); font-weight: 700; font-size: 13px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-2);
}
.splash-title {
  font-family: var(--ff-display); font-weight: 800; font-size: 34px;
  letter-spacing: -0.02em; line-height: 1.08; margin: 0; color: var(--text);
  text-shadow: 0 6px 30px var(--accent-glow);
}
.splash-rule {
  width: 56px; height: 3px; border-radius: 3px; margin-top: 8px;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
  animation: splashRule .85s cubic-bezier(.2,.7,.3,1) .15s both;
}
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }
@keyframes splashIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes splashRule { from { opacity: 0; width: 0; } to { opacity: 1; width: 56px; } }
@media (prefers-reduced-motion: reduce) {
  .splash { animation: splashOut .3s linear .6s forwards; }
  .splash-inner, .splash-rule { animation: none; }
}

/* Login gate: vertically-centred branded hero + the hanko-auth card. */
.auth-gate { animation: screenin .3s cubic-bezier(.2,.7,.3,1); }
.auth-scroll {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100%; gap: 22px; padding: 28px 20px;
}
.auth-hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 7px;
}
.auth-badge {
  width: 76px; height: 76px; border-radius: 26px; margin-bottom: 18px;
  background: var(--accent-soft); border: 1px solid var(--accent-soft);
  color: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px var(--accent-glow);
  overflow: hidden;
}
.auth-badge img { width: 100%; height: 100%; object-fit: cover; }
.auth-hero .kicker {
  color: var(--accent-2); font-weight: 700; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
}
.auth-title {
  font-family: var(--ff-display); font-weight: 800; font-size: 26px;
  letter-spacing: -0.01em; color: var(--text); margin: 0;
}
.auth-sub { color: var(--dim); font-size: 13px; line-height: 1.55; max-width: 280px; margin: 2px 0 0; }

.auth-card { width: 100%; max-width: 400px; padding: 20px; margin: 0 auto; }

/* Profile screen: avatar above the hanko-profile card. */
.profile-top { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 0 4px; }
.profile-top .av { box-shadow: 0 0 0 3px var(--surface), 0 8px 24px rgba(0,0,0,0.35); }

/* Tap the avatar to upload a new profile picture (a borderless button wrapper). */
.avatar-upload {
  position: relative; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 50%; line-height: 0;
}
.avatar-upload:active { transform: scale(0.97); }
.avatar-upload .av-edit {
  position: absolute; right: -2px; bottom: -2px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 3px var(--surface);
}
.avatar-upload[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.avatar-hint { font-family: var(--ff-display); font-weight: 700; font-size: 12px; color: var(--dim); }
.avatar-hint.err { color: var(--bad); }

/* Logout: a deliberately secondary (red) action, distinct from primary CTAs. */
.cta.logout {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; padding: 13px 22px;
  background: var(--surface); color: var(--bad);
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  font-family: var(--ff-display); font-weight: 700; font-size: 14px;
}
.cta.logout:active { transform: scale(0.98); }

/* Theme Hanko's web components to match the dark UI (CSS custom-property API). */
hanko-auth, hanko-profile {
  display: block;
  --color: var(--text);
  --color-shade-1: var(--dim);
  --color-shade-2: var(--line-2);
  --brand-color: var(--accent);
  --brand-color-shade-1: var(--accent-2);
  --brand-contrast-color: var(--accent-ink);
  --background-color: transparent;
  --error-color: var(--bad);
  --link-color: var(--accent-2);
  --button-color: var(--accent-ink);
  --font-family: var(--ff-body);
  --font-size: 14px;
  --border-radius: 12px;
  --border-style: solid;
  --border-width: 1px;
  --item-height: 46px;
  --item-margin: 10px 0;
  --container-padding: 0;
  --input-background-color: var(--surface-2);
  --input-border-color: var(--line-2);
}

/* ---- leaderboard username handle + admin screen ---- */
.lb-handle { font-size: 11px; font-weight: 600; color: var(--faint); }
.admin-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.admin-card .wdl { margin-top: 6px; }
/* primary "Confirm" action — same language as the lock-in button */
.admin-confirm { margin-top: 16px; height: 52px; border-radius: 16px; font-size: 16px; }

/* "Are you sure?" confirmation dialog */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 28px;
  background: rgba(8,10,14,0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: fadein .2s ease;
}
.confirm-box {
  width: 100%; max-width: 320px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5); animation: pop .35s cubic-bezier(.2,.9,.3,1.4);
}
.confirm-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-2);
}
.confirm-title { font-family: var(--ff-display); font-weight: 700; font-size: 19px; }
.confirm-msg { font-size: 13px; color: var(--dim); margin-top: 8px; line-height: 1.55; }
.confirm-msg b { color: var(--text); font-weight: 700; }
.confirm-actions { display: flex; gap: 10px; margin-top: 22px; }
.confirm-btn {
  flex: 1; height: 48px; border-radius: 14px; gap: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 700; font-size: 15px;
  transition: transform .12s ease, opacity .15s ease, filter .15s ease;
}
.confirm-btn:active { transform: scale(0.96); }
.confirm-btn:disabled { opacity: .5; }
.confirm-btn.no { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.confirm-btn.yes { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 22px var(--accent-glow); }

/* ============================================================
   Players tab (squad browser + player detail) and the
   top-3-top-scorers prediction (squad.jsx / topscorer.jsx)
   ============================================================ */

/* always-visible player name search */
.psearch { position: relative; margin: 6px 0 8px; }
.psearch-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--faint); pointer-events: none;
}
.psearch-input {
  width: 100%; height: 44px; padding: 0 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  color: var(--text); font: inherit; font-size: 14px; outline: none;
  transition: border-color .12s ease;
}
.psearch-input::placeholder { color: var(--faint); }
.psearch-input:focus { border-color: var(--accent); }
.psearch-input::-webkit-search-cancel-button { display: none; }
.psearch-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-2); color: var(--dim); font-size: 16px; line-height: 1;
}

/* one player row in the list / picker */
.prow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 8px; }
.prow .crest { flex: 0 0 auto; font-size: 7px; }
.prow-no {
  flex: 0 0 26px; text-align: center;
  font-family: var(--ff-display); font-weight: 700; font-size: 14px; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.prow-body { flex: 1; min-width: 0; }
.prow-name {
  font-family: var(--ff-display); font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prow-sub {
  font-size: 11.5px; color: var(--faint); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pos-tag {
  flex: 0 0 auto; font-family: var(--ff-display); font-weight: 700; font-size: 10px;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--dim);
}
.pos-tag.pos-fw { color: var(--accent-2); border-color: var(--accent); background: var(--accent-soft); }

/* player detail sheet */
.pdetail-back {
  display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 4px;
  color: var(--dim); font-weight: 700; font-size: 13px; background: none;
}
.pdetail-hero {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px 16px 18px; text-align: center; margin-bottom: 12px;
}
.pdetail-no {
  font-family: var(--ff-display); font-weight: 800; font-size: 26px; color: var(--accent-2);
  line-height: 1;
}
.pdetail-name { font-family: var(--ff-display); font-weight: 700; font-size: 18px; }
.pdetail-team { font-size: 12.5px; color: var(--dim); font-weight: 600; }
.pdetail-stats { padding: 4px 16px; }
.pstat {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.pstat:last-child { border-bottom: none; }
.pstat-k { font-size: 12px; color: var(--faint); font-weight: 600; flex: 0 0 auto; }
.pstat-v { font-size: 13.5px; font-weight: 600; text-align: right; }

/* full-screen player picker sheet (top-scorer slots) */
.picker-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8,10,14,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end;
}
.picker-sheet {
  width: 100%; height: 86dvh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line-2);
  padding: 14px 16px 0; animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.picker-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 4px; }
.picker-title { font-family: var(--ff-display); font-weight: 700; font-size: 15px; }
.picker-list { flex: 1; overflow-y: auto; padding-bottom: 16px; }

/* top-scorers prediction card */
.ts-card { padding: 14px 16px 16px; margin: 10px 0 12px; display: block; }
.ts-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ts-title {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--ff-display); font-weight: 700; font-size: 14px;
}
.ts-hint { font-size: 12px; color: var(--faint); margin: 6px 0 0; line-height: 1.45; }
.ts-slots { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ts-slot {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: var(--r-chip); text-align: left;
  background: var(--surface-2); border: 1px dashed var(--line-2); color: var(--text);
  font: inherit; transition: border-color .12s ease;
}
.ts-slot.filled { border-style: solid; border-color: var(--line); }
.ts-slot:not(:disabled):active { border-color: var(--accent); }
.ts-slot:disabled { opacity: 1; }
.ts-rank {
  flex: 0 0 32px; font-family: var(--ff-display); font-weight: 800; font-size: 13px;
  color: var(--accent-2);
}
.ts-slot .crest { flex: 0 0 auto; font-size: 6px; }
.ts-pname {
  flex: 1; min-width: 0; font-family: var(--ff-display); font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ts-pteam { font-size: 11px; font-weight: 700; color: var(--faint); }
.ts-empty { flex: 1; font-size: 13px; color: var(--faint); }
.ts-lock { width: 100%; margin-top: 12px; }
.ts-chips { display: flex; flex-wrap: wrap; gap: 4px; }
/* .mtag is scoped to .pred .pmeta — restate the chip look inside the ts card */
.ts-card .mtag {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 2px 8px; font-weight: 700; color: var(--text); font-family: var(--ff-display); font-size: 11px;
}
.ts-friends .friend-row { gap: 8px; padding: 9px 0; }
.ts-friends .fname { flex: 0 1 auto; font-size: 13px; }
.ts-result .score-parts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

/* Golden Boot reveal (results.jsx TopScorerResultOverlay): the actual podium,
   one row per step, staggered in like the lock-in crests; the right-hand tag
   judges the player's pick for that step. */
.tsr-rows { display: flex; flex-direction: column; gap: 8px; width: min(330px, 84vw); margin-top: 4px; }
.tsr-row {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 9px 12px; border-radius: var(--r-chip);
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  animation: crestIn .6s cubic-bezier(.2,.9,.3,1.4) both;
  animation-delay: calc(.12s + var(--i, 0) * .14s);
}
.tsr-medal { font-size: 18px; line-height: 1; flex: 0 0 auto; }
.tsr-row .crest { flex: 0 0 auto; font-size: 7px; }
.tsr-name {
  flex: 1; min-width: 0; font-family: var(--ff-display); font-weight: 700; font-size: 14px;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tsr-you {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--ff-display); font-weight: 700; font-size: 10.5px;
  padding: 3px 8px; border-radius: var(--r-pill); max-width: 110px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tsr-you.hit { background: var(--good-soft); color: var(--good); }
.tsr-you.near { background: var(--accent-soft); color: var(--accent-2); }
.tsr-you.miss { background: var(--surface-2); color: var(--faint); text-decoration: line-through; }
