/* Club Cricket — design system (dark "watch sport" theme — "Broadcast Teal" brand).
   Palette direction: Midnight Navy canvas (near-black, blue-tinted) with a Broadcast Teal accent —
   the recognisable premium streaming look for watching live sport. See BRAND.md (source of truth).
   Teal = primary actions & positive states, red = LIVE only, amber = pilot/warmth.
   Structure, spacing (8px) and type (Inter) follow the brand guidelines.
   NOTE: class names, element IDs and the vars --line/--muted/--green/--red are
   relied on by the page JS — keep NAMES stable (change values only). The teal is the value of --green. */

:root {
  /* "Broadcast Teal" brand (dark-first): Midnight Navy canvas, Broadcast Teal accent. See BRAND.md. */
  --ink: #101B2B;        /* page canvas — Midnight Navy */
  --panel: #17273C;      /* cards / surfaces */
  --panel-2: #1E3047;    /* raised wells / mock fills */
  --line: #2A3A52;       /* hairline borders */
  --line-2: #374B64;     /* stronger border */
  --text: #F5F7FA;       /* primary text — Off White */
  --muted: #8A99AD;      /* secondary copy — Slate lifted for on-dark contrast */

  /* Accents */
  --green: #0F9D81;      --green-d: #0C8169;   --green-ink: #042018;   /* Broadcast Teal; ink = text on teal */
  --green-tint: rgba(15,157,129,.13);
  --green-line: rgba(15,157,129,.32);
  --red: #D32F2F;        --red-tint: rgba(211,47,47,.18);  --red-soft: #ff6b6b;   /* broadcast red (v2) — LIVE / TV badge / lost result; -soft = legible on dark */
  --amber: #f5b301;      --amber-tint: rgba(245,179,1,.14);  --amber-line: rgba(245,179,1,.32);
  /* 4th accent — cool indigo-cyan, reserved for BETA status (distinct from green LIVE / amber soon). */
  --cyan: #5b9dff;       --cyan-tint: rgba(91,157,255,.14);  --cyan-line: rgba(91,157,255,.34);

  --radius: 16px;          /* cards */
  --radius-btn: 11px;      /* buttons */
  --radius-lg: 20px;
  --max: 1160px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow: 0 16px 40px rgba(0,0,0,.4);
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* keep the attribute authoritative over .btn display */
html, body { margin: 0; }
body {
  font-family: var(--font-sans);
  color: var(--text); background: var(--ink); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---- Header ---- */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(14,17,22,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.brand .logo-img { height: 38px; width: auto; display: block; flex: none; }
.brand .wm { font-weight: 800; font-style: italic; letter-spacing: -.02em; font-size: 19px; text-transform: lowercase; }
.brand .wm .tv { color: var(--green); margin-left: 5px; }
footer .brand .logo-img { height: 30px; } footer .brand .wm { font-size: 17px; }
.nav .spacer { flex: 1; }
.nav a.link { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a.link:hover { color: var(--text); }

/* ---- Buttons (primary = green; secondary = dark panel) ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--text);
  padding: 11px 18px; border-radius: var(--radius-btn); font-weight: 700; font-size: 16px;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .05s; }
.btn:hover { border-color: #46546b; background: #1b212b; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--green-d); border-color: var(--green-d); }
.btn.lg { padding: 14px 24px; font-size: 16.5px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 3px solid var(--green-line); outline-offset: 2px; }

/* ---- Hero ---- */
.hero { padding: 72px 0 60px; background: radial-gradient(900px 420px at 50% -12%, var(--green-tint), transparent 70%); }
.hero .wrap { display: grid; grid-template-columns: 1.02fr .98fr; gap: 52px; align-items: center; }
.hero-copy { max-width: 560px; }
.hero h1 { font-size: clamp(32px, 5.1vw, 56px); line-height: 1.08; letter-spacing: -.025em; margin: 16px 0 18px; color: var(--text); font-weight: 800; }
.hero p.sub { font-size: clamp(17px, 2.1vw, 19px); color: var(--muted); margin: 0 0 26px; line-height: 1.5; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { margin-top: 16px; }

/* Kicker / badges */
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.kicker { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--green); background: var(--green-tint); border: 1px solid var(--green-line); border-radius: 999px; padding: 6px 13px; }
.pilot { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800;
  color: var(--amber); background: var(--amber-tint); border: 1px solid var(--amber-line); border-radius: 999px; padding: 6px 13px; }
.pilot .d { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }

/* ---- Product-stream mock (clearly labelled placeholder) ---- */
.shot { position: relative; }
.shot .frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line-2); background: linear-gradient(170deg, #2f7d4e, #1f5a39 60%, #184a2f); box-shadow: var(--shadow); }
.shot .frame::before { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(100deg, rgba(255,255,255,.05) 0 26px, transparent 26px 52px); }
.shot .live { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--red); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .08em; padding: 6px 11px; border-radius: 999px; }
.shot .live .d { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.shot .placeholder-tag { position: absolute; top: 14px; right: 14px; background: rgba(0,0,0,.55); color: #e9efe9;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 5px 10px; border-radius: 8px; }
.shot .pitch { position: absolute; left: 50%; top: 55%; transform: translateX(-50%); width: 18%; height: 42%;
  background: linear-gradient(#cdb891, #b89e73); border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.25); opacity: .9; }
.scorebug { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: stretch;
  background: rgba(8,12,10,.9); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; overflow: hidden;
  color: #fff; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
/* NB: `.club` is also the dashboard club-row card — reset its card styling here. */
.scorebug .club { display: flex; align-items: center; gap: 8px; padding: 9px 13px; font-weight: 800;
  background: transparent; border: 0; border-radius: 0; margin: 0; box-shadow: none; }
.scorebug .logo { width: 22px; height: 22px; border-radius: 5px; background: #fff; color: var(--green-d); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.scorebug .score { margin-left: auto; display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: var(--green); color: var(--green-ink); font-variant-numeric: tabular-nums; }
.scorebug .score b { font-size: 16px; }
.scorebug .ov { color: #073A2F; font-weight: 700; }
.shot figcaption { margin: 11px 2px 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.shot figcaption b { color: var(--text); }

/* ---- Sections ---- */
section { padding: 64px 0; border-top: 1px solid var(--line); }
section.plain { border-top: 0; }
section h2 { font-size: clamp(26px, 3.6vw, 36px); letter-spacing: -.02em; margin: 0 0 10px; text-align: center; color: var(--text); font-weight: 800; }
section .lead { color: var(--muted); text-align: center; max-width: 660px; margin: 0 auto 40px; font-size: 17px; line-height: 1.5; }
.eyebrow { display: block; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin-bottom: 10px; }

/* ---- Benefit cards ---- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.card .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--green-tint); border: 1px solid var(--green-line); display: grid; place-items: center; font-size: 24px; margin-bottom: 14px; }
.card h3 { margin: 0; font-size: 20px; letter-spacing: -.01em; color: var(--text); font-weight: 700; }
.card p { color: var(--muted); margin: 10px 0 0; font-size: 15.5px; line-height: 1.5; }
.card .prod { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--green); margin-top: 8px; }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; }
.card li { position: relative; padding: 5px 0 5px 24px; font-size: 14.5px; color: var(--muted); }
.card li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.card .tagrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }

/* Availability tags — always carry text, never colour alone */
.tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); white-space: nowrap; }
.tag.core, .tag.live { color: var(--green); background: var(--green-tint); border-color: var(--green-line); }
.tag.pilot { color: var(--amber); background: var(--amber-tint); border-color: var(--amber-line); }
.tag.addon { color: var(--muted); background: var(--panel-2); }
.tag.soon { color: var(--muted); background: var(--panel-2); border-style: dashed; }
/* BETA — carries its own text label "Beta"; the indigo hue is support, never the sole signal. */
.tag.beta { color: var(--cyan); background: var(--cyan-tint); border-color: var(--cyan-line); }

/* ---- Steps ---- */
.steps { counter-reset: s; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px 22px; position: relative; box-shadow: var(--shadow-sm); }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -14px; left: 20px; width: 30px; height: 30px;
  background: var(--green); color: var(--green-ink); border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 15px; box-shadow: var(--shadow-sm); }
.step h4 { margin: 10px 0 7px; font-size: 17px; color: var(--text); font-weight: 700; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* ---- Info split (hardware / cost transparency) ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.well { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.well h3 { margin: 0 0 12px; font-size: 18px; color: var(--text); font-weight: 700; }
.well ul { margin: 0; padding: 0; list-style: none; }
.well li { position: relative; padding: 7px 0 7px 26px; font-size: 15px; color: var(--text); border-top: 1px solid var(--line); }
.well li:first-child { border-top: 0; }
.well li::before { content: "✓"; position: absolute; left: 0; top: 7px; color: var(--green); font-weight: 800; }
.well .big { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }

/* ---- Demo placeholder ---- */
.demo { max-width: 760px; margin: 0 auto; }
.demo .frame { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px dashed var(--line-2); background: var(--panel-2); display: grid; place-items: center; text-align: center; padding: 20px; }
.demo .frame .play { width: 62px; height: 62px; border-radius: 50%; background: var(--green); color: var(--green-ink);
  display: grid; place-items: center; font-size: 24px; margin: 0 auto 14px; box-shadow: var(--shadow-sm); }
.demo .frame b { color: var(--text); font-size: 17px; } .demo .frame p { color: var(--muted); margin: 6px 0 0; font-size: 14px; }

/* ---- FAQ ---- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--text); font-size: 16px; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--muted); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* ---- Final CTA band ---- */
.cta-band { border-top: 1px solid var(--line); text-align: center;
  background: radial-gradient(800px 320px at 50% 0%, var(--green-tint), transparent 70%), var(--panel); }
.cta-band h2 { color: var(--text); }
.cta-band .lead { color: var(--muted); }
.cta-band .btn { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.cta-band .btn:hover { background: var(--green-d); border-color: var(--green-d); }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--muted); font-size: 13.5px; background: var(--ink); }
footer .wrap { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---- Panels (login / dashboard) ---- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.panel.narrow { max-width: 460px; margin: 56px auto; }
label { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); margin: 16px 0 6px; }
input, select { width: 100%; padding: 12px 14px; background: #0c1016; border: 1px solid var(--line-2); border-radius: var(--radius-btn); color: var(--text); font-size: 16px; }
input::placeholder { color: #6b7686; }
input:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-tint); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }
.muted { color: var(--muted); }
.note { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.ok { color: var(--green); } .err { color: var(--red); }
.hidden { display: none !important; }

/* ---- Checklist ---- */
.check { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; }
.check .box { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-2); display: grid; place-items: center; flex: none; font-size: 13px; }
.check.done .box { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.check .body { flex: 1; } .check .body b { font-size: 15px; } .check .body p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }

/* ---- Club row (dashboard) ---- */
.club { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--panel); box-shadow: var(--shadow-sm); }
.club .meta { flex: 1; } .club .meta b { font-size: 16px; color: var(--text); } .club .meta span { color: var(--muted); font-size: 13px; }
.club-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.club.accented { border-left: 3px solid var(--row-accent, var(--green)); }
.club-crest { width: 40px; height: 40px; border-radius: 9px; flex: none; border: 1px solid var(--line); background: var(--panel-2) center / 70% no-repeat; }
.club-crest.has { background-size: contain; }
.club-crest.tile { background-color: #fff; background-size: 76%; }

/* Admin sections (dashboard) */
.admin-head { margin-bottom: 20px; }
.admin-head h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 4px; }
.segnav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.segnav .seg { padding: 10px 15px; font-weight: 700; font-size: 14.5px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.segnav .seg.on { color: var(--text); border-bottom-color: var(--green); }
.segnav .seg:hover { color: var(--text); }
.club-today { margin-top: 6px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.club-today.live { color: var(--red); font-weight: 700; }
.club-today .d { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.people-club { margin-bottom: 16px; }
.people-club h3 { font-size: 16px; margin: 0 0 12px; color: var(--text); }

/* Team rows in the setup form */
.teamrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.teamrow input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--green); }
.teamrow .t-name { flex: 2; min-width: 120px; }
.teamrow .t-grade { flex: 1.4; min-width: 90px; }
.teamrow .t-mode { flex: 0 0 108px; }
.teamrow .t-phq { flex: 0 0 110px; }
.teamrow .t-del { flex: 0 0 auto; padding: 9px 12px; }
.teamrow .t-scorelbl { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.teamrow .t-scorelbl input[type=checkbox] { width: 16px; height: 16px; }
.teamrow input, .teamrow select { margin: 0; }
/* "Found teams" review — a scannable list (tick · badge · name · grade/next-match), edit behind ✎ */
.tmrow { display: flex; align-items: flex-start; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px; background: var(--panel-2); }
.tmrow.off { opacity: .5; }
.tmrow > input[type=checkbox] { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--green); cursor: pointer; }
.tmrow .tm-main { flex: 1; min-width: 0; }
.tmrow .tm-name { display: block; font-weight: 750; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.tmrow .tm-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.tmrow .tm-badge { flex: 0 0 auto; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; margin-top: 2px; white-space: nowrap; }
.tmrow .tm-badge.sen { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.tmrow .tm-badge.jun { background: var(--line-2); color: var(--muted); }
.tmrow .tm-edit { flex: 0 0 auto; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 13px; margin-top: 1px; }
.tmrow .tm-edit:hover { color: var(--text); border-color: var(--line-2); }
.tmrow .tm-edit-fields { display: flex; gap: 8px; flex-wrap: wrap; }
.tmrow .tm-edit-fields input, .tmrow .tm-edit-fields select { margin: 0; }
.tmrow .tm-edit-fields .tm-iname { flex: 2; min-width: 150px; }
.tmrow .tm-edit-fields .tm-igrade { flex: 1; min-width: 110px; }
.tmrow .tm-edit-fields .tm-imode { flex: 0 0 108px; }
.tm-bulkbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tm-bulk-actions { display: flex; gap: 8px; margin-top: 16px; }
.tm-bulk { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: 13px; }
.tm-bulk:hover { color: var(--text); border-color: var(--line-2); }
.team-group-hd { font-size: 13px; font-weight: 800; color: var(--text); margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
.team-group-hd:first-child { margin-top: 4px; }
.team-group-hd.muted { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.team-group-hd span { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 800; }
.team-group-hd.muted span { background: var(--line-2); color: var(--muted); }
/* Team-scoped roles (captain / manager) */
.role-badge { display: inline-block; text-transform: capitalize; font-size: 11px; font-weight: 800; letter-spacing: .02em;
  color: var(--green); background: color-mix(in srgb, var(--green) 16%, transparent); border-radius: 999px; padding: 1px 8px; }
.roles-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.roles-head { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.rolelist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.roleitem { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px;
  background: var(--panel-2, var(--ink)); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.roleitem .rl-del { padding: 4px 10px; }
.roleform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.roleform .rf-team { flex: 0 0 150px; }
.roleform .rf-email { flex: 1; min-width: 160px; }
.roleform .rf-role { flex: 0 0 120px; }
.roleform input, .roleform select { margin: 0; }
/* Per-team admin (streams) */
.streams-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.stream-cap { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--green); font-size: 12px; margin-left: 8px; }
input, select, textarea { min-width: 0; max-width: 100%; }   /* let fields shrink inside flex rows — never overflow the panel */
/* Checkboxes/radios must NOT inherit the global input width:100% (that stretches the tick box full-width). */
input[type="checkbox"], input[type="radio"] { width: auto; max-width: none; flex: none; padding: 0; }
.teamadmin { background: var(--panel-2, var(--ink)); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.ta-head { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.ta-head .ta-name { flex: 1 1 150px; min-width: 0; margin: 0; font-weight: 700; font-size: 15px; }
.ta-meta { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.ta-badge { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.ta-badge.is-senior { background: var(--green-tint); color: var(--green); }
.ta-badge.is-junior { background: var(--amber-tint); color: var(--amber); }
.ta-chip { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-actions { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
/* Labeled field rows inside a team card */
.ta-field { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; }
.ta-flabel { flex: 0 0 92px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 9px; }
.ta-fctl { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ta-fctl input { flex: 1 1 150px; min-width: 0; margin: 0; }
.ta-fctl .ta-msg, .ta-fctl .ta-phqmsg, .ta-fctl .ta-ownermsg, .ta-fctl .ta-admmsg { font-size: 12px; flex-basis: 100%; }
.ta-admins .pchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 11px; font-size: 12.5px; }
.ta-admdel { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.ta-admdel:hover { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.ta-adminrow { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; margin-top: 2px; align-items: center; }
.ta-adminrow .ta-admemail { flex: 1 1 160px; min-width: 0; margin: 0; }
.ta-adminrow .ta-admrole { flex: 0 0 auto; }
.ta-connected { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: var(--green); }
.ta-warn { flex-basis: 100%; margin: 0 0 2px; font-size: 12px; color: var(--amber); }
.ta-streamctl { flex-basis: 100%; gap: 8px; align-items: center; flex-wrap: wrap; }
.ta-streamctl:not([hidden]) { display: flex; }
.ta-streamctl .ta-ytkey { flex: 1 1 150px; min-width: 0; margin: 0; }
.ta-seg { display: inline-flex; gap: 4px; }
/* Division admins */
.divadmins { display: flex; flex-direction: column; gap: 10px; }
.divrow { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; align-items: center; background: var(--panel-2, var(--ink)); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.divlabel { font-weight: 800; font-size: 14px; }
.divlist { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.divlist .pchip { display: inline-flex; align-items: center; gap: 6px; }
.divlist .da-del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; padding: 0 2px; }

/* ===== Club card: three surfaces (player page · broadcast · settings) ===== */
.club-card { flex-wrap: wrap; align-items: flex-start; }
.club-card > .club-crest { margin-top: 2px; }
.club-surfaces { flex-basis: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.surface { display: flex; flex-direction: column; gap: 4px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel-2, var(--ink)); text-decoration: none; transition: border-color .15s, transform .15s; }
a.surface:hover { border-color: var(--row-accent, var(--green)); transform: translateY(-1px); }
.surface-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; }
.surface-v { font-size: 15.5px; font-weight: 800; color: var(--text); }
.surface-sub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.surface-cog:hover .surface-v { color: var(--green); }
.bcast-teams { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.bcast-team { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.bcast-team b { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.tbtn { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 8px; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line); color: var(--text); background: var(--panel); }
.tbtn.primary { background: var(--green); color: var(--ink); border-color: transparent; }
.tbtn:hover { border-color: var(--green); }
@media (max-width: 680px) { .club-surfaces { grid-template-columns: 1fr; } }

/* ===== Settings tabs ===== */
.settab { margin-bottom: 18px; }
.stream-cap-row { margin-bottom: 10px; }
.brand-preview { --bp-accent: #ffc01e; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); min-height: 44px; }
.bp-dot { width: 26px; height: 26px; border-radius: 7px; flex: none; background: rgba(255,255,255,.18) center / 70% no-repeat; border: 1px solid rgba(255,255,255,.25); }
.bp-dot.has { background-color: #fff; background-size: contain; }
.bp-name { flex: 1; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-pill { font-size: 10px; font-weight: 900; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; }
.addteam { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.addteam-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.addteam-row #atName { flex: 2 1 140px; min-width: 0; margin: 0; }
.addteam-row #atGrade { flex: 1 1 100px; min-width: 0; margin: 0; }
.addteam-row #atMode { flex: 1 1 108px; min-width: 0; margin: 0; }
.addteam-row #atPhq { flex: 1.5 1 150px; min-width: 0; margin: 0; }
/* Settings → Teams: stack every row to a single column on narrow screens so nothing overflows. */
@media (max-width: 640px) {
  .ta-field { flex-direction: column; gap: 5px; }
  .ta-flabel { flex: none; padding-top: 0; }
  .ta-fctl { width: 100%; }
  .ta-fctl input, .ta-streamctl .ta-ytkey { flex-basis: 100%; }
  .ta-head .ta-name { flex-basis: 100%; }
  .ta-actions { margin-left: 0; }
  .addteam-row { flex-direction: column; align-items: stretch; }
  .addteam-row input, .addteam-row select, .addteam-row > .btn { width: 100%; }
}
/* Add-team: one-click PlayHQ discovery + per-team PlayHQ id */
.addteam-discover { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.disc-grp { margin: 10px 0; }
.disc-grp-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.disc-row { display: flex; align-items: center; gap: 9px; padding: 8px 11px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.disc-row:last-child { margin-bottom: 0; }
.disc-row input { flex: none; }
.disc-row .disc-nm { flex: 1; min-width: 0; font-weight: 700; font-size: 13.5px; overflow-wrap: anywhere; }
.disc-row .disc-meta { flex: none; margin-left: auto; font-size: 12px; }
.disc-row.is-added { opacity: .55; cursor: default; }
.yt-chip { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.yt-chip.yt-own { color: var(--green, #1cc47d); border-color: color-mix(in srgb, var(--green, #1cc47d) 40%, var(--line)); }
.yt-chip.yt-default { color: var(--accent, #0F9D81); border-color: color-mix(in srgb, var(--accent, #0F9D81) 40%, var(--line)); }
.yt-chip.yt-none { color: var(--muted); border-style: dashed; }
.ytmode-opt { display: flex; align-items: flex-start; gap: 8px; padding: 9px 11px; margin-top: 6px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 13.5px; }
.ytmode-opt input { flex: none; margin-top: 2px; }
.ytmode-opt:has(input:checked) { border-color: var(--accent, #0F9D81); background: color-mix(in srgb, var(--accent, #0F9D81) 7%, transparent); }
/* ---- team readiness: list pill ---- */
.rdy { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .02em; border-radius: 999px; padding: 2px 9px; border: 1px solid transparent; white-space: nowrap; }
.rdy .rdot { width: 7px; height: 7px; border-radius: 50%; }
.rdy-ok { background: var(--green-tint); color: #5fe0c3; border-color: var(--green-line); } .rdy-ok .rdot { background: var(--green); }
.rdy-part { background: rgba(245,179,1,.13); color: #ffd874; border-color: rgba(245,179,1,.34); } .rdy-part .rdot { background: var(--amber); }
.rdy-todo { background: rgba(138,153,173,.12); color: var(--muted); border-color: var(--line-2); } .rdy-todo .rdot { background: var(--muted); }
/* ---- all-clubs readiness roll-up (on each club card) ---- */
.club-rollup { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.rollmeter { display: flex; gap: 3px; height: 6px; width: 140px; max-width: 48vw; border-radius: 999px; overflow: hidden; background: var(--panel-2); }
.rollmeter i { flex: 1; background: var(--line-2); }
.rollmeter i.ok { background: var(--green); } .rollmeter i.warn { background: var(--amber); }
.rollup-lbl { font-size: 11.5px; font-weight: 600; color: var(--muted); }
/* ===== Admin console shell (left rail + main pane) ===== */
.authwall { min-height: 82vh; display: grid; place-items: center; padding: 20px; }
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.rail { background: linear-gradient(180deg, var(--panel), var(--ink)); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 13px; }
.railbrand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; text-decoration: none; color: var(--text); }
.railbrand .logo-img { width: 30px; height: 30px; flex: none; }
.railbrand .wm { font-weight: 800; font-size: 15px; letter-spacing: -.01em; line-height: 1.1; }
.railbrand .wm small { display: block; font-weight: 600; font-size: 10px; color: var(--muted); letter-spacing: .13em; text-transform: uppercase; margin-top: 2px; }
.navlbl { font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 6px; }
.railnav { display: flex; flex-direction: column; gap: 2px; }
.railnav button { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: none; border: 0;
  color: var(--muted); padding: 9px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.railnav button:hover { background: var(--panel-2); color: var(--text); }
.railnav button.on { background: var(--green-tint); color: var(--text); box-shadow: inset 0 0 0 1px var(--green-line); }
.railnav .ic { width: 17px; height: 17px; flex: none; }
.railnav .ct { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--panel-2); color: var(--muted); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.railspring { flex: 1 1 auto; }
.railuser { display: flex; flex-direction: column; gap: 3px; padding: 11px 10px 2px; border-top: 1px solid var(--line); font-size: 12.5px; }
.railuser #who { color: var(--muted); overflow-wrap: anywhere; }
.main { min-width: 0; padding: 30px 36px 80px; max-width: 1080px; }
.viewhead { margin-bottom: 22px; }
.viewhead h1 { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.viewhead .muted { font-size: 13.5px; margin: 4px 0 0; }
/* club workspace header */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.crumb-link { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; padding: 0; cursor: pointer; }
.crumb-link:hover { color: var(--green); }
.crumb-sep { opacity: .5; } .crumb-here { color: var(--text); font-weight: 600; }
.ws-head { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.ws-crest { width: 52px; height: 52px; border-radius: 13px; flex: none; background: var(--panel-2) center/cover no-repeat; border: 1px solid var(--line-2);
  display: grid; place-items: center; font-weight: 800; font-size: 17px; color: var(--green); }
.ws-crest.has { border-color: var(--line); } .ws-crest.tile { background-color: #fff; background-size: 70%; }
.ws-head-main { flex: 1; min-width: 0; } .ws-head-main h1 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.ws-head-main .muted { margin: 2px 0 0; font-size: 13px; }
.ws-ready { align-self: center; }
.wstabs { display: flex; border-bottom: 1px solid var(--line); gap: 4px; margin: 0 0 22px; background: none; padding: 0; flex-wrap: wrap; }
.wstabs .seg { background: none; border: 0; border-radius: 0; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 10px 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.wstabs .seg:hover { color: var(--text); }
.wstabs .seg.on { color: var(--text); border-bottom-color: var(--green); background: none; }
/* Teams roster: each row is a clean SUMMARY that navigates to the guided "Set up ↗" detail — the
   per-field config (PlayHQ, key, admins, scoring, alias, team page) now lives on the team detail, so
   hide it in the list. */
#set-teams .teamadmin > .ta-field { display: none; }
.teamadmin { transition: border-color .12s; }
.teamadmin .ta-name { background: transparent; border: 1px solid transparent; font-weight: 700; font-size: 15px; padding: 6px 6px; border-radius: 8px; }
.teamadmin .ta-name:hover { border-color: var(--line); }
.teamadmin .ta-name:focus { background: var(--panel-2); border-color: var(--green-line); }
/* People — who-can-do-what legend */
.role-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.rl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.rl-card .rl-k { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: 6px; }
.rl-card p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 760px) { .role-legend { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 14px; gap: 6px; }
  .railbrand { padding: 4px 6px; }
  .navlbl, .railspring, .railuser { display: none; }
  .railnav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .railnav button { width: auto; }
  .main { padding: 20px 16px 60px; }
}
/* ---- team setup detail ---- */
.td-top { margin-bottom: 18px; }
.td-back { font-size: 13px; margin-bottom: 14px; }
.td-head { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.td-name { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.td-state { display: flex; align-items: center; gap: 13px; }
.td-big { font-size: 15px; font-weight: 800; }
.td-state.ok .td-big { color: #5fe0c3; }
.td-ring { --pct: 0; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--amber) calc(var(--pct) * 1%), var(--line-2) 0); position: relative; }
.td-state.ok .td-ring { background: conic-gradient(var(--green) calc(var(--pct) * 1%), var(--line-2) 0); }
.td-ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--ink); }
.td-ring span { position: relative; z-index: 1; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.td-golive { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.td-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 0 2px; margin: 4px 0 14px; border-top: 1px solid var(--line); }
.td-actions .td-alias { flex: 0 1 220px; min-width: 150px; margin: 0; }
.td-actions .td-spring { flex: 1 1 auto; }
.td-actions .td-del { color: var(--red); border-color: rgba(211,47,47,.45); }
.td-actions .td-del:hover { background: var(--red-tint, rgba(211,47,47,.14)); }
.td-amsg { font-size: 12px; }
.td-steps.panel { margin-top: 0; }
.td-steps { margin-top: 8px; }
.rstep { display: grid; grid-template-columns: 30px 1fr auto; gap: 14px; align-items: center; padding: 15px 18px; border-top: 1px solid var(--line); }
.rstep:first-child { border-top: 0; }
.rmk { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; flex: none; }
.rstep.done .rmk { background: var(--green); color: var(--green-ink); }
.rstep.note .rmk { background: var(--panel-2); color: var(--green); border: 1px solid var(--green-line); }
.rstep.todo .rmk { background: rgba(245,179,1,.14); color: var(--amber); border: 1px solid rgba(245,179,1,.34); }
.rstep .rt { font-weight: 700; font-size: 14px; }
.rstep .rd { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.rstep.done .rd, .rstep.note .rd { }
.rside { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; max-width: 340px; }
.rside .rin { flex: 1 1 130px; min-width: 110px; margin: 0; }
.rside .rrole { margin: 0; }
.rseg { display: inline-flex; gap: 6px; }
.rdone { font-size: 12.5px; font-weight: 700; color: #5fe0c3; }
.rmsg { flex-basis: 100%; text-align: right; font-size: 12px; color: var(--red); }
.hint-note { font-size: 12.5px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; margin-top: 14px; line-height: 1.5; }
.disc-retry { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); padding: 8px 11px; margin-bottom: 10px; border: 1px solid color-mix(in srgb, var(--accent, #d9a400) 40%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--accent, #d9a400) 8%, transparent); }
.cp-pick { display: block; width: 100%; text-align: left; margin: 4px 0; font-weight: 700; }
.strm-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.strm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.strm-main b { font-size: 14px; overflow-wrap: anywhere; }
.strm-who { font-size: 12.5px; color: var(--muted); }
.strm-act { flex: none; display: flex; align-items: center; gap: 10px; }
.st-chip { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.st-chip.live { color: #fff; background: var(--red); border-color: var(--red); }
.disc-msg { font-size: 12px; margin-left: 6px; }
/* Logo field: URL input + upload button */
.logo-field { display: flex; gap: 8px; align-items: center; }
.logo-field #eLogo { flex: 1; margin: 0; }
.logo-field .logo-upbtn { flex: 0 0 auto; margin: 0; cursor: pointer; white-space: nowrap; }
/* YouTube connect banner (Settings → Teams) */
.yt-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 11px; margin-bottom: 12px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--red) 8%, var(--panel-2, var(--ink))); }
.yt-banner.on { background: color-mix(in srgb, var(--green) 10%, var(--panel-2, var(--ink))); border-color: color-mix(in srgb, var(--green) 32%, var(--line)); }
.yt-banner .yt-ic { width: 34px; height: 24px; flex: none; border-radius: 6px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 13px; }
.yt-banner.on .yt-ic { background: var(--green); color: var(--ink); }
.yt-banner .yt-main { flex: 1; min-width: 0; } .yt-banner .yt-main b { display: block; font-size: 14px; color: var(--text); }
.yt-banner .yt-main span { font-size: 12.5px; color: var(--muted); }
.yt-banner.default .yt-ic { background: var(--accent, #0F9D81); color: #fff; }
.yt-banner.default.on { background: color-mix(in srgb, var(--accent, #0F9D81) 10%, var(--panel-2, var(--ink))); border-color: color-mix(in srgb, var(--accent, #0F9D81) 32%, var(--line)); }
.ta-autokey { white-space: nowrap; }
.divlist .da-del:hover { color: var(--red); }
.divform { grid-column: 2; display: flex; gap: 8px; }
.divform .da-email { flex: 1; min-width: 150px; margin: 0; }
.btn.appoff { opacity: .5; cursor: default; }
.btn.appoff:hover { background: var(--panel); border-color: var(--line-2); }
.su-fallback summary { color: var(--muted); font-size: 13px; cursor: pointer; }
.su-fallback summary:hover { color: var(--text); }
.linklike { background: none; border: 0; color: var(--green); cursor: pointer; font: inherit; font-size: 13px; padding: 0; text-decoration: underline; }
/* Google sign-in */
.btn.glogin { background: #fff; color: #1f2430; border: 1px solid #dadce0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; }
.btn.glogin:hover { background: #f6f7f9; border-color: #c9ccd1; }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .07em; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ===== Native scorer & broadcaster — bright, outdoor-readable operator UI (matches the match-day app).
   Light theme scoped to these pages; club colour drives the accents (Beecroft = royal blue). ===== */
.scorer, .bc {
  --panel: #ffffff; --panel-2: #f2f4fd; --line: #e4e7f6; --line-2: #d8ddf2;
  --ink: #15163a; --text: #15163a; --muted: #6b6f90;
  --red: #E23B3B; --sixgreen: #22C55E; --gold: #FFC01E;
  --club-primary: #2f3a4a; --club-accent: #2f3a4a; --club-ink: #ffffff;   /* neutral until the club theme loads (no blue flash) */
  max-width: 620px; margin: 0 auto; min-height: 100vh;
  background: #eceffa; color: #15163a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.scorer { display: flex; flex-direction: column; }
/* Broadcast is wider than the scorer — the 16:9 stage needs the room on desktop (⛶ still goes fullscreen). */
.bc { max-width: 1040px; background: color-mix(in srgb, var(--club-primary, var(--club-accent)) 6%, #eceffa); }
.scorer .btn, .bc .btn { background: #fff; color: #15163a; border: 1px solid #e4e7f6; border-radius: 13px; font-weight: 800; }
.scorer .btn:active, .bc .btn:active { transform: scale(.97); }
.scorer .btn.primary, .bc .btn.primary { background: linear-gradient(135deg, color-mix(in srgb, var(--club-accent) 76%, #fff), var(--club-accent)); color: #fff; border-color: transparent; box-shadow: 0 6px 18px color-mix(in srgb, var(--club-accent) 30%, transparent); }
.scorer input, .scorer select, .bc input, .bc select { background: #f2f4fd; border: 1px solid #e4e7f6; color: #15163a; border-radius: 11px; }

/* topbar — club-coloured gradient */
.sc-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 11px; padding: 11px 15px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--club-primary, var(--club-accent)) 72%, #fff), var(--club-primary, var(--club-accent))); color: #fff; }
.sc-crest { width: 36px; height: 36px; border-radius: 50%; background: #fff center/cover no-repeat; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.6); }
.sc-crest.tile { background-size: 72%; background-repeat: no-repeat; }
.sc-id { display: flex; flex-direction: column; line-height: 1.15; }
.sc-id b { font-size: 16px; color: #fff; } .sc-id span { font-size: 11px; color: rgba(255,255,255,.82); text-transform: uppercase; letter-spacing: .06em; }
.sc-dot { width: 11px; height: 11px; border-radius: 50%; margin-left: auto; background: rgba(255,255,255,.5); }
.sc-dot.ok { background: #22C55E; } .sc-dot.warn { background: #FFC01E; } .sc-dot.bad { background: #E23B3B; }
.sc-screen { padding: 16px 14px 44px; }
.sc-card { background: #fff; border: 1px solid #e4e7f6; border-radius: 16px; padding: 18px; box-shadow: 0 1px 2px rgba(20,16,80,.05), 0 6px 20px rgba(20,16,80,.06); }
.sc-card h2 { margin: 0 0 12px; font-size: 20px; color: #15163a; }
.sc-toss { display: flex; gap: 10px; } .toss-btn { flex: 1; }
.scorer .toss-btn.on { background: var(--club-accent); color: #fff; border-color: transparent; }
.sc-rules-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: 14px; }
.sc-rules-sum { font-size: 12.5px; margin: 6px 0 0; color: #6b6f90; }
.btn.sm { padding: 6px 11px; font-size: 13px; } .btn.lg { padding: 15px 18px; font-size: 17px; font-weight: 800; }

/* scoreboard card */
.sc-board { background: linear-gradient(180deg, #fff, #f6f7fd); border: 1px solid #e4e7f6; border-radius: 18px; padding: 16px 18px; margin: 4px 0 14px; box-shadow: 0 6px 20px rgba(20,16,80,.06); }
.sc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sc-side { font-weight: 800; font-size: 15px; color: #15163a; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-inn { font-size: 11px; color: #6b6f90; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sc-fh { background: var(--gold); color: #15163a; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; }
.sc-rw { font-variant-numeric: tabular-nums; font-size: 46px; font-weight: 900; line-height: 1; letter-spacing: -.02em; color: var(--club-accent); display: flex; align-items: baseline; gap: 2px; }
.sc-rw .sc-ov { font-size: 18px; color: #6b6f90; font-weight: 800; margin-left: 10px; letter-spacing: 0; }
.sc-bonus { font-size: 11px; color: #6b6f90; font-weight: 700; }
.sc-need { margin-top: 8px; font-size: 14px; color: #15163a; } .sc-need b { color: var(--club-accent); }
.sc-bats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.sc-bat, .sc-bowl { background: #f2f4fd; border: 1px solid #e4e7f6; border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; color: #15163a; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.sc-bat span, .sc-bowl span { color: #6b6f90; font-weight: 800; font-variant-numeric: tabular-nums; }
.sc-bat.on { background: linear-gradient(135deg, color-mix(in srgb, var(--club-accent) 80%, #fff), var(--club-accent)); color: #fff; border-color: transparent; }
.sc-bat.on span { color: rgba(255,255,255,.85); }
.sc-bowl { margin-top: 8px; grid-column: 1 / -1; }
.sc-bat.empty, .sc-bowl.empty { color: var(--club-accent); border-style: dashed; justify-content: center; background: #fff; }
.sc-over { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; min-height: 30px; align-items: center; }
.ov-chip { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #eceffa; color: #15163a; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ov-chip.four { background: var(--gold); color: #15163a; } .ov-chip.six { background: var(--sixgreen); color: #fff; }
.ov-chip.w { background: var(--red); color: #fff; } .ov-chip.x { background: #cdd0e6; color: #15163a; }

/* run / extras pad */
.sc-pad { display: flex; flex-direction: column; gap: 10px; }
.pad-runs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pad-extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad { border: 2px solid #e4e7f6; background: #fff; color: #15163a; border-radius: 15px; min-height: 56px; font-size: 18px; font-weight: 800; cursor: pointer; }
.pad:active { transform: scale(.97); }
.pad.run { aspect-ratio: 1; font-size: 24px; font-weight: 900; }
.pad.run[data-run="4"] { background: linear-gradient(135deg, #ffd45e, #FFC01E); border-color: transparent; color: #15163a; }
.pad.run[data-run="6"] { background: linear-gradient(135deg, #38db7f, #22C55E); border-color: transparent; color: #fff; }
.pad.x { font-size: 14px; font-weight: 800; }
.pad.w { background: linear-gradient(135deg, #ef5a5a, #E23B3B); border-color: transparent; color: #fff; font-size: 15px; }
.pad.fh { color: #b7791f; border-color: var(--gold); font-size: 14px; }
.sc-row2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.sc-row2 .btn { padding: 13px 0; font-size: 13px; }

/* modals / pickers (light) */
.sc-modal { position: fixed; inset: 0; z-index: 120; background: rgba(21,22,58,.5); display: grid; place-items: end center; backdrop-filter: blur(3px); }
.sc-modal-card { background: #fff; border-top-left-radius: 20px; border-top-right-radius: 20px; width: 100%; max-width: 620px; max-height: 88vh; overflow: auto; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(20,16,80,.2); color: #15163a; }
.sc-modal-card h3 { margin: 0 0 12px; font-size: 18px; }
.sc-modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.pick-opts { display: grid; gap: 8px; } .pick-opts .btn { width: 100%; }
.pick-runs, .pick-sugg { display: flex; flex-wrap: wrap; gap: 8px; } .pick-runs .pr { min-width: 56px; min-height: 52px; font-size: 20px; font-weight: 900; }
#pickInput { width: 100%; }
.sc-rules-grid { display: grid; gap: 8px; }
.sc-rf { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.sc-rf input[type=number] { width: 90px; margin: 0; }
.sc-rf-bool { cursor: pointer; } .sc-rf-bool input { width: 18px; height: 18px; }

/* ============ Native broadcaster ============ */
.bc-live { margin-left: auto; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .04em; background: var(--red); padding: 3px 10px; border-radius: 999px; }
.bc-stage-wrap { background: #000; border-radius: 14px; overflow: hidden; margin: 0 0 14px; aspect-ratio: 16 / 9; box-shadow: 0 8px 24px rgba(20,16,80,.12); }
#stage { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.bc-controls .row { display: flex; gap: 12px; }
.bc-btns { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.bc-btns .btn.lg { flex: 1; min-width: 140px; }
.bc-status { margin: 12px 0 0; font-size: 13px; color: #6b6f90; }
.bc-yt { margin: 6px 0 0; font-size: 12.5px; color: #15163a; font-weight: 700; }

/* Edit-club modal */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px); }
.modal-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; width: 100%; max-width: 540px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-x { background: none; border: 0; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal-x:hover { color: var(--text); }
.modal-body { padding: 6px 20px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); }
input[type=color] { width: 100%; height: 42px; padding: 4px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-btn); cursor: pointer; }
.pill { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }

/* Research panel (internal) */
.research { border-color: var(--amber-line); background: var(--amber-tint); }
.research .tag { color: var(--amber); background: var(--panel); border-color: var(--amber-line); }

/* ---- Mobile-first refinements ---- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero-copy { max-width: none; }
  .shot { order: -1; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav .wrap { height: 58px; gap: 10px; }
  .nav a.link { display: none; }
  .hero { padding: 40px 0 44px; }
  section { padding: 46px 0; }
  .panel { padding: 20px; }
  .panel.narrow { margin: 28px auto; }
  .btn { padding: 13px 18px; }
  .btn.lg { width: 100%; }
  .hero .cta { flex-direction: column; }
  .hero .cta .btn { width: 100%; }
  .row > * { flex-basis: 100%; }
  .scorebug { font-size: 11px; }
}
/* ===== Club microsites (beecroft/balmainsouths subdomains) =====
   Same design system as the platform; each club is themed via --club-* vars set by club.js. */
:root { --club-accent: var(--green); --club-primary: var(--ink); --club-ink: #fff; --club-tint: rgba(15,157,129,.14); }   /* neutral pre-theme fallback; club.js overrides from the club's own brand */

.clubbrand { gap: 11px; }
.clubbrand .crest { height: 34px; width: auto; display: block; }
.clubbrand .crest.tile { background: #fff; border-radius: 7px; padding: 3px; height: 36px; }
.clubname { font-weight: 800; letter-spacing: -.02em; font-size: 16.5px; color: var(--text); line-height: 1.05; }
.clubname small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.poweredby { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.poweredby img { height: 24px; width: auto; display: block; }
.poweredby:hover { color: var(--text); }

/* Club-accented primary button */
.btn.clubcta.primary { background: var(--club-accent); border-color: var(--club-accent); color: var(--club-ink); }
.btn.clubcta.primary:hover { filter: brightness(.93); background: var(--club-accent); border-color: var(--club-accent); }

.eyebrow.club { color: var(--club-accent); }

/* Fixtures list */
.fixtures { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.fixture { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.fixture .fx-date { font-weight: 800; color: var(--club-accent); font-size: 13px; width: 66px; flex: none; text-align: center; line-height: 1.1; }
.fixture .fx-main { flex: 1; } .fixture .fx-main b { font-size: 15px; color: var(--text); } .fixture .fx-main span { display: block; color: var(--muted); font-size: 13px; }

/* ===== Player/Parents app shell (Watch · Games · Highlights · Team) ===== */
/* ============================================================================
   Immersive club-colour theme for the club microsite. The whole canvas IS the
   club's primary colour (set by club.js on <body>); surfaces are translucent
   veils of the readable text colour over it, so it reads as the club's own
   branded app whether the brand is dark or light. The values below are a dark
   FALLBACK for first paint before the JS theme lands. Scoped to .appbody.
   ============================================================================ */
body.appbody {
  --ink: #101B2B;
  --panel: rgba(255,255,255,.07);
  --panel-2: rgba(255,255,255,.12);
  --line: rgba(255,255,255,.16);
  --line-2: rgba(255,255,255,.26);
  --text: #ffffff;
  --muted: rgba(255,255,255,.66);
  --radius: 18px; --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.25);
  --shadow: 0 16px 40px rgba(0,0,0,.35);
  background: var(--ink); color: var(--text);
}
/* Upcoming/idle band sits on the club canvas; text follows the theme (works light & dark). */
body.appbody .lh-band { background: var(--club-band, transparent); color: var(--text); }
body.appbody .cd-cell { background: var(--panel-2); border-color: var(--line); }
body.appbody .cd-cell b { color: var(--text); }
body.appbody .cd-cell small { color: var(--muted); }
/* Reel tiles are dark video thumbnails regardless of brand. */
body.appbody .reel.ph { background: linear-gradient(168deg, color-mix(in srgb, var(--club-accent) 42%, #14110d), #14110d); }
body.appbody .reel.ph span { color: #fff; }
body.appbody .reel.ph small { color: #d9d1c5; }
body.appbody .reel .reel-play { background: rgba(255,255,255,.22); }
/* Scorecard sheet: solid club canvas (not a translucent veil) over the modal scrim. */
body.appbody .sc-sheet { background: var(--ink); }

/* ---- Live-now section: featured game + concurrent live cards ---- */
.livenow-head { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 10px; }
.livenow-head .screen-h { margin: 0; }

/* ===== Team-centric additions: value line · value props · teams directory · about ===== */
.valuestrip { max-width: var(--max); margin: 0 auto; padding: 9px 24px; font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; }
.al-chip { text-decoration: none; }

/* Why-watch value props (dual: watch live + live scores) */
.vp-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 4px 0 8px; }
.vp { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; }
.vp-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; background: var(--club-tint); color: var(--club-accent); }
.vp-tx b { display: block; font-size: 15px; color: var(--text); font-weight: 800; }
.vp-tx p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* Teams directory (club page) — reuses the .fixture row */
.teamdir { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.td-row { text-decoration: none; cursor: pointer; }
.td-row:hover { border-color: var(--club-accent); }
.td-row .fx-main b { font-size: 15.5px; }
.td-next { font-size: 13px; font-weight: 700; color: var(--club-accent); white-space: nowrap; }
.td-next.td-muted { color: var(--muted); font-weight: 600; }

/* About / follow this team (and club-about in the directory) */
.aboutcard, .dir-about { max-width: 760px; margin: 0 auto; display: flex; gap: 16px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.dir-about { margin-bottom: 22px; }
.about-crest { flex: none; width: 60px; height: 60px; border-radius: 14px; background: center / contain no-repeat; filter: drop-shadow(0 4px 12px rgba(0,0,0,.35)); }
.about-crest.tile { background-color: #fff; background-size: 78%; padding: 7px; }
.about-main { min-width: 0; }
.about-main > b { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.about-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.about-sub a { color: var(--club-accent); text-decoration: none; font-weight: 700; }
.about-main p { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 10px 0 0; }
.about-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.about-cta .plink { margin: 0; color: var(--club-accent); }
.about-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
@media (max-width: 560px) { .vp-grid { grid-template-columns: 1fr; } .aboutcard, .dir-about { flex-direction: column; gap: 12px; } }
.live-others { display: grid; gap: 8px; margin-top: 12px; }
.livecard { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; color: var(--text); }
.livecard:hover { border-color: var(--club-accent); }
.livecard .lc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.5s infinite; flex: none; }
.livecard .lc-name { font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.livecard .lc-score { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; display: inline-flex; align-items: baseline; gap: 5px; }
.livecard .lc-score .lc-ov { color: var(--muted); font-size: 12px; font-weight: 600; }
.livecard .lc-go { color: var(--club-accent); font-weight: 800; font-size: 13px; flex: none; }

/* "Full scorecard" button inside the live scorebar */
.sb-scorecard { display: block; width: 100%; margin-top: 12px; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--club-accent); font: inherit;
  font-weight: 800; font-size: 13.5px; cursor: pointer; }
.sb-scorecard:hover { border-color: var(--club-accent); }

/* ---- Results / Upcoming sections on the main screen ---- */
.sec { margin-top: 26px; }
.sec .screen-h { margin-bottom: 10px; }

body.appbody { padding-bottom: 74px; }                 /* room for the fixed tab bar */
.appbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ink) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 2px solid var(--club-accent, var(--green)); }
.appbar .wrap { display: flex; align-items: center; gap: 11px; height: 58px; }
.appbar .crest { height: 30px; width: auto; display: block; flex: none; }
.appbar .crest.tile { background: #fff; border-radius: 7px; padding: 3px; height: 34px; }
.club-id { display: flex; flex-direction: column; line-height: 1.1; }
.club-id b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.club-id small { font-size: 11.5px; color: var(--muted); }
.club-id small a, .part-of { color: var(--club-accent); text-decoration: none; font-weight: 700; }
.club-id small a:hover, .part-of:hover { text-decoration: underline; }
.appbar .poweredby img { height: 22px; }
.app-foot { text-align: center; padding: 22px 16px 12px; }
.app-foot .poweredby { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.app-foot .poweredby img { height: 20px; display: block; }
.app-foot .poweredby:hover { color: var(--text); }

/* Admin bar — signed-in club admins/officials only (operator entry points stay on the club's subdomain) */
.adminbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px max(16px, env(safe-area-inset-left)); background: var(--panel); border-bottom: 1px solid var(--line); }
.adminbar-k { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.adminbar-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); text-decoration: none; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.adminbar-btn.primary { background: var(--club-accent); border-color: var(--club-accent); color: var(--club-ink); }
.adminbar-btn:hover { border-color: var(--club-accent); }
.adminbar-signin { margin-left: auto; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 13px; }
.adminbar-signin:hover { color: var(--text); text-decoration: underline; }
/* Posture chip — platform-frame treatment (own readable background, NOT club-tinted), so the privacy
   posture stays legible + distinct on any tenant. Private carries child-safety weight. */
.adminbar-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; border: 1px solid transparent; }
.adminbar-chip.private { background: rgba(211,47,47,.12); color: #c0362f; border-color: rgba(211,47,47,.32); }
.adminbar-chip.public { background: rgba(15,157,129,.13); color: #0b7a63; border-color: rgba(15,157,129,.32); }
/* Operator "back to team page" link injected on /broadcast + /score when arrived via ?return=. */
.op-return { position: fixed; top: 10px; left: 10px; z-index: 50; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: rgba(16,27,43,.9); color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; border: 1px solid rgba(255,255,255,.18); }
.op-return:hover { background: rgba(16,27,43,1); }
/* Read-only readiness nudge for a captain/manager (no Manage) on a not-live-ready team. */
.cap-ready { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px max(16px, env(safe-area-inset-left)); background: rgba(245,179,1,.10); border-bottom: 1px solid rgba(245,179,1,.3); }
.cap-ready-main { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 180px; }
.cap-ready-main b { font-size: 13px; color: var(--text); }
.cap-ready-main span { font-size: 12px; color: var(--muted); }
.cap-ready-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; background: var(--club-accent); color: var(--club-ink); text-decoration: none; font-weight: 700; font-size: 13px; }
.adminbar-spring { flex: 1; }

/* Admin match-day launcher — two roles (broadcast / score), the thing the admin came to do. */
.matchday { display: flex; flex-direction: column; gap: 10px; padding: 14px max(16px, env(safe-area-inset-left)); background: var(--panel-2); border-bottom: 1px solid var(--line); }
.matchday .md-k { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.md-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 13px; }
.md-top { display: flex; align-items: center; gap: 11px; }
.md-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.md-ic.cam { background: var(--club-primary); color: var(--club-onprimary); }
.md-ic.score { background: var(--club-tint); color: var(--club-accent); }
.md-ic svg { width: 19px; height: 19px; }
.md-main { flex: 1; min-width: 0; line-height: 1.25; }
.md-main b { font-size: 14.5px; font-weight: 800; color: var(--text); }
.md-main span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.md-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.md-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); text-decoration: none; cursor: pointer; }
.md-btn.go { background: var(--club-primary); color: var(--club-onprimary); border-color: var(--club-primary); }
.md-btn.live { background: var(--red); color: #fff; border-color: var(--red); }
.md-note { font-size: 12.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.md-note b { color: var(--text); } .md-note .md-sub { color: var(--muted); }
.md-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.md-foot b { color: var(--text); }
.md-setup { background: none; border: 0; color: var(--club-accent); font: inherit; font-weight: 700; font-size: 11.5px; cursor: pointer; padding: 0; }

.app { min-height: 62vh; }
.screen { padding-bottom: 22px; }
.screen-h { text-align: left; font-size: 22px; margin: 2px 0 6px; color: var(--text); }
.lead-s { color: var(--muted); font-size: 15px; margin: 0 0 20px; max-width: 60ch; }
.note-s { color: var(--muted); font-size: 13.5px; margin-top: 14px; }
#s-results .wrap, #s-highlights .wrap, #s-team .wrap { padding-top: 24px; }

/* Watch — stream (full-bleed on mobile, framed on desktop) */
.stream { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-bottom: 1px solid var(--line); }
.stream iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream.offline { display: grid; place-items: center; background: var(--club-hero, linear-gradient(170deg,var(--panel),var(--ink))); border: 0; }
.off-card { text-align: center; padding: 24px; }
.off-card .off-ic { font-size: 34px; }
.off-card .off-crest { display: block; width: 86px; height: 86px; margin: 0 auto 6px; border-radius: 18px; background: center / contain no-repeat; filter: drop-shadow(0 6px 18px rgba(0,0,0,.45)); }
.off-card .off-crest.tile { background-color: #fff; background-size: 76%; padding: 8px; }
.off-card b { display: block; margin-top: 8px; font-size: 20px; letter-spacing: -.01em; color: var(--text); }
.off-card p { color: var(--muted); font-size: 14px; margin-top: 4px; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }   /* live dot — used by .lh-badge, .al-chip, .cd-soon */

/* Highlights — reel grid */
.reelgrid { display: grid; grid-template-columns: repeat(auto-fill,minmax(148px,1fr)); gap: 12px; }
.reel { position: relative; aspect-ratio: 9/13; border-radius: 12px; border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; overflow: hidden; }
.reel.ph { background: linear-gradient(170deg,var(--panel-2),var(--ink)); }
.reel .reel-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-62%); width: 40px; height: 40px;
  border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 14px; }
.reel span { font-weight: 700; font-size: 13.5px; color: var(--text); }
.reel small { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; border: 0; }
.reel .reel-cap { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(0,0,0,.62); border-radius: 7px; padding: 4px 8px; }
.reel .reel-cap b { font-size: 12px; color: #fff; display: block; line-height: 1.1; }
.reel .reel-cap small { font-size: 10.5px; color: #cfd6df; }
.pchips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { font-size: 13px; font-weight: 600; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }

/* Team hint */
.teamhint { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px; box-shadow: var(--shadow-sm); }
.th-crest img { height: 56px; width: auto; display: block; }
.th-crest img.tile { background: #fff; border-radius: 10px; padding: 5px; }
.teamhint b { font-size: 16px; color: var(--text); }

/* Bottom tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: color-mix(in srgb, var(--ink) 95%, transparent);
  backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabbar .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px;
  border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 700; }
.tabbar .tab svg { width: 22px; height: 22px; fill: currentColor; }
.tabbar .tab.on { color: var(--club-accent); }
.tabbar .tab:active { background: var(--panel); }

@media (min-width: 720px) {
  .stream { max-width: var(--max); margin: 4px auto 0; border-radius: 14px; border: 1px solid var(--line-2); overflow: hidden; }
  .tabbar { left: 50%; right: auto; transform: translateX(-50%); bottom: 18px; border: 1px solid var(--line-2);
    border-radius: 16px; gap: 4px; padding: 7px; box-shadow: var(--shadow); }
  .tabbar .tab { flex: 0 0 auto; flex-direction: row; gap: 8px; padding: 9px 16px; font-size: 13.5px; }
  .tabbar .tab.on { background: var(--club-tint); }
  .tabbar .tab svg { width: 18px; height: 18px; }
}

@media (hover: none) { .btn { -webkit-tap-highlight-color: transparent; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ============ Home page — focused three-pillar landing ============ */
.home .wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.lp-hero { position: relative; padding: 68px 0 44px; overflow: hidden; }
.lp-hero::before { content: ''; position: absolute; inset: -30% 0 auto; height: 620px;
  background: radial-gradient(60% 70% at 70% 8%, var(--green-tint), transparent 70%); pointer-events: none; }
.lp-hero-in { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.lp-hero-copy h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 900; line-height: 1.02; letter-spacing: -.025em; margin: 16px 0 0; text-wrap: balance; }
.lp-hero-copy h1 .hl { color: var(--green); }
.lp-hero-copy .sub { font-size: clamp(17px, 2.1vw, 20px); color: var(--muted); line-height: 1.55; margin: 18px 0 0; max-width: 34ch; }
.lp-hero-copy .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 0; }
.lp-hero-copy .note { color: var(--muted); font-size: 13px; margin: 14px 0 0; }

/* hero stream mock */
.lp-shot { margin: 0; }
.lp-shot .frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line-2); background: linear-gradient(160deg, #13331f 0%, #0c1a12 60%, #0a0f0c 100%); box-shadow: var(--shadow); }
.lp-shot .pitch { position: absolute; left: 50%; bottom: 14%; width: 52%; height: 60%; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, rgba(15,157,129,.22), transparent 70%); border-radius: 50%; }
.lp-shot .pitch::after { content: ''; position: absolute; left: 50%; top: 10%; width: 9%; height: 82%; transform: translateX(-50%);
  background: linear-gradient(180deg, #caa36a, #a9824a); border-radius: 3px; opacity: .55; }
.lp-shot .live { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--red); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .05em; padding: 5px 10px; border-radius: 999px; }
.lp-shot .live .d { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: lp-pulse 1.5s infinite; }
.lp-shot .scorebug { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(10,13,18,.82); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.lp-shot .scorebug .club { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; }
.lp-shot .scorebug .logo { width: 22px; height: 22px; border-radius: 6px; background: var(--green); color: var(--green-ink); display: grid; place-items: center; font-weight: 900; font-size: 13px; }
.lp-shot .scorebug .score { font-variant-numeric: tabular-nums; display: inline-flex; align-items: baseline; gap: 8px; }
.lp-shot .scorebug .score b { font-size: 19px; font-weight: 800; }
.lp-shot .scorebug .score .ov { color: var(--green); font-size: 13px; font-weight: 700; }
@keyframes lp-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* pillars */
.lp-pillars { padding: 44px 0 56px; }
.lp-pillars h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.02em; margin: 8px 0 0; text-wrap: balance; }
.lp-pillars .lead { color: var(--muted); font-size: 17px; margin: 10px 0 28px; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pillar { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; min-height: 230px; }
.pillar.is-live { border-color: var(--green-line); background: linear-gradient(180deg, var(--green-tint), var(--panel) 42%); box-shadow: 0 0 0 1px var(--green-line), var(--shadow); }
.pillar.is-beta { border-color: var(--cyan-line); background: linear-gradient(180deg, var(--cyan-tint), var(--panel) 48%); }
.pillar.is-soon { opacity: .9; }
.is-beta .pic { background: var(--cyan-tint); } .is-beta .pic svg { color: var(--cyan); }
.pill-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pic { width: 46px; height: 46px; border-radius: 12px; background: var(--panel-2); display: grid; place-items: center; }
.pic svg { width: 24px; height: 24px; }
.is-live .pic { background: var(--green-tint); } .is-live .pic svg { color: var(--green); }
.is-soon .pic svg { color: var(--text); }
.pillar h3 { font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.pillar p { color: var(--muted); line-height: 1.55; margin: 0 0 16px; font-size: 14.5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--amber-tint); color: var(--amber); border: 1px solid var(--amber-line); }
.chip.on { background: var(--green-tint); color: var(--green); border-color: var(--green-line); }
.chip.on .d { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: lp-pulse 1.5s infinite; }
.chip.beta { background: var(--cyan-tint); color: var(--cyan); border-color: var(--cyan-line); }
.chip.soon { background: var(--panel-2); color: var(--muted); border-color: var(--line-2); border-style: dashed; }
.plink { margin-top: auto; color: var(--green); font-weight: 800; font-size: 14.5px; text-decoration: none; }
.plink:hover { text-decoration: underline; }

/* ---- "Already streaming" proof strip (under the hero) ---- */
.lp-proof { padding: 26px 0 8px; }
.lp-proof .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; }
.lp-proof .pf-k { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lp-proof .pf-crests { display: flex; align-items: center; gap: 12px; }
.crestchip { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; }
.crestchip img { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; display: block; flex: none; }
.crestchip img.tile { background: #fff; padding: 3px; }
.crestchip:hover { color: var(--green); }
.lp-proof .pf-watch { margin-left: auto; color: var(--green); font-weight: 800; font-size: 14.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.lp-proof .pf-watch .d { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: lp-pulse 1.5s infinite; }
.lp-proof .pf-watch:hover { text-decoration: underline; }

/* ---- "How it works" section (reuses .steps/.step + .demo) ---- */
.lp-how { padding: 48px 0 56px; }
.lp-how .eyebrow { text-align: left; }
.lp-how h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.02em; margin: 6px 0 0; text-wrap: balance; }
.lp-how .lead { color: var(--muted); font-size: 17px; text-align: left; margin: 10px 0 30px; max-width: 60ch; }
.lp-how .steps { margin-bottom: 30px; }
.lp-how .demo-cap { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0 0; }

@media (max-width: 1040px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .lp-hero-in { grid-template-columns: 1fr; gap: 30px; }
  .lp-hero { padding: 40px 0 28px; }
  .pillars { grid-template-columns: 1fr; }
}

/* ============================================================================
   Player/Parents "watch" redesign — stateful live hero, across-the-club rail,
   rich scorebar, follow/share, reel player. Dark, club-themed, live-streaming-first.
   ============================================================================ */

/* Share button in the appbar (re-entry is sharing the link, not a Follow bookmark) */
.sharebtn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--club-accent); background: transparent; color: var(--club-accent);
  font: inherit; font-weight: 800; font-size: 13.5px; cursor: pointer; transition: background .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.sharebtn svg { width: 15px; height: 15px; fill: currentColor; }
.sharebtn:hover { background: var(--club-tint); }

/* ---- Live hero shell ---- */
.livehero { position: relative; }

/* LIVE: immersive stage */
.lh-stage { position: relative; background: #000; }
.lh-stage .stream { max-width: none; margin: 0; border: 0; border-radius: 0; aspect-ratio: 16/9; }
.lh-stage .stream video, .lh-stage .stream iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; border: 0; }
.lh-overlay { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: 12px 14px; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.45), transparent); }
.lh-badge { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; background: var(--red); color: #fff;
  font-weight: 900; font-size: 12px; letter-spacing: .06em; padding: 6px 11px; border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.lh-badge .d { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.5s infinite; }
.lh-ovbtns { display: flex; gap: 8px; pointer-events: auto; }
.lh-ic { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); }
.lh-ic svg { width: 19px; height: 19px; fill: currentColor; }
.lh-ic:hover { background: rgba(0,0,0,.72); }

/* ---- Rich scorebar (under the live stage) ---- */
.scorebar { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 14px 0; box-shadow: var(--shadow-sm); }
.sb-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sb-teams { display: flex; flex-direction: column; min-width: 0; }
.sb-bat-team { font-weight: 800; font-size: 17px; color: var(--text); line-height: 1.1; }
.sb-vs { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.sb-rw { display: inline-flex; align-items: baseline; gap: 2px; font-variant-numeric: tabular-nums; flex: none; }
.sb-rw b { font-size: 42px; font-weight: 900; letter-spacing: -.03em; color: var(--text); line-height: .92; }
.sb-wk { font-size: 20px; font-weight: 800; color: var(--muted); }
.sb-ov { font-size: 13px; font-weight: 700; color: var(--club-accent); margin-left: 9px; }
.sb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.sb-inn { text-transform: uppercase; letter-spacing: .04em; }
.sb-rr { color: var(--text); }
.sb-need b { color: var(--club-accent); }
.sb-fh { background: var(--amber); color: var(--green-ink); border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.sb-bats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sb-bat { display: flex; align-items: center; gap: 7px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: 14px; }
.sb-bat.on { border-color: var(--club-accent); background: var(--club-tint); }
.sb-bat .str { color: var(--club-accent); font-size: 12px; }
.sb-bat .nm { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-bat .rb { margin-left: auto; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.sb-bat .rb small { color: var(--muted); font-weight: 600; }
.sb-over { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sb-over-k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 4px; }
.sb-chip { min-width: 26px; height: 26px; padding: 0 6px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sb-chip.four { background: var(--amber); color: var(--green-ink); border-color: transparent; }
.sb-chip.six { background: var(--club-accent); color: var(--club-ink); border-color: transparent; }
.sb-chip.w { background: var(--red); color: #fff; border-color: transparent; }
.sb-chip.x { background: transparent; color: var(--muted); border-style: dashed; }

/* Also-live strip (other club games live right now) */
.alsolive { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px; }
.alsolive .al-k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.al-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.al-chip .d { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.5s infinite; }
.al-chip:hover { border-color: var(--club-accent); }

/* ---- Branded band (UPCOMING / IDLE) ---- */
.lh-band { position: relative; overflow: hidden; text-align: center; padding: 40px 22px 34px;
  background: var(--club-band, linear-gradient(160deg, var(--panel-2), var(--ink))); }
.lh-band::before { content: ""; position: absolute; left: 50%; top: -20%; width: 120%; height: 90%; transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 0%, var(--club-glow, transparent), transparent 70%); pointer-events: none; }
.lh-band > * { position: relative; }
.lh-crest { display: block; width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 18px; background: center / contain no-repeat;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,.5)); }
.lh-crest.tile { background-color: #fff; background-size: 74%; padding: 8px; }
.lh-eyebrow { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--club-accent); margin-bottom: 10px; }
.lh-title { font-size: clamp(26px, 6.4vw, 40px); font-weight: 900; letter-spacing: -.025em; line-height: 1.05; margin: 0; color: var(--text); text-wrap: balance; }
.lh-title .lh-vs { color: var(--muted); font-weight: 700; font-size: .7em; margin: 0 6px; }
.lh-when { color: var(--muted); font-size: 15px; margin: 10px 0 0; }
.lh-count { display: inline-flex; gap: 8px; margin: 20px 0 6px; }
.cd-cell { display: flex; flex-direction: column; align-items: center; background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; min-width: 56px; }
.cd-cell b { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1; letter-spacing: -.01em; }
.cd-cell small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
.cd-soon { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--club-accent); font-size: 15px; }
.cd-soon .d { width: 9px; height: 9px; border-radius: 50%; background: var(--club-accent); animation: pulse 1.4s infinite; }
.lh-cta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.lh-cta .btn { min-width: 128px; }
.lh-note { color: var(--muted); font-size: 12.5px; margin: 16px 0 0; }

/* Idle: latest highlight preview inside the band */
.lh-idle .lh-latest { position: relative; max-width: 420px; margin: 20px auto 0; border-radius: 14px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); aspect-ratio: 16/10; box-shadow: var(--shadow); }
.lh-latest video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.lh-latest-cap { position: absolute; left: 0; right: 0; bottom: 0; text-align: left; padding: 24px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.lh-latest-cap span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--club-accent); }
.lh-latest-cap b { font-size: 16px; color: #fff; }
.lh-latest-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 54px; height: 54px; border-radius: 50%;
  background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; font-size: 20px; backdrop-filter: blur(3px); }

/* ---- "Across the club" rail ---- */
.onnow { margin: 22px 0 4px; }
.onnow-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.onnow-head .screen-h { margin: 0; }
.onnow-sub { font-size: 12.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.teamrail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 10px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.teamrail::-webkit-scrollbar { height: 0; }
.tcard { scroll-snap-align: start; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 13px 15px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 13px; cursor: pointer; font: inherit; position: relative; transition: border-color .15s, transform .12s; }
.tcard:hover { transform: translateY(-1px); }
.tcard.active { border-color: var(--club-accent); box-shadow: 0 0 0 1px var(--club-accent); }
.tcard.live { border-color: var(--red); background: color-mix(in srgb, var(--red) 10%, var(--panel)); }
.tc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.tcard.live .tc-dot { background: var(--red); animation: pulse 1.5s infinite; }
.tc-name { font-size: 14.5px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard.live .tc-sub { color: var(--red); font-weight: 800; }

/* Highlights reel as a button (tap -> fullscreen) */
.reelgrid button.reel { font: inherit; text-align: left; cursor: pointer; }
.reel .reel-play { cursor: pointer; }

/* ---- Fullscreen reel / replay player ---- */
.reelmodal { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: grid; place-items: center; }
.reelmodal video { max-width: 100%; max-height: 100vh; background: #000; }
.rm-close, .rm-share { position: fixed; top: calc(12px + env(safe-area-inset-top)); z-index: 2; border: 0; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(4px); font: inherit; font-weight: 800; }
.rm-close { right: 14px; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; }
.rm-share { left: 14px; padding: 9px 16px; border-radius: 999px; font-size: 14px; }
.rm-close:hover, .rm-share:hover { background: rgba(255,255,255,.26); }
.rm-cap { position: fixed; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); text-align: center; color: #fff; pointer-events: none; }
.rm-cap b { display: block; font-size: 17px; } .rm-cap span { font-size: 13px; color: #cfd6df; }

/* Toast */
.cctv-toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(8px);
  background: var(--text); color: var(--ink); font-weight: 800; font-size: 14px; padding: 11px 18px; border-radius: 999px; z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: var(--shadow); max-width: 90vw; }
.cctv-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Desktop framing: constrain the live stage + band like the rest of the shell */
@media (min-width: 720px) {
  .lh-stage { max-width: var(--max); margin: 6px auto 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); }
  .lh-band { max-width: var(--max); margin: 6px auto 0; border-radius: 20px; border: 1px solid var(--line); padding: 56px 22px 48px; }
  .lh-band::before { border-radius: 20px; }
}
@media (max-width: 560px) {
  .sb-bats { grid-template-columns: 1fr; }
  .lh-cta .btn { flex: 1; min-width: 0; }
  .cd-cell { min-width: 50px; padding: 8px 9px; }
}

/* ===== Fixtures/results: results list + scorecard sheet (club microsite) ===== */
.sub-h { font-size: 15px; font-weight: 700; color: var(--text); margin: 6px 0 8px; }
.fixture[data-game] { cursor: pointer; }
.fixture .fx-arrow { color: var(--muted); font-size: 20px; align-self: center; padding-left: 4px; }
.res-tag { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; text-transform: uppercase;
  letter-spacing: .03em; align-self: center; white-space: nowrap; }
.res-tag.won { background: var(--club-tint); color: var(--club-accent); }
.res-tag.lost { background: var(--red-tint); color: var(--red-soft); }
.res-tag.tie { background: var(--panel-2); color: var(--muted); }

.scmodal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.6); }
.scmodal.hidden { display: none; }
.sc-sheet { position: relative; width: 100%; max-width: 560px; max-height: 86vh; overflow: auto;
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0; padding: 18px 16px 28px; box-shadow: var(--shadow); }
@media (min-width: 620px) { .scmodal { align-items: center; } .sc-sheet { border-radius: var(--radius); } }
.sc-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--ink); color: var(--text); font-size: 15px; cursor: pointer; }
.sc-top { margin: 0 40px 4px 0; }
.sc-title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.sc-title .sc-v { color: var(--muted); font-weight: 600; margin: 0 4px; }
.sc-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.sc-result { display: inline-block; margin-top: 11px; background: var(--club-tint); color: var(--club-accent);
  font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 999px; }
.sc-inns { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 6px; margin-top: 14px; }
.sc-inns-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sc-inns-no { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sc-inns-team { font-size: 16px; font-weight: 800; margin-top: 2px; }
.sc-inns-score { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1; }
.sc-inns-score b { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.sc-inns-score .sc-wk { font-size: 17px; font-weight: 800; color: var(--muted); }
.sc-inns-score small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.sc-tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 2px; }
.sc-tbl + .sc-tbl { margin-top: 14px; }
.sc-tbl th { text-align: right; color: var(--muted); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; padding: 7px 0; border-bottom: 1px solid var(--line); }
.sc-tbl th:first-child, .sc-tbl td:first-child { text-align: left; }
.sc-tbl th:not(:first-child), .sc-tbl td:not(:first-child) { width: 46px; }
.sc-tbl td { padding: 9px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; text-align: right; color: var(--muted); }
.sc-tbl tbody tr:last-child td { border-bottom: 0; }
.sc-tbl td.sc-nm { text-align: left; color: var(--text); font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-tbl td.sc-r { color: var(--text); }
.sc-tbl td.sc-r b { color: var(--club-accent); font-weight: 800; }
.sc-empty { color: var(--muted); font-size: 13.5px; padding: 8px 0; }
/* grabber handle on the mobile bottom sheet */
.sc-sheet::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 2px auto 14px; }
@media (min-width: 620px) { .sc-sheet::before { display: none; } }

/* =========================================================================
   PARENT-FIRST MATCH VIEWER (body.matchview) — dark broadcast hero + LIGHT content.
   The <body> tokens are the dark broadcast frame (header + hero). The content area
   (scorecard / teams / about) overrides to a light, high-contrast surface for outdoor
   readability; the club colour stays the accent. "Watch first, follow second."
   ========================================================================= */
/* Neutral/light DEFAULTS so the first paint is never the platform navy — club.js swaps in the club's
   colours once /api/club resolves, then adds .themed to fade the header in (no wrong-colour flash). */
body.matchview { padding-bottom: 0; background: #F4F6FB;
  --ink: #F4F6FB; --panel: #fff; --panel-2: #eef1f7; --line: #e5e9f1; --line-2: #d6dced; --text: #161922; --muted: #5b6475;
  --club-primary: #e9edf4; --club-onprimary: #334155; --club-accent: #334155; --club-ink: #fff; --club-tint: rgba(51,65,85,.08); }
.matchview .appbar { opacity: 0; }
body.matchview.themed .appbar { opacity: 1; transition: opacity .2s ease; }

/* Club-first header — a clean WHITE bar; the club crest + name own it and the navy is saved for the
   hero (matches the mockup; avoids the navy-on-navy that made the old header feel heavy). */
.matchview .appbar { background: var(--panel); border-bottom: 1px solid var(--line); backdrop-filter: none; }
.matchview .appbar .crest { height: 38px; width: 38px; border-radius: 11px; object-fit: cover; }
.matchview .appbar .crest.tile { height: 38px; width: 38px; padding: 3px; background: #fff; }
.matchview .club-id b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.matchview .club-id small { font-size: 11.5px; color: var(--muted); opacity: 1; }
/* Share pill uses the default accent-outline treatment (see .sharebtn) on the white header. */

/* ONE floating card holds the whole match (phone-first): crest header → broadcast hero → live score →
   scorecard → trust-mark footer, as a single commercial-grade surface. The `.matchshell` is the centered,
   rounded, shadowed card; its overflow clip rounds the hero's corners; the backdrop sits behind it. */
body.matchview { background: #e7ebf1; }
.matchshell { width: 100%; max-width: 512px; margin: 22px auto; background: var(--panel);
  border-radius: 20px; overflow: hidden; border: 1px solid rgba(16,24,40,.07);
  box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 22px 50px -16px rgba(16,24,40,.28); }
.matchview .appbar { position: static; background: var(--panel); backdrop-filter: none; }
body.matchview .app { display: block; background: var(--panel); min-height: 0; }
body.matchview .content > .sec { max-width: none; }
/* Full-bleed on phones — an edge-to-edge app surface reads more premium than a hairline-margined strip;
   the lift + rounded corners return from ~540px up. */
@media (max-width: 539px) {
  .matchshell { margin: 0; border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; min-height: 100vh; }
}

/* ---- The match hero (dark broadcast surface) ---- */
.matchhero { position: relative; background: var(--ink); }
.mh-stage { position: relative; background: #000; }
.mh-stage .stream { max-width: none; margin: 0; border: 0; border-radius: 0; aspect-ratio: 16/9; }
.mh-stage .stream video, .mh-stage .stream iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; border: 0; }
.mh-overlay { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: 12px 14px; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.45), transparent); }
.mh-badge { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; background: var(--red); color: #fff; font-weight: 900; font-size: 12px; letter-spacing: .06em; padding: 6px 11px; border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.mh-badge.done { background: var(--club-accent); color: var(--club-ink); }
.mh-badge .d { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.5s infinite; }
.mh-ovbtns { display: flex; gap: 8px; pointer-events: auto; }
.mh-ic { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); }
.mh-ic svg { width: 19px; height: 19px; fill: currentColor; }
.mh-scorewrap { padding-top: 14px; }
/* Broadcast lower-third scorebug on the live stream — so a muted autoplay / screenshot reads as a game. */
.mh-scorebug { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: stretch; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.4); font-variant-numeric: tabular-nums; pointer-events: none; }
.mh-scorebug[hidden] { display: none; }
.sbug-team { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; background: rgba(10,15,24,.82); backdrop-filter: blur(6px); padding: 9px 12px; color: #fff; }
.sbug-mini { width: 22px; height: 22px; border-radius: 6px; background: var(--club-accent); color: var(--club-ink); display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: none; }
.sbug-nm { min-width: 0; line-height: 1.2; }
.sbug-nm b { font-size: 13px; font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbug-nm span { font-size: 10.5px; opacity: .7; font-weight: 600; }
.sbug-score { display: flex; align-items: center; gap: 9px; background: var(--club-accent); color: var(--club-ink); padding: 9px 14px; }
.sbug-score b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.sbug-score span { font-size: 11px; font-weight: 700; opacity: .82; }
.mh-replaylink { padding: 16px 20px 0; text-align: center; }
.mh-result { text-align: center; padding: 26px 20px 30px; }
.mh-rtag { display: inline-block; margin: 14px 0 0; font-weight: 800; font-size: 15px; padding: 7px 16px; border-radius: 999px; background: var(--club-tint); color: var(--club-accent); }
.mh-rtag.lost { background: var(--red-tint); color: var(--red-soft); }

/* Band (upcoming / idle) — the club-brand moment over the dark frame. */
.mh-band { position: relative; overflow: hidden; text-align: center; padding: 40px 22px 34px; background: var(--club-band, linear-gradient(160deg, var(--panel-2), var(--ink))); }
.mh-band::before { content: ""; position: absolute; left: 50%; top: -20%; width: 120%; height: 90%; transform: translateX(-50%); background: radial-gradient(50% 60% at 50% 0%, var(--club-glow, transparent), transparent 70%); pointer-events: none; }
.mh-band > * { position: relative; }
.mh-crest { display: block; width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 18px; background: center / contain no-repeat; filter: drop-shadow(0 8px 22px rgba(0,0,0,.5)); }
.mh-crest.tile { background-color: #fff; background-size: 74%; padding: 8px; }
.mh-eyebrow { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--club-accent); margin-bottom: 10px; }
.mh-title { font-size: clamp(26px, 6.4vw, 40px); font-weight: 900; letter-spacing: -.025em; line-height: 1.05; margin: 0; color: var(--text); text-wrap: balance; }
.mh-title .mh-vs { color: var(--muted); font-weight: 700; font-size: .7em; margin: 0 6px; }
.mh-when { color: var(--muted); font-size: 15px; margin: 10px 0 0; }
.mh-count { display: flex; justify-content: center; gap: 8px; margin: 18px 0 0; }
.mh-cta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.mh-cta .btn { min-width: 128px; }
.mh-note { color: var(--muted); font-size: 12.5px; margin: 16px 0 0; }
/* Text ON the club-primary hero band uses on-primary (scoped so .mh-result on the light base stays dark). */
.mh-band { color: var(--club-onprimary); }
.mh-band .mh-eyebrow { color: var(--club-onprimary); opacity: .85; }
.mh-band .mh-title { color: var(--club-onprimary); }
.mh-band .mh-when, .mh-band .mh-note { color: var(--club-onprimary); opacity: .82; }
.mh-band .cd-cell { background: color-mix(in srgb, var(--club-onprimary) 15%, transparent); border-color: transparent; }
.mh-band .cd-cell b { color: var(--club-onprimary); }
.mh-band .cd-cell small { color: var(--club-onprimary); opacity: .7; }
.mh-band .btn.clubcta:not(.primary) { background: color-mix(in srgb, var(--club-onprimary) 14%, transparent); color: var(--club-onprimary); border-color: color-mix(in srgb, var(--club-onprimary) 28%, transparent); }
.mh-band .btn.clubcta:not(.primary):hover { background: color-mix(in srgb, var(--club-onprimary) 22%, transparent); }
/* Value-prop line (the CCTV wedge) on upcoming/idle — understated, on-voice, on the band. */
.mh-valueprop { font-size: 12.5px; font-weight: 600; margin: 10px 0 0; }
.mh-band .mh-valueprop { color: var(--club-onprimary); opacity: .72; }
/* Loading skeleton + soft error (replaces the old bounce-to-home on a data failure). */
.mh-skeleton { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 180px; justify-content: center; }
.mh-skeleton .sk-line { height: 14px; width: 60%; border-radius: 7px; background: color-mix(in srgb, var(--club-onprimary) 18%, transparent); animation: sk-pulse 1.3s ease-in-out infinite; }
.mh-skeleton .sk-line.sk-lg { height: 26px; width: 74%; }
@keyframes sk-pulse { 0%, 100% { opacity: .45; } 50% { opacity: .85; } }
.mh-error .mh-title { font-size: 22px; }
/* Tabular numerals on the scorecard digits (scorebar + countdown already set it). */
.sc-tbl td, .sc-inns-score, .sb-ov { font-variant-numeric: tabular-nums; }
/* Respect reduced-motion: the LIVE pulse and skeleton shimmer are motion, and LIVE is a status signal. */
@media (prefers-reduced-motion: reduce) {
  .mh-skeleton .sk-line { animation: none; }
  .mh-badge .d, .sb-chip, .cd-soon .d { animation: none !important; }
}

/* ---- LIGHT content surface (scorecard / teams / about) ---- */
body.matchview .content { --panel: #ffffff; --panel-2: #eef1f7; --line: #e4e8f0; --line-2: #d4dae8; --text: #161922; --muted: #5a6374; background: #F4F6FB; color: #161922; padding: 4px 0 30px; }
body.matchview .content > .sec { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.content-h { font-size: 20px; font-weight: 800; color: var(--text); margin: 24px 0 12px; display: flex; align-items: center; gap: 10px; }
.beta-tag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; background: #eef1f7; border: 1px solid #e0e5ee; border-radius: 999px; padding: 3px 9px; }
/* LIVE is a universal broadcast-red signal (not a club brand colour). */
.matchview .tag.live { color: var(--red); background: var(--red-tint); border-color: color-mix(in srgb, var(--red) 32%, transparent); }
body.matchview .content .sc-tbl td.sc-r b { color: var(--text); }   /* runs stay dark-legible on white */
body.matchview .content .sc-result { background: var(--club-tint); color: var(--text); }

/* Subtle footer attribution */
.matchview .app-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 16px 18px; background: var(--panel-2); border-top: 1px solid var(--line); }
.matchview .app-foot .foot-vp { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.matchview .app-foot .admin-signin-link { order: 3; flex-basis: 100%; text-align: center; margin-top: 4px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; opacity: .75; }
.matchview .app-foot .admin-signin-link:hover { opacity: 1; color: var(--club-accent); text-decoration: underline; }
.matchview .app-foot .poweredby { opacity: .7; font-size: 11.5px; color: #5a6374; }
.matchview .app-foot .poweredby img { height: 16px; }
.matchview .app-foot .poweredby:hover { opacity: 1; color: #161922; }

/* =========================================================================
   COMMERCIAL-GRADE CARD POLISH — port of the approved redesign direction
   (claude.ai artifact), themed in each club's own colours. The whole match
   is ONE white card: in-card crest header → broadcast hero → flush live-score
   summary with pill chips → flat scorecard → trust footer. Dark panels read in
   --club-primary, accent moments in --club-accent; LIVE/wicket stay broadcast red.
   ========================================================================= */
/* Header sits inside the card — a touch more room; crest reads as a rounded app tile. */
.matchview .appbar .wrap { height: 62px; }
.matchview .appbar { border-bottom: 1px solid var(--line); }
.matchview .club-id b { font-size: 16.5px; }

/* Hero's non-video area is the card surface (white), so the video → score summary reads as one card.
   Neutralise the marketing-page `section { padding:64px 0; border-top }` so the hero + scorecard sit flush
   in the card instead of inheriting huge gaps and stray divider lines. */
body.matchview section { border-top: 0; }
.matchview .matchhero { background: var(--panel); padding: 0; }
.matchview .mh-scorewrap { padding: 0; }
.matchview #scorecardSec { margin-top: 0; }   /* scorecard sits flush under the live score; other secs keep their gap */

/* Live-score summary: flush on the card (no nested box), score-as-hero, pill-chip metrics. */
.matchview .scorebar { background: transparent; border: 0; border-radius: 0; box-shadow: none;
  margin: 0; padding: 16px 18px 18px; border-bottom: 1px solid var(--line); }
.matchview .sb-bat-team { font-size: 18px; letter-spacing: -.01em; }
.matchview .sb-vs { font-size: 12px; }
.matchview .sb-rw b { font-size: 46px; letter-spacing: -.035em; }
.matchview .sb-rw .sb-wk { font-size: 22px; }
.matchview .sb-ov { color: var(--muted); }
/* Metric chips — bordered pills, like the reference (RR · innings · need · partnership). */
.matchview .sb-meta { gap: 7px; margin-top: 13px; }
.matchview .sb-meta > span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.matchview .sb-meta .sb-inn { text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.matchview .sb-meta .sb-rr b, .matchview .sb-meta .sb-need b, .matchview .sb-meta .sb-ps b, .matchview .sb-meta .sb-l5 b { color: var(--text); font-weight: 800; }
.matchview .sb-meta .sb-need { background: var(--club-tint); border-color: color-mix(in srgb, var(--club-accent) 30%, transparent); color: var(--text); }
.matchview .sb-meta .sb-need b { color: var(--club-accent); }
.matchview .sb-meta .sb-ps { background: var(--club-tint); border-color: color-mix(in srgb, var(--club-accent) 26%, transparent); color: var(--text); }
.matchview .sb-meta .sb-fh { background: var(--red); color: #fff; border-color: transparent; }
/* Boundary balls = universal green (good); six = club accent; wicket = broadcast red. */
.matchview .sb-chip.four { background: var(--sixgreen, #22C55E); color: #06351f; }
.matchview .sb-over-k { color: var(--muted); }

/* Content is part of the white card (not a separate grey slab); scorecard reads flat. */
body.matchview .content { background: var(--panel); padding: 0 0 6px; }
body.matchview .content > .sec { padding: 0 18px; }
.matchview .content-h { font-size: 18px; margin: 18px 0 10px; }
.matchview .content-h .sc-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--red); text-transform: uppercase; }
.matchview .content-h .sc-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.5s infinite; }
/* Flat innings blocks — divider-separated, no heavy card border (matches the reference table look). */
.matchview .sc-inns { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 4px; margin-top: 0; }
.matchview .sc-tbl td.sc-nm { white-space: normal; max-width: none; }
.sc-how { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 1px; }
.matchview #scorecardBody > .sc-top:empty + .sc-inns, .matchview #scorecardBody > .sc-inns:first-child { border-top: 0; }
.matchview .sc-result { margin: 2px 0 2px; }

/* Compact "Last result" table under an upcoming match (reference: TEAM · SCORE · OVERS). */
.mh-lastresult { padding: 16px 18px 4px; border-top: 1px solid var(--line); }
.mh-lastresult .lr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.mh-lastresult .lr-k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mh-lastresult .lr-sum { font-size: 13px; font-weight: 800; color: var(--sixgreen, #22C55E); }
.mh-lastresult .lr-sum.lost { color: var(--red); }
.mh-lastresult table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.mh-lastresult th { text-align: right; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 0 6px; }
.mh-lastresult th:first-child { text-align: left; }
.mh-lastresult td { text-align: right; padding: 6px 0; border-top: 1px solid var(--line); color: var(--muted); }
.mh-lastresult td:first-child { text-align: left; color: var(--text); font-weight: 700; }
.mh-lastresult td.lr-sc { color: var(--text); font-weight: 800; }

/* Admin match-day: hand-off (secondary) button + tidy tile actions inside the card. */
.matchview .md-btn.handoff { background: var(--panel); border-color: var(--line-2); color: var(--text); }
.matchview .md-btn.handoff:hover { border-color: var(--club-accent); color: var(--club-accent); }
.matchview .adminbar, .matchview .matchday { border-bottom: 1px solid var(--line); }

/* ===== Inline branded admin sheets (sign-in + manage) — on the light team page. Keep everything
   self-contained so it reads consistently regardless of the base .btn (which is dark-surface). ===== */
.sheet-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .2s; }
.sheet-scrim.on { opacity: 1; }
.sheet { position: fixed; left: 50%; bottom: 0; z-index: 91; width: 100%; max-width: 560px;
  transform: translate(-50%, 100%); transition: transform .24s ease; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow);
  max-height: 88vh; display: flex; flex-direction: column; }
.sheet.on { transform: translate(-50%, 0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.sheet-head b { font-size: 17px; font-weight: 800; color: var(--text); }
.sheet-x { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.sheet-x:hover { color: var(--text); }
.sheet-body { padding: 16px 18px 24px; overflow-y: auto; }
.sheet-lead { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.sheet-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.sheet-note.ok { color: var(--club-accent); font-weight: 700; }
.sheet-loading { color: var(--muted); padding: 24px 0; text-align: center; }
.sheet-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0; }
.sheet-or::before, .sheet-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sheet-emailform { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 620px) { .sheet { bottom: auto; top: 50%; transform: translate(-50%, -48%); border-radius: var(--radius); }
  .sheet.on { transform: translate(-50%, -50%); } }
body.sheet-open { overflow: hidden; }

/* Buttons + inputs inside the sheets (light surface) */
.sheet .btn, .sheet input, .sheet select { font: inherit; }
.sheet input:not([type=color]):not([type=file]), .sheet select {
  width: 100%; padding: 10px 12px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-btn);
  color: var(--text); font-size: 15px; }
.sheet input[type=color] { width: 100%; height: 40px; padding: 3px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-btn); cursor: pointer; }
.sheet .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px;
  border-radius: var(--radius-btn); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.sheet .btn:hover { border-color: var(--club-accent); }
.sheet .btn.sm { padding: 6px 11px; font-size: 13px; }
.sheet .btn.wide { width: 100%; }
.sheet .btn.primary, .sheet .btn.clubcta.primary { background: var(--club-accent); border-color: var(--club-accent); color: var(--club-ink); }
.sheet .btn.clubcta { border-color: var(--club-accent); color: var(--text); background: var(--panel); }
.sheet .btn.ghost { background: transparent; }
.sheet .btn.danger { background: var(--red, #D32F2F); border-color: var(--red, #D32F2F); color: #fff; }
.sheet .btn.danger-ghost { background: transparent; border-color: color-mix(in srgb, var(--red, #D32F2F) 40%, var(--line-2)); color: var(--red, #D32F2F); }

/* Manage panel */
.cm-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.cm-tab { flex: 1; padding: 9px 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted);
  border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; }
.cm-tab.on { background: var(--club-accent); border-color: var(--club-accent); color: var(--club-ink); }
.cm-pane { display: flex; flex-direction: column; gap: 12px; }
.cm-lead { color: var(--muted); font-size: 13px; margin: 0; }
.cm-muted { color: var(--muted); font-size: 13px; }
.cm-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 12px 0; }
.cm-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); flex: 1; }
.cm-field.cm-inline { flex-direction: row; align-items: center; gap: 8px; }
.cm-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cm-team { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); }
.cm-team-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cm-team-id b { font-size: 15px; color: var(--text); } .cm-team-id small { display: block; color: var(--muted); font-size: 12px; }
.cm-team-go { display: flex; gap: 8px; }
.cm-team-ctrl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cm-key { font-size: 12px; font-weight: 700; color: var(--muted); }
.cm-key.ok { color: var(--club-accent); }
.cm-spacer { flex: 1; }
.cm-team-edit { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.cm-confirm { font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cm-add { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.cm-add h4 { margin: 0; font-size: 14px; color: var(--text); }
.cm-add-manual input, .cm-add-manual select { flex: 1; min-width: 120px; }
.cm-discover, .cm-invites { display: flex; flex-direction: column; gap: 8px; }
.cm-disc, .cm-invite { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.cm-disc small, .cm-invite small { color: var(--muted); }
.cm-invite-form { display: flex; flex-direction: column; gap: 10px; }
.cm-upload { cursor: pointer; }

/* Team-page Manage panel (public/js/club-admin.js) — per-team setup inside the branded sheet */
.sheet-lg { max-width: 600px; }
.mp-actions { display: flex; gap: 8px; margin-bottom: 14px; }
.mp-actions .btn { flex: 1; }
.mp-ready { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.mp-ready-sub { color: var(--muted); font-size: 12.5px; }
.mp-field { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.mp-field > label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mp-ctl { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mp-ctl input { flex: 1 1 160px; min-width: 0; margin: 0; }
.mp-ctl .sheet-note { flex-basis: 100%; margin: 0; }
.mp-ok { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: var(--club-accent); }
.mp-streamctl { flex-basis: 100%; gap: 8px; align-items: center; flex-wrap: wrap; }
.mp-streamctl:not([hidden]) { display: flex; }
.mp-streamctl .mp-ytkey { flex: 1 1 150px; min-width: 0; margin: 0; }
.mp-admins { align-items: center; }
.mp-admins .pchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 11px; font-size: 12.5px; }
.mp-admdel { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.mp-admdel:hover { color: var(--red); }
.mp-admrow { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; margin-top: 2px; align-items: center; }
.mp-admrow .mp-admemail { flex: 1 1 160px; min-width: 0; margin: 0; }
