:root {
  /* University of Notre Dame palette */
  --navy: #0c2340;        /* primary background (ND blue) */
  --navy-2: #102a4c;      /* panels */
  --navy-3: #1b3a66;      /* lines / hover */
  --gold: #ffc72c;        /* the ETA — the answer (ND gold) */
  --gold-deep: #c99700;   /* metallic gold accents */
  --green: #0c8a3f;       /* ND/athletics green accent */
  --green-bright: #2ec16a; /* on-dark live/won text (passes AA on navy; was #0c8a3f, too dark) */
  --white: #ffffff;       /* accent / text */
  --text: #f3f6fc;
  --muted: #9fb0ce;
  --muted-dim: #8c9cc0;   /* secondary labels — lightened to clear WCAG AA (5.7:1) on navy */
  --warn: #e8a317;
  --danger: #ff6b6b;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* The `hidden` attribute must beat author `display` rules below (.error-banner,
   .game, .band-toggle, .controls all set display), or JS toggling `el.x.hidden`
   won't hide them. */
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  background: radial-gradient(1100px 560px at 50% -12%, #15396b 0%, var(--navy) 58%);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;            /* dvh = mobile-safe viewport height */
  display: flex;
  flex-direction: column;
  /* respect the iOS notch / home-indicator safe areas */
  padding: calc(1.25rem + env(safe-area-inset-top)) calc(1.25rem + env(safe-area-inset-right))
           calc(1rem + env(safe-area-inset-bottom)) calc(1.25rem + env(safe-area-inset-left));
}

/* ---- top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--white);
  font-size: 1rem;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
  text-decoration: none;
  cursor: pointer;
}
.brand:hover { opacity: 0.85; }
.brand:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }

.pill {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.pill-upcoming { color: var(--gold); }
.pill-final { color: var(--muted); }
.pill-live { color: var(--green-bright); }
.pill-live::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 0.4rem;
  vertical-align: middle;
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.mode-toggle {
  background: none;
  border: 1px solid var(--navy-3);
  color: var(--muted);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.15s, color 0.15s;
}
.mode-toggle:hover { color: var(--white); border-color: var(--gold-deep); }

/* ---- sport / game pickers ---- */
.controls {
  display: flex;
  gap: 0.9rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.control {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 150px;
}
.control-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
}
.select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--navy-2);
  color: var(--text);
  border: 1px solid var(--navy-3);
  border-radius: 10px;
  padding: 0.6rem 2rem 0.6rem 0.8rem;
  /* 16px keeps iOS Safari from auto-zooming the page on focus */
  font-size: 16px;
  min-height: 44px;               /* comfortable tap target */
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffc72c' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  transition: border-color 0.15s;
}
.select:hover { border-color: var(--gold-deep); }
.select:focus { outline: none; border-color: var(--gold); }
.select option { background: var(--navy-2); color: var(--text); }

/* ---- error banner ---- */
.error-banner {
  margin-top: 0.75rem;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: #ffd4d4;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.error-retry { color: var(--muted); }

/* ---- board ---- */
.board {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.state-block { text-align: center; width: 100%; }

/* ---- the game ---- */
.game {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.context-line {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}
.period-line { color: var(--gold-deep); }

/* HERO — the wall-clock answer is the single biggest element */
.hero {
  font-weight: 400;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: 0.4rem 0 0.2rem;
}
.hero-lead {
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  color: var(--muted);
}
.eta-time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(3.5rem, 16vw, 6.5rem);
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 18px rgba(255, 199, 44, 0.18);
}
.hero-zone {
  font-size: clamp(0.8rem, 2.5vw, 0.95rem);
  color: var(--muted-dim);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 0.1rem;
}
.eta-mins {
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  color: var(--white);
  margin-top: 0.5rem;
  font-weight: 600;
}

/* band / how-sure */
.band-toggle {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.band-toggle:hover { color: var(--white); }
.band-caret { font-size: 0.7rem; transition: transform 0.15s; }
.band-toggle[aria-expanded="true"] .band-caret { transform: rotate(180deg); }
.band-detail {
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--navy-2);
  border: 1px solid var(--navy-3);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  max-width: 420px;
  line-height: 1.5;
}
.band-detail strong { color: var(--white); font-weight: 600; }
.ot-chip { color: var(--gold); }

/* score subhead — present but clearly secondary to the hero */
.score-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.4rem;
}
.team { display: flex; align-items: baseline; gap: 0.5rem; }
.team-abbr { font-size: 0.95rem; color: var(--muted); letter-spacing: 0.05em; }
.team-score {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--white);
}

/* tennis set-by-set scoreboard (detail view) */
.set-scores { display: flex; justify-content: center; margin: 0.2rem 0 0.6rem; }
.set-table { border-collapse: collapse; font-family: var(--mono); font-size: 1rem; }
.set-table th { color: var(--muted-dim); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.06em; padding: 0.15rem 0.55rem; text-align: center; }
.set-table tbody th { text-align: right; font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-table td { color: var(--muted); text-align: center; padding: 0.15rem 0.55rem; }
.set-table td b { color: var(--text); font-weight: 800; }
.set-table sup { font-size: 0.62em; color: var(--muted-dim); margin-left: 1px; }

.score-dash { color: var(--muted-dim); }

/* live moneyline (DraftKings) */
.odds-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--navy-3);
}
.odds-line {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
/* each team stacked: abbreviation on top, moneyline centered below it */
.odds-col {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 3rem;
}
.odds-abbr { font-size: 0.8rem; color: var(--muted-dim); letter-spacing: 0.05em; }
.odds-ml {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
}
.odds-ml.odds-fav { color: var(--gold); }      /* favorite (negative line) */
.odds-ml.odds-won { color: var(--green-bright, #2ec16a); }  /* winning bet on a final */
.odds-ml.odds-lost { color: var(--muted-dim); opacity: 0.65; }  /* losing side, faded */
.odds-draw .odds-abbr { color: var(--muted-dim); }
.odds-cap {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

.last-play {
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.2em;
  max-width: 460px;
  font-style: italic;
}

/* the raw game clock — deliberately tiny; it's the number that lies */
.rawclock {
  font-size: 0.78rem;
  color: var(--muted-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}
.rawclock-val { font-family: var(--mono); }

/* ---- empty + skeleton ---- */
.empty-title { font-size: 1.5rem; font-weight: 700; color: var(--white); }
.empty-sub { color: var(--muted); margin: 0.5rem 0 0; }

.skeleton {
  background: linear-gradient(90deg, var(--navy-2) 25%, #21437a 50%, var(--navy-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 12px;
  margin: 0 auto;
}
.skeleton-hero { width: 70%; height: 6rem; }
.skeleton-line { width: 40%; height: 1.4rem; margin-top: 1rem; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- footer / trust surface ---- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-dim);
  padding-top: 1rem;
  border-top: 1px solid var(--navy-3);
}
.footer .sep { opacity: 0.5; }
.updated { color: var(--muted); }
.now-cap #now-time { font-family: var(--mono); }
.footlink { color: var(--muted); text-decoration: none; }
.footlink:hover { color: var(--gold); text-decoration: underline; }

/* stale: dim the whole board when data is old */
.wrap.is-stale .board { opacity: 0.45; transition: opacity 0.3s; }
.wrap.is-stale .updated { color: var(--warn); }

@media (max-width: 480px) {
  .wrap {
    padding: calc(1rem + env(safe-area-inset-top)) calc(1rem + env(safe-area-inset-right))
             calc(0.75rem + env(safe-area-inset-bottom)) calc(1rem + env(safe-area-inset-left));
  }
  .mode-toggle { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
  .control { min-width: 0; }
  .controls { gap: 0.6rem; }
  /* stack the two pickers on very narrow screens so labels never clip */
  .score-row { gap: 0.75rem; }
  .footer { gap: 0.4rem 0.5rem; font-size: 0.72rem; }
}
@media (max-width: 360px) {
  .controls { flex-direction: column; }
  .eta-time { font-size: clamp(3rem, 18vw, 4rem); }
}

/* =====================  /stats analytics page  ===================== */
.stats {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1.25rem;
}
.stats-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.01em;
}
.stats-card {
  background: var(--navy-2);
  border: 1px solid var(--navy-3);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
}
.stats-aggregate { border-color: var(--gold-deep); }
.stats-h2 {
  font-size: 1.05rem;
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.stats-h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-deep);
  font-weight: 700;
  margin: 1.1rem 0 0.55rem;
}
.stats-tag {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--gold);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-weight: 800;
}
.stats-aggregate .stats-tag { background: var(--gold); }
.stats-card:not(.stats-aggregate) .stats-tag { background: var(--muted); }
.stats-note { color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin: 0.6rem 0 0.9rem; }
.stats-fineprint { color: var(--muted-dim); font-size: 0.78rem; line-height: 1.5; }
.stats-fineprint strong { color: var(--muted); }
.stats-setup { color: var(--muted); font-size: 0.88rem; line-height: 1.55; margin: 0.6rem 0 0.9rem; padding-left: 1.2rem; }
.stats-setup li { margin: 0.35rem 0; }
.stats-setup code { background: var(--navy-3); padding: 0.05rem 0.3rem; border-radius: 4px; font-size: 0.85em; }

.stats-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  min-height: 44px;
  cursor: pointer;
  font-family: inherit;
}
.stats-btn:hover { background: #ffd24d; }
.stats-btn-ghost {
  background: none;
  color: var(--muted);
  border: 1px solid var(--navy-3);
  margin-top: 1.1rem;
}
.stats-btn-ghost:hover { color: var(--danger); border-color: var(--danger); background: none; }

.stats-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin-top: 0.4rem;
}
.stats-kpi {
  background: var(--navy);
  border: 1px solid var(--navy-3);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.stats-kpi-val { font-size: 1.25rem; font-weight: 700; color: var(--gold); font-family: var(--mono); }
.stats-kpi-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.stats-bars { display: flex; flex-direction: column; gap: 0.45rem; }
.stats-bar-row { display: flex; align-items: center; gap: 0.6rem; }
.stats-bar-label { flex: 0 0 30%; font-size: 0.82rem; color: var(--text); text-transform: capitalize; }
.stats-bar-track { flex: 1; height: 0.7rem; background: var(--navy); border-radius: 999px; overflow: hidden; }
.stats-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.stats-bar-val { flex: 0 0 auto; font-size: 0.82rem; color: var(--muted); font-family: var(--mono); min-width: 1.5rem; text-align: right; }

.stats-recent { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.stats-recent li { font-size: 0.85rem; color: var(--text); }
.stats-recent-when { color: var(--muted-dim); font-family: var(--mono); font-size: 0.78rem; margin-right: 0.3rem; }
.stats-empty { color: var(--muted-dim); font-size: 0.85rem; font-style: italic; }

@media (max-width: 360px) {
  .stats-kpis { grid-template-columns: 1fr; }
}

/* ============================================================================
   HOME SCREEN — all games on one screen, each tappable for detail
   ========================================================================== */
/* .board centers a single game; the home grid stacks top-down full width */
.board--home { display: block; }
.home { width: 100%; }
.home-sub { color: var(--muted); font-size: 0.85rem; margin: 0.2rem 0 0.4rem; }

.sb-group { margin-top: 1.4rem; }
.sb-group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 0.15rem 0.55rem; border-bottom: 1px solid var(--navy-3); padding-bottom: 0.35rem;
}
.sb-group-title { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; color: var(--text); }
.sb-group-count { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-dim); }

.sb-grid { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
@media (min-width: 620px) { .sb-grid { grid-template-columns: 1fr 1fr; } }

.sb-card {
  display: flex; align-items: stretch; justify-content: space-between; gap: 0.75rem;
  background: var(--navy-2); border: 1px solid var(--navy-3); border-radius: 14px;
  padding: 0.7rem 0.8rem; cursor: pointer; text-align: left; width: 100%; color: inherit;
  font: inherit; transition: border-color 0.12s ease, transform 0.06s ease;
}
.sb-card:hover { border-color: var(--gold-deep); }
.sb-card:active { transform: scale(0.992); }
.sb-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.sb-left { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; flex: 1; }
.sb-statusline { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.05rem; }
.sb-dot { width: 7px; height: 7px; border-radius: 999px; flex: none; }
.sb-dot.live { background: #2ec16a; box-shadow: 0 0 0 3px rgba(46,193,106,0.18); }
.sb-dot.pre { background: var(--gold); }
.sb-dot.post { background: var(--muted-dim); }
.sb-status { font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sb-team { display: flex; align-items: baseline; gap: 0.5rem; }
.sb-ab { font-weight: 700; font-size: 0.95rem; color: var(--text); min-width: 0; max-width: 15ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-nm { font-size: 0.72rem; color: var(--muted-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-sc { font-family: var(--mono); font-weight: 800; font-size: 0.95rem; color: var(--text); margin-left: auto; }
/* tennis set line on cards: loser's sets muted, won sets bold + bright */
.sb-sc.sets { font-weight: 500; color: var(--muted); letter-spacing: 0.08em; white-space: nowrap; }
.sb-sc.sets b { color: var(--text); font-weight: 800; }
.sb-team.win .sb-ab, .sb-team.win .sb-sc { color: var(--white); }
.sb-team.lose .sb-ab, .sb-team.lose .sb-sc, .sb-team.lose .sb-nm { opacity: 0.5; }

.sb-right {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  text-align: right; flex: none; min-width: 5.6rem; padding-left: 0.6rem; border-left: 1px solid var(--navy-3);
}
.sb-end-cap { font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-dim); }
.sb-end-time { font-family: var(--mono); font-weight: 800; font-size: 1.15rem; line-height: 1.05; color: var(--gold); }
.sb-end-time.final { color: var(--muted); font-size: 0.95rem; }
/* card time color mirrors the status dot: live = green, upcoming = gold, done = white */
.sb-end-time.live { color: #2ec16a; }
.sb-end-time.pre  { color: var(--gold); }
.sb-end-time.post { color: var(--white); }
.sb-end-time.post.est { color: var(--muted); font-weight: 700; } /* tennis: estimated end (no ESPN data) */
/* Over/Under vs our pre-game call — a glanceable chip on finished games */
.sb-ou {
  display: inline-block; margin-top: 0.25rem; font-size: 0.58rem; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 7px;
  border-radius: 999px; border: 1px solid currentColor; opacity: 0.92;
}
.sb-ou.ou-over  { color: var(--muted); }
.sb-ou.ou-under { color: var(--muted); }
.sb-ou.ou-push  { color: var(--gold); }
/* detail-page O/U line: "Our call 9:46 → ▲ Over 12m" */
.ou-line { margin: 0.15rem 0 0.5rem; font-size: 0.95rem; color: var(--muted); }
.ou-line b { color: var(--white); font-weight: 700; font-family: var(--mono); }
.sb-end-when { font-size: 0.66rem; color: var(--muted); margin-top: 0.15rem; }
.sb-chev { font-size: 0.7rem; color: var(--muted-dim); margin-top: 0.2rem; }

/* back button on the detail view (44px min tap target for iOS) */
.sb-back {
  display: inline-flex; align-items: center; gap: 0.35rem; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-size: 0.9rem; padding: 0.4rem 0.1rem; min-height: 44px;
  margin: 0 0 0.2rem; align-self: flex-start;
}
.sb-back:hover { color: var(--gold); }
.sb-back:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* visually hidden but available to screen readers (home-screen <h1>) */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================================
   SHARE — one-tap share button + fallback menu + toast
   ========================================================================== */
.share-wrap { position: relative; display: flex; flex-direction: column; align-items: center; margin: 1rem 0 0.2rem; }
/* home-screen variant: same component, a notch quieter than the detail hero's */
.share-wrap-home { margin: 0.4rem 0 0.9rem; }
.share-wrap-home .share-btn { min-height: 38px; padding: 0.4rem 1.1rem; font-size: 0.92rem; box-shadow: 0 4px 12px rgba(255,199,44,0.14); }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.55rem 1.4rem; border-radius: 999px; cursor: pointer;
  background: var(--gold); color: var(--navy); border: 0; font: inherit; font-weight: 800;
  letter-spacing: 0.01em; box-shadow: 0 6px 18px rgba(255,199,44,0.18);
  transition: transform 0.06s ease, filter 0.12s ease;
}
.share-btn:hover { filter: brightness(1.05); }
.share-btn:active { transform: scale(0.97); }
.share-btn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.share-ico { color: var(--navy); }

.share-menu {
  position: absolute; top: calc(100% + 0.5rem); left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; flex-direction: column; min-width: 12rem; padding: 0.35rem;
  background: var(--navy-2); border: 1px solid var(--navy-3); border-radius: 14px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.45);
}
.share-menu-item {
  text-align: left; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer;
  padding: 0.7rem 0.85rem; border-radius: 9px; min-height: 44px;
}
.share-menu-item:hover { background: var(--navy-3); color: var(--gold); }
.share-menu-item:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.share-toast {
  position: absolute; top: calc(100% + 0.5rem); left: 50%; transform: translateX(-50%); z-index: 25;
  background: var(--navy-3); color: var(--white); font-size: 0.82rem; font-weight: 600;
  padding: 0.5rem 0.9rem; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0,0,0,0.4);
}

/* ============================================================================
   THE PICK LOOP — call over/under on the end time, see your result, challenge
   a friend. Account-less; the share IS the recruiting funnel.
   ========================================================================== */
/* record chip in the header (W-L · streak) */
.record-chip {
  font-family: var(--mono); font-weight: 800; font-size: 0.74rem; color: var(--gold);
  background: rgba(255,199,44,0.10); border: 1px solid rgba(255,199,44,0.35);
  padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap;
}

/* a friend's challenge banner (arrived via /vs) */
.challenge-banner {
  margin: 0.2rem 0 0.6rem; padding: 0.6rem 0.85rem; border-radius: 12px;
  background: var(--navy-2); border: 1px solid var(--navy-3); border-left: 3px solid var(--gold);
  color: var(--text); font-size: 0.9rem; line-height: 1.4;
}
.challenge-banner .cb-emoji { margin-right: 0.25rem; }

/* the pick row (under the share button on the detail view) */
.pick-row {
  display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
  margin: 0.8rem auto 0; max-width: 24rem; padding: 0.9rem 1rem;
  background: var(--navy-2); border: 1px solid var(--navy-3); border-radius: 14px;
}
.pick-q { font-size: 0.95rem; color: var(--text); text-align: center; }
.pick-q b { color: var(--gold); font-weight: 800; }
.pick-btns { display: flex; gap: 0.6rem; width: 100%; }
.pick-btn {
  flex: 1; min-height: 48px; padding: 0.6rem 0.9rem; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 1rem; letter-spacing: 0.01em;
  border-radius: 12px; background: var(--navy-3); color: var(--text);
  border: 1px solid var(--navy-3); transition: transform 0.06s ease, filter 0.12s ease, background 0.12s ease;
}
.pick-btn.pick-over  { color: #2ec16a; border-color: rgba(46,193,106,0.5); }
.pick-btn.pick-under { color: var(--gold); border-color: rgba(255,199,44,0.5); }
.pick-btn.pick-over:hover  { background: rgba(46,193,106,0.16); }
.pick-btn.pick-under:hover { background: rgba(255,199,44,0.16); }
.pick-btn:active { transform: scale(0.97); }
.pick-btn:disabled { opacity: 0.45; cursor: default; }
.pick-btn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.pick-hint { font-size: 0.72rem; color: var(--muted); text-align: center; }
.pick-mine { font-size: 0.95rem; color: var(--text); text-align: center; }
.pick-mine b { color: var(--gold); font-weight: 800; }
.pick-sub { color: var(--muted); font-weight: 400; }

/* secondary "challenge a friend" / "share result" button (outline gold) */
.pick-share {
  min-height: 40px; padding: 0.45rem 1.1rem; cursor: pointer; font: inherit; font-weight: 800;
  border-radius: 999px; background: none; color: var(--gold); border: 1px solid var(--gold);
}
.pick-share:hover { background: rgba(255,199,44,0.12); }
.pick-share:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
/* challenge channels side by side (wrap on narrow screens) */
.pick-share-row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
/* dedicated WhatsApp button — brand green + chat-bubble glyph (the native share
   sheet omits WhatsApp on macOS, so this is the reliable path) */
.pick-wa { display: inline-flex; align-items: center; gap: 0.4rem; color: #25d366; border-color: #25d366; }
.pick-wa:hover { background: rgba(37,211,102,0.12); }
.wa-glyph {
  width: 15px; height: 15px; flex: none; background-color: #25d366;
  -webkit-mask: var(--wa-mask) center / contain no-repeat; mask: var(--wa-mask) center / contain no-repeat;
  --wa-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 3C9.4 3 4 8.4 4 15c0 2.1.6 4.2 1.6 6L4 29l8.2-1.5c1.7.9 3.6 1.4 5.5 1.4h.3c6.6 0 12-5.4 12-12S22.6 3 16 3zm0 22c-1.7 0-3.4-.5-4.9-1.3l-.4-.2-4.9.9.9-4.8-.3-.4C5.5 18.4 5 16.7 5 15 5 9 9.9 4 16 4s11 5 11 11-4.9 10-11 10zm6-7.5c-.3-.2-1.9-.9-2.2-1-.3-.1-.5-.2-.8.2-.2.3-.8 1-1 1.2-.2.2-.4.2-.7.1-1.8-.9-3-1.6-4.2-3.6-.3-.5.3-.5.9-1.6.1-.2 0-.4 0-.5-.1-.2-.8-1.8-1-2.5-.3-.7-.5-.6-.8-.6h-.6c-.2 0-.5.1-.8.4-.3.3-1 1-1 2.5s1.1 2.9 1.2 3.1c.2.2 2.2 3.3 5.3 4.7 2 .8 2.7.9 3.7.8.6-.1 1.9-.8 2.2-1.5.3-.8.3-1.4.2-1.5-.1-.2-.3-.2-.6-.4z'/%3E%3C/svg%3E");
}

/* "save your W" email capture (storage-only) */
.pick-email { width: 100%; margin-top: 0.4rem; padding-top: 0.7rem; border-top: 1px solid var(--navy-3); display: flex; flex-direction: column; gap: 0.45rem; }
.pe-q { font-size: 0.86rem; color: var(--text); text-align: center; font-weight: 600; }
.pe-form { display: flex; gap: 0.4rem; }
.pe-input {
  flex: 1; min-height: 44px; padding: 0.5rem 0.75rem; font: inherit; border-radius: 10px;
  background: var(--navy); color: var(--text); border: 1px solid var(--navy-3);
}
.pe-input.pe-bad { border-color: var(--danger); }
.pe-input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.pe-save {
  min-height: 44px; padding: 0.5rem 1.1rem; cursor: pointer; font: inherit; font-weight: 800;
  border-radius: 10px; background: var(--gold); color: var(--navy); border: 0;
}
.pe-save:disabled { opacity: 0.5; cursor: default; }
.pe-consent { font-size: 0.68rem; color: var(--muted); text-align: center; }
.pe-done { font-size: 0.9rem; color: #2ec16a; text-align: center; font-weight: 700; }

/* "your call" chip on the home-screen game card */
.sb-pick {
  display: inline-block; margin-top: 0.25rem; font-size: 0.58rem; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px;
  border: 1px solid currentColor;
}
.sb-pick.pick-open { color: var(--gold); }
.sb-pick.pick-won  { color: #2ec16a; }
.sb-pick.pick-lost { color: var(--muted); }
.sb-pick.pick-push { color: var(--gold); }
