/* Community sports data center */
.sports-page { overflow-y: auto; }
.sports-main { max-width: 860px; margin: 0 auto; padding: 28px 24px 64px; }

.sd-crumb { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.sd-crumb a { color: var(--muted); }
.sd-crumb a:hover { color: var(--accent); }

.sports-head { margin-bottom: 22px; }
.sports-head h1 { margin: 0 0 6px; font-size: 26px; }
.sports-sub { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 0; }

.sd-sport { font-size: 18px; line-height: 1; }

.sports-main section { margin-bottom: 30px; }
.sports-main h2 { font-size: 16px; margin: 0 0 12px; }

.sd-flash { border-radius: 8px; padding: 9px 13px; font-size: 14px; margin: 0 0 18px; }
.sd-ok { background: rgba(58, 124, 165, .12); color: var(--accent); border: 1px solid var(--border); }
.sd-err { background: rgba(200, 70, 70, .12); color: var(--danger); border: 1px solid var(--border); }
.sd-empty { color: var(--muted); font-size: 14px; }
.sd-hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* fixtures: clickable team names */
.sd-team-link { color: var(--text); }
.sd-team-link:hover { color: var(--accent); text-decoration: none; }

/* league directory */
.sd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sd-card { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; background: var(--panel);
    border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.sd-card:hover { border-color: var(--accent); text-decoration: none; }
.sd-card .sd-name { font-weight: 700; font-size: 15px; }
.sd-card .sd-country { color: var(--muted); font-size: 12px; }

/* lists */
.sd-team-list { list-style: none; padding: 0; margin: 0 0 14px; }
.sd-team-list li { display: flex; align-items: center; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.sd-team-list a { font-weight: 600; }
.sd-short { color: var(--muted); font-size: 12px; }

/* forms */
.sd-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sd-form input, .sd-form select, .sports-sub select {
    background: var(--panel); color: var(--text); border: 1px solid var(--border);
    border-radius: 7px; padding: 7px 10px; font-size: 14px; }
.sd-form button, .sd-confirm {
    background: var(--accent); color: #fff; border: none; border-radius: 7px;
    padding: 7px 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.sd-form button:hover, .sd-confirm:hover { filter: brightness(1.07); }
.sd-inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.sd-w-pos { width: 70px; } .sd-w-num { width: 64px; } .sd-w-season { width: 96px; }

/* roster table */
.sd-roster { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.sd-roster th, .sd-roster td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
.sd-roster th { color: var(--muted); font-size: 12px; font-weight: 600; }
.sd-roster .sd-num { color: var(--muted); width: 44px; font-variant-numeric: tabular-nums; }
.sd-row-act { text-align: right; width: 1%; white-space: nowrap; }
.sd-remove { background: none; border: 1px solid var(--border); color: var(--muted);
    border-radius: 6px; padding: 4px 9px; font-size: 12px; cursor: pointer; }
.sd-remove:hover { border-color: var(--danger); color: var(--danger); }
.sd-row-act form { display: inline; }
.sd-transfer { background: none; border: 1px solid var(--border); color: var(--muted);
    border-radius: 6px; padding: 4px 9px; font-size: 12px; cursor: pointer; margin-right: 6px; }
.sd-transfer:hover { border-color: var(--accent); color: var(--accent); }
.sd-age { color: var(--muted); font-variant-numeric: tabular-nums; }
.sd-nat { color: var(--muted); white-space: nowrap; }

/* shared transfer panel (opened from a roster row's Transfer button) */
.sd-transfer-panel { margin-top: 14px; padding: 14px; border: 1px solid var(--border);
    border-radius: 10px; background: var(--panel); }
.sd-transfer-head { width: 100%; margin-bottom: 8px; font-size: 14px; }
.sd-transfer-cancel { background: none !important; color: var(--muted) !important;
    border: 1px solid var(--border) !important; }

/* owner-only delete-the-whole-league zone */
.sd-danger { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 16px; }
.sd-danger h2 { color: var(--danger); }

/* pending / disputed queue */
.sd-pending { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.sd-rev-list { list-style: none; padding: 0; margin: 10px 0 0; }
.sd-rev { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
    padding: 11px 0; border-bottom: 1px solid var(--border); }
.sd-rev:last-child { border-bottom: none; }
.sd-rev-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sd-op { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sd-payload { font-size: 12px; color: var(--text); background: var(--bg); border-radius: 6px;
    padding: 3px 7px; max-width: 460px; overflow-x: auto; white-space: nowrap; }
.sd-rev-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.sd-votes { font-variant-numeric: tabular-nums; }
.sd-voted { color: var(--accent); }
.sd-disputed { background: rgba(200, 70, 70, .06); }
.sd-disputed-tag { color: var(--danger); font-weight: 600; text-transform: uppercase; font-size: 11px; }

/* tiers + tabs */
.sd-badge-official { background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 700; }
.sd-private { color: var(--muted); font-size: 12px; }
.sd-card-custom { border-style: dashed; }
.sd-tablink { color: var(--accent); font-weight: 600; font-size: 13px; }
.sd-hint-inline { color: var(--muted); font-size: 13px; font-weight: 400; }
.sd-check { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }

/* fixtures */
.sd-fixtures { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.sd-fixtures td { padding: 9px 8px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.sd-round { color: var(--muted); font-size: 12px; width: 60px; }
.sd-home { text-align: right; font-weight: 600; }
.sd-away { font-weight: 600; }
.sd-score { text-align: center; width: 70px; font-variant-numeric: tabular-nums; }
.sd-vs { color: var(--muted); font-size: 12px; }
.sd-prov-score { opacity: .55; font-style: italic; }
.sd-fx-act { text-align: right; white-space: nowrap; }
.sd-result { gap: 4px; margin-left: 10px; }

/* consensus badges */
.sd-badge-ok { color: #2e7d32; font-weight: 700; font-size: 12px; white-space: nowrap; }
.sd-badge-prov { color: var(--muted); font-weight: 600; font-size: 11px; background: var(--bg);
    border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.sd-status, .sd-cstatus { white-space: nowrap; }
.sd-cstatus { width: 44px; text-align: center; }
.sd-badge-lock { font-size: 13px; cursor: help; }
/* brief highlight when a row is swapped in by htmx */
.sd-fx-row, .sd-stat-row { transition: background-color .7s ease; }
.sd-fx-row.htmx-settling, .sd-stat-row.htmx-settling { background-color: rgba(58, 124, 165, .18); }
.sd-locked-note { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sd-lock-btn { background: none; border: 1px solid var(--border); color: var(--muted);
    border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; }
.sd-lock-btn:hover { border-color: var(--accent); color: var(--accent); }

/* admin provider-import bar */
.sd-source-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px;
    padding: 9px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.sd-source-bar button { background: var(--accent); color: #fff; border: none; border-radius: 7px;
    padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sd-source-bar button:hover { filter: brightness(1.07); }

/* week selector */
.sd-weeks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.sd-week-pill { font-size: 13px; color: var(--muted); border: 1px solid var(--border);
    border-radius: 999px; padding: 3px 12px; background: var(--panel); }
.sd-week-pill:hover { border-color: var(--accent); text-decoration: none; }
.sd-week-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* stat grid */
.sd-stat-block { margin-bottom: 26px; }
.sd-stat-grid { width: 100%; border-collapse: collapse; }
.sd-stat-grid th, .sd-stat-grid td { padding: 6px 8px; border-bottom: 1px solid var(--border); font-size: 13px; text-align: center; }
.sd-stat-grid th { color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.sd-stat-grid .sd-pl { text-align: left; font-weight: 600; white-space: nowrap; }
.sd-stat-in { width: 52px; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 5px; padding: 4px 5px; font-size: 13px; text-align: center; }
.sd-pts-col { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- standings / top-performers / player profile (season simulation) ---- */
.sd-section { margin: 0 0 30px; }
.sd-seasonbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sd-sim-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; padding: 1px 7px; }
.sd-muted, .sd-ha { color: var(--muted); }

/* enhanced data tables (search + sortable + collapse) */
.sd-tablewrap { overflow-x: auto; }
.sd-search { width: 100%; max-width: 280px; margin: 0 0 10px; background: var(--panel); color: var(--text);
    border: 1px solid var(--border); border-radius: 7px; padding: 6px 10px; font-size: 13px; }
.sd-rank { width: 100%; border-collapse: collapse; font-size: 13px; }
.sd-rank th, .sd-rank td { padding: 7px 10px; border-bottom: 1px solid var(--border);
    text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sd-rank th:nth-child(1), .sd-rank td:nth-child(1),
.sd-rank th:nth-child(2), .sd-rank td:nth-child(2) { text-align: left; }
.sd-rank thead th { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .03em; border-bottom: 1px solid var(--border); }
.sd-rank th.sortable { cursor: pointer; user-select: none; }
.sd-rank th.sortable:hover { color: var(--accent); }
.sd-rank tbody tr:hover { background: var(--panel); }
.sd-leaders th, .sd-leaders td { padding: 6px 9px; }
.sd-seeall { margin: 10px 0 0; background: none; border: 1px solid var(--border); color: var(--muted);
    border-radius: 7px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.sd-seeall:hover { border-color: var(--accent); color: var(--accent); }
.sd-win { color: #2e8b57; font-weight: 700; }
.sd-loss { color: var(--danger); font-weight: 700; }

/* player profile stat cards */
.sd-statcards { display: flex; flex-wrap: wrap; gap: 12px; }
.sd-statcard { display: flex; flex-direction: column; align-items: center; min-width: 84px;
    background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; }
.sd-statcard-v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sd-statcard-l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-top: 2px; }

/* top-performers: server pagination + sortable header links + search */
.sd-perf-search { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; flex-wrap: wrap; }
.sd-rank thead th a { color: inherit; text-decoration: none; cursor: pointer; }
.sd-rank thead th a:hover { color: var(--accent); }
.sd-rank th.sorted, .sd-rank td.sorted { background: var(--panel); }
.sd-rank th.sorted a { color: var(--accent); }
.sd-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0 0; }
.sd-pageinfo { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.sd-seeall.disabled { opacity: .4; pointer-events: none; }

/* fixture date under the week label + locked-edit affordances + add-fixture spacing */
.sd-fx-date { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.sd-add-fixture { margin-top: 20px; }
.sd-w-week { width: 96px; }
.sd-fx-act .icon-btn { vertical-align: middle; }
.sd-fx-act .icon-btn .icon { width: 16px; height: 16px; }

/* Standings split by conference/division (US leagues). Small tables side by side on wide screens,
   stacked on narrow ones — each is only 4-6 rows, so several fit comfortably. */
.sd-standing-groups { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.sd-standing-group { min-width: 0; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.sd-standing-group h3 { margin: 0 0 6px; font-size: 13px; letter-spacing: .02em; text-transform: uppercase;
    color: var(--muted); }
.sd-standing-group .sd-rank { font-size: 12.5px; }
.sd-standing-group .sd-rank td, .sd-standing-group .sd-rank th { padding: 5px 7px; }

/* ---- statistics pages: a visual story and a dense table, treated as equals ---- */
.stats-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.stats-card { display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    text-decoration: none; color: inherit; background: var(--panel); }
.stats-card:hover { border-color: var(--accent); }
.stats-card-name { font-weight: 600; }
.stats-card-span { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stats-card-nums { margin-top: 8px; font-size: 12.5px; display: flex; gap: 12px; }

.stats-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
    justify-content: space-between; }
.stats-modes { display: flex; gap: 6px; }
.stats-modes a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
    text-decoration: none; color: inherit; font-size: 13px; white-space: nowrap; }
.stats-modes a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.stats-figures { display: grid; gap: 8px; margin: 14px 0 18px;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.stats-figure { border: 1px solid var(--border); border-radius: 10px; padding: 10px; text-align: center; }
.stats-figure strong { display: block; font-size: 22px; line-height: 1.1; }
.stats-figure span { font-size: 11.5px; color: var(--muted); }

/* the career arc — plain server-rendered SVG, no charting library */
.career-arc { border: 1px solid var(--border); border-radius: 10px; padding: 10px; overflow-x: auto; }
.career-arc-svg { display: block; width: 100%; min-width: 520px; height: 190px; }
.arc-bar { fill: var(--accent); opacity: .35; }
.arc-bar.warm { opacity: .6; }
.arc-bar.hot { opacity: 1; }
.arc-line { stroke: var(--fg); stroke-width: 1; opacity: .55; vector-effect: non-scaling-stroke; }
.career-arc-axis { display: flex; min-width: 520px; margin-top: 6px; }
.career-arc-axis span { flex: 1 1 0; text-align: center; font-size: 9.5px; color: var(--muted);
    overflow: hidden; white-space: nowrap; cursor: help; }

.season-story { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.season-row { display: flex; gap: 12px; align-items: baseline; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: 8px; }
.season-year { font-weight: 600; min-width: 46px; }
.season-body { flex: 1 1 auto; min-width: 0; }
.season-team { font-size: 12.5px; color: var(--muted); }
.season-bar { height: 6px; border-radius: 3px; background: var(--border); margin: 5px 0; overflow: hidden; }
.season-bar-fill { display: block; height: 100%; background: var(--accent); }
.season-nums { font-size: 12px; color: var(--muted); }

@media (max-width: 620px) {
    .stats-head { flex-direction: column; }
    .season-row { flex-direction: column; gap: 4px; }
}

/* F1 Predict: four ordered picks, stacked on narrow screens */
.f1-pick-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end; margin: 10px 0; }
.f1-pick-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.f1-pick-form select { width: 100%; }
.f1-pick-form button { grid-column: 1 / -1; justify-self: start; }

/* F1 Fantasy squad list */
.squad-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.squad-member { display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: 8px; }
.squad-member strong { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; }

/* ---- knockout bracket: one column per round, readable on a phone and on a desktop ---- */
.bracket-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

/* Round chips. On a phone the tree scrolls sideways, so these are how you reach a round directly. */
.bracket-jump { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; }
.bracket-jump a { flex: 0 0 auto; padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px;
    font-size: 12.5px; text-decoration: none; color: inherit; white-space: nowrap; }
.bracket-jump a:hover { border-color: var(--accent); }

/* The tree scrolls horizontally as a unit — the only reliable way to show a deep draw on a narrow screen
   without shrinking names to nothing. scroll-snap makes it land on whole rounds rather than mid-column. */
.bracket-scroll { overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; }
.bracket { display: flex; gap: 14px; align-items: stretch; min-width: min-content; }

.bracket-round { flex: 0 0 auto; width: 220px; scroll-snap-align: start; display: flex;
    flex-direction: column; }
.bracket-round-name { font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted); margin: 0 0 8px; position: sticky; top: 0; background: var(--bg); padding: 4px 0; }
/* Matches spread evenly down their column, so a later-round match sits between its two feeders without
   any absolute positioning to drift out of alignment. */
.bracket-matches { flex: 1 1 auto; display: flex; flex-direction: column;
    justify-content: space-around; gap: 10px; }

.bracket-match { border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
    background: var(--panel); position: relative; }
.bracket-side { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13.5px; }
.bracket-side + .bracket-side { border-top: 1px solid var(--border); }
.bracket-side.won { font-weight: 600; }
.bracket-side.won .bracket-name { color: var(--fg); }
.bracket-side.lost { opacity: .5; }
.bracket-seed { flex: 0 0 auto; min-width: 18px; height: 18px; border-radius: 4px; font-size: 10.5px;
    display: inline-flex; align-items: center; justify-content: center; background: var(--border);
    color: var(--muted); }
.bracket-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; }
/* The score is its own row, not a badge floating over the names. A football tie is "4-2", but a five-set
   tennis match is "6-3 7-6 (7-0) 6-3" — an overlay covered the players it belonged to. */
.bracket-score { border-top: 1px solid var(--border); padding: 4px 10px; font-size: 11px;
    color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; }

.bracket-champion { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--accent);
    border-radius: 10px; font-size: 15px; }

@media (max-width: 620px) {
    .bracket-round { width: 190px; }
    .bracket-side { padding: 7px 9px; font-size: 13px; }
}

/* archives index: a card per sport, with its headline figures and a way in */
.archive-card { margin-bottom: 14px; }
.archive-card h2 { margin: 0 0 6px; font-size: 17px; }
.archive-list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 4px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.archive-list a { text-decoration: none; }
.archive-list a:hover { text-decoration: underline; }

/* editing a live draw: each side is a button, styled to look exactly like the read-only row it replaces */
.bracket-pick { display: contents; }
.bracket-side-pick { width: 100%; background: none; border: 0; font: inherit; color: inherit;
    text-align: left; cursor: pointer; }
.bracket-side-pick:hover { background: var(--bg); }
.bracket-side-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.bracket-undo { position: absolute; right: 4px; top: 4px; }
.bracket-undo button { background: none; border: 0; color: var(--muted); cursor: pointer;
    font-size: 13px; line-height: 1; padding: 2px 4px; }
.bracket-undo button:hover { color: var(--accent); }
.bracket-locked { color: var(--muted); }

/* build-your-own form */
.bracket-form { display: grid; gap: 12px; max-width: 520px; margin-top: 14px; }
.bracket-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.bracket-form textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--border);
    border-radius: 8px; background: var(--panel); color: var(--fg); resize: vertical; }
.bracket-form button { justify-self: start; }

/* ---- Battle mode: one game week, two squads, hidden moves ---- */
.battle-card { margin-bottom: 12px; }
.battle-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    flex-wrap: wrap; margin-bottom: 6px; }
.battle-vs { font-size: 15px; }
.battle-status { font-size: 11px; letter-spacing: .04em; color: var(--muted);
    border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; }
.battle-score { font-size: 22px; font-variant-numeric: tabular-nums; margin: 4px 0 8px; }
.battle-score b { font-size: 13px; margin-left: 8px; }
.battle-won { color: #2e7d32; }
.battle-lost { color: var(--danger); }
.battle-drawn { color: var(--muted); }
.battle-moves { list-style: none; margin: 0 0 10px; padding: 0; font-size: 13.5px; }
.battle-moves li { padding: 2px 0; }
/* the concealed half of the board — deliberately quiet, so it reads as "unknown", not "empty" */
.battle-hidden { color: var(--muted); font-style: italic; }
.battle-aim { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.battle-history { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.battle-history li { padding: 5px 0; border-bottom: 1px solid var(--border); }
.battle-history li:last-child { border-bottom: none; }
.battle-unranked { opacity: .55; }
.battle-rules { list-style: none; margin: 0 0 14px; padding: 10px 14px; font-size: 13.5px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.battle-rules li { padding: 2px 0; }
/* the interaction, called out — it is the part that makes the hand worth thinking about */
.battle-rules-key { margin-top: 6px; padding-top: 8px !important; border-top: 1px solid var(--border);
    color: var(--muted); }


/* ---- tennis games: a match is two people, so the board is two buttons ---- */
.tn-board { margin-bottom: 10px; }
.tn-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.tn-pickers { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
.tn-side { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font: inherit;
    background: var(--panel); color: var(--fg); border: 1px solid var(--border); border-radius: 10px;
    cursor: pointer; text-align: left; }
.tn-side:hover:not(:disabled) { border-color: var(--accent); }
.tn-side:disabled { opacity: .55; cursor: default; }
/* the call you made — obvious without shouting */
.tn-side.picked { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
.tn-v { align-self: center; color: var(--muted); font-size: 12px; }
.tn-seed { min-width: 18px; height: 18px; border-radius: 4px; font-size: 10.5px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--border); color: var(--muted); }
.tn-upset { font-size: 11px; color: var(--accent); border: 1px solid var(--accent);
    border-radius: 999px; padding: 0 7px; margin-left: 6px; }
.tn-entries { display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    max-height: 340px; overflow-y: auto; margin-bottom: 12px; }
.tn-entry { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 3px 0; }
@media (max-width: 620px) {
    .tn-pickers { grid-template-columns: 1fr; }
    .tn-v { display: none; }
}
