/* ============================================================================
   travdo Rundgang · Fundament
   Tokens, Grundlagen und die gemeinsamen Bausteine. Maßstab sind die
   iOS-Systemapps: hellgrauer, gruppierter Grund, weiße eingerückte Gruppen,
   Haarlinien, Systemschrift und ein einziges Akzentblau.
   Logo und Markenfarben stehen in marke.css, die Bildschirme in ihren
   eigenen Dateien.
   ========================================================================== */

/* ---------------------------------------------------------------- Tokens -- */
/* :root ist hell. Dunkel gilt mit [data-theme="dark"] oder, ohne eigene Wahl,
   nach prefers-color-scheme. Beide Dunkel-Blöcke tragen dieselben Werte. */
:root {
  /* Abstände, Formen, Maße */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px;
  --rand: 10px;                /* Seitenrand der Gruppen */
  --r-xs: 8px; --r-sm: 12px; --r-xl: 20px; --r-full: 999px;
  --r-gruppe: 12px; --r-haupt: 14px; --r-bild: 10px;
  --tap: 56px;
  --bar: 56px;
  --maxw: 720px;
  --ease: cubic-bezier(.22, .8, .3, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --netz-h: 0px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Flächen und Schrift, hell */
  --bg: #f2f5f7;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --surface-3: #e3e7eb;
  --line: #d5d9de;
  --line-2: #c4c9cf;
  --ink: #111418;
  --ink-2: #5c6370;
  --ink-3: #5c6370;
  --bad: #c62d25;
  --scrim: rgba(0, 0, 0, .32);
  --sh-blatt: 0 -2px 16px rgba(0, 0, 0, .12);
  --sh-dialog: 0 12px 40px rgba(0, 0, 0, .2);
  --toast-grund: #1d2125;
  --photo-bg: #e3e7eb;

  /* Warnung und Gefahr als Fläche: Pegel zu leise, laufende Aufnahme, Meldung. */
  --warn: #d6a022;
  --warn-schrift: #8a6100;
  --bad-flaeche: #c43b2e;
  /* Erfolg als Fläche (Meldung „gut“), weiße Schrift: 5,8 : 1. */
  --ok-flaeche: #23743a;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --line: #38383a;
  --line-2: #48484a;
  --ink: #f5f5f7;
  --ink-2: #a1a1aa;
  --ink-3: #aeaeb2;
  --bad: #ff6b61;
  --scrim: rgba(0, 0, 0, .56);
  --sh-blatt: 0 -2px 16px rgba(0, 0, 0, .5);
  --sh-dialog: 0 12px 40px rgba(0, 0, 0, .6);
  --toast-grund: #3a3a3c;
  --photo-bg: #2c2c2e;
  --warn-schrift: #e0b44a;
  --ok-flaeche: #2f7d1c;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --surface-3: #3a3a3c;
    --line: #38383a;
    --line-2: #48484a;
    --ink: #f5f5f7;
    --ink-2: #a1a1aa;
    --ink-3: #aeaeb2;
    --bad: #ff6b61;
    --scrim: rgba(0, 0, 0, .56);
    --sh-blatt: 0 -2px 16px rgba(0, 0, 0, .5);
    --sh-dialog: 0 12px 40px rgba(0, 0, 0, .6);
    --toast-grund: #3a3a3c;
    --photo-bg: #2c2c2e;
    --warn-schrift: #e0b44a;
    --ok-flaeche: #2f7d1c;
    color-scheme: dark;
  }
}

/* ----------------------------------------------------------- Grundlagen -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-synthesis: none; }
html, body { margin: 0; }
/* iPhone und iPad: Die Wurzel folgt der Systemschrift (Dynamic Type), 17 px
   bei „Groß“. -webkit-touch-callout gibt es nur dort; Safari auf dem Mac
   kennt -apple-system-body auch, setzte damit aber 13 px und behält so 16 px. */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) { html { font: -apple-system-body; } }
body {
  min-height: 100vh; min-height: 100svh;
  font-family: var(--schrift);
  font-size: 1.0625rem; line-height: 1.294; font-weight: 400;
  color: var(--ink); background: var(--bg);
  caret-color: var(--brand); accent-color: var(--brand);
  overscroll-behavior-y: contain;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
img { display: block; max-width: 100%; }
svg { flex: none; }
[hidden] { display: none !important; }
::selection { background: var(--brand-weich); color: var(--ink); }

:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-xs);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.noscript-kasten { margin: 40px var(--rand); }

/* Bewusst KEIN Flex-Container: Inhalte mit negativen Seitenrändern zwängen
   in einem Flex-Kontext die ganze Seite breiter als den Bildschirm. */
.buehne { min-height: 100vh; min-height: 100svh; }

/* ---------------------------------------------------------------- Leiste -- */
/* Drei Spalten: Die Seiten sind so breit wie ihr Inhalt und teilen sich den
   übrigen Platz gleich, damit der Titel mittig steht, solange Raum ist. Nur
   der Titel gibt nach und endet mit „…“; Zurück und die Knöpfe rechts werden
   nie gequetscht. */
.appbar {
  position: sticky; top: 0; z-index: 60;
  display: grid; align-items: center; gap: var(--s2);
  grid-template-columns: minmax(max-content, 1fr) minmax(0, max-content) minmax(max-content, 1fr);
  height: calc(var(--bar) + var(--safe-t));
  padding: var(--safe-t) var(--s1) 0;
  background: var(--bg);
  /* Die Haarlinie erscheint erst, wenn Inhalt unter der Leiste läuft
     (`.gescrollt`, gesetzt von leistenStand() in ui.js). */
  border-bottom: 1px solid transparent;
}
.appbar.gescrollt { border-bottom-color: var(--line); }
@media (min-width: 768px) {
  /* An der Inhaltsspalte ausgerichtet: „Häuser“ und „Abschließen“ stehen an
     ihren Kanten, nicht am Fensterrand. */
  .appbar { padding-inline: max(var(--s1), calc((100% - var(--maxw)) / 2)); }
}
.appbar > :first-child { justify-self: start; }
.appbar-titel {
  min-width: 0; text-align: center;
  font-size: 1.0625rem; line-height: 1.294; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Der große Titel, klein in der Leiste: erst sichtbar, wenn er oben
   hinausgescrollt ist. Titel aus kopf() bleiben immer stehen. */
.appbar-titel.aus-grosstitel { opacity: 0; }
/* Erst nach dem ersten Bild blenden: Sonst blitzt der Titel beim Neuzeichnen auf. */
.appbar.bereit .appbar-titel.aus-grosstitel { transition: opacity .2s var(--ease); }
.appbar.gescrollt .appbar-titel.aus-grosstitel { opacity: 1; }
.appbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--s1); }
/* Wie in iOS sitzt der Zurück-Pfeil dicht am Rand und das Wort rechts endet
   kurz davor; die Tippfläche bleibt 56 px. */
.appbar-zurueck, .appbar-rechts {
  display: inline-flex; align-items: center; justify-content: center; gap: 0; flex: none;
  min-width: var(--tap); min-height: var(--tap); padding: 0 var(--s2);
  background: none; border: 0; border-radius: var(--r-xs);
  color: var(--brand); font-size: 1.0625rem; line-height: 1.294; font-weight: 400;
  white-space: nowrap;
}
.appbar-zurueck { padding-left: 0; }
/* Bei sehr großer Systemschrift kürzen die Wörter mit „…“, statt die Leiste
   über den Rand zu schieben. Bei normaler Größe greift die Grenze nie. */
.appbar-zurueck span { max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
.appbar-rechts {
  display: block; max-width: 40vw; line-height: var(--tap);
  overflow: hidden; text-overflow: ellipsis; text-align: right;
}
.appbar-zurueck:active, .appbar-rechts:active { opacity: .6; }
.appbar-rechts[disabled] { color: var(--ink-2); cursor: default; }
.appbar-logo {
  display: block; height: 28px; width: 96px; margin-left: var(--s2);
  background: var(--marke-logo) left center / contain no-repeat;
}

/* ------------------------------------------------------- Seite und Titel -- */
.seite { padding: 0 0 calc(var(--s7) + var(--safe-b)); }
@media (min-width: 768px) {
  .seite { max-width: var(--maxw); margin: 0 auto; }
}
.grosstitel { padding: var(--s2) var(--s4) var(--s4); }
.grosstitel h1 { font-size: 2.125rem; line-height: 1.206; font-weight: 700; letter-spacing: -.01em; }
.grosstitel p { margin-top: var(--s1); font-size: .9375rem; line-height: 1.333; color: var(--ink-2); }

/* ---------------------------------------------------------------- Gruppe -- */
.gruppe-kopf {
  margin: var(--s6) var(--s4) var(--s2);
  font-size: .9375rem; line-height: 1.333; font-weight: 600; color: var(--ink-2);
}
.gruppe {
  margin: 0 var(--rand); padding: 0; list-style: none;
  background: var(--surface); border-radius: var(--r-gruppe); overflow: hidden;
}
.gruppe + .gruppe { margin-top: var(--s4); }
.gruppe-fuss {
  margin: var(--s2) var(--s4) 0;
  font-size: .9375rem; line-height: 1.333; color: var(--ink-2);
}

/* ----------------------------------------------------------------- Zeile -- */
.zeile {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; min-height: 56px; margin: 0;
  padding: var(--s2) var(--s4);
  background: var(--surface); color: var(--ink);
  border: 0; text-align: left;
  -webkit-appearance: none; appearance: none;
}
:is(button, a).zeile:active { background: var(--surface-2); }
.zeile.foto { min-height: 88px; padding-left: var(--s2); }
.zeile-bild {
  flex: none; width: 72px; height: 72px; border-radius: var(--r-bild);
  object-fit: cover; background: var(--photo-bg);
}
.zeile-symbol {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center;
  color: var(--brand);
}
.zeile-text { flex: 1 1 auto; min-width: 0; display: block; }
.zeile-titel { display: block; font-size: 1.0625rem; line-height: 1.294; font-weight: 600; overflow-wrap: anywhere; }
.zeile-unter { display: block; margin-top: 2px; font-size: .9375rem; line-height: 1.333; color: var(--ink-2); }
.zeile-rechts {
  flex: none; display: inline-flex; align-items: center; gap: var(--s1);
  font-size: .9375rem; line-height: 1.333; color: var(--ink-2);
}
/* Haarlinie zwischen den Kindern einer Gruppe, links bündig mit dem Inhalt
   der Zeile wie im Entwurf. Als eigene Linie statt Rand, weil .zeile den Rand
   ihres Knopfs zurücksetzt. */
.gruppe > * + * { position: relative; }
.gruppe > * + *::before {
  content: ""; position: absolute; z-index: 1; top: 0; left: var(--s4); right: 0;
  border-top: 1px solid var(--line); pointer-events: none;
}
.gruppe > .foto + *::before, .gruppe > * + .foto::before { left: var(--s2); }
/* Der Fokusrahmen einer Zeile liegt innen: .gruppe schneidet ab, was über
   ihre Ecken hinausragt. */
.gruppe :is(button, a).zeile:focus-visible { outline-offset: -4px; }

/* --------------------------------------------------------------- Knöpfe -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 56px; padding: 0 var(--s5);
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-size: 1.0625rem; line-height: 1.294; font-weight: 600;
  text-align: center;
  -webkit-appearance: none; appearance: none;
}
.btn:active { opacity: .75; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-haupt {
  background: var(--brand-flaeche); color: #fff; font-weight: 700; border-radius: var(--r-haupt);
}
.btn-zweit {
  background: var(--surface); color: var(--brand); border-color: var(--line);
}
.btn-gefahr { background: var(--surface); color: var(--bad); border-color: var(--line); }
.btn-text {
  min-height: 56px; padding: 0 var(--s2);
  background: none; border-color: transparent; color: var(--brand); font-weight: 400;
}
.btn-block { display: flex; width: 100%; }
.btn-gross { min-height: 60px; }

.knopfleiste {
  position: sticky; bottom: 0; z-index: 50;
  display: grid; gap: var(--s2);
  padding: var(--s2) var(--rand) calc(var(--s2) + var(--safe-b));
  background: var(--bg); border-top: 1px solid transparent;
}
/* Die Haarlinie nur, solange Inhalt unter der Leiste liegt (leistenStand()). */
.knopfleiste.ueberdeckt { border-top-color: var(--line); }
/* Auf dem grauen Grund der Leiste trägt die weiße Fläche den Knopf allein,
   wie im Entwurf; in weißen Gruppen bleibt die Haarlinie. */
.knopfleiste .btn-zweit { border-color: transparent; }
@media (min-width: 768px) {
  .knopfleiste { width: 100%; max-width: var(--maxw); margin: 0 auto; }
}

/* ------------------------------------------------------------ Segmente -- */
.segmente {
  display: flex; gap: 2px; padding: 2px; margin: 0 var(--rand);
  background: var(--surface-2); border-radius: var(--r-sm);
}
.segmente button {
  flex: 1 1 0; min-width: 0; min-height: 56px; padding: 0 var(--s2);
  background: none; border: 0; border-radius: 10px;
  color: var(--ink); font-size: .9375rem; line-height: 1.333; font-weight: 600;
}
.segmente button[aria-pressed="true"] { background: var(--surface); color: var(--brand); border: 1px solid var(--line); }

/* ----------------------------------------------------- Sofort, Erledigt -- */
.flagge-sofort, .wort-erledigt {
  display: inline-flex; align-items: center; gap: var(--s1);
  font-size: .9375rem; line-height: 1.333; font-weight: 600; white-space: nowrap;
}
.flagge-sofort { color: var(--orange); }
.flagge-sofort .ic { color: var(--orange-zeichen); }
.wort-erledigt { color: var(--ok); }

/* ---------------------------------------------------------------- Felder -- */
.feld-gruppe { display: block; text-align: left; margin-top: var(--s4); }
.feld-marke {
  display: block; margin: 0 0 6px;
  font-size: .9375rem; line-height: 1.333; font-weight: 600; color: var(--ink-2);
}
.field {
  display: block; width: 100%; min-height: 56px; padding: 0 var(--s4);
  background: var(--surface-2); color: var(--ink);
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-size: max(1.0625rem, 16px); line-height: 1.294;
  outline: none;
}
textarea.field { padding-top: var(--s3); padding-bottom: var(--s3); }
.field::placeholder { color: var(--ink-3); opacity: 1; }
.field:focus { border-color: var(--brand); background: var(--surface); }

/* ------------------------------------------------------------ Leerzustand -- */
.empty {
  display: grid; place-items: center; gap: var(--s3); text-align: center;
  margin: var(--s4) var(--rand); padding: var(--s7) var(--s5);
  background: var(--surface); border-radius: var(--r-gruppe); color: var(--ink-2);
}
.empty .ic { color: var(--ink-2); }
.empty h3 { font-size: 1.0625rem; line-height: 1.294; font-weight: 600; color: var(--ink); }
.empty p { font-size: .9375rem; line-height: 1.333; max-width: 34ch; }

/* ----------------------------------------------------------------- Laden -- */
.laedt {
  min-height: 60vh; min-height: 60svh;
  display: grid; place-items: center; align-content: center; gap: var(--s4);
  padding: var(--s7); color: var(--ink-2); font-size: .9375rem; line-height: 1.333;
}
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: dreh .8s linear infinite;
}
@keyframes dreh { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------- Netzband -- */
/* Klebt oben und verschwindet, sobald nichts mehr wartet. Die Leiste klebt
   DARUNTER, nicht dahinter: Sonst lag das Band gescrollt über „Häuser", und
   im Keller ohne Netz fand man den Weg hinaus nicht mehr. Damit alles, was
   oben klebt, weiß, wie weit es nachrücken muss, hat das Band eine feste
   Höhe mit Platz für zwei Zeilen: --netz-h (ohne den Rand oben am Telefon). */
body:has(> .netzband:not([hidden])) { --netz-h: 3.25rem; }
.netzband {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; gap: var(--s2);
  min-height: calc(var(--netz-h) + var(--safe-t));
  padding: var(--safe-t) var(--s4) 0;
  background: var(--surface); border-bottom: 1px solid var(--line);
  color: var(--ink); font-size: .9375rem; line-height: 1.333;
}
/* Der Text bricht in seiner Spalte um; der Knopf „Ansehen" rutscht nicht in
   eine dritte Zeile, die über die feste Höhe hinausginge. */
.netzband > span { flex: 1 1 auto; min-width: 0; }
.netzband .ic { flex: none; color: var(--brand); }
.netzband b { font-weight: 600; }
.netzband.offline .ic { color: var(--orange); }
body:has(> .netzband:not([hidden])) .appbar {
  top: calc(var(--netz-h) + var(--safe-t));
  height: var(--bar); padding-top: 0;      /* den Rand oben trägt jetzt das Band */
}
/* Braucht Klärung: Hier muss jemand handeln, es wartet nicht von selbst. */
.netzband.klaerung { justify-content: space-between; flex-wrap: nowrap; }
.netzband.klaerung .ic { color: var(--bad); }
/* Das Band ist 52 px hoch: Der Knopf bleibt 48 px, seine Tippfläche reicht
   über die Ränder hinaus auf 56 px. */
.netzband.klaerung .btn { position: relative; min-height: 48px; }
.netzband.klaerung .btn::after { content: ""; position: absolute; inset: -4px 0; }

/* ----------------------------------------------------------------- Blatt -- */
/* Fährt von unten hoch. Den Rahmen erzeugt blattOeffnen(). */
.blatt {
  position: fixed; left: 0; right: 0; bottom: 0; top: calc(var(--safe-t) + var(--s3)); z-index: 200;
  display: flex; flex-direction: column;
  background: var(--bg); border-radius: var(--r-gruppe) var(--r-gruppe) 0 0;
  box-shadow: var(--sh-blatt);
  transform: translateY(100%); transition: transform .24s var(--ease);
}
.blatt.offen { transform: none; }
.blatt-griff {
  flex: none; width: 36px; height: 5px; margin: 6px auto 0;
  border-radius: 3px; background: var(--line-2);
}
.blatt-kopf {
  flex: none; display: flex; align-items: center; gap: var(--s2);
  min-height: var(--tap); padding: 0 var(--s2) 0 var(--s4);
}
.blatt-kopf h2 { flex: 1 1 auto; min-width: 0; font-size: 1.25rem; line-height: 1.25; font-weight: 600; }
.blatt-inhalt {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: var(--s2) 0 calc(var(--s7) + var(--safe-b));
}

/* --------------------------------------------------------------- Dialog -- */
/* iOS-Alert: Titel, Text, Knöpfe untereinander. */
.dialog-huelle {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: var(--s4);
  background: var(--scrim);
  animation: einblenden .15s var(--ease);
}
.dialog {
  width: min(320px, 100%); padding: var(--s5) var(--s4) var(--s4);
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--sh-dialog); text-align: center;
}
.dialog h2 { font-size: 1.0625rem; line-height: 1.294; font-weight: 600; }
.dialog p { margin-top: var(--s2); font-size: .9375rem; line-height: 1.333; color: var(--ink-2); }
.dialog-knoepfe { display: grid; gap: var(--s2); margin-top: var(--s5); }
.dialog-knoepfe .btn { width: 100%; }
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------------ Lupe -- */
/* Über jedem Blatt (200), unter Rückfrage (300) und Meldung (350): Darunter
   ging die Großansicht aus dem Detailblatt unsichtbar HINTER dem Blatt auf.
   Das Netzband (70) liegt darunter. Absichtlich immer dunkel: Ein Foto
   liest man auf dunklem Grund. */
.lupe {
  position: fixed; inset: 0; z-index: 250;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3);
  padding: var(--s4); padding-bottom: max(var(--s4), env(safe-area-inset-bottom));
  background: var(--lupe-grund);
  animation: einblenden .16s var(--ease);
}
/* Die Farben der immer dunklen Großansicht, an einer Stelle für alle, die
   auf ihr zeichnen: Lupe, Markieren und die Fotokacheln im Detailblatt. */
:root {
  --lupe-grund: #000;
  --lupe-flaeche: #1c1c1e;
  --lupe-flaeche-2: #2c2c2e;
  --lupe-linie: #48484a;
  --lupe-schrift: #f5f5f7;
  --lupe-neben: #e5e5ea;
  --lupe-akzent: #4da8ee;
}
.lupe img {
  max-width: 100%; max-height: calc(100% - 120px);
  border-radius: var(--r-bild); object-fit: contain;
}
.lupe-t { margin: 0; font-size: .9375rem; line-height: 1.333; color: var(--lupe-neben); text-align: center; }
.lupe-zu { max-width: 420px; }

/* --------------------------------------------------------------- Meldung -- */
/* Über jedem Blatt und Dialog. Eine Meldung gibt keinen Tipp an das weiter,
   was sie verdeckt: Ein Tipp auf sie schließt sie (ui.js), sonst nichts.
   Durchlässig lag sie über einem offenen Blatt genau auf „Passt so". */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--s6) + var(--safe-b)); z-index: 350;
  transform: translateX(-50%); width: max-content; max-width: min(88vw, 520px);
  padding: var(--s3) var(--s4); border-radius: var(--r-sm);
  background: var(--toast-grund); color: #fff;
  font-size: .9375rem; line-height: 1.333; text-align: center;
  /* Kein Schatten: Schatten tragen nur Blatt und Dialog. */
  pointer-events: auto; cursor: pointer; -webkit-user-select: none; user-select: none;
  animation: toastin .22s var(--ease);
}
.toast.err { background: var(--bad-flaeche); }
.toast.gut { background: var(--ok-flaeche); }
/* Zwischen Hinweis und Fehler: nichts ist kaputt, aber es sollte jemand
   handeln, solange er noch vor der Sache steht. */
.toast.warn { background: var(--warn); color: #201803; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Die Meldung verdeckt die Bedienleiste nicht. Die Höhe der Leiste setzt die
   App selbst (--leiste-h), weil sie während der Aufnahme wächst. */
body.im-rundgang .toast {
  bottom: calc(var(--leiste-h, 170px) + var(--s3) + var(--safe-b));
}
/* Liegt eine Rückfrage oder die Großansicht obenauf, steht die Meldung oben
   unter der Leiste. Unten liegt dort der Knopf, mit dem es weitergeht. Muss
   nach der Regel darüber stehen. */
body:has(> .dialog-huelle) .toast,
body:has(> .lupe) .toast {
  top: calc(var(--bar) + var(--safe-t) + var(--s2));
  bottom: auto;
}
/* Über einem Blatt liegt sie kurz auf Griff und Kopf des Blatts: Darunter
   stehen Suche und Eingabefelder, die sie nicht verdecken darf, und nichts
   rückt nach. Ein Tipp auf sie schließt sie. Ohne Rückfrage und
   Großansicht darüber, die ihre eigene Lage haben. */
body:has(> .blatt.offen) .toast {
  top: calc(var(--safe-t) + var(--s3) + var(--s2));
  bottom: auto;
}
body:has(> .blatt.offen):has(> .dialog-huelle) .toast,
body:has(> .blatt.offen):has(> .lupe) .toast {
  top: calc(var(--bar) + var(--safe-t) + var(--s2));
}

/* -------------------------------------------------------- Bewegung, Druck -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
@media print {
  .appbar, .netzband, .knopfleiste, .toast, .dialog-huelle, .lupe { display: none !important; }
  body { background: #fff; color: #000; }
}
