/* 5 Winners — shared design tokens and common components.
   Linked from every page via <link rel="stylesheet" href="style.css">.
   Page-specific layout (fixture cards, tables, forms) stays inline
   in each page's own <style> block, but should reference these vars
   rather than hardcoding colours. */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@600;700&display=swap');

:root {
  --brand: #22C55E;
  --brand-light: #3DDC84;
  --brand-dark: #16A34A;
  --bg: #0B2818;
  --bg-alt: #0E3320;
  /* Fixture-wrap only (see .fixture-wrap below). A hue shift (cooler,
     tealer) rather than a pure lightness step off --bg-alt — a
     lightness-only value between --bg and --card can't read as distinct
     from both at once, since contrast against one always trades off
     against the other on the same hue. Its own token rather than a reuse
     of --bg-alt, which also drives the header, .btn-muted and chrome.js's
     icon fill and needs to move independently of this one. */
  --wrap-bg: #164028;
  /* Team box (opt-card, unselected) — its own token, not a reuse of
     --card: --card means the view-page card colour and nothing else,
     the team box moves independently. Sits a confident step up from
     --wrap-bg (1.78:1, in the same ballpark as --selected-bg's own jump
     off --card, 1.57:1, so the two "something happened" jumps on the
     site are similarly sized) while staying clearly below --selected-bg
     (1.18:1 apart), so picked vs unpicked reads as the bigger contrast
     of the two. Same hue family as --card/--selected-bg, just lighter —
     keeps the pitch-green identity rather than introducing a new hue. */
  --opt-bg: #4E6252;
  /* Keeps real chroma rather than desaturating toward neutral charcoal —
     a fully desaturated card reads as merged with the equally dark,
     muted background instead of as "a green object" in its own right.
     Paired with a real shadow on .item-card/.state-msg for genuine
     elevation, so distinctness doesn't rely on hue/saturation alone.
     Deliberately its own value, separate from --opt-bg — sharing a value
     between the two reads too faint for --muted/--border text against
     --card across all-picks/leaderboards/my-account/how-to-play. */
  --card: #3E4F41;
  --border: #63796A;

  /* Light accent-card themes — parchment/note-style containers that sit
     against the dark page rather than blending into it, for pages with
     several stacked containers (e.g. how-to-play's sections). Each theme
     is a full set (bg/border/heading/body/muted), not just a background
     swap, because light cards need dark text — reuse the whole set via
     the .theme-slate class (and .theme-bronze/gold/silver below) rather
     than mixing pieces. */
  --slate-bg: #D9DCDA;
  --slate-border: #B7BDB9;
  --slate-heading: #3A3F3D;
  --slate-text: #3A423E;
  --slate-muted: #626B67;
  --bronze-bg: #E0AD82;
  --bronze-border: #C08752;
  --bronze-heading: #6B3A14;
  --bronze-text: #5C3A22;
  --bronze-muted: #8A6647;
  /* Genuinely metallic gold/silver, kept separate from slate — a shared
     token there would carry two unrelated meanings (a neutral container
     theme and a medal colour). Bronze above is already single-purpose. */
  --gold-bg: #F3D46B;
  --gold-border: #C9A227;
  --gold-heading: #6B4E05;
  --gold-text: #5A4208;
  --gold-muted: #8C6C1A;
  --silver-bg: #E3E7E9;
  --silver-border: #AEB8BD;
  --silver-heading: #34424A;
  --silver-text: #2E3A40;
  --silver-muted: #5C6B72;

  --text: #EAF6EE;
  --text-soft: #D3E8DB;
  --muted: #7FBF9C;
  /* Literally brand green, not a near-duplicate mint of its own — brand
     and success reinforce each other rather than competing for the same
     visual slot with two almost-identical hues. */
  --ok: var(--brand-light);
  --ok-bg: rgba(61, 220, 132, 0.12);
  --err: #E88C8C;
  --err-bg: rgba(232, 140, 140, 0.14);
  --info: #A9D4EC;
  --info-bg: rgba(169, 212, 236, 0.14);
  /* Sits well clear of tierC, part of the same tier family below. Paired
     with a solid dark chip rather than a translucent -bg tint — see
     --badge-chip. --bonus-deep is a darkened text-only variant for use
     directly on light theme cards (e.g. slate), same idiom as
     --slate-heading. */
  --bonus: #DB6B9E;
  --bonus-deep: #8A2F5C;
  /* Dedicated SOLID fill for "this option is selected" (team-btn/
     result-btn) — a translucent tint over an already-green card barely
     registers, leaving the border to do all the work, so this is a real
     opaque colour instead. Saturated rather than just brightened: a
     lightness-only brighten erodes text contrast fast, where saturation
     alone gives the "poppy" selected feel while keeping team-name text
     comfortably above AA and staying clearly ahead of the unselected
     team box. Same hue as the rest of the green family, so no neon/
     off-family risk. */
  --selected-bg: #2D7948;
  /* Darker than the fill itself, unlike the unselected box's lighter-
     than-its-fill border — selected gets contrast from a border darker
     than its (brighter) fill. --bg gives a crisp dark frame, like a
     picture frame around something lit, rather than another glowing
     edge. */
  --selected-border: var(--bg);
  /* Separate from --bonus — this is the generic "caution/incomplete" amber
     used for things like the partial-picks submit button, unrelated to the
     counter-pick bonus tag. Keeping these distinct means --bonus living in
     the tier family (below) doesn't change what "amber = caution" means
     elsewhere. */
  --warn: #F0C46E;
  --warn-bg: rgba(240, 196, 110, 0.14);

  /* CTA — the site's one reserved "genuine commit" colour: magic-link
     sign-in, picks submit, results save/score. An amber-orange, clearer
     against the site's green at a glance than a more muted copper/
     terracotta would be. Deliberately clear of --gold-* (leaderboard
     medal, more yellow/lemon) and --tierC-fg's violet-blue family, so
     "confirm this" never reads as "you won" or "this is a tier".
     Scope: buttons only — the action bar container itself stays on the
     default --card, so CTA colour appears only when there's actually
     something to do, not as a permanent third zone.
     --cta is the core hue (outline borders, hybrid text). --cta-fill/
     --cta-text are the solid "ready" pairing (dark text on the lighter
     amber fill — checked ~6:1 AA). --cta-saved-bg/--cta-saved-text
     invert that (dark fill, light text) so "saved" reads as settled
     rather than a repeat of "ready". --cta-muted is the lighter tint
     for outline text/borders sitting directly on --card (my-account's
     hybrid Edit/Save). --cta-clear-* is Clear's own quieter but real
     fill — a transparent Clear next to a solid Submit reads as not
     really a button, so Clear gets a light, muted tint of the same
     family instead. */
  --cta: #D7892E;
  --cta-fill: #D7892E;
  --cta-text: #2B1B05;
  --cta-saved-bg: #8C5A1E;
  --cta-saved-text: #F7E4C8;
  --cta-muted: #EDB668;
  --cta-clear-bg: #EBC896;
  --cta-clear-border: #B8823D;
  --cta-clear-text: #6B4A1E;
  /* Desaturated variant of --cta's own hue, not the site's --border/
     --muted (those are desaturated green — visibly green next to
     orange) and not an unrelated neutral grey either — "this CTA,
     switched off" rather than a colour with no relationship to anything
     else on the page. A pale, washed-out tint with dark text, light
     enough to read as visibly lower-energy than an actually-pressable
     Clear button. Read by the action bar (my-picks/admin) and by
     index.html's own button:disabled. */
  --cta-disabled-bg: #998C7A;
  --cta-disabled-text: #4A4038;

  --font-display: 'Oswald', 'Segoe UI', sans-serif;

  /* Tier accents + bonus: a shared blue -> violet family, deliberately off
     status hues. Spaced so bonus (~333deg) sits well clear of the tierA-C
     run (~213-272deg) rather than crowding its top end and reading as an
     unofficial 4th tier. The -bg tints are kept only for live.html's own
     pick-cell/legend treatment — the shared .badge-tier component below
     uses --badge-chip instead. */
  --tierA-fg: #5B8FE0;
  --tierA-bg: rgba(91, 143, 224, 0.16);
  --tierB-fg: #8985E0;
  --tierB-bg: rgba(137, 133, 224, 0.16);
  --tierC-fg: #AF7FDC;
  --tierC-bg: rgba(175, 127, 220, 0.16);
  /* Solid, fixed dark chip for tier/bonus badges — a translucent tint of
     the badge's own hue would vary in contrast depending on what card
     state sits underneath it. A solid, state-independent chip clears
     WCAG AA (4.5:1+) for every tier/bonus colour against every card
     state, since legibility no longer depends on what's underneath.
     Dark enough to read as the same family as --selected-border, without
     reading heavier/darker than --border on unselected cards. */
  --badge-chip: #182A22;
}

* { box-sizing: border-box; }

/* Mobile browsers apply a default translucent dark overlay on tap unless
   told not to — with no custom :active state defined anywhere, every
   button/link press was falling back to that, which darkened text (badly
   on light theme-slate buttons) at the exact moment of pressing. */
a, button, select, .opt-card {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  /* Layered background: soft glow near the top (like floodlight wash),
     then vertical mown-stripe bands (alternating light/dark passes, like
     a mowed pitch), then the base colour underneath. */
  background:
    radial-gradient(ellipse 140% 60% at 50% -10%, rgba(61, 220, 132, 0.10), transparent 55%),
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 42px,
      rgba(0, 0, 0, 0.07) 42px,
      rgba(0, 0, 0, 0.07) 84px),
    var(--bg);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
}

/* Links read as muted mint at rest, brightening to white on hover/focus —
   avoids bright green text sitting directly on the green background. */
a {
  color: var(--muted);
  text-decoration: none;
}
a:hover, a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 2px;
}

header {
  background: var(--bg-alt);
  color: var(--text);
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
/* Top row of the header: .header-inner (home icon + title) on the left,
   .header-icons (utility shortcuts -- How to Play, My Account) on the
   right. Its own wrapper so .header-inner can stay a simple left-aligned
   cluster even on how-to-play.html's centred header (which overrides
   justify-content locally). */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
/* Wraps the home-link icon and the page title on one row. Every page's
   header carries a way back to index.html without a text "Home" entry
   competing for space in .nav-row -- the logo does that job instead, the
   more common convention (brand mark doubles as home link). */
.header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
header h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
}
.header-inner h1 {
  margin: 0;
}
/* Same ball icon as index.html's hero, recoloured to sit on the header's
   own --bg-alt background rather than the page's --bg. Present on every
   page's header except index.html itself, which is the home destination. */
.home-link {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}
/* Utility shortcuts -- How to Play and My Account are occasional-use, not
   part of the core My Picks/All Picks/Leaderboards loop, so they sit as
   small header icons rather than competing for space in .nav-row. Same
   visual language as .home-link (solid circle, cut-out glyph in the
   header's own background colour) so the three read as a matched set. */
.header-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.header-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  /* Padding (not fixed width/height) gives a ~40px tap target around the
     visually-24px icon without eating into .header-icons' own gap --
     margin is vertical-only, so it doesn't pull neighbouring icons closer
     together the way a horizontal negative margin would. */
  padding: 8px;
  margin: -8px 0;
}
header .meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
/* Short one-line explainer under the title row, rendered by chrome.js's
   renderHeader() when a page passes a subtitle. Shared here rather than
   defined per-page since several pages use the same pattern. */
header .subtitle {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.5;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px;
}

.state-msg {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.nav-row {
  display: flex;
  align-items: center;
  column-gap: 8px;
  row-gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.nav-row a {
  font-size: 13px;
  font-weight: 600;
}
/* A dot divider generated on the link itself, rather than a separate
   sibling element, so a hidden link (display:none) can never leave an
   orphaned divider behind — nothing to detach it from. */
.nav-row a:not(:first-of-type)::before {
  content: '·';
  margin-right: 8px;
  color: var(--border);
}

.gw-select {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  /* Uses --card, not --bg-alt like .btn-secondary — the <select> element
     always carries .theme-slate in markup, which redefines --card (and
     --text-soft) locally for a correct light-surface/dark-text pairing;
     a hardcoded different token here would break that override and
     leave dark text on a dark background. color is --text-soft directly
     rather than the base --text every other user of --card gets, since
     .gw-select is only ever paired with .theme-slate in markup across
     every consuming page. */
  background: var(--card);
  color: var(--text-soft);
}

/* Shared GW picker row: dropdown (left) + status line (right), directly
   under .nav-row on every GW-scoped page (my-picks, admin, all-picks,
   leaderboards' GW view). See chrome.js's renderGwBar() for the
   icon/status logic that fills these in. */
.gw-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
/* .gw-select's own margin-left: auto is for when it sits alone as a
   .nav-row child — .gw-bar's own space-between already handles the
   left/right split, so cancel it here to avoid the two positioning
   rules fighting. */
.gw-bar .gw-select { margin-left: 0; }

.gw-status {
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

/* Shared button system — one consistent look per role, used across all
   pages so nav/action buttons don't end up randomly filled vs outlined. */
.btn {
  display: block;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--brand-dark);
  color: #F0FBF4;
}
.btn-secondary {
  /* Uses the same theming-hook mechanism as .gw-select (var(--card)) —
     giving a nav element .theme-slate in markup (as index.html does)
     is how "nav buttons look too green" gets fixed, not a different
     token here. */
  background: var(--card);
  border-color: var(--border);
  /* --text-soft, not --text — theme classes only override --text-soft,
     not the base --text, so a hardcoded --text would leave a
     theme-slate nav button with unreadable white-on-light-grey text.
     --text-soft is the theme-aware token, and reads fine on the default
     dark card too. */
  color: var(--text-soft);
}
/* Scoped to real hover-capable devices only — on touch, a tap can get
   stuck in :hover with no way to "unhover" until something else is
   tapped, so an unscoped rule here would apply the filter/colour change
   permanently after a single tap. :active below gives real tap feedback
   instead, since :active releases naturally on touch-up and can't get
   stuck this way. */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--brand); color: #06210F; }
  .btn-secondary:hover { filter: brightness(1.12); border-color: var(--brand-light); }
}
.btn-primary:active { background: var(--brand); color: #06210F; }
.btn-secondary:active { filter: brightness(1.12); border-color: var(--brand-light); }
/* theme-slate's light bg/dark text pairing needs its own :active rule
   rather than the default dark .btn-secondary's filter: brightness(1.12)
   — that filter pushes bg and text uniformly toward white together,
   which washes the text out on an already-near-white slate card. Higher
   specificity (three classes) wins over .btn-secondary:active regardless
   of source order. A solid darker fill gives real press feedback without
   touching the text's own colour at all. */
.btn-secondary.theme-slate:active {
  filter: none;
  background: var(--slate-border);
  border-color: var(--slate-heading);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn-ghost:hover { border-color: var(--err); color: var(--err); background: var(--err-bg); }
.btn-muted {
  background: var(--bg-alt);
  color: var(--muted);
  border-color: var(--border);
  cursor: default;
}

/* Tier badges. `.badge-tier` is the only name in use. */
.badge-tier {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  /* A subtle light edge, independent of whatever's behind the chip — the
     chip's own dark fill can end up close in tone to a dark card fill
     (e.g. picks.html's sunken "unsuccessful" state), and without this
     the pill loses its boundary and the score looks like loose floating
     text rather than a badge. */
  border: 1px solid rgba(234, 246, 238, 0.12);
}
.badge-tier.tierA { color: var(--tierA-fg); background: var(--badge-chip); }
.badge-tier.tierB { color: var(--tierB-fg); background: var(--badge-chip); }
.badge-tier.tierC { color: var(--tierC-fg); background: var(--badge-chip); }

/* Light accent-card themes — apply to any container that already uses
   var(--card)/var(--border)/var(--brand-light)/var(--text-soft)/var(--muted)
   (e.g. a `section`) and it flips to a light parchment/slate card with
   correctly dark text, without touching that container's own rules.
   Genuine-commit buttons (action bar, index sign-in, my-account) use
   their own dedicated CTA family instead (see :root) rather than
   borrowing a container theme as a button colour. */
.theme-slate {
  --card: var(--slate-bg);
  --border: var(--slate-border);
  --brand-light: var(--slate-heading);
  --text-soft: var(--slate-text);
  --muted: var(--slate-muted);
}
.theme-bronze {
  --card: var(--bronze-bg);
  --border: var(--bronze-border);
  --brand-light: var(--bronze-heading);
  --text-soft: var(--bronze-text);
  --muted: var(--bronze-muted);
}
.theme-gold {
  --card: var(--gold-bg);
  --border: var(--gold-border);
  --brand-light: var(--gold-heading);
  --text-soft: var(--gold-text);
  --muted: var(--gold-muted);
}
.theme-silver {
  --card: var(--silver-bg);
  --border: var(--silver-border);
  --brand-light: var(--silver-heading);
  --text-soft: var(--silver-text);
  --muted: var(--silver-muted);
}
.theme-green {
  /* Card/text stay at the site default — this class exists only to make
     the green choice explicit alongside .theme-sand/.theme-slate, and to
     give it a brighter, green-tinted edge so it separates from the
     near-black page rather than the neutral grey-green border everywhere
     else uses. */
  --border: var(--brand-dark);
}
/* The Making Picks step numbers are a filled green chip by default — on a
   slate card that reads as an unrelated colour dropped in, so give it a
   navy chip to match instead. */
.theme-slate .step-list li::before {
  background: var(--slate-heading);
  color: #F4F8FB;
}

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-dark);
  color: #F0FBF4;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: none;
  max-width: 90vw;
  text-align: center;
}
.toast.show { display: block; }

/* Shared "one item per row" card container, used by picks, admin, live,
   and leaderboards — one background/border/radius recipe for card
   treatment (font, colour, spacing) instead of one per page. Each page
   keeps its own class alongside this one for whatever's genuinely
   page-specific (leaderboard's flex row, live's title/status stacking,
   etc.) — only the shared recipe lives here. */
.item-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Shared "title line + status line" caption: a bold context line plus a
   smaller status/result line beneath it. Used by fixture-card.js's
   per-fixture header, all-picks.html's per-fixture header, and
   leaderboards.html's per-view header — one shape, one definition,
   rather than three pages each carrying their own near-identical
   version. */
.cap-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-soft);
}
.cap-status {
  font-size: 11px;
  color: var(--muted);
}
.cap-status.finished { color: var(--ok); }
.theme-slate .cap-status.finished { color: var(--slate-heading); }

/* Shared view-switcher tabs, used by leaderboards.html's own switcher and
   admin.html's Score Gameweeks / Payouts switcher — one definition rather
   than a second local copy. Uses --opt-bg/--selected-bg rather than the
   plain --card: a toggle and a team pick are the same shape of thing
   (choosing one of several options), unlike --card's job of just
   displaying info, so sharing that colour pair is deliberate. Doesn't
   reuse --selected-border (= --bg) for the active frame, since that
   token only works sitting on --wrap-bg — against the page background
   directly it would be the same colour as what it's on and vanish.
   Fill contrast alone (2.4:1 unselected, 2.96:1 active, against the
   page) carries the distinction instead. */
.tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--opt-bg);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.tab-btn.active {
  background: var(--selected-bg);
  color: #F0FBF4;
  border-color: var(--selected-bg);
}

/* Shared ranked-row component, used by leaderboards.html and
   winnings.html — both need the identical row shape (rank, name, a bold
   right-aligned figure, an optional muted detail line beneath), so it
   lives here rather than as a second local copy. The "lb-" prefix stays
   despite the second consumer — renaming an already-shipped, tested
   class purely for naming purism isn't worth the churn. */
.lb-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lb-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lb-top svg {
  flex-shrink: 0;
}
.rank-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-soft);
}
.rank-plain {
  width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.lb-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-name .you-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-light);
  margin-left: 6px;
}
.lb-pts {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-soft);
  flex-shrink: 0;
}
/* Its own full-width line rather than confined to the name column, so
   it doesn't truncate. Indented to sit under the name rather than the
   rank badge, so it reads as "belonging" to this row's player. */
.lb-breakdown {
  font-size: 11px;
  color: var(--muted);
  /* rank-badge (22) + gap (12) + avatar (20) + gap (12) — keeps this
     line indented under the name, not the rank badge or avatar. */
  padding-left: 66px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Prize money line — only rendered when a leaderboards.html row's player
   currently holds a prize position, so it never appears for most rows
   there. Not used on winnings.html — that page's .lb-pts already is the
   money figure, and .lb-breakdown holds its prize-name list directly, so
   a second money line would be redundant there. Reuses --ok rather than
   inventing a new colour: a prize is semantically a positive outcome,
   same family as a correct pick or a finished/complete status elsewhere
   in the app. */
.lb-prize {
  font-size: 11px;
  font-weight: 700;
  color: var(--ok);
  padding-left: 34px;
  margin-top: 1px;
}

/* Shared list card (list-card.js): the shell behind all-picks' per-fixture
   card and leaderboards' per-view card — item-card wrapper, cap-title/
   cap-status header, then a list of rows on a hairline divider. Row
   content itself isn't shared (all-picks needs who/what/tier-badge rows,
   leaderboards needs rank-badge/name/points rows — nothing in common
   there), so this is only the shell: header spacing, and the divider
   between rows. */
.list-card .cap-title { margin-bottom: 2px; }
.list-card .cap-status { margin-bottom: 8px; }
.list-rows > * {
  border-top: 1px solid var(--border);
  padding: 7px 0;
}
.list-rows > *:first-child {
  border-top: none;
  padding-top: 0;
}
.list-rows > *:last-child {
  padding-bottom: 0;
}

/* The my-picks/admin fixture wrapper uses a dedicated fill (--wrap-bg)
   rather than --item-card's default --card, so the wrapper recedes and
   the option boxes inside it (see --opt-bg / .opt-card below) read as
   the actual surface rather than a card sitting on a card. Genuinely
   identical between my-picks.html and admin.html (both use
   fixture-card.js's renderFixtureCard), so it lives here rather than
   duplicated in each page's <style>.
   --wrap-bg's fill-only contrast against neighbouring surfaces has a
   hard ceiling: the fixture title/kickoff text sitting directly on this
   wrapper has to stay legible, which caps how light it can go. So
   distinctness comes mainly from a real border + shadow rather than
   fill contrast alone — the standard dark-theme answer when fill
   headroom is this constrained (this is genuinely how Material's own
   dark elevation system handles it). Border colour is the shared
   --border, just at a thicker weight with a stronger shadow, rather
   than a separate, more saturated colour of its own. */
.fixture-wrap {
  background: var(--wrap-bg);
  border: 2px solid var(--border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* Shared fixture card (fixture-card.js): one row per fixture — a header
   line (name + kickoff), an optional result/status line, and a row of 2
   or 3 selectable outcome boxes. Both my-picks.html and admin.html render
   from the same component, so this lives in the shared file rather than
   duplicated per page. Title/status text styling itself comes from
   .cap-title/.cap-status above; what's left here is just the header's
   flex layout and the kickoff time, which is specific to this card
   (all-picks/leaderboards have no equivalent). */
.fx-row {
  padding: 14px 0;
}
.fx-row:first-child { padding-top: 0; }
.fx-row:last-child { padding-bottom: 0; }
.fx-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.fx-head .cap-title {
  /* Fixture rows repeat ten times a page, unlike all-picks' and
     leaderboards' single per-view caption — full 14.5px/700 reads too
     heavy repeated that often, so this is the one deliberate override of
     the shared caption rather than a drift back into a fourth variant. */
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.fx-head .fx-kickoff {
  font-size: 11px;
  /* A genuine midpoint between --muted and --text-soft — same hue
     (~145°) and saturation as both, just a lightness step between them,
     so it fills a gap in the existing green/white text ramp rather than
     introducing a new colour. 6.56:1 against --wrap-bg (--muted is
     5.47:1, --text-soft is 9.08:1). */
  color: #9DCDB1;
  flex-shrink: 0;
}
/* Both the "Awaiting score" status and the "{Team} won"/"Draw" result use
   .cap-status directly (the latter with .finished) — margin-bottom is the
   one addition this card needs that the bare caption doesn't. */
.fx-row .cap-status {
  margin-bottom: 10px;
}
.opt-row {
  display: flex;
  gap: 8px;
}
.opt-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  min-height: 68px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--opt-bg);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.12s, background 0.12s, opacity 0.12s;
}
/* The draw option (admin only) is a real narrow third box rather than a
   relabelled "vs" divider — my-picks never renders one at all, since a
   draw was never a valid prediction to begin with. */
.opt-card.draw {
  flex: 0 0 56px;
  padding: 8px 4px;
}
.opt-card .opt-label {
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}
.opt-card.draw .opt-label {
  font-size: 12.5px;
}
.opt-card.readonly {
  cursor: default;
}
/* Scoped to real hover-capable devices only — same mobile stuck-hover fix
   applied to .btn-primary/.btn-secondary above. */
@media (hover: hover) and (pointer: fine) {
  .opt-card:not(.readonly):hover { border-color: var(--brand); }
}
.opt-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Outcome state: whichever option didn't win gets dimmed, regardless of
   what was picked/entered — combined with .selected (below) already
   carrying the "this was your pick" signal, that's enough to read
   correct/wrong without a separate tick or unsuccessful treatment. */
.opt-card.dimmed {
  opacity: 0.55;
}

/* Shared "this option is selected" recipe for .opt-card
   (fixture-card.js), used identically by picks and admin. Border uses
   --brand, not --brand-light — against the muted card, --brand-light
   reads as an overly bright, glowing outline by comparison. */
.opt-card.selected {
  border-color: var(--selected-border);
  background: var(--selected-bg);
}

/* Shared inline status-message component: a coloured box, hidden until
   .show, with ok/err/info variants. Used by index.html's .status,
   .name-status, and .config-warning, each of which only carries its own
   spacing on top of this. */
.inline-msg {
  padding: 10px 12px;
  border-radius: 8px;
  display: none;
}
.inline-msg.show { display: block; }
.inline-msg.ok { background: var(--ok-bg); color: var(--ok); }
.inline-msg.err { background: var(--err-bg); color: var(--err); }
.inline-msg.info { background: var(--info-bg); color: var(--info); }

/* Shared sticky action bar, used by picks.html (count + button) and
   admin.html (two buttons, no count) — same fixed-position/CTA recipe
   under one definition. Two buttons: the main action plus an
   always-available Clear, not two steps of the same save flow. */
.action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.action-bar button {
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1;
  padding: 14px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.action-bar #actionBtn {
  color: #F0FBF4;
}
.action-bar #actionBtn:disabled {
  background: var(--cta-disabled-bg);
  border-color: var(--cta-disabled-bg);
  color: var(--cta-disabled-text);
  cursor: not-allowed;
}
/* Ready — solid CTA fill. Deliberately its own amber hue, not the site's
   saturated brand green: on a page this green-dominant, green stops
   reading as "click this" the moment it's also the ambient colour of
   everything else. Text/fill contrast checked at ~4.8:1 (AA). */
.action-bar #actionBtn.ready {
  background: var(--cta-fill);
  color: var(--cta-text);
  border-color: var(--cta-fill);
}
/* Submitted — inverted pairing of the ready state (dark fill, light
   text), staying in the CTA family rather than switching to the site's
   green --ok: one accent family end-to-end reads clearer than
   ready/submitted swapping colour identity. Green is kept only as a
   small tick accent on pages that use one, not the whole fill. */
.action-bar #actionBtn.submitted:disabled {
  background: var(--cta-saved-bg);
  color: var(--cta-saved-text);
  border: 1px solid var(--cta-saved-text);
  opacity: 1;
}
.action-bar #actionBtn.submitted:disabled .tick { color: var(--brand-dark); margin-right: 2px; }

/* Clear — a real fill, a light muted tint of the CTA family, rather than
   transparent/outline-only — a transparent Clear next to a solid Submit
   reads as barely a button. Both buttons size to their own content
   (.action-bar button's flex: 0 0 auto) — the container's
   justify-content: space-between does the actual left/right
   positioning, not either button growing to fill space. */
.action-bar #clearBtn {
  background: var(--cta-clear-bg);
  border-color: var(--cta-clear-border);
  color: var(--cta-clear-text);
}
.action-bar #clearBtn:disabled {
  background: var(--cta-disabled-bg);
  border-color: var(--cta-disabled-bg);
  color: var(--cta-disabled-text);
  cursor: not-allowed;
}