/* Ruhiges, neutrales Design: grosse Schrift, starker Kontrast, mobil zuerst. */
:root {
  --hg: #f4f5f7;
  --karte: #ffffff;
  --text: #15181d;
  --leise: #4b5563;
  --rand: #d4d8de;
  --akzent: #1f4e5f;
  --akzent-text: #ffffff;
  --dran: #0f7a3d;
  --dran-hg: #e3f6ea;
  --bald: #8a4b00;
  --bald-hg: #fff1d6;
  --warn: #9b1c1c;
  --warn-hg: #fde8e8;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--hg);
  color: var(--text);
  font: 18px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
main { max-width: 560px; margin: 0 auto; padding: 16px 16px 32px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--akzent); }
button, input, select { font: inherit; }
.versteckt { display: none !important; }

.kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.standort { font-size: 1.6rem; font-weight: 800; }
.unterzeile { color: var(--leise); font-size: 1rem; }

.sprachen { display: flex; gap: 4px; flex-shrink: 0; }
.sprachen button {
  border: 2px solid var(--rand); background: var(--karte); color: var(--text);
  border-radius: 10px; padding: 6px 10px; min-height: 44px; min-width: 44px; font-weight: 700; cursor: pointer;
}
.sprachen button[aria-pressed="true"] { border-color: var(--akzent); background: var(--akzent); color: var(--akzent-text); }

.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.zentriert { text-align: center; }
.etikett { font-size: 1.05rem; font-weight: 700; color: var(--leise); text-transform: uppercase; letter-spacing: .03em; }
.riesig { font-size: clamp(4.5rem, 26vw, 8rem); font-weight: 900; line-height: 1; margin: 6px 0; font-variant-numeric: tabular-nums; }
.mittel { font-size: 1.6rem; font-weight: 800; }
.gross { font-size: 2.6rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.liste { font-size: 1.6rem; font-weight: 800; word-spacing: .6em; font-variant-numeric: tabular-nums; }

.meldung { border-radius: var(--radius); padding: 18px; margin-bottom: 14px; font-size: 1.25rem; font-weight: 700; border: 3px solid transparent; }
.meldung.dran { background: var(--dran-hg); color: var(--dran); border-color: var(--dran); font-size: 1.5rem; }
.meldung.bald { background: var(--bald-hg); color: var(--bald); border-color: var(--bald); }
.meldung.warn { background: var(--warn-hg); color: var(--warn); border-color: var(--warn); }
.meldung.info { background: var(--karte); border-color: var(--rand); font-weight: 600; }

body.zustand-dran { background: var(--dran-hg); }
body.zustand-bald { background: var(--bald-hg); }

.knopf {
  display: block; width: 100%; min-height: 56px; border: 0; border-radius: var(--radius);
  background: var(--akzent); color: var(--akzent-text); font-size: 1.25rem; font-weight: 800; padding: 12px 16px; cursor: pointer;
}
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.knopf.zweit { background: var(--karte); color: var(--text); border: 2px solid var(--rand); }
.knopf.klein { min-height: 48px; font-size: 1.05rem; }
.knopf.gefahr { background: var(--karte); color: var(--warn); border: 2px solid var(--warn); }
.reihe { display: flex; gap: 10px; }
.reihe > * { flex: 1; }

textarea {
  width: 100%; border: 2px solid var(--rand); border-radius: 10px; padding: 8px 10px; font-size: 1rem;
  background: #fff; color: var(--text); margin-bottom: 12px; resize: vertical;
}
#texte-felder label { font-size: .95rem; margin-bottom: 4px; }
input[type="number"], input[type="password"], input[type="time"], input[type="text"] {
  width: 100%; min-height: 56px; border: 2px solid var(--rand); border-radius: var(--radius);
  padding: 10px 14px; font-size: 1.5rem; background: #fff; color: var(--text);
}
input:focus-visible, button:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
.fehler { color: var(--warn); font-weight: 700; margin-top: 8px; }

.status-zeile { color: var(--leise); font-size: .95rem; text-align: center; margin: 8px 0; }
.schalter { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.schalter input { width: 26px; height: 26px; }

footer { color: var(--leise); font-size: .9rem; text-align: center; margin-top: 24px; }
footer a { color: var(--leise); }

/* ---------- Admin ---------- */
.admin main { max-width: 720px; }
.schieber {
  position: relative; height: 128px; border-radius: var(--radius); background: var(--dran); color: #fff;
  touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden;
}
.schieber.gesperrt { opacity: .45; }
.schieber-text {
  position: absolute; inset: 0; padding-left: 130px; padding-right: 12px; display: flex; flex-direction: column;
  justify-content: center; font-size: 1.9rem; font-weight: 900; line-height: 1.15; pointer-events: none;
}
.schieber-text small { font-size: 1.05rem; font-weight: 700; opacity: .95; }
.schieber-knopf {
  position: absolute; left: 8px; top: 8px; width: 112px; height: 112px; border: 0; border-radius: 12px;
  background: #fff; color: var(--dran); font-size: 3rem; font-weight: 900; cursor: grab; touch-action: none;
  transition: transform .25s ease;
}
.schieber-knopf.zieht { transition: none; cursor: grabbing; }
.schieber-knopf:disabled { cursor: not-allowed; }
.kennzahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kennzahl { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 10px; text-align: center; }
.kennzahl b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.kennzahl span { color: var(--leise); font-size: .9rem; }
.protokoll { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.protokoll li { padding: 6px 0; border-bottom: 1px solid var(--rand); display: flex; gap: 10px; }
.protokoll time { color: var(--leise); font-variant-numeric: tabular-nums; min-width: 4.2em; }
.zahlwahl { display: flex; align-items: center; gap: 10px; }
.zahlwahl button { width: 56px; min-height: 56px; font-size: 1.8rem; font-weight: 800; border-radius: var(--radius); border: 2px solid var(--rand); background: #fff; cursor: pointer; }
.zahlwahl output { font-size: 2rem; font-weight: 900; min-width: 2.5em; text-align: center; }
details summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; }

/* ---------- Bildschirm am Eingang ---------- */
body.anzeige { background: #0f1720; color: #fff; overflow: hidden; }
.anzeige-raster { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3vw; height: 100vh; padding: 3vw; }
.anzeige .etikett { color: #b8c4d0; font-size: 2.6vw; }
.anzeige-standort { font-size: 3.4vw; font-weight: 900; margin-bottom: 1.5vw; }
.anzeige .riesig { font-size: 22vw; }
.anzeige .liste { font-size: 5vw; }
.anzeige .qr-feld { background: #fff; color: #111; border-radius: 2vw; padding: 2vw; text-align: center; align-self: center; }
.anzeige .qr-feld img { width: 100%; height: auto; display: block; }
.anzeige .qr-feld p { font-size: 1.8vw; font-weight: 700; margin: 1vw 0 0; }
.anzeige .meldung { font-size: 3vw; }
.anzeige .status-zeile { color: #8796a5; font-size: 1.3vw; }
@media (max-width: 800px) {
  body.anzeige { overflow: auto; }
  .anzeige-raster { grid-template-columns: 1fr; height: auto; }
  .anzeige .etikett { font-size: 1.2rem; }
  .anzeige .riesig { font-size: 30vw; }
  .anzeige .liste { font-size: 2rem; }
  .anzeige .qr-feld p, .anzeige .meldung { font-size: 1.2rem; }
  .anzeige .status-zeile { font-size: .9rem; }
}

.uebergabe-qr { width: 100%; max-width: 320px; height: auto; display: block; margin: 8px auto; image-rendering: pixelated; }
.uebergabe-qr.abgelaufen { opacity: .12; }

/* ---------- Superadmin ---------- */
select { width: 100%; min-height: 48px; border: 2px solid var(--rand); border-radius: 10px; padding: 8px 10px; font-size: 1rem; background: #fff; }
details label { margin-top: 10px; }
.geheim { font-family: ui-monospace, Menlo, monospace; font-size: 1.1rem; word-break: break-all; background: #fff; border-radius: 8px; padding: 8px 10px; color: var(--text); }
a.knopf.download { display: block; text-align: center; text-decoration: none; margin-top: 8px; }
.status-text { font-weight: 700; }
