
    :root {
      color-scheme: light dark;
      --bg: #f6f7fb;
      --card: #ffffff;
      --text: #172033;
      --text-subtle: #374151;
      --muted: #6b7280;
      --line: #e5e7eb;
      --line-strong: #cbd5e1;
      --blue: #1d4ed8;
      --blue-soft: #dbeafe;
      --orange: #b45309;
      --orange-soft: #fef3c7;
      --surface-muted: #f8fafc;
      --calendar-button-bg: rgba(255, 255, 255, .86);
      --calendar-panel-bg: rgba(255, 255, 255, .96);
      --calendar-panel-line: rgba(203, 213, 225, .9);
      --next-start: #fff;
      --next-end: #eff6ff;
      --next-line: #dbeafe;
      --date-bg: #111827;
      --date-muted: #cbd5e1;
      --date-subtle: #e5e7eb;
      --win-bg: #ecfdf3;
      --win-text: #067647;
      --loss-bg: #fef2f2;
      --loss-text: #b42318;
      --draw-bg: #f1f5f9;
      --draw-text: #475569;
      --past-card: #fbfcfe;
      --past-date-bg: #475569;
      --button-bg: #172033;
      --button-text: #fff;
      --focus: #1d4ed8;
      --accent-bg: #f97316;
      --accent-bg-pressed: #ea6a0a;
      --accent-text: white;
      --accent-shadow: 0 8px 18px rgba(249, 115, 22, .22);
      --shadow: 0 12px 32px rgba(15, 23, 42, .08);
      --card-shadow: 0 8px 22px rgba(15, 23, 42, .05);
      --menu-shadow: 0 6px 16px rgba(15, 23, 42, .05);
      --panel-shadow: 0 22px 50px rgba(15, 23, 42, .16);
      --radius: 22px;
    }
    @media (prefers-color-scheme: dark) {
      :root {
        --bg: #111827;
        --card: #1f2937;
        --text: #f9fafb;
        --text-subtle: #e5e7eb;
        --muted: #cbd5e1;
        --line: #475569;
        --line-strong: #64748b;
        --blue: #93c5fd;
        --blue-soft: #1e3a5f;
        --orange: #fdba74;
        --orange-soft: #4a2c0b;
        --surface-muted: #334155;
        --calendar-button-bg: rgba(31, 41, 55, .9);
        --calendar-panel-bg: rgba(31, 41, 55, .98);
        --calendar-panel-line: rgba(100, 116, 139, .9);
        --next-start: #1f2937;
        --next-end: #172554;
        --next-line: #1e3a5f;
        --date-bg: #030712;
        --date-muted: #cbd5e1;
        --date-subtle: #e5e7eb;
        --win-bg: #14532d;
        --win-text: #bbf7d0;
        --loss-bg: #4c1d24;
        --loss-text: #fecaca;
        --draw-bg: #334155;
        --draw-text: #e2e8f0;
        --past-card: #1b2533;
        --past-date-bg: #334155;
        --button-bg: #dbeafe;
        --button-text: #0f172a;
        --focus: #93c5fd;
        --accent-bg: #fb923c;
        --accent-bg-pressed: #f97316;
        --accent-text: #172033;
        --accent-shadow: 0 8px 18px rgba(251, 146, 60, .2);
        --shadow: 0 12px 32px rgba(0, 0, 0, .35);
        --card-shadow: 0 8px 22px rgba(0, 0, 0, .28);
        --menu-shadow: 0 6px 16px rgba(0, 0, 0, .24);
        --panel-shadow: 0 22px 50px rgba(0, 0, 0, .45);
      }
    }
    * { box-sizing: border-box; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
    body {
      margin: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      background: var(--bg);
      color: var(--text);
    }
    .wrap { width: min(760px, 100%); margin: 0 auto; padding: 18px 14px 38px; }
    header { padding: 18px 2px 14px; }
    .topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
    .brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 900; letter-spacing: -.03em; }
    .mark { width: 30px; height: 30px; border-radius: 50%; background: #f97316; }
    /* The homepage menu (openhoops-site/index.html) on every page; it
       wraps under the brand on narrow screens as it does there. */
    .topbar-menu { flex-wrap: wrap; gap: 0 12px; }
    .home-nav { display: flex; align-items: center; gap: 4px; }
    .home-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--text-subtle); font-size: .875rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
    .home-nav a:hover, .home-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
    .season { color: var(--blue); font-weight: 800; font-size: .82rem; letter-spacing: .02em; }
    /* The line above a title is the breadcrumb: its linked parts lead back up
       (club, league, season). The padding only enlarges the tap area. */
    .season a { padding-block: 8px; color: inherit; font-weight: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; }
    .season a:hover { text-decoration-color: currentColor; }
    h1 { margin: 8px 0 8px; font-size: clamp(2rem, 9vw, 3.6rem); line-height: .96; letter-spacing: -.045em; }
    .sub { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.4; }
    .updated { margin-top: 12px; color: var(--muted); font-size: .9rem; }
    .calendar-actions { position: relative; margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
    .calendar-link { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-text); font-size: .92rem; font-weight: 900; text-decoration: none; box-shadow: var(--accent-shadow); }
    /* Split button: the link keeps its job, the chevron segment is the
       summary of the details element holding the options panel. */
    .calendar-split { position: relative; display: inline-flex; align-items: stretch; border-radius: 999px; box-shadow: var(--accent-shadow); }
    .calendar-split .calendar-link { border-radius: 999px 0 0 999px; padding-right: 14px; box-shadow: none; }
    .calendar-menu { display: flex; }
    .calendar-menu summary { list-style: none; cursor: pointer; user-select: none; display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px 0 12px; border-left: 1px solid rgba(255, 255, 255, .35); border-radius: 0 999px 999px 0; background: var(--accent-bg); color: var(--accent-text); }
    .calendar-menu summary::-webkit-details-marker { display: none; }
    .calendar-menu summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .16s ease; }
    .calendar-menu summary:hover, .calendar-menu[open] summary { background: var(--accent-bg-pressed); }
    .calendar-menu summary:focus-visible { outline-offset: -3px; }
    .calendar-menu[open] summary::after { transform: translateY(2px) rotate(225deg); }
    .calendar-panel { position: absolute; z-index: 20; top: calc(100% + 10px); left: 0; width: min(390px, calc(100vw - 28px)); padding: 8px; border: 1px solid var(--calendar-panel-line); border-radius: 22px; background: var(--calendar-panel-bg); box-shadow: var(--panel-shadow); backdrop-filter: blur(14px); }
    .calendar-panel::before { content: ""; position: absolute; top: -6px; right: 18px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--calendar-panel-bg); border-left: 1px solid var(--calendar-panel-line); border-top: 1px solid var(--calendar-panel-line); }
    .calendar-option { display: block; border-radius: 16px; padding: 12px; color: inherit; text-decoration: none; }
    .calendar-option:hover { background: var(--surface-muted); }
    .calendar-option strong { display: block; color: var(--text); font-size: .95rem; margin-bottom: 3px; }
    .calendar-option span { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; overflow-wrap: anywhere; }
    .calendar-help { margin: 4px 4px 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface-muted); color: var(--muted); font-size: .82rem; line-height: 1.4; }
    .calendar-help p { margin: 0; }
    .calendar-help p + p { margin-top: 6px; }
    .calendar-copy { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-top: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; }
    .calendar-copy::before { content: ""; width: 9px; height: 11px; border: 1.5px solid currentColor; border-radius: 2px; box-shadow: 3px -3px 0 -1px var(--card), 3px -3px 0 .5px currentColor; opacity: .7; }
    .calendar-copy:hover { border-color: var(--line-strong); }
    .calendar-copy.copied { border-color: var(--win-text); background: var(--win-bg); color: var(--win-text); }
    .calendar-copy.copied::before { width: 5px; height: 9px; border-width: 0 2px 2px 0; border-radius: 0; box-shadow: none; transform: translateY(-1px) rotate(45deg); opacity: 1; }
    .calendar-copy[hidden] { display: none; }
    a { color: var(--blue); font-weight: 750; text-decoration: none; }
    .back { display: inline-flex; margin-bottom: 10px; color: var(--muted); font-weight: 750; }
    .featured-games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 12px; margin: 8px 0 14px; }
    .next-card {
      background: linear-gradient(135deg, var(--next-start), var(--next-end));
      border: 1px solid var(--next-line);
      box-shadow: var(--shadow);
      border-radius: 28px;
      padding: 20px;
      margin: 0;
      position: relative;
    }
    .next-kicker, .last-kicker { color: var(--blue); font-weight: 900; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
    .next-card h2, .last-card h2 { margin: 8px 0 8px; font-size: 1.45rem; line-height: 1.1; letter-spacing: -.025em; }
    .next-card p, .last-card p { margin: 0 0 8px; color: var(--muted); }
    .last-card { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 28px; padding: 20px; }
    .last-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--draw-text); }
    .last-card.win::before { background: var(--win-text); }
    .last-card.loss::before { background: var(--loss-text); }
    .featured-result-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 3px 0 12px; }
    .last-card .featured-result { margin: 0; }
    .results-link { font-size: .86rem; }
    .schedule-group { margin-top: 26px; }
    .schedule-group + .schedule-group { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line-strong); }
    .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 4px 2px; }
    .section-heading h2 { margin: 0; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.025em; }
    .section-heading p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; }
    .section-heading > span { min-width: 30px; padding: 5px 9px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); text-align: center; font-size: .78rem; font-weight: 900; }
    .month { margin: 24px 4px 10px; font-size: .95rem; color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
    .games .month:first-child { margin-top: 14px; }
    .game {
      position: relative;
      display: grid;
      grid-template-columns: 70px 1fr;
      gap: 12px;
      align-items: stretch;
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--card-shadow);
      padding: 12px;
      margin-bottom: 10px;
    }
    .date {
      border-radius: 17px;
      background: var(--date-bg);
      color: white;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 86px;
    }
    .date span { color: var(--date-muted); font-weight: 800; font-size: .78rem; }
    .date strong { font-size: 1.65rem; line-height: 1.05; }
    .date small { color: var(--date-subtle); font-weight: 800; }
    .details { min-width: 0; padding: 2px 0; }
    .line { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
    .game-neutral .line { flex-wrap: wrap; gap: 6px 8px; }
    .game-neutral h3 a { color: inherit; text-decoration: none; }
    .badge { border-radius: 999px; padding: 4px 9px; font-size: .72rem; font-weight: 900; }
    .badge.home { color: var(--blue); background: var(--blue-soft); }
    .badge.away { color: var(--orange); background: var(--orange-soft); }
    .badge.competition { color: var(--blue); background: var(--blue-soft); }
    a.badge { max-width: 100%; text-decoration: none; overflow-wrap: anywhere; }
    .round { color: var(--muted); font-size: .82rem; }
    .round a { color: inherit; font-weight: inherit; }
    h3 { margin: 0 0 4px; font-size: 1.12rem; line-height: 1.18; overflow-wrap: anywhere; }
    .details h3 { margin-bottom: 8px; }
    .details h3 a { color: inherit; }
    .details p { margin: 0 0 7px; color: var(--text-subtle); font-size: .92rem; line-height: 1.3; }
    .result { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 8px; padding: 5px 10px 5px 6px; border-radius: 999px; font-size: .9rem; font-weight: 850; font-variant-numeric: tabular-nums; }
    .result.win { background: var(--win-bg); color: var(--win-text); }
    .result.loss { background: var(--loss-bg); color: var(--loss-text); }
    .result.draw { background: var(--draw-bg); color: var(--draw-text); }
    /* A finished neutral game (league pages) reads as a scoreboard: each team
       with its points, the loser dimmed, as on the match page. */
    .score-board { display: grid; gap: 4px; font-size: 1.02rem; font-weight: 850; }
    .score-board-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
    .score-board-row > span { min-width: 0; overflow-wrap: anywhere; }
    .score-board-row strong { flex: 0 0 auto; font-size: 1.12rem; font-variant-numeric: tabular-nums; }
    .score-board-row.lost { color: var(--muted); font-weight: 650; }
    .score-board-row.quiet { color: var(--text-subtle); font-weight: 650; }
    .score-board strong.win { color: var(--win-text); }
    .score-board strong.loss { color: var(--loss-text); }
    /* Meine Teams game card (components.PersonalGame): only the time in the
       block, since the day heads the list; finished and past games in the
       quieter past look, as on the team pages. */
    .personal-game { margin-bottom: 0; }
    .personal-game-time { min-height: 0; }
    .personal-game-time strong { font-size: 1.05rem; }
    .personal-game.past-game { background: var(--past-card); box-shadow: none; }
    .personal-game.past-game .date { background: var(--past-date-bg); }
    .withdrawal-note { display: block; font-weight: 650; overflow-wrap: anywhere; }
    .details .withdrawal-note, .fixture-body .withdrawal-note { color: var(--orange); }
    .match-card .withdrawal-note { color: #fdba74; }
    .result.cancelled { padding: 5px 10px; background: var(--orange-soft); color: var(--orange); }
    .result.unscored { padding: 5px 10px; background: var(--draw-bg); color: var(--draw-text); font-weight: 750; }
    .result-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--card); font-size: .72rem; line-height: 1; }
    .result.win .result-mark { background: var(--win-text); }
    .result.loss .result-mark { background: var(--loss-text); }
    .result.draw .result-mark { background: var(--draw-text); }
    .result strong { font-weight: 900; }
    .past-games .game { background: var(--past-card); box-shadow: none; }
    .past-games .date { background: var(--past-date-bg); }
    .venue { font-size: .92rem; line-height: 1.25; color: var(--text-subtle); }
    /* Stream chip: a badge-sized link with the channel and site beside it. */
    .video-action { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; }
    .badge.video-link { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 3px 11px 3px 9px; color: var(--blue); background: var(--blue-soft); font-size: .78rem; font-weight: 850; text-decoration: none; }
    .badge.video-link:hover { box-shadow: inset 0 0 0 1px currentColor; text-decoration: none; }
    .video-play { width: .72em; height: .72em; flex: 0 0 auto; }
    .video-credit { color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
    .match-card .video-credit { color: #cbd5e1; }
    .match-video { margin-top: 0; }
    .fixture-video { padding: 0 var(--fixture-padding) 12px calc(var(--fixture-padding) + var(--fixture-time-width) + var(--fixture-gap)); }
    .streams-heading { margin: 20px 0; }
    .streams-heading h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); }
    .streams-heading p { color: var(--muted); line-height: 1.5; }
    .team-actions { position: relative; display: flex; gap: 8px; width: fit-content; max-width: 100%; margin-top: 14px; }
    .team-actions-with-calendar { container: team-actions / inline-size; display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; max-width: 560px; gap: clamp(8px, 1.2vw, 12px); }
    .calendar-label-wide { display: none; }
    .team-actions .calendar-actions { position: static; margin: 0; min-width: 0; display: block; }
    .team-actions .calendar-split { position: static; display: flex; flex-wrap: nowrap; }
    .team-actions .calendar-split .calendar-link { min-height: 44px; padding: 0 10px; flex: 1; justify-content: center; white-space: nowrap; font-size: 14px; box-shadow: none; }
    .team-actions .calendar-menu { display: flex; }
    .team-actions .calendar-menu summary { min-height: 44px; width: 44px; flex: none; padding: 0; justify-content: center; }
    .team-actions .calendar-panel { position: absolute; top: calc(100% + 8px); left: 0; width: 100%; max-width: 100%; margin: 0; }
    .team-actions .calendar-panel::before { display: none; }
    .favorite-actions { position: relative; display: inline-flex; flex: 0 0 auto; width: 138px; }
    .team-actions .favorite-actions { position: static; }
    .favorite-toggle { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 44px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--text); font-size: 14px; font-weight: 650; text-decoration: none; }
    .favorite-caption { white-space: nowrap; }
    .favorite-toggle svg { flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
    .favorite-toggle[data-marked="true"] { color: var(--orange); background: var(--orange-soft); }
    @container team-actions (min-width: 540px) {
      .calendar-label-compact { display: none; }
      .calendar-label-wide { display: inline; }
      .team-actions .calendar-split .calendar-link { min-height: 50px; padding: 0 20px; font-size: 16px; }
      .team-actions .calendar-menu summary { min-height: 50px; width: 50px; }
      .favorite-actions { width: 180px; }
      .favorite-toggle { height: 50px; padding: 0 16px; gap: 8px; font-size: 16px; }
      .favorite-toggle svg { width: 21px; height: 21px; }
    }
    @container team-actions (max-width: 332px) {
      .calendar-actions, .favorite-actions { grid-column: 1 / -1; }
      .favorite-actions { width: 100%; }
    }
    @media (min-width: 601px) {
      .team-actions:not(.team-actions-with-calendar) .favorite-actions { width: 180px; }
      .team-actions:not(.team-actions-with-calendar) .favorite-toggle { height: 50px; font-size: 16px; }
    }
    @media (max-width: 360px) { .team-actions-with-calendar { grid-template-columns: 1fr; } .team-actions-with-calendar .favorite-actions { width: 100%; } }
    .favorite-toggle[data-marked="true"] svg { fill: currentColor; }
    .favorite-toggle:hover { background: var(--surface-muted); color: var(--orange); }
    .favorite-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
    .favorite-notice:not(.sr-only):not(:empty) { position: absolute; z-index: 2; top: 100%; right: 0; width: min(270px, calc(100vw - 40px)); padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--menu-shadow); color: var(--text); font-size: .84rem; }
    .team-actions:not(.team-actions-with-calendar) .favorite-notice { left: 0; right: auto; }
    .favorite-notice:empty { display: none; }
    .favorite-toggle[aria-disabled="true"] { opacity: .65; }
    .streams-section { margin-top: 28px; }
    .streams-section .game { margin-bottom: 10px; }
    .stream-day { margin: 20px 0 8px; font-size: 1rem; line-height: 1.35; }
    .game-linkable { cursor: pointer; }
    .game-linkable:hover { border-color: var(--line-strong); }
    .game-open { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
    .game-linkable a:not(.game-open) { position: relative; z-index: 2; }
    /* One match as a card in the same column as every other page: the
       competition and date on top, a two-row scoreboard, the venue below. */
    .match-detail { margin-top: 4px; }
    .match-card { padding: 20px 22px 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--date-bg); color: #fff; box-shadow: var(--card-shadow); }
    /* Links in the card follow the schedule cards: team names inherit their
       colour and underline on hover only; the competition is the same pill
       badge as on a game card, in a dark-card tint. */
    .match-card-team a { color: inherit; text-decoration: none; }
    .match-card-team a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
    .match-card-eyebrow .badge { display: inline-block; max-width: 100%; color: #e2e8f0; background: rgba(255, 255, 255, .12); letter-spacing: .04em; text-transform: uppercase; overflow-wrap: anywhere; }
    .match-card-eyebrow a.badge:hover { background: rgba(255, 255, 255, .22); color: #fff; }
    .match-card-eyebrow { margin: 0; line-height: 1; }
    .match-card-when { margin: 10px 0 0; color: #e2e8f0; font-size: 1rem; font-weight: 650; }
    .match-card-time { white-space: nowrap; }
    .match-card-board { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; column-gap: 18px; row-gap: 6px; align-items: center; margin-top: 20px; }
    .match-card-teams, .match-card-scores { display: contents; margin: 0; font-size: inherit; font-weight: inherit; letter-spacing: 0; line-height: inherit; }
    .match-card-vs { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    .match-card-team { grid-column: 1; min-width: 0; font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 850; line-height: 1.1; letter-spacing: -.025em; overflow-wrap: anywhere; }
    .match-card-score { grid-column: 2; text-align: right; font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 900; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
    .match-card-home { grid-row: 1; }
    .match-card-away { grid-row: 2; }
    .match-card-lost { color: #94a3b8; }
    .match-card-note { grid-column: 2; grid-row: 3; display: block; color: #cbd5e1; font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; text-align: right; }
    .match-card-slot { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
    .match-card-slot strong { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 900; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
    .match-card-slot .match-card-note { grid-area: auto; }
    .match-card-slot-cancelled strong { color: #fdba74; }
    .match-card-slot-unscored strong, .match-card-slot-time-open strong { color: #cbd5e1; font-size: clamp(1.15rem, 2.5vw, 1.4rem); }
    /* Points per period, a small table card under the match card when
       DBB.Scores has them. The header row (1–4, V) needs no title. */
    .match-periods { margin-top: 12px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--card-shadow); overflow-x: auto; }
    .match-periods table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
    .match-periods th, .match-periods td { padding: 6px 0 6px 14px; text-align: right; white-space: nowrap; }
    .match-periods thead th { padding-top: 2px; padding-bottom: 2px; color: var(--muted); font-size: .74rem; font-weight: 900; }
    /* max-width: 0 lets the name column take what the numbers leave and shorten with "…". */
    .match-periods tbody th { width: 100%; max-width: 0; padding-left: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; font-size: .92rem; font-weight: 750; }
    .match-periods td { min-width: 1.6rem; font-size: .95rem; font-weight: 700; }
    .match-periods tbody tr + tr th, .match-periods tbody tr + tr td { border-top: 1px solid var(--line); }
    .match-periods-many th, .match-periods-many td { padding-left: 8px; }
    .match-periods-many td { min-width: 1.3rem; }
    .match-card-venue { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 1rem; line-height: 1.3; }
    .match-card-venue strong { display: block; overflow-wrap: anywhere; }
    .match-card-venue .address { color: #93c5fd; overflow-wrap: anywhere; }
    .calendar-share { min-height: 42px; margin: 0 0 0 auto; padding: 0 14px; font-size: .9rem; font-weight: 850; color: var(--text-subtle); background: var(--calendar-button-bg); box-shadow: var(--menu-shadow); }
    .match-actions + footer { padding-top: 34px; }
    .address { display: inline-block; margin-top: 3px; color: var(--blue); font-size: .82rem; line-height: 1.25; font-weight: 750; }
    .map-link { text-decoration: none; }
    footer { color: var(--muted); font-size: .86rem; line-height: 1.4; padding: 22px 4px 0; }
    footer p { margin: 6px 0 0; font-size: .8rem; }
    .identity { display: flex; align-items: center; gap: 18px; margin-top: 8px; }
    .identity > div { min-width: 0; }
    .crest { flex: 0 0 auto; width: 86px; height: 86px; padding: 9px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--card-shadow); object-fit: contain; }
    .tabs { margin-top: 22px; }
    .tabs + .tabs { margin-top: 10px; }
    .tabs a { text-decoration: none; }
    .tabs-segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min-content, 1fr); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-muted); }
    .tabs-segmented a { padding: 10px clamp(8px, 2vw, 14px); border-radius: 13px; color: var(--muted); text-align: center; font-size: .92rem; font-weight: 850; }
    .tabs-segmented a[aria-current="page"] { background: var(--card); color: var(--text); box-shadow: var(--menu-shadow); }
    .tabs-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
    .tabs-chips a { display: inline-flex; align-items: center; white-space: nowrap; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font-size: .9rem; font-weight: 750; }
    .tabs-chips a[aria-current="page"] { border-color: var(--line-strong); box-shadow: inset 0 -3px 0 var(--accent-bg); }
    .tabs-count { margin-left: 5px; color: var(--muted); font-weight: 800; }
    .tabs-jump a { border-color: var(--line-strong); box-shadow: inset 0 -3px 0 var(--accent-bg); }
    .team-rows { display: grid; gap: 8px; }
    .team-row { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "game"; gap: 2px 12px; align-items: center; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--card-shadow); color: inherit; text-decoration: none; }
    .team-row-main { grid-area: main; min-width: 0; }
    .team-row-main strong { display: block; font-size: 1.05rem; line-height: 1.2; color: var(--text); overflow-wrap: anywhere; }
    .team-row-competition { display: block; margin-top: 2px; color: var(--text-subtle); font-size: .88rem; font-weight: 500; }
    .team-row-games { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; }
    .team-row-game { grid-area: game; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--text-subtle); font-size: .84rem; font-weight: 500; }
    .team-row-kicker { color: var(--blue); font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
    .team-row-when { color: var(--text); font-weight: 750; }
    .team-row-detail { display: inline-flex; align-items: center; gap: 6px; }
    .team-row-score { padding: 2px 8px; border-radius: 999px; font-weight: 900; font-variant-numeric: tabular-nums; }
    .team-row-score.win { background: var(--win-bg); color: var(--win-text); }
    .team-row-score.loss { background: var(--loss-bg); color: var(--loss-text); }
    .team-row-score.draw { background: var(--draw-bg); color: var(--draw-text); }
    .fixtures { display: grid; gap: 6px; align-items: start; }
    .fixture-entry, .fixture { --fixture-time-width: 58px; --fixture-gap: 10px; --fixture-padding: 12px; }
    .fixture-entry { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
    .fixture-entry > .fixture { border: 0; background: transparent; padding-bottom: 0; }
    .fixture { display: grid; grid-template-columns: var(--fixture-time-width) minmax(0, 1fr) auto; gap: var(--fixture-gap); align-items: center; padding: 10px var(--fixture-padding); background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: inherit; text-decoration: none; }
    .fixture-time { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px; background: var(--date-bg); color: white; font-size: .92rem; }
    .fixture-body { min-width: 0; font-size: .88rem; line-height: 1.3; }
    .fixture-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
    .fixture-team { color: var(--text); font-weight: 900; }
    .fixture-competition { color: var(--muted); font-size: .76rem; }
    .fixture-opponent { display: block; color: var(--text); font-weight: 650; overflow-wrap: anywhere; }
    .fixture-venue { display: block; color: var(--muted); font-size: .8rem; }
    .fixture-result { padding: 4px 9px; border-radius: 999px; font-size: .86rem; font-weight: 900; font-variant-numeric: tabular-nums; }
    .fixture-result.win { background: var(--win-bg); color: var(--win-text); }
    .fixture-result.loss { background: var(--loss-bg); color: var(--loss-text); }
    .fixture-result.draw, .fixture-result.neutral { background: var(--draw-bg); color: var(--draw-text); }
    .fixture-result.cancelled { background: var(--orange-soft); color: var(--orange); }
    .fixture-result.unscored, .fixture-result.pending { background: var(--draw-bg); color: var(--draw-text); font-weight: 750; }
    .fixture-result.pending { max-width: 9ch; text-align: center; }
    .fixture-past { background: var(--past-card); }
    .fixture-past .fixture-time { background: var(--past-date-bg); }
    .fixture-cancelled .fixture-body { opacity: .7; }
    /* League table: a table on wide screens, one card per team below 600px.
       The own team's row carries the accent. */
    .standings-group .section-heading { margin-bottom: 10px; }
    .standings-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: var(--card-shadow); }
    .standings-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
    .standings-table th, .standings-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
    .standings-table th { color: var(--muted); background: var(--surface-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
    .standings-table abbr { text-decoration: none; }
    .standings-table th:nth-child(2), .standings-table td:nth-child(2) { width: 100%; text-align: left; white-space: normal; }
    .standings-table tr:last-child td { border-bottom: 0; }
    .standings-table td a { color: inherit; text-decoration: none; }
    .standings-table .standings-own td { background: var(--surface-muted); font-weight: 850; }
    .standings-table .standings-own td:first-child { box-shadow: inset 4px 0 0 var(--accent-bg); }
    .standings-list { display: none; }
    .standings-card { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 13px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--card-shadow); color: var(--text); text-decoration: none; }
    .standings-card.standings-own { border-color: var(--accent-bg); }
    .standings-rank { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--date-bg); color: #fff; font-size: .9rem; font-weight: 900; }
    .standings-own .standings-rank { background: var(--accent-bg); color: var(--accent-text); }
    .standings-team { min-width: 0; }
    .standings-team strong, .standings-team span, .standings-team small { display: block; }
    .standings-team strong { font-size: .95rem; line-height: 1.2; overflow-wrap: anywhere; }
    .standings-team span { margin-top: 3px; color: var(--muted); font-size: .76rem; }
    .standings-team small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
    .standings-points { min-width: 38px; text-align: center; }
    .standings-points strong, .standings-points span { display: block; }
    .standings-points strong { color: var(--blue); font-size: 1.05rem; }
    .standings-points span { color: var(--muted); font-size: .66rem; text-transform: uppercase; }
    .team-list { display: grid; gap: 12px; margin-top: 18px; }
    .team-link {
      display: block;
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: 24px;
      padding: 18px;
      box-shadow: var(--card-shadow);
      color: inherit;
    }
    .team-link strong { display: block; font-size: 1.3rem; color: var(--text); margin-bottom: 4px; }
    .team-link span { display: block; color: var(--muted); font-weight: 500; line-height: 1.35; }
    @media (max-width: 520px) {
      .identity { flex-direction: column; align-items: stretch; gap: 12px; }
      .crest { align-self: flex-start; width: 72px; height: 72px; border-radius: 20px; }
      .tabs-chips { gap: 4px; }
      .tabs-chips a { padding: 8px 10px; font-size: .84rem; }
      /* The row stacks: the split fills the width and its panel drops
         below it full-width, pushing the other buttons down. */
      .calendar-actions { align-items: stretch; }
      .calendar-link { flex: 1 1 auto; justify-content: center; }
      .calendar-split { display: flex; flex-wrap: wrap; flex: 1 1 100%; border-radius: 0; box-shadow: none; }
      .calendar-split .calendar-link, .calendar-menu summary { box-shadow: var(--accent-shadow); }
      .calendar-menu { display: contents; }
      .calendar-panel { position: static; flex: 1 1 100%; width: 100%; margin-top: 8px; }
      .calendar-panel::before { display: none; }
      .calendar-share { flex: 1 1 100%; justify-content: center; }
    }
    @media (max-width: 600px) {
      .standings-table-wrap { display: none; }
      .standings-list { display: grid; gap: 8px; }
    }
    @media (min-width: 680px) {
      .wrap { padding: 36px 22px 56px; }
      .crest { width: 104px; height: 104px; }
      .games { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
      .month { grid-column: 1 / -1; }
      .game { margin-bottom: 0; }
      .team-list { grid-template-columns: 1fr 1fr; }
      .team-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "main game"; }
      .team-row-game { flex-direction: column; align-items: flex-start; gap: 2px; margin: 0; padding: 0 0 0 14px; border-top: 0; border-left: 1px dashed var(--line); }
    }
