/* Statische Vereinsportal-Ausgabe - Farben/Typografie 1:1 aus dem
   urspruenglichen Design-Entwurf (Vereinsportal.dc.html) uebernommen,
   hier aber als echtes Stylesheet statt Inline-Styles fuer eine SPA. */

:root {
  --bg: #0a1018;
  --panel: #13202f;
  --panel2: #1b2b3e;
  --line: #26394f;
  --ink: #eef4fa;
  --ink2: #a3b5c9;
  --ink3: #71869e;
  --acc: #0baaec;
  --acc2: #476fbf;
  --accInk: #4cc3f5;
  --win: #31c07a;
  --loss: #ef5a52;
  --draw: #e0a83c;
  --onAcc: #05131c;
}

:root[data-theme="light"] {
  --bg: #eceff4;
  --panel: #ffffff;
  --panel2: #f3f6fa;
  --line: #d5deea;
  --ink: #0d1926;
  --ink2: #4c6076;
  --ink3: #7c8ea4;
  --acc: #0f8fc6;
  --acc2: #3a5da3;
  --accInk: #0a6f9c;
  --win: #1a8f55;
  --loss: #c9382f;
  --draw: #8a5f0d;
  --onAcc: #ffffff;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eceff4; --panel: #ffffff; --panel2: #f3f6fa; --line: #d5deea;
    --ink: #0d1926; --ink2: #4c6076; --ink3: #7c8ea4;
    --acc: #0f8fc6; --acc2: #3a5da3; --accInk: #0a6f9c;
    --win: #1a8f55; --loss: #c9382f; --draw: #8a5f0d; --onAcc: #ffffff;
  }
}

* { box-sizing: border-box; }

/* Sanfter Farbwechsel beim Hell/Dunkel-Umschalten statt hartem Sprung -
   betrifft alle ueber die obigen CSS-Variablen eingefaerbten
   Flaechen/Texte/Rahmen. Elemente mit eigener transition (Dropdown-
   Panels, Burger-Icon, mobiles Menue, ...) behalten bewusst ihre
   spezifischere Regel und nehmen an diesem Fade nicht teil - das sind
   kleine, meist geschlossene Bedienelemente, kein grossflaechiger
   Farbwechsel. */
*, *::before, *::after {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, box-shadow .35s ease, fill .35s ease;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accInk); text-decoration: none; }
a:hover { color: var(--ink); }

h1, h2, h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0;
}

.mono { font-family: "IBM Plex Mono", monospace; }
.muted { color: var(--ink3); }

.shell {
  max-width: 1320px;
  margin: 0 auto;
  min-height: 100vh;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* ---------- Header / Navigation ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-logo {
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  flex: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .18);
}
.brand-logo img { height: 34px; width: auto; display: block; }
.brand-text {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink3);
  line-height: 1.5;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-link {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink2);
}
.nav-link--active { background: var(--acc); color: var(--onAcc); }
.nav-link--active:hover { color: var(--onAcc); }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel2);
  color: var(--ink2);
  cursor: pointer;
  flex: none;
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; }
/* Default (kein data-theme gesetzt) = dunkles Theme (siehe :root oben) -
   zeigt die Sonne ("zu Hell wechseln"). Aktives Theme entscheidet, mit
   derselben Kaskade wie die Farb-Variablen oben. */
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
}
.burger {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel2);
  cursor: pointer;
  padding: 0;
  flex: none;
}
.burger span {
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
  display: block;
  transition: transform .25s ease, opacity .2s ease;
}
/* Burger -> X: obere/untere Linie drehen sich zur Mitte (7px = Linienhoehe
   + Abstand), die mittlere blendet aus. */
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav--mobile { display: none; }
.nav--mobile-inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 18px 14px;
}
.nav--mobile .nav-link { padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; }

/* ---------- Mannschaften-Dropdown (Nav) ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.nav-dropdown-caret {
  width: 0; height: 0; margin-top: 2px;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: .65;
}
.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 230px;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.nav-dropdown-panel.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity .18s ease, transform .18s ease;
}
.nav-dropdown-link {
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  white-space: nowrap;
}
.nav-dropdown-link:hover { background: var(--panel2); color: var(--ink); }
.nav-dropdown-link--active { background: var(--acc); color: var(--onAcc); }
.nav-dropdown-link--active:hover { color: var(--onAcc); }
.nav--mobile .nav-dropdown-panel {
  position: static;
  min-width: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  max-height: 0;
  margin-top: 0;
  padding: 0 0 0 10px;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: max-height .22s ease, margin-top .22s ease;
}
.nav--mobile .nav-dropdown-panel.open {
  max-height: 600px;
  margin-top: 5px;
}
.nav--mobile .nav-dropdown-link { border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; }

/* ---------- Route-Picker (Kartenanbieter-Auswahl, Spielseite) ---------- */
/* Panel bleibt im Dokumentfluss statt absolut zu schweben, da die
   umgebende .card overflow:hidden setzt (Rundungen) und ein
   floatendes Panel dort abgeschnitten würde. */
.route-picker .nav-dropdown-panel {
  position: static;
  min-width: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  padding: 0;
  border-width: 0;
  transition: max-height .22s ease, margin-top .22s ease;
}
.route-picker .nav-dropdown-panel.open {
  max-height: 220px;
  margin-top: 8px;
  padding: 6px;
  border-width: 1px;
}
.route-picker .nav-dropdown-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.route-picker .nav-dropdown-check { opacity: 0; color: var(--acc); font-weight: 700; flex: none; }
.route-picker .nav-dropdown-link--selected .nav-dropdown-check { opacity: 1; }

@media (max-width: 760px) {
  .nav--desktop { display: none; }
  .burger { display: flex; }
  .nav--mobile {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows .25s ease, visibility 0s linear .25s;
  }
  .nav--mobile.open {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows .25s ease;
  }
}

[hidden] { display: none !important; }
.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 18px 14px;
}
.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  color: var(--ink2);
}
.chip--active { background: var(--acc2); border-color: var(--acc2); color: #fff; }
.chip--active:hover { color: #fff; }

/* ---------- Layout ---------- */
.main { padding: 18px; }
.footer {
  padding: 20px 18px 34px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 11px;
  color: var(--ink3);
}
.footer-clubs { margin-left: auto; }

/* ---------- Hinweis-Banner (Cookie-Hinweis, iOS-Installationstipp) ---------- */
/* Gemeinsamer fixierter Stapel - Cookie-Hinweis und Installationstipp
   sind bewusst unabhaengig voneinander sichtbar (siehe View::layout()),
   damit man den Installationstipp auch dann noch sieht, wenn man den
   Cookie-Hinweis nicht aktiv wegklickt. Als Kinder von .notice-stack
   ueberlappen sie sich dabei nicht, sondern stapeln sich. */
.notice-stack {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notice-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
}
.notice-banner p { margin: 0; font-size: 13px; color: var(--ink2); flex: 1; }
.notice-banner a { color: var(--accInk); }
.notice-banner .btn { flex: none; }
.notice-banner-close {
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel2);
  color: var(--ink2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.notice-banner-close:hover { color: var(--ink); }
.map-provider-options { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
@media (max-width: 480px) {
  .notice-banner { flex-direction: column; align-items: stretch; }
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  align-items: start;
}
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 12px;
}
.section-heading:first-child { margin-top: 0; }

/* ---------- Cards / Panels ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
  position: relative;
}
.card-header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
}
.card-body { padding: 15px; }
.empty-state { padding: 24px 16px; color: var(--ink3); font-size: 13px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.kpi {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel2);
  padding: 12px;
}
.kpi-label {
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink3);
}
.kpi-value {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  padding: 15px;
}
.stat-card .kpi-value { font-size: 26px; margin-top: 5px; }
.stat-card .stat-sub { font-size: 12px; color: var(--ink2); margin-top: 2px; }

.team-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  padding: 15px;
  display: block;
  color: var(--ink);
}
.team-card:hover { border-color: var(--acc); color: var(--ink); }
.team-card-top { display: flex; align-items: center; gap: 10px; }
.team-card-short {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.team-card-pos { margin-left: auto; font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--accInk); }
.team-card-club { font-size: 12px; color: var(--ink2); margin-top: 5px; }
.team-card-league { font-size: 11px; color: var(--ink3); margin-top: 2px; }
.team-card .form { margin-top: 12px; }

/* ---------- Hero ---------- */
.hero { margin-bottom: 16px; }
.hero-flame {
  position: absolute;
  right: -60px;
  top: 20px;
  width: 820px;
  height: 290px;
  background: url(flameball.svg) no-repeat right top / contain;
  opacity: .17;
  pointer-events: none;
}
.hero-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--acc2);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-banner--live { background: var(--loss); }
.hero-banner-title { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero-banner-meta { margin-left: auto; font-size: 12px; font-weight: 600; }
a.hero-banner { text-decoration: none; cursor: pointer; }
a.hero-banner:hover, a.hero-banner:focus-visible { filter: brightness(1.08); }
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.6); }
}
.hero-banner--live .hero-banner-title::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 6px;
  vertical-align: 1px;
  border-radius: 50%;
  background: currentColor;
  animation: livePulse 1.5s ease-in-out infinite;
}
.hero-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  padding: 22px 18px;
  position: relative;
}
.hero-kickoff { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .1em; color: var(--accInk); text-transform: uppercase; }
.hero-matchup { font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 38px; line-height: 1.05; text-transform: uppercase; margin-top: 8px; }
.hero-matchup .vs { color: var(--ink3); font-size: 22px; }
.hero-venue { font-size: 13px; color: var(--ink2); margin-top: 12px; }
.hero-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.hero-side {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}
.hero-tile {
  grid-column: span 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--panel2);
}
.hero-tile--wide { grid-column: 1 / -1; }
.hero-tile-label { font-size: 11px; line-height: 1.3; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.hero-tile:not(.hero-tile--wide) .hero-tile-label { min-height: 2.6em; }
.hero-tile-value { font-family: "Barlow Condensed", sans-serif; font-size: 32px; font-weight: 700; line-height: 1; }

/* ---------- Buttons ---------- */
.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink2);
  background: var(--panel2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.btn:hover { color: var(--ink); }
.btn-primary { background: var(--acc); border-color: var(--acc); color: var(--onAcc); }
.btn-primary:hover { color: var(--onAcc); opacity: .92; }

/* ---------- Tabellenreihen (per Grid, wiederverwendbar) ---------- */
.table-scroll { overflow: auto; }
.fixtures-scroll-inner { min-width: 680px; }
.table-head, .row {
  display: grid;
  gap: 8px;
  padding: 11px 16px;
  align-items: center;
}
.table-head {
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink3);
  background: var(--panel2);
}
.row { border-bottom: 1px solid var(--line); font-size: 13px; }
.row:last-child { border-bottom: none; }
.row-own { background: var(--panel2); font-weight: 700; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- Torjaegerliste: Filter + sortierbare Spalten ---------- */
.scorers-toolbar { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.scorers-filter {
  width: 100%;
  max-width: 320px;
  font: inherit;
  font-size: 13px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel2);
  color: var(--ink);
}
.scorers-filter::placeholder { color: var(--ink3); }
.table-head .sortable {
  font: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.table-head .sortable:hover { color: var(--ink); }
.table-head .sortable::after {
  content: '';
  width: 0;
  height: 0;
  flex: none;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: .4;
}
.table-head .sortable.sort-asc::after { border-bottom: 5px solid currentColor; opacity: 1; }
.table-head .sortable.sort-desc::after { border-top: 5px solid currentColor; opacity: 1; }
.note { padding: 11px 16px; font-size: 11px; color: var(--ink3); }

.grid-fixtures {
  grid-template-columns: 100px 40px minmax(200px, 1fr) 88px minmax(130px, 180px) 92px;
  grid-template-areas: "date round matchup score venue report";
}
.grid-fixtures .cell-date { grid-area: date; }
.grid-fixtures .cell-round { grid-area: round; }
.grid-fixtures .cell-matchup { grid-area: matchup; }
.grid-fixtures .cell-score { grid-area: score; }
.grid-fixtures .cell-venue { grid-area: venue; }
.grid-fixtures .cell-report { grid-area: report; }
.grid-standings { grid-template-columns: 34px minmax(180px, 1fr) 40px 36px 36px 36px 84px 52px 52px 128px; }
.grid-roster { grid-template-columns: 38px minmax(160px, 1fr) 54px 40px 48px 48px 74px 44px 36px 36px; }
.grid-lineup { grid-template-columns: 34px minmax(140px, 1fr) 46px 46px 62px 40px 30px 30px; }
.grid-scorers { grid-template-columns: 34px minmax(150px, 1fr) 90px 44px 54px 50px 56px 62px 44px 44px 40px; }
.grid-upcoming { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "date matchup chip"; }
.grid-upcoming .cell-date { grid-area: date; }
.grid-upcoming .cell-matchup { grid-area: matchup; }
.grid-upcoming .cell-chip { grid-area: chip; }
.grid-recent { grid-template-columns: 64px minmax(0, 1fr) auto auto; grid-template-areas: "date matchup score badge"; }
.grid-recent .cell-date { grid-area: date; }
.grid-recent .cell-matchup { grid-area: matchup; }
.grid-recent .cell-score { grid-area: score; }
.grid-recent .cell-badge { grid-area: badge; }
.grid-live { grid-template-columns: 64px minmax(0, 1fr) auto auto; grid-template-areas: "live matchup score chip"; }
.grid-live .cell-live { grid-area: live; }
.grid-live .cell-matchup { grid-area: matchup; }
.grid-live .cell-score { grid-area: score; }
.grid-live .cell-chip { grid-area: chip; }
.row-matchup-sep { white-space: pre; }
.grid-playerlog { grid-template-columns: 96px minmax(160px, 1fr) 78px 44px 46px 62px 40px 44px; }
.grid-officials { grid-template-columns: 34px minmax(0, 1fr) auto; }

/* ---------- Badges ---------- */
.form { display: flex; gap: 4px; align-items: center; }
.form-badge {
  width: 19px; height: 19px;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pos-1 { color: var(--win); }
.pos-last { color: var(--loss); }
.card-chip { width: 12px; height: 16px; border-radius: 2px; background: var(--panel2); display: inline-block; }
.card-chip--yellow { background: var(--draw); }
.card-chip--red { background: var(--loss); }
.tag-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 4px; background: var(--loss); color: #fff;
}
.tag-live::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: livePulse 1.5s ease-in-out infinite;
}
.tag-final { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 4px; background: var(--win); color: #fff; }

/* ---------- Liveticker ---------- */
.ticker-list { display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow-y: auto; }
.ticker-event {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--panel2);
  border-left: 3px solid var(--line);
  font-size: 13px;
}
.ticker-event--home { border-left-color: var(--acc); }
.ticker-event--away { border-left-color: var(--ink3); }
.ticker-event-minute { flex: none; width: 34px; color: var(--ink3); font-size: 12px; }
.ticker-event-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.ticker-event-main { flex: 1; min-width: 0; }
.ticker-event-type { font-weight: 600; }
.ticker-event--goal .ticker-event-type { color: var(--win); }
.ticker-event-score { flex: none; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 700; color: var(--ink2); }
.ticker-event--marker {
  justify-content: center;
  background: transparent;
  border-left: none;
  color: var(--ink3);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
}
@keyframes tickerFadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.ticker-event--new { animation: tickerFadeIn .4s ease; }

/* ---------- Match / Spiel-Detail ---------- */
.matchup-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 26px 18px;
  position: relative;
}
.matchup-team { font-family: "Barlow Condensed", sans-serif; font-size: 30px; font-weight: 700; text-transform: uppercase; line-height: 1.05; min-width: 0; overflow-wrap: break-word; }
.matchup-team--long { font-size: 20px; }
.matchup-team--home { text-align: right; }
.matchup-meta { font-size: 12px; color: var(--ink3); margin-top: 4px; }
.matchup-center { text-align: center; }
.matchup-score { font-family: "IBM Plex Mono", monospace; font-size: 44px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }

.tabs { display: flex; gap: 4px; margin: 18px 0 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab {
  font: inherit;
  font-size: 14px; font-weight: 600; padding: 11px 14px;
  border: 0; border-bottom: 2px solid transparent; color: var(--ink3);
  background: transparent; cursor: pointer;
}
.tab--active { color: var(--ink); border-bottom-color: var(--acc); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .header-row { padding: 10px 12px; flex-wrap: nowrap; }
  .brand { min-width: 0; gap: 8px; }
  .brand-logo { padding: 5px 8px; }
  .brand-logo img { height: 28px; }
  .brand-text { font-size: 10px; }
  .theme-toggle, .burger { width: 36px; height: 36px; }

  /* Hero-Karte kompakter: "Spielinfo"-Button und die beiden kleinen
     Kacheln (Anwurf-in/Aktueller-Stand + Tabelle) in eine gemeinsame
     Zeile statt in getrennte Bloecke untereinander. .hero-info/.hero-side
     sind selbst nur strukturelle Wrapper (Text- bzw. Kachel-Gruppe) -
     display:contents loest sie fuer's Layout auf, damit ihre Kinder
     direkt am Flex-Kontext von .hero-body teilnehmen; die Reihenfolge im
     HTML (Kickoff, Matchup, Anfahrt, Button, Kachel 1, Kachel 2, breite
     Kachel) bestimmt dabei die Zeilenumbrueche: volle-Breite-Elemente
     erzwingen je eine eigene Zeile, die drei "Drittel"-Elemente dazwischen
     teilen sich automatisch eine gemeinsame Zeile. */
  .hero-info, .hero-side { display: contents; }
  .hero-body { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 14px; }
  .hero-kickoff, .hero-matchup, .hero-venue, .hero-tile--wide { flex: 0 0 100%; }
  .hero-actions { flex: 1 1 0; min-width: 0; margin-top: 0; }
  .hero-actions .btn { width: 100%; height: 100%; justify-content: center; }
  .hero-tile:not(.hero-tile--wide) { flex: 1 1 0; min-width: 0; }

  /* Mannschaftsseite: KPI-Kacheln (Platz/Spiele/Punkte/Tore/Ø Tore)
     etwas enger, damit mehr pro Zeile passen (2 statt 3 Zeilen). */
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
  .kpi { padding: 10px; }
  .main { padding: 12px; }
  .hero-matchup { font-size: 30px; }
  .matchup-score { font-size: 34px; }
  .matchup-team { font-size: 22px; }
  .matchup-team--long { font-size: 15px; }
  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { flex: none; }

  /* Nächste Spiele/Letzte Ergebnisse: Team-Chip/Ergebnis oben rechts,
     die beiden Mannschaften je Partie untereinander statt auf einer
     abgeschnittenen Zeile (siehe grid-template-areas oben). */
  .grid-upcoming {
    grid-template-columns: 1fr auto;
    grid-template-areas: "date chip" "matchup matchup";
    row-gap: 4px;
  }
  .grid-recent {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "date score badge" "matchup matchup matchup";
    row-gap: 4px;
  }
  .grid-live {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "live score chip" "matchup matchup matchup";
    row-gap: 4px;
  }
  .cell-matchup.ellipsis { white-space: normal; overflow: visible; text-overflow: clip; }
  .row-matchup-team {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .row-matchup-sep { display: none; }

  /* Spielplan (Team-Seite): Datum/Spieltag + Status oben, die beiden
     Mannschaften darunter volle Breite, Ergebnis/Halle darunter -
     ersetzt die horizontal scrollende 6-Spalten-Tabelle. */
  .fixtures-scroll-inner { min-width: 0; }
  .grid-fixtures .table-head,
  .table-head.grid-fixtures {
    display: none;
  }
  .grid-fixtures {
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "date round report"
      "matchup matchup matchup"
      "score score venue";
    row-gap: 4px;
    column-gap: 10px;
  }
  .grid-fixtures .cell-round::before { content: "ST "; }
  .grid-fixtures .cell-report { text-align: right; }
  .grid-fixtures .cell-venue { text-align: right; font-size: 12px; }
}
