/* RACE RESULT Splits – Dashboard. Ein Werkzeug von RACE RESULT, entwickelt von EFFLAB GmbH.
   Auftritt nach RACE RESULT (raceresult.com, wie das Frankfurt-Display mled-relais/web/stil.css):
   Hauptfarbe #a81815, Logo #c41011, Text #2c2c2c, Flächen #f6f6f6, Linien #ddd, Schrift URW DIN.
   Ruhig und sachlich: neutrale Flächen, eine Akzentfarbe (RACE-RESULT-Rot), klare Statusfarben.
   Farben nur über Tokens; dunkel per prefers-color-scheme.

   Kontrast (WCAG 2.x, gemessen 10.10.2026, Prüfskript im Bericht; Test e2e/marke.spec.mjs misst im Browser):
     hell   Akzent #a81815 auf Weiß 7,48:1, auf #f6f6f6 6,92:1, auf Auswahl #f7eceb 6,47:1; Weiß auf Akzent 7,48:1
     dunkel Akzent #ff7a80 auf #1c1c1c 6,77:1, auf #121212 7,45:1, auf #242424 6,17:1; gefüllt #c8302f, Weiß darauf 5,36:1
   Kritisch ist absichtlich NICHT nur eine Farbe: neben RACE-RESULT-Rot (Akzent) wäre ein zweites Rot allein
   nicht sicher unterscheidbar (ΔE00 ≈ 9–11). Kritisch trägt deshalb eine eigene Form – Raute statt Punkt,
   kräftiger Balken links an der Meldung, gefüllter Chip, umrandeter statt gefüllter Gefahr-Knopf. Der Akzent
   erscheint nie als Statuspunkt (Information „wartet“ = leerer Ring).

   Schrift: URW DIN ist lizenziert (Typekit von RACE RESULT) und wird nicht eingebettet. Es wird KEINE Schrift
   eingebettet; der Stapel nennt nur Schriften, die auf dem Gerät installiert sind (DIN Alternate: macOS/iOS,
   Bahnschrift: Windows 10/11). DIN Alternate gibt es auf Apple-Geräten nur fett – darum DIN nur für fette
   Auszeichnung (Marke, Überschriften), Fließtext und Ziffern bleiben in der Systemschrift: DIN-Alternate-
   Ziffern sind 0,480 em breit, die der Systemschrift (SF, tnum, 700) 0,647 em – große Zahlen würden 26 % schmaler. */

:root {
  color-scheme: light dark;
  --grund: #f6f6f6;
  --flaeche: #ffffff;
  --flaeche-2: #f6f6f6;
  --linie: #dddddd;
  --linie-stark: #c8c8c8;
  --text: #2c2c2c;
  --text-2: #5f5f5f;
  --text-3: #858585;
  --akzent: #a81815;
  --akzent-weich: #f7eceb;
  --akzent-flaeche: #a81815;      /* gefüllte Hauptknöpfe; Weiß darauf 7,48:1 */
  --akzent-flaeche-text: #ffffff;
  --akzent-auf-hell: #a81815; /* Links auf Flächen, die in beiden Schemata hell bleiben (Leaflet) */
  --gut: #157a3a;
  --gut-weich: #e2f3e7;
  --warn: #9a5800;
  --warn-weich: #fbf0dc;
  --schlecht: #d42020;
  --schlecht-text: #ffffff;
  --schlecht-weich: #fdeeee;
  --strecke: #8c8c8c;
  --neu: #fff4c2;
  /* Diagramme (dataviz-Palette: Achsen zurückhaltend) */
  /* schneller/langsamer: neutral, damit es nicht mit den Fahrzeugfarben verwechselt wird */
  /* gemessen (WCAG): langsamer 3,69:1 auf Weiß, 3,41:1 auf --flaeche-2; zueinander 3,78:1 */
  --schneller: #2c2c2c;
  --langsamer: #858585;
  --achse: #c4c4c4;
  --gitter: #e3e3e3;
  --schatten: 0 1px 2px rgb(0 0 0 / 0.06), 0 2px 8px rgb(0 0 0 / 0.05);
  --radius: 10px;
  --radius-klein: 6px;
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --schrift-din: "URW DIN", "DIN Alternate", "DIN 2014", "D-DIN", "Bahnschrift", var(--schrift);
  --kopf-hoehe: 52px;
  --fuss-hoehe: 36px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #121212;
    --flaeche: #1c1c1c;
    --flaeche-2: #242424;
    --linie: #2f2f2f;
    --linie-stark: #3d3d3d;
    --text: #ededed;
    --text-2: #a8a8a8;
    --text-3: #7a7a7a;
    --akzent: #ff7a80;
    --akzent-weich: #3a1c1e;
    /* gefüllt nicht das helle Lachsrot, sondern ein tiefes RACE-RESULT-Rot: Weiß darauf 5,36:1, Fläche auf #1c1c1c 3,18:1 */
    --akzent-flaeche: #c8302f;
    --akzent-flaeche-text: #ffffff;
    --gut: #45c374;
    --gut-weich: #11271a;
    --warn: #e6a640;
    --warn-weich: #2b2110;
    --schlecht: #ff4f5a;
    --schlecht-text: #141414;
    --schlecht-weich: #3a1517;
    --strecke: #707070;
    --neu: #3a3210;
    /* langsamer 3,44:1 auf --flaeche, 3,13:1 auf --flaeche-2; zueinander 3,97:1 */
    --schneller: #e6e6e6;
    --langsamer: #707070;
    --achse: #3a3a3a;
    --gitter: #2c2c2c;
    --schatten: 0 1px 2px rgb(0 0 0 / 0.4);
  }
}

* { box-sizing: border-box; }
html { height: 100%; }
/* Kopf, Inhalt, Fuß: der Fuß steht auch bei kurzen Seiten unten */
body { margin: 0; min-height: 100%; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; min-width: 0; }
body {
  background: var(--grund);
  color: var(--text);
  font: 14px/1.45 var(--schrift);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.zahl, table, .laufzeit, time { font-variant-numeric: tabular-nums; }
a { color: var(--akzent); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; font-family: var(--schrift-din); }
h1 { font-size: 20px; }
h2 { font-size: 15px; }
h3 { font-size: 13px; }
p { margin: 0; }
.leise { color: var(--text-2); }
.sehr-leise { color: var(--text-3); }
.klein { font-size: 12px; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopfzeile ---------- */
.kopf {
  position: sticky; top: 0; z-index: 1000;
  height: var(--kopf-hoehe);
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px;
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
}
.kopf .marke {
  display: flex; align-items: center; gap: 12px; flex: none; align-self: stretch;
  white-space: nowrap; color: var(--text); text-decoration: none;
}
.marke-logo { display: flex; }
/* Logo 22 px hoch (Schriftzug 100 px breit); daneben, durch eine feine Linie getrennt, der Produktname */
.marke-logo img { display: block; height: 22px; width: auto; }
.marke-produkt {
  font-family: var(--schrift-din); font-weight: 700; font-size: 18px; letter-spacing: 0.01em; line-height: 1;
  padding-left: 12px; border-left: 1px solid var(--linie-stark);
}
.kopf nav { display: flex; gap: 4px; min-width: 0; overflow: hidden; align-self: stretch; }
.kopf nav a { display: flex; align-items: center; }
.kopf nav a {
  color: var(--text-2); text-decoration: none; padding: 6px 10px; border-radius: var(--radius-klein);
  white-space: nowrap;
}
.kopf nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--akzent); border-radius: 0; }
.kopf nav a:hover { color: var(--text); }
.kopf .wer { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.kopf .wer span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Knöpfe und Felder ---------- */
button, .knopf {
  font: inherit; font-weight: 550;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 6px 12px;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein);
  background: var(--flaeche); color: var(--text);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease;
}
button:hover, .knopf:hover { background: var(--flaeche-2); }
button:focus-visible, .knopf:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, tr:focus-visible {
  outline: 2px solid var(--akzent); outline-offset: 2px;
}
button.haupt { background: var(--akzent-flaeche); border-color: var(--akzent-flaeche); color: var(--akzent-flaeche-text); }
button.haupt:hover { filter: brightness(1.06); }
button.gefahr { color: var(--schlecht); border-color: color-mix(in srgb, var(--schlecht) 45%, var(--linie)); }
/* Gefahr ist umrandet, nie rot gefüllt: rot gefüllt ist der Hauptknopf (RACE-RESULT-Rot) */
button.gefahr.haupt { background: var(--flaeche); color: var(--schlecht); border: 2px solid var(--schlecht); padding: 5px 11px; font-weight: 650; }
button.gefahr.haupt:hover { background: var(--schlecht-weich); filter: none; }
button.schlicht { border-color: transparent; background: transparent; color: var(--text-2); }
button.schlicht:hover { color: var(--text); background: var(--flaeche-2); }
button[disabled] { opacity: 0.55; cursor: default; }
/* Eingeschaltet ist ein Normalzustand, kein Alarm: neutrale Fläche, die Marke nur als Linie an der Unterkante */
button[aria-pressed="true"] { background: var(--flaeche-2); border-color: var(--linie-stark); color: var(--text); box-shadow: inset 0 -3px 0 var(--akzent); }

label.feld { display: grid; gap: 4px; min-width: 0; }
label.feld > span { font-size: 12px; color: var(--text-2); font-weight: 550; }
input, select {
  font: inherit; color: var(--text); background: var(--flaeche);
  min-height: 34px; padding: 6px 10px; min-width: 0; width: 100%;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein);
}
input[type="file"] { padding: 5px; }
input[type="color"] { padding: 2px; width: 48px; }

/* ---------- Meldungen ---------- */
.meldung {
  padding: 10px 12px; border-radius: var(--radius-klein);
  border: 1px solid var(--linie); background: var(--flaeche-2); color: var(--text);
  overflow-wrap: anywhere;
}
.meldung.warn { background: var(--warn-weich); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.meldung.schlecht { background: var(--schlecht-weich); border-color: color-mix(in srgb, var(--schlecht) 35%, transparent); border-left: 4px solid var(--schlecht); }
.meldung.gut { background: var(--gut-weich); border-color: color-mix(in srgb, var(--gut) 35%, transparent); }
.meldung strong { font-weight: 600; }

.punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.punkt.gut { background: var(--gut); }
.punkt.warn { background: var(--warn); }
/* Kritisch: Raute statt Punkt (Form, nicht nur Farbe – neben RACE-RESULT-Rot) */
.punkt.schlecht { background: var(--schlecht); width: 10px; height: 10px; border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); margin-left: -1px; margin-right: -1px; }
/* Information („wartet auf Start“): leerer Ring – der Akzent ist nie ein Statuspunkt */
.punkt.akzent { background: transparent; box-shadow: inset 0 0 0 2px var(--text-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--flaeche-2); color: var(--text-2); white-space: nowrap;
}
.chip.gut { background: var(--gut-weich); color: var(--gut); }
.chip.warn { background: var(--warn-weich); color: var(--warn); }
.chip.schlecht { background: var(--schlecht); color: var(--schlecht-text); }

/* ---------- Einfache Seiten (Anmeldung, Auswahl, Verwaltung) ---------- */
.seite { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; display: grid; gap: 24px; }
.seite > header { display: grid; gap: 4px; }
.block {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 16px; display: grid; gap: 12px; min-width: 0;
}
.block > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.anmeldung { min-height: calc(100vh - var(--kopf-hoehe)); display: grid; place-items: center; padding: 24px 16px; }
.anmeldung form { width: min(380px, 100%); display: grid; gap: 14px; }

.liste { display: grid; gap: 0; }
.liste > .eintrag {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--linie);
}
.liste > .eintrag:first-child { border-top: 0; }
.eintrag .titel { font-weight: 600; overflow-wrap: anywhere; }
.eintrag .aktionen { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.eintrag a.titel { color: var(--text); text-decoration: none; }
.eintrag a.titel:hover { text-decoration: underline; }

.formular { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.formular .voll { grid-column: 1 / -1; }
.rueckfrage {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-klein); background: var(--warn-weich);
}
.rueckfrage p { flex: 1 1 220px; }
.farbe-feld { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid rgb(0 0 0 / 0.15); }

/* ---------- Live-Ansicht ---------- */
.live {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(400px, 3fr);
  height: calc(100vh - var(--kopf-hoehe) - var(--fuss-hoehe));
  height: calc(100dvh - var(--kopf-hoehe) - var(--fuss-hoehe));
}
.karten-bereich { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; min-width: 0; min-height: 0; }
.karten-flaeche { position: relative; min-height: 0; display: grid; }
#karte { min-height: 0; background: var(--flaeche-2); }
.karten-band { background: var(--flaeche); border-bottom: 1px solid var(--linie); padding: 10px 16px 6px; }
/* Ohne bekannte Distanz (keine Sitzung, kein Wettbewerb) entfällt das Band samt seiner Zeile */
.band[hidden] { display: none; }
.karten-bereich:has(> .karten-band[hidden]) { grid-template-rows: minmax(0, 1fr) auto auto; }
.karten-profil { background: var(--flaeche); border-top: 1px solid var(--linie); padding: 8px 16px; }
.karten-hinweise {
  position: absolute; top: 12px; left: 56px; right: 12px; z-index: 500;
  display: grid; gap: 6px; justify-items: start; pointer-events: none;
}
.karten-hinweise .meldung { box-shadow: var(--schatten); max-width: 560px; pointer-events: auto; font-size: 13px; padding: 7px 10px; }
.karten-knoepfe {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  padding: 10px 12px; background: var(--flaeche); border-top: 1px solid var(--linie);
}
.karten-knoepfe button {
  display: grid; justify-items: start; text-align: left; gap: 1px;
  white-space: normal; min-height: 48px; padding: 6px 10px;
}
.karten-knoepfe button small { font-weight: 400; font-size: 11.5px; color: var(--text-2); line-height: 1.3; }

.spalte {
  min-width: 0; min-height: 0; overflow-y: auto;
  border-left: 1px solid var(--linie); background: var(--grund);
  padding: 12px; display: grid; align-content: start; gap: 12px;
}
.verbindung {
  display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2);
  padding: 2px 2px 0;
}
.verbindung .punkt { margin-top: 6px; }
.hinweis-fest { font-size: 12px; color: var(--text-2); padding: 0 2px; }

.sitzung {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  display: grid; min-width: 0; overflow: hidden;
  border-top: 3px solid var(--farbe, var(--strecke));
}
.sitzung > section { padding: 12px 14px; display: grid; gap: 10px; min-width: 0; }
.sitzung > section + section { border-top: 1px solid var(--linie); }
.sitzung-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sitzung-kopf h2 { overflow-wrap: anywhere; }
.sitzung-kopf .unter { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.sitzung-kopf a { font-size: 12px; white-space: nowrap; }

.laufzeit-zeile { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.laufzeit { font-size: 40px; line-height: 1.05; font-weight: 600; letter-spacing: -0.02em; }
.laufzeit-zeile .bez { font-size: 12px; color: var(--text-2); }

.werte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.werte > div { min-width: 0; }
.werte dt { font-size: 11.5px; color: var(--text-2); }
.werte dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.werte dd .neben { font-weight: 400; color: var(--text-2); }

.start-zeile { display: grid; gap: 6px; }
.start-quellen { display: flex; flex-wrap: wrap; gap: 4px 14px; font-weight: 600; }
.start-quellen .bez { font-weight: 400; color: var(--text-2); }
.satz { font-size: 13px; color: var(--text-2); display: flex; gap: 8px; align-items: flex-start; }
.satz .punkt { margin-top: 6px; }

/* Tabelle */
.tabelle-huelle { overflow-x: hidden; overflow-y: auto; max-height: 340px; margin: 0 -14px; container-type: inline-size; }
@container (max-width: 520px) { table.durchgaenge .spalte-gen { display: none; } }
@container (max-width: 470px) { table.durchgaenge .spalte-status { display: none; } }
table.durchgaenge { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; }
table.durchgaenge th {
  position: sticky; top: 0; z-index: 1; background: var(--flaeche);
  text-align: right; font-weight: 550; font-size: 11.5px; color: var(--text-2);
  padding: 4px 6px 6px; border-bottom: 1px solid var(--linie); white-space: nowrap;
}
table.durchgaenge td { padding: 5px 6px; text-align: right; white-space: nowrap; border-top: 1px solid var(--linie); }
table.durchgaenge th:first-child, table.durchgaenge td:first-child { padding-left: 14px; }
table.durchgaenge th:last-child, table.durchgaenge td:last-child { padding-right: 14px; }
table.durchgaenge .links { text-align: left; }
table.durchgaenge td.km { font-weight: 650; }
table.durchgaenge tr.zeile { cursor: pointer; }
table.durchgaenge tr.zeile.ohne-ort { cursor: default; }
table.durchgaenge tr.zeile:hover td { background: var(--flaeche-2); }
table.durchgaenge tr.zeile.gewaehlt td { background: var(--akzent-weich); }
table.durchgaenge tr.unter td { border-top: 0; padding-top: 0; text-align: left; white-space: normal; font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
table.durchgaenge tr.ungueltig td.streich { text-decoration: line-through; color: var(--text-3); }
table.durchgaenge s { color: var(--text-3); font-weight: 400; margin-right: 4px; }
table.durchgaenge .status-gut { color: var(--text-2); }
table.durchgaenge .status-warn { color: var(--warn); font-weight: 600; }
table.durchgaenge .status-schlecht { color: var(--schlecht); font-weight: 600; }
tr.neu td { animation: neu-hinterlegt 6s ease-out; }
@keyframes neu-hinterlegt { 0%, 40% { background: var(--neu); } 100% { background: transparent; } }
.leer { color: var(--text-2); font-size: 13px; padding: 4px 0; }

/* Systemstatus */
.status-raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.status-raster > div { min-width: 0; display: grid; gap: 1px; }
.status-raster .bez { font-size: 11.5px; color: var(--text-2); }
.status-raster .wert { font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.status-raster .wert > span:last-child { overflow-wrap: anywhere; min-width: 0; }
.status-raster .erkl { font-size: 11.5px; color: var(--text-2); overflow-wrap: anywhere; }
.status-raster .warn { color: var(--warn); }
.status-raster .schlecht { color: var(--schlecht); }

/* Leaflet-Anpassung */
.leaflet-container { font: 12px/1.4 var(--schrift); background: var(--flaeche-2); }
.leaflet-control-attribution { font-size: 11px; }
/* Leaflet legt die Quellenangabe immer auf hellen Grund: dort das helle RACE-RESULT-Rot (7,48:1 auf Weiß) */
.leaflet-control-attribution a { color: var(--akzent-auf-hell); }
.leaflet-popup-content { margin: 10px 12px; font-size: 13px; }
.leaflet-popup-content strong { display: block; font-size: 14px; }
.km-marke {
  display: grid; place-items: center;
  min-width: 22px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--flaeche); color: var(--text); border: 2px solid var(--farbe, var(--strecke));
  font: 600 11px/1 var(--schrift); font-variant-numeric: tabular-nums; white-space: nowrap;
  box-shadow: var(--schatten); transform: translate(-50%, -50%); width: max-content;
}
.km-marke.gewaehlt { background: var(--farbe, var(--strecke)); color: #fff; }
.fahrzeug { position: relative; width: 22px; height: 22px; }
.fahrzeug .kern {
  position: absolute; inset: 4px; border-radius: 50%;
  background: var(--farbe, var(--strecke)); border: 2px solid #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.25);
}
.fahrzeug .richtung {
  position: absolute; left: 50%; top: -7px; width: 0; height: 0; margin-left: -5px;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-bottom: 8px solid var(--farbe, var(--strecke));
  transform-origin: 5px 18px;
}
.fahrzeug.veraltet .kern { background: var(--text-3); }
.fahrzeug.veraltet .richtung { border-bottom-color: var(--text-3); }

/* ---------- Schmalere Bildschirme ---------- */
@media (max-width: 1199px) {
  .live { display: block; height: auto; }
  .karten-bereich { height: auto; }
  .karten-flaeche { height: 58vh; min-height: 340px; }
  .spalte { border-left: 0; overflow: visible; padding: 12px 16px 32px; }
  .tabelle-huelle { max-height: none; }
  .spalte-innen { display: grid; gap: 12px; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .sitzungen-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; align-items: start; }
}
@media (max-width: 700px) {
  .karten-knoepfe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .karten-flaeche { height: 52vh; min-height: 300px; }
  .kopf { gap: 8px; padding: 0 12px; }
  .kopf .wer span { display: none; }
  .kopf nav a { padding: 6px 6px; }
  .laufzeit { font-size: 34px; }
  .status-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table.durchgaenge { font-size: 12.5px; }
  table.durchgaenge th, table.durchgaenge td { padding-left: 4px; padding-right: 4px; }
  table.durchgaenge .spalte-status { display: none; }
  .liste > .eintrag { grid-template-columns: minmax(0, 1fr); }
  .eintrag .aktionen { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .tabelle-huelle { margin: 0; }
  table.durchgaenge th:first-child, table.durchgaenge td:first-child { padding-left: 0; }
  table.durchgaenge th, table.durchgaenge td { padding-right: 0; }
  table.durchgaenge .spalte-gen { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  tr.neu td { background: var(--neu); }
}

/* ======================= Live-Auswertung ======================= */

.spalten-kopf h1 { font-size: 18px; overflow-wrap: anywhere; }
.kopf-links { min-width: 0; }
.kopf-rechts { display: grid; justify-items: end; gap: 4px; flex: none; }
.sitzung-kopf h2 { display: flex; align-items: center; gap: 8px; }
.farbmarke { width: 10px; height: 10px; border-radius: 3px; background: var(--farbe); flex: none; }

/* Held: Laufzeit + Tempo nebeneinander */
.held { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.held > div { display: grid; gap: 2px; min-width: 0; }
.held-bez, .kachel-bez { font-size: 11.5px; color: var(--text-2); font-weight: 550; }
.laufzeit { font-size: 44px; line-height: 1.02; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.laufzeit.wartet { font-size: 22px; line-height: 1.3; letter-spacing: 0; }
.held-unter { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.held-fuss { font-size: 11px; color: var(--text-3); }
.tempo-wert { font-size: 26px; line-height: 1.15; font-weight: 650; letter-spacing: -0.01em; }

.spark { position: relative; height: 40px; margin-top: 4px; cursor: crosshair; }
.spark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.spark-linie { fill: none; stroke: var(--farbe); stroke-width: 2px; stroke-linejoin: round; stroke-linecap: round; }
.spark-flaeche { fill: var(--farbe); opacity: 0.1; }
.spark-ende {
  position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--farbe); box-shadow: 0 0 0 2px var(--flaeche);
}

.steht { font-weight: 600; }

/* Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kachel {
  display: grid; align-content: start; gap: 3px; min-width: 0;
  padding: 8px 10px; border-radius: var(--radius-klein); background: var(--flaeche-2); border: 1px solid var(--linie);
}
.kachel-wert { font-weight: 650; font-size: 15px; overflow-wrap: anywhere; }
.kachel-unter { font-size: 11.5px; color: var(--text-2); overflow-wrap: anywhere; }
.kachel-liste { display: grid; gap: 4px; }
.kachel-zeile { display: grid; gap: 0; min-width: 0; }
.kachel-text { font-size: 11.5px; color: var(--text-2); overflow-wrap: anywhere; }
.kachel-zahl { font-weight: 650; font-size: 13.5px; }

.km-leiste { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--farbe, var(--strecke)) 18%, var(--flaeche-2)); overflow: hidden; margin: 2px 0; }
.km-fuell {
  display: block; height: 100%; width: 100%; border-radius: 2px; background: var(--farbe, var(--strecke));
  transform-origin: left center; transform: scaleX(0); transition: transform 1s linear;
}

/* Streckenband: feste Zeilen – oben Schild Fahrzeug 1, dann Spur, Skala, unten Schild Fahrzeug 2 */
.band { display: grid; gap: 0; --z: 18px; --spur: calc(var(--z) + 8px); }
.band-gross { --z: 26px; }
.band-satz:empty { display: none; }
.band-satz { font-size: 13px; color: var(--text-2); }
.band.ohne .band-flaeche { display: none; }
/* 20 px Rand: der Puls am Bandpunkt (Radius ≈ 19,6 px) bleibt auch bei Start und Ziel im Feld */
.band-flaeche { position: relative; height: calc(var(--spur) + 32px); margin: 0 20px; }
.band:has(.band-schild[data-spur="1"]) .band-flaeche { height: calc(var(--spur) + 36px + var(--z)); }
.band-spur { position: absolute; left: 0; right: 0; top: var(--spur); height: 6px; border-radius: 3px; background: var(--flaeche-2); box-shadow: inset 0 0 0 1px var(--linie); }
.band-skala { position: absolute; left: 0; right: 0; top: var(--spur); height: 32px; pointer-events: none; }
.band-strich { position: absolute; top: 8px; width: 1px; height: 4px; background: var(--achse); }
.band-strich.gross { height: 7px; background: var(--text-3); }
.band-zahl { position: absolute; top: 14px; transform: translateX(-50%); font-size: 11px; line-height: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.band-zahl.anfang { transform: none; }
.band-zahl.ende { transform: translateX(-100%); }
.band-zahl.hm { color: var(--text-2); font-weight: 550; }
.band-marke { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; background: var(--text-2); border-radius: 1px; }
.band-fahrzeuge { position: absolute; inset: 0; }
.band-fuell { position: absolute; left: 0; height: 3px; border-radius: 2px; background: var(--farbe); transition: width 1s linear; z-index: 1; }
.band-fuell[data-spur="0"] { top: var(--spur); }
.band-fuell[data-spur="1"] { top: calc(var(--spur) + 3px); }
.band-punkt {
  position: absolute; top: calc(var(--spur) + 3px); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--farbe); box-shadow: 0 0 0 2px var(--flaeche); transition: left 1s linear; z-index: 2;
}
.band-schild {
  position: absolute; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; max-width: 100%;
  height: var(--z); line-height: var(--z); font-size: 12px; transition: left 1s linear; z-index: 3;
}
.band-schild .punkt { background: var(--farbe); align-self: center; }
.band-schild strong { font-weight: 650; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.band-wert { color: var(--text-2); font-variant-numeric: tabular-nums; flex: none; }
.band-schild[data-spur="0"] { top: 0; }
.band-schild[data-spur="1"] { top: calc(var(--spur) + 34px); }

/* Puls am Bandpunkt und Fahrzeug: beginnt und endet unsichtbar */
@keyframes puls { 0% { transform: scale(1); opacity: 0; } 12% { opacity: 0.38; } 100% { transform: scale(2.8); opacity: 0; } }
.band-punkt.live::after, .fahrzeug.live .puls {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--farbe);
  animation: puls 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite; pointer-events: none;
}

/* Fahrzeug auf der Karte */
.fahrzeug-huelle { background: none; border: 0; }
.fahrzeug .puls { position: absolute; inset: 4px; border-radius: 50%; opacity: 0; }
.fahrzeug .richtung { transition: opacity 300ms ease; }
.fahrzeug.veraltet .puls { animation: none; opacity: 0; }

/* Split-Diagramm */
.splits { display: grid; gap: 6px; }
.splits-flaeche { position: relative; height: 64px; margin-bottom: 14px; }
.splits-null { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--achse); }
.splits-balken { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 2px; }
.split { position: relative; flex: 1 1 0; max-width: 24px; min-width: 2px; }
.split::before {
  content: ""; position: absolute; left: 0; right: 0; height: calc(var(--h) / 2);
}
.split.schneller::before { bottom: 50%; background: var(--schneller); border-radius: 4px 4px 0 0; }
.split.langsamer::before { top: 50%; background: var(--langsamer); border-radius: 0 0 4px 4px; }
.split:hover::before { filter: brightness(1.1); }
.split-hm { position: relative; flex: none; width: 1px; background: var(--text-2); margin: 0 3px; }
.split-hm span { position: absolute; top: -2px; left: 4px; font-size: 10.5px; color: var(--text-2); font-weight: 600; }
.splits.leer-zustand .splits-flaeche, .splits.leer-zustand .legende { display: none; }
.splits-satz { font-size: 12px; color: var(--text-2); }
.legende { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--text-2); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende-farbe { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legende-farbe.schneller { background: var(--schneller); }
.legende-farbe.langsamer { background: var(--langsamer); }

.diagramm-hinweis {
  position: fixed; left: 0; top: 0; z-index: 3000; pointer-events: none;
  background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); box-shadow: var(--schatten);
  border-radius: var(--radius-klein); padding: 6px 8px; font-size: 12px; max-width: 260px; font-variant-numeric: tabular-nums;
}

/* Höhenprofil */
.profil { display: grid; gap: 2px; }
.profil-flaeche-huelle { position: relative; height: 64px; }
.profil svg { display: block; width: 100%; height: 100%; }
.profil-flaeche { fill: var(--strecke); opacity: 0.16; }
.profil-linie { fill: none; stroke: var(--strecke); stroke-width: 2px; }
.profil-punkte { position: absolute; inset: 0; }
.profil-punkt {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--farbe); box-shadow: 0 0 0 2px var(--flaeche); transition: left 1s linear, top 1s linear;
}
.profil-skala { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); }
.profil.ohne .profil-flaeche-huelle, .profil.ohne .profil-skala { display: none; }
.profil-satz { font-size: 12.5px; color: var(--text-2); }
.profil-satz:empty { display: none; }

form.rekorde { display: grid; gap: 10px; }
.rekord-zeile { padding: 8px; border-radius: var(--radius-klein); background: var(--flaeche); border: 1px solid var(--linie); }

/* ======================= TV-Bild ======================= */
body.tv-modus .kopf { display: none; }
body.tv-modus { overflow: hidden; }
.tv {
  height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto auto minmax(0, 1fr);
  padding: 20px 28px 20px; gap: 14px; background: var(--grund);
}
.tv-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; min-width: 0; }
.tv-kopf > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.tv-kopf h1 { font-size: 26px; display: inline; margin-right: 14px; }
.tv-kopf > div:first-child { display: flex; align-items: baseline; min-width: 0; flex: 1 1 0; }
.tv-kopf > div:first-child h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tv-datum { flex: none; }
.tv-datum { color: var(--text-2); font-size: 18px; }
.tv-rechts { display: flex; align-items: center; gap: 20px; }
.tv-uhr { font-size: 34px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tv-verbindung { display: inline-flex; gap: 8px; align-items: center; color: var(--text-2); font-size: 15px; max-width: 520px; min-width: 0; }
.tv-band { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 10px 22px 4px; }
.tv:has(> .tv-band[hidden]) { grid-template-rows: auto minmax(0, 1fr); }
.band-gross .band-schild { font-size: 17px; }
.band-gross .band-zahl { top: 15px; }
.band-gross .band-zahl { font-size: 13px; }
.tv-haupt { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; min-height: 0; }
.tv-links { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 12px; min-height: 0; }
.tv-karten { display: grid; grid-template-columns: repeat(var(--spalten, 1), minmax(0, 1fr)); gap: 16px; min-height: 0; }
.tv-fahrzeug {
  background: var(--flaeche); border: 1px solid var(--linie); border-top: 6px solid var(--farbe); border-radius: var(--radius);
  padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; overflow: hidden;
}
.tv-fahrzeug h2 { font-size: 24px; display: flex; gap: 10px; align-items: center; overflow-wrap: anywhere; }
.tv-fahrzeug .farbmarke { width: 16px; height: 16px; border-radius: 4px; }
.tv-zeit { display: grid; gap: 2px; }
.tv-laufzeit { font-size: clamp(48px, 5.8vw, 108px); line-height: 1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tv-laufzeit.wartet { font-size: 44px; }
.tv-unter { color: var(--text-2); font-size: 17px; }
.tv-prognose { font-size: 22px; font-weight: 600; }
.tv-prognose:empty { display: none; }
.tv-werte { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tv-werte > div { display: grid; gap: 2px; align-content: start; min-width: 0; }
.tv-bez { color: var(--text-2); font-size: 15px; }
.tv-wert { font-size: clamp(28px, 2.6vw, 48px); font-weight: 650; line-height: 1.05; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tv-werte .km-leiste { height: 6px; }
.tv-rekorde { display: grid; gap: 2px; font-size: 17px; }
.tv-rekord { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; }
.tv-rekord .tv-bez { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-fuss { font-size: 13px; color: var(--text-3); }
.tv-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tv-splits { display: flex; flex-direction: column; gap: 6px; flex: 1 1 0; min-height: 0; }
.tv-splits .splits { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(36px, 1fr) auto auto; }
.tv-splits .splits-flaeche { height: auto; min-height: 36px; }
.tv-splits .splits-satz, .tv-splits .legende { font-size: 14px; }
.tv-splits .splits { gap: 4px; }
.tv-abstand { font-size: 22px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-hinweis { font-size: 14px; color: var(--text-2); text-align: center; }
.tv-karte-huelle { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--linie); min-height: 0; display: grid; }
.tv-karte { min-height: 0; }
.tv-vollbild { min-height: 30px; font-size: 13px; }
.tv-leer, .tv-fehler { font-size: 22px; color: var(--text-2); padding: 24px; }
@media (max-width: 1100px) {
  body.tv-modus { overflow: auto; }
  .tv { height: auto; }
  .tv-haupt { grid-template-columns: 1fr; }
  .tv-karte-huelle { height: 50vh; }
  .tv-karten { grid-template-columns: 1fr; }
  .tv-fahrzeug { overflow: visible; }
  .tv-splits { flex: none; }
  .tv-splits .splits { flex: none; }
  .tv-splits .splits-flaeche { height: 80px; }
  .tv-werte { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .tv { padding: 12px 16px; }
  .tv-rechts { flex-wrap: wrap; gap: 8px 16px; }
  .tv-uhr { font-size: 26px; }
  .tv-kopf h1 { font-size: 20px; }
}

@media (max-width: 700px) {
  .held { grid-template-columns: 1fr; }
  .kacheln { grid-template-columns: 1fr; }
  .laufzeit { font-size: 38px; }
  .band-schild { font-size: 11px; }
  .karten-band { padding: 8px 12px 4px; }
}
.sitzungen-raster { display: grid; gap: 12px; align-content: start; min-width: 0; }
.chip.umbruch { white-space: normal; }
/* Schmale Sitzungsspalte (z. B. 1440 px): Kacheln 2 + 1 statt 3 nebeneinander */
.sitzung { container-type: inline-size; }
@container (max-width: 500px) {
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kacheln > .kachel:last-child { grid-column: 1 / -1; }
}
.formular.breit { grid-template-columns: minmax(0, 1fr) auto; }
.formular.breit > .voll { grid-column: 1 / -1; }
/* Achse des Split-Diagramms: km-Zahl alle 5 km unter dem Balken */
.split[data-km]::after {
  content: attr(data-km); position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  font-size: 10.5px; line-height: 12px; color: var(--text-3); font-variant-numeric: tabular-nums;
}
.tv-splits .split[data-km]::after { font-size: 12px; }

/* ======================= Fassung 5 ======================= */
/* Hinweis des Servers zur Sitzung (z. B. zweite Sitzung im Wettbewerb): ganzer Satz, gut sichtbar */
.sitzung-hinweis { font-weight: 600; }
.meldung.abweichung { display: grid; gap: 8px; }
.knopf-meldung { margin-top: 6px; }
.rr-ereignis { color: var(--text); }
/* Übertragungsverzug: Information, kein Alarm – die Zeit selbst stimmt */
table.durchgaenge .status-gut { color: var(--text-3); }
table.durchgaenge .status-spaet { color: var(--text); }
/* KM-Marker, die einen wichtigeren überdecken würden (je Maßstab neu bestimmt) */
.leaflet-marker-icon.ausgeduennt { visibility: hidden; }
/* Kästchen mit Erklärung (Passwort setzen → Handys sperren) */
label.haken { display: flex; gap: 8px; align-items: flex-start; flex: 1 1 100%; cursor: pointer; }
label.haken input { width: auto; min-height: 0; margin-top: 3px; flex: none; }
label.haken > span { display: grid; gap: 2px; min-width: 0; }
label.haken small { font-size: 12px; overflow-wrap: anywhere; }
.rueckfrage.passwort input[type="password"] { flex: 1 1 200px; width: auto; }
/* Geräte */
.geraet-angaben { display: grid; gap: 3px; min-width: 0; }
.geraet-angaben .leise { overflow-wrap: anywhere; }
.geraet-zustand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.eintrag.geraet.gesperrt .titel { color: var(--text-2); }
.tv-hinweis-satz { font-size: 17px; font-weight: 600; color: var(--warn); }
/* „kam 1:05 h später an“ darf umbrechen, statt die Tabelle zu verbreitern */
table.durchgaenge td.spalte-status { white-space: normal; min-width: 7.5em; }
/* TV: Kopf, Zeit, Werte behalten ihre Höhe; nur das Split-Diagramm gibt Platz ab */
.tv-fahrzeug > * { flex-shrink: 0; }
.tv-fahrzeug > .tv-splits { flex-shrink: 1; }
/* Wörter statt Zahlen (vor dem Start, noch keiner) kleiner, damit sie in die Spalte passen */
.tv-wert.wort { font-size: clamp(22px, 1.8vw, 32px); line-height: 1.2; }
/* Offene Rückfrage in einer Zeile: Angaben oben, Frage darunter über die ganze Breite */
.liste > .eintrag:has(.rueckfrage) { grid-template-columns: minmax(0, 1fr); }
.liste > .eintrag:has(.rueckfrage) .aktionen { justify-content: flex-start; }
.eintrag .aktionen .rueckfrage { flex: 1 1 100%; }
.tv-unter, .tv-wert.wort, .kachel-unter, .held-unter { hyphens: auto; }
.status-raster > .status-satz { grid-column: 1 / -1; font-size: 12.5px; }

/* ---- Sichtprüfung 10.10. ---- */
.rueckfrage-zusatz { display: block; margin-top: 4px; font-size: 12px; }
/* Hinweis, der eine Handlung verlangt: kräftige Linie links, steht zuerst */
.meldung.handlung { border-left: 4px solid var(--warn); font-weight: 600; }
/* Kleinste Beschriftungen im Systemstatus mindestens 12 px */
.status-raster .bez, .status-raster .erkl { font-size: 12px; }
/* TV: Wettbewerbsname zweizeilig statt abgeschnitten; kleine Texte aus 3 m lesbar */
.tv-splits .split[data-km]::after { color: var(--text-2); }
.tv-wert.wort { color: var(--text-2); }
/* Handy: Hinweise nicht über der Karte, sondern darüber im Fluss – die Karte bleibt frei */
@media (max-width: 767px) {
  .karten-flaeche { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .karten-hinweise { position: static; padding: 8px 12px; order: -1; }
  .karten-hinweise:empty { display: none; }
  .karten-hinweise .meldung { max-width: none; box-shadow: none; }
  #karte { height: 52vh; min-height: 300px; }
}

/* ---- Sichtprüfung 10.10., Teil 2 ---- */
/* Hinweise: jeder in einer Hülle, die beim Kommen und Gehen in der Höhe gleitet (live.mjs) */
.karten-hinweise { gap: 0; }
.karten-hinweise > .hinweis { display: grid; justify-items: start; padding-bottom: 6px; }
@media (max-width: 767px) {
  .karten-hinweise { padding-bottom: 2px; }
  .karten-hinweise > .hinweis { justify-items: stretch; }
}

/* TV: Wettbewerbsname nie abgeschnitten – höchstens zwei ausgewogene Zeilen, Größe passt tv.mjs an */
.tv-fahrzeug h2 { align-items: flex-start; }
.tv-fahrzeug h2 .farbmarke { margin-top: 0.35em; }
.tv-name { flex: 1 1 0; min-width: 0; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; font-size: 26px; }
.tv-abstand { white-space: normal; overflow: visible; text-overflow: clip; text-wrap: balance; }
/* TV: Zustandswörter (vor dem Start, noch keiner, Wartet auf Start) deutlich kleiner und leiser als Zahlen */
.tv-werte > div { container-type: inline-size; }
/* Zahlen nach der Breite ihrer Spalte (42,195 bleibt in einer Zeile), Wörter etwa halb so groß und leiser */
.tv-wert { font-size: clamp(28px, 24cqi, 48px); }
.tv-wert:not(.wort) { overflow-wrap: normal; white-space: nowrap; }
.tv-wert.wort { font-size: clamp(18px, 13.5cqi, 26px); line-height: 1.25; font-weight: 600; }
.tv-fahrzeug { gap: 12px; }
.tv-laufzeit.wartet { font-size: 40px; color: var(--text-2); font-weight: 650; }
/* TV: aus 3 m lesbar – keine Schrift unter 16 px */
.tv { font-size: 16px; }
.tv-bez, .tv-fuss, .tv-hinweis, .tv-verbindung, .tv-vollbild, .tv-splits .splits-satz, .tv-splits .legende { font-size: 16px; }
.tv-hinweis-satz { font-size: 17px; }
.tv-splits .split[data-km]::after { font-size: 16px; line-height: 18px; }
.tv-splits .splits-flaeche { margin-bottom: 20px; }
.tv-splits .split-hm span { font-size: 16px; top: -4px; }
.band-gross .band-zahl { font-size: 16px; line-height: 18px; top: 14px; }
/* 16-px-Zahlen brauchen unter der Spur 4 px mehr, sonst reicht die Schrift (Firefox) aus dem Band, solange kein zweites Fahrzeug es höher macht */
.band-gross .band-flaeche { height: calc(var(--spur) + 36px); }
.tv .leaflet-control-attribution { font-size: 16px; }

/* Durchgänge: Spalte Startnr. erst, wenn eine Zeile eine Startnummer hat – sie gleitet auf, nichts springt */
table.durchgaenge .spalte-startnr { transition: padding 450ms ease; }
table.durchgaenge .spalte-startnr > .zelle {
  display: inline-block; width: var(--startnr-breite, auto); overflow: hidden; white-space: nowrap; vertical-align: bottom; text-align: right;
  transition: width 450ms ease, opacity 300ms ease 150ms;
}
table.durchgaenge.ohne-startnr .spalte-startnr { padding-left: 0; padding-right: 0; visibility: hidden; }
table.durchgaenge.ohne-startnr .spalte-startnr > .zelle { width: 0; opacity: 0; transition: width 450ms ease, opacity 150ms ease; }
table.durchgaenge.ohne-uebergang .spalte-startnr, table.durchgaenge.ohne-uebergang .spalte-startnr > .zelle { transition: none; }

/* Verwaltung: Datum und Uhrzeit als Textfelder, Satz darunter erklärt bzw. meldet den Fehler */
input[aria-invalid="true"] { border-color: var(--schlecht); }
.feld-satz.fehler { color: var(--schlecht); }
.feld-satz.hinweis { color: var(--warn); }
.band-gross .band-satz { font-size: 16px; }

/* ======================= Auftritt: RACE RESULT, entwickelt von EFFLAB GmbH ======================= */
/* „Entwickelt von EFFLAB GmbH“: EFFLAB-Symbol (unter 96 px nie die Wortmarke) und der Name als Text.
   Dezent, aber lesbar: --text-2 (hell 5,91:1 auf #f6f6f6, dunkel 6,53:1 auf #242424). */
.efflab { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--text-2); font-size: 12px; line-height: 1.3; white-space: nowrap; }
.efflab picture { display: flex; flex: none; }
.efflab img { display: block; width: 18px; height: 18px; }

/* Fuß jeder Seite: eine Zeile */
.fuss {
  flex: none; height: var(--fuss-hoehe); display: flex; align-items: center; justify-content: flex-end;
  padding: 0 16px; background: var(--flaeche); border-top: 1px solid var(--linie);
}
body.tv-modus .fuss, body.ohne-fuss .fuss { display: none; }
/* Versteckte Beschriftungen (.unsichtbar, absolut) blieben sonst am Anfangsblock hängen und machten die
   Live-Ansicht unter dem Fuß scrollbar: die Spalte ist ihr Bezug und schneidet sie mit ab. */
.spalte { position: relative; }

/* Anmeldung: Formular, darunter deutlich der Entwickler */
.anmeldung-saeule { width: min(412px, 100%); display: grid; gap: 20px; justify-items: center; }
.anmeldung-saeule > .block { width: 100%; padding: 20px 16px; }
.efflab.gross { gap: 10px; font-size: 14px; }
.efflab.gross img { width: 28px; height: 28px; }

/* TV: unter der Karte, klein und leise – nie über der Rennanzeige. 16 px wie jede TV-Schrift (aus 3 m lesbar). */
.tv-rechts-spalte { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; min-height: 0; min-width: 0; }
.tv-efflab { justify-self: end; font-size: 16px; color: var(--text-2); }
.tv-efflab img { width: 20px; height: 20px; }
@media (max-width: 1100px) {
  .tv-rechts-spalte { grid-template-rows: auto auto; }
}

/* Schmal: nur das Bildzeichen (picture in marke.mjs), etwas größer – Platz für die Navigation;
   der Name steht im Seitentitel und in aria-label der Marke */
@media (max-width: 420px) {
  .marke-logo img { height: 24px; }
  .kopf:has(nav) .marke-produkt { display: none; }
}

/* Datei-Auswahl wie ein ruhiger Knopf (der Text selbst kommt vom Browser) */
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 550; margin-right: 10px; padding: 4px 10px; min-height: 26px; cursor: pointer;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); background: var(--flaeche-2); color: var(--text);
}
