/* Pendel-Check — Optik nach dem Mockup (2026-10-12): hell und ruhig,
   Linien in ihren Farben, Status immer als Wort plus Zeichen. */
:root {
  --grund: #f2f4f7; --karte: #ffffff; --rand: #dde3ea; --linie: #e8ecf0;
  --text: #10202e; --leise: #55636f; --feld: #b8c2cc; --knopf-rand: #c9d1da;
  --blau: #0b5cad; --blau-dunkel: #083f78; --blau-hell: #eef4fb; --blau-zart: #e7eef7;
  --ok: #155d2f; --ok-grund: #e4f4e9;
  --warn: #7a4300; --warn-grund: #fff1db; --warn-rand: #f0c98a;
  --schlecht: #8f1d16; --schlecht-grund: #fde8e6; --rot: #a8201a;
  --neutral: #3c4954; --neutral-grund: #eef1f4;
  --schatten: 0 1px 3px rgba(16, 32, 46, .18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #0f1720; --karte: #18232f; --rand: #2a3846; --linie: #243240;
    --text: #e8eef4; --leise: #9fb0bf; --feld: #4a5b6b; --knopf-rand: #3a4b5b;
    --blau: #4d9be6; --blau-dunkel: #8cc0f2; --blau-hell: #16304a; --blau-zart: #1a3550;
    --ok: #7fd49a; --ok-grund: #173323;
    --warn: #f4c27a; --warn-grund: #3a2a12; --warn-rand: #6b4a1a;
    --schlecht: #ff9d94; --schlecht-grund: #3d1a18; --rot: #ff8a80;
    --neutral: #c3cfda; --neutral-grund: #223140;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums; touch-action: manipulation;
}
a { color: var(--blau); }
a:hover { color: var(--blau-dunkel); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
.klein { font-size: 14px; color: var(--leise); }
.leise { color: var(--leise); }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Grundgerüst */
.huelle { max-width: 640px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.kopf { padding: calc(16px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kopf .marke-klein { font-size: 13px; font-weight: 600; color: var(--blau); letter-spacing: .02em; }
.kopf h1 { font-size: 26px; font-weight: 700; }
.kopf-zurueck { padding: calc(10px + env(safe-area-inset-top)) 8px 6px; display: flex; align-items: center; gap: 4px; }
.kopf-zurueck h1 { font-size: 18px; }
.inhalt { flex: 1; padding: 4px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.nav { position: sticky; bottom: 0; display: flex; border-top: 1px solid var(--rand); background: var(--karte); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 5; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; text-decoration: none; color: var(--leise); font-size: 12px; font-weight: 500; position: relative; }
.nav a[aria-current="page"] { color: var(--blau); font-weight: 700; }
.nav .zahl { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--rot); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: flex; align-items: center; justify-content: center; }

/* ---------- Bausteine */
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 16px; }
.karte-pad { padding: 14px 16px; }
.liste > * + * { border-top: 1px solid var(--linie); }
.zeile { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 48px; }
.zeile .wachsen { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.titel-abschnitt { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--leise); margin: 6px 4px 0; }
.ueberschrift { font-size: 15px; font-weight: 700; margin: 6px 4px 0; }
.ln { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 24px; padding: 0 6px; border-radius: 6px; color: #fff; font-weight: 700; font-size: 13px; background: #3c4954; white-space: nowrap; }
.linien { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pfeil { width: 14px; height: 14px; color: var(--leise); flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill svg { width: 16px; height: 16px; flex: none; }
.ok { background: var(--ok-grund); color: var(--ok); }
.warn { background: var(--warn-grund); color: var(--warn); }
.schlecht { background: var(--schlecht-grund); color: var(--schlecht); }
.neutral { background: var(--neutral-grund); color: var(--neutral); }
.kasten { padding: 10px 12px; border-radius: 10px; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.kasten svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.kasten > div { white-space: pre-line; }
.hinweis { padding: 12px 14px; border-radius: 12px; font-size: 15px; margin: 0; }
.hinweis-fehler { background: var(--schlecht-grund); color: var(--schlecht); }
.hinweis-info { background: var(--blau-hell); color: var(--text); border: 1px solid var(--rand); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--knopf-rand); background: var(--karte); font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text); }
.btn:hover { border-color: var(--leise); color: var(--text); }
.btn-haupt { background: var(--blau); border-color: var(--blau); color: #fff; min-height: 52px; font-size: 17px; }
.btn-haupt:hover { background: var(--blau-dunkel); color: #fff; }
.btn-klein { min-height: 40px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-gefahr { color: var(--rot); background: transparent; border-color: transparent; }
.btn-gefahr:hover { color: var(--rot); background: var(--schlecht-grund); border-color: transparent; }
.btn-link { color: var(--blau); }
.btn[disabled] { opacity: .55; cursor: default; }
.knopf-reihe { display: flex; gap: 10px; flex-wrap: wrap; }
.knopf-reihe > .btn { flex: 1 1 160px; }
.knopf-stapel { display: flex; flex-direction: column; gap: 8px; }
.icon-knopf { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--rand); background: var(--karte); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); flex: none; text-decoration: none; }
.icon-knopf.ohne-rand { border-color: transparent; background: transparent; }
.icon-knopf svg { width: 20px; height: 20px; }
.gestrichelt { min-height: 48px; border-radius: 14px; border: 1.5px dashed var(--feld); display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--blau); font-weight: 600; font-size: 15px; background: transparent; cursor: pointer; width: 100%; }
.gestrichelt svg { width: 18px; height: 18px; }

/* Schalter */
.schalter { position: relative; width: 52px; height: 32px; border-radius: 999px; border: 0; cursor: pointer; flex: none; background: var(--feld); padding: 0; }
.schalter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.schalter[aria-checked="true"] { background: var(--blau); }
.schalter[aria-checked="true"]::after { left: 23px; }

/* Formulare */
.feld, input[type=email], input[type=text], input[type=date], input[type=time], input[type=search] {
  height: 48px; border-radius: 12px; border: 1px solid var(--feld); padding: 0 14px; font-size: 16px; background: var(--karte); width: 100%; min-width: 0;
}
input:focus-visible, button:focus-visible, a:focus-visible, .schalter:focus-visible { outline: 3px solid color-mix(in srgb, var(--blau) 55%, transparent); outline-offset: 2px; }
label.feldname { font-size: 15px; font-weight: 600; }
.chips { display: grid; gap: 6px; }
.chip { min-height: 44px; min-width: 0; padding: 0 8px; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; border: 1px solid var(--knopf-rand); background: var(--karte); }
.chip[aria-pressed="true"] { background: var(--blau); border-color: var(--blau); color: #fff; }
.umschalter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--neutral-grund); }
.umschalter button { min-height: 44px; border-radius: 10px; border: 0; font-size: 15px; font-weight: 600; cursor: pointer; background: transparent; color: var(--neutral); }
.umschalter button[aria-pressed="true"] { background: var(--karte); color: var(--text); box-shadow: var(--schatten); }
.wahl { display: grid; grid-template-columns: 24px 1fr; gap: 2px 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--knopf-rand); background: var(--karte); text-align: left; cursor: pointer; width: 100%; }
.wahl[aria-pressed="true"] { border: 2px solid var(--blau); background: var(--blau-hell); padding: 11px; }
.punkt { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--leise); grid-row: span 2; margin-top: 1px; }
[aria-pressed="true"] > .punkt { border: 6px solid var(--blau); }
.vorschlaege { list-style: none; margin: 0; padding: 0; }
.vorschlaege button { width: 100%; text-align: left; padding: 10px 6px; border: 0; background: transparent; font-size: 15px; cursor: pointer; border-bottom: 1px solid var(--linie); min-height: 44px; }
.vorschlaege button:hover { background: var(--blau-hell); }
.vorschlaege li:last-child button { border-bottom: 0; }

/* ---------- Heute */
.fahrkarte { display: flex; flex-direction: column; text-decoration: none; color: inherit; overflow: hidden; }
.fahrkarte.ist-warn { border-color: var(--warn-rand); }
.fahrkarte.ist-schlecht { border-color: color-mix(in srgb, var(--rot) 45%, var(--rand)); }
.fahrkarte .oben { padding: 14px 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fahrkarte .name { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fahrkarte .zeit { padding: 8px 16px 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fahrkarte .gross { font-size: 34px; font-weight: 700; line-height: 1.1; }
.fahrkarte .mittel { font-size: 24px; font-weight: 700; }
.fahrkarte .gross.warn, .fahrkarte .gross.schlecht { background: none; }
.fahrkarte .alt { font-size: 16px; text-decoration: line-through; color: var(--leise); }
.fahrkarte .wann { margin-left: auto; font-size: 14px; color: var(--leise); }
.fahrkarte .strecke { padding: 2px 16px 0; font-size: 15px; }
.fahrkarte .linien { padding: 10px 16px 0; }
.fahrkarte .kaesten { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.fahrkarte .kaesten:empty { padding: 0 0 14px; }
.text-warn { color: var(--warn); }
.text-schlecht { color: var(--schlecht); }
.text-ok { color: var(--ok); }
.meldung { display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; width: 100%; font-size: inherit; color: inherit; }
.meldung .titel { font-size: 15px; font-weight: 600; }
.meldung .volltext { font-size: 14px; white-space: pre-line; margin: 0; }

/* ---------- Fahrt-Detail */
.verlauf { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; }
.verlauf li { display: grid; grid-template-columns: 58px 20px 1fr; column-gap: 8px; }
.verlauf .zeiten { display: flex; flex-direction: column; align-items: flex-end; }
.verlauf .zeiten strong { font-size: 17px; }
.verlauf .zeiten s { font-size: 13px; color: var(--leise); }
.verlauf .bahn { display: flex; flex-direction: column; align-items: center; }
.verlauf .ring { width: 14px; height: 14px; border-radius: 50%; border: 3px solid currentColor; background: var(--karte); margin-top: 4px; flex: none; }
.verlauf .ring.voll { background: currentColor; }
.verlauf .strich { flex: 1; width: 4px; background: currentColor; min-height: 54px; }
.verlauf .halt { padding-bottom: 14px; }
.verlauf .halt strong, .verlauf .ort strong { font-size: 16px; display: block; }
.verlauf .umstieg { margin: 6px 0 10px; }
.verlauf .gepunktet { width: 0; border-left: 3px dotted var(--leise); min-height: 40px; margin: 0 auto; }
.alt-zeile { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 16px; align-items: center; }
.alt-zeile.unsere { background: var(--blau-hell); }

/* ---------- Anmeldung */
.anmelden { max-width: 440px; margin: 0 auto; padding: calc(56px + env(safe-area-inset-top)) 24px 32px; display: flex; flex-direction: column; gap: 20px; }
.anmelden .marke { display: flex; flex-direction: column; gap: 14px; }
.anmelden .zeichen { width: 64px; height: 64px; border-radius: 16px; }
.anmelden h1 { font-size: 30px; }
.anmelden h2 { font-size: 24px; }
.anmelden p { margin: 0; }
.anmelden .unterzeile { font-size: 17px; color: var(--leise); }
.formular { display: flex; flex-direction: column; gap: 12px; }
.karte.formular { padding: 16px; }
.code-feld { font-size: 28px !important; letter-spacing: .3em; text-align: center; font-weight: 700; height: 60px !important; }
.zeile-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; font-size: 15px; }
.inline { display: inline; }
.link-knopf { border: 0; background: none; padding: 0; color: var(--blau); text-decoration: underline; cursor: pointer; font-size: 15px; }
.ios-tipp { padding: 14px 16px; font-size: 14px; }

/* ---------- Dialog und Meldung */
.schleier { position: fixed; inset: 0; background: rgba(8, 16, 24, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 20; padding: 16px; }
@media (min-width: 600px) { .schleier { align-items: center; } }
.dialog { background: var(--karte); border-radius: 18px; width: 100%; max-width: 440px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.dialog h2 { font-size: 19px; }
.dialog p { margin: 0; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--grund); padding: 12px 16px; border-radius: 12px; font-size: 15px; z-index: 30; max-width: calc(100% - 32px); box-shadow: var(--schatten); white-space: pre-line; }
.laedt { padding: 40px 16px; text-align: center; color: var(--leise); }
.leer { padding: 24px 16px; text-align: center; color: var(--leise); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.fuss { padding: 8px 16px 16px; font-size: 12px; color: var(--leise); text-align: center; }
