/* ─── CivDB design system ─────────────────────────────────────────── */

:root {
    --bg: #0b0d10;
    --bg-card: #12151a;
    --bg-elevated: #1a1e25;
    --bg-hover: #1e232b;
    --bg-input: #161a20;
    --border: #23282f;
    --border-light: #2e343d;
    --text: #eef1f5;
    --text-secondary: #b7bec9;
    --text-muted: #7a8290;
    --accent: #38d97a;
    --accent-hover: #4fe08c;
    --accent-subtle: rgba(56, 217, 122, 0.12);
    --red: #f0605c;
    --yellow: #e0b13a;
    --green: #38d97a;
    --blue: #4a90d9;
    --radius: 8px;
    --radius-lg: 14px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    --nav-h: 58px;
}

* { box-sizing: border-box; }

html, body {
    background: var(--bg);
    color: var(--text);
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

h1, h2, h3, h4 { margin: 0 0 0.5rem; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { color: var(--text-secondary); }

::selection { background: var(--accent-subtle); color: var(--text); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

/* ─── Layout ──────────────────────────────────────────────────────── */

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }

.grid-main {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 900px) {
    .grid-main { grid-template-columns: 1fr; }
}

/* ─── Buttons / forms ─────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    background: var(--bg-elevated);
    color: var(--text);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #06210f; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { background: var(--red); border-color: var(--red); color: #2b0808; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.78rem; }

input[type=text], input[type=number], input[type=date], input[type=time], input[type=datetime-local],
input[type=password], input[type=file], input[type=url], select, textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.88rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.35rem; }
.form-group { margin-bottom: 1rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 160px; }

.alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.88rem; }
.alert-success { background: rgba(56, 217, 122, 0.12); color: var(--accent); border: 1px solid rgba(56, 217, 122, 0.3); }
.alert-error { background: rgba(240, 96, 92, 0.12); color: var(--red); border: 1px solid rgba(240, 96, 92, 0.3); }

/* ─── Navbar ──────────────────────────────────────────────────────── */

.nav-glow {
    position: fixed; top: 0; left: 0; right: 0; height: 200px;
    background: radial-gradient(600px 120px at 20% 0%, rgba(56,217,122,0.08), transparent);
    pointer-events: none; z-index: 0;
}
.navbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 13, 16, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-h);
}
.nav-container {
    max-width: 1180px; margin: 0 auto; padding: 0 1.25rem;
    height: 100%; display: flex; align-items: center; gap: 1.5rem;
}
.nav-brand { display: flex; align-items: center; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; flex-shrink: 0; }
.nav-brand-logo { height: 28px; }
.nav-brand-text { color: var(--text); }
.nav-brand-fallback { display: none; }
.nav-brand-logo-failed .nav-brand-logo { display: none; }
.nav-brand-logo-failed .nav-brand-fallback { display: inline; }
.nav-brand-text::after { content: ''; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; flex: 1; }
.nav-links > a {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 0.7rem; border-radius: var(--radius);
    font-size: 0.88rem; font-weight: 600; color: var(--text-secondary);
    transition: background 0.15s, color 0.15s;
}
.nav-links > a:hover { color: var(--text); background: var(--bg-elevated); }
.nav-links > a.active { color: var(--accent); background: var(--accent-subtle); }
.nav-toggle { display: none; }

.nav-user { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.nav-discord-btn, .nav-notif-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--bg-elevated); color: var(--text-secondary); border: none; cursor: pointer;
}
.nav-discord-btn:hover, .nav-notif-btn:hover { color: var(--text); background: var(--bg-hover); }
.nav-admin-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--bg-elevated); color: var(--text-secondary);
}
.nav-admin-btn.active, .nav-admin-btn:hover { color: var(--accent); background: var(--accent-subtle); }

.nav-user-trigger, .nav-dropdown-trigger {
    display: flex; align-items: center; gap: 0.45rem;
    background: var(--bg-elevated); border: 1px solid transparent; border-radius: var(--radius);
    padding: 0.35rem 0.6rem 0.35rem 0.35rem; cursor: pointer; color: var(--text); font-family: inherit; font-size: 0.85rem; font-weight: 600;
}
.nav-dropdown-trigger { padding: 0.5rem 0.7rem; background: transparent; color: var(--text-secondary); }
.nav-dropdown-trigger:hover, .nav-dropdown-trigger.active { color: var(--text); background: var(--bg-elevated); }
.nav-avatar { width: 24px; height: 24px; border-radius: 50%; }
.dropdown-chevron { transition: transform 0.15s; opacity: 0.6; }

.nav-dropdown, .nav-user-dropdown-wrap, .nav-notif-wrap { position: relative; }
.nav-dropdown-menu, .nav-user-dropdown, .nav-notif-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); min-width: 200px; padding: 0.4rem;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 60;
}
.nav-dropdown-menu { left: 0; right: auto; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-user-dropdown-wrap.open .nav-user-dropdown,
.nav-notif-wrap.open .nav-notif-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-menu a, .nav-user-dropdown-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.5rem 0.6rem; border-radius: 6px; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
}
.nav-dropdown-menu a:hover, .nav-user-dropdown-item:hover { background: var(--bg-elevated); color: var(--text); }
.nav-user-dropdown-item.nav-user-dropdown-logout { color: var(--red); }
.nav-user-dropdown-form { margin: 0; }
button.nav-user-dropdown-item { width: 100%; background: none; border: 0; font: inherit; font-size: 0.85rem; font-weight: 500; text-align: left; cursor: pointer; }
.nav-user-dropdown-divider { height: 1px; background: var(--border); margin: 0.3rem 0.2rem; }
.nav-notif-badge {
    position: absolute; top: -2px; right: -2px; background: var(--red); color: #fff;
    font-size: 0.6rem; font-weight: 700; min-width: 15px; height: 15px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

.nav-search-wrap { display: flex; align-items: center; }
.nav-search-toggle {
    width: 34px; height: 34px; border-radius: 50%; background: var(--bg-elevated); border: none;
    color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.nav-search-toggle:hover { color: var(--text); background: var(--bg-hover); }

/* ─── Global search overlay ──────────────────────────────────────── */

.search-overlay {
    position: fixed; inset: 0; z-index: 100;
    opacity: 0; transition: opacity 0.15s;
}
.search-overlay.open { opacity: 1; }
.search-overlay-backdrop {
    position: absolute; inset: 0; background: rgba(6, 7, 9, 0.7); backdrop-filter: blur(2px);
}
.search-panel {
    position: relative; width: min(560px, calc(100% - 2rem));
    margin: 12vh auto 0;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); overflow: hidden;
    transform: translateY(-8px); transition: transform 0.15s;
}
.search-overlay.open .search-panel { transform: translateY(0); }
.search-panel-input-row {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.9rem 1rem; border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}
.search-panel-input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text); font-family: inherit; font-size: 1rem;
}
.search-panel-input::placeholder { color: var(--text-muted); }
.search-panel-close {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0.2rem;
}
.search-panel-close:hover { color: var(--text); }
.search-panel-results { max-height: 60vh; overflow-y: auto; padding: 0.5rem; }
.search-panel-hint { padding: 1.25rem 0.75rem; color: var(--text-muted); font-size: 0.88rem; text-align: center; }
.search-group { margin-bottom: 0.35rem; }
.search-group-label {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted); padding: 0.5rem 0.6rem 0.3rem;
}
.search-result {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.5rem 0.6rem; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 600; color: var(--text);
}
.search-result:hover { background: var(--bg-elevated); }
.search-result img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--bg-elevated); }
.search-result-fallback {
    width: 24px; height: 24px; border-radius: 50%; background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase;
}

/* ─── Shareable result card ──────────────────────────────────────── */

.share-overlay {
    position: fixed; inset: 0; z-index: 100;
    opacity: 0; transition: opacity 0.15s;
}
.share-overlay.open { opacity: 1; }
.share-overlay-backdrop { position: absolute; inset: 0; background: rgba(6, 7, 9, 0.7); backdrop-filter: blur(2px); }
.share-panel {
    position: relative; width: min(680px, calc(100% - 2rem));
    margin: 8vh auto 0; padding: 1rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transform: translateY(-8px); transition: transform 0.15s;
}
.share-overlay.open .share-panel { transform: translateY(0); }
.share-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.share-panel-head h2 { margin: 0; font-size: 1rem; }
.share-canvas { width: 100%; height: auto; border-radius: var(--radius); background: var(--bg); display: block; }
.share-panel-actions { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.9rem; flex-wrap: wrap; }
.share-copy-status { font-size: 0.78rem; color: var(--text-muted); }

@media (max-width: 860px) {
    .nav-toggle {
        display: flex; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer;
        margin-left: auto; padding: 0.5rem;
    }
    .nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 1px; }
    .nav-links {
        position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
        background: var(--bg); flex-direction: column; align-items: stretch; padding: 1rem;
        transform: translateX(100%); transition: transform 0.2s; overflow-y: auto;
    }
    .nav-links.open { transform: translateX(0); }
    /* .navbar's backdrop-filter makes it the containing block of the fixed menu: without these
       the closed menu widens the page (sideways scrollbar) and the open one is squashed to the
       navbar's height, because bottom: 0 resolves against the navbar, not the screen. */
    .navbar { overflow-x: clip; }
    .nav-links { bottom: auto; height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h)); }
    .nav-user { margin-left: 0; margin-top: 1rem; flex-wrap: wrap; }
    .nav-dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding-left: 0.75rem; display: none; }
    .nav-dropdown.mobile-open .nav-dropdown-menu { display: block; }
}

/* ─── Page header / tabs ──────────────────────────────────────────── */

.page-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }

.hero {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.hero-icon { font-size: 2.5rem; line-height: 1; }
.hero-text { flex: 1; min-width: 200px; }

.featured-cup { margin-bottom: 1.25rem; }
.featured-cup-card {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--accent-subtle), var(--bg-card));
    border: 1px solid var(--accent);
}
.featured-cup-card .fixture-card { background: var(--bg); }

.betting-howto {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.betting-howto-item {
    display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.85rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.betting-howto-icon { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.betting-howto-item div { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.betting-howto-item strong { font-size: 0.85rem; }
.betting-howto-item span { font-size: 0.78rem; color: var(--text-muted); line-height: 1.35; }
.betting-confirm-panel { padding: 1rem 1.1rem; margin-bottom: 1.25rem; border: 1px solid var(--accent); background: var(--accent-subtle); }
.betting-market-card { padding: 0.6rem; }

.market-status {
    display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.03em; background: var(--bg-elevated); color: var(--text-muted);
}
.market-status-open { background: rgba(56,217,122,0.16); color: var(--accent); }
.market-status-settled { background: rgba(74,144,217,0.16); color: var(--blue); }

.odds-option { border-bottom: 1px solid var(--border); }
.odds-option:last-of-type { border-bottom: none; }
.odds-option-winner { background: var(--accent-subtle); border-radius: var(--radius); }
.odds-option-row {
    width: 100%; display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 0.6rem; background: none; border: none; cursor: pointer; font-family: inherit; color: var(--text); text-align: left;
}
.odds-option-row:hover:not(:disabled) { background: var(--bg-hover); border-radius: var(--radius); }
.odds-option-row:disabled { cursor: default; opacity: 0.85; }
.odds-option-name { flex: 1; display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.92rem; min-width: 0; }
.odds-option-crest { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.odds-option-pool { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.odds-option-price {
    min-width: 64px; text-align: center; font-weight: 800; font-size: 0.95rem; color: var(--accent);
    background: var(--bg-elevated); border-radius: var(--radius); padding: 0.35rem 0.6rem;
}
.bet-slip { padding: 0 0.6rem 0.9rem; }
.bet-slip-form { display: flex; flex-direction: column; gap: 0.5rem; background: var(--bg-elevated); padding: 0.75rem; border-radius: var(--radius); }
.bet-slip-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.bet-ign-input { flex: 1; min-width: 130px; }
.bet-sortcode-input { flex: 1; min-width: 160px; }
.bet-amount-input { width: 110px; }
.bet-potential { font-size: 0.8rem; color: var(--text-secondary); flex: 1; min-width: 140px; }

.bet-command-box {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
    background: var(--bg); border: 1px solid var(--border-light); border-radius: var(--radius);
    padding: 0.9rem 1rem; margin: 0.75rem 0;
}
.bet-command-box code {
    flex: 1; min-width: 240px; font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.85rem; color: var(--accent); word-break: break-all;
}
.betting-pool-total { color: var(--text-muted); font-size: 0.75rem; padding: 0.75rem 0.6rem 0.25rem; margin: 0; }
.hero-kicker { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 0.2rem; }
.hero-text h1 { margin: 0 0 0.15rem; }
.hero-text p { margin: 0; font-size: 0.88rem; }

.tabs {
    display: flex; align-items: center; gap: 0.25rem; overflow-x: auto;
    border-bottom: 1px solid var(--border); margin-bottom: 1.25rem;
}
.tab {
    padding: 0.65rem 0.9rem; font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
    border-bottom: 2px solid transparent; white-space: nowrap; flex-shrink: 0;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs-fill { flex: 1; }

.section { margin-bottom: 1.75rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.7rem; }
.section-head h2 { margin: 0; }
.section-head-stack { display: block; }
.section-head-stack p { margin: 0.2rem 0 0; max-width: 680px; color: var(--text-muted); font-size: 0.82rem; }
.link-more { font-size: 0.8rem; font-weight: 600; color: var(--accent); }

.select-pill {
    background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text);
    border-radius: 20px; padding: 0.4rem 0.8rem; font-size: 0.82rem; font-weight: 600; font-family: inherit; cursor: pointer;
}
.select-pill-sm {
    padding: 0.25rem 0.55rem;
    font-size: 0.74rem;
    border-radius: 14px;
}
.scorer-division-select { max-width: 132px; }

/* ─── Data tables ─────────────────────────────────────────────────── */

table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead th {
    text-align: left; padding: 0.6rem 0.8rem; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted);
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-hover); }
.table-mini thead th, .table-mini tbody td { padding: 0.4rem 0.5rem; font-size: 0.78rem; }
.stat-sortable-th { cursor: pointer; user-select: none; }
.stat-sortable-th:hover { color: var(--text); }
.stat-sortable-th::after {
    content: "↕";
    display: inline-block;
    margin-left: 0.3rem;
    color: var(--text-muted);
    font-size: 0.66rem;
    opacity: 0.5;
}
.stat-sortable-th.sorted-asc::after { content: "↑"; color: var(--accent); opacity: 1; }
.stat-sortable-th.sorted-desc::after { content: "↓"; color: var(--accent); opacity: 1; }
.stat-table-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.6rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}
.stat-table-controls span { margin-right: auto; }
.stat-table-controls button[hidden] { display: none; }
.advanced-stats-section:not(.show-def-stats) .def-stat-col { display: none; }

/* ─── Stats graphs and comparisons ────────────────────────────────── */
.stats-graphs-section { margin-top: 1.5rem; }
.stats-graph-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.stats-graph-tile { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.stats-graph-tile summary { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; min-height: 70px; padding: 0.85rem 0.95rem; cursor: pointer; list-style: none; }
.stats-graph-tile summary::-webkit-details-marker { display: none; }
.stats-graph-tile summary strong { display: block; font-size: 0.88rem; }
.stats-graph-tile summary small { display: block; margin-top: 0.2rem; color: var(--text-secondary); font-size: 0.73rem; line-height: 1.3; }
.stats-graph-tile[open] summary { border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.stats-graph-chevron { width: 8px; height: 8px; flex: 0 0 auto; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg) translateY(-2px); transition: transform 0.15s; }
.stats-graph-tile[open] .stats-graph-chevron { transform: rotate(225deg) translateY(-2px); }
.stats-graph-content { padding: 0.65rem 0.95rem; }
.stats-graph-row { display: grid; grid-template-columns: minmax(90px, 1.35fr) minmax(110px, 4fr) minmax(36px, auto); align-items: center; gap: 0.7rem; padding: 0.45rem 0; }
.stats-graph-row + .stats-graph-row { border-top: 1px solid var(--border); }
.stats-graph-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); font-size: 0.8rem; font-weight: 700; }
.stats-graph-track { height: 10px; overflow: hidden; border-radius: 2px; background: var(--bg-elevated); }
.stats-graph-bar { display: block; height: 100%; min-width: 0; border-radius: inherit; }
.stats-graph-value { min-width: 2.2rem; text-align: right; font-size: 0.8rem; }
.comparison-controls { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 0.75rem; align-items: end; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.comparison-controls .form-group { margin: 0; }
.comparison-controls button { grid-column: 4; justify-self: end; min-width: 120px; }
.comparison-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 0.7rem; }
.comparison-identity { display: flex; align-items: end; justify-content: center; min-height: 124px; padding: 0.45rem 0.75rem 0; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.comparison-avatar { display: block; width: 104px; height: 104px; object-fit: contain; image-rendering: pixelated; object-position: bottom; }
.comparison-name { padding: 0.55rem 0.75rem 0.1rem; text-align: center; font-size: 0.92rem; font-weight: 800; }
.comparison-team-badge { display: flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0 0.75rem 0.55rem; color: var(--text-secondary); font-size: 0.7rem; }
.comparison-team-badge img { width: 20px; height: 20px; object-fit: contain; }
.comparison-metrics { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-card); }
.comparison-metric { display: grid; grid-template-columns: 1fr 100px 1fr; align-items: center; gap: 0.7rem; min-height: 42px; padding: 0.45rem 0.8rem; }
.comparison-metric + .comparison-metric { border-top: 1px solid var(--border); }
.comparison-metric-value { font-weight: 800; font-variant-numeric: tabular-nums; }
.comparison-metric-value.left { text-align: right; color: var(--accent); }
.comparison-metric-value.right { color: var(--blue); }
.comparison-metric-label { color: var(--text-muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0; text-align: center; text-transform: uppercase; }
.comparison-team-head { display: flex; align-items: center; justify-content: center; min-height: 94px; padding: 0.75rem; text-align: center; }
.comparison-team-head img { width: 52px; height: 52px; margin-right: 0.6rem; object-fit: contain; }

@media (max-width: 700px) {
    .stats-graph-grid { grid-template-columns: 1fr; }
    .stats-graph-row { grid-template-columns: minmax(74px, 1fr) minmax(78px, 2fr) minmax(32px, auto); gap: 0.45rem; }
    .comparison-controls { grid-template-columns: 1fr 1fr; }
    .comparison-controls button { grid-column: span 2; justify-self: stretch; }
    .comparison-players { gap: 0.55rem; }
    .comparison-identity { min-height: 112px; }
    .comparison-avatar { width: 92px; height: 92px; }
    .comparison-metric { grid-template-columns: 1fr 76px 1fr; gap: 0.35rem; padding: 0.45rem 0.5rem; }
}

.standings-table td, .standings-table th { text-align: center; }
.standings-table td:nth-child(2), .standings-table th:nth-child(2) { text-align: left; white-space: normal; }
.standings-row-zone { width: 4px; padding: 0 !important; }
tr.zone-playoff td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.zone-champion td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.zone-relegation td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tr.zone-releg-playoff td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
tr.zone-civbowl td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
tr.zone-promotion td:first-child, tr.zone-qualification td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
tr.current-team { background: var(--accent-subtle); }
tr.current-team td { font-weight: 700; }
.zone-key { display: flex; flex-wrap: wrap; gap: 0.9rem; font-size: 0.75rem; color: var(--text-muted); padding: 0.7rem 0.9rem; }
.zone-key span { display: inline-flex; align-items: center; gap: 0.35rem; }
.zone-dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.standings-has-determiners td:first-child { position: relative; box-shadow: none; }
.standings-has-determiners td:first-child::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--standing-zone-width, 4px); background: var(--standing-zone-background); }
.standing-determiner-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.standing-determiner { display: inline-flex; align-items: center; border: 1px solid color-mix(in srgb, var(--determiner-color) 40%, transparent); background: color-mix(in srgb, var(--determiner-color) 12%, transparent); color: var(--determiner-color); border-radius: 999px; padding: 0.12rem 0.38rem; font-size: 0.64rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }

.team-link, .player-link { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.team-link img, .player-link img { width: 20px; height: 20px; object-fit: contain; border-radius: 3px; flex-shrink: 0; }
.team-crest-fallback {
    width: 20px; height: 20px; border-radius: 5px; background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 800; color: var(--text-muted); flex-shrink: 0;
}
.pos-num { font-weight: 700; color: var(--text-muted); }

.stats-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    margin: -0.25rem 0 1rem;
    background: linear-gradient(135deg, rgba(56,217,122,0.09), rgba(74,144,217,0.08));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.stats-intro p { margin: 0.12rem 0 0; font-size: 0.86rem; color: var(--text-secondary); }
.stats-intro-kicker { color: var(--accent); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.stats-intro-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.stats-intro-pills span {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: rgba(11,13,16,0.35);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.stat-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: help;
    color: var(--text-secondary);
    border-bottom: 1px dotted var(--text-muted);
    outline: none;
}
.stat-help:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
/* Tooltip text comes from data-tip and is drawn by app.js (body-level, so tables can't clip it). */

@media (max-width: 700px) {
    .stats-intro { align-items: flex-start; flex-direction: column; }
    .stats-intro-pills { justify-content: flex-start; }
}

/* A team's badge, cropped to a circle instead of its default rounded-square — toggled per-team in Admin. */
.crest-circle { border-radius: 50% !important; }

.form-pill { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 4px; font-size: 0.65rem; font-weight: 800; }
.form-pill.W { background: rgba(56,217,122,0.18); color: var(--green); }
.form-pill.OTW { background: rgba(56,217,122,0.18); color: var(--green); }
.form-pill.L { background: rgba(240,96,92,0.18); color: var(--red); }
.form-pill.OTL { background: rgba(224,177,58,0.18); color: var(--yellow); }
.form-pill.D { background: var(--bg-elevated); color: var(--text-muted); }
.form-strip { display: flex; gap: 3px; }

/* ─── Fixture cards ───────────────────────────────────────────────── */

.fixture-list { display: flex; flex-direction: column; gap: 0.5rem; }
.fixture-card {
    display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    transition: background 0.15s, border-color 0.15s;
}
.fixture-card:hover { background: var(--bg-hover); border-color: var(--border-light); }
.fixture-card-current { border-color: var(--accent); background: var(--accent-subtle); }
.fixture-card-ihl {
    border-color: rgba(74, 144, 217, 0.65);
    box-shadow: inset 3px 0 0 var(--blue);
    background: linear-gradient(90deg, rgba(74, 144, 217, 0.12), var(--bg-card) 34%);
}
.fixture-card-ihl:hover { border-color: var(--blue); background: linear-gradient(90deg, rgba(74, 144, 217, 0.18), var(--bg-hover) 34%); }
.fx-date { width: 90px; flex-shrink: 0; font-size: 0.72rem; color: var(--text-muted); line-height: 1.4; }
.fx-gw { color: var(--accent); font-weight: 700; }
.fx-teams { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.9rem; min-width: 0; }
.fx-team { display: flex; align-items: center; gap: 0.5rem; flex: 1; font-size: 0.88rem; font-weight: 600; min-width: 0; }
.fx-team:last-child { flex-direction: row-reverse; text-align: right; }
.fx-team img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.fx-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-team.win { color: var(--text); }
.fx-team:not(.win) { color: var(--text-muted); }
.fx-vs { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }
.fx-score { display: flex; align-items: center; gap: 0.3rem; font-weight: 800; font-size: 1.05rem; flex-shrink: 0; min-width: 70px; justify-content: center; }
.fx-score span.win { color: var(--accent); }
.fx-score span:not(.win) { color: var(--text-muted); }
.fx-sep { color: var(--text-muted); font-weight: 400; }
.fx-ot { font-size: 0.6rem; color: var(--yellow); font-weight: 700; margin-left: 2px; }
.fx-status { width: 70px; flex-shrink: 0; text-align: right; }
.badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 20px; font-size: 0.65rem; font-weight: 700; background: var(--bg-elevated); color: var(--text-muted); }
.badge-live { background: rgba(240,96,92,0.18); color: var(--red); }
.badge-ft { background: var(--bg-elevated); color: var(--text-secondary); }
.badge-friendly { background: rgba(139,92,246,0.16); color: #8b5cf6; }

.team-fixtures-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
}
.team-fixture-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 190px;
    align-items: center;
    gap: 1rem;
    min-height: 82px;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    transition: background 0.15s, border-color 0.15s;
}
.team-fixture-card:hover { background: rgba(255,255,255,0.025); }
.team-fixture-card.fixture-card-ihl {
    border-color: var(--border);
    border-bottom-color: var(--border);
    box-shadow: inset 3px 0 0 var(--blue);
    background: linear-gradient(90deg, rgba(74,144,217,0.12), transparent 36%);
}
.team-fixture-card.fixture-card-ihl:hover {
    border-color: var(--border);
    border-bottom-color: var(--border-light);
    background: linear-gradient(90deg, rgba(74,144,217,0.18), rgba(255,255,255,0.025) 36%);
}
.team-fixture-date {
    color: var(--text-secondary);
    font-size: 0.78rem;
    white-space: nowrap;
}
.team-fixture-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}
.team-fixture-side {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text);
}
.team-fixture-side.home { justify-content: flex-end; text-align: right; }
.team-fixture-side.away { justify-content: flex-start; }
.team-fixture-side span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.team-fixture-crest {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}
.team-fixture-score {
    min-width: 58px;
    text-align: center;
    padding: 0.32rem 0.6rem;
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--text);
    font-weight: 900;
    white-space: nowrap;
}
.team-fixture-score.win { background: var(--green); color: #061b0d; }
.team-fixture-score.loss { background: var(--red); color: #fff; }
.team-fixture-score.upcoming { background: transparent; color: var(--text-secondary); }
.team-fixture-competition {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
}
.team-fixture-competition span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.team-fixture-competition img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

@media (max-width: 760px) {
    .team-fixture-card {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        min-height: 0;
    }
    .team-fixture-date,
    .team-fixture-competition { justify-content: center; text-align: center; }
    .team-fixture-main { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
    .team-fixture-side { font-size: 0.82rem; }
    .team-fixture-score { min-width: 52px; }
}

/* ─── Sponsors ────────────────────────────────────────────────────── */

.sponsor-strip {
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
    padding: 0.6rem 1rem; margin-bottom: 1rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 0.8rem;
}
.sponsor-strip-label { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.04em; flex-shrink: 0; }
.sponsor-strip-body { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; color: var(--text); }
.sponsor-strip-body img { height: 22px; width: auto; max-width: 80px; object-fit: contain; border-radius: 4px; }
.sponsor-strip-name { font-weight: 700; }
.sponsor-strip-desc { color: var(--text-muted); }

.sponsor-card {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.sponsor-card-img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: var(--bg-elevated); flex-shrink: 0; }
.sponsor-card-info { flex: 1; min-width: 0; }
.sponsor-card-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.sponsor-card-name { font-weight: 700; font-size: 0.9rem; }
.sponsor-card-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }
a.sponsor-card:hover { border-color: var(--border-light); background: var(--bg-hover); }

/* ─── Transfers ───────────────────────────────────────────────────── */

.transfer-controls { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.transfer-filter-toggle {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; font-weight: 500; color: var(--text-muted); cursor: pointer; text-transform: none;
}
.transfer-filter-toggle input { width: auto; }
.transfer-list { display: flex; flex-direction: column; gap: 0.5rem; }
.transfer-card {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.transfer-card[hidden] { display: none; }
.transfer-player-avatar { width: 28px; height: 28px; border-radius: 6px; image-rendering: pixelated; flex-shrink: 0; }
.transfer-info { flex: 1; min-width: 0; }
.transfer-player-name { font-weight: 700; font-size: 0.88rem; display: block; }
.transfer-move { display: flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.15rem; flex-wrap: wrap; }
.transfer-club { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; color: var(--text-secondary); }
.transfer-club img { width: 15px; height: 15px; object-fit: contain; }
.transfer-free-agent { color: var(--text-muted); font-style: italic; font-weight: 500; }
.transfer-arrow { color: var(--text-muted); }
.transfer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; flex-shrink: 0; font-size: 0.72rem; color: var(--text-muted); }
.transfer-fee { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 700; color: var(--text); }
.diamond-icon { flex-shrink: 0; }

.season-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; padding: 0;
    background: transparent; border: none; border-radius: 6px;
    color: var(--text-muted); cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.season-toggle:hover { background: var(--bg-elevated); color: var(--text); }
.season-toggle svg { transition: transform 0.15s; transform: rotate(0deg); }
.season-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }

.player-stats-scope label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}
.player-stats-scope input { width: auto; accent-color: var(--accent); }

/* ─── Scorer / stat rows ──────────────────────────────────────────── */

.stat-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border); }
.stat-row:last-child { border-bottom: none; }
.stat-row-avatar { width: 26px; height: 26px; border-radius: 4px; image-rendering: pixelated; }
.stat-row-info { flex: 1; min-width: 0; }
.stat-row-name { font-weight: 600; font-size: 0.85rem; display: block; }
.stat-row-team { display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }
.stat-row-team img { width: 13px; height: 13px; object-fit: contain; }
.stat-row-value { font-weight: 800; font-size: 0.95rem; }
.stat-row-value span { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; margin-left: 0.15rem; }

.stat-tile { padding: 1rem; text-align: center; }
.stat-tile-num { font-size: 1.6rem; font-weight: 800; }
.stat-tile-label { color: var(--text-muted); font-size: 0.75rem; margin-top: 0.2rem; }
.stat-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty-state .icon { font-size: 2.2rem; margin-bottom: 0.6rem; }

/* ─── Home hero + feature cards ───────────────────────────────────── */

.home-hero {
    text-align: center;
    padding: 3rem 1rem 2.5rem;
    margin-bottom: 1.5rem;
}
.home-hero h1 { font-size: 2.1rem; margin-bottom: 0.5rem; }
.home-hero p { max-width: 520px; margin: 0 auto 1.5rem; font-size: 0.98rem; }
.home-hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.feature-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.15s, transform 0.15s;
}
.feature-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.feature-card-icon {
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--accent-subtle); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
    margin-bottom: 0.25rem;
}
.feature-card h3 { margin: 0; font-size: 1rem; }
.feature-card p { font-size: 0.85rem; margin: 0; flex: 1; }
.feature-card .link-more { font-size: 0.8rem; }

.banner {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.9rem 1.1rem; border-radius: var(--radius-lg); margin-bottom: 1.5rem;
    background: var(--accent-subtle); border: 1px solid rgba(56, 217, 122, 0.3); flex-wrap: wrap;
}
.banner p { margin: 0; color: var(--text); font-size: 0.88rem; }
.banner strong { color: var(--accent); }

/* ─── Team directory ──────────────────────────────────────────────── */

.team-directory { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); align-items: stretch; gap: 0.85rem; }
.team-directory-card {
    display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.1rem;
    height: 100%; box-sizing: border-box;
    transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.team-directory-card:hover { border-color: var(--border-light); background: var(--bg-hover); transform: translateY(-1px); }
.team-directory-crest {
    width: 48px; height: 48px; flex-shrink: 0; border-radius: 10px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.team-directory-crest img { width: 34px; height: 34px; object-fit: contain; }
.team-directory-info { min-width: 0; flex: 1; }
.team-directory-name { font-weight: 700; font-size: 0.95rem; line-height: 1.25; overflow-wrap: break-word; }
.team-directory-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; min-height: 1.2em; }
.team-directory-meta .pos-num { color: var(--text-secondary); font-weight: 700; }
.form-pill.placeholder { background: var(--bg-elevated); color: var(--border-light); }

/* ─── Team hero gradient + bio ────────────────────────────────────── */

.hero.team-hero {
    background: linear-gradient(135deg, var(--team-primary, var(--bg-card)) 0%, var(--bg-elevated) 60%, var(--bg-card) 100%);
    position: relative;
    overflow: hidden;
}
.hero.team-hero::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 0%, var(--team-secondary, transparent) 140%);
    opacity: 0.18;
    pointer-events: none;
}
.hero.team-hero > * { position: relative; z-index: 1; }

.team-links { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.team-links a {
    display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
    border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--text);
    transition: background 0.15s;
}
.team-links a:hover { background: rgba(255,255,255,0.18); }

.honours-list { display: flex; flex-direction: column; gap: 0.6rem; }
.honours-item { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1.1rem; }
.honours-icon { font-size: 1.6rem; line-height: 1; }
.honours-label { font-weight: 700; font-size: 0.95rem; }
.honours-season { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.15rem; }

.bio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.9rem; }
.bio-item-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 0.2rem; }
.bio-item-value { font-size: 0.92rem; font-weight: 600; }
.bio-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; font-weight: 600; }
.bio-row:last-child { border-bottom: none; }
.bio-row a { color: var(--accent); }

/* ─── Squad picker + detail panel ─────────────────────────────────── */

.squad-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.6rem; margin-bottom: 1.25rem; }
.squad-pick-card {
    display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.75rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    cursor: pointer; text-align: left; font-family: inherit; transition: border-color 0.15s, background 0.15s;
}
.squad-pick-card:hover { border-color: var(--border-light); background: var(--bg-hover); }
.squad-pick-card.active { border-color: var(--accent); background: var(--accent-subtle); }
.squad-pick-avatar { width: 34px; height: 34px; border-radius: 6px; image-rendering: pixelated; flex-shrink: 0; }
.squad-pick-info { min-width: 0; }
.squad-pick-name { font-weight: 700; font-size: 0.88rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 0.4rem; }
.squad-pick-pos { font-size: 0.76rem; color: var(--text-secondary); margin-top: 0.15rem; }
.squad-captain-badge {
    display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
    border-radius: 50%; background: var(--accent); color: #06210f; font-size: 0.6rem; font-weight: 800; flex-shrink: 0;
}

.squad-detail { display: flex; gap: 1.75rem; padding: 1.5rem; flex-wrap: wrap; align-items: center; }
.squad-detail-canvas-wrap { width: 190px; height: 300px; }
.squad-detail-canvas-wrap canvas { width: 100% !important; height: 100% !important; display: block; }
.squad-detail-info { flex: 1; min-width: 220px; }
.squad-detail-name { font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }
.squad-detail-sub { color: var(--text-secondary); font-size: 0.92rem; margin-top: 0.25rem; }
.squad-detail-stats { display: flex; gap: 2rem; margin-top: 1.25rem; }
.squad-detail-stat-num { font-size: 1.7rem; font-weight: 800; color: var(--accent); }
.squad-detail-stat-label { font-size: 0.74rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.2rem; }
.squad-detail-debut { margin-top: 1.1rem; font-size: 0.88rem; color: var(--text-secondary); }
.squad-detail-info .btn { margin-top: 1.1rem; }

/* ─── League history chart ────────────────────────────────────────── */

.history-chart-svg { width: 100%; height: auto; display: block; }
.history-line { fill: none; stroke-width: 2.5; }
.history-dot { stroke-width: 2; cursor: default; }
.history-dot.promoted { fill: var(--green) !important; }
.history-dot.relegated { fill: var(--red) !important; }
.history-axis-label { font-size: 10px; fill: var(--text-muted); }
.history-legend { display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 1rem; border-top: 1px solid var(--border); }
.history-legend-item { display: flex; align-items: center; gap: 0.6rem; }
.history-legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.history-legend-team { display: flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.85rem; }
.history-legend-team img { width: 18px; height: 18px; object-fit: contain; }
.history-legend-division { font-size: 0.78rem; color: var(--text-muted); background: var(--bg-elevated); padding: 0.15rem 0.5rem; border-radius: 4px; }
.history-legend-position { font-weight: 800; font-size: 0.85rem; }

/* ─── Rink diagram ────────────────────────────────────────────────── */

.rink-wrap { padding: 1rem; }
.rink-svg { width: 100%; height: auto; display: block; }
.rink-player { cursor: default; }
.rink-player-dot {
    fill: var(--bg-elevated); stroke: var(--border-light); stroke-width: 1.5;
}
.rink-player.home .rink-player-dot { stroke: var(--accent); }
.rink-player.away .rink-player-dot { stroke: var(--blue); }
.rink-player-num { font-size: 11px; font-weight: 800; fill: var(--text); text-anchor: middle; }
.rink-player-pos { font-size: 9px; font-weight: 700; fill: var(--text-muted); text-anchor: middle; letter-spacing: 0.04em; }
.rink-player-name { font-size: 10.5px; font-weight: 600; fill: var(--text-secondary); text-anchor: middle; }
.bench-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.4rem; padding: 1rem; border-top: 1px solid var(--border); }
.bench-player { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; padding: 0.35rem 0.5rem; border-radius: 6px; }
.bench-player:hover { background: var(--bg-hover); }
.bench-pos { font-size: 0.62rem; font-weight: 700; color: var(--text-muted); background: var(--bg-elevated); border-radius: 4px; padding: 1px 4px; }
.bench-avatar { width: 22px; height: 22px; border-radius: 4px; image-rendering: pixelated; flex-shrink: 0; }

/* ─── Tactics board (training plans) ─────────────────────────────── */

.tactics-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.75rem 1rem; }
.tactics-toolbar-group { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.tactics-mode-btn { background: var(--bg-elevated); border: 1px solid transparent; color: var(--text-secondary); }
.tactics-mode-btn.active { background: var(--accent-subtle); border-color: var(--accent); color: var(--accent); }
.tactics-color-swatch {
    width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
}
.tactics-color-swatch.active { border-color: var(--text); }
.tactics-svg { width: 100%; height: auto; display: block; touch-action: none; }
.tactics-token { cursor: grab; }
.tactics-token.selected circle { filter: drop-shadow(0 0 4px rgba(255,255,255,0.5)); }

/* ─── Match header ────────────────────────────────────────────────── */

.h2h-record { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.1rem; }
.h2h-record-side { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.85rem; flex: 1; min-width: 0; }
.h2h-record-side img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.h2h-record-side span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h-record-score { display: flex; align-items: center; gap: 0.6rem; font-size: 1.1rem; flex-shrink: 0; }
.h2h-record-sep { color: var(--text-muted); font-weight: 400; }

.match-header { padding: 1.5rem 1.25rem; text-align: center; }
.match-comp-line { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.9rem; }
.match-comp-line img { width: 16px; height: 16px; object-fit: contain; }
.match-teams-row { display: flex; align-items: center; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.match-team-col { text-align: center; min-width: 130px; text-decoration: none; }
.match-team-crest { width: 56px; height: 56px; object-fit: contain; margin: 0 auto; }
.match-team-name { font-weight: 700; margin-top: 0.5rem; font-size: 1.02rem; }
.match-center-col { text-align: center; min-width: 100px; }
.match-score { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.match-score-sep { color: var(--text-muted); font-weight: 400; margin: 0 0.3rem; }
.match-status-line { margin-top: 0.5rem; }
.match-scorers-row { display: flex; align-items: flex-start; justify-content: center; gap: 2.5rem; margin-top: 1.1rem; flex-wrap: wrap; }
.match-scorers-col { min-width: 130px; font-size: 0.78rem; color: var(--text-secondary); line-height: 1.6; }
.match-scorers-col a { color: var(--text-secondary); }
.match-scorers-col a:hover { color: var(--text); }

/* ─── Highlights / article / stadium / referee cards ─────────────── */

.highlights-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: var(--bg-elevated); }
.highlights-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.article-teaser { display: flex; gap: 0.9rem; padding: 1rem; align-items: center; }
.article-teaser-img { width: 84px; height: 84px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--bg-elevated); }
.article-source-logo { width: 46px; max-height: 34px; object-fit: contain; flex-shrink: 0; }
.article-teaser-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 0.3rem; }
.article-teaser-author { color: var(--text-muted); font-size: 0.74rem; margin: -0.1rem 0 0.25rem; }
.article-teaser-summary { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.45; }
.article-byline { display: flex; align-items: center; gap: 0.55rem; color: var(--text-muted); font-size: 0.82rem; margin: -0.5rem 0 1rem; }
.article-byline img { width: 52px; max-height: 32px; object-fit: contain; }

.info-card-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0; font-size: 0.85rem; }
.info-card-row + .info-card-row { border-top: 1px solid var(--border); }
.info-card-row .icon { flex-shrink: 0; color: var(--text-muted); }
.info-card-label { color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; }
.info-card-value { font-weight: 600; }
.referee-row { display: flex; align-items: center; gap: 0.7rem; }
.referee-avatar { width: 40px; height: 40px; border-radius: 8px; image-rendering: pixelated; }

/* ─── Match timeline ──────────────────────────────────────────────── */

.timeline { display: flex; flex-direction: column; }
.timeline-event { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem; font-size: 0.85rem; }
.timeline-event.away-side { flex-direction: row-reverse; text-align: right; }
.timeline-minute { flex-shrink: 0; width: 46px; text-align: center; font-weight: 700; color: var(--text-muted); font-size: 0.78rem; }
.timeline-icon { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.timeline-detail { flex: 1; }
.timeline-player { font-weight: 700; }
.timeline-sub-out { color: var(--red); }
.timeline-sub-in { color: var(--green); }
.timeline-note { color: var(--text-muted); font-size: 0.76rem; margin-top: 0.1rem; }
.timeline-ht { text-align: center; padding: 0.5rem; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ─── Cup bracket ─────────────────────────────────────────────────── */
/* Columns share the card width (no horizontal scroll); ties have a fixed height so
   rounds line up, and halving rounds get connector lines into the next round. */
.cupb {
    --cupb-gap: 24px;
    --cupb-tie-h: 122px;
    --cupb-line: var(--border-light);
    display: grid;
    grid-template-columns: repeat(var(--cupb-rounds, 4), minmax(0, 1fr));
    column-gap: var(--cupb-gap);
    padding: 1.1rem 1rem 1.3rem;
}
.cupb-round { display: flex; flex-direction: column; min-width: 0; }
.cupb-round-head { min-height: 2.6rem; margin-bottom: 1rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--border); }
.cupb-round-head h2 { margin: 0; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cupb-round-head span { display: block; margin-top: 0.15rem; font-size: 0.7rem; color: var(--text-muted); }
.cupb-ties { flex: 1; display: grid; grid-template-rows: repeat(var(--cupb-n, 1), minmax(calc(var(--cupb-tie-h) + 14px), 1fr)); }
.cupb-slot { position: relative; display: flex; flex-direction: column; justify-content: center; }

.cupb-tie {
    position: relative; height: var(--cupb-tie-h);
    display: grid; grid-template-rows: 1fr 1fr 26px;
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px;
    transition: border-color .15s ease, transform .15s ease;
}
.cupb-tie:hover { border-color: var(--border-light); }
.cupb-tie.is-live { border-color: color-mix(in srgb, var(--red) 60%, var(--border)); }
.cupb-tie.is-tbd, .cupb-tie.is-bye { background: transparent; border-style: dashed; }

.cupb-side {
    display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 0.5rem;
    padding: 0 0.5rem 0 0.6rem; font-size: 0.8rem; font-weight: 600; min-width: 0;
}
.cupb-side:first-child { border-radius: 10px 10px 0 0; }
.cupb-side + .cupb-side { border-top: 1px solid var(--border); }
/* Long names wrap to a second line rather than being cut off; ties are tall enough for two. */
.cupb-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; line-height: 1.2; overflow-wrap: anywhere; color: var(--text-secondary); }
a.cupb-name:hover { color: var(--text); text-decoration: underline; }
.cupb-side.is-won { box-shadow: inset 3px 0 0 var(--accent); }
.cupb-side.is-won .cupb-name { color: var(--text); font-weight: 750; }
.cupb-side.is-lost .cupb-name, .cupb-side.is-lost .cupb-crest { opacity: 0.55; }
.cupb-side.is-empty .cupb-name { color: var(--text-muted); font-weight: 500; }
.cupb-score {
    min-width: 1.7rem; padding: 0.1rem 0.4rem; border-radius: 6px; text-align: center;
    font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-secondary);
}
.cupb-score:empty { visibility: hidden; }
.cupb-side.is-won .cupb-score { background: var(--accent-subtle); color: var(--accent); }
.cupb-side.is-lost .cupb-score { color: var(--text-muted); }

.cupb-crest { width: 20px; height: 20px; object-fit: contain; border-radius: 3px; }
.cupb-crest-text { display: grid; place-items: center; font-size: 0.55rem; font-weight: 800; background: var(--bg-hover); color: var(--text-muted); }
.cupb-crest-empty { border: 1.5px dashed var(--border-light); border-radius: 50%; width: 16px; height: 16px; margin: 0 2px; }

.cupb-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
    padding: 0 0.65rem; border-top: 1px solid var(--border); border-radius: 0 0 10px 10px;
    font-size: 0.68rem; font-weight: 600; color: var(--text-muted); background: rgba(255, 255, 255, 0.02);
    white-space: nowrap; overflow: hidden;
}
.cupb-meta span { overflow: hidden; text-overflow: ellipsis; }
a.cupb-meta:hover { background: var(--bg-hover); color: var(--text-secondary); }
.cupb-badge { flex-shrink: 0; padding: 0.05rem 0.4rem; border: 1px solid var(--border-light); border-radius: 999px; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; color: var(--text-secondary); }
.cupb-tie.is-live .cupb-badge { border-color: transparent; background: var(--red); color: #fff; animation: cupb-pulse 1.6s ease-in-out infinite; }
.cupb-go { flex-shrink: 0; font-weight: 700; color: var(--accent); opacity: 0.8; }
a.cupb-meta:hover .cupb-go { opacity: 1; }
@keyframes cupb-pulse { 50% { opacity: 0.55; } }

/* Connectors: each pair of ties joins at the boundary between their slots (the vertical middle
   of the pair), then a line runs into the next round, whose tie sits exactly at that height. */
.cupb-slot.is-pair-top::after, .cupb-slot.is-pair-bottom::after {
    content: ""; position: absolute; right: calc(var(--cupb-gap) / -2); width: calc(var(--cupb-gap) / 2);
    border-right: 2px solid var(--cupb-line); pointer-events: none;
}
.cupb-slot.is-pair-top::after { top: 50%; bottom: -1px; border-top: 2px solid var(--cupb-line); border-top-right-radius: 8px; }
.cupb-slot.is-pair-bottom::after { top: -1px; bottom: 50%; border-bottom: 2px solid var(--cupb-line); border-bottom-right-radius: 8px; }
.cupb-round.from-pairs .cupb-slot::before {
    content: ""; position: absolute; top: 50%; left: calc(var(--cupb-gap) / -2); width: calc(var(--cupb-gap) / 2);
    border-top: 2px solid var(--cupb-line); transform: translateY(-1px); pointer-events: none;
}

.cupb-champion {
    display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; padding: 0.85rem 1.1rem;
    border: 1px solid color-mix(in srgb, var(--yellow) 45%, var(--border)); border-radius: var(--radius-lg);
    background: linear-gradient(90deg, color-mix(in srgb, var(--yellow) 14%, transparent), transparent 70%), var(--bg-card);
}
.cupb-champion .cupb-crest { width: 40px; height: 40px; }
.cupb-champion-trophy { font-size: 1.6rem; }
.cupb-champion-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--yellow); }
.cupb-champion-name { font-size: 1.15rem; font-weight: 800; color: var(--text); }

/* Narrow screens: rounds stack, ties flow in a grid, no connector lines. */
@media (max-width: 900px) {
    .cupb { display: block; padding: 1rem; }
    .cupb-round + .cupb-round { margin-top: 1.4rem; }
    .cupb-round-head { min-height: 0; }
    .cupb-ties { grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
    .cupb-slot::before, .cupb-slot::after { display: none; }
}


/* ─── Admin ───────────────────────────────────────────────────────── */

.admin-tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.admin-tab { padding: 0.6rem 0.85rem; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-tab:hover { color: var(--text); }

/* ─── Login / auth pages ──────────────────────────────────────────── */

.auth-wrap { max-width: 420px; margin: 4rem auto; text-align: center; }
.auth-card { padding: 2rem 1.75rem; }
.auth-logo { font-size: 2.2rem; margin-bottom: 0.75rem; }

/* ─── Footer ──────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 1.25rem; text-align: center; color: var(--text-muted); font-size: 0.78rem; }
.site-footer a { color: var(--text-secondary); }

/* ─── Civ Links ───────────────────────────────────────────────────── */

.link-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin: -0.25rem 0 1.2rem;
}
.link-filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}
.link-filter-pill:hover,
.link-filter-pill.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}
.civ-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 0.85rem;
}
.civ-link-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    min-height: 112px;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.civ-link-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
    transform: translateY(-1px);
}
.civ-link-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-muted);
    font-weight: 900;
    font-size: 0.78rem;
    text-transform: uppercase;
}
.civ-link-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.35rem;
}
.civ-link-logo img + span { display: none; }
.civ-link-logo.has-fallback span { display: inline; }
.civ-link-body { min-width: 0; }
.civ-link-title { font-weight: 800; font-size: 0.96rem; }
.civ-link-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.18rem;
    line-height: 1.38;
}
.civ-link-tags {
    display: flex;
    gap: 0.32rem;
    flex-wrap: wrap;
    margin-top: 0.55rem;
}
.civ-link-tags span {
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
}
.civ-link-open {
    color: var(--text-muted);
    font-size: 0.9rem;
    align-self: flex-start;
}

/* ─── View transitions ────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(main-content) { animation: fade-out 0.12s ease both; }
    ::view-transition-new(main-content) { animation: fade-in 0.18s ease both; }
}
@keyframes fade-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }
main.container { view-transition-name: main-content; }

/* Mobile polish */

@media (max-width: 860px) {
    body { font-size: 14px; }
    h1 { font-size: 1.35rem; }
    h2 { font-size: 1.05rem; }

    .container {
        width: 100%;
        padding: 1rem 0.85rem 3rem;
        overflow-x: hidden;
    }

    .nav-container {
        padding: 0 0.85rem;
        gap: 0.75rem;
    }
    .nav-brand {
        min-width: 0;
        max-width: calc(100vw - 80px);
        overflow: hidden;
    }
    .nav-brand-logo { max-width: 150px; object-fit: contain; }
    .nav-brand-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .nav-links {
        z-index: 55;
        gap: 0.45rem;
        padding: 1rem 0.85rem calc(1rem + env(safe-area-inset-bottom));
    }
    .nav-links > a,
    .nav-dropdown-trigger {
        min-height: 44px;
        padding: 0.75rem 0.85rem;
        font-size: 0.95rem;
    }
    .nav-user {
        align-items: stretch;
        gap: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border);
    }
    .nav-search-wrap,
    .nav-user-dropdown-wrap { width: 100%; }
    .nav-search-toggle,
    .nav-discord-btn,
    .nav-admin-btn {
        width: 44px;
        height: 44px;
        border-radius: var(--radius);
    }
    .nav-user-trigger {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
    }
    .nav-user-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 0.5rem;
        display: none;
        width: 100%;
    }
    .nav-user-dropdown-wrap.open .nav-user-dropdown { display: block; }
    .search-panel {
        width: calc(100% - 1rem);
        margin-top: 4.5rem;
        border-radius: var(--radius);
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }
    .page-header .btn,
    .page-header select { width: 100%; justify-content: center; }

    .hero {
        padding: 1rem;
        gap: 0.85rem;
        align-items: flex-start;
    }
    .hero-icon { font-size: 2rem; }
    .hero-text { min-width: 0; width: 100%; }
    .hero .select-pill { width: 100%; }

    .tabs,
    .admin-tabs {
        margin-left: -0.85rem;
        margin-right: -0.85rem;
        padding: 0 0.85rem;
        scrollbar-width: none;
    }
    .tabs::-webkit-scrollbar,
    .admin-tabs::-webkit-scrollbar { display: none; }
    .tab,
    .admin-tab { padding: 0.75rem 0.72rem; }
    .tabs-fill { display: none; }

    .section-head {
        align-items: flex-start;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    .section-head .link-more { margin-left: auto; }

    .form-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
    }
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr auto"],
    [style*="grid-template-columns:1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    .form-row .form-group { min-width: 0; }
    .btn { min-height: 40px; justify-content: center; }

    .table-wrap {
        margin-left: -0.85rem;
        margin-right: -0.85rem;
        border-left: none;
        border-right: none;
        border-radius: 0;
        -webkit-overflow-scrolling: touch;
    }
    table { min-width: 560px; }
    .table-mini { min-width: 420px; }
    thead th,
    tbody td { padding: 0.55rem 0.6rem; }

    .stat-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }
    .stat-tile { padding: 0.85rem 0.6rem; }
    .stat-tile-num { font-size: 1.35rem; }

    .fixture-card {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.65rem;
        padding: 0.85rem;
    }
    .fx-date,
    .fx-status {
        width: auto;
        text-align: center;
    }
    .fx-teams { gap: 0.55rem; }
    .fx-team { font-size: 0.8rem; }
    .fx-team img { width: 20px; height: 20px; }
    .fx-score { min-width: 58px; font-size: 0.95rem; }

    .team-fixture-card { padding: 0.85rem 0.25rem; }
    .team-fixture-main { gap: 0.45rem; }
    .team-fixture-side { gap: 0.35rem; }
    .team-fixture-crest { width: 20px; height: 20px; }
    .team-fixture-competition {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .civ-link-grid,
    .team-directory,
    .squad-picker,
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .civ-link-card {
        grid-template-columns: 42px minmax(0, 1fr);
        min-height: 0;
        padding: 0.85rem;
    }
    .civ-link-logo { width: 42px; height: 42px; }
    .civ-link-open { display: none; }

    .article-teaser {
        align-items: flex-start;
        flex-direction: column;
    }
    .article-teaser-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .sponsor-strip,
    .sponsor-strip-body,
    .sponsor-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .squad-detail {
        padding: 1rem;
        justify-content: center;
        text-align: center;
    }
    .squad-detail-info { min-width: 0; width: 100%; }
    .squad-detail-name { justify-content: center; font-size: 1.2rem; }
    .squad-detail-stats {
        justify-content: center;
        gap: 1.25rem;
    }
    .squad-detail-canvas-wrap {
        width: 160px;
        height: 250px;
    }

    .match-header { padding: 1rem 0.75rem; }
    .match-comp-line {
        align-items: center;
        flex-wrap: wrap;
        line-height: 1.35;
    }
    .match-teams-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 0.6rem;
        align-items: center;
    }
    .match-team-col { min-width: 0; }
    .match-team-crest {
        width: 44px;
        height: 44px;
    }
    .match-team-name {
        font-size: 0.82rem;
        overflow-wrap: anywhere;
    }
    .match-center-col { min-width: 62px; }
    .match-score { font-size: 1.65rem; }
    .match-scorers-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    .match-scorers-col {
        min-width: 0;
        text-align: left !important;
        font-size: 0.74rem;
    }

    .timeline-event {
        gap: 0.5rem;
        padding: 0.55rem 0.75rem;
        font-size: 0.8rem;
    }
    .timeline-minute { width: 34px; }

    .bio-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }

    .home-hero {
        padding: 2rem 0 1.5rem;
    }
    .home-hero h1 { font-size: 1.55rem; }
}

@media (max-width: 520px) {
    .container { padding-left: 0.7rem; padding-right: 0.7rem; }
    .card,
    .hero,
    .fixture-card,
    .team-directory-card,
    .civ-link-card,
    .squad-pick-card,
    .transfer-card {
        border-radius: 10px;
    }
    .stat-columns { grid-template-columns: 1fr 1fr; }
    .team-fixture-main {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }
    .team-fixture-score {
        min-width: 46px;
        padding: 0.28rem 0.42rem;
        font-size: 0.82rem;
    }
    .team-fixture-side span { max-width: 38vw; }
    .match-teams-row { gap: 0.4rem; }
    .match-team-crest { width: 38px; height: 38px; }
    .match-score { font-size: 1.45rem; }
    .bench-list { grid-template-columns: 1fr; }
    .h2h-record {
        align-items: stretch;
        flex-direction: column;
        text-align: center;
    }
    .h2h-record-side { justify-content: center; }
    .civ-link-tags span,
    .badge { font-size: 0.62rem; }
}

/* Compare: one fieldset per side (entity + its own season), shared competition below. */
.comparison-controls.compare-sides { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.compare-side { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.7rem 0.85rem 0.85rem; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; min-width: 0; }
.compare-side legend { padding: 0 0.35rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.compare-side .form-group { margin: 0; min-width: 0; }
.compare-shared { grid-column: 1 / -1; display: flex; gap: 0.75rem; align-items: end; }
.compare-shared .form-group { margin: 0; flex: 1; max-width: 360px; }
.comparison-controls.compare-sides button { grid-column: auto; margin-left: auto; }
@media (max-width: 700px) {
    .comparison-controls.compare-sides { grid-template-columns: 1fr; }
    .compare-side { grid-template-columns: 1fr; }
    .compare-shared { flex-direction: column; align-items: stretch; }
    .compare-shared .form-group { max-width: none; }
    .comparison-controls.compare-sides button { margin-left: 0; }
}

/* Hockey admin: fixtures grouped by match day. */
.admin-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.25rem 0 0.45rem; }
.admin-day-head:first-of-type { margin-top: 0.25rem; }
.admin-day-head h3 { margin: 0; font-size: 0.95rem; }
.admin-day-head span { font-size: 0.78rem; color: var(--text-muted); }
.admin-day-table td:first-child { width: 80px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* Header action buttons + import dialogs on the fixture editor. */
.page-header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-left: auto; }
.admin-dialog { width: min(760px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); padding: 1.1rem 1.25rem 1.25rem; border: 1px solid var(--border-light); border-radius: var(--radius-lg); background: var(--bg-card); color: var(--text); box-shadow: var(--shadow); }
.admin-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.admin-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.admin-dialog-head h2 { margin: 0; }
.admin-day-table table { table-layout: fixed; }
.admin-day-table th:nth-child(1) { width: 80px; }
.admin-day-table th:nth-child(3) { width: 90px; }
.admin-day-table th:nth-child(4) { width: 120px; }
.admin-day-table th:nth-child(5) { width: 200px; }
.admin-day-table td:nth-child(2) { white-space: normal; }
@media (max-width: 700px) { .admin-day-table table { table-layout: auto; } }

/* ─── Tooltips (data-tip, positioned by app.js) ───────────────────── */
.th-tip { cursor: help; text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; }
.th-tip:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.site-tip {
    position: absolute; z-index: 1000; max-width: 240px; padding: 0.4rem 0.6rem;
    background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: 8px; box-shadow: var(--shadow);
    color: var(--text); font-size: 0.76rem; font-weight: 500; line-height: 1.35; text-transform: none; letter-spacing: normal; text-align: left;
    pointer-events: none; opacity: 0; transform: translateY(2px); transition: opacity .12s ease, transform .12s ease;
}
.site-tip.is-on { opacity: 1; transform: none; }

/* ─── Fixture player ratings (compact) ────────────────────────────── */
.mr-muted { color: var(--text-muted); font-size: 0.76rem; margin: 0; padding: 0 0.75rem 0.6rem; }
.mr-note { padding: 0.4rem 0 0; font-size: 0.7rem; }
.mr-crest { width: 16px; height: 16px; object-fit: contain; border-radius: 3px; flex-shrink: 0; }
.mr-crest-text { display: inline-grid; place-items: center; font-size: 0.48rem; font-weight: 800; background: var(--bg-hover); color: var(--text-muted); }
.mr-rating { display: inline-flex; justify-content: center; min-width: 34px; padding: 0.08rem 0.3rem; border-radius: 5px; font-size: 0.78rem; font-weight: 800; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.mr-rating-good { background: rgba(56, 217, 122, 0.18); color: var(--green); }
.mr-rating-mid { background: var(--bg-hover); color: var(--text); }
.mr-rating-warn { background: rgba(240, 96, 92, 0.16); color: var(--red); }
.mr-potm { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; padding: 0.5rem 0.75rem; border-color: color-mix(in srgb, var(--yellow) 40%, var(--border)); color: var(--text); }
.mr-potm-head { width: 32px; height: 32px; border-radius: 6px; image-rendering: pixelated; }
.mr-potm-text { display: flex; flex-direction: column; min-width: 0; }
.mr-potm-label { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--yellow); }
.mr-potm-text strong { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-potm-text small { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; color: var(--text-muted); font-size: 0.72rem; }
.mr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.mr-team-head { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.75rem 0.3rem; font-size: 0.8rem; }
.mr-list { list-style: none; margin: 0; padding: 0 0.35rem 0.35rem; }
.mr-list a { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 0.45rem; padding: 0.28rem 0.4rem; border-radius: 6px; color: var(--text); }
.mr-list a:hover { background: var(--bg-hover); }
.mr-list img { width: 20px; height: 20px; border-radius: 4px; image-rendering: pixelated; }
.mr-name { display: flex; align-items: baseline; gap: 0.4rem; min-width: 0; }
.mr-name strong { font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-name small { color: var(--text-muted); font-size: 0.68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-c { padding: 0 0.25rem; border: 1px solid var(--border-light); border-radius: 4px; font-size: 0.55rem; font-weight: 800; color: var(--text-secondary); }
@media (max-width: 700px) { .mr-grid { grid-template-columns: 1fr; } }

/* ─── Hockey admin layout ─────────────────────────────────────────── */
.hka { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.hka-nav { position: sticky; top: calc(var(--nav-h) + 1rem); display: flex; flex-direction: column; gap: 0.9rem; padding: 0.9rem 0.6rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); max-height: calc(100vh - var(--nav-h) - 2rem); overflow-y: auto; }
.hka-nav-head { display: flex; flex-direction: column; gap: 0.15rem; padding: 0 0.5rem 0.7rem; border-bottom: 1px solid var(--border); }
.hka-nav-head strong { font-size: 0.95rem; }
.hka-nav-back { font-size: 0.74rem; color: var(--text-muted); }
.hka-nav-back:hover { color: var(--text); }
.hka-nav-group { display: flex; flex-direction: column; gap: 1px; }
.hka-nav-label { padding: 0 0.55rem 0.3rem; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.hka-nav-link { display: flex; align-items: center; gap: 0.55rem; padding: 0.42rem 0.55rem; border-radius: 8px; font-size: 0.83rem; font-weight: 600; color: var(--text-secondary); }
.hka-nav-link:hover { background: var(--bg-hover); color: var(--text); }
.hka-nav-link.active { background: var(--accent-subtle); color: var(--accent); }
.hka-nav-icon { width: 1.2rem; text-align: center; font-size: 0.9rem; }
.hka-badge { margin-left: auto; min-width: 1.3rem; padding: 0 0.35rem; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.66rem; font-weight: 800; text-align: center; line-height: 1.3rem; }

.hka-main { min-width: 0; }
.hka-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--border); }
.hka-head h1 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: 0.5rem; }
.hka-head p { margin: 0.25rem 0 0; color: var(--text-muted); font-size: 0.85rem; }
/* Tidy the existing section cards: consistent spacing, headings and no stray max-widths. */
.hka-main > .card, .hka-main > form > .card, .hka-main > section.card { margin-top: 1rem !important; max-width: none !important; }
.hka-main .card > h2:first-child, .hka-main .card > div > h2:first-child { font-size: 1rem; }
.hka-main > h2 { font-size: 1rem; margin: 1.6rem 0 0.6rem; }
.hka-main .table-wrap { margin-top: 0.75rem; }

.hka-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.hka-tile { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.85rem 1rem; }
.hka-tile span { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hka-tile small { color: var(--text-muted); font-size: 0.76rem; }
.hka-panel { padding: 1rem 1.1rem; }
.hka-panel h2 { margin: 0 0 0.6rem; font-size: 1rem; }
.hka-muted { margin: 0; color: var(--text-muted); font-size: 0.85rem; }
.hka-todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.hka-todo a { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; border-radius: 8px; background: var(--bg-elevated); color: var(--text); font-size: 0.86rem; font-weight: 600; }
.hka-todo a:hover { background: var(--bg-hover); }
.hka-todo b { margin-left: auto; color: var(--text-muted); }
.hka-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media (max-width: 900px) {
    .hka { grid-template-columns: 1fr; gap: 1rem; }
    .hka-nav { position: static; max-height: none; flex-direction: row; gap: 0.25rem; padding: 0.4rem; overflow-x: auto; scrollbar-width: none; }
    .hka-nav::-webkit-scrollbar { display: none; }
    .hka-nav-head, .hka-nav-label { display: none; }
    .hka-nav-group { flex-direction: row; gap: 0.25rem; }
    .hka-nav-link { white-space: nowrap; }
    .hka-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Hockey admin: data checks */
.hkchk-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.hkchk-head h2 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.hkchk-count { font-size: .7rem; font-weight: 800; padding: .1rem .5rem; border-radius: 999px; background: var(--bg-hover); color: var(--text-secondary); }
.hkchk-tools { display: flex; gap: .5rem; align-items: center; }
.hkchk-filter select { width: auto; padding: .3rem .5rem; font-size: .82rem; }
.hkchk-table td { vertical-align: middle; }
.hkchk-head-img { width: 20px; height: 20px; border-radius: 4px; image-rendering: pixelated; vertical-align: -5px; margin-right: .45rem; }
.hkchk-warn td { background: rgba(245, 197, 66, .06); }
.hkchk-tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; background: var(--bg-hover); color: var(--text-secondary); margin: .1rem .2rem .1rem 0; white-space: nowrap; }
.hkchk-tag-warn { background: rgba(245, 197, 66, .16); color: #f5c542; }
.hkchk-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; max-width: 340px; margin-left: auto; }
.hkchk-actions form { margin: 0; }
.hkchk-table .hkchk-actions { max-width: 230px; }
.hkchk-pairs { display: grid; gap: .5rem; }
.hkchk-pair { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: center; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 10px; }
.hkchk-pair-hot { border-color: rgba(245, 197, 66, .55); background: rgba(245, 197, 66, .05); }
.hkchk-pair-cold { opacity: .6; }
.hkchk-pair-main { min-width: 0; }
.hkchk-pair-names { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .35rem; }
.hkchk-tags { margin-top: .2rem; }
.hkchk-sub { font-size: .75rem; color: var(--text-muted); }
.hkchk-pair-player { display: flex; align-items: center; gap: .45rem; color: inherit; text-decoration: none; min-width: 0; }
.hkchk-pair-player img { width: 28px; height: 28px; border-radius: 5px; image-rendering: pixelated; }
.hkchk-pair-player span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.hkchk-pair-player strong { word-break: break-all; }
.hkchk-pair-player small { color: var(--text-muted); font-size: .72rem; }
.hkchk-vs { color: var(--text-muted); font-weight: 800; }
.hkchk-dismiss { background: none; border: 1px solid transparent; color: var(--text-muted); }
.hkchk-dismiss:hover { color: var(--text-primary); border-color: var(--border); }
@media (max-width: 860px) { .hkchk-pair { grid-template-columns: 1fr; } .hkchk-actions { justify-content: flex-start; } }

/* Hockey tabs: "More" menu for games and tools */
.tabs-more { flex-shrink: 0; }
.tabs-more > summary { list-style: none; cursor: pointer; user-select: none; }
.tabs-more > summary::-webkit-details-marker { display: none; }
.tabs-more > summary span { font-size: .7em; opacity: .7; }
.tabs-more-menu { position: fixed; z-index: 200; min-width: 170px; padding: .35rem; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border); box-shadow: 0 14px 40px rgba(0,0,0,.45); display: flex; flex-direction: column; }
.tabs-more-menu a { padding: .55rem .75rem; border-radius: 8px; color: var(--text-secondary); font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.tabs-more-menu a:hover { background: var(--bg-hover); color: var(--text); }
.tabs-more-menu a.active { color: var(--accent); }

/* Average match rating badges, Football Manager style */
.avg-rating { display: inline-block; min-width: 2.9rem; text-align: center; font-weight: 800; font-size: .78rem; padding: .15rem .35rem; border-radius: 5px; color: #fff; font-variant-numeric: tabular-nums; }
.avg-elite { background: #166534; } .avg-great { background: #16a34a; } .avg-good { background: #65a30d; }
.avg-ok { background: #ca8a04; } .avg-meh { background: #ea580c; } .avg-bad { background: #dc2626; }
.avg-none { background: none; color: var(--text-muted); }
/* Featured match on the hockey home page */
.featured-match { margin-bottom: 1.25rem; }
.featured-match-card { display: block; padding: 1.1rem 1.25rem 1.3rem; background: linear-gradient(135deg, var(--accent-subtle), var(--bg-card)); border: 1px solid var(--accent); color: inherit; text-decoration: none; transition: transform .15s ease; }
.featured-match-card:hover { transform: translateY(-1px); }
.featured-match-top { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-muted); margin-bottom: .9rem; }
.featured-match-label { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.featured-match-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.featured-match-team { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; min-width: 0; }
.featured-match-team img, .featured-match-team .team-crest-fallback { width: 64px; height: 64px; object-fit: contain; font-size: 1.3rem; border-radius: 12px; }
.featured-match-team b { font-size: 1.05rem; overflow-wrap: anywhere; }
.featured-match-mid { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.featured-match-vs { font-size: 1.4rem; font-weight: 800; color: var(--text-muted); }
.featured-match-when { font-weight: 700; }
.featured-match-date { font-size: .8rem; color: var(--text-muted); }
.featured-match-score { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
    .featured-match-team img, .featured-match-team .team-crest-fallback { width: 44px; height: 44px; }
    .featured-match-team b { font-size: .9rem; }
}