/* ==========================================================================
   Sideline · „Flutlicht“
   Indigo and floodlight yellow (the yellow from the mark). Light by default;
   dark mode is the night game. Unbounded for times, scores and titles,
   Instrument Sans for everything you read. Both fonts are served locally
   (wwwroot/fonts, SIL OFL) — no third-party requests.
   ========================================================================== */

@font-face {
    font-family: "Unbounded";
    src: url("/fonts/unbounded-latin.woff2") format("woff2");
    font-weight: 500 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Instrument Sans";
    src: url("/fonts/instrument-sans-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    /* Core palette */
    --indigo: #3b2db3;
    --floodlight: #f6fa06;
    --ink: #1b1633;
    --night: #120e26;

    --bg: light-dark(#f2f0f7, #120e26);
    --surface: light-dark(#ffffff, #1d1840);
    --surface-2: light-dark(#e9e6f3, #2b2556);
    --text: light-dark(#1b1633, #f2f0f7);
    --text-muted: light-dark(#5e5877, #a8a2c4);
    --border: light-dark(#d9d5e6, #2e2860);
    /* Accent: indigo on light, floodlight yellow on dark (yellow text fails on white). */
    --accent: light-dark(#3b2db3, #f6fa06);
    --accent-ink: light-dark(#ffffff, #120e26);
    --accent-soft: light-dark(#e4e0f1, #2c2a3f);
    /* The big "next game" panel is indigo in both modes. */
    --hero-bg: #3b2db3;
    --hero-text: #ffffff;
    --hero-muted: rgb(255 255 255 / .78);
    --header-bg: light-dark(#ffffff, #1d1840);
    --header-text: var(--text);
    --header-muted: var(--text-muted);
    --gold: light-dark(#7a6a00, #f6fa06);
    --gold-soft: light-dark(#fbfcd6, #2c2a1a);
    --gold-border: light-dark(#d9d86a, #6b6a26);
    --live: light-dark(#d33a22, #ff6a4d);
    --live-soft: light-dark(#fcebe7, #3a1d24);
    /* Wins are filled/strong, losses quiet — no red/green pair. */
    --win: var(--accent);
    --loss: var(--text-muted);
    --radius: 18px;
    --radius-lg: 28px;
    --shadow: 0 1px 2px rgb(27 22 51 / .06);
    --font-body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Unbounded", "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-score: var(--font-display);
}

* { box-sizing: border-box; }

@view-transition { navigation: auto; }

html { -webkit-text-size-adjust: 100%; }
/* Full-bleed bands reach 100vw; clip (not hidden) keeps position: sticky working. */
html, body { overflow-x: clip; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; }
h1:focus { outline: none; }

.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; }
.eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.container {
    max-width: 1304px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}
@media (max-width: 760px) { .container { padding: 0 1rem 3rem; } }
/* Single-column pages (lists, search) keep a readable measure. */
.page-narrow { max-width: 880px; }

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--header-bg) 92%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1304px;
    margin: 0 auto;
    padding: .9rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--header-text);
    letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark { display: block; flex-shrink: 0; }

.site-nav { display: flex; gap: .2rem; }
.site-nav a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 40px;
    padding: 0 .9rem;
    border-radius: 999px;
    color: var(--header-text);
    font-weight: 600;
    font-size: .95rem;
    white-space: nowrap;
}
.site-nav a:hover { text-decoration: none; background: var(--surface-2); }
.site-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--live);
    display: inline-block;
}

.header-search {
    margin-left: auto;
    position: relative;
    width: 360px;
    min-width: 0;
}
@media (max-width: 1100px) { .header-search { width: 240px; } }
.header-search i {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: .85rem;
    pointer-events: none;
}
.header-search input {
    width: 100%;
    height: 42px;
    padding: 0 .9rem 0 2.4rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: .95rem;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search input:focus { outline: 2px solid var(--accent); border-color: transparent; }

.header-search-btn {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    align-items: center;
    justify-content: center;
}
.header-search-btn:hover { text-decoration: none; border-color: var(--accent); }

/* The followed team, one tap away (desktop header). */
.header-team {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    height: 44px;
    padding: 0 1rem 0 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
    max-width: 14rem;
}
.header-team:hover { text-decoration: none; border-color: var(--accent); }
.header-team .avatar { width: 32px; height: 32px; font-size: 11px; background: var(--indigo); color: var(--floodlight); }
.header-team span:last-child { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 960px) { .header-team { display: none; } }

/* ---------- Bottom tab bar (phones) ---------- */

.tabbar { display: none; }

@media (max-width: 760px) {
    .site-nav, .header-search { display: none; }
    .header-search-btn { display: inline-flex; }
    .header-inner { padding: .9rem 1rem .6rem; }
    .site-header { position: static; border-bottom: 0; background: transparent; backdrop-filter: none; }
    body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

    .tabbar {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        background: var(--header-bg);
        border-top: 1px solid var(--border);
        padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
    }
    .tabbar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        min-height: 52px;
        justify-content: center;
        color: var(--text-muted);
        font-size: .72rem;
        font-weight: 600;
    }
    .tabbar a:hover { text-decoration: none; color: var(--text); }
    .tab-icon {
        position: relative;
        width: 52px;
        height: 30px;
        border-radius: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.05rem;
    }
    .tab-icon .live-dot { position: absolute; top: 4px; right: 12px; }
    .tabbar a.active { color: var(--accent); font-weight: 700; }
    .tabbar a.active .tab-icon { background: var(--accent-soft); }
}

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

.hero {
    padding: 2.4rem 0 1.4rem;
}
.hero h1 { font-size: 2.3rem; line-height: 1.08; letter-spacing: -0.03em; margin-bottom: .8rem; }
.hero p { max-width: 56ch; color: var(--text-muted); }

.hero-search {
    display: flex;
    gap: .5rem;
    margin: 1.3rem 0;
    max-width: 520px;
}
.hero-search input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 1.1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
}
.hero-search input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.hero-search .btn { height: 52px; padding: 0 1.4rem; }

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

.section { margin: 2.2rem 0 0; }
.section-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .8rem;
}
.section-title .btn { font-family: var(--font-body); letter-spacing: 0; }

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 44px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: .5rem 1.2rem;
    font: inherit;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-signal { background: var(--floodlight); border-color: var(--floodlight); color: var(--ink); }
.btn-signal:hover { filter: brightness(.96); border-color: var(--floodlight); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 36px; padding: .3rem .85rem; font-size: .85rem; }

.chip, .chip-static {
    display: inline-flex;
    align-items: center;
    padding: .2rem .7rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--accent-soft);
    color: var(--accent);
    white-space: nowrap;
}
a.chip:hover { text-decoration: none; background: var(--accent); color: var(--accent-ink); }

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

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--accent-soft);
    color: var(--accent);
    user-select: none;
    vertical-align: middle;
}
.avatar-sm { width: 26px; height: 26px; font-size: 9px; }
.avatar-lg { width: 52px; height: 52px; font-size: 15px; }

.pill {
    display: inline-flex;
    align-items: center;
    padding: .18rem .65rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    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);
}

/* ---------- Next-game hero (indigo panel) ---------- */

.hero-game {
    position: relative;
    overflow: hidden;
    background: var(--hero-bg);
    color: var(--hero-text);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.4rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
/* Floodlight rings in the corner — purely decorative. */
.hero-game::before, .hero-game::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgb(255 255 255 / .13);
    pointer-events: none;
}
.hero-game::before { width: 200px; height: 200px; right: -50px; top: -60px; }
.hero-game::after { width: 130px; height: 130px; right: -15px; top: -25px; }
.hero-game.is-live { box-shadow: inset 0 0 0 3px var(--live); }
.hero-game a { color: inherit; }
.hero-game a.btn-signal { color: var(--ink); }

.hero-game-top {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    position: relative;
}
.hero-eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--floodlight);
}
.hero-eyebrow-sub { color: var(--hero-muted); }

.hero-time {
    display: flex;
    align-items: flex-end;
    gap: .8rem;
    flex-wrap: wrap;
    position: relative;
}
.hero-big {
    font-size: 3.6rem;
    line-height: .9;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--floodlight);
}
.hero-big.score-win, .hero-big.score-loss { color: var(--floodlight); }
.hero-countdown { font-size: .9rem; font-weight: 600; color: var(--hero-muted); padding-bottom: .3rem; }

.hero-game-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: .75rem;
    align-items: center;
    position: relative;
}
.hero-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .45rem;
    min-width: 0;
}
.hero-side:last-child { align-items: flex-end; text-align: right; }
.hero-side-name {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.hero-vs { font-family: var(--font-display); font-size: .8rem; color: var(--hero-muted); }
.hero-game .avatar { background: #fff; color: var(--indigo); }
.hero-game .hero-side:last-child .avatar { background: rgb(255 255 255 / .16); color: #fff; }
.hero-game .avatar-img { border-color: transparent; }

.hero-sub {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .92rem;
    color: var(--hero-muted);
    position: relative;
}

.hero-game-actions {
    display: flex;
    gap: .5rem;
    position: relative;
}
.hero-game-actions { flex-wrap: wrap; }
.hero-game-actions .btn { flex: 1 1 auto; }
.hero-game-actions .btn-ghost { color: #fff; border-color: rgb(255 255 255 / .4); }
.hero-game-actions .btn-ghost:hover { border-color: #fff; }

/* ---------- Day rail ("Dein Tag") ---------- */

.day-rail { list-style: none; margin: 0; padding: 0; }
.day-rail-item {
    display: grid;
    grid-template-columns: 3.4rem 1.6rem minmax(0, 1fr);
    align-items: stretch;
    min-height: 4.6rem;
}
.day-rail-time {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
    padding-top: 1rem;
}
.day-rail-track { position: relative; display: flex; justify-content: center; }
.day-rail-track::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border);
}
.day-rail-item:last-child .day-rail-track::before { bottom: auto; height: 1.5rem; }
.day-rail-node {
    position: relative;
    margin-top: 1.12rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
}
.day-rail-item.is-duty .day-rail-node { background: var(--bg); border: 3px solid var(--text); }
.day-rail-item.is-now { min-height: 2.6rem; }
.day-rail-item.is-now .day-rail-time { color: var(--accent); font-size: .8rem; padding-top: .7rem; }
.day-rail-item.is-now .day-rail-track::before { background: var(--accent); }
.day-rail-item.is-now .day-rail-node {
    width: 16px; height: 16px; margin-top: .75rem;
    background: var(--floodlight);
    border: 3px solid var(--ink);
}
.day-rail-now {
    font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent); padding-top: .72rem;
}

.day-rail-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .35rem 0;
    padding: .7rem .9rem;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    min-width: 0;
}
a.day-rail-card:hover { text-decoration: none; border-color: var(--accent); }
.day-rail-item.is-duty .day-rail-card { border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--border)); }
.day-rail-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink); color: var(--floodlight);
    flex-shrink: 0; font-size: .9rem;
}
.day-rail-body { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.day-rail-kicker { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.day-rail-item.is-duty .day-rail-kicker { color: var(--accent); }
.day-rail-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-rail-sub { font-size: .85rem; color: var(--text-muted); }

/* ---------- Form tiles (last results) ---------- */

.form-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.form-tile {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: .75rem .7rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    min-width: 0;
}
a.form-tile:hover { text-decoration: none; border-color: var(--accent); }
.form-tile-label { font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.form-tile-score { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.form-tile-opp { font-size: .78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-tile.is-win { background: var(--ink); border-color: var(--ink); color: #fff; }
.form-tile.is-win .form-tile-label { color: var(--floodlight); }
.form-tile.is-win .form-tile-opp { color: rgb(255 255 255 / .72); }
@media (prefers-color-scheme: dark) {
    .form-tile.is-win { background: var(--floodlight); border-color: var(--floodlight); color: var(--night); }
    .form-tile.is-win .form-tile-label, .form-tile.is-win .form-tile-opp { color: var(--night); }
}

/* ---------- Stat strip (Platz · Bilanz · Differenz) ---------- */

.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.stat-strip > div { padding: .8rem .9rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.stat-strip > div + div { border-left: 1px solid var(--border); }
.stat-strip strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-strip span { font-size: .78rem; color: var(--text-muted); }

/* ---------- 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: 14px;
    padding: .6rem .85rem;
    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-family: var(--font-display);
    font-size: .95rem;
    font-weight: 700;
    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(120px, 1fr));
    gap: .5rem;
    margin: 1rem 0;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: .7rem .85rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.stat-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); }
.stat-value { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.slot-head {
    font-family: var(--font-display);
    font-size: .9rem;
    font-weight: 700;
    color: var(--text);
    margin: 1.1rem 0 .4rem;
    font-variant-numeric: tabular-nums;
}

.myday {
    background: var(--surface);
    border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--border));
    border-radius: var(--radius);
    padding: .9rem 1rem;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.myday-row { display: flex; align-items: center; gap: .5rem; font-size: .92rem; flex-wrap: wrap; }
.myday-ref { color: var(--text-muted); }

.match-row.row-mine { border: 2px solid var(--accent); }
.match-row.row-ref { border: 1.5px dashed 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: .45rem;
    align-items: stretch;
}

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

.cal-fieldhead {
    font-size: .7rem;
    font-weight: 700;
    text-align: center;
    padding: .4rem .4rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .14em;
}

.cal-time {
    position: sticky;
    left: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: .55rem .5rem 0 0;
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
    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: .2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: .55rem .65rem;
    color: var(--text);
    min-height: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.cal-game:hover { text-decoration: none; border-color: var(--accent); }
.cal-game.is-live { border-color: var(--live); box-shadow: inset 0 0 0 1px var(--live); }
.cal-game.is-mine { border: 2px solid var(--accent); padding: calc(.55rem - 1px) calc(.65rem - 1px); }
.cal-game.is-ref { border: 2px dashed var(--accent); padding: calc(.55rem - 1px) calc(.65rem - 1px); }

.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: .85rem;
    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-family: var(--font-display);
    font-size: .88rem;
    font-weight: 700;
    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: .7rem;
    padding: .65rem .9rem;
    background: var(--surface);
    border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--border));
    border-radius: 16px;
    color: var(--text);
    flex-wrap: wrap;
}
.duty-row:hover { text-decoration: none; border-color: var(--accent); }
.duty-icon {
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink); color: var(--floodlight);
    font-size: .78rem; flex-shrink: 0;
}
.duty-icon.score-win { background: var(--accent); color: var(--accent-ink); }
.duty-icon.score-loss { background: transparent; border: 1.5px solid var(--text-muted); color: var(--text-muted); }
.duty-what { font-size: .92rem; }
.small-note { font-size: .88rem; margin-top: -0.3rem; }

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

.form-strip { display: inline-flex; gap: 4px; align-items: center; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-S { background: var(--accent); }
.dot-N { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-muted); }
.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: .35rem; }

/* ---------- 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: .8rem; 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);
    padding: .95rem 1.05rem;
    margin-bottom: .6rem;
}
.game-card.is-live { border-color: var(--live); box-shadow: inset 0 0 0 1px var(--live); }

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

.game-match {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: 1.12rem;
    margin: .4rem 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: .86rem; color: var(--text-muted); }
.game-meta a { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.game-meta a:hover { color: var(--accent); }

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

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

.badge-live {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: var(--live);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    border-radius: 999px;
    padding: .15rem .55rem;
}
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .badge-live::before { animation: none; } }

.standing-badge {
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    padding: .18rem .7rem;
    font-size: .8rem;
    font-weight: 700;
}

/* ---------- Gameday rows (hairline list) ---------- */

.gameday-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
}

.gameday-row {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .85rem .2rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    flex-wrap: wrap;
}
.gameday-row:hover { text-decoration: none; background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.gameday-date {
    font-family: var(--font-display);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: .88rem;
    color: var(--text);
    white-space: nowrap;
    min-width: 5.4rem;
}
.gameday-name { font-weight: 650; flex: 1; min-width: 12ch; }

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

.team-header { padding: 1.8rem 0 0; }
.team-header h1 { font-size: 2.1rem; letter-spacing: -0.03em; }
.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: 1rem; }
.team-actions form { display: contents; }

/* ---------- Modal (pure CSS, checkbox toggle) ---------- */
.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(18 14 38 / .6);
}
.modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 30rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
}
.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: .4rem .5rem;
}
.modal-close:hover { color: var(--text); text-decoration: none; }
.gameday-facts { margin: .3rem 0 0; }

.ical-box {
    background: var(--hero-bg);
    color: var(--hero-text);
    border-radius: var(--radius-lg);
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .7rem;
}
.ical-box input {
    width: 100%;
    padding: .55rem .8rem;
    border: 1px dashed rgb(255 255 255 / .4);
    border-radius: 12px;
    background: rgb(255 255 255 / .08);
    color: var(--hero-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .8rem;
}
.ical-box .btn { background: var(--floodlight); border-color: var(--floodlight); color: var(--ink); }
.ical-box .btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / .4); }
.ical-links { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Results (hairline list) ---------- */

.result-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }

.result-row {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .75rem .2rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.result-row:hover { text-decoration: none; background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.result-date { color: var(--text-muted); font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-opp { font-weight: 600; flex: 1; }

.result-outcome {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: .72rem;
    font-weight: 700;
    flex-shrink: 0;
}
.outcome-S { background: var(--ink); color: var(--floodlight); }
.outcome-N { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1.5px var(--text-muted); }
.outcome-U { background: var(--surface-2); color: var(--text-muted); }
@media (prefers-color-scheme: dark) { .outcome-S { background: var(--floodlight); color: var(--night); } }

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

.match-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    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: .6rem .7rem;
    border-bottom: 1px solid var(--border);
}
.match-table th {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
    background: var(--surface);
}
.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; }

/* ---------- Game detail: scoreboard (night panel) ---------- */

.back-link { color: var(--text-muted); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; }

.scoreboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
    gap: .6rem;
    background: var(--night);
    color: #f2f0f7;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    margin: .4rem 0 .2rem;
}
.scoreboard.is-live { box-shadow: inset 0 0 0 3px var(--live); }
.scoreboard a { color: inherit; }

.sb-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    text-align: center;
    min-width: 0;
}
.sb-name { font-size: .95rem; font-weight: 700; overflow-wrap: anywhere; }
.sb-name a { color: inherit; }
.sb-side.sb-win .sb-name { color: var(--floodlight); }
.sb-tag {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #a8a2c4;
}
.scoreboard .avatar { background: #2b2556; color: #f2f0f7; }

.sb-mid { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding-top: .4rem; }
.sb-score {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    font-size: 2.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
}
.sb-score .sb-win { color: var(--floodlight); }
.sb-score .sb-loss { color: #f2f0f7; }
.sb-colon { color: #6f6893; font-weight: 500; }
.sb-status { font-size: .7rem; font-weight: 700; color: #a8a2c4; text-transform: uppercase; letter-spacing: .12em; }

.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-family: var(--font-display); font-weight: 700; font-size: .9rem; 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(#a8a2c4, #5e5877); }
.compare-label {
    grid-column: 1 / -1;
    text-align: center;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    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: var(--radius);
    padding: .85rem .9rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.form-team { display: flex; align-items: center; gap: .45rem; 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: 3rem;
    padding: 1.6rem 0 2rem;
    font-size: .85rem;
    color: var(--text-muted);
}
.site-footer p { margin: .35rem 0; max-width: 64ch; }
.footer-brand { display: flex; align-items: center; gap: .45rem; color: var(--text); font-family: var(--font-display); }

/* ==========================================================================
   Page structure: a wide main column and a narrow aside, as in the
   Flutlicht desktop board. Phones get one column; each child may carry
   --o to set its position there (the columns dissolve via display: contents).
   ========================================================================== */

.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    column-gap: 2.5rem;
    align-items: start;
    padding-top: 2.4rem;
}
.page-col { display: flex; flex-direction: column; gap: 2.4rem; min-width: 0; }
.page-col > .section, .page-col > .page-head { margin: 0; padding: 0; }
.page-aside { gap: 1.5rem; padding-top: .25rem; }
.band + .page-grid { padding-top: 2rem; }

@media (max-width: 980px) {
    .page-grid { display: flex; flex-direction: column; align-items: stretch; gap: 2.2rem; padding-top: 1.2rem; }
    .page-col { display: contents; }
    .page-grid .page-col > * { order: var(--o, 50); }
}

.page-head h1 { font-size: 3rem; font-weight: 800; line-height: 1.05; }
@media (max-width: 760px) { .page-head h1 { font-size: 1.9rem; } }

/* Aside panels: few, large surfaces with lists inside. */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .9rem;
    min-width: 0;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.panel-head h2 { margin: 0; font-size: 1.1rem; }
.panel-head a { font-size: .88rem; font-weight: 600; }
.panel-note { font-size: .82rem; color: var(--text-muted); margin: 0; }
.panel.is-night { background: var(--ink); border-color: var(--ink); color: #fff; }
.panel.is-indigo { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.panel.is-night .eyebrow, .panel.is-indigo .eyebrow { color: var(--floodlight); }
.panel-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; line-height: 1.3; margin: 0; }
.panel-text { font-size: .9rem; color: rgb(255 255 255 / .78); margin: 0; }
.panel .btn-signal { align-self: flex-start; }
@media (prefers-color-scheme: dark) { .panel.is-night { background: var(--surface-2); border-color: var(--surface-2); } }
@media (max-width: 760px) { .panel { padding: 1.2rem; } }
/* On phones the rail and form sit in the flow, without a box around them. */
@media (max-width: 760px) {
    .panel.is-flat { background: none; border: 0; padding: 0; border-radius: 0; }
}

/* ---------- Hero, wide: time left, match right (container query) ---------- */

.hero-wrap { container-type: inline-size; }
.hero-when { display: flex; flex-direction: column; gap: .9rem; position: relative; }
.hero-info { display: flex; flex-direction: column; gap: 1rem; position: relative; min-width: 0; }

@container (min-width: 640px) {
    .hero-game {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 2.5rem;
        row-gap: 1.5rem;
        align-items: center;
        padding: 2rem 2.25rem;
        border-radius: 32px;
    }
    .hero-when { gap: .5rem; }
    .hero-when .hero-time { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .hero-big { font-size: 5.5rem; }
    .hero-game-grid { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
    .hero-side, .hero-side:last-child { flex-direction: row; align-items: center; text-align: left; gap: .8rem; }
    .hero-vs { padding-left: 1.1rem; }
    .hero-side-name { font-size: 1.45rem; }
    .hero-game-actions { grid-column: 1 / -1; }
    .hero-game-actions .btn { flex: 0 0 auto; min-height: 48px; padding: 0 1.5rem; }
    .hero-game::before { width: 320px; height: 320px; right: -80px; top: auto; bottom: -120px; }
    .hero-game::after { width: 200px; height: 200px; right: -20px; top: auto; bottom: -60px; }
}

/* ---------- Gamedays grouped by date: big day number, hairline rows ---------- */

.day-group {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    border-top: 2px solid var(--text);
}
.day-group-date { padding: 1.1rem 0; display: flex; flex-direction: column; gap: .15rem; align-items: flex-start; }
.day-group-num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.day-group-today.is-tomorrow { background: var(--accent-soft); color: var(--accent); }
.day-group.is-today .day-group-num, .day-group.is-today .eyebrow { color: var(--accent); }
.day-group-today {
    margin-top: .4rem;
    font-size: .66rem; font-weight: 700; letter-spacing: .1em;
    padding: .2rem .5rem; border-radius: 999px;
    background: var(--accent); color: var(--accent-ink);
}
.day-group-rows { display: flex; flex-direction: column; min-width: 0; }

.day-row {
    display: grid;
    grid-template-columns: 3.6rem minmax(0, 1fr) auto;
    gap: .1rem 1rem;
    align-items: center;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.day-row:last-child { border-bottom: 0; }
.day-row:hover { text-decoration: none; color: var(--accent); }
.day-row-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.day-row-name { display: flex; align-items: center; gap: .6rem; min-width: 0; font-weight: 600; }
.day-row-name { overflow: hidden; }
.day-row-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.day-row-name > span + span { flex-shrink: 0; }
.day-row-place { font-size: .88rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-row .chip { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.day-row-go { color: var(--text-muted); font-size: .8rem; }
.day-row-mine { font-size: .78rem; font-weight: 700; color: var(--accent); display: inline-flex; gap: .3rem; align-items: center; white-space: nowrap; }
.day-row-final {
    font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    padding: .2rem .5rem; border-radius: 999px; background: var(--floodlight); color: var(--ink);
}
/* A gameday where a followed team plays: lifted onto a surface. */
.day-row.is-mine {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.1rem 1rem;
    margin: .6rem -1rem;
}
.day-row.is-mine .chip { background: var(--accent); color: var(--accent-ink); }

/* Compact by default (name over place, league right); a wide list gets fixed,
   aligned columns. Keyed to the list's own width, not the window. */
.day-group-rows { container-type: inline-size; }
.day-row-name { grid-column: 2; grid-row: 1; }
.day-row-place { grid-column: 2; grid-row: 2; }
.day-row .chip { grid-column: 3; grid-row: 1 / span 2; justify-self: end; align-self: start; max-width: 11rem; text-align: center; line-height: 1.25; }
.day-row-time { grid-row: 1 / span 2; align-self: start; padding-top: .1rem; }
.day-row-go { display: none; }
@container (min-width: 760px) {
    .day-row { grid-template-columns: 4.2rem minmax(0, 1fr) 12rem 11rem 1.2rem; gap: 1rem; }
    .day-row-name, .day-row-place, .day-row .chip, .day-row-time { grid-column: auto; grid-row: auto; }
    .day-row-time { align-self: center; padding-top: 0; }
    .day-row .chip { max-width: none; text-align: left; justify-self: start; align-self: center; }
    .day-row-go { display: inline; }
}
@media (max-width: 760px) {
    .day-group { grid-template-columns: 1fr; border-top-width: 1px; }
    .day-group-date { flex-direction: row; align-items: baseline; gap: .5rem; padding: 1rem 0 .3rem; }
    .day-group-num { font-size: 1.1rem; }
    .day-group-today { margin: 0; }
    .day-row { grid-template-columns: 3.2rem minmax(0, 1fr) auto; row-gap: .1rem; padding: .85rem 0; }
    .day-row-name { grid-column: 2; grid-row: 1; }
    .day-row-place { grid-column: 2; grid-row: 2; }
    .day-row .chip { grid-column: 3; grid-row: 1 / span 2; }
    .day-row-time { grid-row: 1 / span 2; align-self: start; padding-top: .1rem; }
    .day-row-go { display: none; }
    .day-row.is-mine { margin: .4rem -.8rem; padding: .85rem .8rem; }
}

/* ---------- Night band: dark page head with field lines (gameday, game) ---------- */

.band {
    --band-bg: light-dark(#1b1633, #1d1840);
    position: relative;
    background: var(--band-bg);
    color: #fff;
    margin-inline: calc(50% - 50vw);
    padding: 1.6rem calc(50vw - 50%) 2.2rem;
    overflow: hidden;
    isolation: isolate;
}
/* Yard lines: ten columns, the middle one (50) a little brighter. */
.band::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to right, transparent calc(50% - 1px), rgb(255 255 255 / .12) calc(50% - 1px), rgb(255 255 255 / .12) calc(50% + 1px), transparent calc(50% + 1px)),
        repeating-linear-gradient(to right, transparent 0, transparent calc(10% - 1px), rgb(255 255 255 / .06) calc(10% - 1px), rgb(255 255 255 / .06) 10%);
    pointer-events: none;
}
.band a { color: inherit; }
.band-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1.4rem; }
.band-btn {
    width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgb(255 255 255 / .1); color: #fff; flex-shrink: 0;
}
.band-btn:hover { text-decoration: none; background: rgb(255 255 255 / .18); }
.band-tag {
    font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    padding: .35rem .7rem; border-radius: 999px; background: var(--floodlight); color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%;
}
a.band-tag, .band a.band-tag { color: var(--ink); }
.band a.band-tag:hover { text-decoration: none; filter: brightness(.95); }
.band-tag.is-live { background: var(--live); color: #fff; display: inline-flex; align-items: center; gap: .45rem; }
.band-tag.is-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.band .eyebrow { color: var(--floodlight); }
.band h1 { font-size: 3.2rem; font-weight: 800; line-height: 1; margin: .4rem 0 .5rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.band-sub { color: rgb(255 255 255 / .78); margin: 0; }
.band-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: 2rem; align-items: end; }
.band-venue {
    display: flex; align-items: center; gap: .8rem;
    padding: .8rem 1rem; border-radius: 16px;
    background: rgb(255 255 255 / .08);
    min-width: 0;
}
.band-venue:hover { text-decoration: none; background: rgb(255 255 255 / .13); }
.band-venue-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.band-venue-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band-venue-text span { font-size: .85rem; color: rgb(255 255 255 / .7); }
.band-venue-go { font-size: .85rem; font-weight: 700; color: var(--floodlight); white-space: nowrap; }
.band-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1.4rem; }
.band-stat { display: flex; flex-direction: column; gap: .1rem; }
.band-stat strong { font-family: var(--font-display); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.band-stat span { font-size: .78rem; color: rgb(255 255 255 / .65); }
@media (max-width: 760px) {
    .band { padding-top: .8rem; padding-bottom: 1.5rem; }
    .band h1 { font-size: 2.3rem; }
    .band-body { grid-template-columns: 1fr; gap: 1.2rem; }
    .band-stats { gap: 1.4rem; }
}

/* Scoreboard inside the band (game page). */
.band .scoreboard { background: transparent; padding: .5rem 0 0; margin: 0; border-radius: 0; box-shadow: none; }
.band .scoreboard .avatar { width: 64px; height: 64px; font-size: 18px; }
.band .sb-side.sb-win .avatar { box-shadow: 0 0 0 3px var(--floodlight); }
.band .sb-score { font-size: 4.2rem; }
.band .sb-name { font-size: 1.05rem; }
.band-facts {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgb(255 255 255 / .12);
    margin-top: 1.6rem; padding-top: 1.1rem; text-align: center;
}
.band-facts strong { display: block; font-family: var(--font-display); font-size: 1rem; }
.band-facts span { font-size: .78rem; color: rgb(255 255 255 / .65); }
.band-place { text-align: center; margin: 0 0 .4rem; }
@media (max-width: 760px) {
    .band .sb-score { font-size: 3rem; }
    .band .scoreboard .avatar { width: 52px; height: 52px; font-size: 15px; }
}

/* View switch (Zeitplan / Gruppen …, Termine / Ergebnisse / Tabelle). */
.seg { display: flex; gap: .4rem; flex-wrap: wrap; }
.seg a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem;
    border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
    color: var(--text); font-size: .9rem; font-weight: 600;
}
.seg a:hover { text-decoration: none; border-color: var(--accent); }
.seg a[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--bg); }

.tabs { display: flex; gap: 1.6rem; border-bottom: 1px solid var(--border); }
.tabs a {
    display: inline-flex; align-items: center; min-height: 46px;
    border-bottom: 3px solid transparent; margin-bottom: -1px;
    color: var(--text-muted); font-weight: 600;
}
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }

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

.team-hero { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: 2.4rem 0 0; }
.team-hero .avatar { width: 88px; height: 88px; font-size: 26px; background: var(--indigo); color: var(--floodlight); }
.team-hero .avatar-img { padding: 10px; }
.team-hero-text { display: flex; flex-direction: column; gap: .35rem; min-width: 0; flex: 1; }
.team-hero h1 { font-size: 2.6rem; font-weight: 800; line-height: 1; margin: 0; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.team-hero-meta { display: flex; align-items: baseline; gap: .3rem; flex-wrap: wrap; color: var(--text-muted); }
.team-hero-meta strong { color: var(--text); }
.team-hero-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.team-hero-actions form { display: contents; }
.team-hero-actions .btn { min-height: 48px; padding: 0 1.4rem; }
.btn-ink { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-ink:hover { border-color: var(--text); filter: brightness(1.15); }
.btn-outline { background: transparent; border-color: var(--text); color: var(--text); }
@media (max-width: 760px) {
    .team-hero { padding-top: 1rem; gap: 1rem; }
    .team-hero .avatar { width: 72px; height: 72px; font-size: 22px; }
    .team-hero h1 { font-size: 2rem; }
    .team-hero-actions { width: 100%; }
    .team-hero-actions .btn { flex: 1; }
}

/* Fixtures on one gameday: a single surface, rows inside. */
.fixture-day { display: flex; flex-direction: column; gap: .6rem; }
.fixture-day + .fixture-day { margin-top: 1.6rem; }
.fixtures {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}
.fixture {
    display: grid;
    grid-template-columns: 3.6rem minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: center;
    padding: .9rem 1rem;
    color: var(--text);
}
.fixture + .fixture { border-top: 1px solid var(--border); }
.fixture:hover { text-decoration: none; background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.fixture-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.fixture-body { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.fixture-kicker { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.fixture-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fixture-side { font-size: .85rem; color: var(--text-muted); white-space: nowrap; }
.fixture-score { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.fixture.is-duty { background: light-dark(#f7f6fb, #221d48); }
.fixture.is-duty .fixture-kicker { color: var(--accent); }
.fixture.is-live .fixture-kicker { color: var(--live); }
.fixture-foot { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; min-height: 40px; }

/* Results: outcome circle, opponent, score. */
.results { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.results-row {
    display: grid;
    grid-template-columns: 2.2rem minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: center;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.results-row:hover { text-decoration: none; background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.results-row .fixture-score { font-size: 1.1rem; }
.results-row.is-loss .fixture-score { color: var(--text-muted); }

/* Compact standings (team aside / tab). */
.mini-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.mini-table td { padding: .55rem .3rem; border-bottom: 1px solid var(--border); }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-table .rank { width: 2rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mini-table a { color: var(--text); }
.mini-table tr.is-me td { background: var(--accent-soft); font-weight: 700; }
.mini-table tr.is-me td:first-child { border-radius: 10px 0 0 10px; }
.mini-table tr.is-me td:last-child { border-radius: 0 10px 10px 0; }

/* Gameday aside: who plays when (followed teams). */
.myday-list { display: flex; flex-direction: column; gap: .7rem; }
.myday-item { display: flex; align-items: center; gap: .7rem; }
.myday-item-text { display: flex; flex-direction: column; min-width: 0; font-size: .9rem; }
.myday-item-text strong { font-size: 1rem; }


/* Spacing inside the column layout. */
.page-col > .hero { padding: 0; }
.page-col > .hero h1 { font-size: 3rem; font-weight: 800; }
.page-col .my-team-head { margin: 0; }
.panel .my-team-links { margin: 0; }
.panel .form-tiles { grid-template-columns: repeat(auto-fit, minmax(4.4rem, 1fr)); gap: .4rem; }
.panel .form-tile { padding: .7rem .55rem; }
.panel .form-tile-score { font-size: .95rem; }
.page-aside .form-cmp { grid-template-columns: 1fr; }
.page-aside .section-title { font-size: 1.1rem; }
.page-aside .stat-grid { margin: .8rem 0 0; }
.my-team + .my-team { border-top: 2px solid var(--text); margin-top: 3rem; padding-top: 2.4rem; }
.team-hero + .page-grid { padding-top: 1.8rem; }
.section-title .eyebrow { font-family: var(--font-body); }
.myday-item { color: var(--text); }
.myday-item:hover { text-decoration: none; color: var(--accent); }
.myday-item-text .muted { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .page-col > .hero h1 { font-size: 2.1rem; } }

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

@media (max-width: 560px) {
    .hero h1 { font-size: 1.85rem; }
    .hero-big { font-size: 3rem; }
    .game-match { font-size: 1.05rem; }
    .team-header h1 { font-size: 1.7rem; }
    .sb-score { font-size: 2.1rem; }
}


/* ---------- 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; }

/* Team logos sit on the same round plate as the initials avatars, so logo and
   initials line up at every size and stay legible on dark panels. */
.avatar-img {
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50%;
    padding: 4px;
    box-sizing: border-box;
}
.avatar-img.avatar-sm { padding: 2px; }
.avatar-img.avatar-lg { padding: 5px; }


/* ---------- 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-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.my-team-title { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.my-team-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.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: 1.2rem; }

.page-head { padding: 2.4rem 0 .2rem; display: flex; flex-direction: column; gap: .5rem; }
.page-head h1 { line-height: 1.05; letter-spacing: -0.03em; margin: 0; }
.sub-section { margin-top: 1.8rem; }
.schiri-banner { border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--border)); border-radius: var(--radius); padding: 1rem 1.1rem; }

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

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

.filter-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.2rem; }
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: .25rem .85rem;
    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: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
}

.live-gd-caret { transition: transform .15s ease; color: var(--text-muted); font-size: .8rem; }
.lg-ball { color: var(--accent); font-size: .75rem; flex-shrink: 0; }

/* ---------- 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: 14px;
    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(--night); background: var(--night); color: #f2f0f7; }
.bracket-match.is-final .bm-label-final { color: var(--floodlight); }
.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; }

/* ---------- Readable names: wrap instead of truncating ----------
   Team names, gameday names and places are the content people come for — a
   "Dresden Mo…" is useless. They wrap (long words break); only a few chrome
   labels (header pill, band tag, undo) still truncate. */
.day-rail-title, .form-tile-opp, .day-row-name > span:first-child, .day-row .chip,
.band-venue-text strong, .fixture-title, .myday-item-text .muted, .my-strip-name,
.tl-text, .bm-name, .match-name, .cal-tname,
.pc-side-name, .pc-name, .pc-team strong {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}
.day-row-name { flex-wrap: wrap; row-gap: .15rem; overflow: visible; }
.day-row-place {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.day-row .chip { white-space: normal; }
.form-tile-opp { line-height: 1.25; }
.panel .form-tiles { grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); }
.cal-team { align-items: flex-start; }
.tl-ev { align-items: flex-start; }

/* ---------- Ligen overview ---------- */
.page-lede { margin: .2rem 0 0; color: var(--text-muted); font-size: 1.02rem; }
.page-head + .page-grid { padding-top: 1.6rem; }

.league-rows { display: flex; flex-direction: column; border-top: 2px solid var(--text); container-type: inline-size; }
.league-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .55rem 1rem;
    align-items: start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.league-item:hover { text-decoration: none; color: var(--accent); }
.league-item.is-mine {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    margin: .5rem -1rem;
}
.league-item-name { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.league-item-name strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.league-item-name .day-row-mine { white-space: normal; }
.league-item-sub { font-size: .8rem; color: var(--text-muted); }
.league-item-progress { grid-column: 1 / -1; display: flex; flex-direction: column; gap: .3rem; }
.league-bar { display: block; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.league-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.league-item-lead { grid-column: 1 / -1; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.league-item-leader { display: flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.league-item-next { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.league-item-next strong { font-size: .95rem; white-space: nowrap; }
.league-done { font-size: .8rem; font-weight: 600; color: var(--text-muted); display: inline-flex; gap: .35rem; align-items: center; white-space: nowrap; }
.league-item .day-row-go { display: none; }

@container (min-width: 700px) {
    .league-item {
        grid-template-columns: minmax(0, 1fr) 11rem 12rem 8rem 1.2rem;
        gap: 1.2rem;
        align-items: center;
    }
    .league-item-progress, .league-item-lead, .league-item-next { grid-column: auto; grid-row: auto; }
    .league-item .day-row-go { display: inline; color: var(--text-muted); font-size: .8rem; }
}

.next-date {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent); line-height: 1;
}
.next-date strong { font-family: var(--font-display); font-size: 1rem; }
.next-date span { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: .15rem; }

/* ---------- League table ---------- */
.standings { width: 100%; border-collapse: collapse; font-size: .95rem; border-top: 2px solid var(--text); }
.standings th {
    font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--text-muted); text-align: left; padding: .8rem .5rem .6rem; white-space: nowrap;
}
.standings td { padding: .75rem .5rem; border-top: 1px solid var(--border); vertical-align: middle; }
.standings .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.standings .strong { font-weight: 700; }
.standings .pos { color: var(--accent); font-weight: 700; }
.standings .rank { width: 2.4rem; }
.standings .rank span {
    display: inline-flex; width: 1.7rem; height: 1.7rem; align-items: center; justify-content: center;
    border-radius: 50%; font-family: var(--font-display); font-size: .78rem; font-weight: 700; color: var(--text-muted);
}
.standings tr.is-top .rank span { background: var(--floodlight); color: var(--ink); }
.standings .team a { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 600; }
.standings .team a:hover { text-decoration: none; color: var(--accent); }
.standings .team span { overflow-wrap: anywhere; }
.standings tr.is-me td { background: var(--accent-soft); }
.standings tr.is-me td:first-child { border-radius: 12px 0 0 12px; }
.standings tr.is-me td:last-child { border-radius: 0 12px 12px 0; }
.standings tr.is-me .team a { color: var(--accent); font-weight: 700; }
@media (max-width: 760px) {
    .standings .hide-sm { display: none; }
    .standings td, .standings th { padding-left: .3rem; padding-right: .3rem; }
}

/* ---------- Live & heute ---------- */
.band-stat strong.is-live-num { color: var(--floodlight); }
.band-live-note { justify-self: end; align-self: start; max-width: none; }

.live-block { border-top: 2px solid var(--text); }
.live-block + .live-block { margin-top: .6rem; }
.live-block.has-live { border-top-color: var(--live); }
.live-block-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 0; cursor: pointer; list-style: none;
}
.live-block-head::-webkit-details-marker { display: none; }
.live-block-title { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.live-block-title strong { font-family: var(--font-display); font-size: 1.1rem; overflow-wrap: anywhere; }
.live-block-meta { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.live-block[open] .live-gd-caret { transform: rotate(180deg); }
.live-block-foot { display: flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 600; padding: .8rem 0 .4rem; }

.live-rows { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.live-row {
    display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: 1rem; align-items: center;
    padding: .85rem 1rem; color: var(--text);
}
.live-row + .live-row, .live-ticks + .live-row { border-top: 1px solid var(--border); }
.live-row:hover { text-decoration: none; background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.live-row.is-live { background: color-mix(in srgb, var(--live-soft) 70%, transparent); }
.live-row-state { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.live-row-state strong { font-variant-numeric: tabular-nums; }
.live-row-label { font-size: .75rem; color: var(--text-muted); }
.live-row-teams { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.live-side { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.live-side-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.live-side-score { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.live-side.is-win .live-side-name { font-weight: 800; }
.live-side.is-win .live-side-score { color: var(--accent); }
.live-side.is-loss .live-side-name, .live-side.is-loss .live-side-score { color: var(--text-muted); }
.live-row.is-upcoming .live-side-name { font-weight: 500; }

.live-ticks {
    list-style: none; margin: 0; padding: .1rem 1rem .8rem 7.2rem;
    display: flex; flex-direction: column; gap: .2rem; font-size: .85rem;
    background: color-mix(in srgb, var(--live-soft) 70%, transparent);
}
.live-ticks .tick-time { color: var(--text-muted); }
@media (max-width: 760px) {
    .live-row { grid-template-columns: 4.2rem minmax(0, 1fr); gap: .8rem; }
    .live-ticks { padding-left: 1rem; }
}

.live-mini { display: flex; flex-direction: column; }
.live-mini a {
    display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0;
    color: #fff; font-size: .9rem; line-height: 1.35;
}
.live-mini a + a { border-top: 1px solid rgb(255 255 255 / .12); }
.live-mini a:hover { text-decoration: none; color: var(--floodlight); }
.live-mini strong { font-family: var(--font-display); text-align: right; color: var(--floodlight); }

/* ---------- Legal pages (Impressum, Datenschutz) ---------- */
.footer-links { display: flex; gap: 1.2rem; margin-top: .8rem !important; }
.footer-links a { color: var(--text); font-weight: 600; }

.legal { padding-bottom: 2rem; }
.legal .page-head { margin-bottom: 1.6rem; }
.legal section { margin: 0 0 1.6rem; }
.legal p { margin: 0 0 .8rem; line-height: 1.7; color: color-mix(in srgb, var(--text) 85%, transparent); max-width: 68ch; }
.legal h2 { font-size: 1.25rem; margin: 2.4rem 0 .8rem; }
.legal section > h2 { margin-top: 0; }
.legal section + section > h2 { padding-top: 1.6rem; border-top: 1px solid var(--border); }
.legal h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin: 0 0 .35rem; }
.legal-lead { font-size: 1.08rem; color: var(--text) !important; }
.legal-facts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.4rem 2rem;
    padding: 1.4rem 0; margin: 0 0 2rem; border-top: 2px solid var(--text); border-bottom: 1px solid var(--border);
}
.legal-facts section { margin: 0; }
.legal-facts p { margin: 0; }
.legal-note { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem 1.5rem; }
.legal-note h2 { margin-top: 0; }
.legal-summary {
    list-style: none; margin: 0 0 2rem; padding: 1.2rem 1.4rem; border-radius: var(--radius-lg);
    background: var(--ink); color: #fff; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .6rem 1.4rem;
}
.legal-summary i { color: var(--floodlight); margin-right: .4rem; }
@media (prefers-color-scheme: dark) { .legal-summary { background: var(--surface-2); } }
.legal-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: .4rem 0 1rem; border-top: 2px solid var(--text); }
.legal-table th { text-align: left; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); padding: .7rem .6rem .5rem 0; }
.legal-table td { padding: .75rem .6rem .75rem 0; border-top: 1px solid var(--border); vertical-align: top; line-height: 1.55; }
.legal-table code { font-size: .82rem; background: var(--accent-soft); color: var(--accent); padding: .1rem .4rem; border-radius: 6px; white-space: nowrap; }
.legal-foot { margin-top: 2.4rem !important; font-weight: 600; }

/* ---------- Officials (Schiri-Bereich) ---------- */
.band-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; align-self: start; }
.band-actions form { display: contents; }
.band .btn-ghost { color: #fff; border-color: rgb(255 255 255 / .35); background: transparent; }
.band .btn-ghost:hover { border-color: #fff; }
.band a.btn-signal { color: var(--ink); }
.band-progress { display: flex; flex-direction: column; gap: .6rem; align-self: end; }
.league-bar.is-band { background: rgb(255 255 255 / .14); height: 8px; }
.league-bar.is-band > span { background: var(--floodlight); }
@media (max-width: 760px) { .band-actions { justify-content: flex-start; } }

.officials-gd { font-size: 1.2rem; margin: 0 0 .2rem; }
.officials-gd a { color: var(--text); }
.officials-gd a:hover { color: var(--accent); text-decoration: none; }
.officials-go { font-size: .85rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.fixture-day > .eyebrow + .officials-gd { margin-top: -.2rem; }
.fixture .fixture-title .muted { font-weight: 400; }
@media (max-width: 760px) { .officials-go { font-size: 0; } .officials-go i { font-size: .9rem; } }

.empty-state {
    display: flex; flex-direction: column; align-items: flex-start; gap: .6rem;
    padding: 2rem; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: var(--radius-lg);
}
.empty-state > i { font-size: 1.4rem; width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--floodlight); }
.empty-state h2 { margin: .3rem 0 0; font-size: 1.3rem; }
.empty-state p { margin: 0; max-width: 52ch; }

.howto { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .5rem; font-size: .92rem; }
.howto li::marker { font-family: var(--font-display); font-weight: 700; color: var(--accent); }

/* Login */
.login-wrap { min-height: calc(100dvh - 260px); display: grid; place-items: center; padding: 2.4rem 0; }
.login-card {
    width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 2rem; display: flex; flex-direction: column; gap: .6rem;
}
.login-card h1 { font-size: 2.2rem; font-weight: 800; margin: 0; }
.login-card > p { margin: 0 0 .4rem; }
.login-mark { width: 56px; height: 56px; border-radius: 16px; background: var(--ink); color: var(--floodlight); display: inline-flex; align-items: center; justify-content: center; margin-bottom: .4rem; }
.login-card .sc-login-form { margin-top: .4rem; }
.login-card .sc-login-form input { border-radius: 14px; min-height: 48px; background: var(--bg); }
.login-card .sc-login-form .btn { min-height: 50px; margin-top: .3rem; }
.login-note { font-size: .82rem; color: var(--text-muted); margin: .6rem 0 0; }
.login-note i { color: var(--accent); margin-right: .3rem; }

/* Passcheck overview */
.pc-games { gap: 1rem; }
.pc-game { border-radius: 20px; }
.pc-game-when { font-size: .85rem; padding: .7rem 1rem; }
.pc-game-when strong { color: var(--text); font-variant-numeric: tabular-nums; }
.pc-side { padding: .9rem 1rem; }
.pc-side.is-checked { background: var(--accent-soft); }
.pc-side-status.is-checked { color: var(--accent); }

/* Scorecard: the board becomes the night scoreboard */
.sc-board2 {
    background: var(--ink); color: #fff; border: 0; border-radius: var(--radius-lg);
    padding: 1.4rem .8rem 1rem; box-shadow: none;
}
.sc-side2.has-ball .sc-score2 { color: var(--floodlight); }
.sc-poss-tag { color: var(--floodlight); }
.sc-divider { color: #6f6893; }
.sc-side2-name { font-family: var(--font-display); font-size: .9rem; }
@media (prefers-color-scheme: dark) { .sc-board2 { background: var(--surface-2); } }
.sc-top .btn, .sc-top .pill { border-radius: 999px; }
.sc-stage-card, .sc-choice-btn, .sc-btn, .sc-log-row, .pad-key, .roster-chip, .sc-pending, .sc-undo { border-radius: 16px; }
.sc-choice-btn { min-height: 52px; font-weight: 700; }
.sc-choice-btn.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.sc-btn-td { border-radius: 18px; font-family: var(--font-display); }
.sc-panel .section-title { margin-top: .4rem; }
.sc-panel h3 { font-family: var(--font-display); font-size: 1rem; margin: 1rem 0 .5rem; }
.sheet { border-top-left-radius: var(--radius-lg); border-top-right-radius: var(--radius-lg); }
.sc-top .sc-context { flex: 1; min-width: 0; }
.sc-top .sc-context + .pill { margin-left: 0; }
@media (max-width: 560px) { .sc-top .sc-context { order: 5; flex-basis: 100%; } }

/* ---------- Suche ---------- */
.search-big { position: relative; display: flex; gap: .5rem; max-width: 680px; margin: .8rem 0 .2rem; }
.search-big > i { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-big input {
    flex: 1; min-width: 0; height: 58px; padding: 0 1.2rem 0 3rem;
    border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
    font: inherit; font-size: 1.05rem;
}
.search-big input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.search-big .btn { height: 58px; padding: 0 1.6rem; }
@media (max-width: 560px) { .search-big .btn { padding: 0 1.1rem; } }

.team-rows { display: flex; flex-direction: column; border-top: 2px solid var(--text); }
.team-row { display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid var(--border); }
.team-row.is-mine { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin: .5rem -1rem; padding-right: .6rem; }
.team-row.is-mine .team-row-main { padding-left: 1rem; }
.team-row-main {
    flex: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem;
    align-items: center; padding: .9rem 0; color: var(--text);
}
.team-row-main:hover { text-decoration: none; color: var(--accent); }
.team-row-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.team-row-text strong { overflow-wrap: anywhere; }
.team-row-text .muted { font-size: .85rem; }
.team-row-next { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.team-row-next strong { font-size: .92rem; white-space: nowrap; }
.team-row form { display: flex; }
.team-row .star-toggle { width: 44px; height: 44px; font-size: 1.15rem; color: var(--text-muted); }
.team-row .star-toggle.is-on { color: var(--accent); }
@media (max-width: 560px) {
    .team-row-main { grid-template-columns: auto minmax(0, 1fr); }
    .team-row-next { grid-column: 2; align-items: flex-start; text-align: left; flex-direction: row; gap: .4rem; flex-wrap: wrap; }
}
.search-tips { font-size: .9rem; }

/* ---------- Header account (Schiri-Login / menu) ---------- */
.account { position: relative; }
.account-btn {
    display: inline-flex; align-items: center; gap: .5rem; height: 44px; padding: 0 1rem;
    border-radius: 999px; border: 1px solid var(--border); color: var(--text);
    font-weight: 600; font-size: .9rem; cursor: pointer; list-style: none; white-space: nowrap;
}
.account-btn::-webkit-details-marker { display: none; }
.account-btn:hover { text-decoration: none; border-color: var(--accent); }
.account-btn i { color: var(--accent); }
.account[open] .account-btn { border-color: var(--accent); background: var(--accent-soft); }
.account-menu {
    position: absolute; right: 0; top: calc(100% + .5rem); z-index: 30; min-width: 15rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
    padding: .6rem; display: flex; flex-direction: column; box-shadow: 0 12px 32px rgb(18 14 38 / .14);
}
.account-menu .eyebrow { padding: .4rem .6rem .5rem; }
.account-menu a, .account-menu button {
    display: flex; align-items: center; gap: .6rem; padding: .6rem; border-radius: 12px;
    color: var(--text); font: inherit; font-size: .92rem; font-weight: 600;
    background: none; border: 0; cursor: pointer; text-align: left; width: 100%;
}
.account-menu a:hover, .account-menu button:hover { text-decoration: none; background: var(--accent-soft); color: var(--accent); }
.account-menu i { width: 1.1rem; color: var(--text-muted); }
.account-menu form { margin: .2rem 0 0; padding-top: .2rem; border-top: 1px solid var(--border); }
@media (max-width: 1100px) { .account-btn .account-name { display: none; } .account-btn { padding: 0; width: 44px; justify-content: center; } }
@media (max-width: 760px) { .account, .account-btn.is-login { display: none; } }

.team-rows.is-compact { border-top: 0; }
.team-rows.is-compact .team-row-main { padding: .6rem 0; }
.team-rows.is-compact .team-row:last-child { border-bottom: 0; }
.panel .btn-ghost.on-dark { color: #fff; border-color: rgb(255 255 255 / .4); background: transparent; }
.panel.is-indigo .panel-title { color: #fff; }
.panel.is-indigo .my-team-links { margin-top: .2rem; }
.band-btn.is-spacer { visibility: hidden; }
.missing .empty-state { margin-top: 1rem; }
.missing .search-big { width: 100%; margin: .6rem 0; }
.missing code { font-size: .8rem; }

/* ---------- Passcheck workbench ---------- */
.pc-band { margin-bottom: 1.4rem; }
.pc-band .pc-team { display: flex; align-items: center; gap: 1rem; }
.pc-band .pc-team h1 { margin: .2rem 0 0; }
.pc-band .pc-team .avatar { width: 64px; height: 64px; font-size: 18px; background: #fff; color: var(--indigo); }
.pc-band .pc-progress { flex-direction: column; align-items: flex-end; gap: .4rem; margin: 0; align-self: end; }
.pc-band .pc-count { font-family: var(--font-display); font-size: 2rem; color: var(--floodlight); }
.pc-band .pc-range { margin: 0; font-size: .85rem; font-weight: 600; }
.pc-band .pc-range.is-ok { color: var(--floodlight); }
.pc-band .pc-range.is-warn { color: #ff8a73; }
@media (max-width: 760px) { .pc-band .pc-progress { align-items: flex-start; } }
.pc-state { margin-top: 1.4rem; }
.pc-state.is-done > i { background: var(--floodlight); color: var(--ink); }
.filter-bar .filter-chip { min-height: 40px; padding: 0 1rem; font-size: .9rem; font-weight: 600; color: var(--text); cursor: pointer; }
.filter-bar .filter-chip.is-on { background: var(--text); border-color: var(--text); color: var(--bg); }
.pc-search { border-radius: 999px; min-height: 48px; padding-left: 1.2rem; }
.pc-list { border-radius: 20px; }
.pc-accordion { border-radius: 20px; }
.pc-jersey { border-radius: 14px; }
.pc-footer { border-top: 2px solid var(--text); }
.sheet .sc-input + .sc-input, .sheet .sc-input + label { margin-top: .5rem; }

/* Logos on the night band / dark panels: no hairline, the white plate is enough. */
.band .avatar-img, .panel.is-night .avatar-img, .panel.is-indigo .avatar-img, .header-team .avatar-img { border-color: transparent; }
.band .scoreboard .avatar-img { padding: 8px; }
.header-team .avatar-img { padding: 3px; }
.pc-band .pc-team .avatar-img { padding: 8px; }

/* Auto-corrected halftime notice (game page). */
.ht-fix {
    display: flex; flex-wrap: wrap; gap: .3rem; align-items: baseline;
    margin: 0 0 .8rem; padding: .75rem .9rem; border-radius: 14px;
    border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--border));
    font-size: .85rem; color: var(--text-muted); line-height: 1.5;
}
.ht-fix i { color: var(--accent); margin-right: .2rem; }

/* ---------- Sideline tools on phones: focus mode ----------
   Scorecard and passcheck are worked one-handed at the field. On phones the site chrome
   goes away so no stray tap leaves a running game and sticky bars stay visible. */
@media (max-width: 760px) {
    body:has(.tool-mode) { padding-bottom: env(safe-area-inset-bottom); }
    body:has(.tool-mode) .tabbar,
    body:has(.tool-mode) .site-header,
    body:has(.tool-mode) .site-footer { display: none; }
    body:has(.tool-mode) main.container { padding-top: max(.6rem, env(safe-area-inset-top)); }
    body:has(.tool-mode) .pc-band { margin-top: calc(-1 * max(.6rem, env(safe-area-inset-top))); }
}
.pc-footer { padding-bottom: calc(.7rem + env(safe-area-inset-bottom)); }

/* Scorecard: game clock, due reminder, collapsible officials at setup */
.sc-clock { font-variant-numeric: tabular-nums; }
.sc-due {
    display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left;
    margin: 0 0 .8rem; padding: .8rem 1rem; border-radius: 16px; cursor: pointer;
    border: 0; background: var(--floodlight); color: var(--ink); font: inherit; font-size: .92rem; line-height: 1.35;
    animation: due-in .25s ease-out;
}
.sc-due i { font-size: 1.2rem; }
.sc-due strong { text-decoration: underline; text-underline-offset: 3px; }
@keyframes due-in { from { transform: translateY(-4px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sc-due { animation: none; } }
.sc-officials { margin: 1rem 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.sc-officials > summary {
    display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; cursor: pointer; list-style: none; min-height: 48px;
}
.sc-officials > summary::-webkit-details-marker { display: none; }
.sc-officials > summary > span:first-child { font-weight: 700; }
.sc-officials > summary .muted { font-size: .8rem; flex: 1; }
.sc-officials[open] > summary .live-gd-caret { transform: rotate(180deg); }
.sc-officials > .officials-editor, .sc-officials > div { padding: 0 .6rem .6rem; }

/* Bigger tap targets for the secondary actions; roomier penalty list */
.sc-tertiary button { min-height: 44px; padding: .5rem .9rem; }
.sc-penalty { padding: .65rem .9rem; line-height: 1.3; gap: .2rem; }
.sc-penalties { gap: .5rem; }
.empty-state .my-team-links .btn { white-space: normal; text-align: center; }
textarea.sc-input, .pc-note { font: inherit; }

/* Passcheck workbench on phones: compact head, no cramped sort label */
@media (max-width: 760px) {
    .pc-band { padding-top: .6rem; padding-bottom: 1rem; }
    .pc-band .band-top { margin-bottom: .6rem; }
    .pc-band .band-body { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .8rem; }
    .pc-band .pc-team { gap: .7rem; min-width: 0; }
    .pc-band .pc-team .avatar { width: 44px; height: 44px; font-size: 13px; }
    .pc-band .pc-team h1 { font-size: 1.5rem; }
    .pc-band .pc-progress { align-items: flex-end; }
    .pc-band .pc-count { font-size: 1.6rem; }
    .pc-sort { display: none; }
}

/* German reconnect notice (Blazor toggles the classes on #components-reconnect-modal) */
.reconnect { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; padding: .8rem; padding-bottom: calc(.8rem + env(safe-area-inset-bottom)); }
.reconnect.components-reconnect-show, .reconnect.components-reconnect-retrying,
.reconnect.components-reconnect-failed, .reconnect.components-reconnect-rejected { display: block; }
.reconnect-card {
    max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: .8rem;
    background: var(--ink); color: #fff; border-radius: 18px; padding: .9rem 1rem; box-shadow: 0 12px 32px rgb(18 14 38 / .3);
}
.reconnect-icon { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgb(255 255 255 / .1); color: var(--floodlight); flex-shrink: 0; }
.reconnect-text { display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; flex: 1; }
.reconnect-text span { color: rgb(255 255 255 / .75); }
.reconnect-failed-only { display: none; }
.reconnect.components-reconnect-failed .reconnect-failed-only,
.reconnect.components-reconnect-rejected .reconnect-failed-only { display: inline-flex; }
.reconnect.components-reconnect-failed .reconnect-show-only,
.reconnect.components-reconnect-rejected .reconnect-show-only { display: none; }
.band h1 { hyphens: auto; overflow-wrap: break-word; }

/* Scorecard v3: the board is the possession switch, fewer taps per play */
button.sc-side2 {
    appearance: none; background: none; border: 0; color: inherit; font: inherit;
    padding: .3rem .2rem; border-radius: 14px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
button.sc-side2:disabled { cursor: default; opacity: 1; }
.sc-board2.is-switch button.sc-side2:not(:disabled):active { background: rgb(255 255 255 / .08); }
.sc-board2.is-switch button.sc-side2.has-ball { background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 2px var(--floodlight); }
.sc-board-hint {
    grid-column: 1 / -1; text-align: center; font-size: .78rem; color: #a9a3c7; margin-top: .3rem;
}
.sc-board2:not(:has(.has-ball)) .sc-board-hint { color: var(--floodlight); font-size: .95rem; font-weight: 700; }
.sc-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 64px; }
.sc-btn-sub { font-size: .74rem; font-weight: 600; opacity: .75; font-family: var(--font-body, inherit); letter-spacing: 0; text-transform: none; }
.sc-btn-td .sc-btn-sub { font-size: .85rem; }
.sc-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.sc-grid3 .sc-btn { font-size: .95rem; padding: .8rem .3rem; overflow-wrap: anywhere; }
.sc-pat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .4rem 0 .8rem; }
.sc-pat-grid .sc-choice-btn { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: 1.3rem; min-width: 0; }
.sc-pat-res { font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.sc-pat-res.is-ok { color: var(--accent); }
.sc-last {
    display: flex; align-items: center; gap: .6rem; margin-top: .9rem;
    border: 1px dashed var(--border); border-radius: 16px; padding: .35rem .35rem .35rem .9rem;
}
.sc-last-text { flex: 1; min-width: 0; font-size: .88rem; line-height: 1.3; }
.sc-last-undo {
    flex: none; min-height: 44px; padding: 0 .9rem; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-weight: 700; font-size: .88rem; cursor: pointer;
}
.sc-last-undo:active { color: var(--live); border-color: var(--live); }
/* The save button stays in reach when a sheet with a number pad scrolls */
.sheet > .btn-primary.sc-wide { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 -.6rem .8rem var(--bg); }
/* Secondary plays: real buttons, one step quieter than the play grid */
.sc-minor { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .5rem; }
.sc-minor button {
    display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 52px;
    border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2, var(--surface));
    color: var(--text); font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
}
.sc-minor button i { color: var(--accent); font-size: .9rem; }
.sc-minor button:active { transform: scale(.98); }
.sc-minor button:disabled { opacity: .45; }
/* Penalty picker: full-height list first, then the jersey pad */
.sc-penalties { max-height: none; overflow: visible; }
.sc-penalty {
    flex: none; min-height: 56px; width: 100%; display: flex; flex-direction: column; align-items: flex-start;
    justify-content: center; gap: .15rem; padding: .7rem 1rem; text-align: left;
}
.sc-penalty-name { font-weight: 700; font-size: .98rem; line-height: 1.25; }
.sc-penalty-sub { font-weight: 500; font-size: .82rem; color: var(--text-muted); line-height: 1.3; }
.sc-penalty.sel { margin-bottom: .6rem; }
