/* Fides — Oberflaeche
   Farbwelt aus dem Materialthema: Graphit mit Violettstich, Messing als warmer
   Metallakzent, Stahlblau als kuehler Gegenpol, Rost fuer "faellig".
   Ein Akzent traegt die Seite: der Verschmutzungsbalken. Alles andere bleibt ruhig. */

:root {
  --tinte:        #14111A;
  --flaeche:      #1E1926;
  --flaeche-hoch: #2A2333;
  --linie:        #332B3F;
  --text:         #EDE7F2;
  --leise:        #968CA3;
  --messing:      #C9A253;
  --stahl:        #7E93A3;
  --rost:         #C4614A;
  --gruen:        #5FA37E;

  --r:      12px;
  --spur:   -0.011em;
  --sicher-unten: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

/* Ohne color-scheme rendert der Browser Kaestchen, Datumsfelder und
   Auswahlpfeile hellgrau — mitten in einer dunklen Oberflaeche. */
:root { color-scheme: dark; }

html, body {
  margin: 0; padding: 0;
  background: var(--tinte);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: var(--spur);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 1.32rem; }
h2 { font-size: 1.12rem; }
h3 { font-size: 0.97rem; }
p  { margin: 0 0 0.7em; }

.versteckt { display: none !important; }
.leise { color: var(--leise); font-size: 0.88rem; }
.fehler { color: var(--rost); font-size: 0.88rem; min-height: 1.3em; }

:focus-visible { outline: 2px solid var(--messing); outline-offset: 2px; border-radius: 4px; }

/* --- Sperrbildschirm ------------------------------------------------- */
.sperre {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: var(--tinte);
  padding: 24px;
}
.sperre-inhalt { width: 100%; max-width: 280px; text-align: center; }
.marke {
  font-size: 1.6rem; font-weight: 600; letter-spacing: 0.18em;
  color: var(--messing); margin-bottom: 6px;
}
.pin-feld {
  width: 100%; margin: 18px 0 12px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r);
  color: var(--text); font-size: 1.6rem; text-align: center; letter-spacing: 0.4em;
  padding: 14px 10px;
}
.pin-feld::placeholder { color: var(--linie); letter-spacing: 0.4em; }

/* --- Grundgeruest ----------------------------------------------------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }

.kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: max(14px, env(safe-area-inset-top)) 18px 12px;
  --breite: 640px;
  background: color-mix(in srgb, var(--tinte) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linie);
}
.kopf > * { max-width: 100%; }
.kopf-knopf {
  background: none; border: 0; color: var(--leise);
  font-size: 1.05rem; cursor: pointer; padding: 6px 8px; line-height: 1;
}
.kopf-knopf:hover { color: var(--text); }

.inhalt {
  flex: 1; width: 100%; max-width: 640px; margin: 0 auto;
  padding: 16px 18px calc(96px + var(--sicher-unten));
}

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  max-width: 640px; margin: 0 auto;
  background: color-mix(in srgb, var(--tinte) 94%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--linie);
  padding-bottom: var(--sicher-unten);
}
.nav-el {
  background: none; border: 0; cursor: pointer;
  color: var(--leise); font-size: 0.66rem; font-family: inherit;
  padding: 9px 2px 10px; display: flex; flex-direction: column;
  align-items: center; gap: 3px; letter-spacing: 0;
}
.nav-zeichen { font-size: 1.02rem; line-height: 1; }
.nav-el.aktiv { color: var(--messing); }

/* --- Bausteine --------------------------------------------------------- */
.knopf {
  background: var(--flaeche-hoch); color: var(--text);
  border: 1px solid var(--linie); border-radius: var(--r);
  font: inherit; font-size: 0.92rem; padding: 10px 16px; cursor: pointer;
}
.knopf:hover { border-color: var(--stahl); }
.knopf.gross { width: 100%; padding: 14px; font-size: 1rem; }
.knopf.messing { background: var(--messing); color: #241B08; border-color: var(--messing); font-weight: 600; }
.knopf.messing:hover { filter: brightness(1.08); }
.knopf.still { background: none; color: var(--leise); }
.knopf.gefahr { color: var(--rost); background: none; }
.knopf-reihe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.knopf-reihe .knopf { flex: 1; min-width: 120px; }

.gruppe { margin-bottom: 26px; }
.gruppe-kopf {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.gruppe-kopf h2 { font-size: 0.95rem; color: var(--leise); font-weight: 500; letter-spacing: 0; }

/* Ansage: das grosse Statement auf der Startseite */
.ansage {
  border-left: 2px solid var(--messing);
  padding: 2px 0 2px 16px; margin-bottom: 26px;
}
.ansage .zahl { font-size: 2.5rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.ansage .satz { font-size: 1.05rem; margin-top: 2px; }
.ansage.ruhig { border-left-color: var(--gruen); }
.ansage.warn  { border-left-color: var(--rost); }

/* Liste mit Haarlinien statt lauter gleicher Kacheln */
.liste { border-top: 1px solid var(--linie); }
.zeile {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 2px; border-bottom: 1px solid var(--linie);
  cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%; text-align: left; color: inherit; font: inherit;
  position: relative;
}
.zeile:hover { background: var(--flaeche); }
.zeile.markiert::before {
  content: ""; position: absolute; left: -8px; top: 12px; bottom: 12px;
  width: 2px; background: var(--messing); border-radius: 2px;
}
.zeile-text { flex: 1; min-width: 0; }
.zeile-titel { font-weight: 500; }
.zeile-unter { color: var(--leise); font-size: 0.82rem; margin-top: 1px; }
.zeile-rechts { color: var(--leise); font-size: 0.8rem; text-align: right; white-space: nowrap; }

.miniatur {
  width: 46px; height: 46px; border-radius: 9px; flex: none;
  object-fit: cover; background: var(--flaeche-hoch);
  display: grid; place-items: center; color: var(--linie); font-size: 1.1rem;
}

/* Der Verschmutzungsbalken — der eine Akzent, den die App traegt */
.messer { height: 3px; background: var(--linie); border-radius: 2px; overflow: hidden; margin-top: 7px; }
.messer > i {
  display: block; height: 100%; width: 0; border-radius: 2px;
  background: var(--stahl);
  transition: width 620ms cubic-bezier(.22,.8,.28,1);
}
.messer.bald      > i { background: var(--messing); }
.messer.faellig   > i { background: var(--rost); }
.messer.ueberfaellig > i { background: var(--rost); box-shadow: 0 0 9px color-mix(in srgb, var(--rost) 70%, transparent); }

.marker {
  display: inline-block; font-size: 0.72rem; padding: 2px 7px;
  border-radius: 99px; border: 1px solid var(--linie); color: var(--leise);
}
.marker.faellig, .marker.ueberfaellig { color: var(--rost); border-color: color-mix(in srgb, var(--rost) 45%, transparent); }
.marker.bald { color: var(--messing); border-color: color-mix(in srgb, var(--messing) 45%, transparent); }
.marker.sauber { color: var(--gruen); border-color: color-mix(in srgb, var(--gruen) 40%, transparent); }

.kachel {
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--r); padding: 15px;
}
.timer { display: flex; align-items: baseline; gap: 10px; }
.timer .zahl { font-size: 2.1rem; font-weight: 600; letter-spacing: -0.03em; }

.leer { color: var(--leise); padding: 26px 0; text-align: center; font-size: 0.9rem; }
.leer b { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }

/* --- Formulare --------------------------------------------------------- */
label { display: block; font-size: 0.8rem; color: var(--leise); margin: 14px 0 5px; }
input, select, textarea {
  width: 100%; background: var(--flaeche); color: var(--text);
  border: 1px solid var(--linie); border-radius: 10px;
  font: inherit; font-size: 0.95rem; padding: 11px 12px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
textarea.lang { min-height: 300px; font-size: 0.88rem; }
input[type="checkbox"] { width: auto; }
.paar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.paar label { margin-top: 14px; }

.stufen { display: flex; gap: 6px; }
.stufen button {
  flex: 1; background: var(--flaeche); border: 1px solid var(--linie);
  color: var(--leise); border-radius: 9px; padding: 10px 0; font: inherit; cursor: pointer;
}
.stufen button.an { background: var(--flaeche-hoch); color: var(--messing); border-color: var(--messing); }

.wahl {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--linie);
}
.wahl input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--messing); flex: none; }
.wahl select { width: auto; flex: none; max-width: 46%; font-size: 0.83rem; padding: 7px 8px; }
.wahl span { flex: 1; min-width: 0; font-size: 0.92rem; }

/* --- Blatt (Ausklappflaeche) ------------------------------------------ */
.blatt { position: fixed; inset: 0; z-index: 50; }
.blatt-schatten { position: absolute; inset: 0; background: rgba(6, 4, 10, 0.66); }
.blatt-inhalt {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--tinte);
  border-top: 1px solid var(--linie);
  border-radius: 18px 18px 0 0;
  animation: hoch 260ms cubic-bezier(.22,.8,.28,1);
}
@keyframes hoch { from { transform: translateY(22px); opacity: 0; } }
.blatt-griff { width: 38px; height: 4px; background: var(--linie); border-radius: 2px; margin: 9px auto 2px; }
.blatt-kopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 18px 10px; border-bottom: 1px solid var(--linie);
}
.blatt-koerper {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 18px calc(24px + var(--sicher-unten));
}
@media (min-width: 700px) {
  .blatt-inhalt { left: 50%; transform: translateX(-50%); width: 620px; border-radius: 18px; bottom: 4vh; max-height: 88dvh; }
  @keyframes hoch { from { transform: translate(-50%, 22px); opacity: 0; } }
}

.detail-bild { width: 100%; border-radius: var(--r); margin-bottom: 14px; display: block; }
.fakten { border-top: 1px solid var(--linie); margin: 14px 0; }
.fakt { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--linie); font-size: 0.9rem; }
.fakt span:first-child { color: var(--leise); }
.fakt span:last-child { text-align: right; }

.toast {
  position: fixed; left: 50%; bottom: calc(84px + var(--sicher-unten));
  transform: translate(-50%, 14px); z-index: 70;
  background: var(--flaeche-hoch); border: 1px solid var(--linie);
  border-radius: 99px; padding: 9px 17px; font-size: 0.88rem;
  opacity: 0; pointer-events: none; transition: opacity 200ms, transform 200ms;
}
.toast.an { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* Auf breiten Fenstern laufen Kopfzeile und Inhalt auf derselben Spur. */
@media (min-width: 680px) {
  .kopf { padding-left: calc(50% - 320px + 18px); padding-right: calc(50% - 320px + 18px); }
  .nav { border-left: 1px solid var(--linie); border-right: 1px solid var(--linie); }
}

.kopf-knopf svg { display: block; }


/* --- Zweite Ausbaustufe ------------------------------------------------ */

/* Der Countdown ist auf den Käfig-Seiten das, was sonst die Ansage ist. */
.countdown {
  border-left: 2px solid var(--messing);
  padding: 4px 0 4px 16px;
  margin-bottom: 24px;
}
.uhr {
  font-size: 2.4rem; font-weight: 600; letter-spacing: -0.035em;
  line-height: 1.1; margin: 2px 0 10px;
  font-variant-numeric: tabular-nums;
}

/* Ein Zahlencode wird abgelesen und abgetippt: weit gesperrt, tabellarisch. */
.code {
  font-size: 2rem; font-weight: 600; letter-spacing: 0.22em;
  font-variant-numeric: tabular-nums;
  color: var(--messing); margin: 6px 0 4px;
  user-select: all; -webkit-user-select: all;
}
.code.klein { font-size: 1.05rem; letter-spacing: 0.16em; margin: 5px 0 0; }
.code-karte { border-color: color-mix(in srgb, var(--messing) 40%, var(--linie)); }

.kachel + .kachel, .kachel + .gruppe, .gruppe + .kachel { margin-top: 14px; }
.kachel.hinweis {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px; text-align: left;
}
.kachel.hinweis .leise { font-size: 0.82rem; }
.kachel.breit {
  width: 100%; font: inherit; color: inherit; cursor: pointer;
}
.kachel.warn { border-color: color-mix(in srgb, var(--rost) 45%, var(--linie)); }
.pfeil { color: var(--leise); font-size: 1.2rem; flex: none; }

.anfrage { margin-bottom: 12px; }
.anfrage-titel { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0 6px; }

/* Die Notöffnung steht bewusst abgesetzt am Ende der Seite: erreichbar,
   aber nicht versehentlich zu treffen. */
.notfall {
  margin-top: 34px; padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--rost) 35%, var(--linie));
}
.notfall h3 { color: var(--rost); margin-bottom: 6px; }
.warntext { color: var(--rost); }

.verlauf {
  display: flex; align-items: flex-end; gap: 2px;
  height: 52px; margin-top: 10px;
}
.verlauf i {
  flex: 1; min-width: 2px; border-radius: 2px 2px 0 0;
  background: var(--stahl); opacity: 0.75;
}
.verlauf i.gut      { background: var(--gruen); }
.verlauf i.schlecht { background: var(--rost); }
.verlauf i.ab       { background: var(--linie); }

.wahl-zeile {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-size: 0.92rem; margin: 16px 0 4px;
}
.wahl-zeile input[type="checkbox"] {
  width: 20px; height: 20px; accent-color: var(--messing); flex: none;
}

.knopf.klein { padding: 4px 10px; font-size: 0.82rem; }
.knopf.breit { width: 100%; }
.stufen button[data-tag] { font-size: 0.82rem; }

/* Hilfsklassen statt style-Attributen: die Content-Security-Policy erlaubt keine
   inline gesetzten Stile, und aufweichen wollen wir sie dafür nicht. */
.oben { margin: 0 0 18px; }
.mt-s { margin-top: 7px; }
.mt-m { margin-top: 14px; }
.mt-l { margin-top: 22px; }
.mb-m { margin-bottom: 12px; }
.mb-l { margin-bottom: 20px; }
.ml-s { margin-left: 8px; }
textarea.niedrig { min-height: 70px; }
textarea.mittel  { min-height: 92px; }
textarea.gross   { min-height: 155px; }
.zeile.statisch { cursor: default; }
.zeile.statisch:hover { background: none; }
.wahl label.inline { margin: 0; color: var(--text); font-size: 0.92rem; }
/* Bei wenigen erfassten Tagen sollen die Balken nicht zu Klötzen werden. */
.verlauf i { max-width: 18px; }

/* Passwörter sind länger als eine PIN — hier ohne Sperrung und linksbündig. */
.pin-feld.breit-feld {
  font-size: 1.05rem; letter-spacing: normal; text-align: left;
  padding: 13px 14px; margin: 10px 0 0;
}
.pin-feld.breit-feld::placeholder { letter-spacing: normal; color: var(--leise); }
.wahl-zeile span .leise { font-size: 0.79rem; margin-top: 1px; }

/* --- Übersichtsseiten -------------------------------------------------- */

/* Kennzahlen: drei Spalten, Wert oben, Bezeichnung darunter. Keine Kästen —
   die Zahlen sollen als Reihe lesbar sein, nicht als Kachelteppich. */
.zahlen {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px 12px; margin: 4px 0 6px;
}
.zahlen.zwei { grid-template-columns: repeat(2, 1fr); }
.zahl-wert {
  font-size: 1.45rem; font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.15; font-variant-numeric: tabular-nums;
}
.zahl-wert.klein { font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; }
.zahl-zusatz { font-size: 0.78rem; font-weight: 400; color: var(--leise); margin-left: 2px; }
.zahl-label { font-size: 0.74rem; color: var(--leise); line-height: 1.25; margin-top: 2px; }

/* Hinweiszeilen oben auf der Seite: nur ein Randstrich, kein voller Kasten. */
.notiz {
  border-left: 2px solid var(--stahl);
  padding: 8px 0 8px 13px; margin-bottom: 10px;
  font-size: 0.9rem;
}
.notiz.warn { border-left-color: var(--rost); }
.notiz.hinweis { border-left-color: var(--messing); }

.kachel .gruppe-kopf { margin-bottom: 8px; }
.kachel .zahlen { margin-top: 10px; }
.kachel .fakten { margin: 12px 0 4px; }

/* --- Profile ------------------------------------------------------------ */

.kopf { gap: 10px; }
.kopf h1 { flex: 1; min-width: 0; }
.avatar-knopf { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; }

/* Ohne Bild trägt der Kreis die Anfangsbuchstaben — nie ein leerer Platzhalter. */
.avatar {
  display: inline-grid; place-items: center; overflow: hidden;
  width: 64px; height: 64px; border-radius: 50%; flex: none;
  background: var(--flaeche-hoch); border: 1px solid var(--linie);
  color: var(--messing); font-weight: 600; font-size: 1.35rem;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.avatar.klein { width: 30px; height: 30px; font-size: 0.76rem; }
.avatar.gross { width: 96px; height: 96px; font-size: 2rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.profil-kopf {
  display: flex; align-items: center; gap: 15px;
  padding: 4px 0 16px; border-bottom: 1px solid var(--linie); margin-bottom: 4px;
}
.profil-kopf .namen { min-width: 0; }
.profil-name { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; }
.profil-rolle { color: var(--leise); font-size: 0.85rem; margin-top: 1px; }

.profil-kopf.ohne-linie { border-bottom: 0; padding-bottom: 4px; }

/* --- Am Bildschirm: Seitenspalte statt Fußleiste ------------------------ */

.nav-text { line-height: 1.2; }
.marke-spalte { display: none; }

@media (min-width: 900px) {
  :root { --spalte: 232px; }

  /* Die Fußleiste wird zur Spalte. Dasselbe Element, andere Anordnung —
     die Ansichten selbst wissen davon nichts. */
  .nav {
    top: 0; bottom: 0; right: auto; left: 0;
    width: var(--spalte); max-width: none; margin: 0;
    display: flex; flex-direction: column; gap: 2px;
    padding: 26px 14px calc(20px + var(--sicher-unten));
    border-top: 0; border-right: 1px solid var(--linie);
    background: var(--tinte); backdrop-filter: none;
    overflow-y: auto;
  }
  .marke-spalte {
    display: block; padding: 0 10px 22px;
    font-size: 1.05rem; font-weight: 600; letter-spacing: 0.2em;
    color: var(--messing);
  }
  .nav-el {
    flex-direction: row; align-items: center; justify-content: flex-start;
    gap: 12px; padding: 10px 12px; border-radius: 10px;
    font-size: 0.92rem; text-align: left;
  }
  /* Der Unterschied zwischen „Maus liegt darüber" und „hier bin ich" muss auf
     einen Blick lesbar sein — sonst sehen zwei Einträge gleich aus. */
  .nav-el { position: relative; }
  .nav-el:hover { background: var(--flaeche); color: var(--text); }
  .nav-el.aktiv { background: var(--flaeche-hoch); color: var(--messing); font-weight: 500; }
  .nav-el.aktiv::before {
    content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px;
    width: 3px; border-radius: 0 2px 2px 0; background: var(--messing);
  }
  .nav-zeichen { font-size: 0.95rem; width: 18px; text-align: center; }

  .kopf {
    padding-left: calc(var(--spalte) + 34px);
    padding-right: 34px;
    padding-top: 20px; padding-bottom: 16px;
  }
  .kopf h1 { font-size: 1.5rem; }
  .inhalt {
    max-width: none; margin: 0;
    padding: 22px 34px 60px calc(var(--spalte) + 34px);
  }
  /* Der Lesetext bleibt schmal, auch wenn das Fenster breit ist. */
  .inhalt > * { max-width: 760px; }

  .zahlen { grid-template-columns: repeat(5, 1fr); }
  .zahlen.zwei { grid-template-columns: repeat(2, minmax(0, 260px)); }
  .zeile { padding: 15px 4px; }
  .blatt-inhalt { width: 700px; }
  .blatt-koerper { padding: 8px 26px 30px; }

  .toast { bottom: 26px; left: calc(50% + var(--spalte) / 2); }
}

/* Sehr breite Fenster: Inhalt mittig statt an der Spalte klebend. */
@media (min-width: 1280px) {
  .kopf, .inhalt { padding-left: calc(var(--spalte) + (100vw - var(--spalte) - 760px) / 2); }
  .toast { left: calc(var(--spalte) + (100vw - var(--spalte)) / 2); }
}

/* --- Feinschliff für den Bildschirm ------------------------------------- */

@media (min-width: 700px) {
  /* Auf dem Handy schiebt sich das Blatt von unten herein, am Bildschirm ist es
     ein Dialog in der Mitte — der Ziehgriff wäre dort ohne Funktion. */
  .blatt-griff { display: none; }
  .blatt-inhalt {
    top: 50%; bottom: auto;
    transform: translate(-50%, -50%);
    max-height: 86dvh; border-radius: 16px;
  }
  @keyframes hoch { from { transform: translate(-50%, calc(-50% + 16px)); opacity: 0; } }
  .blatt-kopf { padding-top: 18px; }
}

@media (min-width: 900px) {
  /* Der Dialog gehört über den Inhalt, nicht über die Seitenspalte. */
  .blatt-inhalt { left: calc(50% + var(--spalte) / 2); }

  /* Knöpfe nehmen nur so viel Platz, wie ihre Beschriftung braucht.
     Über die volle Breite gezogen sehen sie am Bildschirm nach Formular aus. */
  .knopf-reihe .knopf { flex: 0 0 auto; min-width: 0; }
  .knopf-reihe .knopf.breit, .knopf-reihe .knopf.gross { flex: 1 1 auto; }
  .blatt-koerper .knopf-reihe .knopf { min-width: 130px; }

  /* Der Verschmutzungsbalken bleibt ein Balken und wird keine Unterstreichung. */
  .zeile-text .messer { max-width: 340px; }

  .kopf h1 { letter-spacing: -0.03em; }
  .gruppe { margin-bottom: 32px; }
}

@media (min-width: 1280px) {
  .kopf { padding-right: calc((100vw - var(--spalte) - 760px) / 2); }
}

/* Dreierwahl mit längeren Beschriftungen braucht mehr Luft als Zahlen. */
.stufen.drei button { font-size: 0.83rem; padding: 11px 4px; line-height: 1.25; }
.pflicht {
  color: var(--messing); font-size: 0.72rem; margin-left: 6px;
  text-transform: none; letter-spacing: 0;
}

.pin-feld.code-feld { letter-spacing: 0.3em; font-size: 1.35rem; margin-bottom: 12px; }
#passkey-knopf { margin-top: 10px; }

/* Befehle zum Abtippen: schmal, mit Abstand, aber ohne eigene Kastenoptik. */
.befehl {
  background: var(--tinte); border: 1px solid var(--linie); border-radius: 8px;
  padding: 10px 12px; margin: 8px 0 0; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem; color: var(--stahl); white-space: pre;
}
