:root {
    color-scheme: light dark;
    /* Brand palette from the FlagLeagues mark: charcoal #24272c, yellow #f6fa06, white.
       Light mode: charcoal accent with yellow ink (yellow text on white fails contrast);
       dark mode: the brand yellow takes over as accent. Win/loss stay semantic. */
    --bg: light-dark(#f1f2f4, #0f1113);
    --surface: light-dark(#ffffff, #1a1d21);
    --surface-2: light-dark(#e7e9ec, #23262b);
    --text: light-dark(#1d2127, #e9eaec);
    --text-muted: light-dark(#646a73, #9ba1aa);
    --border: light-dark(#dcdfe3, #32363c);
    --accent: light-dark(#23262b, #f6fa06);
    --accent-ink: light-dark(#f6fa06, #1a1c1f);
    --accent-soft: light-dark(#fbfce1, #2b2d12);
    --header-bg: light-dark(#202327, #17191c);
    --header-text: #ffffff;
    --header-muted: rgb(255 255 255 / .72);
    --gold: light-dark(#8a6000, #f2c14e);
    --gold-soft: light-dark(#fdf4da, #2e2913);
    --gold-border: light-dark(#e7c861, #6b5a26);
    --live: light-dark(#d22d2d, #ff6464);
    --live-soft: light-dark(#fceeed, #301f1e);
    --win: light-dark(#0b7c3e, #3ecb77);
    --loss: light-dark(#d22d2d, #ff6464);
    --radius: 10px;
    --shadow: 0 1px 3px rgb(16 18 22 / 0.08), 0 4px 14px rgb(16 18 22 / 0.05);
    --font-score: "Bahnschrift", "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
}

* { box-sizing: border-box; }

@view-transition { navigation: auto; }

html { -webkit-text-size-adjust: 100%; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
    font-size: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1:focus { outline: none; }

/* Big scoreboard numerals get a condensed, DIN-like face where available */
.hero-big, .sb-score, .sc-score, .sc-score2, .live-score, .stat-value, .pad-value, .roster-no {
    font-family: var(--font-score);
}

.muted { color: var(--text-muted); }
.nowrap { white-space: nowrap; }
.sep { color: var(--text-muted); margin: 0 .35rem; }

.container {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--header-bg);
    box-shadow: 0 1px 4px rgb(0 0 0 / .18);
}
.site-header :focus-visible { outline-color: #fff; }

.header-inner {
    max-width: 780px;
    margin: 0 auto;
    padding: .6rem 1rem;
    display: flex;
    align-items: center;
    gap: .9rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-weight: 750;
    font-size: 1.15rem;
    color: var(--header-text);
    letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark { display: block; border-radius: 7px; }

.header-search { flex: 1; min-width: 0; }
.header-search input {
    width: 100%;
    padding: .45rem .8rem;
    border: 1px solid rgb(255 255 255 / .28);
    border-radius: 999px;
    background: rgb(255 255 255 / .14);
    color: var(--header-text);
    font-size: .95rem;
}
.header-search input::placeholder { color: var(--header-muted); }
.header-search input:focus { outline: 2px solid rgb(255 255 255 / .85); border-color: transparent; }

.site-nav { display: flex; gap: .9rem; }
.site-nav a { color: var(--header-text); font-weight: 550; }

/* ---------- Hero / sections ---------- */

.hero {
    padding: 2.2rem 0 1.2rem;
}
.hero h1 { font-size: 1.9rem; letter-spacing: -0.02em; }
.hero p { max-width: 56ch; }

.hero-search {
    display: flex;
    gap: .5rem;
    margin: 1.1rem 0;
    max-width: 480px;
}
.hero-search input {
    flex: 1;
    min-width: 0;
    padding: .65rem .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
}
.hero-search input:focus { outline: 2px solid var(--accent); border-color: transparent; }

.popular { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

.section { margin: 1.8rem 0 0; }
.section-title {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    font-weight: 650;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .7rem;
}

.date-head {
    font-size: .95rem;
    margin: 1.1rem 0 .45rem;
    display: flex;
    gap: .5rem;
    align-items: baseline;
}

/* ---------- Buttons & chips ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .5rem 1.1rem;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.2;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(0.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; }
.btn-small { padding: .25rem .7rem; font-size: .85rem; }

.chip, .chip-static {
    display: inline-block;
    padding: .15rem .65rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 650;
    background: light-dark(hsl(var(--h, 150) 45% 91%), hsl(var(--h, 150) 45% 24%));
    color: light-dark(hsl(var(--h, 150) 55% 26%), hsl(var(--h, 150) 55% 78%));
    white-space: nowrap;
}
a.chip:hover { text-decoration: none; filter: brightness(0.95); }

/* ---------- Avatars & pills ---------- */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    background: light-dark(hsl(var(--h, 150) 42% 88%), hsl(var(--h, 150) 42% 26%));
    color: light-dark(hsl(var(--h, 150) 50% 28%), hsl(var(--h, 150) 50% 80%));
    user-select: none;
}
.avatar { vertical-align: middle; }
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }

.pill {
    display: inline-block;
    padding: .12rem .6rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text-muted);
    white-space: nowrap;
}
.pill-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

/* ---------- Hero game card ---------- */

.hero-game {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
}
.hero-game.is-live { border-color: var(--live); }

.hero-game-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .9rem;
}

.hero-game-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: .5rem;
    align-items: start;
}

.hero-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    text-align: center;
    min-width: 0;
}
.hero-side-name { font-size: .85rem; font-weight: 650; overflow-wrap: anywhere; }

.hero-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    padding-top: .35rem;
}
.hero-big {
    font-size: 1.7rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.hero-sub { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }

.hero-game-actions {
    display: flex;
    gap: .5rem;
    margin-top: .9rem;
}
.hero-game-actions .btn { flex: 1; text-align: center; }

/* ---------- Scoreboard match rows ---------- */

.match-list { display: flex; flex-direction: column; gap: .4rem; }

.match-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: .6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .55rem .8rem;
    color: var(--text);
}
a.match-row:hover { text-decoration: none; border-color: var(--accent); }
.match-row.is-live { border-color: var(--live); }

.match-slot {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    font-size: .85rem;
    min-width: 3.2rem;
}
.match-date {
    font-size: .8rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 4.2rem;
}

.match-side { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.match-side.side-r { justify-content: flex-end; }
.match-name {
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.match-name a { color: var(--text); }

.match-score {
    font-size: .95rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.match-tag { grid-column: 1 / -1; font-size: .78rem; margin-top: -0.15rem; }

/* ---------- Gameday: stats, slots, Dein Tag ---------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: .5rem;
    margin: 1rem 0;
}
.stat {
    background: var(--surface-2);
    border-radius: 10px;
    padding: .55rem .75rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.stat-value { font-size: 1.15rem; font-weight: 750; font-variant-numeric: tabular-nums; }

.slot-head {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin: .9rem 0 .35rem;
    font-variant-numeric: tabular-nums;
}

.myday {
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    padding: .7rem .9rem;
    margin: .9rem 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.myday-row { display: flex; align-items: center; gap: .45rem; font-size: .92rem; flex-wrap: wrap; }
.myday-ref { color: var(--text-muted); }

.match-row.row-mine { border-color: var(--accent); background: var(--accent-soft); }
.match-row.row-ref { border-style: dashed; border-color: var(--accent); }

/* ---------- Gameday: field swim-lane calendar ---------- */

.cal-scroll { overflow-x: auto; margin: .6rem 0 .2rem; -webkit-overflow-scrolling: touch; }

.field-cal {
    display: grid;
    gap: .4rem;
    align-items: stretch;
}

.cal-corner { position: sticky; left: 0; }

.cal-fieldhead {
    font-size: .8rem;
    font-weight: 750;
    text-align: center;
    padding: .35rem .4rem;
    background: var(--surface-2);
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cal-time {
    position: sticky;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: .5rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    background: var(--bg);
    z-index: 1;
}

.cal-cell { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }

.cal-game {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 8px;
    padding: .4rem .5rem;
    color: var(--text);
    min-height: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.cal-game:hover { text-decoration: none; border-color: var(--accent); border-left-color: var(--accent); }
.cal-game.is-live { border-left-color: var(--live); }
.cal-game.is-mine { border-left-color: var(--accent); background: var(--accent-soft); }
.cal-game.is-ref { border-style: dashed; }

.cal-live { align-self: flex-start; margin-bottom: .1rem; }

.cal-team {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .4rem;
    min-width: 0;
}
.cal-tname {
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cal-team.cal-win .cal-tname { font-weight: 800; }
.cal-pts {
    font-size: .9rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    flex: none;
}
.cal-team.cal-win .cal-pts { color: var(--accent); }

.cal-foot {
    font-size: .72rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: .15rem;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

.duty-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .8rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--text);
    flex-wrap: wrap;
}
.duty-row:hover { text-decoration: none; border-color: var(--accent); }
.duty-icon { font-size: .8rem; }
.duty-what { font-size: .92rem; }
.small-note { font-size: .88rem; margin-top: -0.3rem; }

/* ---------- Form strip ---------- */

.form-strip { display: inline-flex; gap: 3px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-S { background: var(--win); }
.dot-N { background: var(--loss); }
.dot-U { background: var(--text-muted); }

.row-me td { background: var(--accent-soft); font-weight: 650; }
.cell-team a { color: var(--text); }
.cell-team > * { vertical-align: middle; }
.cell-team .avatar { margin-right: .3rem; }

/* ---------- Game cards ---------- */

.team-block { margin-bottom: 1.1rem; }
.team-block-head { margin-bottom: .4rem; display: flex; align-items: center; gap: .45rem; }
.team-header-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .35rem; }
.team-header-row h1 { margin: 0; }
.team-name { font-weight: 700; font-size: 1.1rem; color: var(--text); }

.game-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .9rem 1rem;
    margin-bottom: .6rem;
}
.game-card.is-live { border-color: var(--live); }

.game-when {
    display: flex;
    gap: .7rem;
    align-items: baseline;
    font-size: .9rem;
    color: var(--text-muted);
}
.game-day { font-weight: 700; color: var(--accent); text-transform: capitalize; }
.game-time { font-weight: 650; color: var(--text); }

.game-match {
    display: flex;
    align-items: baseline;
    gap: .45rem;
    font-size: 1.15rem;
    margin: .25rem 0;
    flex-wrap: wrap;
}
.game-vs { color: var(--text-muted); font-size: .95rem; }
.game-opponent { font-weight: 700; color: var(--text); }

.game-meta { font-size: .88rem; color: var(--text-muted); }
.game-meta a { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border); }
.game-meta a:hover { color: var(--accent); }

/* ---------- Scores & badges ---------- */

.score {
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    margin-left: auto;
}
.score-win { color: var(--win); }
.score-loss { color: var(--loss); }

.badge-live {
    display: inline-block;
    background: var(--live);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
    border-radius: 4px;
    padding: .1rem .45rem;
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .55; } }

.standing-badge {
    background: var(--surface-2);
    border-radius: 999px;
    padding: .15rem .65rem;
    font-size: .8rem;
    font-weight: 650;
}

/* ---------- Gameday rows ---------- */

.gameday-list { display: flex; flex-direction: column; gap: .35rem; }

.gameday-row {
    display: flex;
    align-items: baseline;
    gap: .7rem;
    padding: .55rem .8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    flex-wrap: wrap;
}
.gameday-row:hover { text-decoration: none; border-color: var(--accent); }
.gameday-date { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: .9rem; white-space: nowrap; }
.gameday-name { font-weight: 650; flex: 1; min-width: 12ch; }

/* ---------- Team page ---------- */

.team-header { padding: 1.6rem 0 0; }
.team-header h1 { font-size: 1.7rem; letter-spacing: -0.02em; }
.team-header-meta { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.team-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .9rem; }
.team-actions form { display: contents; }

/* ---------- Modal (pure CSS, :target) ---------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-toggle:checked ~ .modal { display: flex; }
.modal-close { cursor: pointer; }
.modal-backdrop { cursor: default; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / .55);
}
.modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 30rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-close {
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1;
    padding: .2rem .4rem;
}
.modal-close:hover { color: var(--text); text-decoration: none; }
.gameday-facts { margin: .3rem 0 0; }

.ical-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .8rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.ical-box input {
    width: 100%;
    padding: .5rem .7rem;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .82rem;
}
.ical-links { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Results ---------- */

.result-list { display: flex; flex-direction: column; gap: .35rem; }

.result-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .5rem .8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
}
.result-row:hover { text-decoration: none; border-color: var(--accent); }
.result-date { color: var(--text-muted); font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-opp { font-weight: 600; flex: 1; }

.result-outcome {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.outcome-S { background: var(--win); }
.outcome-N { background: var(--loss); }
.outcome-U { background: var(--text-muted); }

/* ---------- Tables ---------- */

.match-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: .95rem;
}
.match-table th, .match-table td {
    text-align: left;
    padding: .5rem .65rem;
    border-bottom: 1px solid var(--border);
}
.match-table th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    background: var(--surface-2);
}
.match-table tr:last-child td { border-bottom: none; }
.match-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.match-table .row-live { background: var(--live-soft); }
.match-teams a { font-weight: 650; }
.match-group { display: block; font-size: .8rem; }

.table-scroll { overflow-x: auto; }

.source-note { font-size: .85rem; margin-top: 1rem; }

/* ---------- Live ---------- */

.live-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); margin-top: 1rem; }

.live-card {
    background: var(--surface);
    border: 1px solid var(--live);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .9rem 1rem;
}
.live-status { display: flex; gap: .6rem; align-items: center; font-size: .85rem; margin-bottom: .5rem; }
.live-row { display: flex; justify-content: space-between; align-items: baseline; padding: .15rem 0; }
.live-team { font-weight: 650; }
.live-row.has-ball .live-team::after { content: " 🏈"; font-size: .8rem; }
.live-score { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.tick-list {
    margin: .6rem 0 0;
    padding: .5rem 0 0;
    border-top: 1px dashed var(--border);
    list-style: none;
    font-size: .85rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

/* ---------- Game detail: scoreboard ---------- */

.back-link { color: var(--text-muted); font-weight: 600; font-size: .9rem; }

.scoreboard {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: .6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem 1rem;
    margin: .4rem 0 .2rem;
}
.scoreboard.is-live { border-color: var(--live); }

.sb-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    text-align: center;
    min-width: 0;
}
.sb-name { font-size: .95rem; font-weight: 700; overflow-wrap: anywhere; }
.sb-name a { color: var(--text); }
.sb-side.sb-win .sb-name { color: var(--win); }
.sb-tag {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}

.sb-mid { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding-top: .4rem; }
.sb-score {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    font-size: 2.3rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
}
.sb-score .sb-win { color: var(--win); }
.sb-score .sb-loss { color: var(--text-muted); }
.sb-colon { color: var(--text-muted); font-weight: 600; }
.sb-status { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }

.tick-list-page { max-height: none; }

/* ---------- Game detail: comparison bars ---------- */

.compare { display: flex; flex-direction: column; gap: .9rem; margin: .2rem 0 1rem; }
.compare-row {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    align-items: center;
    gap: .5rem;
    row-gap: .15rem;
}
.compare-val { font-weight: 750; font-variant-numeric: tabular-nums; }
.compare-row .compare-val:last-of-type { text-align: right; }
.compare-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.compare-fill { height: 100%; }
.compare-home { background: var(--accent); }
.compare-away { background: light-dark(#8fa1ad, #50626e); }
.compare-label {
    grid-column: 1 / -1;
    text-align: center;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}

.match-table tr.row-win td { font-weight: 700; }

/* ---------- Game detail: season form ---------- */

.form-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .7rem .8rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.form-team { display: flex; align-items: center; gap: .4rem; color: var(--text); }
.form-team strong { overflow-wrap: anywhere; }
.form-record { font-size: .85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    padding: 1.2rem 0 2rem;
    font-size: .85rem;
    color: var(--text-muted);
}
.site-footer p { margin: .3rem 0; }

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
    /* Keep "Mein Team"/"Live" reachable on phones; the brand text gives way instead. */
    .brand-name { display: none; }
    .site-nav { gap: .7rem; font-size: .9rem; white-space: nowrap; }
    .header-inner { gap: .6rem; }
    .hero h1 { font-size: 1.5rem; }
    .game-match { font-size: 1.05rem; }
}

/* ---------- Scorecard (hidden tool, tablet-first) ---------- */

.sc-login { max-width: 420px; margin: 2rem auto; }
.sc-login-form { display: flex; flex-direction: column; gap: .9rem; margin-top: 1rem; }
.sc-login-form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .92rem; }
.sc-login-form input, .sc-input {
    padding: .7rem .9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 1.05rem;
    width: 100%;
}
.sc-login-form input:focus, .sc-input:focus { outline: 2px solid var(--accent); border-color: transparent; }

.sc-error {
    background: var(--live-soft);
    border: 1px solid var(--live);
    color: var(--text);
    border-radius: 10px;
    padding: .6rem .9rem;
    margin: .8rem 0;
    display: flex;
    gap: .6rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.sc-loading { padding: 3rem 0; text-align: center; }

.sc-top { display: flex; align-items: center; gap: .6rem; padding: .9rem 0 .5rem; flex-wrap: wrap; }
.sc-top .pill { margin-left: auto; }
.sc-top .pill + * { margin-left: 0; }

.sc-board { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

.sc-team {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    padding: .9rem .5rem .6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    cursor: pointer;
    min-height: 9rem;
}
.sc-team.has-ball { border-color: var(--accent); background: var(--accent-soft); }
.sc-team:disabled { opacity: .75; }
.sc-team-name { font-weight: 700; font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.sc-score { font-size: 3.4rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sc-ball { font-size: .8rem; color: var(--accent); font-weight: 700; min-height: 1.1rem; }

.sc-actions { margin-top: 1rem; }
.sc-actions-for { margin: 0 0 .5rem; font-size: .92rem; }

.sc-btn {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 1rem .5rem;
    cursor: pointer;
    width: 100%;
}
.sc-btn:active { transform: scale(.98); }
.sc-btn:disabled { opacity: .45; cursor: default; }

.sc-btn-td {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    font-size: 1.5rem;
    letter-spacing: .04em;
    padding: 1.2rem;
    margin-bottom: .6rem;
}

.sc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
@media (max-width: 560px) { .sc-grid { grid-template-columns: repeat(2, 1fr); } }

.sc-panel { margin-top: 1.2rem; }
.sc-wide { width: 100%; margin-top: .8rem; padding: .9rem; font-size: 1.1rem; }

.sc-choice { display: flex; gap: .5rem; flex-wrap: wrap; margin: .4rem 0 .8rem; }
.sc-choice-col { flex-direction: column; }
.sc-choice-btn {
    flex: 1;
    min-width: 7rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-weight: 650;
    padding: .8rem .6rem;
    cursor: pointer;
}
.sc-choice-btn.sel { border-color: var(--accent); background: var(--accent-soft); }

.sc-penalties { display: flex; flex-direction: column; gap: .4rem; max-height: 14rem; overflow-y: auto; margin-bottom: .8rem; }
.sc-penalty { display: flex; flex-direction: column; gap: .1rem; text-align: left; font-size: .92rem; }

/* Event log */
.sc-log { display: flex; flex-direction: column; gap: .3rem; }
.sc-log-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .45rem .7rem;
}
.sc-log-half { font-size: .75rem; min-width: 2.2rem; }
.sc-log-team {
    font-size: .8rem;
    font-weight: 700;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: light-dark(hsl(var(--h, 150) 45% 91%), hsl(var(--h, 150) 45% 24%));
    color: light-dark(hsl(var(--h, 150) 55% 26%), hsl(var(--h, 150) 55% 78%));
    white-space: nowrap;
}
.sc-log-event { flex: 1; font-size: .95rem; }
.sc-log-del {
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: .2rem .4rem;
}
.sc-log-del:hover { color: var(--live); }

/* Number pad */
.pad { margin: .6rem 0; }
.pad-display {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: .4rem;
}
.pad-label { font-size: .85rem; color: var(--text-muted); }
.pad-value { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pad-empty .pad-value { color: var(--text-muted); }
.pad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.pad-key {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 1.4rem;
    font-weight: 700;
    padding: .7rem;
    cursor: pointer;
}
.pad-key:active { transform: scale(.96); }
.pad-key-mute { color: var(--text-muted); }

/* Bottom sheet */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / .45);
    z-index: 30;
}
.sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 31;
    background: var(--bg);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border: 1px solid var(--border);
    border-bottom: none;
    padding: 1.1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    max-width: 560px;
    margin: 0 auto;
    max-height: 86dvh;
    overflow-y: auto;
}
.sheet h3 { margin-top: 0; }

.sc-pending {
    width: 100%;
    text-align: left;
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    color: var(--text);
    border-radius: 10px;
    padding: .7rem .9rem;
    margin: .8rem 0 0;
    font-size: .95rem;
    cursor: pointer;
}
.sc-hint { font-size: .85rem; text-align: center; margin: .5rem 0 0; }

/* ---------- Scorecard v2: stage-based tracker ---------- */

.sc-board2 {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: .4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem .6rem .7rem;
}

.sc-side2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    min-width: 0;
}
.sc-side2-name {
    font-weight: 700;
    font-size: .95rem;
    text-align: center;
    overflow-wrap: anywhere;
    line-height: 1.2;
}
.sc-score2 {
    font-size: 3.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
}
.sc-side2.has-ball .sc-score2 { color: var(--accent); }
.sc-divider {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-muted);
    padding-top: 1.4rem;
}
.sc-poss-tag {
    font-size: .78rem;
    font-weight: 700;
    color: var(--accent);
    min-height: 1.1rem;
    white-space: pre;
}

.sc-stage-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}
.sc-stage-card h3 { margin: 0 0 .3rem; }
.sc-stage-card .sc-choice { margin-top: .8rem; }

.sc-drivebar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .2rem;
}
.sc-drive-text { flex: 1; font-size: .95rem; }
.sc-swap {
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 2.2rem;
    height: 2.2rem;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
}
.sc-swap:hover { color: var(--accent); border-color: var(--accent); }

.sc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

.sc-tertiary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    margin-top: .7rem;
}
.sc-tertiary button {
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    padding: .35rem .5rem;
}
.sc-tertiary button:hover { color: var(--accent); }

.sc-undo {
    display: block;
    width: 100%;
    text-align: left;
    margin-top: .9rem;
    background: none;
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: .88rem;
    padding: .5rem .8rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-undo:hover { color: var(--live); border-color: var(--live); }

.sc-choice-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
    width: 100%;
    text-align: left;
    margin-bottom: .5rem;
}

/* ---------- Scorecard log v2: running score, half groups ---------- */

.sc-log-head {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    margin: .5rem 0 .1rem;
}

.sc-log-score {
    font-variant-numeric: tabular-nums;
    font-size: .85rem;
    color: var(--text-muted);
    min-width: 2.9rem;
    text-align: right;
}
.sc-log-row.is-score .sc-log-score {
    color: var(--text);
    font-weight: 750;
}
.sc-log-row.is-score { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

.sc-log-pts {
    background: var(--accent);
    color: var(--accent-ink);
    font-size: .75rem;
    font-weight: 800;
    border-radius: 999px;
    padding: .08rem .5rem;
    white-space: nowrap;
}

.sc-log-cop {
    color: var(--text-muted);
    margin-right: .25rem;
    font-weight: 700;
}
.sc-log-note { font-size: .72rem; margin-top: .5rem; }

/* ---------- Roster pad (jersey grid from gameday check-in) ---------- */

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: .45rem;
    margin: .4rem 0;
}
.roster-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .05rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    padding: .5rem .3rem .4rem;
    cursor: pointer;
}
.roster-chip.sel { border-color: var(--accent); background: var(--accent-soft); }
.roster-no { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.roster-name {
    font-size: .7rem;
    color: var(--text-muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.roster-alt {
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: .85rem;
    text-decoration: underline;
    cursor: pointer;
    padding: .3rem 0;
}
.roster-alt:hover { color: var(--accent); }
.roster-warn { color: var(--gold); font-size: .85rem; margin: .2rem 0; }

.roster-suggest { margin-bottom: .5rem; }
.roster-suggest .roster-chip { animation: suggest-in .15s ease-out; }
@keyframes suggest-in { from { opacity: 0; transform: translateY(2px); } }

.pad-key:disabled { opacity: .28; cursor: default; }

.avatar-img {
    object-fit: contain;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}


/* ---------- Logo admin ---------- */

.logo-list { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.logo-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .55rem .8rem;
}
.logo-row.is-busy { opacity: .7; }
.logo-row-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.logo-team-name { flex: 1; min-width: 10ch; }
.logo-status { font-size: .82rem; }
.logo-actions { display: flex; gap: .4rem; align-items: center; }
.logo-upload { position: relative; overflow: hidden; cursor: pointer; }
.logo-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.logo-candidates {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: .6rem;
    padding-top: .6rem;
    border-top: 1px dashed var(--border);
}
.logo-candidate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: .45rem;
    cursor: pointer;
    max-width: 7.5rem;
}
.logo-candidate:hover { border-color: var(--accent); }
.logo-candidate img { width: 56px; height: 56px; object-fit: contain; }
.logo-candidate span { font-size: .68rem; overflow-wrap: anywhere; }

.logo-members { display: block; font-size: .78rem; }



.logo-url-row { display: flex; gap: .4rem; margin-top: .5rem; }
.logo-url-input {
    flex: 1;
    min-width: 0;
    padding: .4rem .6rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: .85rem;
}
.logo-url-input:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* ---------- Mein Team ---------- */

.my-strip-list { display: flex; flex-direction: column; gap: .4rem; }
.my-strip {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}
.my-strip:hover { text-decoration: none; border-color: var(--accent); }
.my-strip-name { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-strip-next { margin-left: auto; text-align: right; font-size: .9rem; white-space: nowrap; }

.my-team {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
}
.my-team-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; }
.my-team-title { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.my-team-name { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.my-team-name:hover { text-decoration: none; color: var(--accent); }
.my-team-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.my-team-head form { margin-left: auto; }
.my-team-rows { margin-top: .6rem; display: flex; flex-direction: column; gap: .25rem; }
.my-team-links { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }

@media (max-width: 480px) {
    .my-strip-next strong { display: block; }
}

/* ---------- Ligen overview ---------- */

.league-list { display: flex; flex-direction: column; gap: .4rem; }
.league-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}
.league-row:hover { text-decoration: none; border-color: var(--accent); }
.league-facts { font-size: .88rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.league-next { margin-left: auto; font-size: .88rem; white-space: nowrap; }

@media (max-width: 480px) {
    .league-next { display: none; }
}

/* ---------- Live & heute ---------- */

.filter-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.2rem; }
.filter-chip {
    display: inline-block;
    padding: .25rem .7rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 650;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: var(--surface);
}
.filter-chip:hover { text-decoration: none; border-color: var(--accent); }
.filter-chip.is-on {
    background: light-dark(hsl(var(--h, 150) 45% 91%), hsl(var(--h, 150) 45% 24%));
    color: light-dark(hsl(var(--h, 150) 55% 26%), hsl(var(--h, 150) 55% 80%));
    border-color: transparent;
}

.live-gd { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: .7rem; overflow: hidden; }
.live-gd[open] { box-shadow: var(--shadow); }
.live-gd-head {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    padding: .7rem .85rem; cursor: pointer; list-style: none;
}
.live-gd-head::-webkit-details-marker { display: none; }
.live-gd-title { display: flex; align-items: center; gap: .5rem; min-width: 0; flex-wrap: wrap; }
.live-gd-meta { display: flex; align-items: center; gap: .55rem; flex-shrink: 0; }
.live-gd-caret { transition: transform .15s ease; color: var(--text-muted); font-size: .8rem; }
.live-gd[open] .live-gd-caret { transform: rotate(180deg); }
.live-gd-body { padding: 0 .85rem .85rem; }
.live-gd-links { display: flex; gap: 1rem; font-size: .85rem; margin: .1rem 0 .7rem; }

.live-games { display: flex; flex-direction: column; gap: .4rem; }
.live-game {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: .2rem .7rem;
    align-items: center;
    padding: .55rem .7rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg);
    color: var(--text);
}
.live-game:hover { text-decoration: none; border-color: var(--accent); }
.live-game.live { border-color: var(--live); }
.live-game.done { opacity: .82; }
.lg-state { display: flex; flex-direction: column; gap: .2rem; font-size: .78rem; }
.lg-field { font-size: .72rem; }
.lg-body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.lg-team { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.lg-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.lg-team.lg-win .lg-name { font-weight: 700; }
.lg-ball { color: var(--accent); font-size: .6rem; flex-shrink: 0; }
.lg-pts { font-family: var(--font-score); font-weight: 700; font-size: 1.1rem; min-width: 1.4ch; text-align: right; }
.lg-foot { grid-column: 2; font-size: .76rem; }
.lg-ticks { margin: -.1rem 0 .2rem; padding: .4rem .7rem; background: var(--surface-2); border-radius: 8px; font-size: .8rem; }

@media (max-width: 480px) {
    .live-game { grid-template-columns: 4.7rem 1fr; }
    .lg-pts { font-size: 1rem; }
}

/* ---------- Liveticker tick attribution ---------- */
.tick-time { font-variant-numeric: tabular-nums; margin-right: .4rem; }
.tick-team {
    display: inline-block;
    padding: 0 .4rem;
    margin: 0 .15rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 650;
    background: light-dark(hsl(var(--h, 150) 45% 91%), hsl(var(--h, 150) 45% 24%));
    color: light-dark(hsl(var(--h, 150) 55% 26%), hsl(var(--h, 150) 55% 80%));
}
.sb-ball { font-size: .72rem; font-weight: 650; color: var(--live); white-space: nowrap; }

/* ---------- Match timeline (compact left/right play-by-play) ---------- */
.tl { display: flex; flex-direction: column; }
.tl-half {
    display: flex; align-items: center; text-align: center;
    color: var(--text-muted); font-size: .74rem; font-weight: 650;
    text-transform: uppercase; letter-spacing: .05em;
    margin: .5rem 0;
}
.tl-half::before, .tl-half::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.tl-half span { padding: 0 .7rem; }
.tl-note { font-size: .74rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text-muted); }

.tl-row {
    display: grid;
    grid-template-columns: 1fr 3.4rem 1fr;
    align-items: center;
    gap: .35rem;
    padding: .12rem 0;
}
.tl-side { min-width: 0; display: flex; }
.tl-l { justify-content: flex-end; }
.tl-r { justify-content: flex-start; }

.tl-ev {
    display: inline-flex; align-items: center; gap: .35rem;
    max-width: 100%;
    padding: .12rem .1rem;
    font-size: .85rem; line-height: 1.25;
}
.tl-r .tl-ev { flex-direction: row-reverse; }
/* Scoring plays (touchdown, safety) get a soft team-tinted pill so they stand out;
   routine play-by-play (first down, penalty, turnover, …) stays as quiet text. */
.tl-ev.tl-scoring {
    padding: .18rem .5rem;
    border-radius: 7px;
    background: light-dark(hsl(var(--h, 150) 48% 95%), hsl(var(--h, 150) 32% 18%));
}
.tl-icon {
    font-size: .8rem; flex-shrink: 0;
    color: light-dark(hsl(var(--h, 150) 45% 42%), hsl(var(--h, 150) 48% 62%));
}
.tl-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tl-det { color: var(--text-muted); font-weight: 400; margin-inline-start: .3rem; }
.tl-pts {
    flex-shrink: 0;
    font-family: var(--font-score); font-weight: 700; font-size: .72rem;
    color: var(--accent-ink); background: var(--accent);
    padding: 0 .3rem; border-radius: 999px;
}

.tl-mid { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.tl-time { font-size: .68rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
/* Possession-change arrow: points to the team that ends up with the ball. */
.tl-dir { font-size: .95rem; line-height: 1; color: light-dark(hsl(var(--h, 150) 52% 42%), hsl(var(--h, 150) 52% 62%)); }
.tl-score { font-family: var(--font-score); font-weight: 700; font-size: .82rem; white-space: nowrap; }
.tl-colon { margin: 0 .03rem; color: var(--text-muted); }

@media (max-width: 480px) {
    .tl-row { grid-template-columns: 1fr 2.9rem 1fr; gap: .25rem; }
    .tl-ev { font-size: .8rem; }
    .tl-ev.tl-scoring { padding: .16rem .4rem; }
}

.tl-mid { display: flex; align-items: center; justify-content: center; }
.tl-score { font-family: var(--font-score); font-weight: 700; font-size: 1rem; white-space: nowrap; }
.tl-colon { margin: 0 .05rem; color: var(--text-muted); }
.tl-swap { color: var(--text-muted); font-size: .9rem; }

@media (max-width: 480px) {
    .tl-row { grid-template-columns: 1fr 3rem 1fr; gap: .25rem; }
    .tl-head { font-size: .82rem; }
    .tl-score { font-size: .9rem; }
}

/* ---------- Star toggle (follow/unfollow) ---------- */
.star-toggle {
    border: none;
    background: none;
    cursor: pointer;
    padding: .3rem;
    line-height: 1;
    font-size: 1.25rem;
    color: var(--border);          /* off: faint outline-grey */
    transition: color .12s ease, transform .12s ease;
}
.star-toggle.is-on { color: var(--gold); }   /* on: filled gold star */
.star-toggle:hover { transform: scale(1.12); }
.star-toggle.is-on:hover { color: light-dark(#b88300, #ffd86b); }

/* ---------- KO bracket ---------- */
.bracket-scroll { overflow-x: auto; padding-bottom: .3rem; }
.bracket { display: flex; gap: 1rem; min-width: min-content; }
.bracket-round {
    display: flex;
    flex-direction: column;
    flex: 0 1 11rem;
    min-width: 9rem;
}
.bracket-round-title {
    font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-muted); margin: 0 0 .45rem; text-align: center;
}
/* Title pinned to the top of each column; matches share the remaining height, so a
   single final centres against the two semifinals above it. */
.bracket-round-matches {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: .55rem;
}
.bracket-match {
    display: block;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    padding: .35rem .5rem;
    color: var(--text);
}
.bracket-match:hover { text-decoration: none; border-color: var(--accent); }
.bracket-match.is-final { border-color: var(--gold); background: var(--gold-soft); }
.bracket-match.is-live { border-color: var(--live); }
.bracket-match.is-mine { box-shadow: inset 0 0 0 1px var(--accent); }
.bm-label { display: block; font-size: .66rem; color: var(--text-muted); margin-bottom: .2rem; }
.bm-label-final { color: var(--gold); font-weight: 650; }
.bm-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .1rem 0; font-size: .85rem; }
.bm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-row.bm-win .bm-name { font-weight: 700; }
.bm-pts { font-family: var(--font-score); font-weight: 700; font-size: .95rem; flex-shrink: 0; }

/* ---------- Passcheck: overview ---------- */
.pc-games { display: flex; flex-direction: column; gap: .7rem; }
.pc-game { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.pc-game-when {
    display: flex; align-items: center; gap: .4rem;
    font-size: .8rem; color: var(--text-muted);
    padding: .5rem .8rem; border-bottom: 1px solid var(--border);
}
.pc-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.pc-side {
    display: flex; align-items: center; gap: .55rem; min-width: 0;
    padding: .7rem .8rem; color: var(--text); text-decoration: none;
    background: var(--surface);
}
.pc-side:hover { background: var(--surface-2); text-decoration: none; }
.pc-side.is-checked { background: var(--gold-soft); }
.pc-side.is-empty { color: var(--text-muted); }
.pc-side-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pc-side-status { display: flex; align-items: center; gap: .3rem; font-size: .76rem; color: var(--text-muted); white-space: nowrap; }
.pc-side-status.is-checked { color: var(--gold); font-weight: 650; }
@media (max-width: 480px) { .pc-sides { grid-template-columns: 1fr; } }

/* ---------- Passcheck: roster workbench ---------- */
.pc-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.pc-team { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.pc-team strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-progress { display: flex; align-items: baseline; gap: .5rem; margin: .5rem 0 .8rem; }
.pc-count { font-family: var(--font-score); font-weight: 700; font-size: 1.6rem; }
.pc-range { margin-left: auto; font-size: .78rem; display: flex; align-items: center; gap: .3rem; }
.pc-range.is-ok { color: light-dark(#1d8a5b, #5dcaa5); }
.pc-range.is-warn { color: var(--live); }
.pc-search { width: 100%; margin-bottom: .5rem; }
.pc-bulk { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; }
.pc-sort { margin-left: auto; font-size: .74rem; }
.pc-chip-warn i { color: var(--live); margin-right: .2rem; }

.pc-list { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 0 .8rem; }
.pc-row { display: flex; align-items: center; gap: .7rem; padding: .55rem .1rem; border-bottom: 1px solid var(--border); }
.pc-row:last-child { border-bottom: none; }
.pc-row.is-locked { opacity: .65; }
.pc-empty { padding: .9rem; text-align: center; }

.pc-jersey {
    position: relative; flex: 0 0 auto;
    width: 44px; height: 44px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
    font-family: var(--font-score); font-weight: 700; font-size: 1.05rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.pc-jersey:disabled { cursor: default; opacity: .85; }
.pc-jersey.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pc-jersey.dup { background: light-dark(#fdecec, #3a1f1f); color: var(--live); border-color: var(--live); }
.pc-jersey-edit {
    position: absolute; right: -4px; bottom: -4px; font-size: .58rem;
    background: var(--surface); color: var(--text-muted); border: 1px solid var(--border);
    border-radius: 50%; padding: 3px; line-height: 1;
}
.pc-row-main {
    flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem;
    background: none; border: none; padding: 0; text-align: left; color: inherit; cursor: pointer;
}
.pc-row-main:disabled { cursor: default; }
.pc-name { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-sub { font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-sub.is-faint { color: var(--text-muted); }
/* Warnings and eligibility reasons must stay fully readable — let them wrap. */
.pc-sub.is-warn { color: var(--gold); white-space: normal; overflow: visible; text-overflow: clip; }
.pc-sub.is-danger { color: var(--live); white-space: normal; overflow: visible; text-overflow: clip; }
.pc-present {
    flex: 0 0 auto; white-space: nowrap; cursor: pointer;
    display: flex; align-items: center; gap: .3rem;
    font-size: .78rem; padding: .4rem .7rem; border-radius: 999px;
    border: 1px solid var(--border); background: none; color: var(--text-muted);
}
.pc-present.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 650; }
.pc-present.locked { border: none; cursor: default; }

.pc-accordion { margin-top: .8rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pc-acc-head {
    width: 100%; display: flex; align-items: center; gap: .5rem;
    padding: .7rem .8rem; background: var(--surface); border: none; color: var(--text);
    cursor: pointer; font-size: .9rem;
}
.pc-acc-title { font-weight: 600; }
.pc-acc-head > .fa-chevron-up, .pc-acc-head > .fa-chevron-down { margin-left: auto; color: var(--text-muted); }
.pc-accordion .pc-list { border: none; border-top: 1px solid var(--border); border-radius: 0; }

.pc-official { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0; }
.pc-official label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; color: var(--text-muted); }
.pc-note { resize: vertical; }

.pc-footer {
    position: sticky; bottom: 0; z-index: 5;
    display: flex; align-items: center; gap: .8rem;
    padding: .7rem 0; margin-top: 1rem;
    background: var(--bg); border-top: 1px solid var(--border);
}
.pc-footer-info { font-size: .82rem; }
.pc-footer .btn { margin-left: auto; }
.pc-footer-warn { color: var(--live); margin-left: .4rem; white-space: nowrap; }

.pc-confirm-jerseys { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.pc-confirm-chip { display: flex; align-items: center; gap: .3rem; font-size: .8rem; background: var(--surface-2); border-radius: 999px; padding: .2rem .6rem; }
.pc-confirm-num { font-family: var(--font-score); font-weight: 700; }
.pc-confirm-name { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; color: var(--text-muted); margin: .5rem 0; }
