/* poolean web — the iOS "Arena" visual system ported for full parity, laid out
   for desktop (sidebar + multi-column) instead of a phone column. */

:root {
  --blue: #0b63d6;
  --blue-deep: #0a4da8;
  --blue-tint: #eaf1fd;
  --gold: #f4b41a;
  /* The same color as channels, for the translucent golds (rgba(var(--gold-rgb), a)). */
  --gold-rgb: 244, 180, 26;
  /* The far end of the gold banner's gradient, and the crown's outline. */
  --gold-shade: #d99e16;
  --gold-edge: #9a6e08;
  --gold-deep: #b7820b;
  --gold-tint: #fcf1d2;
  --on-gold: #3a2b05;
  --on-gold-deep: #2a2003;
  --gold-text: #7a560a;
  --silver: #c4cbd4;
  --silver2: #9aa3ae;
  --ink: #15191f;
  --ink2: #576070;
  --ink3: #8b93a1;
  --header-top: #1b2330;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --line: #e6eaf0;
  --track: #edf0f5;
  --up: #1e9d5b;
  --up-tint: #e2f4ea;
  --down: #e1543c;
  --down-tint: #fbeae6;
  --flat: #9aa3ae;

  /* Primary text-on-surface color. Deliberately its OWN token, not an alias
     for --ink -- --ink doubles as the intentional-always-dark background for
     chrome (topbar, sidebar, arena headers, .btn-dark, toasts), which must
     stay dark navy in BOTH light and dark app theme. Only --text (body copy,
     card labels) actually inverts between themes. */
  --text: var(--ink);

  --disp: "Saira Condensed", system-ui, sans-serif;
  --ui: "Hanken Grotesk", system-ui, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 14px; --r-xl: 18px; --r-xxl: 22px;
  --sidebar-w: 250px;
  --maxw: 1140px;
  --shadow-card: 0 4px 16px rgba(21, 25, 31, 0.07);
  --shadow-gold: 0 8px 26px rgba(var(--gold-rgb), 0.22);
  --shadow-pop: 0 16px 44px rgba(21, 25, 31, 0.18);
}

/* Dark theme -- brand-color dark palette (not neutral gray), matching the
   app's own icon dark-plate convention. Defaults to the system's own
   prefers-color-scheme; an explicit choice in Settings > Dark mode overrides
   it. Only the page-level tokens invert -- the always-dark chrome
   (topbar/sidebar/arena/.btn-dark, all keyed off --ink) is untouched, since
   it already reads correctly in both themes. */
:root[data-theme="dark"] {
  --bg: #0b0e13;
  --surface: #171b22;
  --line: #262c33;
  --track: #20252e;
  --text: #eef1f5;
  --ink2: #a9b1bd;
  --ink3: #79818f;
  --blue: #4f8ff5;
  --blue-deep: #2f6fd6;
  --blue-tint: rgba(79, 143, 245, 0.16);
  /* --gold-text deliberately NOT overridden -- it's always rendered on the
     gold card/pill (--gold, also fixed in both themes), and inverting it to
     a near-white tone made "#1 overall" and other gold-card labels wash out
     invisible against the gold background (caught 2026-07-16). */
  --gold-tint: rgba(244, 180, 26, 0.14);
  --up: #3ecf85;
  --up-tint: rgba(62, 207, 133, 0.15);
  --down: #ff6f5c;
  --down-tint: rgba(255, 111, 92, 0.15);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 16px 44px rgba(0, 0, 0, 0.55);
  /* --blue-tint composited over --surface, for the one place that needs it
     opaque (the tracker's row hover over a sticky column). */
  --blue-hover: #202e44;
}

/* Accent color (Settings > Accent color, prefs.js). Pool Blue is the default and
   sets no attribute, so these never apply to anyone who has not picked one.
   index.html sets data-accent in the head, before this stylesheet paints.
   Each family is derived from its base: deep is the base 21% toward black and
   the tint 91.5% toward white; the dark theme lifts the base about 20 points of
   lightness (the way #4f8ff5 sits over #0b63d6), pulled back by eye for green
   and teal, which glowed at the full lift; its tint is that color at 16%,
   and --blue-hover is the tint composited over the dark surface. --live-a is
   Team A on the always-dark live scoreboard, a pale version of the same hue.

   The gold family follows the accent too, as a companion hue rather than the
   accent's own: the live scoreboard, the win odds and every game row put Team A
   in the accent against Team B in gold, so the two have to stay apart. Pool Blue
   keeps the yellow. A companion is one vivid base, the same in both themes like
   the yellow; the rest is derived from it to the yellow's measures: --gold-deep
   and --gold-edge sit at the luminance their yellow counterparts have (so deep
   holds 3.4:1 on white and 5.1:1 on the dark surface), then the inks start at
   the yellow inks' lightness and darken only as far as they must: --on-gold to 7:1 on the base,
   --gold-text to 4.5:1 on the base and on the tint. --gold-shade keeps the
   yellow's 0.76 luminance ratio to the base, the light tint is 20% base over
   white, and the dark tint is the base at 14%. These are the values goldFamily()
   in src/lib/accentStore.ts derives on iOS, under the same keys; --gold-rgb,
   --gold-shade and --gold-edge are the web's own. */
:root[data-accent="crimson"] { --blue: #d6334f; --blue-deep: #a9283e; --blue-tint: #fceef0; --live-a: #ff8a9c;
  --gold: #f28a2e; --gold-rgb: 242, 138, 46; --gold-shade: #dc7519; --gold-deep: #d96e10; --gold-edge: #b75d0c; --gold-tint: #fce8d5;
  --on-gold: #281504; --on-gold-deep: #1d0f03; --gold-text: #5b3009;
}
:root[data-accent="crimson"][data-theme="dark"] { --blue: #ec6a80; --blue-deep: #c65367; --blue-tint: rgba(236, 106, 128, 0.16); --blue-hover: #392831; --gold-tint: rgba(242, 138, 46, 0.14); }
:root[data-accent="green"] { --blue: #1e9d5b; --blue-deep: #187c48; --blue-tint: #ecf7f1; --live-a: #8ae6b4;
  --gold: #b6d230; --gold-rgb: 182, 210, 48; --gold-shade: #a1b932; --gold-deep: #819422; --gold-edge: #6d7d1c; --gold-tint: #f0f6d6;
  --on-gold: #2c320d; --on-gold-deep: #1f2409; --gold-text: #4c5716;
}
:root[data-accent="green"][data-theme="dark"] { --blue: #3cc480; --blue-deep: #2f9a63; --blue-tint: rgba(60, 196, 128, 0.16); --blue-hover: #1d3631; --gold-tint: rgba(182, 210, 48, 0.14); }
:root[data-accent="purple"] { --blue: #7a52e0; --blue-deep: #6041b1; --blue-tint: #f4f0fc; --live-a: #b49cff;
  --gold: #e58be8; --gold-rgb: 229, 139, 232; --gold-shade: #d86fdb; --gold-deep: #d754dc; --gold-edge: #c729cc; --gold-tint: #fae8fa;
  --on-gold: #320c33; --on-gold-deep: #240825; --gold-text: #68196b;
}
:root[data-accent="purple"][data-theme="dark"] { --blue: #9a7cf0; --blue-deep: #7250c8; --blue-tint: rgba(154, 124, 240, 0.16); --blue-hover: #2c2b43; --gold-tint: rgba(229, 139, 232, 0.14); }
:root[data-accent="teal"] { --blue: #0e9aa7; --blue-deep: #0b7a84; --blue-tint: #ebf6f8; --live-a: #86e3ec;
  --gold: #6fdda8; --gold-rgb: 111, 221, 168; --gold-shade: #3dc785; --gold-deep: #279e65; --gold-edge: #208755; --gold-tint: #e2f8ee;
  --on-gold: #0e3220; --on-gold-deep: #092417; --gold-text: #1a603e;
}
:root[data-accent="teal"][data-theme="dark"] { --blue: #2fbccb; --blue-deep: #23919c; --blue-tint: rgba(47, 188, 203, 0.16); --blue-hover: #1b353d; --gold-tint: rgba(111, 221, 168, 0.14); }
:root[data-accent="pink"] { --blue: #d6339a; --blue-deep: #a9287a; --blue-tint: #fceef6; --live-a: #ff94d6;
  --gold: #ff9e5e; --gold-rgb: 255, 158, 94; --gold-shade: #f48034; --gold-deep: #ec5f02; --gold-edge: #c95001; --gold-tint: #ffecdf;
  --on-gold: #3d1a03; --on-gold-deep: #2c1201; --gold-text: #793304;
}
:root[data-accent="pink"][data-theme="dark"] { --blue: #e86bb6; --blue-deep: #c6539b; --blue-tint: rgba(232, 107, 182, 0.16); --blue-hover: #38283a; --gold-tint: rgba(255, 158, 94, 0.14); }
/* The tracker's row hover is the one opaque tint (its bridge in tracker.css pins
   #202e44, Pool Blue's). Re-pointed here rather than by regenerating tracker.css
   from scripts/scope-tracker-css.py, which no longer reproduces the committed
   file. Higher specificity than the bridge, so stylesheet order does not matter. */
:root[data-theme="dark"][data-accent] .tracker { --surface-hover: var(--blue-hover); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
/* While a sheet is open the page must not scroll. At the top of the page a
   downward drag that reaches the document is pull-to-refresh in Safari, so
   without this a swipe on a sheet reloads the whole app. `overscroll-behavior`
   kills the refresh gesture; `overflow: hidden` stops the page moving behind
   the sheet, which was its own small wrongness. Toggled by the overlay
   MutationObserver in app.js. */
body.sheet-open { overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--ui); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold-tint); }

.eyebrow { font-family: var(--ui); font-weight: 800; font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink3); }
.disp { font-family: var(--disp); font-weight: 800; letter-spacing: 0.01em; line-height: 0.98; }
.spin { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-screen { min-height: 100dvh; display: grid; place-items: center; }
.uc { text-transform: uppercase; }

/* ── avatar (initials on color; rings + crown for #1; photo when set) ── */
.avw { position: relative; flex: none; display: inline-flex; }
.av { border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--disp); font-weight: 700; overflow: hidden; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.06); }
.av span { line-height: 1; transform: translateY(6%); }
.avw.silver .av { box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.08); }
.avw.gold .av { box-shadow: none; }
/* gold double ring: white outer + gold inner */
.avw.gold::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 var(--ringw, 3px) #fff, 0 0 0 calc(var(--ringw, 3px) + var(--goldw, 2px)) var(--gold); }
/* Award ring: the same double ring in the winner's best tier colour, set by
   --ringc from the avatar helper. One class for all three tiers so the ring
   geometry can't drift between them. */
.avw.tier .av { box-shadow: none; }
.avw.tier::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 var(--ringw, 3px) #fff, 0 0 0 calc(var(--ringw, 3px) + var(--goldw, 2px)) var(--ringc, var(--gold)); }
.avw .crown { position: absolute; left: 50%; top: 0; transform: translate(-50%, -62%) rotate(-3deg); pointer-events: none; }
.avw .crown svg { display: block; }

/* ── jersey rank chip ── */
.jersey { display: grid; place-items: center; color: #fff; font-family: var(--disp); font-weight: 700; flex: none; background: linear-gradient(160deg, var(--blue), var(--blue-deep)); }
.jersey.gold { background: linear-gradient(160deg, var(--gold), var(--gold-deep)); color: var(--on-gold-deep); }
.jersey span { transform: translateY(4%); }

/* ── movement chip ── */
.move { display: inline-flex; align-items: center; gap: 3px; font-family: var(--ui); font-weight: 700; font-size: 13px; padding: 3px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.move.up { color: var(--up); background: var(--up-tint); }
.move.down { color: var(--down); background: var(--down-tint); }
.move.flat { color: var(--flat); background: transparent; padding: 3px 4px; }
.move.bare { background: transparent; padding: 0; }
.move .tri { font-size: 9px; line-height: 1; }

/* ── tally bar ── */
.tally { height: 11px; border-radius: 999px; background: var(--track); overflow: hidden; }
.tally > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--blue-deep)); }
.tally.gold > i { background: linear-gradient(90deg, var(--gold), var(--gold-deep)); }

/* ── segments (vote progress) ── */
.segs { display: flex; gap: 5px; }
.segs > i { height: 7px; flex: 1; border-radius: 4px; background: rgba(255, 255, 255, 0.18); }
.segs > i.on { background: var(--gold); }

/* ── buttons ── */
.btn { height: 46px; border-radius: var(--r-md); display: inline-grid; place-items: center; font-weight: 800; font-size: 15px; padding: 0 20px; transition: transform 0.06s, filter 0.15s; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn-gold { background: var(--gold); color: var(--on-gold-deep); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--blue); border: 1px solid var(--line); }
.btn-danger { background: var(--down-tint); color: var(--down); }
.btn-danger:hover { background: var(--down); color: #fff; }
.btn-lg { height: 54px; font-size: 16px; }
.btn-full { width: 100%; }

/* ───────────────────────── sign in ───────────────────────── */
.auth { min-height: 100dvh; background: linear-gradient(155deg, var(--header-top) 0%, var(--ink) 70%); color: #fff; display: flex; flex-direction: column; }
.auth-wrap { width: 100%; max-width: 460px; margin: 0 auto; padding: 40px 26px 28px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand { font-family: var(--disp); font-weight: 700; letter-spacing: 0.28em; font-size: 18px; color: var(--gold); }
.auth-hero { width: 150px; height: 150px; object-fit: cover; align-self: center; margin: 14px 0 6px; border-radius: var(--r-xl); box-shadow: 0 8px 20px rgba(var(--gold-rgb), 0.22); }
.auth h1 { font-family: var(--disp); font-weight: 800; font-size: 42px; line-height: 1.04; margin-top: 8px; }
.auth .lede { color: rgba(255, 255, 255, 0.62); font-weight: 500; font-size: 15px; line-height: 1.45; margin-top: 14px; }
.auth-form { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.field { height: 50px; border-radius: var(--r-md); border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.06); padding: 0 14px; color: #fff; font-size: 16px; font-weight: 500; }
.field::placeholder { color: rgba(255, 255, 255, 0.4); }
.field:focus { outline: none; border-color: var(--gold); background: rgba(255, 255, 255, 0.1); }
.auth .btn-gold { height: 52px; }
.auth .err { color: #ff9b9b; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.auth-row { display: flex; justify-content: center; gap: 18px; margin-top: 16px; }
.link-muted { color: rgba(255, 255, 255, 0.55); font-weight: 600; font-size: 13.5px; }
.pending-card { background: rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 18px; }
.pending-card .eyebrow { color: var(--gold); }
@media (min-width: 920px) {
  .auth-wrap { max-width: var(--maxw); display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 64px; padding: 48px; margin: auto; }
  .auth-hero { width: 200px; height: 200px; align-self: flex-start; margin: 0 0 18px; }
  .auth h1 { font-size: 64px; }
  .auth .lede { font-size: 17px; max-width: 30ch; }
  .auth-card { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--r-xxl); padding: 32px; }
  .auth-form { margin-top: 0; }
}

/* ───────────────────────── shell ───────────────────────── */
.shell { min-height: 100dvh; }
.sidebar { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 14px 12px; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.topbar .brand { font-family: var(--disp); font-weight: 700; letter-spacing: 0.24em; font-size: 16px; color: var(--gold); }
.tb-right { display: flex; align-items: center; gap: 12px; }
.menu-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: #fff; margin-right: -6px; }

/* Hamburger dropdown (mobile nav) */
.navmenu { position: fixed; inset: 0; z-index: 50; display: none; }
.navmenu.open { display: block; }
.navmenu-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.navmenu-panel { position: relative; z-index: 1; background: var(--ink); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 14px 14px; border-radius: 0 0 20px 20px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4); animation: drop 0.2s ease; }
@keyframes drop { from { transform: translateY(-14px); opacity: 0.5; } to { transform: none; opacity: 1; } }
.navmenu-panel .brand { font-family: var(--disp); font-weight: 700; letter-spacing: 0.24em; font-size: 16px; color: var(--gold); }
.navmenu-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.navmenu-item { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: 12px; color: rgba(255, 255, 255, 0.72); font-weight: 700; font-size: 16px; }
.navmenu-item svg { width: 22px; height: 22px; }
.navmenu-item.active { background: rgba(var(--gold-rgb), 0.14); color: var(--gold); }
.navmenu-item .badge { margin-left: auto; background: var(--gold); color: var(--on-gold-deep); font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; color: var(--gold); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--gold-rgb), 0.5); } 70% { box-shadow: 0 0 0 9px rgba(var(--gold-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--gold-rgb), 0); } }

.main { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.wrap { max-width: 720px; margin: 0 auto; padding: 18px 16px 0; }

/* dark scoreboard header per screen (ArenaHeader) */
.arena { background: linear-gradient(160deg, var(--header-top), var(--ink)); color: #fff; border-radius: 0 0 26px 26px; padding: 22px 20px 22px; }
.arena .label { font-family: var(--disp); font-weight: 700; letter-spacing: 0.16em; font-size: 15px; color: var(--gold); }
.arena h1 { font-family: var(--disp); font-weight: 800; font-size: 38px; line-height: 1.0; letter-spacing: 0.01em; margin-top: 6px; }
.arena .sub { font-weight: 600; font-size: 12.5px; color: rgba(255, 255, 255, 0.6); margin-top: 12px; }
.arena .ul { width: 54px; height: 5px; border-radius: 3px; background: var(--gold); margin-top: 9px; }
.arena-wrap { max-width: 720px; margin: 0 auto; }

.section-label { font-family: var(--ui); font-weight: 800; font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink3); margin: 20px 2px 10px; display: flex; align-items: center; justify-content: space-between; }
.section-label .link { color: var(--blue); font-size: 12px; cursor: pointer; }
/* The sort menu in a section label reads like the "Game log" link beside it
   rather than like a form control, because it sits in a heading and not a form.
   It is a button that opens the app's own picker (pickFrom in app.js). It was a
   native select, for the platform's wheel; Adam, 2026-10-01, wants no platform
   modals anywhere in the app, so the app draws its own. */
.section-label .sort-wrap { position: relative; display: inline-flex; align-items: center; }
.section-label .sort-wrap::after { content: "▾"; position: absolute; right: 1px; pointer-events: none; color: var(--blue); font-size: 11px; line-height: 1; }
.section-label .sort-select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; margin: 0; padding: 0 14px 0 0; line-height: inherit; font-family: var(--ui); font-weight: 800; font-size: 12px; letter-spacing: 0.02em; text-transform: none; color: var(--blue); cursor: pointer; }
.section-label .sort-select:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
/* A label at the top of its container needs no space above it, and one further
   down does. Expressed as a rule rather than as a margin-top:0 written inline at
   each site: the sites that did that stopped being first the moment a season
   banner appeared above them, and the heading ended up flush against its border
   on the Stats page, the awards block and a profile. */
.section-label:first-child { margin-top: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-card); }

/* ── board rows ── */
.board { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 12px; box-shadow: var(--shadow-card); cursor: pointer; }
.row .nm { font-family: var(--ui); font-weight: 800; font-size: 15.5px; letter-spacing: 0.01em; text-transform: uppercase; flex: 1; }
.row .nm small { display: block; text-transform: none; color: var(--ink3); font-weight: 600; font-size: 11.5px; letter-spacing: 0; }

/* ── stat cards / tiles ── */
/* minmax(0, 1fr) for the same reason .shell uses it: a 1fr track keeps
   min-width: auto, so a card whose content does not want to wrap widens its
   track and pushes the grid past the screen. The movers row did exactly that on
   a phone. */
.stat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 13px; box-shadow: var(--shadow-card); cursor: pointer; }
.stat-card.flat { cursor: default; }
.stat-card .eyebrow { font-size: 10px; }
.stat-card .who { display: flex; align-items: center; gap: 9px; margin-top: 8px; }
.stat-card .who .n { font-family: var(--ui); font-weight: 800; font-size: 14px; text-transform: uppercase; }
.stat-card .val { font-family: var(--disp); font-weight: 700; font-size: 22px; line-height: 1.1; margin-top: 6px; }
.stat-card .val.up { color: var(--up); } .stat-card .val.down { color: var(--down); } .stat-card .val.gold { color: var(--gold-deep); }
.dark-block { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 13px 16px; margin-top: 12px; }
.dark-block .eyebrow { color: var(--gold); }
.dark-block .t { font-weight: 600; font-size: 13.5px; margin-top: 5px; color: rgba(255,255,255,0.85); }
.dark-block .t b { font-family: var(--disp); font-weight: 700; font-size: 18px; }

.mover { display: flex; align-items: center; gap: 11px; border-radius: var(--r-lg); padding: 12px 14px; }
.mover.up { background: var(--up-tint); } .mover.down { background: var(--down-tint); }
.mover .nm { flex: 1; font-family: var(--ui); font-weight: 800; font-size: 14px; text-transform: uppercase; }
.mover .eyebrow { font-size: 10px; }

/* trend (sparkline) rows */
.trend { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--line); }
.trend:first-child { border-top: none; }
.trend .nm { flex: 1; font-family: var(--ui); font-weight: 800; font-size: 14.5px; text-transform: uppercase; }
.trend .nm small { display: block; text-transform: none; color: var(--ink3); font-weight: 600; font-size: 11.5px; }
/* The headline number on a reviewed-film row, which the sort menu above the list
   names. Tabular so a column of them lines up on the decimal point. */
.trend .rk { font-family: var(--disp); font-weight: 700; font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── rules ── */
.rule { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 15px; box-shadow: var(--shadow-card); margin-bottom: 9px; }
.rule .n { font-family: var(--disp); font-weight: 700; font-size: 30px; line-height: 1; color: var(--blue); width: 26px; text-align: center; flex: none; }
.rule h3 { font-weight: 800; font-size: 16px; }
.rule ul { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.rule li { position: relative; padding-left: 15px; color: var(--ink2); font-size: 13.5px; line-height: 1.48; }
.rule li::before { content: "·"; position: absolute; left: 2px; color: var(--gold); font-weight: 800; }
.rule .sub { margin-top: 12px; } .rule .sub h4 { font-weight: 700; font-size: 13.5px; } .rule .sub ul { margin-top: 5px; }

/* ── party ── */
.banner { border-radius: var(--r-xl); padding: 18px; color: #fff; box-shadow: var(--shadow-card); }
.banner.head { background: linear-gradient(150deg, var(--header-top), var(--ink)); }
.banner.gold { background: linear-gradient(150deg, var(--gold), var(--gold-shade)); color: var(--on-gold-deep); }
.banner.idle { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.banner .eyebrow { color: rgba(255, 255, 255, 0.7); }
.banner.gold .eyebrow { color: var(--gold-text); } .banner.idle .eyebrow { color: var(--ink3); }
.banner h3 { font-family: var(--disp); font-weight: 800; font-size: 30px; margin-top: 8px; text-transform: uppercase; }
.banner .when { font-weight: 600; font-size: 14px; margin-top: 6px; opacity: 0.92; }
.banner .infobox { display: flex; gap: 10px; margin-top: 14px; }
.banner .infobox .ib { flex: 1; background: rgba(255,255,255,0.1); border-radius: var(--r-md); padding: 10px 12px; }
.banner.idle .infobox .ib { background: var(--bg); }
.banner .ib .k { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; opacity: 0.7; text-transform: uppercase; }
.banner .ib .v { font-weight: 700; font-size: 16px; margin-top: 3px; }
.banner .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.checkins { display: flex; flex-wrap: wrap; row-gap: 14px; padding: 12px 2px 4px; }
.checkin { width: 20%; flex: none; text-align: center; cursor: pointer; }
.checkin .nm { font-weight: 600; font-size: 11.5px; color: var(--ink2); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-circle { width: 50px; height: 50px; border-radius: 50%; border: 2px dashed var(--silver2); display: grid; place-items: center; font-family: var(--disp); font-size: 26px; color: var(--silver2); margin: 0 auto; cursor: pointer; }
.rsvp-btns { display: flex; gap: 10px; margin-top: 4px; }
.rsvp-btn { flex: 1; height: 48px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--surface); font-family: var(--ui); font-weight: 800; font-size: 14.5px; color: var(--text); cursor: pointer; box-shadow: var(--shadow-card); }
.rsvp-btn.yes.on { background: var(--up); border-color: var(--up); color: #fff; box-shadow: none; }
.rsvp-btn.no.on { background: var(--down); border-color: var(--down); color: #fff; box-shadow: none; }
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 16px 8px; margin-top: 10px; }
.roster-grid .checkin { width: auto; }
.past-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; box-shadow: var(--shadow-card); cursor: pointer; margin-bottom: 6px; }
.past-row.static { cursor: default; }
.past-row .nm { flex: 1; font-weight: 800; font-size: 15.5px; }
.past-row .nm small { display: block; font-weight: 600; font-size: 12px; color: var(--ink3); }

/* ── vote ── */
.vote-card { display: flex; align-items: center; gap: 13px; background: var(--surface); border: 2px solid transparent; border-radius: var(--r-lg); padding: 11px 13px; box-shadow: var(--shadow-card); cursor: pointer; margin-bottom: 8px; }
.vote-card.lead { border-color: var(--gold); background: var(--gold-tint); }
.vote-card.mine { border-color: var(--blue); background: var(--blue-tint); }
.vote-card .mid { flex: 1; min-width: 0; }
.vote-card .nm { font-family: var(--ui); font-weight: 800; font-size: 15.5px; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.vote-card .tag { font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }
.vote-card .tag.lead { background: var(--gold); color: var(--on-gold-deep); } .vote-card .tag.mine { background: var(--blue); color: #fff; }
.vote-card .tally { margin-top: 8px; }
.vote-count { width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center; font-family: var(--disp); font-weight: 700; font-size: 24px; flex: none; background: var(--blue-tint); color: var(--blue); }
.vote-card.lead .vote-count { background: var(--gold); color: var(--on-gold-deep); }
.locked { display: flex; align-items: center; gap: 13px; border-radius: var(--r-lg); padding: 10px 13px; background: linear-gradient(150deg, var(--gold), var(--gold-shade)); margin-bottom: 8px; }
.locked .nm { flex: 1; font-family: var(--ui); font-weight: 800; font-size: 15.5px; text-transform: uppercase; color: var(--on-gold-deep); }
.locked .rk { font-weight: 700; font-size: 12px; color: var(--gold-text); }
.locked .pts { font-family: var(--ui); font-weight: 800; font-size: 13px; color: var(--on-gold-deep); margin-left: 10px; flex: none; }
.vote-foot { display: flex; gap: 10px; margin-top: 14px; }
.vote-foot .btn { flex: 1; }
.vote-foot .btn.wide { flex: 1.7; }

/* ── ranked-choice voting ── */
/* Regular / Ranked choice toggle on the "Start the vote" banner (dark pills on
   the gold banner). */
/* Ranked vote card: the bar+percent row and the voter's own 1/2/3 pick chip. */
.rank-bar-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rank-bar-row .tally { flex: 1; margin-top: 0; }
.rank-pct { font-family: var(--disp); font-weight: 700; font-size: 15px; color: var(--ink3); min-width: 38px; text-align: right; }
.rank-pct.lead { color: var(--gold-deep); }
.pick-chip { width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center; font-family: var(--disp); font-weight: 700; font-size: 26px; flex: none; background: var(--blue-tint); color: var(--blue); border: 1.5px dashed var(--blue); }
.pick-chip.on { background: var(--blue); color: #fff; border-style: solid; font-size: 22px; }

/* ── season awards ── */
.aw-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); font-family: var(--ui); font-weight: 700; font-size: 13px; color: var(--text); cursor: pointer; }
.aw-chip:disabled { opacity: 0.6; cursor: default; }
.aw-chip.on { border-color: var(--blue); background: var(--blue-tint); }
.aw-chip.on-worst { border-color: var(--down); background: var(--down-tint); }
.aw-badge { width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; font-family: var(--disp); font-weight: 700; font-size: 10px; background: var(--blue); color: #fff; }
.aw-badge.worst { background: var(--down); }
.award-day { flex: 1; height: 40px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); font-family: var(--ui); font-weight: 700; font-size: 13.5px; color: var(--text); cursor: pointer; }
.award-day.on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── PoolVision reports (the Vision tab) ── */
.vtabs { display: flex; gap: 6px; margin: 22px 0 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.vtabs::-webkit-scrollbar { display: none; }
/* Phase tabs. The selected one was a dark pill on a dark page, which reads as
   "slightly different" rather than "this is the one you are on" -- Adam asked
   for it to be clearer. Now the number is a filled badge, the label is full
   white, and a gold underline anchors it. */
.vtab { flex: none; height: 42px; padding: 0 15px 0 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-family: var(--ui);
  font-weight: 700; font-size: 13px; color: var(--ink2); cursor: pointer;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 9px;
  position: relative; transition: border-color 140ms ease, color 140ms ease, background 140ms ease; }
.vtab:hover { border-color: rgba(255,255,255,0.26); color: var(--text); }
.vtabn { display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 800;
  background: rgba(255,255,255,0.07); color: var(--ink2);
  font-variant-numeric: tabular-nums; transition: background 140ms ease, color 140ms ease; }
.vtab.on { background: rgba(var(--gold-rgb), 0.11); border-color: var(--gold, #e8b647); color: #fff; }
.vtab.on .vtabn { background: var(--gold, #e8b647); color: #14110b; }
.vtab.on::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -7px;
  height: 3px; border-radius: 3px; background: var(--gold, #e8b647); }
.vtab:focus-visible { outline: 2px solid var(--gold, #e8b647); outline-offset: 3px; }
.vtabs { padding-bottom: 9px; }
@media (prefers-reduced-motion: reduce) { .vtab, .vtabn { transition: none; } }
.vbody { margin-top: 2px; }
.vtext { font-family: var(--ui); font-weight: 500; font-size: 15px; line-height: 1.6; color: var(--ink2); margin: 10px 2px 14px; }
.vtext b { color: var(--text); font-weight: 800; }
.vlist { margin: 10px 2px 16px; padding-left: 20px; font-family: var(--ui); font-weight: 500; font-size: 15px; line-height: 1.6; color: var(--ink2); }
.vlist li { margin: 6px 0; }
.vlist b { color: var(--text); font-weight: 800; }
.vfig { margin: 12px 0 16px; }
/* Wide contact sheets must scroll inside their own box, never the page. */
.vfig img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--track); cursor: zoom-in; }
.vfig figcaption { font-family: var(--ui); font-weight: 600; font-size: 12.5px; line-height: 1.5; color: var(--ink3); margin-top: 8px; }
.vtable { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: 13.5px; }
.vtable th { text-align: left; font-weight: 800; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink3); padding: 11px 14px; border-bottom: 1px solid var(--line); }
.vtable td { padding: 11px 14px; color: var(--ink2); font-weight: 600; vertical-align: top; }
.vtable td b { color: var(--text); font-weight: 800; }
.vtable tr + tr td { border-top: 1px solid var(--line); }
.vzoom { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.93); padding: 14px; cursor: zoom-out; }
.vzoom.on { display: flex; }
.vzoom img { max-width: 100%; max-height: 100%; border-radius: 6px; }

/* ── ranked (drag-to-order) power vote ── */
/* Regular/Ranked toggle sits inside the gold start banner, so its colors are
   keyed to read on gold in both themes (gold is fixed in both). */
.method-toggle { display: flex; gap: 5px; background: rgba(42, 32, 3, 0.12); background: color-mix(in srgb, var(--on-gold-deep) 12%, transparent); border-radius: 999px; padding: 4px; margin-top: 12px; }
.method-toggle .mt { flex: 1; height: 34px; border: none; background: none; border-radius: 999px; font-family: var(--ui); font-weight: 800; font-size: 13px; color: var(--on-gold-deep); cursor: pointer; }
.method-toggle .mt.on { background: #fff; color: var(--on-gold-deep); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14); }
.rank-list { position: relative; margin-top: 4px; }
.rank-row { height: 56px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); display: flex; align-items: center; gap: 12px; padding: 0 4px 0 12px; transition: transform 0.19s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.15s, border-color 0.15s; will-change: transform; touch-action: pan-y; }
.rank-row.lift { transition: none; box-shadow: var(--shadow-pop); border-color: var(--blue); z-index: 9; position: relative; }
.rank-pos { font-family: var(--disp); font-weight: 800; font-size: 19px; color: var(--ink3); width: 22px; text-align: center; flex: none; font-variant-numeric: tabular-nums; }
.rank-row.lift .rank-pos { color: var(--blue); }
.rank-row .nm { flex: 1; min-width: 0; font-weight: 800; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-grip { width: 44px; height: 44px; flex: none; display: grid; place-items: center; color: var(--ink3); cursor: grab; touch-action: none; }
.rank-grip:active { cursor: grabbing; }
.rank-grip svg { pointer-events: none; display: block; }
.rank-tally-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; }
.rank-tally-row + .rank-tally-row { border-top: 1px solid var(--line); }
.rank-bar { width: 66px; height: 6px; border-radius: 4px; background: var(--track); overflow: hidden; flex: none; }
.rank-bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--blue-deep)); }
.rank-pts { font-weight: 800; font-size: 12.5px; color: var(--ink2); width: 26px; text-align: right; font-variant-numeric: tabular-nums; flex: none; }

/* ── profile ── */
.prof-hero { background: linear-gradient(160deg, var(--header-top), var(--ink)); color: #fff; border-radius: 0 0 26px 26px; padding: 22px 20px; }
.prof-top { display: flex; align-items: center; justify-content: space-between; }
.prof-id { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.prof-id .nm { font-family: var(--disp); font-weight: 800; font-size: 30px; line-height: 1.05; }
.prof-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.pill { font-weight: 700; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }
.pill.gold { background: var(--gold); color: var(--on-gold-deep); }
.edit-av { position: relative; background: none; border: none; padding: 0; cursor: pointer; line-height: 0; }
/* The "+" is drawn as two bars, not typed as a character.
   It WAS a Saira Condensed "+" centred with place-items:center, which centres
   the LINE BOX, not the ink -- and that glyph sits low in its em, so the plus
   rendered 5.06px below the middle of a 24px badge. Measured, not guessed:
   rendered at 8x in headless Chromium with the real webfont and the offset read
   off the pixels. Switching to the UI font only got it to 1.06px. Two bars are
   exactly centred by construction and, more usefully, cannot move again if the
   font changes, fails to load, or falls back. */
.edit-badge { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--on-gold-deep); border: 2.5px solid var(--ink); font-size: 0; }
.edit-badge::before, .edit-badge::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; border-radius: 1.5px; transform: translate(-50%, -50%); }
.edit-badge::before { width: 11px; height: 2.5px; }
.edit-badge::after { width: 2.5px; height: 11px; }
.stat-tiles { display: flex; gap: 9px; margin-top: 14px; }
.stat-tile { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 13px; box-shadow: var(--shadow-card); text-align: left; }
.stat-tile .big { font-family: var(--disp); font-weight: 800; font-size: 26px; line-height: 1; }
.stat-tile .big.gold { color: var(--gold-deep); }
.stat-tile .lab { font-weight: 600; font-size: 11.5px; color: var(--ink3); margin-top: 5px; }

/* rank-over-time bar chart */
.barchart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-card); padding: 18px; margin-top: 10px; }
.bars { display: flex; align-items: flex-end; justify-content: center; gap: 14px; height: 104px; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; flex-shrink: 0; width: 34px; }
.bar-col .rk { font-family: var(--disp); font-weight: 700; font-size: 13px; color: var(--ink3); margin-bottom: 5px; white-space: nowrap; }
.bar-col .rk.cur { color: var(--gold-deep); }
.bar-col .bar { width: 100%; max-width: 26px; border-radius: 7px; background: linear-gradient(180deg, var(--blue), var(--blue-deep)); }
.bar-col .bar.cur { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); }
.barchart .traj { text-align: center; font-weight: 600; font-size: 12px; color: var(--ink3); margin-top: 12px; }

/* settings / lists */
.list-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); margin-top: 12px; overflow: hidden; }
.li { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--line); font-weight: 600; }
.li:first-child { border-top: none; }
.li .v { color: var(--ink3); font-weight: 700; }
.li .v.gold { color: var(--gold-deep); }
.li.tap { cursor: pointer; } .li.tap:hover { background: var(--bg); }
.danger { color: var(--down); }

.empty { text-align: center; color: var(--ink2); padding: 40px 20px; }
.empty .ic { font-size: 34px; } .empty p { margin-top: 8px; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow-pop); z-index: 70; }

/* admin roster */
.adm-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 11px 14px; box-shadow: var(--shadow-card); margin-bottom: 8px; }
.adm-row .nm { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 7px; }
.adm-row .sub { color: var(--ink3); font-size: 12.5px; font-weight: 600; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-row .meta { flex: 1; min-width: 0; }
.adm-tag { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold-text); background: var(--gold-tint); padding: 1px 7px; border-radius: 999px; }
.adm-manage { flex: none; height: 36px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); font-weight: 700; font-size: 13.5px; }
.adm-manage:hover { background: var(--blue-tint); color: var(--blue-deep); }

/* ── rules editor ── */
.ed-body { max-height: 70vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; padding-right: 4px; }
.ed-sec { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; background: var(--bg); }
.ed-head { display: flex; align-items: center; gap: 8px; }
.ed-num { font-family: var(--disp); font-weight: 800; font-size: 18px; color: var(--blue); width: 18px; text-align: center; flex: none; }
.ed-head .field-light { flex: 1; }
.ed-ta { width: 100%; margin-top: 8px; min-height: 96px; padding: 10px 12px; line-height: 1.5; font-size: 14.5px; resize: vertical; }
.ed-sub { border-left: 3px solid var(--line); padding: 8px 0 8px 10px; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ed-mini { height: 30px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 12.5px; color: var(--ink2); flex: none; }
.ed-mini:hover { background: var(--blue-tint); }
.ed-mini[disabled] { opacity: 0.4; pointer-events: none; }
.ed-mini.danger { color: var(--down); }

/* ── modal / bottom sheet ── */
.modal-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(21, 25, 31, 0.5); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--surface); width: 100%; max-width: 480px; border-radius: var(--r-xxl) var(--r-xxl) 0 0; padding: 18px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-pop); animation: sheet 0.22s ease; max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; }
@keyframes sheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 40px; height: 4px; border-radius: 999px; background: var(--line); margin: 0 auto 14px; }
.modal-head { display: flex; align-items: center; gap: 12px; }
.modal-head .mt { font-family: var(--disp); font-weight: 800; font-size: 22px; }
.modal-head .ms { color: var(--ink3); font-weight: 600; font-size: 12.5px; }
.modal-x { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--bg); color: var(--ink2); }
.modal-sec { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.modal-sec:first-of-type { border-top: none; }
.modal-sec .eyebrow { color: var(--ink2); }
.modal-note { color: var(--ink2); font-size: 13px; line-height: 1.45; margin-top: 6px; }
.modal-err { color: var(--down); font-weight: 600; font-size: 13px; margin-top: 12px; }
.field-light { height: 46px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--text); width: 100%; }
.field-light:focus { outline: none; border-color: var(--blue); }
.row-gap { display: flex; gap: 10px; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); cursor: pointer; }
.pick-row:first-child { border-top: none; }
.pick-row .nm { flex: 1; font-weight: 700; font-size: 15px; }
.pick-row:hover { background: var(--bg); }

/* game records — team A/B logging + read-only rows */
.game-row { display: flex; align-items: center; padding: 11px 13px; margin-bottom: 8px; }
.game-row .side { flex: 1; min-width: 0; font-weight: 800; font-size: 14px; }
.game-row .side.right { text-align: right; }
.game-row .vs { font-size: 11px; font-weight: 700; color: var(--ink3); margin: 0 8px; flex: none; }
.game-row .vs.score { font-family: var(--disp); font-weight: 800; font-size: 15px; color: var(--text); }
.game-row .side-pts { font-weight: 600; font-size: 11.5px; line-height: 1.35; color: var(--ink3); margin-top: 3px; }
.game-row .gr-res { font-weight: 800; font-size: 13px; }
.game-row .gr-score { font-family: var(--disp); font-weight: 800; font-size: 15px; color: var(--text); }
.game-row .gr-line { font-weight: 600; font-size: 12.5px; color: var(--ink2); }
.game-row .game-rm { flex: none; margin-left: 10px; background: none; border: none; color: var(--ink3); font-size: 15px; cursor: pointer; line-height: 1; }
.game-row .game-rm:hover { color: var(--down); }
.team-pill { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; border-radius: var(--r-sm, 8px); font-family: var(--ui); font-weight: 800; font-size: 12.5px; color: var(--ink3); background: var(--bg); border: 1px solid var(--line); cursor: pointer; padding: 0; }
.team-pill.a-on { background: var(--blue); color: #fff; border-color: var(--blue); }
.team-pill.b-on { background: var(--gold-deep); color: #fff; border-color: var(--gold-deep); }
.win-btn { flex: 1; border-radius: var(--r-md); padding: 9px 8px; text-align: center; font-family: var(--ui); font-weight: 800; font-size: 13px; color: var(--text); background: var(--surface); border: 1.5px solid var(--line); box-shadow: var(--shadow-card); cursor: pointer; }
.win-btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.win-btn small { display: block; font-weight: 600; font-size: 11px; margin-top: 2px; color: var(--ink3); }
.win-btn.a.on { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: none; }
.win-btn.a.on small { color: rgba(255,255,255,0.8); }
.win-btn.b.on { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; box-shadow: none; }
.win-btn.b.on small { color: rgba(255,255,255,0.85); }
.win-pct { font-family: var(--disp); font-weight: 700; font-size: 18px; color: var(--text); }
.win-pct.lead { color: var(--gold-deep); }

/* log-a-game: a real full-screen modal (not a half-height bottom sheet) on
   every viewport -- one scroll region for the whole body, header + footer
   pinned, so nothing depends on nested-scroll gesture negotiation. */
.modal-overlay.game-modal { align-items: stretch; padding: 0; }
.modal-overlay.game-modal > .modal { width: 100%; max-width: 560px; height: 100%; max-height: 100%; border-radius: 0; padding: 0; display: flex; flex-direction: column; animation: sheet 0.22s ease; }
.game-modal-head { flex: 0 0 auto; padding: calc(16px + env(safe-area-inset-top)) 20px 12px; border-bottom: 1px solid var(--line); }
.game-modal-head .modal-head { margin: 0; }
.game-modal-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 20px 20px; }
.game-modal-foot { flex: 0 0 auto; display: flex; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.game-modal-foot .btn { flex: 1; height: 44px; }
.stat-tile.duo { cursor: pointer; }
.duo-av { display: flex; align-items: center; margin-top: 9px; }
.duo-av .avw:nth-child(2) { margin-left: -10px; }
.duo-av span { font-family: var(--ui); font-weight: 800; font-size: 13px; margin-left: 6px; color: var(--text); }

/* ─────────────────── desktop ─────────────────── */
@media (min-width: 920px) {
  /* minmax(0, 1fr), not 1fr. A grid track sized 1fr still has min-width: auto,
     so it refuses to shrink below its content's minimum and the column grows
     past the viewport instead of the content wrapping inside it. That put a
     horizontal scrollbar on the whole page at any laptop width narrower than
     the sidebar plus .wrap's own 1140px cap. */
  .shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .topbar, .tabbar, .menu-btn { display: none; }
  .navmenu, .navmenu.open { display: none; }
  .sidebar { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; background: var(--ink); color: #fff; padding: 26px 16px; }
  .sidebar .brand { font-family: var(--disp); font-weight: 700; letter-spacing: 0.24em; font-size: 20px; color: var(--gold); padding: 4px 12px 22px; }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .sidebar .nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-md); color: rgba(255, 255, 255, 0.62); font-weight: 700; font-size: 15px; }
  .sidebar .nav-item svg { width: 20px; height: 20px; }
  .sidebar .nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
  .sidebar .nav-item.active { background: rgba(var(--gold-rgb), 0.14); color: var(--gold); }
  .sidebar .nav-item .badge { margin-left: auto; background: var(--gold); color: var(--on-gold-deep); font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
  .sidebar .acct { display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 8px; cursor: pointer; }
  .sidebar .acct .nm { font-weight: 700; font-size: 14px; } .sidebar .acct .ro { color: var(--ink3); font-size: 12px; font-weight: 600; }
  .sidebar .acct .so { margin-left: auto; color: var(--ink3); font-size: 18px; }

  .arena { border-radius: 0; padding: 40px 40px 30px; }
  .arena h1 { font-size: 52px; }
  .arena-wrap, .wrap { max-width: var(--maxw); padding-left: 40px; padding-right: 40px; }
  .wrap { padding-top: 28px; }

  .board-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; align-items: start; }
  .board-grid .side { position: sticky; top: 28px; display: flex; flex-direction: column; gap: 10px; }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-grid.movers { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rules-grid { columns: 2; column-gap: 12px; } .rules-grid .rule { break-inside: avoid; }
  .modal-overlay { align-items: center; padding: 24px; }
  .modal { border-radius: var(--r-xxl); animation: pop 0.16s ease; } @keyframes pop { from { transform: scale(0.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .toast { bottom: 32px; }
  .desktop-only { display: block; }
}
@media (max-width: 919px) { .board-grid .side { margin-bottom: 6px; } .desktop-only { display: none; } }

/* Full-screen overlays (awards, profile, poker, party detail, ...) are a dark
   hero pinned at the top with the body scrolling under it. This applies at
   EVERY width and used to be inside the mobile-only media query below, which
   made all six of them unscrollable on desktop: each one sets an inline
   `overflow:hidden` on .modal to clip its corners, so with no scrolling child
   the wheel had nowhere to go and scrolled the PAGE BEHIND instead. Reilly
   reported it trying to fill in his awards ballot on a laptop.

   `min-height: 0` on the scrolling child is load-bearing, not tidiness: a flex
   item defaults to min-height:auto, which refuses to shrink below its content,
   so without it the child is never smaller than what's inside it and never
   scrolls at all. `overscroll-behavior: contain` stops a scroll that reaches
   the end from chaining out to the page underneath. */
.modal-overlay.full > .modal { display: flex; flex-direction: column; }
.modal-overlay.full > .modal > .prof-hero { flex: 0 0 auto; border-radius: 0; }
.modal-overlay.full > .modal > :not(.prof-hero) { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* On mobile web they go full-bleed -- a partial bottom sheet fought Safari's
   toolbar and looked glitchy. Only the full-bleed geometry is mobile-specific;
   the scrolling structure above is not. */
@media (max-width: 919px) {
  .modal-overlay.full { align-items: stretch; padding: 0; }
  .modal-overlay.full > .modal { width: 100%; max-width: none; height: 100%; max-height: 100%; border-radius: 0; animation: pageIn 0.2s ease; }
  .modal-overlay.full > .modal > .prof-hero { padding-top: calc(18px + env(safe-area-inset-top)); }
  @keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}


/* ── PoolVision shot review ───────────────────────────────────────────────── */
/* An answer has to register visibly before the clip changes, or it reads as
   nothing having happened. Hence: the pressed button fills and shows a tick, a
   label flashes over the video, and only then does it advance. */

.vreview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; margin-top: 12px; }
.vrprog { height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; }
.vrprogbar { height: 100%; width: 0; background: var(--gold); border-radius: 999px; transition: width 240ms ease; }
.vrhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.vrmeta { color: var(--ink3); font-size: 12.5px; }

.vrstage { position: relative; }
.vrvid { width: 100%; border-radius: var(--r-md); background: #000; display: block; }
/* Confirmation over the clip. Pops, holds, fades; no layout shift. */
.vrflash { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 800; font-size: clamp(22px, 7vw, 40px); letter-spacing: 0.02em;
  color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.65); background: rgba(16,58,120,0.28);
  border-radius: var(--r-md); opacity: 0; pointer-events: none; }
.vrflash.on { animation: vrflash 620ms ease forwards; }
@keyframes vrflash {
  0%   { opacity: 0; transform: scale(0.94); }
  18%  { opacity: 1; transform: scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .vrflash.on { animation: none; opacity: 1; } }

.vrspeed { display: flex; gap: 6px; margin-top: 10px; }
.vsp { flex: 1; padding: 8px 0; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--ink2); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.vsp.on { background: var(--blue); border-color: var(--blue); color: #fff; }

.vrstatus { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink3); min-height: 18px; }
.vrstatus.done { color: var(--up); }
.vrstatus.sugg { color: var(--gold-deep); }
.vrstatus.saving { color: var(--ink3); }
.vrstatus.bad { color: var(--down); }

/* Two per row on a phone so every target clears 44px comfortably. */
.vrbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.vrb { position: relative; min-height: 48px; font-size: 13.5px; padding: 0 10px 0 26px; text-align: left; }
.vrbnum { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 10.5px; font-weight: 700;
  opacity: 0.45; font-variant-numeric: tabular-nums; }
.vrbtick { position: absolute; right: 9px; top: 50%; transform: translateY(-50%) scale(0.6); opacity: 0; transition: opacity 140ms ease, transform 140ms ease; }
.vrb.on { outline: 2px solid var(--blue); outline-offset: -2px; }
.vrb.on .vrbtick { opacity: 1; transform: translateY(-50%) scale(1); }
/* A suggestion that hasn't been confirmed reads as pending, not settled. */
.vrb.on.unconfirmed { outline-style: dashed; outline-color: var(--gold-deep); }
.vrb.on.unconfirmed .vrbtick { opacity: 0.45; }

/* Desktop: the clip was tall enough to push the answer buttons below the fold,
   so judging meant scrolling between watching and answering. Two columns keeps
   the video and every option on one screen, and caps the clip's height so a
   tall crop can't push things down again. */
@media (min-width: 900px) {
  .vreview { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    grid-template-areas: "prog prog" "head head" "stage side"; column-gap: 18px; align-items: start; }
  .vrprog { grid-area: prog; }
  .vrhead { grid-area: head; }
  .vrstage { grid-area: stage; }
  .vrside { grid-area: side; display: flex; flex-direction: column; }
  .vrvid { max-height: 58vh; object-fit: contain; }
  .vrspeed { margin-top: 0; }
  .vrbtns { grid-template-columns: 1fr 1fr; }
  .vrnotes textarea { min-height: 60px; }
}
@media (min-width: 620px) and (max-width: 899px) { .vrbtns { grid-template-columns: repeat(3, 1fr); } }

/* Notes and the multi-shot warning. Notes are deliberately quiet: they exist for
   the odd case, and shouldn't compete with the six answer buttons. */
.vrnotes { display: block; margin-top: 12px; }
.vrnoteslab { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink3); margin-bottom: 6px; }
.vrnotessaved { opacity: 0; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--up); transition: opacity 160ms ease; }
.vrnotessaved.on { opacity: 1; }
.vrnotes textarea { width: 100%; resize: vertical; min-height: 46px; padding: 9px 11px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--text);
  font-family: var(--ui); font-size: 13.5px; line-height: 1.4; }
.vrnotes textarea:focus { outline: none; border-color: var(--blue); }

/* What each outcome means. Collapsed by default so it never slows down the
   tapping, but one tap away rather than something to go and ask about. */
.vrlegendtoggle { display: block; margin-top: 10px; font-size: 12.5px; }
.vrlegend { display: none; margin-top: 8px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--bg); border: 1px solid var(--line); }
.vrlegend.on { display: block; }
.vrlegrow { display: grid; grid-template-columns: 1fr; gap: 1px; padding: 6px 0; border-top: 1px solid var(--line); }
.vrlegrow:first-child { border-top: none; padding-top: 0; }
.vrlegrow b { font-size: 13px; }
.vrlegrow span { font-size: 12.5px; color: var(--ink2); line-height: 1.35; }
.vrlegnote { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink2); line-height: 1.4; }
@media (min-width: 620px) { .vrlegrow { grid-template-columns: 190px 1fr; gap: 10px; align-items: baseline; } }



/* The clip number is the thing being looked for most often, so it's the biggest
   thing in the header. Everything that used to sit up here -- outcome tallies,
   a to-judge/to-confirm split, a multi-arc warning -- was removed 2026-07-30:
   too much furniture around a job that is watch, press, move on. The arc count
   in particular was wrong more often than right. */
.vrpos { font-family: var(--disp); font-weight: 800; font-size: 30px; line-height: 1;
  letter-spacing: 0.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.vrhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 12px 0 10px; }

/* Real buttons, evenly split. These were cramped links sitting right next to a
   second row of cramped links, which read as one crowded mess. */
.vrnav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.vrnavbtn { min-height: 42px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--ink2); font-family: var(--ui); font-weight: 700;
  font-size: 13px; cursor: pointer; }
.vrnavbtn:disabled { opacity: 0.3; pointer-events: none; }
.vrjump { display: block; width: 100%; text-align: center; margin-top: 10px; font-size: 12.5px; }

/* Which shot in the clip is the one being judged.
   Marks the WHOLE flight, not just the descent -- Adam: "it only catches the
   tail end of being in air", which it did, because the descent is the falling
   half by definition.
   Made deliberately loud on his second ask. A 5px rail read as a detail; this
   is meant to be impossible to miss while a clip loops past.
   The marks drawn over film (this band, NOW, the hoop box, the ball's arc) stay
   amber whatever the accent: every other box on the footage is drawn in a cap
   color, and an accent's companion (lime, orange, pink) would read as one. */
.vrmark { position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: rgba(0,0,0,0.45); overflow: hidden; }
.vrmarkband { position: absolute; top: 0; bottom: 0; border-radius: 2px;
  background: linear-gradient(180deg, #ffd873, #f4b41a);
  box-shadow: 0 0 14px rgba(232,182,71,0.85); }
.vrmarkhead { position: absolute; top: -3px; width: 3px; height: 16px;
  background: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.95);
  transition: left 90ms linear; }
.vrnow { position: absolute; left: 12px; bottom: 22px; padding: 6px 12px; border-radius: 999px;
  font: 800 11px/1 system-ui, sans-serif; letter-spacing: 0.11em;
  background: #f4b41a; color: #14110b;
  box-shadow: 0 2px 14px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(5px); transition: opacity 120ms ease, transform 120ms ease;
  pointer-events: none; }
.vreview.anchor-now .vrnow, .vsrev.anchor-now .vrnow { opacity: 1; transform: translateY(0); }
.vreview.anchor-now .vrstage,
.vsrev.anchor-now .vsrstage { box-shadow: inset 0 0 0 4px #f4b41a, 0 0 22px rgba(232,182,71,0.45); }
.vrstage { transition: box-shadow 140ms ease; }
@media (prefers-reduced-motion: reduce) {
  .vrmarkhead, .vrnow, .vrstage { transition: none; }
}

/* The model's wrong calls, laid out to be scanned rather than read.
   Every clip loops on its own so a pattern across twenty-six of them can be
   seen at a glance instead of by clicking through each. */
.vwgrouplab { margin: 22px 0 10px; font: 700 11px/1 system-ui, sans-serif;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink2, #9aa3b2);
  display: flex; align-items: center; gap: 8px; }
.vwgrouplab span { background: rgba(255,255,255,0.09); color: #fff; border-radius: 999px;
  padding: 3px 8px; font-size: 10px; letter-spacing: 0.04em; }
.vwgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.vwcard { margin: 0; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; overflow: hidden; }
.vwcard.thin { border-color: rgba(var(--gold-rgb), 0.55); }
.vwcard video { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #000; }
.vwcard figcaption { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 4px; }
.vwrow { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; color: #fff; }
.vwrow b { font-weight: 650; }
.vwyou, .vwbot { font: 700 9.5px/1 system-ui, sans-serif; letter-spacing: 0.09em;
  text-transform: uppercase; padding: 3px 6px; border-radius: 4px; }
.vwyou { background: rgba(255,255,255,0.14); color: #fff; }
.vwbot { background: rgba(var(--gold-rgb), 0.18); color: var(--gold, #e8b647); }
.vwconf { font-size: 11px; color: var(--ink2, #9aa3b2); margin-left: auto; }
.vwmeta { font-size: 11px; color: var(--ink2, #9aa3b2); }
.vwthin { color: var(--gold, #e8b647); font-weight: 650; }
@media (max-width: 520px) { .vwgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

/* Explaining a wrong call. Tag-first, because the point is counting causes
   across 26 clips, not writing 26 paragraphs. */
.vwtally { margin: 4px 0 18px; padding: 13px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.08); }
.vwtally.empty { color: var(--ink2, #9aa3b2); font-size: 12.5px; text-align: center; padding: 15px; }
.vwtlead { font-size: 12.5px; color: #fff; margin-bottom: 10px; }
.vwtlead b { color: var(--gold, #e8b647); }
.vwtrow { display: grid; grid-template-columns: minmax(120px, 1.1fr) 2fr 26px;
  align-items: center; gap: 10px; padding: 3px 0; }
.vwtlab { font-size: 12px; color: var(--ink2, #9aa3b2); }
.vwtbar { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.vwtbar i { display: block; height: 100%; border-radius: 999px;
  background: var(--gold, #e8b647); transition: width 220ms ease; }
.vwtn { font-size: 12px; color: #fff; font-weight: 650; text-align: right;
  font-variant-numeric: tabular-nums; }

.vwchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.vwchip { border: 1px solid rgba(255,255,255,0.14); background: transparent;
  color: var(--ink2, #9aa3b2); border-radius: 999px; padding: 5px 9px;
  font: 500 11px/1.15 system-ui, sans-serif; cursor: pointer; text-align: left;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease; }
.vwchip:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.vwchip.on { background: var(--gold, #e8b647); border-color: var(--gold, #e8b647);
  color: #14110b; font-weight: 650; }
.vwchip:focus-visible { outline: 2px solid var(--gold, #e8b647); outline-offset: 2px; }

.vwtext { margin-top: 8px; width: 100%; resize: vertical; min-height: 40px;
  background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.11);
  border-radius: 9px; color: #fff; padding: 8px 9px;
  font: 400 12.5px/1.45 system-ui, sans-serif; }
.vwtext::placeholder { color: rgba(255,255,255,0.34); }
.vwtext:focus { outline: none; border-color: var(--gold, #e8b647);
  background: rgba(0,0,0,0.42); }

.vwstate { min-height: 13px; margin-top: 4px; font-size: 10.5px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink2, #9aa3b2); }
.vwstate.saved { color: #6fcf8b; }
.vwstate.failed { color: #ff7a6d; }

/* A card that has been explained recedes, so what is left to do stands out. */
.vwcard.done { border-color: rgba(111,207,139,0.34); }
.vwcard.done video { opacity: 0.82; }
@media (prefers-reduced-motion: reduce) { .vwtbar i, .vwchip { transition: none; } }

/* Studying a wrong call needs slow motion and a still frame, which triaging
   did not. The ball crosses the rim in about three frames at 30fps. */
.vwtools { display: flex; align-items: center; gap: 12px; margin: 2px 0 12px; }
.vwspeed { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px;
  background: rgba(255,255,255,0.06); }
.vwsp { border: 0; background: transparent; color: var(--ink2, #9aa3b2);
  border-radius: 999px; padding: 5px 12px; cursor: pointer;
  font: 650 11.5px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums;
  transition: background 120ms ease, color 120ms ease; }
.vwsp.on { background: var(--gold, #e8b647); color: #14110b; }
.vwsp:focus-visible { outline: 2px solid var(--gold, #e8b647); outline-offset: 2px; }
.vwhint { font-size: 11px; color: var(--ink2, #9aa3b2); }
.vwcard video { cursor: pointer; }
.vwcard.frozen video { outline: 2px solid var(--gold, #e8b647); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .vwsp { transition: none; } }

/* Confirming who took the shot. A different question from make-or-miss, and it
   needs different evidence: the rim clips cannot show a shooter thirty feet
   outside their frame. */
.vsgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.vscard { margin: 0; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; overflow: hidden; transition: border-color 140ms ease, opacity 140ms ease; }
.vscard video { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #000; }
.vscard figcaption { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.vscard.done { opacity: 0.62; }
.vscard.done.yes { border-color: rgba(111,207,139,0.45); }
.vscard.done.no { border-color: rgba(255,122,109,0.45); }
.vsmeta { font-size: 11.5px; color: var(--ink2, #9aa3b2); display: flex; align-items: center; gap: 7px; }
.vscap { display: inline-flex; align-items: center; gap: 5px; margin-left: auto;
  font-variant-numeric: tabular-nums; }
.vscap i { width: 13px; height: 13px; border-radius: 50%; display: inline-block;
  border: 1px solid rgba(255,255,255,0.35); }
.vsbtns { display: grid; grid-template-columns: 1.35fr 1fr; gap: 6px; }
.vsb { border: 1px solid rgba(255,255,255,0.16); background: transparent; color: #fff;
  border-radius: 8px; padding: 8px 6px; cursor: pointer;
  font: 650 12px/1 system-ui, sans-serif;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease; }
.vsb:hover { border-color: rgba(255,255,255,0.34); }
.vsb.yes.on { background: #6fcf8b; border-color: #6fcf8b; color: #0d1a11; }
.vsb.no.on { background: #ff7a6d; border-color: #ff7a6d; color: #1a0d0b; }
.vsb:focus-visible { outline: 2px solid var(--gold, #e8b647); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .vscard, .vsb { transition: none; } }

/* Confirming the shooter, one clip at a time.
   A grid of these was laggy twice over: 57 videos decoding at once, and then
   still heavy with a cap on how many played. One clip is one clip. */
.vsrev { border: 1px solid rgba(255,255,255,0.09); border-radius: 14px; overflow: hidden;
  background: rgba(255,255,255,0.03); }
.vsrhead { display: flex; align-items: center; gap: 10px; padding: 11px 13px 9px; }
.vsrpos { font: 800 19px/1 system-ui, sans-serif; color: #fff; font-variant-numeric: tabular-nums; }
.vsrmeta { font-size: 12px; color: var(--ink2, #9aa3b2); display: flex; align-items: center; gap: 8px; }
.vsrstage { position: relative; background: #000; }
.vsrvid { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: #000; cursor: zoom-in; }
.vsrzoom { position: absolute; right: 10px; bottom: 10px; border: 0; border-radius: 999px;
  padding: 7px 12px; font: 650 11.5px/1 system-ui, sans-serif; cursor: pointer;
  background: rgba(0,0,0,0.62); color: #fff; backdrop-filter: blur(6px); }
.vsrzoom:disabled { opacity: 0.35; cursor: default; }
.vsrbtns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; padding: 11px 13px 4px; }
.vsrb { border: 1px solid rgba(255,255,255,0.16); background: transparent; color: #fff;
  border-radius: 9px; padding: 12px 6px; cursor: pointer; font: 650 12.5px/1 system-ui, sans-serif; }
.vsrb.yes.on { background: #6fcf8b; border-color: #6fcf8b; color: #0d1a11; }
.vsrb.no.on { background: #ff7a6d; border-color: #ff7a6d; color: #1a0d0b; }
.vsrb.notshot.on { background: #9aa3b2; border-color: #9aa3b2; color: #14161a; }
.vsrb:focus-visible { outline: 2px solid var(--gold, #e8b647); outline-offset: 2px; }
.vsrnav { display: flex; align-items: center; justify-content: space-between; padding: 8px 13px 12px; }
.vsrnav .link:disabled { opacity: 0.3; cursor: default; }
.vsrstate { font-size: 11.5px; color: var(--ink2, #9aa3b2); letter-spacing: 0.04em; }
.vsrstate.done { color: #6fcf8b; }

/* One-at-a-time wrong-calls reviewer. Same shell as the shooter reviewer. */
.vwspeed2 { position: absolute; right: 10px; bottom: 10px; display: inline-flex; gap: 4px;
  padding: 3px; border-radius: 999px; background: rgba(0,0,0,0.55); backdrop-filter: blur(6px); }
.vsrev .vwcalls { padding: 11px 13px 2px; display: flex; flex-direction: column; gap: 5px; }
.vsrev .vwchips { padding: 9px 13px 0; }
.vsrev .vwtext { margin: 9px 13px 0; width: calc(100% - 26px); }
.vsrev.frozen .vsrvid { outline: 2px solid var(--gold, #e8b647); outline-offset: -2px; }

/* The in-air band inside the one-at-a-time reviewers. */

.vsrev .vrnow { position: absolute; left: 10px; bottom: 14px; }
.vsrev.anchor-now .vrnow { opacity: 1; transform: translateY(0); }

.vsrev .vsrstage { transition: box-shadow 140ms ease; }
.vsrnotes { margin: 9px 13px 0; width: calc(100% - 26px); }

/* Read-only view of Adam's annotations, for everyone else on the roster.
   Deliberately not disabled controls: a row of grayed buttons reads as "you may
   tap these", which is the opposite of what is on offer. His answer is shown as
   a statement instead. */
.vsrverdict { padding: 12px 13px 2px; display: flex; align-items: center; gap: 9px; }
.vsrv { padding: 6px 11px; border-radius: 999px; font: 700 12px/1 system-ui, sans-serif; }
.vsrv.yes { background: rgba(111,207,139,0.17); color: #6fcf8b; }
.vsrv.no { background: rgba(255,122,109,0.17); color: #ff7a6d; }
.vsrv.notashot { background: rgba(154,163,178,0.17); color: #9aa3b2; }
.vsrvby, .vsrvnone { font-size: 11.5px; color: var(--ink3, #6b7482); }
.vsrnoteview { margin: 10px 13px 0; font-size: 13px; line-height: 1.5; color: var(--ink2, #9aa3b2); }
.vsrnoteview:empty { display: none; }
.vsrnlab { display: block; font: 700 9.5px/1 system-ui, sans-serif; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink3, #6b7482); margin-bottom: 4px; }
.vwchip.static { cursor: default; }
.vwnotagged { font-size: 12px; color: var(--ink3, #6b7482); }

/* The pool and the person the model picked, side by side.
   It was one video with a zoom toggle. Knowing who the model chose is a
   precondition for judging whether it chose right, so making that a second tap
   on every clip was backwards -- Adam asked to see both at once. */


.vsrwho { flex: 0 0 178px; display: flex; flex-direction: column;
  background: rgba(255,255,255,0.035); border-left: 1px solid rgba(255,255,255,0.09); }
.vsrwholab { padding: 9px 11px 6px; font: 700 9.5px/1 system-ui, sans-serif;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3, #6b7482); }
/* The magnifier crops by overflow: the video inside is sized much larger than
   this box and positioned so the shooter lands in the middle. */
.vsrwhovid { flex: 1 1 auto; min-height: 0; background: #000;
  position: relative; overflow: hidden; }
.vsrzoomvid { display: block; background: #000; }
.vsrwhocap { padding: 8px 11px 10px; display: flex; align-items: center;
  font-size: 12px; color: var(--ink2, #9aa3b2); }
.vsrnocap { font-size: 11.5px; color: var(--ink3, #6b7482); }
.vsrwho.empty .vsrwhovid { background: repeating-linear-gradient(45deg,
  rgba(255,255,255,0.03) 0 8px, transparent 8px 16px); }
@media (max-width: 700px) {
  /* Stacked on a phone, with the person as a short strip: side by side would
     leave both too narrow to read anything from. */
  .vsrsplit { flex-direction: column; }
  /* Still a row on a phone, but the person panel stays PORTRAIT. A short wide
     strip has to show three times the swimmer's width to fit their height, which
     puts their neighbours in the panel -- the exact confusion this is meant to
     remove. */
  .vsrwho { flex: none; flex-direction: row; align-items: center; gap: 10px;
    border-left: 0; border-top: 1px solid rgba(255,255,255,0.09); padding: 8px 11px; }
  .vsrwholab { padding: 0; flex: none; writing-mode: vertical-rl; transform: rotate(180deg);
    align-self: stretch; text-align: center; }
  .vsrwhovid { flex: 0 0 118px; height: 205px; }
  .vsrwhocap { padding: 0; margin-left: auto; }
}

/* The hoop the model is scoring against. Quiet while the ball is elsewhere,
   bright while it is in the air, so the two signals read as one event rather
   than competing for attention. */
/* The hoop being scored on, marked for the WHOLE clip -- Adam: "throughout the
   video in the big video have a box around the hoop that's supposedly scored
   on". It is the frame of reference for everything else on screen, so it should
   never have to be inferred from the header. Visible at rest, brighter while
   the ball is in the air. */
.vrring { position: absolute; border: 3px solid rgba(232,182,71,0.8); border-radius: 8px;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(0,0,0,0.45), 0 0 10px rgba(232,182,71,0.3);
  transition: border-color 140ms ease, box-shadow 140ms ease; display: none; }
.vreview.anchor-now .vrring, .vsrev.anchor-now .vrring {
  border-color: #f4b41a;
  box-shadow: 0 0 18px rgba(232,182,71,0.7), 0 0 0 1px rgba(0,0,0,0.35) inset; }
@media (prefers-reduced-motion: reduce) { .vrring { transition: none; } }

/* The person the model thinks is shooting, tracked through the clip.
   Replaces a magnified side panel: that showed a region and left the viewer to
   work out who inside it was meant, and since the stored box is padded wider
   than a swimmer, the region often held two people. A box points at one. */
/* Drawn in the cap color the model read, so the claim reads in one glance
   instead of asking the viewer to check a swatch against a person. Dashed when
   no cap was read, so "we could not tell" never looks like a confident answer. */
.vrperson { position: absolute; border: 3px solid #9aa3b2; border-radius: 6px;
  pointer-events: none; display: none; }
.vrperson.unread { border-style: dashed; }
.vrpersonlab { position: absolute; left: 50%; top: -26px; transform: translateX(-50%);
  white-space: nowrap; background: rgba(0,0,0,0.78); border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px; padding: 3px 9px; font: 700 10.5px/1 system-ui, sans-serif;
  color: #fff; backdrop-filter: blur(4px); }
.vrpersonlab .vscap { margin-left: 0; gap: 5px; }
.vrpersonlab .vscap i { width: 11px; height: 11px; }
.vsrstage { position: relative; }

/* The ball's fitted flight. This is the reasoning made visible: attribution
   works by extrapolating this curve back to its origin, so if the curve begins
   at the wrong person's hands the answer is visibly wrong. */
.vrarc { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.vrarcfull { stroke: rgba(255,255,255,0.32); stroke-width: 2; stroke-dasharray: 5 6;
  stroke-linecap: round; }
.vrarcdone { stroke: #ffd873; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255,216,115,0.75)); }
.vrarcorigin { stroke: #ffd873; stroke-width: 2.5;
  filter: drop-shadow(0 0 5px rgba(255,216,115,0.9)); }
.vrdunk { position: absolute; left: 12px; top: 12px; padding: 5px 11px; border-radius: 999px;
  font: 800 10.5px/1 system-ui, sans-serif; letter-spacing: 0.09em;
  background: rgba(0,0,0,0.72); color: #ffd873; border: 1px solid rgba(255,216,115,0.55);
  display: none; }

/* Tap the clip to freeze it. Everything drawn over the video has to let the
   click through, or the overlays become a dead zone in the middle of the frame
   exactly where the action is. */
.vsrev .vsrvid { cursor: pointer; }
.vsrev.paused .vsrvid { cursor: pointer; }
.vrmark, .vrnow, .vrdunk, .vrarc, .vrring, .vrperson { pointer-events: none; }
.vsrev.paused .vsrstage::after { content: "PAUSED"; position: absolute; right: 12px; top: 12px;
  padding: 5px 11px; border-radius: 999px; font: 800 10.5px/1 system-ui, sans-serif;
  letter-spacing: 0.09em; background: rgba(0,0,0,0.72); color: #fff;
  border: 1px solid rgba(255,255,255,0.3); pointer-events: none; }

/* Pose diagnostics. Tap any frame to open it full screen -- these are dense and
   the whole point is being able to look closely. */
.pdgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pdfig { margin: 0; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; overflow: hidden; }
.pdfig img { display: block; width: 100%; cursor: zoom-in; }
.pdfig figcaption { padding: 8px 11px 10px; font-size: 12px; color: var(--ink2, #9aa3b2); }
.pdfig figcaption b { color: #fff; }
@media (max-width: 560px) { .pdgrid { grid-template-columns: 1fr; } }

/* One question at a time. The cap reading sits below the buttons as its own
   claim, because fusing it with the box made "right person, wrong color"
   impossible to express and cost a whole round of answers. */
.vsrask { padding: 12px 13px 2px; font: 650 13px/1.35 system-ui, sans-serif; color: #fff; }
.vsrcapline { padding: 10px 13px 0; font-size: 12px; color: var(--ink2, #9aa3b2);
  display: flex; align-items: center; gap: 8px; }
.vsrcaplab { font: 700 9.5px/1 system-ui, sans-serif; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink3, #6b7482); }

/* Pose evidence, one at a time: the still shows what the pipeline decided, the
   clip below shows what actually happened. Judging one against the other needs
   both on screen. */
/* The still carries the annotations and is the thing being judged, so it gets
   the room. The clip sits under it with the buttons beside it, which keeps the
   answer within a thumb's reach of the footage it is about. */
.vdshot { position: relative; background: #000; }
.vdiag .vdimg { display: block; width: 100%; max-height: 56vh; object-fit: contain;
  cursor: zoom-in; background: #000; }

/* The call goes ON the picture. As a pill on the card below it, it sat on almost
   the same color as the background and disappeared. */
.vdcall { position: absolute; top: 10px; left: 10px; display: flex; align-items: baseline;
  gap: 8px; padding: 7px 12px; border-radius: 10px; backdrop-filter: blur(6px);
  background: rgba(8,10,14,0.72); box-shadow: 0 2px 14px rgba(0,0,0,0.45); }
.vdcall:empty { display: none; }
.vdcall b { font: 800 15px/1 system-ui, sans-serif; letter-spacing: 0.06em; }
.vdcall em { font: 800 13px/1 system-ui, sans-serif; font-style: normal; letter-spacing: 0.03em; }
.vdcall i { font: 700 10.5px/1 system-ui, sans-serif; font-style: normal;
  letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.62); }
.vdcall.make b, .vdcall.make em { color: #4ade80; }
.vdcall.miss b { color: #f87171; }
.vdcall em.unknown { color: rgba(255,255,255,0.5); font-weight: 700; }

/* Paging lives on the picture, not under it. Two small links at the bottom of a
   tall panel meant reaching past the thing being judged to move off it. */
.vdnavbtn { position: absolute; top: 50%; transform: translateY(-50%); border: 0;
  cursor: pointer; width: 42px; height: 76px; display: grid; place-items: center;
  background: rgba(8,10,14,0.55); color: rgba(255,255,255,0.92);
  font: 300 30px/1 system-ui, sans-serif; backdrop-filter: blur(4px); }
.vdnavbtn.prev { left: 0; border-radius: 0 10px 10px 0; }
.vdnavbtn.next { right: 0; border-radius: 10px 0 0 10px; }
.vdnavbtn:disabled { opacity: 0.25; cursor: default; }
.vdiag .vsrnav { justify-content: center; }

.vd3btn { position: absolute; top: 10px; right: 10px; border: 0; cursor: pointer;
  padding: 7px 11px; border-radius: 999px; backdrop-filter: blur(6px);
  background: rgba(8,10,14,0.72); color: rgba(255,255,255,0.8);
  font: 700 11px/1 system-ui, sans-serif; letter-spacing: 0.05em; }
.vd3btn.on { background: rgba(200,120,255,0.9); color: #14121a; }
.vd3btn[hidden] { display: none; }
/* Bottom-left, which is the only free corner: the call badge owns the top-left,
   the 3pt pill the top-right, and the nav arrows both mid-edges. */
.vdzbtn { right: auto; left: 10px; top: auto; bottom: 10px; }

.vdthinking { padding: 12px 13px 4px; display: flex; flex-direction: column; gap: 3px;
  margin-top: 10px; border-top: 1px solid var(--border, #2a2f37); }
.vdthinking:empty { display: none; }
.vdthead { font: 700 9px/1 system-ui, sans-serif; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink3, #6b7482); margin-bottom: 3px; }
/* The heuristics list. The old version was a right-aligned label column with the
   answer in low-contrast grey beside it, which at a glance read as a column of
   headings and no answers at all. The answer is the thing being read, so it
   leads: name, verdict, then the detail. */
.vdhwrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 10px 18px; margin-top: 2px; }
.vdhg { min-width: 0; }
.vdhgt { font: 700 9px/1 system-ui, sans-serif; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink3, #79818f);
  padding-bottom: 5px; margin-bottom: 5px; border-bottom: 1px solid var(--border, #2a2f37); }
.vdh { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: baseline;
  padding: 3px 0; }
.vdhn { font: 600 12px/1.35 system-ui, sans-serif; color: var(--text, #eef1f5); min-width: 0; }
/* Reads as a word, not a colour. A colour-only marker is unreadable to anyone
   who does not know the key, and this key was never written down anywhere. */
.vdhc { font: 700 9.5px/1.5 system-ui, sans-serif; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.vdh.yes .vdhc { background: rgba(52,199,89,0.16); color: #4ade80; }
.vdh.no .vdhc { background: rgba(255,69,58,0.16); color: #ff6b61; }
.vdhv { grid-column: 1 / -1; font: 500 11.5px/1.45 system-ui, sans-serif;
  color: var(--ink2, #a9b1bd); }
.vdh.off .vdhn, .vdh.off .vdhv { color: var(--ink3, #6b7482); }
.vdh.off .vdhv { font-style: italic; }

.vdrow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 13px 0; }
.vdclip { flex: 0 1 46%; min-width: 0; }
/* Stands in where a shot has no wide clip, so the space reads as empty on
   purpose rather than as the previous shot's footage. */
.vdnovid { display: grid; place-items: center; min-height: 92px; padding: 20px 16px;
  border: 1px dashed var(--border, #3a3a3c); border-radius: 10px;
  color: var(--muted, #8e8e93); font-size: 13px; text-align: center; }
/* The stage paints itself black behind the video. With no video that black
   stayed, so the placeholder sat under a tall empty black box that read as a
   broken player. No clip means no stage. */
.vdclip.noclip .vsrstage, .vsrstage.noclip { background: none; }
.vdclip.noclip .vdfull { display: none; }
.vdiag .vdvid { display: block; width: 100%; max-height: 30vh; object-fit: contain;
  background: #000; cursor: pointer; }
.vdgeom { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vdgeom .vdrim { fill: none; stroke: #f5eb3c; stroke-width: 7; }
.vdgeom .vdnet { fill: none; stroke: #f5eb3c; stroke-width: 6; }

.vdfull { position: absolute; right: 8px; bottom: 8px; border: 0; cursor: pointer;
  width: 30px; height: 30px; border-radius: 8px; background: rgba(8,10,14,0.72);
  color: rgba(255,255,255,0.85); font-size: 15px; line-height: 1; }
/* Two columns, each owning its own question and its own buttons. Laying the
   asks and the button blocks out as four independent grid cells let the taller
   column push the shorter one's buttons down the page, which is what Adam saw:
   a heading at the top with its answers stranded near the bottom. */
.vdside { flex: 1 1 0; min-width: 0; display: flex; flex-direction: row;
  flex-wrap: wrap; gap: 10px 12px; align-items: flex-start; }
/* The two columns must sit side by side and line up row for row: same question
   baseline, same button rows. A plain flex row let the taller column set its own
   rhythm, so the second question and its answers drifted below the first. */
.vdcol { flex: 1 1 0; min-width: 108px; display: grid; grid-template-rows: auto 1fr;
  gap: 7px; align-content: start; }
.vdcol .vsrbtns { align-content: start; }
.vdside .vsrask { padding: 0; }
.vdside .vsrbtns { display: grid; grid-template-columns: 1fr; gap: 7px; padding: 0; }
.vdside .vdnote { flex: 1 1 100%; margin: 0; width: 100%; }
.vdside .vsrverdict { flex: 1 1 100%; }
@media (max-width: 560px) { .vdcol { flex: 1 1 100%; } }
@media (max-width: 640px) {
  .vdrow { flex-direction: column; }
  .vdclip { flex: none; width: 100%; }
}
.vdiag .vdnote { margin: 9px 13px 0; width: calc(100% - 26px); }


/* The phase strip reads as a log: what was learned, and when. */
.vtabl em { display: block; font: 700 9px/1.3 system-ui, sans-serif; font-style: normal;
  letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.55; margin-top: 2px; }

/* How old the frames are. Sits between the shot and the reasoning, because it
   qualifies both: everything above it was rendered at that moment, not now. */
.vdage { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline;
  padding: 8px 13px 0; }
.vdage[hidden] { display: none; }
.vdagew { font: 700 9.5px/1.4 system-ui, sans-serif; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink3, #79818f); }
.vdageb { font: 500 11px/1.4 system-ui, sans-serif; color: var(--ink2, #a9b1bd); }

/* Drop-zone tuner. Admin only, and deliberately quiet until hovered: it sits on
   top of the frame Adam is judging, so it must not compete with it. */
.vdzone { position: absolute; inset: 0; pointer-events: none; }
.vdzone[hidden] { display: none; }
.vdzsvg { position: absolute; left: 0; top: 0; overflow: visible; }
.vdzpoly { fill: rgba(90,200,90,0.10); stroke: rgba(90,200,90,0.55); stroke-width: 2;
  pointer-events: all; cursor: grab; transition: fill 120ms ease; }
.vdzpoly:hover { fill: rgba(90,200,90,0.22); stroke: rgba(90,200,90,0.9); }
.vdzpoly.dragging { cursor: grabbing; fill: rgba(90,200,90,0.3); }
.vdzhint { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px;
  background: rgba(0,0,0,0.55); color: #cfd6e0; font: 600 10px/1.4 system-ui, sans-serif;
  pointer-events: none; opacity: 0; transition: opacity 140ms ease; }
.vdzone:hover .vdzhint { opacity: 1; }

/* The live drop zone over the clip. Drawn from current geometry, not baked in,
   so it is right even when the clip itself is days old. */
.vdlivez { position: absolute; inset: 0; pointer-events: none; }
.vdlivez[hidden] { display: none; }
.vdlzsvg { position: absolute; left: 0; top: 0; }
.vdlzpoly { fill: rgba(90,200,90,0.14); stroke: rgba(120,230,120,0.95); stroke-width: 2; }
.vdlznet { fill: none; stroke: rgba(235,235,235,0.75); stroke-width: 1; }
.vdlzrim { fill: none; stroke: rgba(245,235,60,0.95); stroke-width: 2; }

/* TEMPORARY: the marking tape. Remove with the JS block that renders it. */
.vtape { border: 1px solid var(--border, #2a2f37); border-radius: 12px; padding: 14px;
  margin: 0 0 18px; background: rgba(255,255,255,0.02); }
.vtapehd { display: flex; gap: 10px; align-items: baseline; font: 800 13px/1.2 system-ui, sans-serif;
  color: var(--text, #eef1f5); }
.vtapehd span { font: 500 11px/1.2 system-ui, sans-serif; color: var(--ink3, #79818f); }
.vtapelede { font: 500 12px/1.55 system-ui, sans-serif; color: var(--ink2, #a9b1bd); margin: 8px 0 12px; }
.vtapevid { width: 100%; max-height: 62vh; display: block; border-radius: 8px; background: #000; }
.vtapebox { width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border, #2a2f37); background: rgba(0,0,0,0.35);
  color: var(--text, #eef1f5); font: 500 12.5px/1.6 ui-monospace, monospace; resize: vertical; }
.vtapefoot { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.vtapemsg { font: 600 11px/1 system-ui, sans-serif; color: var(--ink3, #79818f); }

/* Stills Adam is asked to look at. Wide enough to read a ball path on, and a
   click opens the full-resolution file -- a 1900px trace is unreadable scaled
   into a column. */
.vpicgrid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .vpicgrid { grid-template-columns: 1fr 1fr; } }
.vpic { display: block; width: 100%; padding: 0; border-radius: 8px; overflow: hidden;
  background: #000; border: 1px solid var(--border, #2a2f37); cursor: zoom-in; }
.vpic img { width: 100%; display: block; }

/* Enlarged view. Getting out is deliberately more obvious than getting in:
   the whole surface closes, Esc closes, and there is a labelled button. */
.vlight { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  cursor: zoom-out; }
.vlight img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.vlightx { position: fixed; top: 16px; right: 16px; padding: 10px 16px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.35); background: rgba(0,0,0,0.6); color: #fff;
  font: 700 13px/1 system-ui, sans-serif; cursor: pointer; }
.vlighthint { position: fixed; bottom: 18px; left: 0; right: 0; text-align: center;
  font: 600 12px/1 system-ui, sans-serif; color: rgba(255,255,255,0.65); pointer-events: none; }

.vpicvid { width: 100%; max-height: 58vh; display: block; border-radius: 8px;
  background: #000; margin-bottom: 12px; }

.vtapefmt { display: inline-block; margin: 6px 0; padding: 5px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border, #2a2f37);
  font: 700 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: #e9edf4;
  background: #232935; border-color: #3a4150; }

/* Pause-to-mark bar. Three taps and one button, no typing. 44px minimum targets
   because this is operated one-handed while a video plays. */
.vmark { margin-top: 12px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--border, #2a2f37); background: rgba(255,255,255,0.03); }
.vmark.armed { border-color: #3fae62; background: rgba(63,174,98,0.07); }
.vmarkhd { display: flex; justify-content: space-between; align-items: baseline;
  font: 700 12px/1.2 system-ui, sans-serif; color: var(--ink2, #a9b1bd); margin-bottom: 10px; }
.vmarkt { font: 800 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #e9edf4; font-variant-numeric: tabular-nums; }
.vmarkrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.vchip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px;
  padding: 0 16px; border-radius: 9px; cursor: pointer;
  border: 1px solid #3a4150; background: #232935;
  color: #e9edf4; font: 700 14px/1 system-ui, sans-serif; }
.vchip:hover { background: #2c3340; border-color: #4b5464; }
.vchip.on { border-color: #4cc46f; background: #1f4a30; color: #ffffff; }
.vchip i { width: 13px; height: 13px; border-radius: 50%; display: inline-block;
  border: 1px solid rgba(0,0,0,0.35); }
.vmarkfoot { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.vmarkmsg { font: 700 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: #8fd14f; }

/* Marked shots, beside the controls. Explicit colours, not theme tokens: --ink
   in this app is the always-dark BACKGROUND, and using it for text is what made
   the chips invisible. */
.vmarkwrap { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; }
.vmarkwrap > .vmark { flex: 1 1 auto; margin-top: 0; min-width: 0; }
.vlist { flex: 0 0 268px; border: 1px solid #3a4150; border-radius: 10px;
  background: #1a1f28; overflow: hidden; }
.vlisthd { display: flex; justify-content: space-between; align-items: baseline;
  padding: 11px 13px; border-bottom: 1px solid #3a4150;
  font: 800 12px/1 system-ui, sans-serif; color: #e9edf4; }
.vlistn { font: 800 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #8fd14f; }
.vlistrows { max-height: 52vh; overflow-y: auto; }
.vlistempty { padding: 14px 13px; font: 500 12px/1.5 system-ui, sans-serif; color: #8b93a1; }
.vlistrow { display: flex; align-items: center; gap: 9px; padding: 7px 11px;
  border-bottom: 1px solid #262c37; }
.vlistrow:last-child { border-bottom: 0; }
.vlistgo { padding: 5px 8px; border-radius: 6px; border: 1px solid #3a4150;
  background: #232935; color: #e9edf4; cursor: pointer;
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums; }
.vlistgo:hover { background: #2c3340; border-color: #4b5464; }
.vlistmid { flex: 1 1 auto; min-width: 0; color: #c7cdd8;
  font: 600 12px/1.3 system-ui, sans-serif; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.vlistdot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid rgba(0,0,0,0.4); }
.vlistdot.vlistnone { background: transparent; border-style: dashed; border-color: #4b5464; }
.vlistdel { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 6px;
  border: 1px solid transparent; background: transparent; color: #79818f;
  cursor: pointer; font: 700 13px/1 system-ui, sans-serif; }
.vlistdel:hover { background: #3a2226; border-color: #6b3038; color: #ff9aa5; }

/* Stacked on a narrow screen, where a 268px column would squeeze the buttons. */
@media (max-width: 860px) {
  .vmarkwrap { flex-direction: column; }
  .vlist { flex: 1 1 auto; width: 100%; }
  .vlistrows { max-height: 34vh; }
}

.vlistnote { padding: 10px 12px; border-top: 1px solid #262c37; color: #9aa3b2;
  font: 500 11px/1.5 system-ui, sans-serif; background: #161b22; }

/* Dunk is a toggle, not a pick-one, so it reads differently from the radio rows
   above it: amber when on rather than the green those use. */
.vchip.vdunk.on { border-color: #f2c53d; background: #453a17; color: #ffe9a8; }

/* One clip at a time. Explicit colours: --ink in this app is the always-dark
   background, and using it for text is what made the marking chips invisible. */
.vcar { margin-top: 4px; }
.vcarbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.vcarpos { flex: 1 1 auto; text-align: center; color: #e9edf4;
  font: 800 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.vcarbar .btn { min-height: 44px; padding: 0 20px; }
.vcarbar .btn:disabled { opacity: 0.35; cursor: default; }
.vcarlab { display: block; margin: 12px 0 6px; color: #a9b1bd;
  font: 700 12px/1 system-ui, sans-serif; }
.vcarbox { width: 100%; min-height: 46px; padding: 11px 13px; border-radius: 9px;
  border: 1px solid #3a4150; background: #1a1f28; color: #e9edf4;
  font: 600 15px/1.3 system-ui, sans-serif; }
.vcarbox:focus { outline: none; border-color: #4cc46f; }
.vcarfoot { margin-top: 8px; }
.vcarmsg { font: 700 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: #8fd14f; }
.vcarall { margin-top: 16px; }
.vcarall summary { cursor: pointer; color: #79818f; font: 600 12px/1.4 system-ui, sans-serif; }

/* Per-shot comment, and the row-is-a-button treatment for going back to one. */
.vmarknote { width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 9px;
  border: 1px solid #3a4150; background: #1a1f28; color: #e9edf4;
  font: 600 13px/1.3 system-ui, sans-serif; }
.vmarknote:focus { outline: none; border-color: #4cc46f; }
.vmarkcancel { min-height: 44px; }
.vlistrow { cursor: pointer; }
.vlistrow:hover { background: #232935; }
.vlistrow.editing { background: #1f4a30; }
.vlistcom { display: block; color: #8fd14f; font: 500 11px/1.35 system-ui, sans-serif;
  font-style: normal; margin-top: 2px; white-space: normal; }

/* Skip controls either side of a tape video. Marking means overshooting and
   stepping back constantly, and a 7-minute scrubber is far too coarse for that. */
.vvidwrap { position: relative; display: flex; align-items: center; gap: 8px; }
.vvidwrap .vtapevid { flex: 1 1 auto; min-width: 0; }
.vskip { flex: 0 0 auto; width: 54px; height: 54px; border: 0; cursor: pointer;
  border-radius: 999px; background: rgba(8,10,14,0.72); color: rgba(255,255,255,0.85);
  display: grid; place-items: center; position: relative;
  font: 700 12px/1 system-ui, sans-serif; }
.vskip:hover { background: rgba(8,10,14,0.9); color: #fff; }
.vskip:active { transform: scale(0.94); }
.vskip::before { content: ""; position: absolute; inset: 8px;
  border: 2px solid currentColor; border-radius: 999px; border-top-color: transparent;
  opacity: 0.55; }
.vskip.back::before { transform: rotate(-45deg); }
.vskip.fwd::before { transform: scaleX(-1) rotate(-45deg); }
.vskip span { font-size: 13px; }
@media (max-width: 640px) { .vskip { width: 46px; height: 46px; } }
/* Poker ledger "settled up" tick. Static (no hover/pointer) for non-admins,
   who can see it but never change it -- a control that depresses and does
   nothing reads as broken. */
.poker-tick { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px; border: 1.6px solid var(--silver2); background: transparent; color: #fff; font-size: 14px; font-weight: 800; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.poker-tick.on { background: var(--up); border-color: var(--up); }
.poker-tick:disabled { cursor: default; opacity: 1; }

/* ── post-season awards display (mirrors PlayerProfileScreen.tsx) ────────── */
/* The headline honour: one banner, so a reigning MVP reads as one at a glance
   instead of as one pill among several. */
.honor-banner { display: flex; align-items: center; gap: 14px; background: var(--gold-tint); border: 1.5px solid var(--gold); border-radius: var(--r-xl); padding: 16px 18px; margin-top: 14px; }
.honor-banner .em { font-size: 28px; line-height: 1; flex: none; }
.honor-banner .nm { font-family: var(--ui); font-weight: 800; font-size: 17px; color: var(--gold-deep); }
.honor-banner .sub { font-weight: 600; font-size: 12.5px; color: var(--ink3); margin-top: 2px; }
/* Everything else held this season. A gold border means won, a plain one means
   came close -- the subtitle says which, the border just makes it scannable. */
.honor-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
/* Three to a row, always: without max-width a lone fourth chip grows to the
   full width and reads as a second banner. */
.honor-chip { flex: 1 1 28%; max-width: 32%; text-align: center; padding: 13px 8px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--surface); }
.honor-chip.won { border-color: var(--gold); }
.honor-chip .em { font-size: 20px; line-height: 1.25; }
.honor-chip .nm { font-family: var(--ui); font-weight: 800; font-size: 12.5px; color: var(--text); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.honor-chip .sub { font-weight: 600; font-size: 11px; color: var(--ink3); margin-top: 1px; }
.honor-chip.won .sub { color: var(--gold-deep); }
/* One line per season, live season first with a dot. */
.card.career { padding: 0; overflow: hidden; }
.career-head { padding: 14px 16px 12px; }
.career-head .t { font-family: var(--disp); font-weight: 800; font-size: 19px; letter-spacing: 0.3px; color: var(--text); }
.career-head .s { font-weight: 600; font-size: 12.5px; color: var(--ink3); margin-top: 2px; }
.career-row { padding: 13px 16px; }
.career-row + .career-row { border-top: 1px solid var(--line); }
.career-row .top { display: flex; align-items: center; gap: 10px; }
.career-row .yr { font-family: var(--disp); font-weight: 800; font-size: 19px; color: var(--text); }
.career-row .yr.live { color: var(--gold-deep); }
.career-row .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--up); margin-left: -5px; flex: none; }
/* The season name gets its OWN full-width line, shown only when two rows share a
   calendar year. It cannot sit beside the stats: the four fixed-width columns
   leave ~100px and "Summer 2027" needs 117px in the display face, which is what
   produced "Sum..." / "Summ..." -- the one truncation that removes the part
   doing the disambiguating. Measured every inline variant; all clipped.
   Mirrors PlayerProfileScreen's career row. */
.career-row .season-name { font-weight: 700; font-size: 11.5px; letter-spacing: 0.3px; color: var(--ink3); margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.career-row .sp, .career-total .sp { flex: 1; }
/* Column widths are shared by the header row and the data cells -- a header
   pointing at the wrong number is worse than no header. Keep them in step. */
.career-cols { display: flex; align-items: center; gap: 10px; padding: 0 16px 8px; border-bottom: 1px solid var(--line); }
.career-cols .sp { flex: 1; }
.career-cols .c { font-weight: 700; font-size: 9.5px; letter-spacing: 0.5px; color: var(--ink3); text-align: right; }
.career-row .st { font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap; text-align: right; }
.career-row .st.dim { color: var(--ink3); }
.career-cols .games, .career-row .st.games { width: 46px; }
.career-cols .win,   .career-row .st.win   { width: 46px; }
.career-cols .power, .career-row .st.power { width: 50px; }
.career-cols .best,  .career-row .st.best  { width: 54px; }
.career-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.career-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; border: 1.5px solid var(--gold); font-weight: 800; font-size: 11.5px; color: var(--gold-deep); }
/* Worst Duo deliberately breaks the tier pattern: dashed grey, muted icon and
   text, and it never sets a ring colour. */
.career-pill.worst { border-style: dashed; border-color: var(--line); color: var(--ink3); }
.career-pill.worst .em { opacity: 0.55; }
.career-pill .em { font-size: 12px; line-height: 1; }
.career-none { font-weight: 500; font-style: italic; font-size: 12.5px; color: var(--ink3); margin-top: 8px; }
.career-total { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 2px solid var(--gold); }
.career-total .lab { font-weight: 800; font-size: 11.5px; letter-spacing: 1px; color: var(--ink3); }
.career-total .val { font-family: var(--disp); font-weight: 700; font-size: 15px; color: var(--gold-deep); }
/* Between-seasons board: last season's honour roll, one row per award. */
.honor-row { align-items: center; }
.honor-mark { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-md); background: var(--gold-tint); font-size: 20px; line-height: 1; }
.honor-mark.worst { background: var(--down-tint); }
.honor-body { flex: 1; min-width: 0; }
.honor-award { font-weight: 800; font-size: 11px; letter-spacing: 0.6px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.honor-award.worst { color: var(--down); }
.honor-who { display: flex; align-items: center; gap: 6px; margin-top: 4px; min-width: 0; }
.honor-who .nm { font-weight: 800; font-size: 15px; letter-spacing: 0.2px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── partners, matchups, streaks (mirrors PlayerProfileScreen.tsx) ───────── */
.card.pair-card { padding: 6px 16px; }
.pair-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; }
.pair-row + .pair-row { border-top: 1px solid var(--line); }
.pair-row .lab { width: 96px; flex: none; font-weight: 700; font-size: 11.5px; letter-spacing: 0.3px; color: var(--ink3); }
.pair-row .nm { flex: 1; min-width: 0; font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair-row .wl { font-weight: 600; font-size: 12.5px; color: var(--ink3); }
.pair-row .pct { font-family: var(--disp); font-weight: 700; font-size: 16px; min-width: 44px; text-align: right; }
.pair-row .pct.good { color: var(--up); }
.pair-row .pct.bad { color: var(--down); }
.pair-row .none { flex: 1; font-weight: 500; font-size: 13px; color: var(--ink3); }
.pair-note { font-weight: 500; font-size: 11.5px; color: var(--ink3); margin-top: 8px; }
/* Head to head: two avatar strips and the resulting split. */
.card.h2h { padding: 14px; }
.h2h-lab { font-weight: 700; font-size: 11px; letter-spacing: 0.5px; color: var(--ink3); margin-bottom: 6px; }
.h2h-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0; scrollbar-width: thin; }
/* Selection is this FILL, not a ring on the avatar -- the award tier ring is
   automatic and overrides any passed ring, so a gold-tier winner rendered
   identically to the current pick. Ring = award, fill = picked. */
.h2h-pick { flex: none; width: 54px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 6px 0; border-radius: 12px; cursor: pointer; font: inherit; color: var(--ink3); }
.h2h-pick.on { background: var(--gold-tint); }
.h2h-pick span { font-weight: 600; font-size: 10.5px; max-width: 54px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h2h-pick.on span { font-weight: 800; color: var(--gold-deep); }
.h2h-pick.taken { opacity: 0.3; cursor: default; }
.h2h-out { display: flex; margin-top: 12px; border-top: 1px solid var(--line); }
.h2h-out .sep { width: 1px; background: var(--line); margin: 12px 0; }
.h2h-side { flex: 1; text-align: center; padding: 14px 0; }
.h2h-side .t { font-weight: 700; font-size: 11px; letter-spacing: 0.5px; color: var(--ink3); }
.h2h-side .v { font-family: var(--disp); font-weight: 700; font-size: 26px; margin-top: 5px; }
.h2h-side .v.good { color: var(--up); }
.h2h-side .v.bad { color: var(--down); }
.h2h-side .s { font-weight: 600; font-size: 12px; color: var(--ink3); margin-top: 2px; }
.h2h-side .none { font-weight: 500; font-size: 13px; color: var(--ink3); margin-top: 8px; }
.h2h-note { font-weight: 500; font-size: 11.5px; color: var(--ink3); margin-top: 10px; text-align: center; }

/* Award detail sheet: winner, then the top of the ballot. */
.aw-desc { font-weight: 500; font-size: 12.5px; line-height: 1.45; color: var(--ink2); margin-top: 12px; }
.aw-lab { font-weight: 700; font-size: 11px; letter-spacing: 0.5px; color: var(--ink3); margin-top: 16px; }
.aw-rank { margin-top: 6px; }
.aw-rank .r { display: flex; align-items: center; gap: 11px; padding: 9px 0; }
.aw-rank .r + .r { border-top: 1px solid var(--line); }
.aw-rank .n { width: 18px; font-family: var(--disp); font-weight: 700; font-size: 15px; color: var(--ink3); }
.aw-rank .nm { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-rank .won { padding: 3px 8px; border-radius: 999px; background: var(--gold); color: var(--on-gold-deep); font-weight: 800; font-size: 10px; }
.aw-rank .sc { font-weight: 600; font-size: 12.5px; color: var(--ink3); white-space: nowrap; }
.aw-note { font-weight: 500; font-size: 12px; line-height: 1.45; color: var(--ink3); margin-top: 14px; }
/* Between-seasons banner: these numbers are last season's. */
.past-banner { display: flex; align-items: center; gap: 9px; background: var(--gold-tint); border: 1px solid var(--gold); border-radius: var(--r-lg); padding: 10px 13px; margin-top: 14px; }
.past-banner .em { font-size: 15px; line-height: 1; }
.past-banner .t { font-weight: 600; font-size: 12.5px; line-height: 1.35; color: var(--ink2); }
.past-banner .t b { font-weight: 800; color: var(--gold-deep); }

/* ── charts from reviewed film ── */
/* The court is twice as tall as it is wide, and the box has to match the
   viewBox or a circle stops being a circle. Capped so it never dominates a
   profile: it is one panel among several, not the page. */
.shot-chart { display: block; width: 100%; max-width: 190px; aspect-ratio: 1 / 2; margin: 10px auto 2px; }
.shot-chart .sc-court { fill: var(--track); stroke: var(--line); stroke-width: 1; }
.shot-chart .sc-3pt { stroke: var(--ink3); stroke-width: 0.8; stroke-dasharray: 3 2; opacity: 0.75; }
.shot-chart .sc-label { fill: var(--ink3); font-size: 6px; font-family: var(--ui); font-weight: 700; }
.shot-chart .sc-hoop { fill: none; stroke: var(--ink3); stroke-width: 1.2; }
/* Filled for a make, hollow for a miss. No legend needed; every shot chart
   ever drawn works this way. */
.shot-chart .sc-make { fill: var(--gold-deep); }
.shot-chart .sc-miss { fill: none; stroke: var(--ink3); stroke-width: 1; opacity: 0.7; }

.dbars { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.dbar-row { display: flex; align-items: center; gap: 9px; }
.dbar-lab { width: 72px; flex: none; font-weight: 700; font-size: 11.5px; color: var(--ink3); }
.dbar-track { flex: 1; height: 7px; border-radius: 4px; background: var(--track); overflow: hidden; }
.dbar-fill { display: block; height: 100%; border-radius: 4px; background: var(--blue); }
.dbar-row.on .dbar-fill { background: var(--gold-deep); }
.dbar-pct { width: 34px; text-align: right; font-family: var(--disp); font-weight: 700; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.dbar-n { width: 46px; text-align: right; font-weight: 600; font-size: 11px; color: var(--ink3); font-variant-numeric: tabular-nums; }

.tw-trend { display: block; width: 100%; height: auto; margin-top: 8px; }
.tw-trend .tw-line { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* The season figure, so a single game reads as above or below it rather than as
   a number with nothing to sit against. */
.tw-trend .tw-avg { stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 4 3; opacity: 0.8; }
.tw-trend .tw-dot { fill: var(--blue); }
.tw-trend .tw-dot.up { fill: var(--up); }
.tw-trend .tw-dot.down { fill: var(--down); }

/* A line under a chart saying what it is counting. Charts without one invite the
   reader to guess the denominator, and they always guess wrong. */
.chart-note { margin-top: 9px; font-size: 11.5px; line-height: 1.45; color: var(--ink3); font-weight: 500; }

/* A group of stats, shut by default with its headline showing. Native <details>
   so it is keyboard-operable and announced correctly without any JS, and so no
   open/closed state exists for a re-render to lose. */
.stat-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); margin-top: 9px; overflow: hidden; }
.stat-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 16px; }
.stat-group > summary::-webkit-details-marker { display: none; }
.stat-group > summary::after { content: "›"; margin-left: auto; font-size: 19px; line-height: 1; color: var(--ink3); transform: rotate(90deg); transition: transform 0.18s ease; }
.stat-group[open] > summary::after { transform: rotate(-90deg); }
.stat-group > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.stat-group .g-name { font-family: var(--ui); font-weight: 800; font-size: 13px; color: var(--text); }
/* The headline sits beside the name rather than under it, so a shut group is
   one line and four of them read as a short list rather than a page. */
.stat-group .g-sum { font-weight: 600; font-size: 12px; color: var(--ink3); text-align: right; margin-left: auto; }
.stat-group .g-sum + ::after { margin-left: 10px; }
.stat-group .pair-card { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 0 16px 6px; border-top: 1px solid var(--line); }
.stat-group .pair-card .pair-row:first-child { border-top: 0; }

/* Charts share one frame so they cannot drift apart from each other. */
.card.chart-card { padding: 12px 16px 14px; margin-top: 9px; }

/* Axis text on the trend. Small and quiet: it is there to be read once, when
   somebody wonders what the picture is measuring, not on every glance. */
.tw-trend .tw-tick { fill: var(--ink3); font-family: var(--ui); font-weight: 600; font-size: 8px; }

/* Heatmap and scatter. The heat court is wider than a shot chart because the
   zone labels need room to stay legible at this size. */
.shot-chart.heat { max-width: 250px; }
.shot-chart.heat .hm-cell { stroke: var(--line); stroke-width: 0.4; }
.shot-chart.heat .hm-fill { fill: var(--hf-l); }
.shot-chart.heat .hm-txt { fill: var(--hm-l); font-family: var(--ui); font-weight: 800; }
.shot-chart.heat .hm-sub { fill: var(--hs-l); font-family: var(--ui); font-weight: 700; }
:root[data-theme="dark"] .shot-chart.heat .hm-fill { fill: var(--hf-d); }
:root[data-theme="dark"] .shot-chart.heat .hm-txt { fill: var(--hm-d); }
:root[data-theme="dark"] .shot-chart.heat .hm-sub { fill: var(--hs-d); }
.scatter { display: block; width: 100%; max-width: 340px; height: auto; margin: 4px auto 0; }
.scatter .sc-zero { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.scatter .sp-dot { fill: var(--blue); opacity: 0.85; }
.scatter .sp-dot.me { fill: var(--gold-deep); opacity: 1; }
.scatter .sp-lab { fill: var(--ink3); font-family: var(--ui); font-weight: 700; font-size: 7px; }
.scatter .sp-axis { fill: var(--ink3); font-family: var(--ui); font-weight: 700; font-size: 8px; }
/* A group holding a whole card rather than stat rows needs no inner padding. */
.stat-group .group-body { border-top: 1px solid var(--line); padding: 4px 0 2px; }
.stat-group .group-body .card { background: transparent; border: 0; box-shadow: none; }

/* Matchup grid. Scrolls inside its own container so the page body never scrolls
   sideways, which is the rule for any wide content. */
.grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matchup-grid { border-collapse: collapse; font-family: var(--ui); margin: 0 auto; }
.matchup-grid caption { caption-side: bottom; text-align: left; padding-top: 10px; }
.matchup-grid th { font-weight: 800; font-size: 10px; color: var(--ink3); padding: 3px 5px; }
.matchup-grid td { font-weight: 700; font-size: 10px; color: var(--text); text-align: center; padding: 5px 6px; min-width: 26px; border: 1px solid var(--surface); }
.matchup-grid td.mg-none { background: var(--track); opacity: 0.4; }

/* Lift bars diverge from a centre line, because the sign is the whole point:
   a bar growing right helped and one growing left did not. */
.lift-bars { display: flex; flex-direction: column; gap: 7px; }
.lb-row { display: flex; align-items: center; gap: 9px; }
.lb-name { width: 74px; flex: none; font-weight: 700; font-size: 11.5px; color: var(--ink3); }
.lb-track { position: relative; flex: 1; height: 8px; border-radius: 4px; background: var(--track); }
.lb-zero { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line); }
.lb-fill { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.lb-fill.up { background: var(--up); }
.lb-fill.down { background: var(--down); }
.lb-val { width: 42px; text-align: right; font-family: var(--disp); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.lb-val.up { color: var(--up); }
.lb-val.down { color: var(--down); }

/* The full season table. Scrolls in its own container; the page never scrolls
   sideways because of it. */
.rate-table { border-collapse: collapse; font-family: var(--ui); width: 100%; }
.rate-table th, .rate-table td { padding: 7px 8px; font-size: 11.5px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.rate-table thead th { font-weight: 800; font-size: 10px; letter-spacing: 0.04em; color: var(--ink3); text-align: right; }
.rate-table thead th:first-child { text-align: left; }
.rate-table tbody th { font-weight: 800; color: var(--text); text-align: left; }
.rate-table tbody td { font-weight: 600; color: var(--ink2); text-align: right; font-variant-numeric: tabular-nums; }

/* ── Poolean Intel: sections, panels, card tables ──────────────────────────
   A section is either inline or a chevron row. A visual one (charts, heatmaps,
   tiles) sits open under its title and teaser, so the Stats screen shows as
   much as it can; a table-and-text one is a single card row, title and teaser
   with a chevron, that opens its own page. The gold edge is the app's accent,
   so both read as a heading rather than as one more card. */
.secs { margin-top: 6px; }
.sec-inline { margin-top: 22px; }
.sec-head { padding: 2px 0 2px 12px; border-left: 4px solid var(--gold); }
.sec-row { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 13px 16px 13px 14px; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--r-lg); box-shadow: var(--shadow-card); -webkit-tap-highlight-color: transparent; }
.sec-row:active { background: var(--bg); }
.sec-row:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sec-chev { margin-left: auto; flex: none; font-size: 24px; line-height: 1; color: var(--ink3); }
.sec-txt { display: flex; flex-direction: column; min-width: 0; }
.sec-t { font-family: var(--disp); font-weight: 800; font-size: 20px; line-height: 1.05; letter-spacing: 0.01em; text-transform: uppercase; color: var(--text); }
.sec-teaser { font-weight: 600; font-size: 12px; line-height: 1.35; color: var(--ink3); margin-top: 3px; }
.sec-body { padding: 0 0 8px; }
.sec-body > :first-child { margin-top: 12px; }
.sec-body > .section-label:first-child { margin-top: 14px; }
/* A section's own page: the dark hero with Back at the top left and the title
   under it, the body scrolling below (the .full overlay rules do the scrolling). */
.sec-back { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px 0 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.12); color: #fff; font-family: var(--ui); font-weight: 700; font-size: 14px; cursor: pointer; }
.sec-back span { font-size: 22px; line-height: 1; margin-top: -2px; }
.sec-page-hero h1.disp { font-size: 32px; margin-top: 10px; }
.sec-page-body { padding: 4px 18px 28px; }
/* A group of tables is a chevron row too (group2 in app.js); its body, on a
   page, keeps the flat group styles without the divider under a summary. */
.grp-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 16px; text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.grp-row:active { background: var(--bg); }
.grp-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.grp-row .sec-chev { margin-left: 10px; font-size: 22px; }
.grp-page { margin-top: 12px; }
.stat-group.grp-page .group-body { border-top: 0; padding-top: 2px; }

/* The one-line explanation under a panel's heading, and the sentence that reads
   a player's numbers back to them. */
.ix-hint { margin: -4px 2px 10px; font-size: 12px; line-height: 1.45; font-weight: 500; color: var(--ink2); }
.ix-read { margin: 0; font-size: 13.5px; line-height: 1.45; font-weight: 600; color: var(--text); }
.ix-muted { margin: 0; font-size: 12.5px; line-height: 1.45; font-weight: 500; color: var(--ink3); }
.ix-read + .ix-muted { margin-top: 8px; }
.card.ix-card { padding: 13px 16px; margin-top: 9px; }
.card.ix-card > .ix-legend + .ix-read { margin-top: 12px; }
.stat-tiles.ix-tiles { margin-top: 0; }
.stat-tiles.ix-tiles .lab { line-height: 1.3; }
.card.ix-tcard { padding: 2px 8px; margin-top: 9px; overflow: hidden; }
.ix-tnote { padding: 0 8px 10px; }
.stat-group .group-body .ix-tnote { padding: 0 16px 10px; }
.stat-group .group-body > .ix-muted { padding: 10px 16px; }
.ix-loading { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; color: var(--ink2); }

/* The name column of a card table: a small avatar and the full name. */
.ct-who { display: inline-flex; align-items: center; gap: 7px; }
.ctable tbody tr[data-player], .ctable tbody tr[data-game] { cursor: pointer; }
.ctable td .mixbar { vertical-align: middle; }

/* Turnover mix: one bar split by type. */
.mixbar { display: inline-flex; width: 92px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--track); }
.mixbar.wide { display: flex; width: 100%; height: 12px; border-radius: 6px; }
.mixbar > i { display: block; height: 100%; }
.ix-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 11.5px; font-weight: 600; color: var(--ink2); }
.ix-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Self-inflicted against forced, one row per player, length by volume. */
.sif { display: flex; flex-direction: column; gap: 8px; }
.sif-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.sif-name { width: 72px; flex: none; font-weight: 800; font-size: 12px; text-transform: uppercase; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sif-track { flex: 1; min-width: 0; height: 12px; }
.sif-fill { display: flex; height: 100%; min-width: 6px; border-radius: 4px; overflow: hidden; background: var(--ink3); }
.sif-fill > i { display: block; height: 100%; }
.sif-fill > .si { background: var(--down); }
.sif-fill > .fo { background: var(--blue); }
.sif-n { width: 26px; flex: none; text-align: right; font-family: var(--disp); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }

/* League FG% by contest level, the tagging sanity check. */
.ix-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; }
.ix-strip-cell { background: var(--bg); border-radius: var(--r-md); padding: 9px 10px; }
.ix-strip-cell .big { font-family: var(--disp); font-weight: 800; font-size: 21px; line-height: 1; }
.ix-strip-cell .lab { font-size: 10.5px; font-weight: 700; color: var(--ink3); margin-top: 4px; white-space: nowrap; }

/* Play style clusters. */
.ix-clusters { display: grid; gap: 9px; }
@media (min-width: 640px) { .ix-clusters { grid-template-columns: 1fr 1fr; } }
.card.ix-cluster { padding: 13px 14px; }
.ix-cl-t { font-family: var(--disp); font-weight: 800; font-size: 19px; line-height: 1.05; text-transform: uppercase; }
.ix-cl-mem { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ix-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--bg); font-weight: 800; font-size: 12px; text-transform: uppercase; cursor: pointer; }

/* Calibrated thresholds. */
.ix-cal + .ix-cal { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ix-cal-t { font-weight: 800; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink3); }
.ix-cal-v { font-weight: 700; font-size: 14px; color: var(--text); margin-top: 3px; }

/* Season lines. */
.ml-chart { display: block; width: 100%; height: auto; margin-top: 4px; }
.ml-chart .tw-tick { fill: var(--ink3); font-family: var(--ui); font-weight: 600; font-size: 8px; }
.ml-zero { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.ml-dot { stroke: var(--surface); stroke-width: 1.5; }
.ml-init { fill: #fff; font-family: var(--disp); font-weight: 700; font-size: 7px; }

/* Opening the film at a moment. */
.watch-btn { flex: none; border: 0; background: var(--blue-tint); color: var(--blue); font-family: var(--ui); font-weight: 800; font-size: 11.5px; padding: 5px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.trend .watch-btn { margin-left: 4px; }
.modal-overlay.full > .modal.film-modal { padding: 0; max-width: 900px; overflow: hidden; background: #000; }
.modal-overlay.full > .modal.film-modal > .film-head { flex: 0 0 auto; overflow: visible; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 14px 12px; color: #fff; font-weight: 700; font-size: 13px; }
.modal-overlay.full > .modal.film-modal > video { display: block; width: 100%; max-height: 80vh; background: #000; }

/* Reporting somebody else's comment. */
.cm-report { flex: none; border: none; background: none; color: var(--ink3); font-family: var(--ui); font-weight: 700; font-size: 11.5px; cursor: pointer; padding: 5px 2px; }
.cm-report:hover { color: var(--down); }

/* Wide tables become a stack of cards on a phone: the name on top, then one
   labelled line per figure. An empty figure drops out rather than printing a
   placeholder. Only the tables built by ctable() do this; the existing season
   tables keep scrolling sideways in their own container. */
@media (max-width: 480px) {
  .card.ix-tcard { padding: 2px 10px; }
  .stat-group .group-body .ctable-wrap { padding: 0 10px; }
  .ctable-wrap:has(.ctable-cards) { overflow: visible; }
  .ctable-cards, .ctable-cards tbody, .ctable-cards th, .ctable-cards td { display: block; width: auto; }
  .ctable-cards thead { display: none; }
  /* Two figures to a line, so a card is half as tall as a list of them. */
  .ctable-cards tbody tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; background: var(--bg); border-radius: var(--r-md); padding: 9px 12px; margin: 8px 0; }
  .ctable-cards tbody th { grid-column: 1 / -1; border: 0; padding: 0 0 6px; white-space: normal; font-size: 13px; }
  .ctable-cards tbody td { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; padding: 3px 0; white-space: normal; font-size: 12.5px; min-width: 0; }
  .ctable-cards tbody td::before { content: attr(data-label); font-weight: 700; font-size: 11px; color: var(--ink3); text-align: left; }
  .ctable-cards tbody td:empty { display: none; }
  .ctable-cards tbody td[data-label=""]::before { content: none; }
  .ctable-cards tbody td[data-label=""] { justify-content: flex-start; }
  .ctable-cards tbody td .mixbar { width: 64px; }
}

/* ───────────────────── live scoreboard ─────────────────────
   Three surfaces read one live game: the header on the live stat screen, the
   LIVE NOW card on Board and Party, and the bar pinned to the bottom of every
   route. All three sit on the always-dark chrome (--header-top to --ink), so
   their colors are fixed rather than themed, the same as the topbar. */
:root { --live: #ff5f4a; --live-a: #7fb2ff; }
.live-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(255, 95, 74, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(255, 95, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 95, 74, 0); } }
.live-tag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--ui); font-weight: 800; font-size: 11.5px; letter-spacing: 0.12em; color: var(--live); }

/* The live stat screen's header: pinned while the roster scrolls under it. */
.lsb { margin-top: 12px; }
.lsb-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 18px; }
.lsb-target { font-family: var(--ui); font-weight: 700; font-size: 12.5px; color: rgba(255, 255, 255, 0.62); }
.lsb-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; margin-top: 4px; }
.lsb-side { text-align: center; min-width: 0; }
.lsb-pts { font-family: var(--disp); font-weight: 800; font-size: 78px; line-height: 0.95; font-variant-numeric: tabular-nums; }
.lsb-side.a .lsb-pts { color: var(--live-a); }
.lsb-side.b .lsb-pts { color: var(--gold); }
.lsb-pts.bump { animation: scoreBump 0.34s ease; }
@keyframes scoreBump { 0% { transform: scale(1); } 40% { transform: scale(1.16); } 100% { transform: scale(1); } }
.lsb-names { font-family: var(--ui); font-weight: 700; font-size: 12.5px; color: rgba(255, 255, 255, 0.72); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsb-dash { font-family: var(--disp); font-size: 34px; color: rgba(255, 255, 255, 0.32); padding-bottom: 18px; }
.lsb-last { text-align: center; margin-top: 10px; font-family: var(--ui); font-weight: 600; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.lsb-last b { color: #fff; font-weight: 800; }
.lsb-reached { margin-top: 12px; padding: 9px 12px; border-radius: var(--r-md); background: var(--gold); color: var(--on-gold-deep); font-family: var(--ui); font-weight: 800; font-size: 13.5px; text-align: center; }
.lgs-hint { font-family: var(--ui); font-weight: 600; font-size: 12.5px; line-height: 1.45; color: var(--ink3); margin: 0 2px; }

/* One-tap makes under each player on the live screen. */
.live-prow { flex-wrap: wrap; row-gap: 10px; padding: 10px 12px 12px; }
.lq { flex: 1 0 100%; display: flex; gap: 6px; }
.lq-btn { flex: 1 1 0; height: 46px; border-radius: var(--r-md); font-family: var(--disp); font-weight: 800; font-size: 21px; font-variant-numeric: tabular-nums; touch-action: manipulation; transition: transform 0.08s ease; }
.lq-btn:active { transform: scale(0.93); }
.lq.a .lq-btn { background: var(--blue-tint); color: var(--blue); }
.lq.b .lq-btn { background: var(--gold-tint); color: var(--gold-deep); }
:root[data-theme="dark"] .lq.b .lq-btn:not(.more) { color: var(--gold); }
.lq .lq-btn.more { flex: 1.3 1 0; background: var(--track); color: var(--ink2); font-family: var(--ui); font-size: 13.5px; }

/* LIVE NOW, at the head of Board and Party. The whole card is the button. */
.live-hero { display: block; width: 100%; max-width: 720px; text-align: left; margin: 0 0 12px; padding: 16px 18px 14px; border-radius: var(--r-xl); background: linear-gradient(160deg, var(--header-top), var(--ink)); border: 1px solid rgba(255, 255, 255, 0.06); color: #fff; box-shadow: var(--shadow-pop); font-family: var(--ui); transition: transform 0.12s ease; }
.live-hero:active { transform: scale(0.985); }
.lh-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lh-target { font-weight: 700; font-size: 12.5px; color: rgba(255, 255, 255, 0.62); }
.lh-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 10px; margin-top: 10px; }
.lh-side { min-width: 0; }
.lh-side.b { text-align: right; }
.lh-names { font-weight: 800; font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase; color: rgba(255, 255, 255, 0.82); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-pts { font-family: var(--disp); font-weight: 800; font-size: 58px; line-height: 0.95; margin-top: 2px; font-variant-numeric: tabular-nums; }
.lh-side.a .lh-pts { color: var(--live-a); }
.lh-side.b .lh-pts { color: var(--gold); }
.lh-dash { font-family: var(--disp); font-size: 28px; color: rgba(255, 255, 255, 0.3); padding-bottom: 9px; }
.lh-bar { position: relative; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); margin-top: 14px; overflow: hidden; }
.lh-bar i { position: absolute; top: 0; bottom: 0; }
.lh-bar i.a { left: 0; background: var(--live-a); }
.lh-bar i.b { right: 0; background: var(--gold); }
.lh-cta { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 12px; font-weight: 800; font-size: 14px; color: var(--gold); }

/* The bar pinned to the bottom of every route while a game is live. The web
   app has no bottom tab bar (mobile nav is the menu), so it floats on its own
   above the home indicator, and .main gains the room it covers. */
.live-mini { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 560px; height: 50px; display: flex; align-items: center; gap: 9px; padding: 0 16px; border-radius: 999px; background: linear-gradient(160deg, var(--header-top), var(--ink)); border: 1px solid rgba(255, 255, 255, 0.08); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28); font-family: var(--ui); text-align: left; }
:root[data-theme="dark"] .live-mini { border-color: rgba(255, 255, 255, 0.14); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
:root[data-theme="dark"] .live-hero { border-color: rgba(255, 255, 255, 0.1); }
.live-mini.enter { animation: miniIn 0.24s ease; }
@keyframes miniIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.lm-label { flex: none; font-weight: 800; font-size: 11px; letter-spacing: 0.12em; color: var(--live); }
.lm-score { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; }
.lm-names { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 13.5px; color: rgba(255, 255, 255, 0.86); }
.lm-names.a { text-align: right; }
.lm-pts { flex: none; font-family: var(--disp); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.lm-target { flex: none; font-weight: 700; font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.main.has-live-mini { padding-bottom: calc(28px + 74px + env(safe-area-inset-bottom)); }
@media (min-width: 920px) {
  .live-mini { left: calc(var(--sidebar-w) + 24px); right: 24px; bottom: 20px; }
  .main.has-live-mini { padding-bottom: 104px; }
}

/* "Game to" on the log-a-game sheet, above the live stats button. */
.target-step { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.target-step-label { flex: 1; font-family: var(--ui); font-weight: 800; font-size: 14.5px; color: var(--text); }
.target-step-btn { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--blue-tint); color: var(--blue); font-size: 22px; font-weight: 700; display: grid; place-items: center; touch-action: manipulation; }
.target-step-btn:disabled { opacity: 0.4; cursor: default; }
.target-step-val { min-width: 36px; text-align: center; font-family: var(--disp); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; color: var(--text); }

/* ───────────────────── win probability ─────────────────────
   One split bar everywhere: Team A's share from the left in blue, Team B's from
   the right in gold, flat colors with a hairline gap at the split. On the dark
   live chrome it uses the scoreboard's own pair (--live-a and --gold); on a
   light surface (.light) the page's --blue and --gold. */
.wp-bar { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; }
.wp-bar i { display: block; height: 100%; min-width: 2px; }
.wp-bar i.a { background: var(--live-a); }
.wp-bar i.b { background: var(--gold); }
.wp-bar.light i.a { background: var(--blue); }
.wp-bar.light i.b { background: var(--gold); }
.wp-line { font-family: var(--ui); font-weight: 700; font-size: 12.5px; color: rgba(255, 255, 255, 0.62); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wp-line b { font-weight: 800; }
.wp-line b.a { color: var(--live-a); }
.wp-line b.b { color: var(--gold); }
.lsb-wp { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-top: 12px; }
.lsb-wp .wp-bar { width: 100%; }
.lh-wp { margin-top: 18px; }
.lh-wp .wp-bar { height: 4px; }
.lh-cta.with-wp { justify-content: space-between; margin-top: 8px; }
.lh-cta.with-wp > span:last-child { display: inline-flex; align-items: center; gap: 6px; }

/* Pregame odds in the log-a-game footer, above Cancel and Save. */
.game-modal-foot { flex-wrap: wrap; }
.lg-odds { flex: 1 0 100%; }
.lg-odds:empty { display: none; }
.lg-odds-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-family: var(--ui); font-weight: 700; font-size: 12.5px; color: var(--ink2); }
.lg-odds-side { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.lg-odds-side > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-odds-side.b { justify-content: flex-end; }
.lg-odds-side b { flex: none; font-family: var(--disp); font-weight: 800; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.lg-odds-side.a b { color: var(--blue); }
.lg-odds-side.b b { color: var(--gold-deep); }
:root[data-theme="dark"] .lg-odds-side.b b { color: var(--gold); }

/* Matchup predictor on the Stats tab. */
.mp-card { padding: 14px 16px; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-family: var(--ui); font-weight: 700; font-size: 13.5px; cursor: pointer; touch-action: manipulation; }
.mp-chip b { font-weight: 800; font-size: 11.5px; letter-spacing: 0.04em; }
.mp-chip.a { background: var(--blue); border-color: var(--blue); color: #fff; }
.mp-chip.b { background: var(--gold); border-color: var(--gold); color: var(--on-gold-deep); }
.mp-clear { display: flex; justify-content: flex-end; margin-top: 10px; }
.mp-clear .link { color: var(--blue); font-weight: 700; font-size: 13px; cursor: pointer; }
.mp-empty { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.mp-odds { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 14px; }
.mp-side { display: flex; flex-direction: column; min-width: 0; padding: 11px 13px; border-radius: var(--r-md); }
.mp-side.a { background: var(--blue-tint); }
.mp-side.b { background: var(--gold-tint); text-align: right; }
.mp-pct { font-family: var(--disp); font-weight: 800; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.mp-side.a .mp-pct { color: var(--blue); }
.mp-side.b .mp-pct { color: var(--gold-deep); }
:root[data-theme="dark"] .mp-side.b .mp-pct { color: var(--gold); }
.mp-lab { margin-top: 5px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink3); }
.mp-names { margin-top: 2px; font-size: 13px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.mp-card .wp-bar { margin-top: 10px; }
.mp-factors { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.mp-factor-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; color: var(--text); }
.mp-lean { flex: none; font-variant-numeric: tabular-nums; color: var(--ink3); }
.mp-lean.a { color: var(--blue); }
.mp-lean.b { color: var(--gold-deep); }
:root[data-theme="dark"] .mp-lean.b { color: var(--gold); }
/* A lean toward A grows left from the middle, toward B right, the same sides
   the two teams sit on above. */
.mp-diverge { position: relative; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--track); }
.mp-diverge::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--ink3); }
.mp-diverge i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.mp-diverge i.a { right: 50%; background: var(--blue); }
.mp-diverge i.b { left: 50%; background: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .wp-bar i { transition: none; }
  .live-pulse, .lsb-pts.bump, .live-mini.enter { animation: none; }
  .lq-btn, .live-hero { transition: none; }
}

/* ───────────────────── hiding sections and cards ─────────────────────
   prefs.js adds a quiet x to each header and hides by class, so a repaint is
   hidden again before it paints. The x sits outside the header's own layout
   (absolute on a section label), so a header with nothing hidden reads exactly
   as it did, with the x beside it. */
.pl-hide-sec, .pl-hide-card { display: none !important; }
.section-label.has-hx { position: relative; padding-right: 26px; }
.hide-x { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ink3); opacity: 0.62; cursor: pointer; flex: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hide-x:hover, .hide-x:focus-visible { opacity: 1; background: var(--track); outline: none; }
.section-label > .hide-x { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); }
.sec-head.has-hx { position: relative; padding-right: 30px; }
.sec-head > .hide-x { position: absolute; right: -6px; top: -3px; }
.sec-row > .hide-x { margin-left: auto; margin-right: -4px; }
.sec-row > .hide-x + .sec-chev { margin-left: 2px; }
/* The x on a tile's eyebrow, a stat-group row, a mover and an award result. */
.eyebrow.has-hx, [data-card-head].has-hx { position: relative; padding-right: 26px; }
.eyebrow > .hide-x { position: absolute; right: -9px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; }
[data-card-head] > .hide-x { position: absolute; right: -8px; top: 50%; transform: translateY(-50%); }
.grp-row > .hide-x { margin-left: 4px; margin-right: -6px; }
.grp-row > .hide-x + .sec-chev { margin-left: 2px; }
/* A mover is one row with its chip at the right end, so its x takes the top
   right corner over a slightly taller card instead of a place in the row. */
.mover.has-hx { position: relative; padding-top: 20px; }
.mover > .hide-x { position: absolute; top: 0; right: 0; width: 26px; height: 26px; }
.dark-block .hide-x { color: rgba(255, 255, 255, 0.7); }
.dark-block .hide-x:hover, .dark-block .hide-x:focus-visible { background: rgba(255, 255, 255, 0.12); }
/* A long press asks to hide the card, so the browser's own long-press menu and
   text selection stay out of the way on these. */
[data-card-id] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* ───────────────────── settings ───────────────────── */
.prof-gear { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); color: #fff; margin-left: auto; }
.prof-gear:hover { background: rgba(255, 255, 255, 0.2); }
.set-hero { background: linear-gradient(160deg, var(--header-top), var(--ink)); color: #fff; border-radius: 0 0 26px 26px; padding: 18px 20px 22px; }
.set-hero h1 { font-family: var(--disp); font-weight: 800; font-size: 34px; line-height: 1; margin-top: 12px; }
.li .v.on { color: var(--up); }
.li-accent { flex-wrap: wrap; gap: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); position: relative; flex: none; -webkit-tap-highlight-color: transparent; }
.swatch.on::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--sw); }
/* The gold companion that comes with the accent, as a small dot on its edge. */
.swatch::before { content: ""; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--sw2); box-shadow: 0 0 0 2px var(--surface); }
.swatch:focus-visible { outline: 2px solid var(--text); outline-offset: 5px; }
.hid-row .hid-where { color: var(--ink3); font-weight: 600; }
.hid-add { color: var(--blue); font-weight: 800; font-size: 13.5px; padding: 4px 2px 4px 12px; }
.hid-none { color: var(--ink3); font-weight: 600; font-size: 13.5px; padding: 14px 16px; }
.hid-all { color: var(--blue); font-size: 12px; cursor: pointer; font-weight: 800; letter-spacing: 0.02em; text-transform: none; }

/* ───────────────────── the app's own dialog ─────────────────────
   appDialog in app.js: a centered card on a dimmed page, the way an iOS alert
   reads, in place of every browser and platform dialog. Up to three buttons:
   side by side for two, stacked for three. The accent colors the buttons, a
   destructive one is red, and the cancel is the bold one. No backdrop blur: a
   blurred layer stutters while it animates (web-sheets.md). */
.modal-overlay.dlg-overlay { align-items: center; justify-content: center; padding: 24px; background: rgba(10, 12, 16, 0.42); animation: fade 0.16s ease; }
.dlg { width: min(290px, 100%); background: var(--surface); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28); overflow: hidden; animation: dlgIn 0.2s cubic-bezier(.2,.8,.3,1); color: var(--text); }
@keyframes dlgIn { from { transform: scale(1.08); opacity: 0; } to { transform: none; opacity: 1; } }
:root[data-theme="dark"] .dlg { background: #232831; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6); }
:root[data-theme="dark"] .modal-overlay.dlg-overlay { background: rgba(0, 0, 0, 0.55); }
.dlg-body { padding: 20px 18px 18px; text-align: center; }
.dlg-t { font-family: var(--ui); font-weight: 800; font-size: 16.5px; line-height: 1.3; overflow-wrap: anywhere; }
.dlg-m { font-family: var(--ui); font-weight: 500; font-size: 13.5px; line-height: 1.45; color: var(--ink2); margin-top: 6px; }
.dlg-in { display: block; width: 100%; margin-top: 14px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 10px; font-family: var(--ui); font-size: 16px; font-weight: 600; }
.dlg-in:focus { outline: none; border-color: var(--blue); }
.dlg-btns { display: flex; border-top: 1px solid var(--line); }
.dlg-btns.stack { flex-direction: column; }
.dlg-b { flex: 1 1 0; min-height: 46px; padding: 0 10px; font-family: var(--ui); font-weight: 600; font-size: 16px; color: var(--blue); background: none; -webkit-tap-highlight-color: transparent; }
.dlg-btns:not(.stack) .dlg-b + .dlg-b { border-left: 1px solid var(--line); }
.dlg-btns.stack .dlg-b + .dlg-b { border-top: 1px solid var(--line); }
.dlg-b.cancel { font-weight: 800; }
.dlg-b.destructive { color: var(--down); font-weight: 700; }
.dlg-b:hover { background: var(--track); }
.dlg-b:active { background: var(--line); }
.dlg-b:focus-visible { outline: none; background: var(--blue-tint); }
:root[data-theme="dark"] .dlg-btns, :root[data-theme="dark"] .dlg-b + .dlg-b { border-color: #343a45; }

/* A month for pickDate. */
.dlg-date { width: min(330px, 100%); }
.cal { margin-top: 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-m { font-family: var(--ui); font-weight: 800; font-size: 14.5px; }
.cal-nav { width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--blue); }
.cal-nav:disabled { color: var(--ink3); opacity: 0.4; }
.cal-nav:not(:disabled):hover { background: var(--track); }
.cal-w, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-w { margin-top: 6px; }
.cal-w span { font-family: var(--ui); font-weight: 700; font-size: 11px; color: var(--ink3); padding: 4px 0; }
.cal-d { height: 36px; border-radius: 50%; font-family: var(--ui); font-weight: 600; font-size: 14.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.cal-d:not(:disabled):hover { background: var(--track); }
.cal-d.on { background: var(--blue); color: #fff; font-weight: 800; }
.cal-d:disabled { color: var(--ink3); opacity: 0.45; }

/* A choice from a list (pickFrom), and a field that opens one. */
.pick-list { margin-top: 10px; display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; }
.pick-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 6px; border-top: 1px solid var(--line); font-family: var(--ui); font-weight: 600; font-size: 15.5px; color: var(--text); text-align: left; -webkit-tap-highlight-color: transparent; }
.pick-opt:first-child { border-top: 0; }
.pick-opt.on { color: var(--blue); font-weight: 800; }
.pick-opt:hover, .pick-opt:focus-visible { background: var(--track); outline: none; }
.pick-tick { font-weight: 800; }
.pick-field { text-align: left; font-family: var(--ui); font-weight: 600; cursor: pointer; }

/* The back swipe in standalone mode (app.js, "The edge swipe"). The surfaces a
   swipe starts on leave the browser only the vertical axis, so a drag from the
   left edge keeps arriving as touchmove and the app can claim it. :where keeps
   these at zero specificity, so a control's own touch-action (a drag grip's
   none, a button's manipulation) still wins. */
:where(html.standalone) :where(.main, .modal-overlay, .modal-overlay > .modal, .modal-overlay.full > .modal > *, .dlg, .navmenu, .navmenu-panel, .vzoom, .vlight) { touch-action: pan-y pinch-zoom; }
