/* Farben als Variablen: Hell als Vorgabe, Dunkel nach Systemeinstellung. */
:root {
  --grund: #ffffff;
  --flaeche: #f4f4f4;
  --text: #1c1c1c;
  --leise: #5b5b5b;
  --rahmen: #d0d0d0;
  --akzent: #0b5cad;
  --fehler: #b00020;
  color-scheme: light;
}

/* Beta-1.11: Hell/Dunkel auch von Hand (Config → Programm bzw. Knopf oben); ohne Wahl nach Systemeinstellung. */
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) {
    --grund: #161616;
    --flaeche: #222222;
    --text: #ececec;
    --leise: #a8a8a8;
    --rahmen: #3a3a3a;
    --akzent: #6cb2ff;
    --fehler: #ff6b81;
    color-scheme: dark;
  }
}
:root[data-thema="dunkel"] {
  --grund: #161616;
  --flaeche: #222222;
  --text: #ececec;
  --leise: #a8a8a8;
  --rahmen: #3a3a3a;
  --akzent: #6cb2ff;
  --fehler: #ff6b81;
  color-scheme: dark;
}

body {
  margin: 0 auto;
  max-width: 64rem;
  box-sizing: border-box;
  padding: 1rem;
  background: var(--grund);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

header {
  border-bottom: 1px solid var(--rahmen);
  margin-bottom: 1rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  padding-bottom: 0.5rem;
}

a {
  color: var(--akzent);
}

.hinweis,
.leise {
  color: var(--leise);
}

.fehler {
  color: var(--fehler);
}

/* gamma-016: Rückfrage „Baureihe vergessen?“ im Formular */
.rueckfrage {
  border: 1px solid var(--rand, rgba(127, 127, 127, .5));
  border-radius: 6px;
  padding: .5rem .75rem;
  margin: .5rem 0;
}

form {
  display: grid;
  gap: 0.6rem;
  max-width: 32rem;
}

label {
  display: grid;
  gap: 0.2rem;
}

input,
textarea,
button {
  font: inherit;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--rahmen);
  border-radius: 0.3rem;
  background: var(--grund);
  color: var(--text);
}

button {
  cursor: pointer;
  background: var(--flaeche);
}

button.haupt {
  background: var(--akzent);
  color: var(--grund);
  border-color: var(--akzent);
}

.zeitpaar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.tabelle {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--rahmen);
  vertical-align: top;
}

td.aktionen {
  white-space: nowrap;
}

pre {
  white-space: pre-wrap;
  font-family: inherit;
}

/* gamma-012: „hidden“ muss gewinnen – display:flex hob das Attribut auf, die Leiste blieb in der Config stehen */
.reiter[hidden] {
  display: none;
}

.reiter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.5rem 0 1rem;
}

.reiter button.aktiv {
  background: var(--akzent);
  color: var(--grund);
  border-color: var(--akzent);
}

ul.liste {
  list-style: none;
  padding: 0;
}

ul.liste li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rahmen);
}

label.haken {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

select {
  font: inherit;
  padding: 0.3rem;
  border: 1px solid var(--rahmen);
  border-radius: 0.3rem;
  background: var(--grund);
  color: var(--text);
}

nav.reiter {
  border-bottom: 1px solid var(--rahmen);
  padding: 0 1rem;
  overflow-x: auto;
  white-space: nowrap;
}

nav.reiter a {
  display: inline-block;
  padding: 0.55rem 0.8rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

nav.reiter a.aktiv {
  color: var(--akzent);
  font-weight: bold;
  border-bottom-color: var(--akzent);
}

.werkzeugleiste {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.werkzeugleiste button {
  margin-right: 0.3rem;
}

tr.gewaehlt td {
  background: var(--auswahl, rgba(11, 92, 173, 0.15));
}

tbody tr {
  cursor: pointer;
}

/* Spaltengrenzen sichtbar (Tabellen mit vielen Spalten wie den Fahrten) */
.tabelle table {
  border: 1px solid var(--rahmen);
}

.tabelle th,
.tabelle td {
  border-right: 1px solid var(--rahmen);
}

.tabelle th:last-child,
.tabelle td:last-child {
  border-right: none;
}

.tabelle thead th {
  background: var(--flaeche, rgba(127, 127, 127, 0.08));
}

/* Zweite Leiste unter „Stammdaten“ (E34) */
.unterreiter {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.92em;
  padding-top: 0.35rem;
}

/* Bilder (R4) */
.bilder {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.bilder figure {
  margin: 0;
  max-width: 12rem;
}

.bilder img {
  max-width: 12rem;
  max-height: 9rem;
  border: 1px solid var(--rahmen);
}

/* Karte (R5) */
canvas.karte {
  width: 100%;
  height: 60vh;
  min-height: 320px;
  border: 1px solid var(--rahmen);
  touch-action: none;
  display: block;
}

/* Gewählte Hersteller wie in der Alpha als sichtbare Marken. */
.hersteller-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }
.nahe-liste { display: flex; flex-direction: column; gap: .25rem; margin-top: .3rem; }
.nahe-liste .nahe-treffer { text-align: left; }
.hersteller-tag { border: 1px solid #7894bf; border-radius: 999px; padding: .12rem .6rem;
  background: #dbeafe; color: #1e3a8a; font-size: .85em; }

/* Statistik aus Rohdaten (R6, beta-0.72) wie die Seite „Statistik“ der alpha */
.karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; margin: .6rem 0; }
.karte { border: 1px solid var(--rahmen); border-radius: 8px; padding: .6rem; display: flex; flex-direction: column; }
.karte b { font-size: 1.5em; }
.karte span { font-size: .85em; opacity: .8; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; }
.raster table { width: 100%; border-collapse: collapse; font-size: .9em; }
.raster td, .raster th { padding: .2rem .4rem; border-bottom: 1px solid var(--rahmen); text-align: left; }
.balken { display: flex; align-items: center; gap: .4rem; font-size: .85em; }
.balken-name { width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balken-wert { height: .8rem; background: #4a7bd0; border-radius: 2px; min-width: 1px; }

/* R6: DB-Knöpfe im Fahrt-Dialog – Zugangsdaten, Trefferliste, Linienwahl */
.dbpanel {
  border: 1px solid var(--rahmen);
  border-radius: 0.3rem;
  padding: 0.5rem 0.8rem;
  margin-top: 0.6rem;
}
.dbpanel button {
  text-align: left;
}

/* beta-0.84: Meldungen des Fahrt-/Stammdatenformulars (DB-Zugangsdaten, Treffer, Fehler) bleiben am unteren
   Fensterrand sichtbar, statt am Ende eines langen Formulars außer Sicht zu erscheinen */
.formmeldung:not(:empty) {
  position: sticky;
  bottom: 0;
  z-index: 5;
  max-height: 60vh;
  overflow: auto;
  background: var(--grund);
  border-top: 2px solid var(--akzent);
  padding: 0.4rem 0 0.6rem;
  box-shadow: 0 -0.4rem 0.8rem rgba(0, 0, 0, 0.25);
}

/* Trennung zwischen Formularabschnitten, z. B. den Einheiten des Zugverbands */
.trennzeile { border-top: 1px solid var(--rand, #8884); padding-top: .6em; margin-top: .4em; }
.kleinfenster { display: grid; gap: .5em; padding: .8em; border: 1px solid var(--rand, #8886); border-radius: 6px;
  background: var(--flaeche, Canvas); max-width: 22em; }

/* Übersicht: angepinnte Statistiken als Kacheln mit Stecknadel, darunter abgesetzt die ganze Statistik */
.kacheln-angepinnt { display: grid; grid-template-columns: repeat(auto-fill, minmax(14em, 1fr)); gap: .8em; }
.statistik-kachel { position: relative; display: flex; flex-direction: column; gap: .4em; padding: .8em .8em .6em;
  border: 1px solid var(--rand, #8885); border-radius: 8px; }
.statistik-kachel .pin { position: absolute; top: .55em; right: .55em; width: 1em; height: 1em; background: currentColor;
  opacity: .6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 3v2l-1 1v5l3 3v2h-5v6l-1 1-1-1v-6H6v-2l3-3V6L8 5V3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 3v2l-1 1v5l3 3v2h-5v6l-1 1-1-1v-6H6v-2l3-3V6L8 5V3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.kachel-inhalt { display: flex; flex-direction: column; gap: .2em; padding-right: 1.4em; }
.kachel-antwort { font-size: 1.4em; overflow-wrap: anywhere; }
.kachel-frage { opacity: .8; }
.kachel-knoepfe { display: flex; gap: .3em; flex-wrap: wrap; margin-top: auto; }
.kachel-knoepfe button { font-size: .8em; }
hr.bumper { border: 0; height: 4px; border-radius: 2px; background: var(--rand, #8886); margin: 1.4em 0; }
.hersteller-tag .tag-weg { border: 0; background: none; padding: 0 .2em; cursor: pointer; font: inherit; color: inherit; }
th.sortierbar { cursor: pointer; user-select: none; }
td.anzahl { text-align: right; white-space: nowrap; opacity: .85; }
canvas.zuschnitt { max-width: 100%; touch-action: none; cursor: crosshair; border: 1px solid var(--rand, #8886); }

/* beta-0.98: Vollbild der Karte */
.kartenrahmen { position: relative; }
.kartenrahmen button.kartenvollbild { position: absolute; top: .5rem; right: .5rem; z-index: 2; opacity: .9; }
.kartenrahmen:fullscreen { background: #e8eef0; }
.kartenrahmen:fullscreen canvas.karte, .kartenrahmen.ersatzvollbild canvas.karte { height: 100vh; width: 100vw; border: 0; }
.kartenrahmen.ersatzvollbild { position: fixed; inset: 0; z-index: 1000; background: #e8eef0; }

/* Beta-1.1: öffentliche Profile auf der Anmeldeseite */
a.profilkachel { display: block; border: 1px solid var(--rahmen); border-radius: 10px; padding: .8rem; margin: .6rem 0;
  color: inherit; text-decoration: none; }
a.profilkachel:hover { border-color: currentColor; }
a.profilkachel .profilname { display: block; font-size: 1.15em; margin-bottom: .5rem; }

/* Beta-1.6: Kacheln mit Bild wie in der alpha; Ersatzbilder unverändert, nur klein „Bild von …“ (Beta-1.8) */
.umschalter { display: inline-flex; margin-left: .5rem; }
.umschalter button { border-radius: 0; }
.umschalter button:first-child { border-radius: 6px 0 0 6px; }
.umschalter button:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.umschalter button.aktiv { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: .6rem; }
.kachel { background: var(--flaeche); border: 1px solid var(--rahmen); border-radius: 12px; overflow: hidden;
  cursor: pointer; display: flex; flex-direction: column; }
.kachel:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.kachel.gewaehlt { outline: 3px solid var(--akzent); }
.kopfbild { height: 150px; background: var(--rahmen) center/cover no-repeat; position: relative; }
.kopfbild.leer { display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--akzent), #7d9cc9); }
.kopfbild.leer span { font-size: 38px; font-weight: 700; color: #fff; opacity: .85; letter-spacing: 2px; }
.kopfbild .bildflaeche { position: absolute; inset: 0; background: center/cover no-repeat; }
.platzhalter-herkunft { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; background: rgba(0, 0, 0, .45);
  color: #fff; font-size: 10.5px; padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bildanzahl { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px;
  padding: 2px 9px; border-radius: 10px; }
.kachelinhalt { padding: 10px 12px 12px; }
.kachelinhalt h3 { margin: 0 0 6px; font-size: 16px; line-height: 1.25; }
.kachelfeld { font-size: 13px; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kachelfeld span { color: var(--leise); margin-right: 6px; }
.formbild { position: relative; margin: .4rem 0 .8rem; }
.formbild img { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; }

/* Beta-1.10: Ansehen und ⋮ an jeder Zeile/Kachel, fliegender Knopf, Ansicht als Fenster über der Liste */
.zeilenknoepfe { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.zeilenknoepfe button { padding: 2px 8px; font-size: 13px; }
.menuehalter { position: relative; display: inline-block; }
.zeilenmenue { position: absolute; right: 0; top: 100%; z-index: 20; background: var(--flaeche); border: 1px solid var(--rahmen);
  border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); display: flex; flex-direction: column; min-width: 200px; }
.zeilenmenue[hidden] { display: none; }
.zeilenmenue button { border: 0; border-radius: 0; text-align: left; padding: 8px 12px; background: transparent; }
.zeilenmenue button:hover { background: var(--rahmen); }
td.aktionen { text-align: right; width: 1%; }
tbody tr { cursor: pointer; }
.kachelfuss { padding: 0 10px 10px; display: flex; justify-content: flex-end; }
.fab-stapel { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: flex; flex-direction: column;
  align-items: flex-end; gap: 10px; }
.fab { padding: 14px 20px; border-radius: 16px; border: 0;
  background: var(--akzent); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); cursor: pointer; }
.fab-klein { padding: 8px 14px; border-radius: 12px; border: 1px solid var(--rahmen); background: var(--flaeche);
  color: inherit; font-size: 13px; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); cursor: pointer; }
.ansichthuelle { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .45); display: flex;
  align-items: flex-start; justify-content: center; overflow: auto; padding: 4vh 12px; }
.ansicht { background: var(--flaeche); border-radius: 14px; padding: 18px 20px; width: min(680px, 100%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35); outline: none; }
.ansicht h2 { margin-top: 0; }
.ansichtbilder { display: flex; align-items: center; gap: 8px; justify-content: center; }
.ansichtbild { max-width: 100%; max-height: 360px; border-radius: 10px; display: block; }
.blaettern { font-size: 22px; padding: 4px 12px; }
.ansichtfelder { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 14px 0; }
.ansichtfelder dt { color: var(--leise); }
.ansichtfelder dd { margin: 0; white-space: pre-wrap; }
.alledaten { font-size: 13px; margin: 6px 0 10px; }
.knopfzeile { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }

/* Beta-1.11: Übersicht als Widgets (ziehen, ‹ ›, ×) */
.widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 1rem; margin: .8rem 0; }
.widget { border: 1px solid var(--rahmen); border-radius: 10px; padding: .4rem .8rem .8rem; background: var(--flaeche);
  min-width: 0; overflow-x: auto; }
.widget.breit { grid-column: 1 / -1; }
.widget.klein { position: relative; }
.widget.zieht { opacity: .4; }
.widget.ziel { outline: 2px dashed var(--akzent); outline-offset: 2px; }
.widget-kopf { display: flex; align-items: center; gap: .4rem; cursor: grab; user-select: none; }
.widget-kopf h3 { flex: 1; margin: .3rem 0; font-size: 1rem; }
.widget-kopf .griff { opacity: .45; letter-spacing: -2px; }
.widget-knoepfe { display: inline-flex; gap: 2px; }
.widget-knoepfe button { padding: 0 .45rem; font-size: .9rem; line-height: 1.5; }
.widget table { width: 100%; border-collapse: collapse; font-size: .9em; }
.widget td, .widget th { padding: .2rem .4rem; border-bottom: 1px solid var(--rahmen); text-align: left; }
.widget h4 { margin: .6rem 0 .2rem; font-size: .9rem; }
.widget .kachel-antwort { font-size: 1.8em; }
.widget-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.tabelle.begrenzt { max-height: 24rem; overflow-y: auto; }
/* Beta-1.13: Listen und Übersicht in voller Breite; Spaltenwahl */
body.breit { max-width: none; }
.spaltenwahl { padding: .4rem .6rem; min-width: 14rem; max-height: 60vh; overflow-y: auto; z-index: 35; }
.spaltenwahl label { display: block; padding: .15rem 0; white-space: nowrap; }
.kachel:not(:has(.kopfbild)) .kachelinhalt { padding-top: .6rem; }

/* Beta-1.18: Karte aller Fahrten – Filter- und Anzeigemenü */
.kartenleiste { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .4rem 0; }
.kartenknopf { display: inline-flex; align-items: center; gap: .3rem; }
svg.symbol { width: 1.1em; height: 1.1em; vertical-align: -.15em; }
.kartenmenue { position: absolute; top: 100%; left: 0; z-index: 30; margin-top: .3rem; min-width: min(26rem, 92vw);
  max-width: 92vw; max-height: 70vh; overflow: auto; background: var(--grund); color: var(--text);
  border: 1px solid var(--rahmen); border-radius: 8px; padding: .6rem .9rem; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.kartenmenue h3 { margin: .2rem 0 .5rem; }
.kartenfilter { display: grid; grid-template-columns: 1fr; gap: .45rem; margin: 0; }
.kartenfilter label { display: grid; grid-template-columns: 6rem 1fr; align-items: center; gap: .5rem; }
.kartenfilter select, .kartenfilter input { width: 100%; box-sizing: border-box; }
.kartenlegende { display: grid; gap: .2rem; margin: 0 0 .5rem; }
.kartenbreite { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.kartenbreite input[type=range] { flex: 1; min-width: 10rem; }
.kartenaktiv { display: block; color: var(--leise); margin-bottom: .3rem; }

/* E40: Linienweg-Editor, T-förmig – oben die Liniengrafik, unten links die Halte, unten rechts die Karte;
   schmale Bildschirme untereinander. */
.lw-kopf { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .3rem 0; }
.lw-menue { position: absolute; z-index: 5; display: flex; flex-direction: column; gap: .2rem; padding: .4rem;
  background: var(--grund, #fff); border: 1px solid var(--rahmen); border-radius: 6px; min-width: 16rem; }
.lw-menue[hidden] { display: none; }
.lw-editor { display: grid; grid-template-columns: minmax(16rem, 2fr) 3fr; grid-template-areas: "oben oben" "links rechts"; gap: .6rem; }
.lw-oben { grid-area: oben; overflow-x: auto; }
.lw-links { grid-area: links; min-width: 0; }
.lw-rechts { grid-area: rechts; min-width: 0; }
.lw-halte { max-height: 55vh; overflow: auto; }
.lw-halte table { width: 100%; }
.lw-halte tr { cursor: pointer; }
.lw-halte tr.gewaehlt { background: rgba(241, 196, 15, .3); }
.lw-knoepfe { margin: .4rem 0; line-height: 2.1; }
.lw-dialog:not(:empty) { border: 1px solid var(--rahmen); border-radius: 8px; padding: .4rem .7rem; margin: .4rem 0; }
canvas.lw-grafik { display: block; cursor: pointer; }
@media (max-width: 700px) {
  .lw-editor { grid-template-columns: 1fr; grid-template-areas: "oben" "rechts" "links"; }
  .lw-halte { max-height: none; }
}
button.marke { border-radius: 999px; padding: .15rem .7rem; }
/* Beta-1.29: Übersicht-Werkzeuge in zwei Zeilen; Weg-Knöpfe des Linienweg-Editors unter der Karte */
.werkzeugzeile { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .3rem 0; }
.lw-ganz { margin: .4rem 0 0; padding-top: .4rem; border-top: 1px solid rgba(127, 127, 127, .3); line-height: 2.1; }
.lw-quellen { font-size: .85em; opacity: .8; }

/* Beta-1.36: Ladeanzeige bei OSM (P14), ★ für das Vorschaubild, Rückfrage „auch ans Fahrzeug?“ (P17) */
progress.osm-laden { width: 10em; vertical-align: middle; }
.vorschaustern { font-size: 1.2em; padding: 0 .4em; }
.auchfahrzeug img { width: 64px; height: 64px; object-fit: cover; vertical-align: middle; border-radius: 4px; }

/* Beta-1.44: Linie aus OpenStreetMap */
.osm-marke { display: inline-block; border-radius: 999px; padding: .05rem .55rem; background: #d7f0da; color: #1e4d2b; font-weight: 700; font-size: .85em; }
.osm-marke.teil { background: #fff1c7; }

/* Beta-1.48: Popup der Karte aller Fahrten (Linie anklicken) */
.kartenpopup { position: fixed; z-index: 40; max-width: min(24rem, 90vw); background: var(--grund); color: var(--text);
  border: 1px solid var(--rahmen); border-radius: 8px; padding: .5rem .7rem; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.kartenpopup button { margin-top: .4rem; }

/* Beta-1.53: „Aus OSM holen“ – ein Block je Relation */
.osm-relation { border: 1px solid var(--rand, #8884); border-radius: 6px; padding: 6px 8px; margin: 6px 0; }
.osm-relation.beste { border-color: var(--akzent, #6a5acd); }
.osm-relation .klein { font-size: 0.85em; opacity: 0.85; margin: 2px 0; }

/* Beta-1.53: Bild im Vollbild mit Zoom */
.vollbild { position: fixed; inset: 0; z-index: 1000; background: #000; display: flex; flex-direction: column; }
.vollbild-flaeche { flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center; touch-action: none;
  cursor: zoom-in; user-select: none; }
.vollbild-bild { max-width: 100%; max-height: 100%; transform-origin: center center; will-change: transform; }
.vollbild-unten { color: #ddd; padding: 6px 10px; display: flex; gap: 6px; align-items: center; background: #111; }
.vollbild-unten > span { flex: 1; }
.ansichtbild { cursor: zoom-in; }
.ansichtfelder a.verweis { color: var(--akzent); text-decoration: underline; cursor: pointer; }

/* gamma-005: Zugteil-Baukasten – Zugleiste; ein Triebzug zeigt seine verbundenen Teile */
.zugleiste { display: flex; flex-wrap: wrap; gap: .5em; padding: .6em; border: 1px solid var(--rand, #8886); border-radius: 8px; }
.zugleiste .baustein { display: flex; flex-direction: row; align-items: stretch; gap: 0; padding: 0; background: none; border: none; }
.zugleiste .baustein .kasten { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 4.6em;
  min-height: 3.4em; padding: .2em .4em; border: 1px solid var(--rand, #8886); border-radius: 6px; background: var(--flaeche, #8881); }
.zugleiste .baustein.mehrteilig .kasten + .kasten { margin-left: .35em; box-shadow: -0.35em 0 0 -0.12em var(--rand, #8886); }
.zugleiste .baustein small { opacity: .8; }
.zugleiste .baustein .kasten .typ { font-size: .85em; } /* gamma-021: Typenbezeichnung */
.zugleiste .baustein.offen .kasten { border-style: dashed; }
.zugleiste .baustein.fehlerhaft .kasten { border-color: #c0392b; }
.zugleiste .baustein.gewaehlt .kasten { outline: 3px solid var(--akzent, #7a5cff); outline-offset: -1px; }
.zugleiste .baustein.plus { min-width: 2.6em; font-size: 1.3em; border: 1px dashed var(--rand, #8886); border-radius: 6px; }
.baukasten .feldname { display: inline-block; min-width: 11em; }
.baukasten .uicteile { display: flex; flex-wrap: wrap; gap: .4em; }
.baukasten .uicteil { display: flex; flex-direction: column; align-items: center; min-width: 5.2em; padding: .2em .5em;
  border: 1px solid var(--rand, #8886); border-radius: 6px; }
.baukasten .uicteil strong { font-family: ui-monospace, monospace; font-size: 1.1em; }
.baukasten .uicteil small { opacity: .75; }
.mehrzeilig { white-space: pre-line; }

/* gamma-006: gruppierte Fahrzeugtabelle (Fahrzeugtyp, darunter Baureihe) und Ansicht der Zusammenstellung */
tr.gruppe td { font-weight: 600; cursor: pointer; background: var(--flaeche2, #8881); }
tr.gruppe.ebene1 td { padding-left: 2em; font-weight: 500; }
tr.gruppe .gruppenzahl { font-weight: 400; opacity: .75; }
tr.in-gruppe td:first-child { padding-left: 3.6em; }
.ansicht .zugleiste { margin: .6em 0; }
.ansicht textarea { width: 100%; box-sizing: border-box; }
.ansicht.websuche input { width: 100%; box-sizing: border-box; font-size: 1.05em; }

/* gamma-007: Bewertungsmanager, Kapitel-Listen der Manager, große Sterne */
.sterne { color: #e0a800; letter-spacing: .08em; white-space: nowrap; }
.sterne.gross { font-size: 2em; line-height: 1.2; margin: .2em 0; }
.sterne.gross small { font-size: .4em; color: inherit; opacity: .8; letter-spacing: 0; }
.sterne.klein { font-size: 1.15em; }
td.sterne, .sternspalte { font-size: 1.25em; }
.managerliste { display: flex; flex-direction: column; gap: .25em; max-width: 60em; }
.managerzeile { display: flex; justify-content: space-between; gap: 1em; text-align: left; }
.kriterium { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; margin: .3em 0; }
.kriterium .kriteriumname { min-width: 15em; }
.kriterium input[type=text] { flex: 1 1 14em; }
.kriteriengruppe { border: 1px solid var(--rand, #8886); border-radius: 8px; padding: .4em .8em; margin: .6em 0; }
.ausschluss { display: flex; flex-direction: column; gap: .2em; margin: .5em 0; }
button.gefahr { border-color: #c0392b; color: #c0392b; }

/* gamma-010: Tabellen der Baureihenliste (Vorschau, Einsendung) */
.tabellenrahmen {
  overflow: auto;
  max-height: 24rem;
}

/* gamma-014: Wertung je Kriterium mit fünf Sternen (ganz oder halb) */
.sternwahl { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sternwahl .stern { position: relative; display: inline-block; font-size: 1.7rem; line-height: 1; cursor: pointer; color: #999; user-select: none; }
.sternwahl .sternvoll { position: absolute; left: 0; top: 0; width: 0; overflow: hidden; color: #e0a000; pointer-events: none; }
.sternwahl .sternzahl { min-width: 3.2em; }

/* gamma-015: ⓘ an den Kriterien, Vorstellung über dem Spendenknopf */
button.infozeichen { border: none; background: none; padding: 0 .2em; font-size: 1.05em; color: var(--leise, #888); cursor: help; min-height: 0; }
.kriteriuminfo { flex-basis: 100%; }
.kriteriuminfo[hidden] { display: none; }
p.uebermich { max-width: 42em; }

/* gamma-015: Ablagefläche für das Server-Paket (Ziehen und Fallenlassen) */
.ablage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3em; text-align: center;
  min-height: 9em; margin: .6em 0; padding: 1.2em; border: 2px dashed var(--rahmen); border-radius: 14px;
  background: var(--flaeche); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.ablage:hover, .ablage:focus { border-color: var(--akzent); outline: none; }
.ablage .ablagezeichen { font-size: 2.2em; line-height: 1; color: var(--akzent); }
.ablage.drueber { border-style: solid; border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 12%, var(--flaeche));
  transform: scale(1.01); }
.ablage.laedt { cursor: progress; border-style: solid; border-color: var(--akzent); }
.ablage.laedt .ablagezeichen { animation: ablagePuls 1s ease-in-out infinite; }
.ablage.fertig { border-style: solid; border-color: #2e8b57; }
@keyframes ablagePuls { 50% { opacity: .35; } }

/* gamma-016: Fenster „Was ist neu?“ (Patchnotes) */
.patchnotes { position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, .45); display: flex;
  align-items: center; justify-content: center; padding: 1rem; }
.patchnotes-fenster { background: var(--grund, #fff); color: inherit; max-width: 36rem; width: 100%; max-height: 85vh;
  overflow: auto; border-radius: 8px; padding: 1rem 1.25rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); }
.patchnotes-fenster p { margin: .35rem 0; }

/* gamma-016: Fehlermeldungen in der Serververwaltung */
.fehlermeldung { border-top: 1px solid var(--rand, #8884); padding: .4rem 0; }
.fehlermeldung.erledigt { opacity: .6; }
.fehlermeldung p { margin: .2rem 0; }

/* gamma-020: zweite Knopfreihe beim Freischalten einer geplanten Fahrt */
.knopfreihe { margin-top: 0.5em; }

/* gamma-020: ⓘ neben einem Feld (z. B. Wagenreihung an der Zugnummer) */
button.info { padding: 0 0.4em; border-radius: 50%; min-width: 1.8em; }
pre.infotext { white-space: pre-wrap; font-family: inherit; margin: 0.4em 0; }

/* gamma-020: Abstellgleis- bzw. Papierkorb-Symbol neben „Stammdaten“ */
#reiter a.symbol { display: inline-flex; align-items: center; padding-left: .4em; padding-right: .4em; }

/* gamma-021: „nach oben“ und „nach unten“ übereinander */
.hochrunter { display: inline-flex; flex-direction: column; gap: 2px; vertical-align: middle; }
/* gamma-021: Nachschlagelisten */
.uiclisten button.klein, button.klein { font-size: .8em; padding: .1em .45em; }
table.uicliste th { text-align: left; padding-right: 1em; font-family: monospace; white-space: nowrap; }
/* gamma-021: Servertitel führt zur Startseite des Servers */
#titel[title] { cursor: pointer; }
button small.marke { display: block; font-size: .7em; opacity: .75; }

/* gamma-024: Vorstellung im öffentlichen Profil – Bilder auf dem Platz der ersten Kachel, der Text über die übrigen */
.vorstellung { display: grid; grid-template-columns: minmax(14em, 1fr) 3fr; gap: .8em; align-items: start; margin: .4rem 0 .8rem; }
.vorstellung.ohne-bilder { grid-template-columns: 1fr; }
.vorstellung-bilder { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.vorstellung-bild { max-width: 100%; max-height: 220px; border-radius: 10px; object-fit: cover; }
.vorstellung-punkte { flex-basis: 100%; text-align: center; letter-spacing: .2em; opacity: .7; }
.vorstellung-punkte .punkt.aktiv { opacity: 1; font-weight: bold; }
.vorstellung-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
@media (max-width: 640px) { .vorstellung { grid-template-columns: 1fr; } }
/* gamma-024: „Melden“ – kleines eingekreistes Ausrufezeichen */
button.melden { border-radius: 50%; width: 1.5em; height: 1.5em; padding: 0; font-weight: bold; font-size: .8em; line-height: 1.4em;
  margin-left: .5em; vertical-align: middle; opacity: .7; }
button.melden:hover { opacity: 1; }
.profilverwaltung summary { cursor: pointer; margin: .6em 0; font-weight: 600; }
.profilverwaltung textarea { width: 100%; }
.profilbilder { display: flex; flex-wrap: wrap; gap: 10px; }
.profilbild { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.profilbild img { width: 140px; height: 105px; object-fit: cover; border-radius: 8px; }
ol.profilkacheln li { display: flex; align-items: center; justify-content: space-between; gap: .6em; }
ul.moderation li.erledigt { opacity: .6; }
/* gamma-030: Moderationseinträge untereinander statt als gequetschte Flex-Zeile */
ul.moderation li { display: block; padding: .6rem 0; }
ul.moderation li > * { margin: .25rem 0; }
ul.moderation .feldknoepfe { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
ul.moderation textarea { width: 100%; max-width: 40em; box-sizing: border-box; vertical-align: top; }
/* gamma-025: SEV und „Historische Fahrt“ nebeneinander ganz oben im Fahrt-Formular */
div.nebeneinander { display: flex; gap: 1.5em; flex-wrap: wrap; align-items: center; }

/* gamma-030: Meldungen im Kopf, Verlauf je Nutzer */
#meldungslink.meldungen { background: var(--warnung, #c0392b); color: #fff; border-radius: 999px; padding: .1em .7em; font-weight: bold; text-decoration: none; }
ul.verlaufliste { margin: .3rem 0 .6rem 1.2rem; padding: 0; }
ul.verlaufliste li { display: list-item; border: 0; padding: .1rem 0; }
div.verlauf:empty { display: none; }

/* gamma-030: Kontakte */
.freundescode { font-family: monospace; font-size: 1.15em; letter-spacing: .08em; }
ul.kontaktliste li, ul.kontakteingang li { display: block; padding: .5rem 0; }
ul.kontakteingang li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; }
.sichtwahl { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
ol.rangliste { margin: .3rem 0 .6rem 1.4rem; }

/* gamma-031: Bewertungsverzeichnis */
ul.verzeichnis li { display: block; padding: .3rem 0; }
ul.verzeichnis ul { margin: .3rem 0 .3rem 1.2rem; padding: 0; }
ul.verzeichnis ul li { border: 0; padding: .15rem 0; }

/* gamma-058: aufklappbare Wagenliste eines Fahrzeugs */
table.wagenliste { width: auto; font-size: .9em; margin: .3em 0; }
table.wagenliste th, table.wagenliste td { padding: .15em .7em .15em 0; white-space: nowrap; }

/* gamma-070: Regionen des Linienkatalogs */
.auswahlgitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.2rem 1rem; margin: 0.5rem 0; }
