:root {
  --tab-h:    64px;
  --subnav-h: 52px;
  --hdr-h:    3.6rem;

  --primary:   #22c55e;
  --secondary: #0a1f12;
  --radius:    16px;

  --fs-display: 4.2rem;
  --fs-hl1:     1.05rem;
  --fs-body1:   0.9rem;
  --fs-body2:   0.82rem;
  --fs-meta:    0.72rem;

  /* Dark theme: bold dark secondary (#0a1f12) backgrounds with bright green accents */
  --bg:           #050f09;
  --surface:      #0a1f12;
  --bg-alt:       #0f2818;
  --bg-hover:     #143920;

  --border:       #0f2818;
  --border-light: #143920;
  --border-faint: #0a1f12;
  --border-input: #1a3d28;

  --text-main:  #e0f2e9;
  --text-muted: #7ca882;

  --qualify:    var(--primary);
  --relegate:   #ef4444;

  --radius-xs:   8px;
  --radius-sm:   .6rem;
  --radius-pill: 999px;
  --shadow-nav:  0 -4px 16px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: light) {
  :root {
    /* Light theme: pale pine green palette with dark text */
    --primary:      #22c55e;
    --secondary:    #0a1f12;

    --bg:           #ffffff;
    --surface:      #f5fbf8;
    --bg-alt:       #f0fdf4;
    --bg-hover:     #eaf7f2;

    --border:       #dfe8e3;
    --border-light: #e8f2ed;
    --border-faint: #f0f5f2;
    --border-input: #cbd5d0;

    --text-main:  #0f172a;
    --text-muted: #64748b;

    --qualify:    var(--primary);
  }
}

/* Manual theme overrides — take precedence over prefers-color-scheme */
[data-theme='dark'] {
  --primary:      #22c55e;
  --secondary:    #0a1f12;
  --bg:           #050f09;
  --surface:      #0a1f12;
  --bg-alt:       #0f2818;
  --bg-hover:     #143920;
  --border:       #0f2818;
  --border-light: #143920;
  --border-faint: #0a1f12;
  --border-input: #1a3d28;
  --text-main:    #e0f2e9;
  --text-muted:   #7ca882;
}

[data-theme='light'] {
  --primary:      #22c55e;
  --secondary:    #0a1f12;
  --bg:           #ffffff;
  --surface:      #f5fbf8;
  --bg-alt:       #f0fdf4;
  --bg-hover:     #eaf7f2;
  --border:       #dfe8e3;
  --border-light: #e8f2ed;
  --border-faint: #f0f5f2;
  --border-input: #cbd5d0;
  --text-main:    #0f172a;
  --text-muted:   #64748b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

a, button, [role="button"], input, select, label, .match-card, .tab-btn, .subnav-btn, .follow-btn { touch-action: manipulation; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg);
  max-width: 780px;
  margin: 0 auto;
  overflow-x: hidden;
}

#content-wrapper {
  padding: var(--hdr-h) 0 calc(var(--tab-h) + 8px + var(--subnav-h) + 1.5rem + env(safe-area-inset-bottom));
  min-height: 100vh;
}

#header-logo {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-right: 0.15rem;
  border-radius: 50%;
  overflow: hidden;
}

#header-logo img,
#mnav-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Header ── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0.9rem 1rem 0.8rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

h1 {
  font-size: var(--fs-hl1);
  font-weight: 700;
  white-space: nowrap;
}

/* ── Theme picker ── */
#theme-picker {
  display: flex;
  gap: 0;
}

.theme-opt {
  flex: 1;
  font: inherit;
  font-size: var(--fs-meta);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0.4rem 1rem;
  cursor: pointer;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  transition: color 0.15s, background 0.15s;
}

.theme-opt:not(:first-child) { border-left: none; }

.theme-opt:hover { color: var(--text-main); }

.theme-opt.active {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}

/* ── Tournament trigger (replaces h1 in header) ── */
#tournament-trigger {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-main);
  font: inherit;
  font-size: var(--fs-hl1);
  font-weight: 700;
  white-space: nowrap;
}

#tournament-trigger:hover #tournament-name {
  color: var(--primary);
}

.tournament-chevron {
  font-size: 0.8em;
  color: var(--text-muted);
  transition: transform 0.2s;
}

/* ── Bottom sheet (shared: tournament picker, bug report) ── */
.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bottom-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s;
}

.bottom-sheet-panel {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0.75rem 0 max(1rem, env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 80vh;
  overflow-y: auto;
}

.bottom-sheet.open .bottom-sheet-backdrop { opacity: 1; }
.bottom-sheet.open .bottom-sheet-panel    { transform: translateY(0); }

#bug-sheet { z-index: 400; }

.bug-sheet-content { padding: 1.25rem; }

/* ── Meta-label: shared typography ── */
.sheet-section-label,
.fixtures-date,
.fixtures-date-header,
.group-section h2,
.knockout-round h2,
.cl-fixtures h2,
.cl-knockout-stage h2,
.fixtures summary,
.lineup-section-label {
  font-size: var(--fs-meta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.sheet-section-label {
  padding: 0.75rem 1rem 0.25rem;
}

.sheet-row {
  display: flex;
  align-items: center;
}

.sheet-row .sheet-item {
  flex: 1;
}

.sheet-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: 0.6rem 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.sheet-star:hover,
.sheet-star.is-default { color: var(--primary); }

.sheet-item {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-body1);
  font-weight: 500;
  color: var(--text-main);
  text-align: left;
  padding: 0.65rem 1rem;
  border-radius: 0;
  text-decoration: none;
}

.sheet-item:hover { background: var(--bg-hover); }

.sheet-item.active {
  color: var(--primary);
  font-weight: 700;
}

.crest-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-xs);
  background: #fff;
  overflow: hidden;
}

.sheet-item .crest-badge { margin-right: 0.5rem; }
body[data-badges="off"] .sheet-item .crest-badge { display: none; }
body[data-badges="off"] #tournament-crest-wrap { display: none; }
body:not([data-badges="off"]) #header-logo { display: none; }
.sheet-section-emoji { display: none; }
body[data-badges="off"] .sheet-section-emoji { display: inline; }

.sheet-crest,
#tournament-crest {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

/* ── Header controls (theme toggle, tz, lang) ── */
.hdr-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.4rem;
  border-radius: 0.35rem;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.hdr-btn:hover { background: rgba(34, 197, 94, 0.06); }

.hdr-btn-label {
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.hdr-btn:hover .hdr-btn-label { color: var(--text-main); }

.hdr-select {
  appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  background: none;
}

@keyframes globe-spin { to { transform: rotate(360deg); } }
#lang-wrapper.is-loading .hdr-btn-label { opacity: 0.35; }
#lang-wrapper.is-loading .hdr-select    { pointer-events: none; }
#panel-settings-slot #lang-wrapper.is-loading::before {
  content: '🌐';
  display: inline-block;
  animation: globe-spin 0.75s linear infinite;
}
#panel-settings-slot #lang-wrapper.is-loading::after { opacity: 0.35; }

/* ── View tabs (fixed bottom bar) ── */
#view-tabs {
  position: fixed;
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  height: var(--tab-h);
  width: fit-content;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-nav);
  overflow: hidden;
  z-index: 100;
}

#view-tabs button, #view-tabs a {
  flex: 1;
  min-width: 72px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: inherit;
  font-size: var(--fs-body2);
  background: none;
  border: none;
  border-top: 3px solid transparent;
  padding: 0 1rem;
  cursor: pointer;
  color: var(--text-muted);
  text-decoration: none;
}

#view-tabs button.active, #view-tabs a.active {
  color: var(--text-main);
  border-top-color: var(--primary);
  font-weight: 600;
}

#view-tabs button:hover:not(.active), #view-tabs a:hover:not(.active) {
  color: var(--text-muted);
}

/* ── Date nav / Matchday nav (fixed above tab bar, same slot) ── */
#date-nav,
#matchday-nav {
  position: fixed;
  bottom: calc(var(--tab-h) + 8px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--subnav-h);
  gap: 0.5rem;
  padding: 0 1rem;
  background: none;
  z-index: 99;
}

.nav-btn {
  font: inherit;
  font-size: var(--fs-hl1);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 2.2rem;
  padding: 0 0.6rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-nav);
}

.nav-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-input);
}

.nav-btn:disabled {
  color: var(--text-muted);
  cursor: default;
  border-color: var(--border-light);
  background: none;
}

#date-picker {
  font: inherit;
  font-size: var(--fs-body2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.9rem;
  color: var(--text-main);
  background: var(--surface);
  width: auto;
  min-width: 0;
}

#md-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 1.1rem;
  min-width: 8rem;
  cursor: pointer;
  box-shadow: var(--shadow-nav);
  text-align: center;
}

#md-wrapper:hover {
  border-color: var(--border-input);
  background: var(--bg-hover);
}

#md-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  pointer-events: none;
  width: 100%;
}

#md-date-label {
  font-size: var(--fs-body2);
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  line-height: 1.2;
}

#md-num-label {
  font-size: var(--fs-meta);
  color: var(--text-muted);
  line-height: 1.2;
}

#md-select {
  appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Fixtures list ── */
#fixtures-container {
  padding-top: 1rem;
}

.fixtures-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 1rem 0.6rem;
}

.fixtures-date.is-live {
  color: var(--primary);
}

.no-fixtures,
.cl-tbd {
  color: var(--text-muted);
  font-size: var(--fs-body1);
  padding: 1.5rem 1rem;
  text-align: center;
}

/* ── Match cards ── */
.match-card {
  position: relative;
  background: none;
  border-radius: 0;
  margin: 0;
  border-bottom: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: .8rem;
  padding: 1rem;
  cursor: pointer;
}
.match-card-header {
  display: contents;
}

.card-label {
  display: none;
}

.match-card-time {
  grid-column: 2;
  grid-row: 2;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  font-size: var(--fs-meta);
  text-align: center;
}

.match-card-time.is-live {
  color: var(--primary);
}

.match-card-team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  font-size: var(--fs-body1);
  font-weight: 400;
  color: var(--text-main);
  min-width: 0;
}

.match-card-team:nth-of-type(2) {
  grid-column: 1;
  grid-row: 1;
  justify-content: flex-end;
}

.match-card-team:nth-of-type(4) {
  grid-column: 3;
  grid-row: 1;
  justify-content: flex-start;
}

.match-card-name {
  font-weight: 500;
  color: var(--text-main);
  text-align: end;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-card-team:nth-of-type(4) .match-card-name {
  text-align: start;
}

.team-swatch {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  align-self: center;
  background: linear-gradient(90deg, var(--c1) 50%, var(--c2) 50%);
  outline: 0.5px solid rgba(128, 128, 128, 0.3);
}

/* Badge toggle: hide all indicators when badges off; show when on */
body[data-badges="off"] .match-card-team .crest-badge { display: none; }
body[data-badges="off"] .match-card-team .team-swatch { display: none; }

.match-card-score-box {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  width: max-content;
  white-space: nowrap;
  padding: .6rem;
  background-color: var(--surface);
  border-radius: var(--radius-sm);
  border: .5px solid var(--border-faint);
}

.match-card-score,
.match-card-separator {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1;
}

.match-card-score {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.match-card-score-box.pending .match-card-score,
.match-card-score-box.pending .match-card-separator {
  color: var(--text-muted);
  font-weight: 400;
}

.match-card-score--blank {
  visibility: hidden;
  min-width: 1.1ch;
}

/* live dot in card header */
.card-live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--primary);
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  animation: live-pulse 1.5s ease-in-out infinite;
}

.card-badge-ft { font-size: 1; color: var(--text-muted); margin-right: 3px; }
.card-badge-ht { font-size: 0.65em; font-weight: 700; color: var(--primary);  margin-right: 3px; }

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

@keyframes goal-pop {
  0%   { transform: scale(1);    }
  30%  { transform: scale(1.25); }
  70%  { transform: scale(0.97); }
  100% { transform: scale(1);    }
}

@keyframes goal-color {
  0%   { color: var(--text-main); }
  25%  { color: var(--primary);   }
  100% { color: var(--text-main); }
}

.match-card-score-box.goal-flash {
  animation: goal-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.match-card-score-box.goal-flash .match-card-score,
.match-card-score-box.goal-flash .match-card-separator {
  animation: goal-color 0.9s ease-out forwards;
}

/* ── Group jump strip (fixed above tab bar) ── */
#group-jump {
  position: fixed;
  bottom: calc(var(--tab-h) + 8px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  height: var(--subnav-h);
  gap: 0.3rem;
  padding: 0 1rem;
  background: none;
  z-index: 99;
  overflow-x: auto;
}

#group-jump a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  font-size: var(--fs-body2);
  font-weight: 700;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-nav);
}

#group-jump a:hover {
  background: var(--bg-hover);
  border-color: var(--border-input);
  color: var(--text-main);
}

/* ── Group sections ── */
.group-section {
  margin-top: 1.6rem;
  scroll-margin-top: 0.5rem;
  padding: 0 1rem;
  overflow-x: hidden;
}

.group-section:first-child { margin-top: 0.5rem; }

.group-section h2,
.knockout-round h2,
.cl-fixtures h2,
.cl-knockout-stage h2 {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 1rem 0.6rem;
  text-align: center;
}

.knockout-round h2 {
  flex-direction: column;
  gap: 0.2rem;
}

/* ── CL two-leg tie wrapper ── */
.cl-tie {
  margin-bottom: 1rem;
}

/* ── Score box: aggregate band variant (two-leg ties) ── */
.match-card-score-box.has-agg {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.match-card-score-box.has-agg .match-card-score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  padding: 0.6rem 0.6rem 0.45rem;
  white-space: nowrap;
}

.match-card-score-agg {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3em;
  padding: 0.2rem 0.6rem 0.25rem;
  background: var(--bg);
  border-top: .5px solid var(--border-light);
  font-size: var(--fs-meta);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.match-card-score-agg-num {
  font-weight: 500;
  min-width: 1ch;
  text-align: center;
}

.match-card-score-agg-num.is-leader {
  font-weight: 700;
  color: var(--text-main);
}

.match-card-score-agg-sep {
  color: var(--text-muted);
  opacity: 0.5;
}

/* ── Standings table ── */
.standings-card {
  background: none;
  border-radius: 0;
  overflow: visible;
  margin: 0 -1rem;
  padding: 0;
}

/* Horizontal-scroll wrapper: # and Team columns stay sticky while the
   stat columns (P W D L GF GA GD Pts) scroll. The page-load IIFE in
   /standings.js sets scrollLeft to the rightmost end so Pts is visible
   by default; users scroll left to reveal P/W/D/etc. */
.standings-scroll {
  --standings-pos-w: 2.55rem; /* width of the # column at default font size */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.standings {
  width: 100%;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-body1);
  margin-bottom: 0;
}

.standings th {
  font-weight: 600;
  color: var(--text-muted);
  padding: 1rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}

.standings th:nth-child(2) { text-align: left; padding-left: 0.5rem; }
.standings th:not(:nth-child(2)) { width: 1.8rem; padding: 1rem 0.5rem; }

.standings td {
  padding: 1rem 1rem;
  text-align: center;
  line-height: 1.4;
  border-bottom: 1px solid var(--border-light);
}

.standings td:nth-child(2) { text-align: left; padding-left: 0.5rem; }
.standings td:not(:nth-child(2)) {
  width: 1.8rem;
  padding: 1rem 0.5rem;
}
.standings tbody tr:last-child td { border-bottom: none; }

.standings td:not(:nth-child(2)):not(:last-child):not(.qualify):not(.relegate) { color: var(--text-muted); }

.standings tbody tr:nth-child(odd) td { background: var(--bg); }
.standings tbody tr:nth-child(even) td { background: var(--surface); }

/* Sticky # and Team columns. The cells must carry an opaque background or
   the scroll-under content shows through; row-alternation rules below set
   that background on cols 1+2 explicitly. Header sticky cells get a higher
   z-index so they stay above body sticky cells when scrolled. */
.standings th:nth-child(1),
.standings td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg);
  /* Lock the # col to exactly --standings-pos-w (border-box so padding fits
     inside, not on top). This is what makes Team col's sticky offset of
     left: var(--standings-pos-w) sit flush — without this lock, the table
     layout picks its own width and the offset mismatch leaks scroll content
     between the two sticky columns. Right-align the digit so it hugs the
     Team col edge while keeping internal padding. */
  width: var(--standings-pos-w);
  min-width: var(--standings-pos-w);
  max-width: var(--standings-pos-w);
  box-sizing: border-box;
  text-align: right;
  padding-right: 0.25rem;
}
.standings th:nth-child(2),
.standings td:nth-child(2) {
  position: sticky;
  left: var(--standings-pos-w);
  z-index: 1;
  background: var(--bg);
  /* Visual cue at the sticky/scroll boundary */
  box-shadow: inset -1px 0 0 var(--border-light);
}
.standings thead th:nth-child(1),
.standings thead th:nth-child(2) { z-index: 2; }

/* Row-alternation overrides for sticky cells (otherwise transparent cells
   show the scroll-under content through the alt-row background). */
.standings tbody tr:nth-child(odd) td:nth-child(-n+2)  { background: var(--bg); }
.standings tbody tr:nth-child(even) td:nth-child(-n+2) { background: var(--surface); }

.standings .qualify  { color: var(--qualify);  font-weight: 700; }
.standings .relegate { color: var(--relegate); font-weight: 700; }
.standings .crest-badge { width: 16px; height: 16px; border-radius: 3px; }
.standings .crest-badge img { width: 13px; height: 13px; }

.standings-full {
  margin: 0;
  padding: 0;
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

/* ── Fixtures disclosure (in groups view) ── */
.fixtures {
  border-top: 1px solid var(--border-light);
}

.fixtures summary {
  padding: 0.5rem 1rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.fixtures summary::-webkit-details-marker { display: none; }

.fixtures summary::before {
  content: '▶';
  font-size: 0.75em;
  transition: transform 0.15s;
}

.fixtures[open] summary::before { transform: rotate(90deg); }

.fixtures summary:hover { color: var(--text-muted); }

.match-list {
  padding: 0;
}

.card-detail {
  grid-column: 1 / -1;
  padding-top: 0;
  animation: slideDown 0.2s ease-out;
}

.card-detail.collapsed {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    margin-top: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
  }
}

/* ── New fixtures layout (full-width rows) ── */
.fixtures-section {
  margin-bottom: 0;
}

.fixtures-date-header {
  padding: 1rem 1rem 0.5rem;
  margin: 0;
  text-align: center;
}

.fixtures-section:first-child .fixtures-date-header {
  padding-top: 0.5rem;
}

.fixture-row {
  display: grid;
  grid-template-columns: 3.5rem 5rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.fixture-row:hover {
  background: var(--bg-hover);
}

.fixture-row.is-live {
  background: var(--bg-alt);
}

.fixture-time {
  font-size: var(--fs-body1);
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

.fixture-row.is-live .fixture-time {
  color: var(--primary);
}

.fixture-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.fixture-score-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  min-width: 3.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.fixture-status {
  font-size: var(--fs-meta);
  color: var(--text-muted);
  font-weight: 700;
}

.fixture-teams {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fixture-team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-body1);
}

.fixture-team span {
  color: var(--text-main);
}

.fixture-row.is-live .fixture-team span {
  font-weight: 700;
}

/* ── Knockout stage ── */
.knockout-round {
  margin-top: 1.6rem;
  padding: 0;
  overflow-x: hidden;
}

.knockout-round:first-child { margin-top: 0.5rem; }

.round-dates {
  display: block;
  font-size: var(--fs-meta);
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* Cards in groups/knockout have no outer margin (already inside padded container) */
.group-section .match-card,
.knockout-round .match-card {
  margin-left: 0;
  margin-right: 0;
}


/* ── Card detail panel ── */
.card-detail-inner {
  padding-top: 0;
}

.detail-loading,
.detail-empty {
  font-size: var(--fs-meta);
  color: var(--text-muted);
  padding: 0.4rem 0 0.2rem;
  text-align: center;
}

/* ── Button group (segmented control) ── */
.btn-group {
  display: inline-flex;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin: 0.5rem auto;
  border: .5px solid var(--border-faint);
}

.btn-group-btn {
  flex: 1;
  font: inherit;
  font-size: var(--fs-meta);
  font-weight: 600;
  line-height: 1.5;
  background: none;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.btn-group-btn:hover:not(.active) {
  color: var(--text-main);
}

.btn-group-btn.active {
  background: var(--bg);
  color: var(--primary);
}

.card-detail-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-tab-panel {
  width: 100%;
}

.card-tab-panel.hidden { display: none; }

.bug-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: none;
}
.bug-suggestions .card-tab {
  flex: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-main);
  padding: 0.5rem 1rem;
  margin-bottom: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.bug-suggestions .card-tab:hover {
  border-color: var(--border-input);
}
.bug-suggestions .card-tab.active {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Lineup single-column & Timeline list ── */
.lineup-list, .timeline-list {
  padding-bottom: 0.5rem;
  margin-top: 1rem;
}

.lineup-team {
  padding-bottom: 0.25rem;
}

.lineup-team + .lineup-team {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
}

.lineup-team-name {
  font-size: var(--fs-body1);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.lineup-section-label {
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
  padding-top: 0.4rem;
}

.lineup-player {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.1rem 0;
  font-size: var(--fs-body1);
}

.lineup-no {
  color: var(--text-muted);
  min-width: 1.4rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.lineup-name {
  flex: 1;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lineup-pos {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ── Timeline ── */

.timeline-event {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.1rem 0;
  margin-bottom: 0.25rem;
  font-size: var(--fs-body1);
}

.timeline-event.away {
  flex-direction: row-reverse;
  text-align: right;
}

.timeline-min {
  color: var(--text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.timeline-event.away .timeline-min {
  text-align: left;
}

.timeline-icon { flex-shrink: 0; }

.timeline-detail { color: var(--text-main); }

.tl-emoji {
  font-size: 0.75em;
  line-height: 1;
  display: inline-block;
  vertical-align: 0.1em;
}

.tl-assist { color: var(--text-muted); }

.tl-score {
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}


/* ── Skeleton loading rows ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.skeleton-row {
  height: 0.6em;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    var(--surface)   25%,
    var(--bg-hover)  50%,
    var(--surface)   75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

.skeleton-row.sk-label {
  height: 0.5em;
  margin-bottom: 0.4rem;
  opacity: 0.55;
}

.skeleton-event {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
  margin-bottom: 0.55rem;
}

.skeleton-list .lineup-team + .lineup-team {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
}

/* ── Future fixture placeholder ── */
.future-placeholder {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0 0.25rem;
  align-items: center;
  text-align: center;
}

.future-placeholder-icon {
  font-size: 1rem;
  line-height: 1;
  margin-bottom: 0.1rem;
}

.future-placeholder-label {
  font-size: var(--fs-body2);
  color: var(--text-main);
  font-weight: 500;
}

.future-placeholder-hint {
  font-size: var(--fs-meta);
  color: var(--text-muted);
}

/* ── Follow button in match cards ── */
.follow-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0 0.3rem;
  line-height: 1;
  opacity: 0.35;
  flex-shrink: 0;
}

.follow-btn:hover { opacity: 0.65; }
.follow-btn.is-following { color: var(--primary); opacity: 1; }

/* ── Following view (hidden) ── */
#view-following,
.follow-btn,
[data-view='following'] {
  display: none !important;
}

.following-empty,
.following-loading {
  padding: 1.5rem 1rem;
  color: var(--text-muted);
  font-size: var(--fs-body2);
}

/* ── Mobile navigation panel ── */

/* Force-refresh button */
#force-refresh {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
  border-radius: 6px;
  transition: background 0.15s ease, opacity 0.15s ease;
  position: relative;
  overflow: hidden;
}

#force-refresh:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: auto;
}

/* When force-refresh is hidden, hand the push-right margin back to the hamburger */
#force-refresh[hidden] + #menu-toggle { margin-inline-start: auto; }

#force-refresh span {
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.15s ease;
}

#force-refresh:hover:not(:disabled) { background: var(--bg-hover); }
#force-refresh:active:not(:disabled) { opacity: 0.6; }
#force-refresh:disabled { cursor: default; }

#force-refresh.loading {
  background: linear-gradient(
    90deg,
    var(--surface)  25%,
    var(--bg-hover) 50%,
    var(--surface)  75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

#force-refresh.loading span { animation: spin 0.8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Hamburger toggle button */
#menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  margin-inline-start: 0;
  touch-action: manipulation;
}

#menu-toggle:not([hidden]) { display: flex; }

.hbg-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1),
              opacity  0.2s ease;
  transform-origin: center;
}

body.nav-open .hbg-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .hbg-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.nav-open .hbg-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Scrim */
#mobile-nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

body.nav-open #mobile-nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* Panel */
#mobile-nav {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  bottom: 0;
  width: min(80vw, 320px);
  background: var(--surface);
  border-inline-start: 1px solid var(--border);
  z-index: 300;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

body.nav-open #mobile-nav {
  transform: translateX(0);
}

#mnav-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
}
#mnav-close:hover { color: var(--text-main); }

.mnav-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.5rem 0;
  flex: 1;
  min-height: 0;
}

.mnav-section {
  padding: 0 1.5rem;
}

.mnav-section + .mnav-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}


.mnav-section--brand {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.mnav-section--settings + .mnav-section--tip {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}

.mnav-section--tip {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#kofi-btn,
#bug-report-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text-muted);
  font-size: var(--fs-body2);
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

#kofi-btn span,
#bug-report-btn span {
  font-size: 1.1em;
  flex-shrink: 0;
  line-height: 1;
}

#kofi-btn:hover,
#bug-report-btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--text-main);
  box-shadow: 0 0 0 1px var(--primary), inset 0 0 20px rgba(34, 197, 94, 0.04);
}

#kofi-btn:active,
#bug-report-btn:active { background: var(--bg-hover); opacity: 0.75; }

/* Bug report sheet */
#bug-sheet-title {
  font-size: var(--fs-body1);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

#bug-msg {
  width: 100%;
  min-height: 120px;
  padding: 0.65rem 0.75rem;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border-input);
  background: var(--bg-alt, var(--bg));
  color: var(--text-main);
  font-size: var(--fs-body2);
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#bug-msg::placeholder { color: var(--text-muted); opacity: 0.7; }

#bug-msg:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

#bug-char-count {
  text-align: right;
  font-size: var(--fs-meta);
  color: var(--text-muted);
  margin-top: 0.35rem;
  margin-bottom: 1rem;
}

#bug-sheet-actions { display: flex; gap: 0.5rem; }

#bug-cancel,
#bug-submit {
  flex: 1;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-size: var(--fs-body2);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#bug-cancel {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}

#bug-cancel:hover { background: var(--bg-hover); color: var(--text-main); }

#bug-submit {
  background: var(--primary);
  border: 1px solid transparent;
  color: #050f09;
}

#bug-submit:hover { box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35); }
#bug-submit:disabled { opacity: 0.5; cursor: default; }
#bug-submit:active { opacity: 0.8; }

#bug-status {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) - 4px);
  font-size: var(--fs-meta);
  font-weight: 500;
  text-align: center;
}

#bug-status[data-state="ok"] {
  background: rgba(34, 197, 94, 0.12);
  color: var(--primary);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

#bug-status[data-state="err"] {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.mnav-heading {
  font-size: var(--fs-meta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Brand section */
#mnav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  margin-bottom: 0.4rem;
}

#mnav-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

#mnav-app-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.mnav-app-name--score {
  color: var(--primary);
}
.mnav-app-name--tld {
  color: var(--text-muted);
  font-weight: 400;
}


/* Settings controls inside panel */
#panel-settings-slot .hdr-btn,
#panel-settings-slot #theme-picker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  width: 100%;
  font-size: var(--fs-body1);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease;
}
#panel-settings-slot #theme-picker {
  cursor: pointer;
  padding-right: 0.75rem;
}
#panel-settings-slot .hdr-btn:active,
#panel-settings-slot #theme-picker:active {
  border-color: var(--primary);
  background-color: var(--bg-alt);
}
#panel-settings-slot .hdr-btn-label {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0;
  pointer-events: none;
  line-height: 1;
}
#panel-settings-slot .hdr-btn-label::after {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23babebc' width='16' height='16'%3E%3Cpath fill-rule='evenodd' d='M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

/* Gap between consecutive rows */
#panel-settings-slot .hdr-btn + .hdr-btn,
#panel-settings-slot .hdr-btn + #theme-picker,
#panel-settings-slot #theme-picker + .hdr-btn { margin-top: 0.5rem; }

/* Shared icon sizing for ::before pseudo-elements */
#panel-settings-slot .hdr-btn::before,
#panel-settings-slot #theme-picker::before {
  font-size: 1.1em;
  flex-shrink: 0;
  pointer-events: none;
  line-height: 1;
}

/* Text labels via data-label attribute */
#panel-settings-slot #tz-wrapper::after,
#panel-settings-slot #lang-wrapper::after,
#panel-settings-slot #theme-picker::after {
  content: attr(data-label);
  font-size: var(--fs-body2);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  flex: 1;
  pointer-events: none;
}

/* Hide segmented theme buttons — row tap-toggles instead */
#panel-settings-slot .theme-opt { display: none; }

/* Row icons */
#panel-settings-slot #tz-wrapper::before   { content: '🕒'; }
#panel-settings-slot #lang-wrapper::before { content: attr(data-icon); }
#panel-settings-slot #theme-picker::before { content: attr(data-icon); }
#panel-settings-slot #badges-wrapper::before { content: '🏅'; }

/* Badges row — label group + state chip */
#panel-settings-slot #badges-wrapper { padding-right: 0.75rem; cursor: pointer; }

.badges-label-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  pointer-events: none;
}

.badges-label-main {
  font-size: var(--fs-body2);
  font-weight: 500;
  color: var(--text-main);
  text-align: left;
}

.badges-label-meta {
  font-size: var(--fs-meta);
  color: var(--text-muted);
  text-align: left;
}

.badges-state-chip {
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  pointer-events: none;
  margin-left: auto; /* pushes chip to end of flex row in #panel-settings-slot */
}

.badges-state-chip.is-on { color: var(--primary); }

/* Always hide theme picker + tz wrapper + lang wrapper in header (JS moves them to panel) */
header #theme-picker,
header #tz-wrapper,
header #lang-wrapper {
  display: none !important;
}

/* ── RTL layout adjustments ── */
[dir='rtl'] .match-card { direction: rtl; }
[dir='rtl'] .match-card-team { flex-direction: row-reverse; }
[dir='rtl'] .match-card-time { direction: ltr; }
[dir='rtl'] .match-card-separator { direction: ltr; }
[dir='rtl'] .mnav-inner { direction: rtl; }
[dir='rtl'] #panel-settings-slot #lang-wrapper::before { margin-left: 0.5rem; margin-right: 0; }
[dir='rtl'] #mobile-nav { transform: translateX(-100%); }

/* === SSR refactor compat ===
 * Additive rules for HTML produced by src/worker/render/match-card.js.
 * Client-side app.js path continues to work via the original selectors above.
 */

/* ── SSR match-card grid placement ── */
.match-card-home {
  grid-column: 1;
  grid-row: 1;
  justify-content: flex-end;
}

.match-card-away {
  grid-column: 3;
  grid-row: 1;
  justify-content: flex-start;
}

/* ── SSR page header (.page-header) ── */
.page-header {
  position: static;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  background: none;
  z-index: auto;
}

.page-header h1 {
  font-size: var(--fs-hl1);
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

/* ── SSR standings section (.standings-section) ── */
.standings-section {
  margin-top: 1.5rem;
  padding: 0 0 1.5rem;
}

.standings-section h2 {
  font-size: var(--fs-meta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 0.75rem 1rem 0.5rem;
}

/* ── SSR RTL adjustments ── */
[dir='rtl'] .match-card-home { justify-content: flex-start; }
[dir='rtl'] .match-card-away { justify-content: flex-end; }

/* ── Offline / stale-cache banner ── */
#offline-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 8px 16px;
  background: #f59e0b;
  color: #111;
  font-size: 14px;
  text-align: center;
  z-index: 10000;
  transform: translateY(-100%);
  transition: transform 0.2s ease;
}
#offline-banner.visible {
  transform: translateY(0);
}

/* SSR renders #badges-state statically; .badges-state-chip + .is-on already defined above */
