/* Gemeinsame Gestaltung. Freundliches Blau als Grundton, weiße runde Flächen auf hellblauem Grund, kein Grau, kein Schwarz. Eine Schrift.
   Grün passt und live, Bernstein Mensch prüft, Rot Hochrisiko und abgefangen.
   Keine Verläufe, keine Leuchteffekte, keine Versalien. */
:root {
  --halle: #e9efff;        /* Seitengrund, hellblau */
  --blau: #2f5bff;         /* Grundton, Kopfleiste, Icons, Knöpfe */
  --blau-tief: #2146d6;
  --blau-hell: #dbe5ff;
  --emaille: #ffffff;      /* Blätter und Karten */
  --platte: #dbe5ff;
  --ruhe: #dbe5ff;
  --loch: #aebcf0;
  --linie: #d3ddf8;        /* Linien, hellblau */
  --anthrazit: #16205a;    /* Schrift, Nachtblau */
  --schiefer: #16205a;
  --grau: #46528f;         /* Nebentext, blau statt grau */
  --leise: #2f5bff;
  --reseda: #0c9a5f;       /* passt, live */
  --reseda-hell: #e2f3ea;
  --signalgelb: #ffc634;   /* Mensch prüft */
  --gelb-hell: #ffc634;
  --ocker: #16205a;
  --rot: #e23d4b;          /* Hochrisiko, abgefangen, schweres Lieferrisiko */
  --rot-hell: #e23d4b;
  --din: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 20px;
  --kopf-h: 96px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--halle); color: var(--anthrazit); font-family: var(--text); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signalgelb); outline-offset: 3px; }
.zahl { font-family: var(--din); font-variant-numeric: tabular-nums; }
.din { font-family: var(--din); }
.ico { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
kbd { font-family: var(--text); }

/* ---------- Kopfleiste der Bühnenseiten ---------- */
.kopf {
  height: var(--kopf-h); flex: none; background: var(--blau); color: #fff;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 40px; align-items: center; padding: 0 32px;
}
/* Jede Anwendung steht für sich. Links der Weg zur Startseite und der Name, kein Wechsel zwischen den Anwendungen. */
.app { display: flex; align-items: center; gap: 18px; }
.app b { font-family: var(--din); font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.015em; white-space: nowrap; }
.heim { width: 50px; height: 50px; border-radius: 15px; background: #fff; color: var(--blau); display: grid; place-items: center; font-size: 30px; flex: none; }
.heim:hover { background: var(--blau-hell); }

/* Dezente Kostenzeile, auf jeder Seite an derselben Stelle in der Fußzeile */
.kosten { font-size: 15px; color: var(--grau); white-space: nowrap; margin-left: auto; }
.kosten b { font-family: var(--din); font-weight: 700; color: var(--anthrazit); font-variant-numeric: tabular-nums; }

.typenschild {
  display: flex; align-items: center; gap: 8px; justify-self: center; width: 100%; max-width: 1180px;
  background: #fff; color: var(--anthrazit); border: 3px solid #fff; border-radius: 18px; padding: 5px 5px 5px 22px;
}
.typenschild > .ico { font-size: 28px; color: var(--grau); margin-right: 6px; }
.typenschild input { flex: 1; border: 0; background: transparent; font-size: 26px; padding: 9px 0 10px; min-width: 0; letter-spacing: -.005em; }
.typenschild input::placeholder { color: #6672a8; }
.typenschild input:focus { outline: none; }
.typenschild:focus-within { border-color: var(--signalgelb); }

.knopf {
  background: var(--blau); color: #fff; border: 1.5px solid var(--blau); border-radius: 12px;
  font-family: var(--din); font-size: 20px; font-weight: 600; line-height: 1.2; padding: 12px 22px 13px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
}
.knopf:hover { background: var(--blau-tief); border-color: var(--blau-tief); }
.knopf.leise { background: var(--blau-hell); color: var(--blau-tief); border-color: var(--blau-hell); }
.knopf.leise:hover { background: #c8d6ff; border-color: #c8d6ff; }
.knopf:disabled { opacity: .5; cursor: default; }

/* Laufbalken unter der Kopfleiste, nur während Jev gefragt wird */
.lauf { height: 6px; flex: none; overflow: hidden; margin-top: -6px; position: relative; z-index: 2; }
.lauf i { display: block; height: 100%; width: 22%; background: var(--signalgelb); transform: translateX(-100%); }
body.laeuft .lauf i { animation: lauf 0.9s linear infinite; }
@keyframes lauf { from { transform: translateX(-100%); } to { transform: translateX(455%); } }

/* ---------- Modus ---------- */
.modus {
  font-family: var(--din); font-size: 18px; font-weight: 600; line-height: 1.2; border: 2px solid #fff; border-radius: 999px;
  padding: 10px 18px 11px 14px; background: var(--emaille); color: var(--anthrazit); cursor: pointer; display: inline-flex; gap: 9px; align-items: center; white-space: nowrap;
}
.modus .ico { font-size: 22px; }
.modus[data-modus="live"] .ico { color: var(--reseda); }
.modus[data-modus="ohne"] { background: var(--rot); border-color: var(--rot); color: #fff; }

/* ---------- Tafel rechts (Radar) ---------- */
.tafel {
  background: var(--emaille); border-radius: 24px;
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.tafel > section { padding: 20px 24px; border-bottom: 1px solid var(--linie); }
.tafel > section:last-child { border-bottom: 0; }
.tafel h2 { font-family: var(--text); font-weight: 400; font-size: 16px; line-height: 1.25; color: var(--grau); margin: 0 0 10px; }
.herkunft { font-size: 15px; color: var(--grau); display: flex; gap: 7px; align-items: center; margin-top: 10px; }
.herkunft .ico { font-size: 18px; }
.herkunft.live .ico { color: var(--reseda); }

.tasten { font-size: 15px; color: var(--anthrazit); display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.tasten button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.tasten button:hover { color: var(--blau-tief); text-decoration: underline; }
.tasten kbd { font-size: 13px; font-weight: 700; background: var(--emaille); border-radius: 7px; padding: 3px 8px; margin-right: 7px; color: var(--blau-tief); }

/* ---------- Meldung über der Wand oder Karte ---------- */
.meldung[hidden] { display: none; }
.meldung {
  position: absolute; left: 0; right: 0; top: 0; z-index: 6;
  background: var(--emaille); border: 3px solid var(--blau); border-radius: 24px;
  padding: 26px 34px; display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
}
.meldung > .ico { font-size: 72px; }
.meldung strong { font-family: var(--din); font-weight: 700; font-size: 42px; line-height: 1.1; letter-spacing: -.015em; display: block; }
.meldung p { margin: 8px 0 0; font-size: 22px; line-height: 1.35; max-width: 62ch; }
.meldung .mass { font-family: var(--din); text-align: right; line-height: 1; }
.meldung .mass b { font-size: 96px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.meldung .mass span { display: block; font-size: 18px; color: var(--grau); margin-top: 6px; }
.meldung.rot { background: var(--rot); border-color: var(--rot); color: #fff; }
.meldung.rot .mass span { color: #fff; }

/* ---------- QR-Code ---------- */
.overlay { position: fixed; inset: 0; background: var(--blau); display: none; place-items: center; z-index: 20; }
.overlay.an { display: grid; }
.qr-karte { background: var(--emaille); border-radius: 28px; padding: 52px 64px; display: grid; grid-template-columns: auto 540px; gap: 60px; align-items: center; max-width: 1280px; }
.qr-karte h2 { font-family: var(--din); font-weight: 700; font-size: 68px; line-height: 1.02; letter-spacing: -.025em; margin: 0 0 22px; }
.qr-karte p { font-size: 26px; line-height: 1.35; margin: 0 0 30px; }
.qr-karte .url { font-family: var(--din); font-weight: 600; font-size: 30px; border-top: 1px solid var(--linie); padding-top: 20px; overflow-wrap: anywhere; }
.qr-karte .url small { display: block; font-family: var(--text); font-weight: 400; font-size: 16px; color: var(--grau); margin-bottom: 2px; }
#qr svg, #qr img { width: 460px; height: 460px; display: block; }

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