/* Busradar - nach dem Design "Bus-Website" (Palette 7, Ozeanblau & Hellblau).
   Alle Farben sind Tokens; das dunkle Design kommt aus den *Dunkel-Boards. */

:root {
  color-scheme: light;
  --grund: #EEF3F7;
  --flaeche: #FFFFFF;
  --flaeche-2: #F5F8FB;
  --feld: #EEF3F7;
  --linie: #D5E0E8;
  --linie-fein: #E3EAF0;
  --rand-feld: #C3D1DC;
  --text: #0B2233;
  --text-2: #4A5D6C;
  --text-3: #7A8B99;
  --text-hint: #33475A;
  --marke: #0B3C5D;
  --marke-text: #FFFFFF;
  --hero-leise: #B7CCDD;
  --akzent: #5CC8FF;
  --akzent-text: #062033;
  --blau: #1C77C3;
  --link: #1C77C3;
  --link-hover: #155A96;
  --ok: #1B7A43;
  --spaet: #B42318;
  --fort: #7A4F00;
  --karte: #DFE8EF;
  --vorbei: #A7B4BF;
  --tafel-grund: #06121C;
  --tafel-linie: #1D3346;
  --tafel-fein: #132636;
  --tafel-leise: #7FA3BF;
  --tafel-spaet: #FF7A66;
  --schatten: 0 8px 24px rgba(11, 34, 51, 0.12);
  --schrift: "Public Sans", system-ui, sans-serif;
  --schrift-gross: "Barlow Condensed", "Arial Narrow", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    color-scheme: dark;
    --grund: #0B1620; --flaeche: #13212D; --flaeche-2: #182836; --feld: #0B1620;
    --linie: #24384A; --linie-fein: #1D3040; --rand-feld: #2E465B;
    --text: #E6EEF4; --text-2: #9FB3C4; --text-3: #8298AB; --text-hint: #C2D1DD;
    --marke: #1F4E73; --link: #6CB8F5; --link-hover: #9AD0FA;
    --ok: #5ED17F; --spaet: #FF8A7A; --fort: #E0A84A;
    --karte: #1A2A38; --vorbei: #4E6377; --schatten: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dunkel"] {
  color-scheme: dark;
  --grund: #0B1620; --flaeche: #13212D; --flaeche-2: #182836; --feld: #0B1620;
  --linie: #24384A; --linie-fein: #1D3040; --rand-feld: #2E465B;
  --text: #E6EEF4; --text-2: #9FB3C4; --text-3: #8298AB; --text-hint: #C2D1DD;
  --marke: #1F4E73; --link: #6CB8F5; --link-hover: #9AD0FA;
  --ok: #5ED17F; --spaet: #FF8A7A; --fort: #E0A84A;
  --karte: #1A2A38; --vorbei: #4E6377; --schatten: 0 8px 24px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--schrift); color: var(--text); background: var(--grund);
  line-height: 1.4;
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.versteckt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprung { position: absolute; left: -999px; top: 8px; z-index: 2000; padding: 8px 14px; background: var(--flaeche); border-radius: 8px; }
.sprung:focus { left: 8px; }
.zahl { font-variant-numeric: tabular-nums; }

/* ---------- Kopf ---------- */
.kopf {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; gap: 28px;
  height: 72px; padding: 0 48px;
  background: var(--flaeche); border-bottom: 1px solid var(--linie);
}
.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.marke:hover { color: var(--text); }
.logo { width: 36px; height: 36px; border-radius: 50%; background: var(--akzent); display: flex; align-items: center; justify-content: center; }
.logo span { width: 28px; height: 28px; border-radius: 50%; background: var(--marke); color: #FFFFFF; font-family: var(--schrift-gross); font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.marke-name { font-family: var(--schrift-gross); font-weight: 700; font-size: 24px; }

.suche { position: relative; flex-grow: 1; max-width: 520px; margin: 0; }
.suchfeld {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
  background: var(--feld); border: 1px solid var(--rand-feld); border-radius: 10px; color: var(--text-2);
}
.suchfeld:focus-within { border-color: var(--blau); box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 45%, transparent); }
.suchfeld input { flex-grow: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); outline: none; }
.suchfeld input::-webkit-search-cancel-button { cursor: pointer; }
.vorschlaege {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 1100;
  margin: 0; padding: 6px; list-style: none; max-height: 60vh; overflow-y: auto;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; box-shadow: var(--schatten);
}
.vorschlaege li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.vorschlaege li[aria-selected="true"], .vorschlaege li:hover { background: var(--feld); }
.vorschlaege .v-name { font-weight: 600; }
.vorschlaege .v-ort { font-size: 13px; color: var(--text-2); }
.vorschlaege .v-stern { color: var(--akzent); flex-shrink: 0; }
.vorschlaege .v-leer { color: var(--text-2); cursor: default; }
.vorschlaege .v-kopf { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); cursor: default; padding: 8px 12px 4px; }
.vorschlaege .v-kopf:hover { background: none; }

.hauptnav { display: flex; gap: 4px; flex-shrink: 0; }
.hauptnav a { padding: 10px 16px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.hauptnav a:hover { background: var(--feld); color: var(--text); }
.hauptnav a[aria-current="page"] { background: var(--marke); color: var(--marke-text); }

.stand { margin-left: auto; text-align: right; font-size: 13px; line-height: 1.4; color: var(--text-2); white-space: nowrap; }
.stand-zeit { font-weight: 600; color: var(--text); }
.stand .alt { color: var(--spaet); font-weight: 600; }

.theme-knopf {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--rand-feld); background: var(--flaeche); color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.theme-knopf .sonne { display: none; }
:root[data-theme="dunkel"] .theme-knopf .sonne { display: block; }
:root[data-theme="dunkel"] .theme-knopf .mond { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) .theme-knopf .sonne { display: block; }
  :root:not([data-theme="hell"]) .theme-knopf .mond { display: none; }
}

/* ---------- Seite ---------- */
main { flex-grow: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 40px 48px 32px; outline: none; }
.fuss {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 18px 48px; border-top: 1px solid var(--linie); font-size: 13px; color: var(--text-2);
}
.untennav { display: none; }

.kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.titel { margin: 6px 0 0; font-family: var(--schrift-gross); font-weight: 700; font-size: 64px; line-height: 1; overflow-wrap: anywhere; }
.unter { margin-top: 10px; font-size: 16px; color: var(--text-2); }
.kopfzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }

.knopf {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--rand-feld); background: var(--flaeche); color: var(--text);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.knopf:hover { color: var(--text); border-color: var(--text-3); }
.knopf[aria-pressed="true"] { background: var(--marke); border-color: var(--marke); color: var(--marke-text); }
.knopf.voll { background: var(--blau); border-color: var(--blau); color: #FFFFFF; }
.knopf.voll:hover { background: var(--link-hover); color: #FFFFFF; }
.knopf .stern-an { display: none; }
.knopf[aria-pressed="true"] .stern-an { display: block; color: var(--akzent); }
.knopf[aria-pressed="true"] .stern-aus { display: none; }
.knopf.klein { height: 36px; padding: 0 12px; font-size: 14px; }

.karte-box { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; }
.box-titel { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }

.plakette {
  min-width: 52px; height: 30px; padding: 0 8px; border-radius: 6px;
  background: var(--marke); color: var(--marke-text);
  font-family: var(--schrift-gross); font-weight: 700; font-size: 20px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; white-space: nowrap;
}
.plakette.hell { background: #FFFFFF; color: #0B2233; }
.plakette.akzent { background: var(--akzent); color: var(--akzent-text); }
.plakette.gross { min-width: 80px; height: 48px; padding: 0 12px; font-size: 34px; }

/* Zustaende einer Abfahrt */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.st.ok { color: var(--ok); } .st.ok::before { background: var(--ok); }
.st.spaet { color: var(--spaet); font-weight: 700; } .st.spaet::before { background: var(--spaet); }
.st.fort { color: var(--fort); } .st.fort::before { border: 2px solid var(--fort); }
.st.plan { color: var(--text-2); font-weight: 500; } .st.plan::before { border: 2px solid var(--text-3); }
.st.aus { color: var(--spaet); font-weight: 700; } .st.aus::before { background: var(--spaet); border-radius: 2px; }

.leer, .fehler { padding: 28px 24px; color: var(--text-2); }
.fehler { color: var(--spaet); }
.fehler .knopf { margin-top: 12px; }
.laedt { padding: 28px 24px; color: var(--text-2); }
.laedt::after { content: " …"; }

.hinweis-box { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.hinweis-box svg { flex-shrink: 0; margin-top: 1px; }

/* ---------- Start ---------- */
.start { max-width: 860px; margin: 0 auto; }
.start .titel { font-size: 72px; }
.start-suche { margin-top: 28px; }
.start-suche .suchfeld { height: 56px; border-radius: 14px; background: var(--flaeche); }
.start-suche .suchfeld input { font-size: 18px; }
.start h2 { margin: 40px 0 14px; }
.merkliste { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.merk { display: block; padding: 18px 20px; text-decoration: none; color: var(--text); }
.merk:hover { color: var(--text); border-color: var(--blau); }
.merk-name { font-weight: 700; font-size: 18px; }
.merk-ort { font-size: 13px; color: var(--text-2); }
.merk ol { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.merk li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.merk li .rt { flex-grow: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.merk li .mn { font-family: var(--schrift-gross); font-weight: 700; font-size: 20px; }
.merk .plakette { min-width: 44px; height: 26px; font-size: 17px; }

/* ---------- Abfahrten ---------- */
.abf { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 32px; align-items: start; }
.abf-haupt { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.abf-seite { display: flex; flex-direction: column; gap: 24px; }

.hero { background: var(--marke); color: #FFFFFF; border-radius: 16px; padding: 28px 32px; display: flex; align-items: center; gap: 36px; text-decoration: none; }
.hero:hover { color: #FFFFFF; }
.hero-min { font-family: var(--schrift-gross); font-weight: 700; font-size: 88px; line-height: .9; color: var(--akzent); min-width: 190px; white-space: nowrap; }
.hero-text { flex-grow: 1; min-width: 0; }
.hero .kicker { color: var(--hero-leise); }
.hero-linie { display: flex; align-items: center; gap: 14px; margin-top: 8px; min-width: 0; }
.hero-linie .plakette { min-width: 56px; height: 34px; font-size: 24px; }
.hero-ziel { font-size: 28px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-zeile { margin-top: 10px; font-size: 16px; color: var(--hero-leise); }
.hero.still { display: block; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  flex-shrink: 0; height: 44px; min-width: 64px; padding: 0 18px; border-radius: 22px; cursor: pointer;
  border: 1px solid var(--rand-feld); background: var(--flaeche); color: var(--text);
  font-weight: 600; font-size: 15px; white-space: nowrap;
}
.chip:hover { border-color: var(--text-3); }
.chip[aria-pressed="true"] { border-color: var(--marke); background: var(--marke); color: var(--marke-text); font-weight: 700; }

.tabelle { overflow: hidden; }
.t-kopf, .t-zeile {
  display: grid; grid-template-columns: 110px 92px minmax(0, 1fr) 170px 110px;
  align-items: center; column-gap: 12px; padding: 0 24px;
}
.t-kopf { height: 44px; background: var(--flaeche-2); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); border-radius: 16px 16px 0 0; }
.t-kopf > :last-child, .t-zeile > :last-child { text-align: right; }
.t-liste { list-style: none; margin: 0; padding: 0; }
.t-zeile { min-height: 56px; padding-top: 6px; padding-bottom: 6px; border-top: 1px solid var(--linie-fein); }
.t-zeit { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.t-zeit s { color: var(--text-2); font-weight: 500; font-size: 15px; }
.t-zeit .neu { color: var(--spaet); font-weight: 700; }
.t-ziel { display: flex; align-items: center; gap: 12px; min-width: 0; }
.t-ziel-text { min-width: 0; }
.t-richtung { display: block; font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-extra { display: block; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-extra .warn { color: var(--fort); font-weight: 600; }
.t-status-mobil { display: none; }
.t-pos { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; font-size: 14px; font-weight: 600; text-decoration: none; }
.t-min { font-family: var(--schrift-gross); font-weight: 700; font-size: 26px; white-space: nowrap; }
.t-zeile.aus .t-richtung, .t-zeile.aus .t-min { text-decoration: line-through; color: var(--text-2); }
.t-mehr { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--linie-fein); }

.pos-karte { overflow: hidden; }
.pos-kopf { padding: 20px 24px 16px; }
.pos-kopf h2 { margin: 8px 0 0; display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; min-width: 0; }
.pos-kopf h2 span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-kopf .unter { margin-top: 6px; font-size: 14px; }
.minikarte { height: 220px; background: var(--karte); }
.pos-fuss { padding: 16px 24px 22px; display: flex; flex-direction: column; gap: 12px; }
.pos-fuss .zw { font-size: 15px; line-height: 1.5; }
.pos-fuss .knopf { align-self: flex-start; }

.box-inhalt { padding: 20px 24px; }
.meldung { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--linie-fein); font-size: 14px; line-height: 1.5; }
.meldung:first-of-type { border-top: 0; padding-top: 0; }
.meldung b { display: block; margin-bottom: 2px; }
.meldung p { margin: 0; color: var(--text-hint); white-space: pre-line; }
.meldung details summary { cursor: pointer; color: var(--link); font-weight: 600; }
.legende { margin: 12px 0 0; display: grid; grid-template-columns: 130px minmax(0, 1fr); row-gap: 10px; column-gap: 12px; font-size: 14px; line-height: 1.4; }
.legende dt { font-weight: 600; }
.legende dd { margin: 0; color: var(--text-hint); }

/* ---------- Karten (Leaflet) ---------- */
.leaflet-container { font: inherit; background: var(--karte); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.6); }
}
:root[data-theme="dunkel"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.6); }
.leaflet-control-attribution { font-size: 11px; background: color-mix(in srgb, var(--flaeche) 85%, transparent) !important; color: var(--text-2); }
.leaflet-control-attribution a { color: var(--link); }
.bus-marke { width: 48px; height: 48px; }
.bus-marke .kreis { width: 48px; height: 48px; border-radius: 50%; background: var(--marke); border: 4px solid #FFFFFF; box-shadow: 0 2px 8px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
.bus-marke svg { transition: transform .4s; }
.halt-marke { width: 14px; height: 14px; border-radius: 50%; background: var(--flaeche); border: 4px solid var(--blau); }
.halt-marke.vorbei { border-color: var(--vorbei); }
.halt-marke.hier { width: 20px; height: 20px; background: var(--blau); border-color: #FFFFFF; box-shadow: 0 0 0 2px var(--blau); }
.leaflet-tooltip.halt-name { font: 600 13px var(--schrift); color: #0B2233; }
.bus-schild { background: var(--marke) !important; color: #FFFFFF !important; border: 0 !important; border-radius: 8px !important; font: 700 14px var(--schrift) !important; padding: 6px 10px !important; box-shadow: none !important; }
.bus-schild::before { display: none; }

/* ---------- Fahrt ---------- */
.fahrt { display: flex; flex-direction: column; gap: 24px; min-height: calc(100vh - 72px - 72px - 60px); }
.zurueck { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; text-decoration: none; }
.fahrt .titel { font-size: 52px; display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.kacheln { display: flex; gap: 12px; flex-shrink: 0; }
.kachel { padding: 12px 18px; border-radius: 12px; background: var(--flaeche); border: 1px solid var(--linie); }
.kachel .kicker { font-size: 12px; font-weight: 700; }
.kachel-wert { margin-top: 2px; font-family: var(--schrift-gross); font-weight: 700; font-size: 30px; white-space: nowrap; }
.kachel-wert small { font-family: var(--schrift); font-size: 15px; font-weight: 600; }
.kachel.dunkel { background: var(--marke); border-color: var(--marke); color: #FFFFFF; }
.kachel.dunkel .kicker { color: var(--hero-leise); }
.kachel.dunkel .kachel-wert { color: var(--akzent); }
.fahrt-rumpf { flex-grow: 1; display: flex; gap: 24px; min-height: 560px; }
.fahrt-karte { position: relative; flex-grow: 1; min-width: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--linie); background: var(--karte); }
.fahrt-karte .grosskarte { position: absolute; inset: 0; }
.kartenknoepfe { position: absolute; top: 16px; right: 16px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.kartenknoepfe button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.kartenhinweis { position: absolute; left: 16px; bottom: 28px; z-index: 500; max-width: 420px; padding: 12px 14px; border-radius: 12px; background: var(--flaeche); font-size: 13px; line-height: 1.45; color: var(--text-hint); box-shadow: var(--schatten); }
.fahrt-seite { width: 420px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.verlauf-box { display: flex; flex-direction: column; min-height: 0; max-height: 720px; padding: 20px 8px 8px 24px; }
.verlauf-box .box-titel { margin-bottom: 16px; }
.verlauf { list-style: none; margin: 0; padding: 0 16px 0 0; overflow-y: auto; min-height: 0; }
.vh { display: flex; gap: 14px; }
.vh-spur { width: 20px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.vh-punkt { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; background: var(--flaeche); border: 4px solid var(--blau); }
.vh-strich { width: 4px; flex-grow: 1; background: var(--blau); min-height: 10px; }
.vh.vorbei .vh-punkt { background: var(--vorbei); border-color: var(--vorbei); }
.vh.vorbei .vh-strich { background: var(--vorbei); }
.vh.ziel .vh-punkt { width: 20px; height: 20px; background: var(--blau); border: 0; }
.vh.hier .vh-punkt { width: 20px; height: 20px; background: var(--blau); border: 4px solid var(--akzent); }
.vh-text { flex-grow: 1; min-width: 0; display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-top: -3px; }
.vh-name { font-size: 15px; }
.vh.vorbei .vh-name { color: var(--text-2); }
.vh.naechster .vh-name, .vh.ziel .vh-name, .vh.hier .vh-name { font-weight: 700; font-size: 16px; }
.vh-info { font-size: 13px; color: var(--text-2); }
.vh.naechster .vh-info { color: var(--link); font-weight: 600; }
.vh-zeit { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.vh-zeit s { color: var(--text-3); }
.vh-zeit .neu { color: var(--spaet); font-weight: 700; }
.vh.hier .vh-zeit, .vh.ziel .vh-zeit { font-family: var(--schrift-gross); font-weight: 700; font-size: 22px; }
.vh-bus .vh-spur { padding-top: 2px; }
.vh-bus .vh-punkt { width: 20px; height: 20px; background: var(--marke); border: 0; }
.vh-bus .vh-text { flex-direction: column; justify-content: flex-start; gap: 6px; padding: 2px 0 16px; margin: 0; }
.pille { align-self: flex-start; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--akzent); color: var(--akzent-text); font-size: 14px; font-weight: 700; }
.fakten { margin: 12px 0 0; display: grid; grid-template-columns: 140px minmax(0, 1fr); row-gap: 8px; column-gap: 12px; font-size: 14px; line-height: 1.4; }
.fakten dt { color: var(--text-2); }
.fakten dd { margin: 0; font-weight: 600; }

/* ---------- Fahrplan ---------- */
.fp { display: flex; flex-direction: column; gap: 28px; }
.fp .titel { font-size: 56px; }
.fp-rumpf { display: flex; gap: 32px; align-items: flex-start; }
.fp-linien { width: 300px; flex-shrink: 0; padding: 8px; position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; }
.fp-linien ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fp-linie { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 10px; border: 0; background: transparent; text-align: left; cursor: pointer; text-decoration: none; color: var(--text); }
.fp-linie:hover { background: var(--feld); color: var(--text); }
.fp-linie[aria-current="true"] { background: var(--marke); color: #FFFFFF; }
.fp-linie[aria-current="true"] .plakette { background: var(--akzent); color: var(--akzent-text); }
.fp-ziele { font-size: 13px; line-height: 1.45; color: var(--text-2); white-space: pre-line; }
.fp-linie[aria-current="true"] .fp-ziele { color: #D3E0EA; }
.fp-haupt { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.fp-richtungen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.fp-richtung { overflow: hidden; }
.fp-r-kopf { padding: 18px 24px; border-bottom: 1px solid var(--linie-fein); display: flex; align-items: center; gap: 10px; }
.fp-r-kopf h2 { margin: 0; font-size: 18px; font-weight: 600; }
.fp-r-kopf .anzahl { margin-left: auto; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.fp-stunde { display: flex; align-items: center; gap: 20px; min-height: 60px; padding: 8px 24px; border-top: 1px solid var(--linie-fein); }
.fp-stunde:first-of-type { border-top: 0; }
.fp-h { width: 44px; flex-shrink: 0; font-family: var(--schrift-gross); font-weight: 700; font-size: 32px; }
.fp-minuten { display: flex; flex-wrap: wrap; gap: 6px; }
.fp-m { width: 44px; height: 36px; border-radius: 8px; background: var(--feld); font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; justify-content: center; }
.fp-m.naechste { background: var(--akzent); color: var(--akzent-text); font-weight: 700; }
.fp-m.vorbei { color: var(--text-3); }
.fp-legende { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.fp-legende .muster { display: inline-block; width: 18px; height: 14px; border-radius: 4px; background: var(--akzent); vertical-align: -2px; margin-right: 8px; }
.datum-wahl { position: relative; }
.datum-wahl input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

/* ---------- Anzeigetafel ---------- */
body.tafelmodus { background: var(--tafel-grund); }
body.tafelmodus .kopf, body.tafelmodus .fuss, body.tafelmodus .untennav { display: none; }
body.tafelmodus main { max-width: none; padding: 0; }
.tafel { min-height: 100vh; padding: 48px 64px 32px; background: var(--tafel-grund); color: #5CC8FF; font-family: var(--schrift-gross); display: flex; flex-direction: column; gap: 28px; }
.tf-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding-bottom: 24px; border-bottom: 2px solid var(--tafel-linie); }
.tf-marke { display: flex; align-items: center; gap: 20px; min-width: 0; }
.tf-marke .logo { width: 64px; height: 64px; flex-shrink: 0; }
.tf-marke .logo span { width: 50px; height: 50px; font-size: 36px; background: #0B3C5D; }
.tf-name { margin: 0; font-weight: 700; font-size: 64px; line-height: 1; overflow-wrap: anywhere; }
.tf-unter { margin-top: 6px; font-family: var(--schrift); font-size: 16px; color: var(--tafel-leise); }
.tf-uhr { text-align: right; flex-shrink: 0; }
.tf-uhr b { display: block; font-weight: 700; font-size: 88px; line-height: .9; font-variant-numeric: tabular-nums; }
.tf-uhr span { font-family: var(--schrift); font-size: 15px; color: var(--tafel-leise); }
.tf-spalten, .tf-zeile { display: grid; grid-template-columns: 140px minmax(0, 1fr) 150px 180px; align-items: center; padding: 0 8px; }
.tf-spalten { font-family: var(--schrift); font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tafel-leise); }
.tf-spalten > :last-child, .tf-zeile > :last-child { text-align: right; }
.tf-liste { list-style: none; margin: -16px 0 0; padding: 0; flex-grow: 1; }
.tf-zeile { height: 58px; border-bottom: 1px solid var(--tafel-fein); }
.tf-linie { min-width: 80px; height: 42px; padding: 0 10px; border: 2px solid currentColor; border-radius: 6px; font-weight: 700; font-size: 30px; display: inline-flex; align-items: center; justify-content: center; }
.tf-ziel { font-weight: 600; font-size: 36px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 16px; }
.tf-zeit { font-weight: 600; font-size: 34px; font-variant-numeric: tabular-nums; }
.tf-zeit .neu { color: var(--tafel-spaet); }
.tf-min { font-weight: 700; font-size: 40px; }
.tf-zeile.aus .tf-ziel, .tf-zeile.aus .tf-min { text-decoration: line-through; color: var(--tafel-spaet); }
.tf-fuss { display: flex; justify-content: space-between; gap: 24px; padding-top: 16px; border-top: 2px solid var(--tafel-linie); font-family: var(--schrift); font-size: 15px; color: var(--tafel-leise); }
.tf-fuss .lauf { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-knopf { position: fixed; right: 20px; bottom: 20px; display: flex; gap: 8px; transition: opacity .4s; }
.tf-knopf a, .tf-knopf button { height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--tafel-linie); background: #0D2231; color: #B7CCDD; font: 600 14px var(--schrift); display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; }
.tf-knopf.weg { opacity: 0; pointer-events: none; }
.tafel .leer, .tafel .fehler { font-family: var(--schrift); font-size: 22px; color: var(--tafel-leise); }

/* ---------- mittlere Breite ---------- */
@media (max-width: 1240px) {
  .kopf { gap: 18px; padding: 0 24px; }
  .stand { display: none; }
  main { padding: 32px 24px; }
  .fuss { padding: 18px 24px; }
  .abf { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
  .t-kopf, .t-zeile { grid-template-columns: 96px 80px minmax(0, 1fr) 150px 90px; padding-left: 16px; padding-right: 16px; }
  .fahrt-seite { width: 360px; }
  .fp-richtungen { grid-template-columns: minmax(0, 1fr); }
  .fp-linien { width: 240px; }
}
@media (max-width: 1000px) {
  .abf { grid-template-columns: minmax(0, 1fr); }
  .abf-seite { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .hauptnav a { padding: 10px 10px; }
  .fahrt-rumpf { flex-direction: column; }
  .fahrt-karte { min-height: 420px; }
  .fahrt-seite { width: auto; }
  .verlauf-box { max-height: none; }
}

/* ---------- Handy ---------- */
@media (max-width: 720px) {
  .kopf { flex-wrap: wrap; height: auto; gap: 12px; padding: 12px 16px; position: static; }
  .marke-name { font-size: 20px; }
  .logo { width: 30px; height: 30px; } .logo span { width: 23px; height: 23px; font-size: 16px; }
  .hauptnav { display: none; }
  .theme-knopf { margin-left: auto; width: 40px; height: 40px; }
  .kopf .suche { order: 3; flex-basis: 100%; max-width: none; }
  .suchfeld { height: 46px; border-radius: 12px; background: var(--flaeche); }
  main { padding: 16px 16px 100px; }
  .fuss { padding: 16px 16px 96px; font-size: 12px; }
  .untennav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
    height: 76px; padding: 8px 12px calc(14px + env(safe-area-inset-bottom)); background: var(--flaeche); border-top: 1px solid var(--linie);
  }
  .untennav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-size: 12px; font-weight: 600; }
  .untennav a[aria-current="page"] { background: var(--akzent); color: var(--akzent-text); font-weight: 700; }

  .titel { font-size: 36px; }
  .start .titel { font-size: 44px; }
  .kicker { font-size: 12px; }
  .unter { font-size: 14px; margin-top: 6px; }
  .kopfzeile { align-items: flex-start; }
  .kopfzeile .knopf .lang { display: none; }
  .kopfzeile .knopf { width: 44px; padding: 0; justify-content: center; }
  .abf-haupt { gap: 14px; }
  .abf-seite { display: flex; }
  .hero { padding: 16px 18px; gap: 18px; border-radius: 16px; }
  .hero-min { font-size: 52px; min-width: 0; }
  .hero .kicker { display: none; }
  .hero-linie { margin-top: 0; gap: 8px; }
  .hero-linie .plakette { min-width: 44px; height: 26px; font-size: 18px; }
  .hero-ziel { font-size: 16px; white-space: normal; }
  .hero-zeile { margin-top: 6px; font-size: 13px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .chip { height: 40px; padding: 0 16px; font-size: 14px; min-width: 0; }
  .t-kopf { display: none; }
  .t-zeile { grid-template-columns: 46px auto minmax(0, 1fr) auto; gap: 12px; padding: 8px 14px; min-height: 60px; }
  .t-liste li:first-child { border-top: 0; }
  .t-zeit { font-size: 15px; }
  .t-zeit s { display: none; }
  .t-zeile .plakette { min-width: 44px; height: 26px; font-size: 18px; }
  .t-richtung { font-size: 15px; }
  .t-status { display: none; }
  .t-status-mobil { display: block; }
  .t-status-mobil .st { font-size: 12px; }
  .t-status-mobil .st::before { display: none; }
  .t-pos { display: none; }
  .t-min { font-size: 22px; }

  .fahrt { gap: 0; margin: -16px -16px 0; min-height: 0; }
  .fahrt-kopf { order: 2; padding: 16px; }
  .fahrt .titel { font-size: 18px; font-family: var(--schrift); gap: 10px; margin-top: 8px; line-height: 1.25; }
  .fahrt .titel .plakette.gross { min-width: 52px; height: 30px; font-size: 20px; font-family: var(--schrift-gross); }
  .fahrt .kopfzeile { flex-direction: column; align-items: stretch; gap: 12px; }
  .kacheln .kachel { flex: 1; padding: 10px 14px; }
  .kachel-wert { font-size: 26px; }
  .fahrt-rumpf { order: 1; display: contents; }
  .fahrt-karte { order: 1; min-height: 0; height: 42vh; border-radius: 0; border: 0; }
  .kartenhinweis { display: none; }
  .fahrt-seite { order: 3; padding: 0 16px; }
  .zurueck-mobil { position: absolute; top: 12px; left: 12px; z-index: 600; }

  .fp { gap: 18px; }
  .fp .titel { font-size: 40px; }
  .fp .kopfzeile { flex-direction: column; align-items: stretch; }
  .fp-rumpf { flex-direction: column; align-items: stretch; gap: 16px; }
  .fp-linien { position: static; width: auto; max-height: none; padding: 0; background: none; border: 0; overflow-x: auto; margin-right: -16px; }
  .fp-linien ul { flex-direction: row; }
  .fp-linie { padding: 6px; }
  .fp-ziele { display: none; }
  .fp-r-kopf { padding: 14px 16px; }
  .fp-stunde { padding: 8px 16px; gap: 12px; }
  .fp-h { width: 32px; font-size: 26px; }
  .fp-m { width: 38px; height: 32px; font-size: 15px; }

  .tafel { padding: 20px 16px; gap: 16px; }
  .tf-name { font-size: 34px; }
  .tf-uhr b { font-size: 44px; }
  .tf-marke .logo { display: none; }
  .tf-spalten, .tf-zeile { grid-template-columns: 70px minmax(0, 1fr) 70px; }
  .tf-spalten > :nth-child(3), .tf-zeile > :nth-child(3) { display: none; }
  .tf-linie { min-width: 56px; height: 32px; font-size: 20px; }
  .tf-ziel { font-size: 22px; }
  .tf-min { font-size: 26px; }
  .tf-zeile { height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

.zurueck-mobil { display: none; }
@media (max-width: 720px) {
  .zurueck-mobil { display: inline-flex; width: 44px; padding: 0; justify-content: center; }
  .fahrt-kopf .zurueck { display: none; }
}

.vh.ueber .vh-name, .vh.ueber .vh-zeit { text-decoration: line-through; color: var(--text-3); }
.vh.ueber .vh-info { color: var(--spaet); font-weight: 600; }

/* ======================================================================
   Ranking (ranking.js)
   Diagrammfarben: Vergleichspalette 4 Plätze, validiert 23.09.2026 mit dem
   dataviz-Prüfer (hell gegen #FFFFFF, dunkel gegen #13212D, alle Pflicht-
   prüfungen bestanden). Hell liegen Aqua/Gelb unter 3:1 - darum tragen alle
   Vergleiche Beschriftung und Tabelle. Die Stufen der Verteilung sind eine
   einfarbige Rampe (mehr Verspätung = kräftiger), "zu früh" neutral grau.
   ====================================================================== */
:root {
  --serie-1: #2a78d6; --serie-2: #eb6834; --serie-3: #1baf7a; --serie-4: #eda100;
  --stufe-0: #A7B4BF; --stufe-1: #CFE3F7; --stufe-2: #8FBDE9; --stufe-3: #3F86D0; --stufe-4: #1B4F8F;
  --balken: #1C77C3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    --serie-1: #3987e5; --serie-2: #d95926; --serie-3: #199e70; --serie-4: #c98500;
    --stufe-0: #4E6377; --stufe-1: #1F4163; --stufe-2: #2D6399; --stufe-3: #4F90D6; --stufe-4: #9CCBF5;
    --balken: #4F90D6;
  }
}
:root[data-theme="dunkel"] {
  --serie-1: #3987e5; --serie-2: #d95926; --serie-3: #199e70; --serie-4: #c98500;
  --stufe-0: #4E6377; --stufe-1: #1F4163; --stufe-2: #2D6399; --stufe-3: #4F90D6; --stufe-4: #9CCBF5;
  --balken: #4F90D6;
}
.serie-1 { --farbe: var(--serie-1); } .serie-2 { --farbe: var(--serie-2); }
.serie-3 { --farbe: var(--serie-3); } .serie-4 { --farbe: var(--serie-4); }
.stufe-0 { background: var(--stufe-0); } .stufe-1 { background: var(--stufe-1); } .stufe-2 { background: var(--stufe-2); }
.stufe-3 { background: var(--stufe-3); } .stufe-4 { background: var(--stufe-4); }

.rang { display: flex; flex-direction: column; gap: 20px; }
.rang .titel { font-size: 56px; }
.rang-suche { max-width: 620px; }
.rang-suche .suchfeld { height: 50px; border-radius: 12px; background: var(--flaeche); }
.rang-suche .vorschlaege li .plakette { min-width: 48px; height: 28px; font-size: 18px; }
.rang-hinweis { margin: 0; }
.rang-fuss { margin: 0; font-size: 14px; }
.rang-fuss select, .auswahl select {
  font: inherit; font-size: 14px; color: var(--text); background: var(--flaeche);
  border: 1px solid var(--rand-feld); border-radius: 8px; padding: 6px 8px;
}
.auswahl select { height: 40px; }

.filterleiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.segment { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--flaeche); border: 1px solid var(--linie); }
.seg { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.seg:hover { background: var(--feld); }
.seg[aria-pressed="true"] { background: var(--marke); color: var(--marke-text); }
.richtungen { align-self: flex-start; }

/* Ranglisten */
.rang-tabelle { overflow: hidden; }
.rt-kopf, .rt-zeile { display: grid; grid-template-columns: 56px minmax(0, 1.3fr) minmax(160px, 1.4fr) 110px 84px 84px 84px 90px; align-items: center; column-gap: 12px; padding: 0 20px; }
.linien-tabelle .rt-kopf { grid-template-columns: 56px minmax(0, 1.3fr) minmax(160px, 1.4fr) 110px 84px 84px 84px 90px 52px; }
.rt-kopf { height: 44px; background: var(--flaeche-2); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.rt-kopf > :nth-child(n+4), .rt-zeile > :nth-child(n+4) { text-align: right; }
.rt-liste { list-style: none; margin: 0; padding: 0; }
.rt-liste > li { border-top: 1px solid var(--linie-fein); }
.rt-zeile { min-height: 54px; padding-top: 6px; padding-bottom: 6px; color: var(--text); text-decoration: none; }
.rt-zeile:hover { background: var(--feld); color: var(--text); }
.rt-platz { font-family: var(--schrift-gross); font-weight: 700; font-size: 24px; color: var(--text-2); }
.rt-name { min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rt-name b { font-weight: 600; font-size: 16px; }
.rt-name small { font-size: 13px; color: var(--text-2); }
.rt-mit-wahl { display: grid; grid-template-columns: minmax(0, 1fr) 52px; align-items: center; }
.linien-tabelle .rt-zeile { padding-right: 0; }
.wahl { display: flex; justify-content: center; align-items: center; height: 100%; cursor: pointer; }
.wahl input { width: 20px; height: 20px; accent-color: var(--marke); cursor: pointer; }
.zbalken { display: flex; align-items: center; gap: 10px; }
.zb-spur { flex-grow: 1; height: 10px; border-radius: 5px; background: var(--feld); overflow: hidden; }
.zb-fuellung { display: block; height: 100%; border-radius: 0 5px 5px 0; background: var(--balken); }
.zb-wert { width: 60px; white-space: nowrap; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }

/* Kennzahlen */
.stat-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 18px 20px; }
.stat-wert { margin-top: 6px; font-family: var(--schrift-gross); font-weight: 700; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-unter { margin-top: 8px; font-size: 13px; color: var(--text-2); }
.box-titel .farbpunkt { margin-right: 8px; }
.unter.klein { font-size: 13px; margin-top: 6px; }
.zwei-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.linie-titel { display: flex; align-items: center; gap: 16px; }
.linie-titel .plakette.gross { font-family: var(--schrift-gross); }

/* Diagramme */
.diagramm-platz { width: 100%; min-height: 40px; margin-top: 12px; }
.diagramm { display: block; max-width: 100%; overflow: visible; }
.diagramm .gitter { stroke: var(--linie-fein); stroke-width: 1; }
.diagramm .grundlinie { stroke: var(--rand-feld); stroke-width: 1; }
.diagramm .referenz { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 4 4; }
.diagramm .achse { fill: var(--text-2); font: 500 12px var(--schrift); }
.diagramm .reihe { fill: none; stroke: var(--farbe); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.diagramm .punkt { fill: var(--farbe); stroke: var(--flaeche); stroke-width: 2; }
.diagramm .treffer { fill: transparent; cursor: default; }
.diagramm .treffer.markiert { fill: color-mix(in srgb, var(--text) 10%, transparent); }
.diagramm .saeule { fill: var(--farbe); stroke: var(--flaeche); stroke-width: 1; }
.diagramm .saeule.markiert, .diagramm .saeule:focus { filter: brightness(1.15); outline: none; }
.farbpunkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--farbe); flex-shrink: 0; vertical-align: 0; }
.farbstrich { width: 4px; align-self: stretch; border-radius: 2px; background: var(--farbe); }
.legende-zeile { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.legende-zeile .muster { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; background: var(--farbe, currentColor); }
.legende-zeile .muster[class*="stufe-"] { background: none; }
.legende-zeile .muster.stufe-0 { background: var(--stufe-0); } .legende-zeile .muster.stufe-1 { background: var(--stufe-1); }
.legende-zeile .muster.stufe-2 { background: var(--stufe-2); } .legende-zeile .muster.stufe-3 { background: var(--stufe-3); }
.legende-zeile .muster.stufe-4 { background: var(--stufe-4); }

.vt { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.vt-zeile { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); align-items: center; gap: 12px; }
.vt-name { font-size: 14px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.vt-name .farbpunkt { margin-right: 6px; }
.vt-balken { display: flex; gap: 2px; height: 22px; }
.vt-teil { flex-basis: 0; min-width: 3px; }
.vt-teil:first-child { border-radius: 4px 0 0 4px; }
.vt-teil:last-child { border-radius: 0 4px 4px 0; }
.vt-teil:only-child { border-radius: 4px; }
.vt-teil.markiert, .vt-teil:focus { outline: 2px solid var(--text); outline-offset: 1px; }

.kb { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.kb-zeile { display: grid; grid-template-columns: minmax(90px, 38%) minmax(0, 1fr) 84px; align-items: center; gap: 10px; }
.kb-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kb-spur { height: 14px; }
.kb-balken { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--farbe); }
.kb-balken.markiert, .kb-balken:focus { filter: brightness(1.15); outline: none; }
.kb-wert { text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bester { color: var(--text-2); }

.tip { position: fixed; z-index: 3000; max-width: 280px; padding: 8px 10px; border-radius: 8px; background: var(--text); color: var(--flaeche); font-size: 13px; line-height: 1.4; pointer-events: none; box-shadow: var(--schatten); }
.tabellenansicht { margin-top: 12px; font-size: 14px; }
.tabellenansicht summary { cursor: pointer; color: var(--link); font-weight: 600; }
.tabellenansicht table, .tabelle-rollen table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.tabellenansicht th, .tabellenansicht td, .tabelle-rollen th, .tabelle-rollen td { padding: 6px 8px; border-bottom: 1px solid var(--linie-fein); text-align: right; white-space: nowrap; }
.tabellenansicht th:first-child, .tabellenansicht td:first-child, .tabelle-rollen th:first-child, .tabelle-rollen td:first-child { text-align: left; white-space: normal; }
.tabellenansicht th, .tabelle-rollen th { font-size: 12px; color: var(--text-2); font-weight: 700; }
.tabelle-rollen { overflow-x: auto; }
.tabelle-rollen .farbpunkt { margin-right: 6px; }

/* Vergleich */
.vg-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.vg-karte { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.vg-karte-kopf { display: flex; align-items: center; gap: 10px; }
.vg-name { flex-grow: 1; min-width: 0; font-weight: 600; font-size: 15px; display: flex; flex-direction: column; }
.vg-name small { font-weight: 400; font-size: 13px; color: var(--text-2); }
.vg-weg { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--rand-feld); background: var(--flaeche); color: var(--text-2); font-size: 20px; line-height: 1; cursor: pointer; }
.vg-karte .auswahl select { width: 100%; }
.klein-link { font-size: 13px; font-weight: 600; }
.vergleichsleiste { position: sticky; bottom: 16px; z-index: 900; align-self: center; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; padding: 10px 14px; border-radius: 14px; background: var(--flaeche); border: 1px solid var(--linie); box-shadow: var(--schatten); }
.vl-eintrag { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; font-weight: 700; }

@media (max-width: 1000px) {
  .rt-breit { display: none; }
  .rt-kopf, .rt-zeile { grid-template-columns: 44px minmax(0, 1fr) minmax(120px, 1.2fr) 90px 80px; padding: 0 14px; }
  .linien-tabelle .rt-kopf { grid-template-columns: 44px minmax(0, 1fr) minmax(120px, 1.2fr) 90px 80px 52px; }
  .bp-zeile { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(110px, 1fr) 90px 80px; }
  .stat-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zwei-spalten { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .rang { gap: 14px; }
  .rang .titel { font-size: 34px; }
  .linie-titel { font-size: 26px !important; }
  .linie-titel .plakette.gross { min-width: 60px; height: 38px; font-size: 26px; }
  .filterleiste { gap: 8px; }
  .seg { height: 34px; padding: 0 10px; font-size: 13px; }
  .richtungen { align-self: stretch; }
  .richtungen .seg { white-space: normal; text-align: left; height: auto; min-height: 34px; padding: 6px 10px; }
  .rt-kopf { display: none; }
  .rt-zeile { grid-template-columns: 30px minmax(0, 1fr) 132px; row-gap: 2px; padding: 8px 12px; }
  .rt-zeile > :nth-child(3) { grid-column: 3; grid-row: 1; }
  .rt-zeile > :nth-child(4) { grid-column: 2 / 4; grid-row: 2; text-align: left; font-size: 13px; color: var(--text-2); }
  .rt-zeile > :nth-child(4)::before { content: "Ø "; }
  .zb-wert { width: 58px; font-size: 14px; white-space: nowrap; }
  .rt-platz { font-size: 20px; }
  .stat { padding: 14px; }
  .stat-wert { font-size: 30px; }
  .vt-zeile { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .kb-zeile { grid-template-columns: minmax(0, 1fr) 78px; }
  .kb-spur { grid-column: 1 / 3; grid-row: 2; }
  .vergleichsleiste { bottom: 88px; }
}

.vergleichsleiste[hidden] { display: none; }

/* Zu frueh */
.rt-mittel { }
.unter-titel { margin: 22px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.tabelle-rollen caption { caption-side: bottom; text-align: left; font-size: 12px; color: var(--text-2); padding-top: 6px; }
.live-hinweis { display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--text); text-decoration: none; flex-wrap: wrap; }
.live-hinweis:hover { color: var(--text); border-color: var(--blau); }
.live-hinweis > span:nth-child(2) { flex: 1 1 260px; }
.live-punkt { width: 12px; height: 12px; border-radius: 50%; background: var(--fort); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fort) 25%, transparent); flex-shrink: 0; }
.bp-kopf { padding-bottom: 12px; }
.bp-zeile { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(140px, 1fr) 110px 90px 100px; align-items: center; column-gap: 12px; padding: 8px 20px; min-height: 52px; }
.bp-kopfzeile { min-height: 40px; background: var(--flaeche-2); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.bp-zeile > :nth-child(n+4) { text-align: right; }
.bp-halt { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.bp-linie { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bp-linie a { text-decoration: none; flex-shrink: 0; }
.bp-linie small { font-size: 13px; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-liste > li.bp-zeile { border-top: 1px solid var(--linie-fein); }
.zf-rumpf { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.zf-karte { overflow: hidden; min-height: 460px; position: relative; }
.zf-karte #zf-karte { position: absolute; inset: 0; }
.zf-seite { display: flex; flex-direction: column; gap: 16px; }
.zf-marke { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 7px; background: var(--marke); color: #FFFFFF; font: 700 13px var(--schrift); white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.35); border: 2px solid #FFFFFF; transform: translate(-50%, -50%); cursor: pointer; }
.zf-marke b { font-family: var(--schrift-gross); font-size: 15px; margin-right: 2px; }
.zf-staedte { list-style: none; margin: 10px 0 0; padding: 0; }
.zf-staedte a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--linie-fein); color: var(--text); text-decoration: none; font-size: 14px; }
.zf-staedte li:first-child a { border-top: 0; }
.zf-staedte a:hover { color: var(--link); }
.zf-zeile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 20px; color: var(--text); text-decoration: none; }
.zf-zeile:hover { background: var(--feld); color: var(--text); }
.zf-ziel { min-width: 0; display: flex; flex-direction: column; }
.zf-ziel b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zf-ziel small { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zf-frueh { font-weight: 700; color: var(--fort); white-space: nowrap; }
@media (max-width: 1000px) {
  .zf-rumpf { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .rt-mittel { display: none; }
  .bp-kopfzeile { display: none; }
  .bp-zeile { grid-template-columns: minmax(0, 1fr) 124px; row-gap: 4px; padding: 10px 12px; }
  .bp-zeile > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .bp-zeile > :nth-child(3) { grid-column: 2; grid-row: 1; }
  .bp-zeile > :nth-child(4) { grid-column: 2; grid-row: 2; font-size: 13px; color: var(--text-2); }
  .zf-karte { min-height: 340px; }
  .zf-zeile { padding: 10px 12px; gap: 10px; }
}
