/* Last Man Standing — forked from wcassets/pool.css. Same dark theme + palette;
   adds elimination-state colours (SAFE / LAST CHANCE / OUT) and the history grid. */
:root {
  --bg: #0f1114;
  --surface: #181b1f;
  --surface-2: #1e2227;
  --border: #2a2d32;
  --cream: #e8dfc8;
  --muted: #7a7d82;
  --pitch: #3e9b63;
  --live: #e0524a;
  --gold: #d4af37;
  --safe: #3e9b63;
  --last: #d4af37;
  --out: #7a7d82;
  --nav-bg: rgba(15,17,20,0.92);
}
:root[data-theme="light"] {
  --bg: #f2eee3;
  --surface: #ffffff;
  --surface-2: #ece7d9;
  --border: #d7d0bf;
  --cream: #1d1f23;
  --muted: #6d6f74;
  --pitch: #2f8a55;
  --gold: #ab8a28;
  --safe: #2f8a55;
  --last: #ab8a28;
  --nav-bg: rgba(245,241,233,0.92);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: 1.5;
  background-image: radial-gradient(circle at 25% 15%, rgba(62, 155, 99, 0.06), transparent 45%),
                    radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.04), transparent 40%);
}
a { color: inherit; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 32px 24px 90px; }

/* masthead */
header { border-top: 5px solid var(--pitch); border-bottom: 3px double var(--border); padding: 20px 0 24px; margin-bottom: 16px; }
.kicker { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.kicker a { text-decoration: none; }
.kicker a:hover { color: var(--cream); }
h1 { font-family: "Anton", sans-serif; font-weight: 400; font-size: clamp(34px, 6.5vw, 76px); line-height: 0.95; text-transform: uppercase; letter-spacing: 0.01em; }
h1 .accent { color: var(--pitch); }
.head-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-end; }
.updated { font-size: 11px; color: var(--muted); margin-top: 10px; letter-spacing: 0.08em; }
.updated .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--pitch); margin-right: 6px; animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.25 } }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--pitch);
  padding: 12px 18px; font-size: 13px; display: flex; gap: 10px; align-items: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5); animation: toast-in 0.25s; max-width: min(90vw, 460px);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px) } }

h2 { font-family: "Anton", sans-serif; font-weight: 400; font-size: 26px; text-transform: uppercase; letter-spacing: 0.06em; margin: 52px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
h2 small { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted); letter-spacing: 0.12em; margin-left: 12px; text-transform: none; }

/* sticky section nav */
.secnav { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 2px; margin: 8px -24px 0; padding: 10px 24px; background: var(--nav-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.secnav a { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 5px 10px; cursor: pointer; border: 1px solid transparent; border-radius: 3px; white-space: nowrap; }
.secnav a:hover { color: var(--cream); border-color: var(--border); }
.nav-badge { display: inline-block; min-width: 15px; padding: 1px 5px; margin-left: 3px; background: var(--gold); color: #0f1114; border-radius: 8px; font-size: 10px; font-weight: 700; line-height: 1.3; text-align: center; }

/* collapsible sections */
.sec-head { cursor: pointer; position: relative; padding-right: 26px; user-select: none; }
.sec-head::after { content: "▾"; position: absolute; right: 2px; top: 50%; transform: translateY(-60%); font-size: 16px; color: var(--muted); transition: transform 0.2s; }
.sec-head:hover::after { color: var(--cream); }
section.collapsed .sec-head { margin-bottom: 16px; opacity: 0.75; }
section.collapsed .sec-head::after { transform: translateY(-60%) rotate(-90deg); }
section.collapsed > :not(.sec-head) { display: none; }

/* sign-in strip */
.signin { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold); padding: 12px 16px; margin-bottom: 16px; font-size: 13px; }
.signin span.lbl { flex: 1; min-width: 160px; color: var(--muted); }
.signin span.me { flex: 1; min-width: 160px; color: var(--cream); }
.signin span.me b { color: var(--safe); }
.signin input { background: var(--surface-2); border: 1px solid var(--border); color: var(--cream); font-family: inherit; font-size: 13px; padding: 8px 10px; outline: none; min-width: 200px; }
.signin input:focus { border-color: var(--pitch); }
.signin button { background: var(--pitch); border: none; color: #0f1114; font-family: "Anton", sans-serif; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 9px 16px; cursor: pointer; }
.signin button.ghost { background: none; border: 1px solid var(--border); color: var(--muted); }
.signin button.ghost:hover { color: var(--cream); }
.signin .note { flex-basis: 100%; color: var(--muted); font-size: 11px; }
.signin .note.ok { color: var(--pitch); }
.signin .note.err { color: var(--live); }

/* state badges */
.state { font-family: "Anton", sans-serif; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 8px 1px; border-radius: 2px; color: #0f1114; white-space: nowrap; }
.state.safe { background: var(--safe); }
.state.last { background: var(--last); }
.state.out { background: var(--surface-2); color: var(--out); border: 1px solid var(--border); }

/* who's alive */
.alive { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pl-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); padding: 13px 15px; }
.pl-card.s-safe { border-left-color: var(--safe); }
.pl-card.s-last { border-left-color: var(--last); }
.pl-card.s-out { border-left-color: var(--out); opacity: 0.66; }
.pl-card .pl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pl-card h3 { font-family: "Anton", sans-serif; font-weight: 400; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-card.s-out h3 { text-decoration: line-through; color: var(--out); }
.pl-card .pl-meta { margin-top: 9px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.pl-card .pl-meta b { color: var(--cream); font-family: "Anton", sans-serif; font-weight: 400; font-size: 15px; }
.pl-card.me { box-shadow: 0 0 0 1px var(--pitch); }
.alive-tally { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: -6px 0 16px; letter-spacing: 0.04em; }
.alive-tally b { color: var(--cream); }
.tly-count b { font-size: 14px; }
.tly-of { opacity: 0.7; }
.tally-add { background: var(--pitch); border: none; color: #0f1114; font-family: "Anton", sans-serif; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px; border-radius: 4px; cursor: pointer; }
.tally-add:hover { filter: brightness(1.08); }
.ok-note { background: rgba(62,155,99,0.12); border: 1px solid var(--pitch); border-radius: 6px; padding: 12px 14px; font-size: 13px; color: var(--cream); margin-top: 14px; }
.ok-note b { color: var(--pitch); }

/* this round / fixtures */
.round-meta { font-size: 12px; color: var(--muted); margin-bottom: 14px; letter-spacing: 0.04em; }
.round-meta b { color: var(--cream); }
.round-meta .lock { color: var(--gold); }
.round-meta .locked { color: var(--live); }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 22px; }
.fx { background: var(--surface); border: 1px solid var(--border); padding: 12px 14px; }
.fx.live { border-color: var(--live); box-shadow: 0 0 0 1px var(--live); }
.fx-mt { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 9px; }
.fx.live .fx-st { color: var(--live); font-weight: 700; }
.fx-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; }
.fx-row .tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-row.win .tn { color: var(--safe); font-weight: 500; }
.fx-sc { font-weight: 700; font-size: 16px; min-width: 18px; text-align: right; }

/* pick selector */
.pickbox { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--pitch); padding: 14px 16px; margin-bottom: 10px; }
.pickbox h3 { font-family: "Anton", sans-serif; font-weight: 400; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.pickbox .cur { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.pickbox .cur b { color: var(--cream); }
.pick-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pick-row select { flex: 1; min-width: 200px; background: var(--surface-2); border: 1px solid var(--border); color: var(--cream); font-family: inherit; font-size: 13px; padding: 9px 10px; outline: none; }
.pick-row select:focus { border-color: var(--pitch); }
.pick-row button { background: var(--pitch); border: none; color: #0f1114; font-family: "Anton", sans-serif; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; padding: 9px 18px; cursor: pointer; }
.pick-row button:disabled { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); cursor: not-allowed; }
.pick-note { font-size: 11.5px; margin-top: 8px; color: var(--muted); }
.pick-note.err { color: var(--live); }
.pick-note.ok { color: var(--pitch); }
.pick-locked { font-family: "Anton", sans-serif; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--live); }

/* history grid */
.grid-scroll { overflow-x: auto; padding-bottom: 6px; border: 1px solid var(--border); }
.hgrid { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.hgrid th, .hgrid td { padding: 7px 9px; text-align: center; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); white-space: nowrap; }
.hgrid thead th { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 400; border-bottom: 2px solid var(--border); position: sticky; top: 0; background: var(--surface-2); }
.hgrid th.pl, .hgrid td.pl { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.hgrid thead th.pl { z-index: 3; background: var(--surface-2); }
.hgrid td.pl { font-size: 12.5px; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.hgrid tr.r-out td.pl { color: var(--out); text-decoration: line-through; }
.hgrid .cell { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.hgrid .cell .tm { font-size: 11px; }
.hgrid .cell .rs { font-size: 12px; font-weight: 700; }
.hgrid .cell.win .rs { color: var(--safe); }
.hgrid .cell.lose .rs { color: var(--live); }
.hgrid .cell.none { color: var(--muted); }
.hgrid .cell.pend .rs { color: var(--gold); }
.grid-key { font-size: 11px; color: var(--muted); margin-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; letter-spacing: 0.03em; }
.grid-key span b { color: var(--cream); }

/* admin */
.admin-block { background: var(--surface); border: 1px solid var(--border); padding: 14px 16px; margin-bottom: 16px; }
.admin-block h3 { font-family: "Anton", sans-serif; font-weight: 400; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; border-bottom: 1px dotted var(--border); }
.cfg-row:last-child { border-bottom: none; }
.cfg-row label { color: var(--cream); }
.cfg-row select, .cfg-row input { background: var(--surface-2); border: 1px solid var(--border); color: var(--cream); font-family: inherit; font-size: 13px; padding: 7px 9px; outline: none; }
.cfg-row input[type=number] { width: 80px; }
.admin-btn { background: var(--pitch); border: none; color: #0f1114; font-family: "Anton", sans-serif; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 9px 16px; cursor: pointer; margin-top: 10px; }
.admin-btn.ghost { background: var(--surface-2); border: 1px solid var(--gold); color: var(--gold); }
.admin-note { font-size: 11px; color: var(--muted); margin-top: 8px; }
.admin-note.ok { color: var(--pitch); }
.admin-note.err { color: var(--live); }
.rd-row { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: 12.5px; border-bottom: 1px dotted var(--border); flex-wrap: wrap; }
.rd-row input { background: var(--surface-2); border: 1px solid var(--border); color: var(--cream); font-family: inherit; font-size: 12px; padding: 6px 8px; outline: none; }
.rd-row .rd-lbl { width: 120px; }
.rd-row .rd-n { color: var(--muted); margin-left: auto; }
.rd-row .rd-del { background: none; border: 1px solid var(--border); color: var(--muted); font-size: 14px; line-height: 1; width: 22px; height: 22px; padding: 0; cursor: pointer; flex: none; }
.rd-row .rd-del:hover { border-color: var(--live); color: var(--live); }
.adm-pl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px dotted var(--border); font-size: 12.5px; }
.adm-pl .nm { flex: 1; min-width: 120px; }
.adm-pl button { background: var(--surface-2); border: 1px solid var(--border); color: var(--cream); font-family: inherit; font-size: 11px; padding: 5px 10px; cursor: pointer; }
.adm-pl button.bb { border-color: var(--safe); color: var(--safe); }
.adm-pl button.lc { border-color: var(--gold); color: var(--gold); }
.adm-pl button.rm { border-color: var(--live); color: var(--live); margin-left: auto; }
.adm-pl button:hover { background: var(--surface); }
.bb-req { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 600; color: var(--gold); border: 1px solid var(--gold); border-radius: 3px; padding: 1px 6px; white-space: nowrap; }

/* create form */
.mypools { max-width: 560px; margin-bottom: 8px; }
.mypool { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--pitch); padding: 11px 14px; margin-bottom: 8px; text-decoration: none; font-size: 14px; }
.mypool:hover { border-color: var(--pitch); }
.mypool .mc { color: var(--muted); font-size: 11px; white-space: nowrap; }
.cf-field { width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--cream); font-family: inherit; font-size: 14px; padding: 12px; outline: none; }
.cf-field:focus { border-color: var(--pitch); }
.cf-help { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.cf-help b { color: var(--cream); }
.pay-help { font-size: 11px; color: var(--gold); text-decoration: underline dotted; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; }
.payhelp { font-size: 13px; line-height: 1.6; color: var(--cream); }
.payhelp ol { margin: 10px 0; padding-left: 20px; }
.payhelp li { margin-bottom: 8px; }
.payhelp code { background: var(--surface-2, rgba(255,255,255,0.07)); padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.payhelp a { color: var(--pitch); }
.payhelp-tip { color: var(--muted); font-size: 12px; margin-top: 10px; }
a.back { cursor: pointer; }

/* primary action button (shared by login + hub + create) */
.cf-go { margin-top: 16px; background: var(--pitch); border: none; color: #0f1114; font-family: "Anton", sans-serif; font-size: 18px; letter-spacing: 0.1em; text-transform: uppercase; padding: 14px 30px; cursor: pointer; border-radius: 4px; }
.cf-go.sm { font-size: 13px; padding: 9px 16px; margin: 0; }
.cf-go:hover { filter: brightness(1.08); }
.cf-go:disabled { opacity: 0.6; cursor: default; }

/* login card */
.login-card { max-width: 460px; margin: 8px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 22px; }
.login-card h2 { margin: 0 0 6px; }
.login-sub { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0 0 16px; }
.login-card .cf-field { margin-bottom: 0; }

/* games dashboard */
.hub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; }
.hub-head h2 { margin: 0; }
.hub-game { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--pitch); border-radius: 6px; text-decoration: none; color: var(--cream); transition: background 0.1s, border-color 0.1s; }
.hub-game:hover { background: var(--surface-2, rgba(255,255,255,0.04)); border-color: var(--pitch); }
.hg-icon { font-size: 22px; line-height: 1; }
.hg-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hg-main b { font-size: 15px; }
.hg-main small { font-size: 11.5px; color: var(--muted); }
.hg-role { font-family: "Anton", sans-serif; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; }
.hg-role.admin { background: var(--pitch); color: #0f1114; }
.hg-role.player { border: 1px solid var(--border); color: var(--muted); }
.hg-arrow { color: var(--muted); font-size: 20px; }
.hub-empty { text-align: center; color: var(--muted); padding: 32px 16px; line-height: 1.8; background: var(--surface); border: 1px dashed var(--border); border-radius: 8px; }
.hub-sub { font-size: 12px; margin-top: 10px; }
.rd-preview { border: 1px solid var(--border); margin-top: 10px; max-height: 260px; overflow-y: auto; }
.rd-preview .rp { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1px dotted var(--border); font-size: 12.5px; }
.rd-preview .rp:last-child { border-bottom: none; }
.rd-preview .rp small { color: var(--muted); }

.err { background: var(--surface); border: 1px solid var(--live); color: var(--cream); padding: 14px 16px; margin: 20px 0; font-size: 13px; }
.loading { color: var(--muted); padding: 30px 0; letter-spacing: 0.15em; text-transform: uppercase; font-size: 12px; animation: pulse 1.6s infinite; }
.empty { color: var(--muted); padding: 18px 0; font-size: 13px; letter-spacing: 0.04em; }
footer { margin-top: 70px; text-align: center; font-size: 10.5px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; line-height: 2; }

/* config helper text + revolut preview */
.cfg-help { font-size: 11px; color: var(--muted); padding: 2px 0 8px; border-bottom: 1px dotted var(--border); }
.cfg-help span { color: var(--pitch); }

/* recent buy-backs log */
.bb-log { font-size: 12.5px; }
.bb-log-row { padding: 6px 0; border-bottom: 1px dotted var(--border); color: var(--cream); }
.bb-log-row:last-child { border-bottom: none; }
.bb-log-row small { color: var(--muted); }

/* confirm modal */
.lms-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8,9,11,0.72); backdrop-filter: blur(3px); animation: toast-in 0.18s; }
.lms-modal-card { background: var(--surface-2); border: 1px solid var(--border); border-top: 4px solid var(--pitch); box-shadow: 0 16px 50px rgba(0,0,0,0.6); padding: 20px 22px; max-width: min(92vw, 420px); width: 100%; }
.lms-modal-card h3 { font-family: "Anton", sans-serif; font-weight: 400; font-size: 20px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 12px; color: var(--cream); }
.lms-modal-body { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.lms-modal-body b { color: var(--cream); }
.lms-modal-err { color: var(--live); font-size: 12px; margin-top: 10px; min-height: 0; }
.lms-modal-err:empty { display: none; }
.lms-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.lms-modal-actions button { font-family: "Anton", sans-serif; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 9px 18px; cursor: pointer; }
.lms-modal-cancel { background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.lms-modal-cancel:hover { color: var(--cream); }
.lms-modal-confirm { background: var(--pitch); border: none; color: #0f1114; }
.lms-modal-confirm:disabled { background: var(--surface); color: var(--muted); border: 1px solid var(--border); cursor: not-allowed; }

/* ---------- test mode ---------- */
.test-badge { display: inline-block; margin-left: 10px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--live); border: 1px solid var(--live); border-radius: 3px; padding: 1px 7px; }
.test-block { border-left: 4px solid var(--live); }
.tm-status { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--cream); margin-top: 6px; }
.tm-status strong { color: var(--gold); font-weight: 600; }
.adm-pl .sim { border-color: var(--live); color: var(--live); }
.adm-pl button.mp { border-color: var(--gold); color: var(--gold); }
.adm-pl.awaiting { border-bottom-style: solid; border-left: 3px solid var(--gold); padding-left: 8px; }
.aw-fee { font-size: 11px; color: var(--muted); margin-left: 4px; }
.aw-alias { font-size: 11px; color: var(--gold); margin-left: 4px; }
.aw-alias.none { color: var(--live); opacity: 0.85; }
.adm-pl button.cfm { border-color: var(--pitch); color: var(--pitch); margin-left: auto; font-weight: 700; }
.paid-badge { font-size: 10px; padding: 2px 6px; border-radius: 3px; letter-spacing: 0.04em; text-transform: uppercase; }
.paid-badge.ok { background: rgba(62,155,99,0.16); color: var(--pitch); }
.paid-badge.no { background: rgba(224,82,74,0.14); color: var(--live); }
/* payment config + buy-in prompt + pot */
.cf-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cream); margin-top: 10px; cursor: pointer; }
.cf-check input { width: auto; margin: 0; }
.paybox { background: rgba(212,175,55,0.08); border: 1px solid var(--gold); border-radius: 6px; padding: 12px 14px; margin-bottom: 12px; }
.paybox .pick-row { margin-top: 8px; }
.pot-banner { margin-top: 10px; font-size: 13px; color: var(--gold); letter-spacing: 0.03em; }
.pot-banner b { color: var(--cream); }
.ap-preview { margin-top: 8px; max-height: 220px; overflow-y: auto; }
.ap-preview:empty { display: none; }
.ap-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 8px; font-size: 12px; border-bottom: 1px dotted var(--border); }
.ap-row .ap-nm { color: var(--cream); font-weight: 500; }
.ap-row .ap-em { color: var(--muted); }
.ap-row.ok { border-left: 3px solid var(--pitch); }
.ap-row.dupe { border-left: 3px solid var(--gold); }
.ap-row.dupe .ap-nm, .ap-row.bad .ap-nm { color: var(--muted); text-decoration: line-through; }
.ap-row.bad { border-left: 3px solid var(--live); }
.ap-row.bad .ap-em { color: var(--live); }

/* head-to-head on fixture cards */
.fx details.h2h { margin-top: 8px; border-top: 1px dotted var(--border); padding-top: 6px; }
.fx details.h2h summary { cursor: pointer; font-size: 11px; color: var(--muted); list-style: none; }
.fx details.h2h summary::-webkit-details-marker { display: none; }
.fx details.h2h summary::before { content: "▸ "; }
.fx details.h2h[open] summary::before { content: "▾ "; }
.fx details.h2h[open] summary { color: var(--cream); }
.h2h-body { margin-top: 6px; }
.h2h-tally { font-size: 11.5px; color: var(--cream); margin-bottom: 6px; }
.h2h-tally small { color: var(--muted); }
.h2h-row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 11px; padding: 3px 0; border-bottom: 1px dotted var(--border); }
.h2h-dt { color: var(--muted); white-space: nowrap; }
.h2h-sc { flex: 1; text-align: center; }
.h2h-row small { color: var(--muted); }
.h2h-empty, .h2h-load { font-size: 11px; color: var(--muted); }

/* theme toggle + pool branding */
.theme-toggle { position: fixed; left: 18px; bottom: 18px; z-index: 60; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--cream); font-size: 18px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
.pool-icon { margin-right: 10px; }
.brand-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.brand-sw { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.brand-sw.on { border-color: var(--cream); box-shadow: 0 0 0 2px var(--bg); }
.icon-select { background: var(--surface-2); border: 1px solid var(--border); color: var(--cream); font-size: 16px; padding: 6px 9px; outline: none; }

/* clickable team → team page modal (season match history) */
.tlink { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.tlink:hover { color: var(--pitch); }
dialog.team-dlg { background: var(--surface); color: var(--cream); border: 1px solid var(--border); border-top: 5px solid var(--pitch); max-width: 520px; width: calc(100vw - 40px); max-height: 82vh; padding: 0; margin: auto; }
dialog.team-dlg::backdrop { background: rgba(5,6,8,0.75); }
.team-dlg .dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.team-dlg .dlg-head h3 { font-family: "Anton", sans-serif; font-weight: 400; font-size: 19px; text-transform: uppercase; letter-spacing: 0.06em; }
.team-dlg .dlg-head button { background: none; border: 1px solid var(--border); color: var(--muted); font-family: inherit; padding: 4px 10px; cursor: pointer; }
.team-dlg .dlg-head button:hover { color: var(--cream); }
.team-dlg .dlg-body { padding: 14px 18px 18px; overflow-y: auto; }
.tm-agg { font-size: 13px; margin-bottom: 12px; }
.tm-lbl { font-family: "Anton", sans-serif; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); margin-right: 4px; }
.tm-agg b { color: var(--cream); }
.tm-form { margin-left: 6px; letter-spacing: 2px; }
.form-W { color: var(--safe); font-weight: 700; }
.form-D { color: var(--gold); font-weight: 700; }
.form-L { color: var(--live); font-weight: 700; }
.tm-games { display: flex; flex-direction: column; }
.tm-game { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--border); font-size: 13px; }
.tm-res { width: 16px; text-align: center; font-weight: 700; }
.tm-opp { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-sc { font-weight: 700; min-width: 40px; text-align: right; }
.tm-dt { color: var(--muted); font-size: 11px; min-width: 56px; text-align: right; }
.sq-lbl { display: block; margin: 16px 0 8px; }
.sq-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--border); font-size: 13px; }
.sq-pos { width: 34px; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.sq-nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-caps { color: var(--gold); font-size: 10px; margin-left: 6px; opacity: 0.85; }
.sq-st { color: var(--cream); min-width: 92px; text-align: right; font-size: 12px; }
