/* ============================================================
   Bimmelbahn-Anzeige
   Gelesen wird das draußen, im Dunkeln, mit kalten Händen,
   im Vorbeigehen. Also: dunkler Grund, sehr große Zahl,
   eine Aussage pro Bildschirm.
   ============================================================ */

:root {
  --grund:    #140F0C;
  --flaeche:  #1E1713;
  --linie:    #332821;
  --schrift:  #FBF6F1;
  --leise:    #A4907F;
  --gruen:    #4ADE80;
  --gelb:     #FBBF24;
  --rot:      #F87171;
  --gold:     #D9A441;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--grund);
  color: var(--schrift);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Kopf ---------- */
.kopf {
  display: flex; align-items: center; gap: 10px;
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px;
  border-bottom: 1px solid var(--linie);
}
.logo {
  width: 34px; height: 34px; border-radius: 6px; flex: none;
  /* Das Wappen ist dunkel auf weiss - fuer den dunklen Grund invertiert. */
  filter: invert(1) grayscale(1) contrast(1.15);
  mix-blend-mode: screen; opacity: .92;
}
.marke {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700; font-size: 1.1rem; letter-spacing: .01em;
  color: var(--gold);
}
.anlass { font-size: .8rem; color: var(--leise); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Statusfläche ---------- */
.status {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  position: relative;
}
.status::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 45% at 50% 18%, var(--schein), transparent 70%);
  opacity: .5;
}
.status > * { position: relative; }
.status.ist-da { --schein: rgba(74,222,128,.22); }
.status.kommt  { --schein: rgba(251,191,36,.18); }
.status.weg    { --schein: rgba(248,113,113,.12); }
.status.still  { --schein: rgba(164,144,127,.10); }

.hier {
  margin: 0 0 26px; font-size: .85rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--leise);
}
.hier strong { color: var(--schrift); font-weight: 700; }

.zahl {
  margin: 0; font-weight: 800; letter-spacing: -.05em;
  font-size: clamp(5.5rem, 34vw, 11rem); line-height: .85;
  font-variant-numeric: tabular-nums;
}
.einheit {
  display: block; font-size: .2em; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--leise); margin-top: .5em;
}
.ist-da .zahl, .ist-da .gross { color: var(--gruen); }
.kommt .zahl { color: var(--gelb); }
.weg .zahl   { color: var(--rot); }

.gross {
  margin: 18px 0 0; font-weight: 700;
  font-size: clamp(1.5rem, 7vw, 2.1rem); line-height: 1.15;
  letter-spacing: -.02em; text-wrap: balance;
}
.dazu {
  margin: 16px auto 0; max-width: 30ch;
  font-size: 1rem; color: var(--leise);
}
.alter {
  margin: 30px 0 0; font-size: .75rem; color: var(--leise);
  letter-spacing: .04em;
}

.wechsel {
  display: inline-block; margin: 26px auto 0;
  padding: 13px 20px; border: 1px solid var(--linie); border-radius: 10px;
  color: var(--leise); text-decoration: none; font-size: .9rem; font-weight: 600;
}
.wechsel:active { background: var(--flaeche); }

/* ---------- Haltestellen-Auswahl ---------- */
.wahl {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  gap: 12px; text-align: center;
}
.wahl h1 { margin: 0; font-size: 1.7rem; letter-spacing: -.02em; }
.hinweis { margin: 0 auto 14px; max-width: 32ch; color: var(--leise); }
.wahl-knopf {
  display: block; padding: 22px; border-radius: 12px;
  background: var(--flaeche); border: 1px solid var(--linie);
  color: var(--schrift); text-decoration: none;
  font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em;
}
.wahl-knopf:active { border-color: var(--gold); }

/* ---------- Fahrer ---------- */
.fahrer {
  flex: 1; display: flex; flex-direction: column;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  gap: 18px;
}
.quittung {
  margin: 0; padding: 13px 16px; border-radius: 10px;
  background: rgba(74,222,128,.10); border: 1px solid rgba(74,222,128,.35);
  color: #BBF7D0; font-size: .95rem;
}
.riesen {
  width: 100%; min-height: 42vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--gold); color: #1A1206; border: 0; border-radius: 16px;
  font: inherit; cursor: pointer; padding: 24px;
}
.riesen:active { transform: scale(.985); }
.riesen-klein {
  font-size: .95rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  opacity: .75;
}
.riesen-gross {
  font-size: clamp(2rem, 11vw, 3rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.05; text-align: center;
}
.lage {
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 12px; padding: 16px 18px;
}
.lage p { margin: 0 0 6px; font-size: .95rem; color: var(--leise); }
.lage p:last-child { margin-bottom: 0; }
.lage strong { color: var(--schrift); }
.klein {
  width: 100%; padding: 14px; border-radius: 10px;
  background: transparent; border: 1px solid var(--linie);
  color: var(--leise); font: inherit; font-size: .9rem; cursor: pointer;
}
.erklaerung { margin: 0; font-size: .85rem; color: var(--leise); max-width: 38ch; }

/* ---------- Fuß ---------- */
.fuss {
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--linie);
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--leise); text-align: center;
}

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

/* Abmelden — selten gebraucht, soll den grossen Knopf nicht stoeren. */
.abmelden { margin: 26px 0 0; }
.abmelden button {
  width: 100%; font: inherit; font-size: .85rem; cursor: pointer;
  background: transparent; color: var(--leise);
  border: 1px solid var(--linie); border-radius: 8px; padding: 11px;
}
.abmelden button:active { background: var(--flaeche); }


/* ---------------------------------------------------------------
   Tafel: eine Seite, beide Haltestellen.
   Gelesen wird im Dunkeln, im Gehen, mit Handschuhen — deshalb
   grosse Zahlen und viel Abstand statt feiner Typografie.
   --------------------------------------------------------------- */
.tafel {
  max-width: 560px; margin: 0 auto;
  padding: 22px 18px calc(26px + env(safe-area-inset-bottom));
}
.tafel-frage {
  margin: 0 0 18px; text-align: center;
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--leise);
}
.halt {
  position: relative; overflow: hidden;
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 16px; padding: 26px 22px; margin: 0 0 14px;
  text-align: center;
}
.halt::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, var(--schein, transparent), transparent 70%);
  pointer-events: none;
}
.halt > * { position: relative; }
.halt.ist-da { --schein: rgba(74,222,128,.22); border-color: rgba(74,222,128,.45); }
.halt.kommt  { --schein: rgba(251,191,36,.16); }
.halt.weg    { --schein: rgba(248,113,113,.10); }
.halt.still  { --schein: rgba(164,144,127,.08); }

.halt-name {
  margin: 0 0 12px; font-size: .95rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--leise);
}
.halt.ist-da .halt-name { color: var(--schrift); }

.halt-zahl {
  margin: 0; font-family: Georgia, "Iowan Old Style", serif;
  font-size: clamp(3.4rem, 17vw, 5rem); font-weight: 800; line-height: .95;
  letter-spacing: -.02em;
}
.ist-da .halt-zahl, .ist-da .halt-wort { color: var(--gruen); }
.kommt .halt-zahl { color: var(--gelb); }
.weg   .halt-zahl { color: var(--rot); }
.still .halt-wort { color: var(--leise); }

.halt-einheit {
  display: block; margin-top: .55em;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: .2em; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--leise);
}
.halt-wort {
  margin: 0; font-family: Georgia, "Iowan Old Style", serif;
  font-size: clamp(1.7rem, 8vw, 2.4rem); font-weight: 800; line-height: 1.1;
}
.halt-dazu {
  margin: 12px 0 0; font-size: .95rem; color: var(--leise); line-height: 1.45;
}
.tafel-fuss {
  margin: 22px 0 0; text-align: center;
  font-size: .82rem; line-height: 1.6; color: var(--leise);
}
