/* LeseZoo-Abenteuer
   Zwei bewusst getrennte Erscheinungsbilder:
   - .learn-look  = Übungsbildschirme. Ruhig, hoher Kontrast, große Ziele,
                    keine Verzierung. Umsetzung von HANDOFF §10.
   - .zoo-look    = Menü, Zoo, Belohnungsmomente. Freundlich und bunt.
   Der Wechsel ist Absicht: die Aufgabe soll sich vom Spiel unterscheiden. */

* { box-sizing: border-box; margin: 0; padding: 0; }
/* `touch-action: none` stand hier bis zum 08.09.2026 — und war der Grund,
   warum sich die Elternansicht auf dem Handy nicht scrollen ließ. Der Wert
   gilt nämlich nicht nur für das Element selbst: der Browser SCHNEIDET die
   Werte von der berührten Stelle bis zum Dokument, `none` ganz oben gewinnt
   also immer, und `.screen { touch-action: pan-y }` konnte nichts mehr
   zurückholen. `manipulation` erlaubt Scrollen, unterbindet aber weiterhin
   den Doppeltipp-Zoom; `overscroll-behavior` das Ziehen zum Neuladen. */
html, body { width: 100%; height: 100%; overflow: hidden; touch-action: manipulation; overscroll-behavior: none; }
body {
  font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f4f6f8;
  color: #1f2933;
  user-select: none; -webkit-user-select: none;
  -webkit-text-size-adjust: 100%;
  /* iOS: kein Kontextmenü bei langem Drücken, kein grauer Tipp-Blitz */
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
/* Bildschirme dürfen senkrecht scrollen (Elternansicht, lange Texte). */
.screen { touch-action: pan-y; }
/* Nur im Zoo führt der Finger die Figur und die Kamera — dort und ausschließlich
   dort darf der Browser die Geste NICHT als Wischen deuten. */
#zoo-canvas, #zoo-hud, #touch-ui { touch-action: none; }
input, select, textarea { -webkit-user-select: text; user-select: text; }
#zoo-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- Bildschirme ---------- */
.screen {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; text-align: center;
  padding: calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right))
           calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
  overflow-y: auto; overscroll-behavior: contain;
}
/* Sicheres Zentrieren: passt der Inhalt, ist er mittig; sonst scrollt er von oben. */
.screen::before, .screen::after { content: ''; flex: 0 0 0; margin: auto; }
.screen.hidden, .hidden { display: none !important; }

.zoo-look { background: linear-gradient(165deg, #d9f0ff, #cfe9c9); }
.learn-look { background: #f4f6f8; justify-content: flex-start; gap: 0; padding: 0; }

h1 { font-size: clamp(1.7rem, 6vw, 2.8rem); color: #1f4d40; }
h2 { font-size: clamp(1.4rem, 5vw, 2.1rem); color: #1f4d40; }
.subtitle { font-size: 1.1rem; color: #3d4f5c; max-width: 32rem; }
.note { font-size: .95rem; color: #5b6b7a; max-width: 34rem; line-height: 1.5; }

/* ---------- Knöpfe: groß, hoher Kontrast, weit auseinander (§10) ---------- */
button {
  font-family: inherit; font-size: 1.15rem; font-weight: 600;
  padding: 16px 28px; min-height: 56px;
  border: 2px solid transparent; border-radius: 14px; cursor: pointer;
  background: #2f6f5e; color: #fff;
  transition: transform .08s ease, background .12s ease;
}
button:hover { background: #37806c; }
button:active { transform: scale(.98); }
button:focus-visible { outline: 3px solid #1f4d40; outline-offset: 3px; }
button.secondary { background: #e2e8ee; color: #24313d; }
button.secondary:hover { background: #d5dde5; }
button.big { font-size: 1.35rem; min-height: 68px; }
button.wide { width: min(420px, 88vw); }
button.quiet { background: none; color: #5b6b7a; font-size: 1.5rem; padding: 8px 14px; min-height: 44px; }
button.quiet:hover { background: #e6ebf0; }
/* Unauffälliger Knopf in der Ecke des Menüs: Neu laden von Hand, falls die
   installierte App eine neue Fassung nicht von selbst holt. */
.corner-btn { position: absolute; top: calc(6px + env(safe-area-inset-top)); right: calc(6px + env(safe-area-inset-right)); opacity: .75; font-size: 1.35rem; }
.corner-btn:hover, .corner-btn:focus-visible { opacity: 1; }
button.link-button { background: none; color: #3d4f5c; font-weight: 500; font-size: 1rem; text-decoration: underline; min-height: 44px; }
button.link-button:hover { background: none; color: #1f4d40; }
/* Punkt am Knopf „Für Erwachsene“ (03.12.2026): ein Hinweis wartet in der
   Elternansicht. Ohne Text und ohne Bewegung — fürs Kind bedeutungslos (§8). */
button.link-button.mit-punkt { position: relative; }
button.link-button.mit-punkt::after { content: ''; position: absolute; top: 8px; right: -4px; width: 9px; height: 9px; border-radius: 50%; background: #c8812a; }
button[disabled] { opacity: .45; cursor: default; }
button[disabled]:hover { background: #2f6f5e; }
button.secondary[disabled]:hover { background: #e2e8ee; }

.menu-buttons { display: flex; flex-direction: column; gap: 14px; min-width: min(340px, 86vw); }
.menu-buttons.row { flex-direction: row; flex-wrap: wrap; justify-content: center; }

/* ---------- Profile ---------- */
.profile-list { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 40rem; }
.profile-card {
  background: #fff; border: 3px solid #2f6f5e; border-radius: 18px;
  padding: 20px 26px; min-width: 140px; font-size: 1.3rem; font-weight: 700; color: #1f4d40;
  cursor: pointer;
}
.profile-card small { display: block; font-size: .85rem; font-weight: 500; color: #5b6b7a; margin-top: 4px; }
/* `max-width: 100%` und Felder auf volle Breite: ein Textfeld ist von sich
   aus ~20 Zeichen breit, die Karte wuchs damit über den Bildschirm hinaus
   (354 px in 324 px, seitliches Scrollen auf dem Handy, 14.09.2026). */
.card {
  background: #fff; border-radius: 18px; padding: 22px; display: flex; flex-direction: column;
  gap: 10px; text-align: left; min-width: min(340px, 86vw); max-width: 100%; box-shadow: 0 2px 14px #0001;
}
.card input, .card select { width: 100%; min-width: 0; }
.card label { font-weight: 600; color: #3d4f5c; }
input[type="text"], select {
  font-family: inherit; font-size: 1.15rem; padding: 14px 16px;
  border: 2px solid #b8c4ce; border-radius: 12px; outline: none; background: #fff; color: #1f2933;
}
input[type="text"]:focus, select:focus { border-color: #2f6f5e; }

/* ---------- Fortschritt & Kopfzeile der Übung ---------- */
/* Links der beschriftete Ausgang, in der Mitte der Titel, rechts nichts (oder
   die Rundenanzeige, `.f5-head`). Beide Randspalten gleich breit, damit der
   Titel wirklich mittig steht — vorher 56 px je Seite für ein bloßes Kreuz. */
.learn-head {
  display: grid; grid-template-columns: minmax(5.5rem, 1fr) auto minmax(5.5rem, 1fr); align-items: center;
  gap: 10px; width: 100%; padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid #dde3e9; background: #fff;
}
.learn-head > .ausgang { justify-self: start; }
.block-title { font-size: 1rem; font-weight: 600; color: #3d4f5c; text-align: center; }
/* Ankündigung unter dem Blocktitel (Wörter-Woche): ruhig, ohne Bewegung. */
.fade-text.verdeckt { visibility: hidden; }
.f6-verdeckt { margin: 0 0 6px; text-align: center; }
.block-hint { grid-column: 1 / -1; text-align: center; font-size: 0.95rem; color: #5b6b7a; margin-top: -2px; }
.dots { display: flex; gap: 6px; justify-content: flex-end; grid-column: 1 / -1; padding: 6px 0 2px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #dde3e9; }
.dot.done { background: #2f6f5e; }
.dot.current { background: #9fb4c0; }

.learn-main {
  flex: 1 1 auto; width: 100%; max-width: 46rem; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 24px 18px;
}
.learn-main.wide-main { max-width: 60rem; justify-content: flex-start; text-align: left; align-items: stretch; }
.learn-foot {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
}

/* ---------- Übungsbildschirm: „Weiter" steht immer sichtbar --------------
   Gemessen am 10.09.2026: auf dem Handy lag der Weiter-Knopf bei JEDEM
   Blitzwort unter dem Bildrand (bis 288 px Überhang auf 360×560) — das Kind
   musste erst scrollen, um zur nächsten Aufgabe zu kommen. Auf dem iPad ging
   es bei den geprüften Typen gerade so auf; „gerade so" ist keine Zusage.

   Dieselbe Bauweise wie beim Vorlesen (F5): Kopf und Fuß stehen fest, nur die
   MITTE rollt — und auch die nur, wenn es wirklich nötig ist. Ein Scroll bei
   einer langen Aufgabe bleibt damit möglich, aber er kostet nie den Knopf. */
.uebung-screen { overflow: hidden; }
.uebung-screen .learn-main {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  justify-content: flex-start; gap: 18px;
}
/* Mittig, solange es passt — sonst von oben. `justify-content: center` würde
   in einem Rollbereich den oberen Teil unerreichbar machen. */
.uebung-screen .learn-main::before, .uebung-screen .learn-main::after {
  content: ''; flex: 0 0 0; margin: auto;
}
.uebung-screen .learn-foot { flex: 0 0 auto; }
/* „So geht es" (18.10.2026, learn/einfuehrung.js): eine ruhige Karte vor
   der ersten Aufgabe eines Formats. Keine Bewegung (Regel 8). Lesestoff wie
   die Aufgaben selbst (§10). */
.einfuehrung {
  width: 100%; max-width: 34rem; padding: 22px 22px 18px; border-radius: 18px;
  background: #f3f8f6; border: 2px solid #cfe3dc; text-align: center;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.einfuehrung h2 { margin: 0; font-size: 1.6rem; color: #1f4d40; }
.einfuehrung p { margin: 0; font-size: 1.45rem; line-height: 1.5; color: #1f2933; }
.einfuehrung-knoepfe { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.einfuehrung-knoepfe .wide { flex: 1 1 14rem; }
body.einfuehrung-offen #btn-next { display: none; }
/* F3 (Fehlersuche): der Text rollt in seinem Kasten, „Fertig" steht am Textende
   (formats.js `_f3`). `flex-basis: 0` ist entscheidend — mit `auto` verlangte
   der Kasten die Höhe des ganzen Textes, und dann rollte wieder alles. */
.uebung-screen .learn-main.f3 { justify-content: flex-start; }
.uebung-screen .learn-main.f3::before, .uebung-screen .learn-main.f3::after { margin: 0; }
.uebung-screen .stimulus.rollt {
  flex: 1 1 0; min-height: 5.5em; width: 100%; max-width: 42rem;
  overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  border-radius: 16px;
}
.uebung-screen .stimulus.rollt .reading-text { max-width: none; }
/* Fehlersuche: jeder Text beginnt verdeckt, mit „Los" mitten im Kasten
   (formats.js `_f3`, 28.09.2026). Der Kasten behält seine Größe, damit nichts
   springt; darüber steht, der wievielte Text es ist. */
.uebung-screen .stimulus.rollt { position: relative; }
.uebung-screen .stimulus.wartet { overflow: hidden; }
.uebung-screen .stimulus.wartet::after, .uebung-screen .stimulus.wartet::before { display: none; }
.stimulus .reading-text.verdeckt { visibility: hidden; }
.f3-start { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; }
.f3-start .f3-los { flex: 0 1 16rem; }
.stimulus.rollt .f3-fertig { display: block; margin: 14px auto 8px; }
.f3-nummer { font-size: clamp(1.1rem, 3.8vw, 1.35rem); font-weight: 700; color: #2f6f5e; }
/* Die Wörter sind hier Tippflächen (`inline-block`). Mit ihrem Innenabstand
   war jede Zeile 6 px höher als die 2 em der Zeilenbänder — die Bänder liefen
   den Zeilen davon, nach acht Zeilen um ein ganzes Band (21.09.2026). Ohne
   senkrechten Abstand und mit eigener Zeilenhöhe bleibt die Zeile bei 2 em,
   und die Markierung eines Wortes berührt die Nachbarzeile nicht. */
.uebung-screen .stimulus.rollt .reading-text .word { padding: 0 5px; margin: 0; line-height: 1.5; }
/* Breite Geräte: der Kasten darf breiter werden, wie beim Vorlesen (52 rem ≈
   50 Zeichen je Zeile). Auf dem iPad quer blieben links und rechts je 260 px
   leer, während der Text unten aus dem Kasten lief (21.09.2026). */
@media (min-width: 900px) {
  .uebung-screen .learn-main.f3 { max-width: 56rem; }
  .uebung-screen .stimulus.rollt { max-width: 52rem; }
  .f6-screen .learn-main { max-width: 56rem; }
  .f6-screen .fade-text { max-width: 52rem; }
}
/* Flaches Fenster (Handy): Aufgabe, drei Antworten und die Auflösung müssen
   zusammen ins Bild — gemessen lag die dritte Antwort halb, die Auflösung ganz
   unter dem Rand (360×560, 14.09.2026). Alles etwas enger, nichts kleiner als
   §10 erlaubt (Antwortflächen bleiben über 56 px). */
@media (max-height: 640px) {
  .uebung-screen .learn-main { gap: 12px; padding: 12px 14px; }
  .uebung-screen .choices { gap: 10px; }
  .uebung-screen .choice { min-height: 60px; }
  .uebung-screen .stimulus { line-height: 1.55; }
  .uebung-screen .feedback { padding: 12px 14px; gap: 6px; }
  .uebung-screen .learn-foot { padding-top: 8px; }
  .learn-head { padding-bottom: 6px; }
}

/* „Lesen mit Verschwinden" (F6) ist derselbe Fall wie F5: der Text ist das
   Wichtigste, und der Knopf darunter muss stehen bleiben. Gemessen am
   10.09.2026 lief der Bildschirm auf dem iPad quer um 469 px über — „Los",
   „Nochmal lesen" und die Antworten lagen unter dem Bildrand. Der Text rollt
   deshalb in seinem eigenen Kasten, und `main.js: textEinpassen` verkleinert
   ihn vorher so weit, dass er ganz hineinpasst (nie unter 20 px, §10). */
.f6-screen .learn-main { gap: 12px; }
/* `flex: 0 1 auto` — so hoch wie der TEXT, höchstens so hoch wie der Platz
   (21.09.2026). Mit `1 1 0` füllte der Kasten den ganzen Bildschirm, und die
   Zeilenbänder liefen unter dem letzten Satz weiter: auf dem iPad hochkant
   1023 px Kasten für 466 px Text. Schrumpfen darf er, weil ein Rollkasten
   keine Mindesthöhe aus seinem Inhalt hat. */
.f6-screen .fade-text {
  flex: 0 1 auto; min-height: 6em; overflow-y: auto; overscroll-behavior: contain;
  width: 100%; touch-action: pan-y;
}
.f6-screen #f6-fragen { flex: 0 0 auto; width: 100%; }
/* Während der Text läuft, gehört der Bildschirm ihm: Anweisung, Hinweis,
   Titel und die Verdeckt-Zeile sagen dem lesenden Kind nichts mehr — sie
   kosten aber gut 120 px, und die fehlen dem Text (Regel 8 will ohnehin
   einen ruhigen Bildschirm, solange gearbeitet wird). */
.f6-liest #f6-instruction, .f6-liest #f6-hint,
.f6-liest #f6-title, .f6-liest #f6-verdeckt { display: none; }

/* Flaches Fenster (kleines Handy): das Menü passte nicht mehr, „Für
   Erwachsene" lag 121 px unter dem Rand. Ein Menü DARF rollen — aber wenn
   es ohne Rollen geht, ist es besser. */
@media (max-height: 640px) {
  #screen-menu h1 { font-size: 1.4rem; }
  #screen-menu .subtitle { font-size: .95rem; }
  #screen-menu { gap: 8px; }
  #screen-menu button.big { min-height: 54px; font-size: 1.15rem; padding: 8px 20px; }
  #screen-menu .menu-buttons { gap: 8px; }
  #screen-menu .small-row button, #screen-menu .tiny-row button { min-height: 40px; padding: 6px 14px; }
  #screen-menu .tiny-row { margin-top: 0; }
  .calendar { width: min(260px, 78vw); }
  /* Sitzungsende: beide Knöpfe lagen 157 px unter dem Rand (360×560). */
  #screen-sessionend, #screen-blockend { gap: 8px; }
  #screen-sessionend h2, #screen-blockend h2 { font-size: 1.3rem; }
  #screen-sessionend .coin-big, #screen-blockend .coin-big { font-size: 1.7rem; }
  #screen-sessionend button.big, #screen-blockend button.big { min-height: 54px; font-size: 1.15rem; padding: 8px 20px; }
  #screen-sessionend .menu-buttons, #screen-blockend .menu-buttons { gap: 8px; }
  #screen-sessionend .day-strip, #screen-sessionend .week-strip { gap: 6px; }
  #screen-sessionend .coin-total-pill { padding: 5px 14px; }
  #screen-sessionend .week-day { width: 26px; height: 26px; }
  #screen-sessionend p { line-height: 1.3; }
  /* Die beiden Knöpfe nebeneinander: der Weg in den Zoo breit, „Zurück" schmal.
     Untereinander lag „Zurück" auch nach dem Verdichten noch unter dem Rand. */
  #screen-sessionend .menu-buttons { flex-direction: row; }
  #screen-sessionend .menu-buttons button { padding: 8px 12px; }
  #screen-sessionend #btn-to-zoo { flex: 1 1 auto; }
  #screen-sessionend #btn-to-menu { flex: 0 0 auto; }
  /* PIN: das Ziffernfeld passte um 35 px nicht. */
  .pin-pad { gap: 8px; width: min(260px, 82vw); }
  .pin-pad button { min-height: 54px; font-size: 1.5rem; }
  #screen-pin { gap: 10px; }
}

.instruction { font-size: 1.15rem; font-weight: 600; color: #3d4f5c; }

/* ---------- Reizmaterial: groß, luftig, gut lesbar (§10) ----------
   min. 20px auf Mobil, großzügiger Zeilen- und Buchstabenabstand.
   Bewusst KEINE „Legasthenie-Schriftart" (§4). */
.stimulus {
  font-size: clamp(1.4rem, 5.2vw, 2.1rem); line-height: 1.8; letter-spacing: .02em;
  color: #1f2933; max-width: min(40rem, 100%); min-width: 0;
}
.stimulus .gap {
  display: inline-block; min-width: 4.5em; border-bottom: 4px solid #9fb4c0;
  vertical-align: bottom; margin: 0 .12em;
}
.stimulus .gap.filled { border-bottom-color: #2e7d32; color: #2e7d32; font-weight: 700; }
.stimulus .flash-word {
  font-size: clamp(2.2rem, 9vw, 3.6rem); font-weight: 700; letter-spacing: .03em;
  /* Lange Wörter (Bausteine-Blitzwort, 02.10.2026): eine Zeile, nie breiter
     als der Bildschirm — formats.js: wortEinpassen verkleinert die Schrift. */
  max-width: 100%; white-space: nowrap; overflow: hidden;
}
.stimulus .flash-mask { color: #b8c4ce; }

/* Antippbare Wörter (F2-Folgeschritt, F3) */
.word { display: inline-block; padding: 2px 5px; border-radius: 7px; margin: 1px 0; }
.word.tappable { cursor: pointer; }
/* Hover NUR mit echtem Mauszeiger (24.09.2026). Auf dem Tablet bleibt :hover
   am zuletzt getippten Wort hängen, bis ein anderes getippt wird — und das
   Hover-Grau sieht fast aus wie „markiert". Wer ein Wort wieder abwählte, sah
   den Rahmen verschwinden, die Farbe aber bleiben (Auftraggeber). Dasselbe
   Muster wie bei .choice und .tally. */
@media (hover: hover) { .word.tappable:hover { background: #e6ebf0; } }
.word.picked { background: #dbe6ee; outline: 2px solid #7d95a6; }
/* „Tippe auf das falsche Wort": die Wörter zeigen, dass sie Tippflächen sind.
   Auf dem Tablet gibt es keinen Mauszeiger, und ohne Einladung sah der
   Bildschirm aus, als wäre die Aufgabe fertig (21.09.2026). */
.stimulus.suchen .word.tappable {
  border-bottom: 3px dashed #9fb4c0; padding-bottom: 1px; cursor: pointer;
}
.f2-weiss-nicht { background: #e2e8ee; color: #24313d; font-size: 1.05rem; min-height: 52px; display: block; margin: 14px auto 0; max-width: 420px; }
.f2-weiss-nicht:hover { background: #d5dde5; }
.word.hit { background: #d6ead7; color: #1c5220; font-weight: 700; }
.word.missed { text-decoration: underline 3px #7d95a6; text-underline-offset: 5px; }
.word.corrected { color: #2e7d32; font-weight: 700; }
/* Das falsche Wort bleibt stehen — grau und durchgestrichen —, die richtige
   Form steht grün daneben (Regel 2: „Fehlerstelle markiert, richtige Form
   daneben"; Regel 3: neutral, kein Rot). */
.word.ersetzt { color: #7d8b97; text-decoration: line-through 3px #9fb0bd; }
/* Übersehen (F3): die richtige Form grün, dazu grau unterstrichen — neutral,
   aber anders als „gefunden" (grün hinterlegt). */
.word.corrected.missed { text-decoration: underline 3px #7d95a6; text-underline-offset: 5px; }
/* Angetippt, war aber schon richtig (F2 zweiter Schritt, F3): gestrichelt
   umrandet, ohne Farbe — kein Fehler-Zeichen (Regel 3). */
.word.schon-richtig { outline: 2px dashed #9fb0bd; outline-offset: 1px; }
/* Silbenhilfe in der Auflösung: die Silben bleiben unterscheidbar, aber in
   der Farbe der Marke — sonst stand ein halb braunes „richtiges" Wort da. */
.silben .word.corrected .silbe.s1 { color: #1b5e20; }
.silben .word.corrected .silbe.s0 { color: #2e7d32; }
.silben .word.ersetzt .silbe { color: inherit; }

/* ---------- Antwortflächen: groß, gleich breit ---------- */
.choices { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; width: 100%; }
.choice {
  flex: 1 1 12rem; max-width: 20rem; min-height: 84px;
  font-size: clamp(1.25rem, 4.6vw, 1.7rem); font-weight: 700;
  background: #fff; color: #1f2933; border: 3px solid #b8c4ce; border-radius: 16px;
}
@media (hover: hover) { .choice:hover { background: #eef3f7; } }
.choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
/* Auflösung: richtig = grün, gewählte falsche Option = neutral grau.
   KEIN Rot, kein bleibendes Kreuz (Regel 3). */
.choice.correct { border-color: #2e7d32; background: #e8f4e9; color: #1c5220; }
.choice.chosen-wrong { border-color: #7d95a6; background: #eaeff3; color: #46586a; }
/* Nach der Antwort sind die Flächen KEINE Knöpfe mehr (21.09.2026). Gesperrt
   waren sie schon — aber `button[disabled]:hover` (0,2,1) schlug
   `.choice.correct` (0,2,0): eine angetippte Fläche wurde dunkelgrün, auf dem
   iPad blieb das als klebender Hover stehen, und nach einer falschen Antwort
   sah es aus, als hätte man sie noch geändert. Deshalb: keine Zeiger-
   Ereignisse mehr, und jede Farbe ausdrücklich auch für `:hover`. */
button.choice[disabled], button.choice[disabled]:hover {
  opacity: 1; cursor: default; pointer-events: none; background: #fff; transform: none;
}
button.choice.correct[disabled], button.choice.correct[disabled]:hover { background: #e8f4e9; }
button.choice.chosen-wrong[disabled], button.choice.chosen-wrong[disabled]:hover { background: #eaeff3; }
/* Welche war MEINE? Ein zweiter Rahmen um die gewählte Fläche und eine kleine
   Zeile darunter; was weder gewählt noch richtig ist, tritt zurück. */
.choice.chosen { box-shadow: 0 0 0 4px rgba(125, 149, 166, .45); }
.choice.chosen.correct { box-shadow: 0 0 0 4px rgba(46, 125, 50, .35); }
button.choice.rest[disabled] { opacity: .4; }
/* Gegen Eile (02.10.2026, formats.js): solange der Satz noch nicht gelesen
   sein kann, sind die Flächen blass. Ohne Übergang — sie werden still
   tippbar, nichts bewegt sich (Regel 8). */
button.choice.wartet[disabled], button.choice.wartet[disabled]:hover { opacity: .45; background: #fff; transition: none; }
/* Nach einem Fehler: die richtige Fläche selbst antippen. Grün wie die
   Lösung, mit kräftigem Rahmen — tippbar trotz der Sperre der anderen. */
button.choice.correct.nachtippen, button.choice.correct.nachtippen:hover {
  pointer-events: auto; cursor: pointer; border-width: 3px; box-shadow: 0 0 0 4px rgba(46, 125, 50, .5);
}
/* Das Wortende, in dem sich die Formen unterscheiden. */
.endung { font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.choice-note { display: block; font-size: .85rem; font-weight: 600; letter-spacing: .01em; }

/* ---------- Auflösung ---------- */
.feedback {
  width: 100%; max-width: 40rem; background: #fff; border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 10px; border: 2px solid #dde3e9;
}
/* Erste Zeile = das Urteil: „✓ Richtig!" grün, „→ Nicht ganz." schiefergrau —
   neutral, aber unübersehbar (Regel 3: nie rot, nie ein Kreuz). */
.feedback-mark { font-size: clamp(1.35rem, 5vw, 1.7rem); font-weight: 800; color: #46586a; }
.feedback.ok .feedback-mark { color: #1c5220; }
.feedback-text { font-size: clamp(1.15rem, 4.2vw, 1.5rem); line-height: 1.7; }
.feedback-text:empty, .feedback-rule:empty { display: none; }
.feedback-rule { font-size: 1rem; color: #5b6b7a; }
.feedback.ok { border-color: #a8d5ab; background: #f2f9f3; }
.feedback:not(.ok) { border-color: #b9c6d2; background: #f4f7fa; }

/* ---------- Belohnungsmomente (nur zwischen Blöcken, Regel 8) ---------- */
.coin-big { font-size: clamp(2rem, 8vw, 3rem); font-weight: 800; color: #b07d1a; }
/* Der Gesamtstand unter dem Gewinn: ruhiger als die große Zahl darüber, aber
   deutlich genug, um das nächste Ziel im Laden abzuschätzen. */
.coin-total { margin: 2px 0 0; }
.coin-total-pill {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  background: #fff6e0; border: 2px solid #e8cf9a; color: #8a6410;
  font-size: clamp(1.05rem, 4.2vw, 1.35rem); font-weight: 700;
}
.coin-line { font-size: 1.2rem; font-weight: 700; color: #8a6410; }
.star-line { font-size: 1.15rem; font-weight: 700; color: #8a6410; }
.week-strip { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.week-day { width: 30px; height: 30px; border-radius: 9px; background: #fff; border: 2px solid #b8c4ce;
  display: grid; place-items: center; font-size: .8rem; color: #5b6b7a; font-weight: 700; }
.week-day.done { background: #2f6f5e; border-color: #2f6f5e; color: #fff; }
.week-label { font-size: .95rem; color: #3d4f5c; width: 100%; }

/* Tagesleiste: zwei Runden à vier Blöcke als Münzplätze. Gefüllt = heute
   geschafft. Zeigt Blöcke und Runden, nie Münzbeträge (PAEDAGOGIK, „Tagesleiste"). */
.day-strip { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.day-label { font-size: .95rem; color: #3d4f5c; width: 100%; }
.day-round { display: flex; gap: 6px; padding: 6px 8px; border-radius: 14px; background: rgba(255,255,255,.55); }
.day-round.full { background: rgba(240, 200, 90, .35); }
.day-block { width: 26px; height: 26px; border-radius: 50%; border: 2px dashed #b8a672; background: #fff; }
.day-block.done { border: 2px solid #b07d1a; background: radial-gradient(circle at 35% 35%, #ffe08a, #e0a52a 70%); box-shadow: inset 0 0 0 3px #f6d46a; }
.day-strip.compact .day-label { display: none; }
.day-strip.compact { gap: 10px; }
.day-strip.compact .day-round { padding: 4px 6px; gap: 4px; }
.day-strip.compact .day-block { width: 16px; height: 16px; }
.day-strip.compact .day-block.done { box-shadow: inset 0 0 0 2px #f6d46a; }

/* ---------- Vorlese-Modul ---------- */
.text-title { font-size: 1.3rem; color: #1f4d40; }
.reading-text {
  font-size: clamp(1.25rem, 4.6vw, 1.7rem); line-height: 2; letter-spacing: .02em;
  background: #fff; border-radius: 16px; padding: 24px; max-width: 42rem; text-align: left;
}
.f5-controls { display: flex; justify-content: center; }
.tally {
  font-size: 1.35rem; min-height: 88px; min-width: 260px;
  display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
  background: #ffffff; color: #7a4a12; border: 3px solid #e0a94f; font-weight: 800;
  transition: transform .08s, background-color .12s, border-color .12s;
}
/* Kein klebender Hover: Touch-Geräte halten `:hover` nach dem Tippen fest,
   bis man woanders hintippt — der Knopf blieb dauerhaft eingefärbt und die
   Rückmeldung auf den zweiten Druck ging unter. Der Hover-Ton gilt deshalb nur
   auf Geräten, die wirklich schweben können; sonst bleibt der Knopf weiß und
   nur der kurze Puls zeigt den Druck. */
.tally:hover { background: #fff; }
@media (hover: hover) { .tally:hover { background: #fff7e6; } }
/* Der Zeilen-Zähler ist der seltenere Fall: kleiner, damit „Verleser" der
   Knopf bleibt, den die Hand im Lesefluss findet. */
.tally.klein { font-size: 1rem; padding: 10px 16px; min-height: 48px; }
/* „✓ gezählt": der Knopf bestätigt den Druck für einen Augenblick — sichtbar
   für den Erwachsenen, ohne Zahl für das Kind (§5 F5, Regel 3). */
.tally.gezaehlt { background: #fff1d6; border-color: #b9771e; }
.f5-undo {
  background: none; color: #7a4a12; font-size: 1rem; font-weight: 700; min-height: 44px;
  padding: 6px 12px; border: 2px dashed #e0a94f; border-radius: 12px;
}
.f5-undo:hover { background: #fff7e6; }
.f5-anderswo { margin: 0; font-size: 1rem; color: #3d4f5c; text-align: center; }
.f5-anderswo .link-button { min-height: 44px; padding: 4px 8px; }
/* Der Auswertungstext für Erwachsene: einfarbig, feste Schrift, lang genug,
   dass man ihn überfliegen kann, bevor man ihn kopiert. */
textarea.bericht {
  width: 100%; min-height: 22rem; margin-top: 10px; padding: 12px 14px;
  font: 0.9rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #24313d; background: #f7f9fb; border: 1px solid #d5dee6; border-radius: 12px;
  resize: vertical; white-space: pre-wrap;
}
/* Rückmeldung auf den Tastendruck — für den Erwachsenen, der zählt. Bewusst
   OHNE Zahl: Regel 3 verbietet, dem Kind seine Fehlerzahl zu zeigen. Es
   blitzt nur kurz auf, damit man sieht, dass der Druck angekommen ist. */
.tally.tap { animation: tally-puls .34s ease-out; }
@keyframes tally-puls {
  0%   { transform: scale(1);    background: #e0a94f; border-color: #b9761f; color: #fff; }
  55%  { transform: scale(1.06); background: #f3d59a; border-color: #b9761f; color: #7a4a12; }
  100% { transform: scale(1);    background: #fff;    border-color: #e0a94f; color: #7a4a12; }
}
@keyframes tally-blink { 50% { background: #f3d59a; } }
@media (prefers-reduced-motion: reduce) {
  .tally.tap { animation: tally-blink .34s steps(2, end); }
}
.tally span { font-size: 2rem; font-weight: 800; }

/* ---------- Elternansicht ---------- */
#parents-body { display: flex; flex-direction: column; gap: 22px; }
/* Ein Lauf oder Durchgang mit „verwerfen"/„zurückholen" (Leseprobe, Vorlesen):
   Text links, kleiner Knopf rechts — vorher brach der Knopf mitten in die Zeile. */
.lp-lauf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid #eef2f5; }
.lp-lauf > .note { flex: 1 1 auto; margin: 0; }
.lp-lauf > button { flex: 0 0 auto; min-height: 40px; padding: 6px 14px; font-size: .95rem; }
.panel { background: #fff; border-radius: 16px; padding: 18px; }
.panel h3 { font-size: 1.15rem; color: #1f4d40; margin-bottom: 10px; }
/* Sicherungen auf diesem Gerät: Zeile mit Stand, darunter die zwei Knöpfe. */
.sicherungen-liste { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.sicherung { border-top: 1px solid #eef2f5; padding-top: 8px; }
.sicherung-text { font-size: .95rem; color: #3d4f5c; overflow-wrap: anywhere; }
.sicherung .menu-buttons { margin-top: 4px; }
/* Rollbereich um breite Tabellen (parents.js hängt ihn um jede Tabelle).
   `touch-action` muss hier ausdrücklich auch waagerecht erlauben: `.screen`
   steht auf `pan-y`, und der Wert wird von oben nach unten geschnitten. */
.tabelle-rollt { overflow-x: auto; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.panel table { width: 100%; border-collapse: collapse; font-size: .98rem; }
/* Damit die Spalten nicht zu Buchstabensäulen zerquetscht werden, bevor der
   Rollbereich greift. */
.panel th, .panel td { min-width: 4.5rem; }
.panel th, .panel td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #eef2f5; }
.panel th { color: #5b6b7a; font-weight: 600; }
.bar { height: 12px; background: #e6ebf0; border-radius: 999px; overflow: hidden; min-width: 90px; }
.bar > i { display: block; height: 100%; background: #2f6f5e; }
.bar.probe > i { background: #b07d1a; }
.curve { width: 100%; height: 170px; }
.legend { display: flex; gap: 16px; font-size: .9rem; color: #3d4f5c; margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.approve-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #eef2f5; flex-wrap: wrap; }
.approve-row .grow { flex: 1 1 12rem; }
.tag { font-size: .82rem; padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.tag.open { background: #fdf1d8; color: #8a6410; }
.tag.done { background: #e8f4e9; color: #1c5220; }

/* ---------- Zoo-HUD ---------- */
#zoo-hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#zoo-top-left { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: calc(14px + env(safe-area-inset-left)); }
/* Zoo-Pause (25.09.2026): in Minuten, ruhig, unter dem Münzstand. */
#zoo-pause { margin-top: 8px; }
#zoo-top-right { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right)); display: flex; gap: 10px; }
.hud-pill { background: #ffffffdd; padding: 9px 20px; border-radius: 999px; font-weight: 800; font-size: 1.35rem; color: #8a6410; }
.hud-btn { pointer-events: auto; background: #ffffffdd; color: #1f4d40; font-size: 1.4rem; padding: 10px 16px; min-height: 52px; border-radius: 14px; }
/* Der Ausgang ist beschriftet und etwas ruhiger als die Symbolknöpfe — er
   war ein 42-px-Pfeil zwischen vier Symbolen (14.09.2026). */
.hud-btn.hud-exit { font-size: 1.1rem; font-weight: 700; background: #e7edf2ee; color: #33424e; }
.hud-btn:hover { background: #fff; }
/* „Allein weitergehen" (28.09.2026): unter dem Münzstand, beschriftet wie
   der Ausgang — nur solange ein Gast mitgeht. */
.hud-btn.hud-text { display: block; margin-top: 8px; font-size: 1.1rem; font-weight: 700; }
/* Der Hinweis („Löwe streicheln") gehört WEIT NACH UNTEN: auf
   Bildhöhe lag er quer über der Figur, dem Gast oder dem Tier, um das es
   gerade geht (Auftraggeber, 11.09.2026). Unten ist Boden — dort verdeckt er
   am wenigsten. */
.zoo-prompt {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(5vh + env(safe-area-inset-bottom));
  background: #ffffffe8; color: #1f2933; padding: 12px 22px; border-radius: 14px;
  font-size: 1.35rem; font-weight: 600; max-width: 80vw;
}
/* Ohne Touch steht die Taste dahinter (18.10.2026). Der Text kommt aus
   S.hand.taste (zooGame: `_prompt`), nicht aus dem Satz selbst. */
.zoo-prompt.mit-taste::after { content: var(--taste); color: #4a6572; }
/* Hinweis im Menü, wenn der Zoo mangels 3D nicht startet. Ruhig, kein Alarm:
   es ist kein Fehler des Kindes, und geübt werden kann normal weiter. */
.hinweis-kasten {
  max-width: 46ch; margin: 10px auto 0; padding: 12px 16px;
  background: #fff7e6; border-left: 5px solid #e0a94f; border-radius: 10px;
  color: #4a3a1e; font-size: 1.15rem; line-height: 1.45; text-align: left;
}

/* Sprechblase über dem Kopf. Sie ersetzt den früheren Zwischenbildschirm:
   der hielt das Spiel an, nahm die Maussteuerung weg und riss das Kind aus
   dem Zoo. Die Blase bleibt im Bild — man kann weiterlaufen.
   Schriftgröße: das hier IST Lesestoff, kein Beiwerk (s. u. „Alles im Zoo
   ist zum Lesen da"). */
.zoo-bubble {
  position: absolute; transform: translate(-50%, -100%);
  background: #fffffff5; color: #1f2933; padding: 12px 18px;
  border-radius: 18px;
  /* `width: max-content` ist hier keine Kosmetik: ohne sie bekommt ein absolut
     gesetzter Kasten seine Breite aus dem PLATZ RECHTS von `left` — dieselbe
     Blase war also links breit und rechts schmal. Das Ausweichen rechnete
     deshalb mit falschen Kästen, und zwei Blasen lagen übereinander
     (gemessen 11.09.2026: gemerkt 297×112, tatsächlich 165×175). */
  width: max-content;
  font-size: 1.4rem; max-width: min(24ch, 62vw); line-height: 1.4;
  box-shadow: 0 6px 18px #0003; pointer-events: none;
  transition: opacity .18s;
}
.zoo-bubble b { display: block; font-size: 1rem; color: #4a6572; margin-bottom: 3px; }
.zoo-bubble.ohne-pfeil::after { display: none; }
/* Im Puppentheater ist die Blase antippbar (02.11.2026): sie schaltet weiter. */
.zoo-bubble.tippbar { pointer-events: auto; cursor: pointer; }
.zoo-bubble::after {
  /* `--pfeil`: an den Rand geschobene Blasen (zooGame: _blaseZeichnen)
     zeigen mit dem Zipfel weiter auf den Sprecher. */
  content: ''; position: absolute; left: calc(50% + var(--pfeil, 0px)); margin-left: -6px; bottom: -9px;
  border: 6px solid transparent; border-top: 10px solid #fffffff2; border-bottom: 0;
}
/* Ein GEFÜHL ist keine Rede: kursiv, ein Satz, gestrichelter Rand, kein
   Name als eigene Zeile. So sieht man auf den ersten Blick, ob jemand etwas
   sagt oder ob ein Tier reagiert. */
.zoo-bubble.gefuehl {
  background: #eff5f1f2; color: #2f5145; font-style: italic; font-size: 1.3rem;
  border: 2px dashed #b3cdc1; padding: 10px 16px;
}
.zoo-bubble.gefuehl b { display: none; }
.zoo-bubble.gefuehl::after { border-top-color: #eff5f1f2; }

/* Messhilfe der Demo (03.11.2026): Jahreszeit, Koordinaten, Hindernisse. */
#btn-demo-werkzeug { margin-top: 8px; background: #f6d98a; }
.demo-werkzeug {
  pointer-events: auto; margin-top: 8px; background: #fffffff0; color: #1f4d40;
  border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px;
  width: max-content; max-width: calc(100vw - 28px); font-size: 1.05rem; font-weight: 600;
  position: relative; z-index: 2;
}
.demo-werkzeug select { font-size: 1.05rem; min-height: 44px; }
.demo-werkzeug label { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }
.demo-werkzeug input[type=checkbox] { width: 24px; height: 24px; }
.demo-ort {
  margin-top: 8px; background: #0b2b22e0; color: #fff; border-radius: 10px; padding: 6px 10px;
  font: 700 1.05rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; width: max-content;
}

/* Testmodus: auffällig, damit niemand ihn für den echten Zoo hält. */
.test-btn { background: #f6d98a; }
.test-banner {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(78px + env(safe-area-inset-top));
  background: #6b4b00e0; color: #fff6dc; padding: 8px 16px; border-radius: 10px;
  font-size: 1rem; font-weight: 600; max-width: 80vw; text-align: center; pointer-events: none;
}

.zoo-toast {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(80px + env(safe-area-inset-top));
  background: #1f4d40ee; color: #fff; padding: 14px 24px; border-radius: 14px; font-weight: 600;
  font-size: 1.25rem; max-width: 80vw; line-height: 1.35;
}
.reaction { font-size: 1.3rem; min-height: 2em; color: #1f4d40; font-weight: 600; }
.rename { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.rename input { font-size: 1.4rem; width: min(14ch, 60vw); text-align: center; }

/* ---------- Tierladen ---------- */
.shop-list { display: flex; flex-direction: column; gap: 12px; width: min(520px, 92vw); }
.shop-item {
  display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px; padding: 14px 16px; text-align: left;
  /* Auf einem schmalen Handy passte die Zeile nicht: Preis und Knöpfe standen
     rechts AUSSERHALB des Bildes und waren nicht antippbar (gemessen auf
     360×560 am 10.09.2026, mit dem zweiten Knopf „Name geben" noch deutlicher).
     Umbrechen statt überlaufen. Einzeilig bleibt jede Zeile mit EINEM Knopf,
     auch auf dem Handy; nur die Begleiter-Zeile mit zwei Knöpfen bricht um. */
  flex-wrap: wrap;
  /* Was umbricht, rückt nach rechts unter die Knöpfe, statt links unter dem
     Text zu hängen — eine Zeile mit zwei Handlungen sieht sonst zerrissen aus. */
  justify-content: flex-end;
}
.shop-item .emoji { font-size: 2.2rem; }
/* `min-width: 0` ist nötig, sonst schrumpft der Textblock nie unter die
   Breite seines längsten Wortes und schiebt die Knöpfe hinaus. */
.shop-item .info { flex: 1 1 9em; min-width: 0; }
.shop-item .name { font-weight: 700; font-size: 1.3rem; color: #1f4d40; }
.shop-item .desc { font-size: 1.1rem; color: #4b5b6a; line-height: 1.4; }
.shop-item button { min-height: 54px; padding: 12px 22px; font-size: 1.15rem; }

/* ---------- Touch-Steuerung ---------- */
#touch-stick {
  position: absolute; left: 30px; bottom: calc(30px + env(safe-area-inset-bottom));
  width: 120px; height: 120px; border-radius: 50%;
  background: #ffffff44; border: 3px solid #ffffff88; pointer-events: none;
  box-shadow: 0 0 0 1.5px #1f4d4040;   /* auf Schnee bliebe Weiß sonst unsichtbar */
}
#touch-stick.floating { position: absolute; }
#touch-knob {
  position: absolute; left: 35px; top: 35px; width: 50px; height: 50px;
  border-radius: 50%; background: #ffffffcc; box-shadow: 0 0 0 1.5px #1f4d4040;
}
#touch-buttons {
  position: absolute; right: 24px; bottom: calc(30px + env(safe-area-inset-bottom));
  display: flex; gap: 14px;
}
.touch-btn {
  pointer-events: auto; width: 76px; height: 76px; border-radius: 50%;
  background: #ffffffcc; color: #1f4d40; font-size: 1.6rem; padding: 0; min-height: 0;
  box-shadow: 0 0 0 1.5px #1f4d4040;
}
/* Hand und Herz zeigen, was sie tun (18.10.2026): Symbol und darunter ein
   Wort. Ohne Ziel in Reichweite bleibt die Hand blass — sie ist da, aber
   gerade gibt es nichts anzufassen. */
#btn-interact, #btn-begleiter-pet {
  width: 92px; height: 82px; border-radius: 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
#btn-interact:not(.leer) { background: #fffffff2; box-shadow: 0 0 0 3px #2f6f5e; }
#btn-interact.leer { opacity: .55; }
.hand-icon { font-size: 1.7rem; line-height: 1; }
.hand-wort { font-size: .95rem; font-weight: 700; line-height: 1.1; white-space: nowrap; }

/* ---------- Enge Bildschirme: das HUD darf sich nicht selbst verdecken ----
   Gemessen auf 390×780 (Auftraggeber, 10.09.2026): die Knopfleiste rechts war
   425 px breit, begann also bei x = −49 und lag vollständig über der
   Münzanzeige; Steuerkreis und Sprungknopf überlappten sich um 40 px, auf
   360×560 um 70. Drei Maßnahmen, alle nur auf schmalen Schirmen:

   1. Knöpfe und Münzpille werden kompakt und dürfen umbrechen.
   2. Die Touch-Knöpfe stehen als 2×2-Feld statt in einer langen Reihe —
      damit bleiben sie rechts vom Steuerkreis.
   3. Der Hinweis rückt über die Knöpfe, nicht in ihre Mitte. */
@media (max-width: 620px) {
  /* Die Münzpille darf die Knopfleiste nie erreichen: sie bekommt einen
     festen Anteil der Breite und schneidet notfalls ab, statt sich
     darüberzulegen (im Testmodus stehen dort sechsstellige Zahlen). */
  .hud-pill { font-size: 1rem; padding: 6px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #zoo-top-left { max-width: 38vw; }
  #zoo-top-right { max-width: 54vw; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .hud-btn { font-size: 1.05rem; padding: 6px 8px; min-height: 46px; min-width: 46px; border-radius: 11px; }
  .hud-btn.hud-exit { font-size: .95rem; }
  #touch-stick { width: 104px; height: 104px; left: 20px; }
  #touch-knob { left: 29px; top: 29px; width: 46px; height: 46px; }
  #touch-buttons {
    right: 18px; display: grid; grid-template-columns: repeat(2, auto);
    gap: 10px; justify-items: end;
  }
  .touch-btn { width: 64px; height: 64px; font-size: 1.35rem; }
  #btn-interact, #btn-begleiter-pet { width: 82px; height: 72px; }
  .hand-icon { font-size: 1.45rem; }
  .hand-wort { font-size: .85rem; }
  /* Auf dem Handy geht „ganz unten" nicht: dort liegen Steuerkreis und
     Knöpfe. Der Hinweis steht deshalb DARÜBER — immer noch in der unteren
     Bildhälfte, aber frei von den Bedienelementen. (Bis zum 11.09.2026 stand
     er oben; das verdeckte weniger als die Bildmitte, aber der Auftraggeber
     will ihn unten, und über den Knöpfen ist Platz dafür.) */
  .zoo-prompt {
    bottom: calc(196px + env(safe-area-inset-bottom)); top: auto;
    font-size: 1.1rem; padding: 8px 14px; max-width: 92vw;
  }
  /* Das Testmodus-Banner weicht nach unten aus — es sieht nur der Erwachsene,
     der Hinweis dagegen gehört zum Spiel. */
  .test-banner { top: calc(164px + env(safe-area-inset-top)); font-size: .9rem; }
  .zoo-toast { top: calc(164px + env(safe-area-inset-top)); font-size: 1.1rem; padding: 10px 16px; }
}

/* ---------- Gespräch mit einem Gast (23.09.2026) ----------
   Unten, über die ganze Breite, nie über der Knopfleiste oben. Oben stehen
   die beiden letzten Sätze (was das Kind gesagt hat, was der Gast antwortet),
   darunter die Sätze zur Wahl. Das hier ist LESESTOFF: Schrift wie in den
   Sprechblasen (1,35 rem) bzw. wie in den Übungsknöpfen (1,2 rem), §10. */
.zoo-gespraech {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(820px, calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  max-height: calc(100% - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px 14px; border-radius: 18px; text-align: left;
  background: #fbfdfcf7; box-shadow: 0 8px 28px #0003; pointer-events: auto;
  /* Über den Sprechblasen: deren Klone hängen HINTER dem Feld im Dokument. */
  z-index: 3;
}
.gespraech-verlauf { display: flex; flex-direction: column; gap: 4px; flex: none; }
.gespraech-verlauf p { margin: 0; line-height: 1.35; }
.gespraech-verlauf b { display: block; font-size: 1rem; color: #4a6572; }
.gespraech-kind { align-self: flex-end; text-align: right; font-size: 1.15rem; color: #33424e; max-width: 92%; }
.gespraech-gast { font-size: 1.35rem; color: #1f2933; }
.gespraech-titel { font-size: 1rem; font-weight: 700; color: #4a6572; flex: none; }
.gespraech-wahl {
  display: grid; grid-template-columns: 1fr; gap: 8px;
  /* Eine lange Tierliste rollt IN der Leiste, nicht die Seite. */
  overflow-y: auto; min-height: 0; overscroll-behavior: contain; touch-action: pan-y;
}
.gespraech-wahl.raster { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
button.gespraech-knopf {
  display: flex; align-items: center; gap: 10px; text-align: left;
  min-height: 52px; padding: 8px 12px; font-size: 1.25rem; font-weight: 600; line-height: 1.3;
  background: #eef6f1; color: #1f2933; border: 2px solid #cfe3d6; border-radius: 14px;
}
button.gespraech-knopf:hover { background: #e0efe6; }
button.gespraech-knopf.leise { background: #f1f4f7; border-color: #dde4ea; color: #33424e; }
/* Eine Geschichte (02.10.2026): immer oben und warm hervorgehoben — so findet
   das Kind das Neue sofort. Still, ohne Bewegung. */
button.gespraech-knopf.neu { background: #fff4d4; border-color: #e8c46a; }
button.gespraech-knopf.neu:hover { background: #ffecb8; }
.gespraech-knopf .em { font-size: 1.35rem; flex: none; width: 1.5em; text-align: center; }
/* NIE mitten im Wort trennen: „Giraf-fe" liest ein leseschwaches Kind nicht
   als Giraffe (23.09.2026, gesehen auf dem Handy quer). Umbrochen wird nur an
   Leerzeichen; die Knöpfe sind breit genug für das längste Wort. */
.gespraech-knopf .satz { flex: 1 1 auto; min-width: 0; overflow-wrap: normal; word-break: normal; hyphens: manual; }
/* Im Raster (Tiere, Sorten) steht das Bild ÜBER dem Wort — so reicht die
   Breite auch für „Capybara" in vier Spalten. Die Ziffer sitzt in der Ecke. */
.gespraech-wahl.raster .gespraech-knopf {
  position: relative; flex-direction: column; justify-content: center; gap: 2px;
  text-align: center; padding: 8px 6px;
}
.gespraech-wahl.raster .gespraech-knopf .nr { position: absolute; top: 5px; left: 5px; width: 1.4em; height: 1.4em; font-size: .75rem; }
.gespraech-wahl.raster .gespraech-knopf .em { width: auto; font-size: 1.6rem; line-height: 1.1; }
.gespraech-wahl.raster .gespraech-knopf .satz { flex: none; }
/* Die Ziffer zeigt, welche Taste den Satz wählt — nur mit Tastatur sinnvoll. */
.gespraech-knopf .nr {
  flex: none; width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center;
  background: #2f6f5e; color: #fff; font-size: .85rem; font-weight: 700;
}
@media (hover: none) { .gespraech-knopf .nr { display: none; } }
.zoo-gespraech.wartet .gespraech-wahl { opacity: .55; pointer-events: none; }
/* Auf dem Tablet und am Rechner stehen die Sätze in zwei Spalten. */
@media (min-width: 700px) { .gespraech-wahl { grid-template-columns: 1fr 1fr; } }
/* Solange geredet wird, verdeckt nichts die Leiste: kein Steuerkreis, keine
   Touch-Knöpfe, kein Hinweis. Gelaufen wird nach dem Gespräch. */
body.gespraech-offen #touch-ui, body.gespraech-offen #zoo-prompt, body.gespraech-offen #btn-zoo-heft { display: none !important; }
/* Handy hochkant: oben kann die Knopfleiste zweizeilig sein. */
@media (max-width: 620px) {
  .zoo-gespraech { max-height: calc(100% - 128px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 10px 10px 12px; }
  .gespraech-gast { font-size: 1.3rem; }
  button.gespraech-knopf { font-size: 1.25rem; min-height: 50px; }
  .gespraech-wahl.raster { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
/* Handy quer: wenig Höhe. Zwei Spalten, knapper, und der eigene Satz fällt
   weg — das Kind hat ihn gerade selbst gewählt. */
@media (max-height: 520px) {
  .zoo-gespraech { max-height: calc(100% - 78px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 8px 10px 10px; gap: 6px; }
  .gespraech-kind, .gespraech-titel { display: none; }
  .gespraech-gast { font-size: 1.25rem; }
  .gespraech-verlauf b { display: inline; margin-right: .4em; }
  .gespraech-wahl { grid-template-columns: 1fr 1fr; gap: 6px; }
  button.gespraech-knopf { min-height: 46px; padding: 6px 10px; font-size: 1.2rem; }
  /* Quer: das Raster ohne Bild über dem Wort, sonst wird es zu hoch. */
  .gespraech-wahl.raster { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .gespraech-wahl.raster .gespraech-knopf { flex-direction: row; gap: 6px; padding: 6px 8px; }
  .gespraech-wahl.raster .gespraech-knopf .em { font-size: 1.3rem; }
  .gespraech-wahl.raster .gespraech-knopf .satz { flex: 1 1 auto; line-height: 1.1; }   /* „Roter Panda" bricht um */
  /* Die Ziffer hilft nur mit Tastatur; ein quer gehaltenes Handy hat keine,
     und im schmalen Raster fehlte ohne sie der Platz für „Capybara". */
  .gespraech-wahl.raster .gespraech-knopf .nr { display: none; }
}

/* ---------- Kamera: der Sucher (23.09.2026) ----------
   Der Rahmen ist das Foto: gespeichert wird genau dieser Ausschnitt. Außen
   herum abgedunkelt, damit man sieht, was nicht mit aufs Bild kommt. */
/* Die Mappe der Fotografin (12.10.2026): ein Foto groß, darunter Blättern,
   „Ins Album" und „Fertig". */
.zoo-mappe {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #0006; pointer-events: auto; z-index: 4;
  padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
}
.mappe-karte {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: min(640px, 100%); max-height: 100%; padding: 14px; border-radius: 18px;
  background: #fbfdfc; box-shadow: 0 8px 28px #0004;
}
#mappe-bild { width: 100%; height: auto; max-height: 58vh; object-fit: contain; border-radius: 10px; background: #dfe7e3; border: 6px solid #fff; box-shadow: 0 2px 8px #0002; }
#mappe-titel { margin: 0; font-size: 1.35rem; font-weight: 700; color: #1f2933; text-align: center; }
.mappe-leiste { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; }
.mappe-leiste button { min-height: 52px; font-size: 1.1rem; padding: 0 18px; }
.mappe-pfeil { min-width: 64px; }
#mappe-zahl { min-width: 4em; text-align: center; color: #4a6572; font-variant-numeric: tabular-nums; }
.zoo-sucher { position: absolute; inset: 0; pointer-events: none; }
.sucher-rahmen {
  position: absolute; left: 50%; top: calc(50% - 46px); transform: translate(-50%, -50%);
  aspect-ratio: 4 / 3; width: min(calc(100vw - 32px), calc((100vh - 200px) * 4 / 3));
  border: 2px solid #ffffffb0; border-radius: 4px; box-shadow: 0 0 0 200vmax #0b1613a0;
}
@media (orientation: portrait) {
  .sucher-rahmen { aspect-ratio: 3 / 4; width: min(calc(100vw - 32px), calc((100vh - 230px) * 3 / 4)); }
}
.sucher-rahmen .ecke { position: absolute; width: 26px; height: 26px; border: 4px solid #fff; }
.sucher-rahmen .lo { left: -5px; top: -5px; border-right: 0; border-bottom: 0; }
.sucher-rahmen .ro { right: -5px; top: -5px; border-left: 0; border-bottom: 0; }
.sucher-rahmen .lu { left: -5px; bottom: -5px; border-right: 0; border-top: 0; }
.sucher-rahmen .ru { right: -5px; bottom: -5px; border-left: 0; border-top: 0; }
.sucher-hinweis {
  position: absolute; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top));
  color: #fff; font-size: 1.1rem; font-weight: 600; text-shadow: 0 1px 4px #000a; max-width: 92vw; text-align: center; margin: 0;
}
.sucher-knoepfe {
  position: absolute; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex; justify-content: center; align-items: center; gap: 28px; pointer-events: auto;
}
button.sucher-ausloesen {
  width: 84px; height: 84px; min-height: 0; padding: 0; border-radius: 50%;
  background: #ffffffee; border: 4px solid #fff; box-shadow: 0 2px 10px #0006; display: grid; place-items: center;
}
button.sucher-ausloesen span { width: 62px; height: 62px; border-radius: 50%; border: 3px solid #2f3238; background: #fff; }
button.sucher-ausloesen:hover { background: #fff; }
button.sucher-neben { min-height: 56px; min-width: 64px; padding: 10px 18px; font-size: 1.15rem; background: #ffffffe6; color: #1f4d40; }
button.sucher-neben:hover { background: #fff; }
.sucher-blitz { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.sucher-blitz.an { animation: sucherBlitz .35s ease-out; }
@keyframes sucherBlitz { from { opacity: .85; } to { opacity: 0; } }
body.foto-modus #zoo-top-left, body.foto-modus #zoo-top-right, body.foto-modus .zoo-bubble,
body.foto-modus #zoo-prompt, body.foto-modus #touch-ui, body.foto-modus .zoo-gespraech { display: none !important; }
/* Handy quer: die Knöpfe rechts neben dem Bild, sonst wäre der Rahmen winzig. */
@media (max-height: 520px) and (orientation: landscape) {
  .sucher-rahmen { left: calc(50% - 56px); top: 50%; width: min(calc(100vw - 170px), calc((100vh - 36px) * 4 / 3)); }
  .sucher-knoepfe {
    left: auto; right: calc(10px + env(safe-area-inset-right)); bottom: 50%; transform: translateY(50%);
    flex-direction: column; gap: 14px;
  }
  .sucher-hinweis { display: none; }
  button.sucher-ausloesen { width: 72px; height: 72px; }
  button.sucher-ausloesen span { width: 52px; height: 52px; }
  button.sucher-neben { min-height: 48px; padding: 6px 12px; font-size: 1rem; }
}

/* ---------- Puppentheater (02.11.2026) ---------- */
button.zoo-theater-knopf {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(5vh + 72px + env(safe-area-inset-bottom));
  min-height: 56px; padding: 10px 30px; font-size: 1.3rem; font-weight: 700; border-radius: 16px; pointer-events: auto;
}
@media (pointer: coarse), (max-width: 760px) {
  button.zoo-theater-knopf { bottom: calc(246px + env(safe-area-inset-bottom)); }
}
body.foto-modus .zoo-theater-knopf { display: none !important; }

/* ---------- Stempelheft (02.11.2026) ---------- */
.stempel-seiten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; width: min(760px, 94vw); }
.stempel-seite { background: #fffdf5; border-radius: 14px; padding: 10px 12px 14px; box-shadow: 0 2px 10px #0001; }
.stempel-seite h3 { margin: 0 0 8px; font-size: 1.15rem; color: #1f4d40; }
.stempel-seite.voll { outline: 3px solid #e6b422; outline-offset: -3px; }
.stempel-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
button.stempel {
  aspect-ratio: 1; min-height: 0; padding: 6px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #2f7a5e; border: 3px dashed #c9d8cf; font-size: 2rem; line-height: 1;
}
button.stempel:hover { background: #fff; }
button.stempel.da { border: 3px solid #2f7a5e; transform: rotate(-6deg); }
button.stempel.offen { color: #b5c4bb; font-size: 1.4rem; }
.stempel-satz { min-height: 1.5em; font-size: 1.15rem; text-align: center; color: #1f4d40; }

/* ---------- Fotoalbum (23.09.2026) ---------- */
.album-raster {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 200px)); justify-content: center;
  gap: 12px; width: min(900px, 94vw);
}
button.album-bild {
  display: flex; flex-direction: column; gap: 6px; padding: 8px; min-height: 0;
  background: #fff; color: #1f4d40; border-radius: 14px; font-size: 1.05rem; line-height: 1.3; text-align: center;
  box-shadow: 0 2px 10px #0001;
}
button.album-bild:hover { background: #f4faf6; }
.album-bild img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #dfe8e3; display: block; }
.album-leer { grid-column: 1 / -1; }
.album-gross {
  position: fixed; inset: 0; z-index: 30; background: #0f1d19;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right))
           calc(14px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
}
.album-figur { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 0; max-width: 100%; }
.album-figur img {
  max-width: min(94vw, 1100px); max-height: calc(100vh - 240px); object-fit: contain;
  border-radius: 10px; background: #000; display: block;
}
.album-figur figcaption { color: #fff; font-size: 1.4rem; font-weight: 700; text-align: center; }
.album-datum { color: #c9d8d1; font-size: 1rem; margin: 0; }
.album-leiste { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.album-leiste button, .knopf-link { min-height: 52px; padding: 10px 18px; font-size: 1.1rem; }
.knopf-link {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  font-weight: 600; border-radius: 14px; background: #e2e8ee; color: #24313d; border: 2px solid transparent;
}
.knopf-link:hover { background: #d5dde5; }
.knopf-link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.album-frage {
  background: #fff; border-radius: 14px; padding: 12px 16px;
  display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap;
}
.album-frage p { width: 100%; text-align: center; font-size: 1.25rem; font-weight: 700; color: #1f2933; margin: 0; }
@media (max-width: 520px) {
  .album-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .album-leiste button, .knopf-link { padding: 8px 12px; font-size: 1rem; }
  .album-figur img { max-height: calc(100vh - 300px); }
}
@media (max-height: 520px) {
  .album-gross { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .album-figur img { max-height: calc(100vh - 110px); max-width: calc(100vw - 200px); }
  .album-figur figcaption { font-size: 1.1rem; }
  .album-leiste { flex-direction: column; flex-wrap: nowrap; }
  .album-leiste button, .knopf-link { min-height: 44px; padding: 4px 12px; font-size: .95rem; }
}

/* ---------- Laden ---------- */
.progress { width: min(360px, 74vw); height: 16px; background: #fff; border-radius: 999px; overflow: hidden; }
#loading-bar { height: 100%; width: 0%; background: #2f6f5e; transition: width .25s; }
/* Beim Betreten des Zoos: über allem, auch über dem HUD. Der Glanz läuft als
   transform-Animation auf dem Compositor weiter, während der Zoo gebaut wird
   und der Hauptfaden beschäftigt ist — man sieht, dass etwas geschieht. */
#zoo-laden {
  position: fixed; inset: 0; z-index: 150;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity .35s;
}
#zoo-laden.weg { opacity: 0; pointer-events: none; }
#zoo-laden p { font-size: 1.3rem; font-weight: 600; color: #1f4d40; }
#zoo-laden-balken { height: 100%; width: 4%; background: #2f6f5e; transition: width .3s; }
/* Der Glanz läuft über die GANZE Leiste (02.11.2026): auf den 4 % am Anfang,
   solange der Zoo gebaut wird, sah man ihn nicht, und der Balken wirkte stehen
   geblieben. */
#zoo-laden .progress { position: relative; }
#zoo-laden .progress::after {
  content: ''; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, #2f6f5e40, transparent);
  transform: translateX(-100%); animation: zoo-laden-glanz 1.4s linear infinite;
}
@keyframes zoo-laden-glanz { to { transform: translateX(250%); } }
/* Kommt der Zoo-Code nicht an (04.11.2026): ein Satz und „Noch einmal" statt
   eines Balkens, der stehen bleibt. */
#zoo-laden-hinweis { display: none; }
#zoo-laden.mit-hinweis #zoo-laden-hinweis { display: flex; }
#zoo-laden.mit-hinweis .progress { display: none; }

/* Bewegungsempfindliche Nutzer: alle Übergänge aus. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Übungskalender (Dranbleiben sichtbar machen) ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; width: min(300px, 82vw); }
.calendar .cal-head { font-size: .72rem; color: #5b6b7a; font-weight: 700; }
.calendar .cal-day {
  aspect-ratio: 1; border-radius: 7px; background: #ffffff88; border: 1px solid #c7d3dc;
  display: grid; place-items: center; font-size: .7rem; color: #7d8f9c;
}
.calendar .cal-day.done { background: #2f6f5e; border-color: #2f6f5e; color: #fff; font-weight: 700; }
.calendar .cal-day.full { box-shadow: inset 0 0 0 2px #ffd54a; }
.calendar .cal-day.empty { background: none; border: none; }
.calendar .cal-day.future { opacity: .4; }
.calendar .cal-title { grid-column: 1 / -1; font-size: .95rem; color: #3d4f5c; font-weight: 600; }

/* ---------- Laden mit Reitern ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; width: min(560px, 100%); }
.tabs button {
  font-size: 1.15rem; padding: 10px 18px; min-height: 48px; border-radius: 12px;
  background: #ffffffcc; color: #3d4f5c;
}
.tabs button.active { background: #2f6f5e; color: #fff; }
.shop-list { max-width: 100%; width: min(560px, 100%); }
/* Der Ausgang des Ladens stand unter der ganzen Liste — auf keinem Gerät im
   Bild (Tiere-Reiter: 1,2 m Scroll auf dem iPad, 14.09.2026). Wie beim
   Figur-Editor bleibt er jetzt am unteren Rand stehen; dasselbe für die
   Tierkarte, deren Zurück auf dem Handy unter dem Rand lag. */
#screen-shop > .menu-buttons:last-child, #screen-animal > .menu-buttons:last-child {
  /* Über die ganze Breite und bis an den unteren Rand, auch über die
     Polsterung des Bildschirms (18 px): nur so breit wie der Knopf lag der
     Verlauf als blasses Rechteck mitten auf der Liste, und darunter schaute
     die Liste hervor. */
  position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); z-index: 2;
  padding: 14px 0 calc(26px + env(safe-area-inset-bottom));
  margin: 0 calc(-18px - env(safe-area-inset-right)) 0 calc(-18px - env(safe-area-inset-left));
  align-self: stretch; align-items: center;
  background: linear-gradient(to top, #cfe9c9 70%, #cfe9c900);
}
#screen-shop > .menu-buttons:last-child button, #screen-animal > .menu-buttons:last-child button { width: min(340px, 86vw); }
.shop-item .stock { font-size: 1.05rem; color: #4b5b6a; }
.shop-item .progress-mini { height: 7px; background: #e6ebf0; border-radius: 999px; margin-top: 6px; overflow: hidden; }
.shop-item .progress-mini > i { display: block; height: 100%; background: #b07d1a; }

/* ---------- Figur gestalten ---------- */
.editor-canvas {
  width: min(320px, 78vw); height: min(320px, 78vw); border-radius: 20px;
  background: linear-gradient(160deg, #eaf4ff, #dff0d8); touch-action: none;
}
.editor-controls { display: flex; flex-direction: column; gap: 12px; width: min(520px, 100%); }
/* Zoombare Vorschau (02.10.2026): Knöpfe ＋/− unten rechts auf dem Bild. */
.editor-vorschau { position: relative; }
.editor-zoom { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.editor-zoom button { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 1.4rem; line-height: 1; }
/* Farben hinter einem Schalter: die Zeile zeigt ihre Farbe, die Auswahl
   klappt erst auf Tipp auf (02.10.2026). */
.farb-schalter {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 12px;
  background: #ffffffcc; color: #3d4f5c; border-radius: 14px; text-align: left;
}
.farb-schalter .label { flex: 1; font-size: 1rem; }
.farb-chip { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #9fb0bb; flex: none; }
.farb-pfeil { font-size: 1rem; color: #4a6572; flex: none; }
.swatches.zu { display: none; }
/* Die Freundinnen und Freunde des Kindes (02.10.2026). */
.editor-freunde { width: min(520px, 100%); display: flex; flex-direction: column; gap: 6px; }
.editor-freunde h3 { margin: 6px 0 2px; font-size: 1.05rem; color: #2f4a3f; }
.editor-freunde ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.editor-freunde li { background: #fff4d4; border: 2px solid #e8c46a; border-radius: 14px; padding: 6px 12px; font-size: 1.05rem; }
.editor-freunde li small { display: block; font-size: .85rem; color: #6b5a2a; }
/* „Fertig" bleibt am unteren Rand stehen, auch wenn Farbfelder und Frisuren
   scrollen. Mit neun Frisuren (11.09.2026) reicht die Liste sonst über den
   Bildschirmrand hinaus, und der Knopf zum Schließen war nicht zu sehen. */
#screen-editor .menu-buttons {
  position: sticky; bottom: calc(-2px - env(safe-area-inset-bottom)); z-index: 2;
  padding: 10px 0 calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, #cfe9c9 62%, #cfe9c900);
}
.swatch-row { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.swatch-row .label { font-size: .95rem; font-weight: 600; color: #3d4f5c; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 40px; height: 40px; min-height: 40px; border-radius: 50%; padding: 0;
  border: 3px solid #ffffffcc;
}
.swatch.active { border-color: #1f4d40; box-shadow: 0 0 0 2px #1f4d40; }
.style-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.style-btns button { font-size: .95rem; padding: 10px 16px; min-height: 46px; background: #ffffffcc; color: #3d4f5c; }
.style-btns button.active { background: #2f6f5e; color: #fff; }
.style-btns button[disabled] { opacity: .45; }

/* ---------- Kinder-PIN: großes Ziffernfeld, keine Schrift zu lesen ---------- */
.pin-dots { display: flex; gap: 14px; }
.pin-dots i {
  width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid #2f6f5e; background: transparent; display: block;
}
.pin-dots i.on { background: #2f6f5e; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(300px, 82vw); }
.pin-pad button {
  font-size: 1.8rem; font-weight: 700; min-height: 72px; padding: 0;
  background: #fff; color: #1f4d40; border: 2px solid #b8c4ce;
}
.pin-pad button:hover { background: #eef3f7; }
.pin-pad button.wide { grid-column: span 1; font-size: 1.3rem; }
.pin-pad button.ghost { background: transparent; border-color: transparent; color: #3d4f5c; }

/* ---------- Fehlerprofil in der Elternansicht ---------- */
.matrix { width: 100%; border-collapse: collapse; font-size: .95rem; }
.matrix td, .matrix th { padding: 7px 8px; border-bottom: 1px solid #eef2f5; text-align: left; vertical-align: top; }
.suffix {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #eef3f7; border-radius: 5px; padding: 1px 7px; font-weight: 700; color: #24313d;
  white-space: nowrap;
}
.suffix.bad { background: #fdf1d8; color: #8a6410; }
.arrow { color: #8595a2; padding: 0 4px; }
.bars { display: flex; gap: 10px; align-items: flex-end; height: 96px; margin: 10px 0 4px;
  max-width: 420px; }
.bars > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; }
.bars .v { font-size: .8rem; color: #5b6b7a; font-variant-numeric: tabular-nums; }
.bars .b { width: 100%; border-radius: 5px 5px 0 0; background: #2f6f5e; min-height: 3px; }
.bars .b.low { background: #c7a04a; }
.bars .l { font-size: .78rem; color: #8595a2; }
.focus-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef2f5; flex-wrap: wrap; }
.focus-row .grow { flex: 1 1 11rem; }
.seg { display: flex; gap: 4px; }
.seg button { font-size: .85rem; padding: 8px 14px; min-height: 42px; background: #eef3f7; color: #3d4f5c; }
.seg button.on { background: #2f6f5e; color: #fff; }
.hint-box { background: #f2f6f9; border-left: 4px solid #2f6f5e; padding: 12px 14px; border-radius: 0 10px 10px 0; font-size: .95rem; color: #24313d; }
.hint-box.warn { background: #fdf1d8; border-left-color: #b07d1a; color: #6b4e12; }

/* ---------- Speicher-Warnung: bleibt stehen, bis das Problem behoben ist ---------- */
.storage-warning {
  position: fixed; z-index: 90; left: 50%; transform: translateX(-50%);
  top: calc(8px + env(safe-area-inset-top)); width: min(680px, 94vw);
  background: #fdf1d8; color: #6b4e12; border: 2px solid #e3c583;
  border-radius: 12px; padding: 12px 16px; font-size: .95rem; line-height: 1.5;
  box-shadow: 0 4px 18px #0002;
}

/* ---------- Ersteinrichtung ---------- */
.setup-steps { display: flex; gap: 8px; }
.setup-steps i { width: 34px; height: 6px; border-radius: 999px; background: #ffffff99; display: block; }
.setup-steps i.done { background: #2f6f5e; }
.setup-steps i.now { background: #1f4d40; }
.setup-card { width: min(460px, 92vw); gap: 14px; }
.setup-card h2 { font-size: 1.5rem; text-align: left; }
.setup-card .menu-buttons { min-width: 0; }
.setup-card p { color: #3d4f5c; font-size: 1rem; line-height: 1.55; }
.setup-card .fehler { color: #8a6410; font-weight: 600; min-height: 1.4em; }

/* ---------- Kindermenü: weniger Wörter ---------- */
.week-strip.compact .week-label { display: none; }
.small-row button { font-size: 1rem; min-height: 50px; padding: 12px 18px; }
.tiny-row { gap: 22px; margin-top: 8px; }

/* ---------- Elternansicht: alles außer der Übersicht eingeklappt ---------- */
.uebersicht { display: grid; gap: 10px; }
.uebersicht .zeile { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #eef2f5; }
.uebersicht .zeile:last-child { border-bottom: 0; }
.uebersicht .k { color: #5b6b7a; font-size: .95rem; }
.uebersicht .v { font-weight: 700; color: #24313d; text-align: right; }
details.abschnitt { background: #fff; border-radius: 16px; padding: 0; overflow: hidden; }
details.abschnitt > summary {
  cursor: pointer; list-style: none; padding: 16px 18px; font-size: 1.1rem; font-weight: 700; color: #1f4d40;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
details.abschnitt > summary::-webkit-details-marker { display: none; }
details.abschnitt > summary::after { content: '›'; font-size: 1.4rem; color: #8595a2; transform: rotate(90deg); transition: transform .15s; }
details.abschnitt[open] > summary::after { transform: rotate(-90deg); }
details.abschnitt > summary .kurz { font-size: .9rem; font-weight: 500; color: #5b6b7a; margin-left: auto; margin-right: 8px; }
details.abschnitt > .inhalt { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 14px; }
details.abschnitt > .inhalt h4 { font-size: 1rem; margin: 6px 0 0; color: #24313d; }
.zwei-spalten { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .zwei-spalten { grid-template-columns: 1fr 1fr; } }

/* ---------- Installations-Hinweis ---------- */
.install-hint {
  position: fixed; z-index: 85; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom)); width: min(640px, 94vw);
  background: #1f4d40; color: #fff; border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; font-size: .95rem; line-height: 1.45;
  box-shadow: 0 6px 22px #0004;
}
/* Nur im Hauptmenü (24.09.2026): im Zoo lag der Hinweis auf iPhone und iPad
   über dem Steuerknüppel, auf dem Übungsbildschirm hat er nach Regel 8 nichts
   zu suchen. `data-bildschirm` setzen show()/showZoo() in main.js. */
body:not([data-bildschirm="menu"]) #install-hint { display: none; }
.install-hint span { flex: 1; }
.install-hint button { min-height: 44px; padding: 8px 14px; font-size: .95rem; }
.install-hint .quiet { color: #fff; }

/* ---------- Kinder vom anderen Gerät auswählen ---------- */
.kinder-wahl { display: flex; flex-direction: column; gap: 10px; }
.kinder-wahl .wahl { background: #eef3f7; color: #24313d; text-align: left; border: 2px solid #b8c4ce; }
.kinder-wahl .wahl.on { background: #2f6f5e; color: #fff; border-color: #2f6f5e; }
.kinder-wahl .wahl.on::before { content: '✓ '; }


/* --- Zusammen lesen (F5) -------------------------------------------------
   F5 ist seit 31.08.2026 Pflichtbaustein und laut §5 „das wichtigste
   Einzelelement der Woche" — der Einstieg bekommt deshalb einen eigenen
   großen Knopf, nicht mehr eine kleine Zeile unter „Meine Figur". */
.f5-big {
  background: #2f6f5e;
  color: #fff;
}
.f5-big:hover { filter: brightness(1.08); }

/* ---------- Zusammen lesen (F5) ----------
   Der Bildschirm muss OHNE Scrollen bedienbar sein: Kopf, Text, Fußleiste.
   Vorher wuchs der Mittelteil mit der Anleitung, bis Text und Knöpfe unter
   den Bildrand rutschten — und ein Kind sucht nicht, es gibt auf. */
.f5-screen { overflow: hidden; }
/* `minmax(0, 1fr)`: die Mitte darf schrumpfen, sonst schob die Rundenanzeige
   rechts über den Rand hinaus (bis 150 px auf 360 px, 14.09.2026). */
.f5-head { grid-template-columns: auto minmax(0, 1fr) auto; }
/* Der Ausgang war ein blasses ✕ in der Ecke. Jetzt beschriftet und sichtbar —
   ein Erwachsener muss ihn finden, ohne zu suchen. */
.ausgang {
  background: #e7edf2; color: #33424e; font-size: 1.05rem; font-weight: 700;
  padding: 10px 16px; min-height: 46px; border-radius: 12px;
}
.ausgang:hover { background: #d9e2ea; }
.f5-main {
  flex: 1 1 auto; min-height: 0; justify-content: flex-start;
  gap: 14px; overflow: hidden; width: 100%;
}
/* Der Text bekommt den Platz, der übrig ist — er ist das Wichtigste auf
   diesem Bildschirm. Lange Texte scrollen INNERHALB des Kastens, damit die
   Knöpfe stehen bleiben.

   Scrollen ist hier aber die NOTLÖSUNG, nicht der Normalfall: wer beim
   Vorlesen scrollen muss, verliert die Zeile — und „Zeile übersprungen" ist
   genau der Fehler, den dieser Bildschirm zählt (Auftraggeber, 09.09.2026).
   Gemessen war es der Normalfall: auf JEDEM iPad brauchten alle 42 Texte
   Scrollen, im Querformat waren 2 von 14 Zeilen zu sehen. Drei Dinge dagegen,
   hier und in `main.js: textEinpassen`. */
.f5-main .reading-text {
  flex: 0 1 auto; min-height: 6.5em; overflow-y: auto; overscroll-behavior: contain;
  width: 100%;          /* so hoch wie der Text, siehe `.f6-screen .fade-text` */
}
/* (1) Auf breiten Geräten darf der Kasten breiter werden. 42 rem sind bei
   27 px rund 40 Zeichen — für die Zeilenführung angenehm, aber auf einem
   1194 px breiten iPad blieben 500 px ungenutzt, und der Text fiel dafür in
   doppelt so viele Zeilen. 52 rem sind rund 50 Zeichen und liegen weiter im
   guten Bereich; die Zeilenbänder (`body.zeilenhilfe`) führen die Rücksprünge. */
@media (min-width: 900px) {
  /* Auch der Mittelteil muss mitwachsen: `.learn-main` deckelt bei 46 rem,
     und daran hing der Kasten fest, egal was seine eigene max-width sagte. */
  .f5-main { max-width: 54rem; }
  .f5-main .reading-text { max-width: 52rem; }
}
/* (2) Während gelesen wird, gehört der Bildschirm dem Text. Anleitung für
   Erwachsene, Anweisungszeile und Titel sagen dem lesenden Kind nichts mehr —
   sie kosten aber 80 px, und Regel 8 will ohnehin einen ruhigen Bildschirm,
   solange gearbeitet wird. */
.f5-liest #f5-erwachsen, .f5-liest #f5-instruction, .f5-liest #f5-title { display: none; }
/* (3) Der Lesestreifen legt sich auf flachen Geräten in eine Reihe — die
   Regeln dazu stehen WEITER UNTEN, direkt hinter `.f5-laeuft`. Hier oben
   hätte die spätere Basisregel sie überschrieben (gleiche Spezifität, eine
   Media-Abfrage zählt dabei nicht), und `flex: 1 0 100%` auf dem Titel hätte
   in der Spalte die ganze Höhe an sich gezogen. */
/* Passt der Text nicht ganz, SAGT der Kasten es (lesekasten.js setzt `.mehr`,
   solange unter dem Ausschnitt noch Text steht, und `.davor`, sobald gerollt
   wurde). Vorher lief die letzte Zeile nur weich aus — das las niemand als
   „hier geht es weiter", ein Kind schon gar nicht (Auftraggeber, 21.09.2026).
   Der Streifen klebt am unteren Kastenrand (`sticky`), kostet keine Rollhöhe
   (negativer Rand) und steht still (Regel 8). */
/* Beide Hinweise reichen bis an den Kastenrand (18.11.2026): `sticky` klebt an
   der Innenkante, der Innenabstand (lesekasten.js setzt ihn als --rk-*) lag
   frei, und dort lief der Text beim Rollen sichtbar über und unter den
   Hinweisen vorbei. Negative Ränder ziehen sie über den Innenabstand. */
.rollkasten.mehr::after {
  content: '▼  ' attr(data-mehr);
  position: sticky; bottom: calc(-1 * var(--rk-pb, 0px)); z-index: 1;
  display: flex; align-items: flex-end; justify-content: center;
  height: calc(56px + var(--rk-pb, 0px)); padding-bottom: 8px;
  margin: calc(-56px - var(--rk-pb, 0px)) calc(-1 * var(--rk-pr, 0px)) 0 calc(-1 * var(--rk-pl, 0px));
  box-sizing: border-box;
  font-size: 1rem; line-height: 1.2; font-weight: 700; letter-spacing: 0; color: #1f4d40;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .96) 35%, #fff 55%);
  border-radius: 0 0 14px 14px; cursor: pointer;
}
.rollkasten.davor::before {
  content: '▲';
  position: sticky; top: calc(-1 * var(--rk-pt, 0px)); z-index: 1;
  display: flex; align-items: flex-start; justify-content: center;
  height: calc(32px + var(--rk-pt, 0px)); padding-top: 3px;
  margin: calc(-1 * var(--rk-pt, 0px)) calc(-1 * var(--rk-pr, 0px)) -32px calc(-1 * var(--rk-pl, 0px));
  box-sizing: border-box;
  font-size: .85rem; line-height: 1.2; color: #5b6b7a; pointer-events: none;
  background: linear-gradient(to top, rgba(255, 255, 255, 0), rgba(255, 255, 255, .96) 40%, #fff 60%);
  border-radius: 14px 14px 0 0;
}
/* „Fertig gelesen" steht seit dem 02.10.2026 am ENDE des Textes, im Kasten
   (main.js: startF5), nicht mehr im Streifen darunter. Auftraggeber: das Kind
   übersprang den letzten Satz und drückte sofort auf Fertig — der Knopf lag
   die ganze Zeit sichtbar unter dem Text. Jetzt führt der Weg zu ihm über
   den letzten Satz. Keine Sperre, keine Zeit: nur die Stelle. */
.reading-text .f5-stop {
  /* Direkt hinter dem letzten Wort, in derselben Zeile, wenn Platz ist —
     sonst am Anfang der nächsten. Als eigene Zeile darunter kostete er die
     längeren Texte (Stufe 3–5, bis 100 Wörter) auf dem iPad quer genau eine
     Zeile zu viel (gemessen 13 von 84 Texten, +25 px). 44 px hoch: groß
     genug zum Tippen (§10), kaum höher als eine Textzeile. */
  display: inline-flex; align-items: center; vertical-align: middle;
  margin: 0 0 0 .4em; min-height: 44px; padding: 4px 20px;
  font-size: 1.05rem; line-height: 1.1; letter-spacing: 0; word-spacing: normal; white-space: nowrap;
}
.f5-foot { gap: 12px; }
.f5-vorbereitung { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
/* Während gelesen wird, sieht der Bildschirm anders aus — nicht nur die
   Beschriftung eines Knopfes. Vorher tauschten „Jetzt lesen" und „Fertig
   gelesen" am selben Platz den Text, und niemand bemerkte den Wechsel. */
.f5-laeuft {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 100%; max-width: 30rem; padding: 14px; border-radius: 18px;
  background: #eaf4ef; border: 2px solid #b9d9cc;
}
.f5-laeuft-titel { margin: 0; font-size: 1.1rem; font-weight: 700; color: #2f6f5e; }
/* Flaches, breites Fenster (iPad quer): die drei Knöpfe nebeneinander statt
   übereinander. Übereinander kostete der Streifen 313 px — im Querformat fast
   die Hälfte des Bildschirms, und die fehlten dem Text. Der Verleser-Knopf
   bleibt der auffälligste und behält sein eigenes Feld (§10: große Ziele). */
@media (max-height: 880px) and (min-width: 900px) {
  .f5-laeuft {
    flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center;
    max-width: 62rem; padding: 10px 14px; gap: 10px 14px;
  }
  .f5-laeuft-titel { flex: 0 0 100%; }
  .f5-laeuft .tally { min-height: 74px; min-width: 200px; font-size: 1.2rem; }
  .f5-laeuft .tally.klein { min-height: 74px; }
  .f5-laeuft button.wide { width: auto; min-width: 14rem; min-height: 74px; }
}
.fertig { background: #b9761f; }
.fertig:hover { background: #a1671a; }

/* Rundenanzeige: sagt, wo im Ablauf man ist. Keine Bewertung, keine Zeit. */
.f5-runden {
  font-size: 1rem;
  color: #33424e;
  font-weight: 700;
  white-space: nowrap;
}
/* Schmal: die Rundenanzeige darf umbrechen, und der Titel weicht — neben
   „✕ Zurück" und „Teil 2 von 2 · erfundene Wörter" blieben ihm 47 px, und ein
   halb abgeschnittenes „Leseprobe" hilft niemandem (14.09.2026). Welcher
   Bildschirm das ist, sagt sein Inhalt. Diese Regeln MÜSSEN hinter der
   Grundregel stehen, sonst gewinnt `nowrap`. */
@media (max-width: 520px) {
  .f5-runden { white-space: normal; font-size: .9rem; line-height: 1.2; max-width: 10rem; text-align: right; }
  .f5-runden-zeile { min-width: 0; }
}
@media (max-width: 420px) {
  .f5-head .block-title { display: none; }
}

/* Anleitung für die Erwachsenen — bewusst abgesetzt, damit das Kind sofort
   sieht, dass dieser Kasten nicht für es gedacht ist. */
.f5-anleitung {
  background: #eef2f5;
  border-left: 3px solid #2f6f5e;
  padding: 10px 18px 10px 20px;
  margin: 0;
  text-align: left;
  width: 100%; max-width: 46rem;
  flex: 0 0 auto;
}
/* Aufklappbar: aufgeschlagen füllte sie die halbe Seite und schob den Text,
   den das Kind lesen soll, unter den Bildrand. */
.f5-anleitung[open] { padding-bottom: 14px; max-height: 40vh; overflow-y: auto; }
.f5-anleitung-titel {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #2f6f5e;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.f5-anleitung-titel::-webkit-details-marker { display: none; }
.f5-anleitung-titel::before { content: '▸ '; }
.f5-anleitung[open] .f5-anleitung-titel::before { content: '▾ '; }
.f5-anleitung[open] .f5-anleitung-titel { margin-bottom: 8px; display: block; }
.f5-anleitung ol { margin: 0; padding-left: 20px; }
.f5-anleitung li { margin-bottom: 6px; line-height: 1.5; }
.f5-anleitung li:last-child { margin-bottom: 0; }

/* Die genaue Zählweise braucht man einmal, nicht bei jedem Vorlesen —
   deshalb ausklappbar. */
.f5-details { margin-top: 12px; border-top: 1px solid #d7dfe5; padding-top: 10px; }
.f5-details summary {
  cursor: pointer; font-weight: 700; color: #2f6f5e; font-size: 15px;
}
.f5-details summary:focus-visible { outline: 2px solid #1f2933; outline-offset: 2px; }
.f5-details ul { margin: 4px 0 12px; padding-left: 20px; }
.f5-details li { margin-bottom: 5px; line-height: 1.45; }
.f5-details p { margin: 4px 0 0; line-height: 1.5; }
.f5-liste-titel {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; margin-top: 10px; color: #5b6b7a;
}
.f5-liste-titel.zaehlt { color: #8a6410; }
.f5-liste-titel.zaehlt-nicht { color: #2e7d32; }


/* --- F6: Lesen mit Verschwinden ------------------------------------------
   Der Text verblasst Buchstabe für Buchstabe in Leserichtung. Die Zeilenhöhe
   bleibt fest, damit nichts springt, während Zeichen unsichtbar werden. */
.fade-text { min-height: 9em; }
/* Zeilenführung (§10, Form): jede zweite Zeile liegt auf einem sehr hellen
   Band. Das ist keine „Therapie" (§4: Farbfilter, Spezialschriften), sondern
   ein Lesezeichen für den Rücksprung ans Zeilenende — dort gehen Zeilen
   verloren. Die Bänder sind 2em hoch wie die Zeile (line-height 2) und
   scrollen mit dem Text. Ein Erwachsener kann es abschalten. */
body.zeilenhilfe .reading-text {
  background-color: #fff;
  /* Zwei Lagen: die Bänder nur im INHALT (`content-box`), darunter Weiß bis an
     den Rand. Mit einer Lage liefen die Bänder in den Innenabstand hinein —
     über der ersten Zeile stand ein halbes Band (21.09.2026). */
  background-image: repeating-linear-gradient(to bottom,
    transparent 0, transparent 2em, rgba(47, 111, 94, .07) 2em, rgba(47, 111, 94, .07) 4em),
    linear-gradient(#fff, #fff);
  background-origin: content-box, border-box;
  background-clip: content-box, border-box;
  background-attachment: local, local;
}
.fade-text span { transition: none; }

/* „Noch einmal lesen" über den Fragen: ein großer Knopf, beliebig oft
   (28.09.2026 — vorher ein kleiner Rahmenknopf, einmal je Text).
   Wiederholtes Lesen ist die am besten belegte Komponente des Programms
   (HANDOFF §3D) — angeboten, deutlich, aber ohne etwas zu verlangen. */
.f6-nochmal {
  background: #e2e8ee; color: #24313d; border: 2px solid #b8c4cf;
  font-size: clamp(1.1rem, 4vw, 1.3rem); min-height: 60px; padding: 10px 20px;
  width: 100%; max-width: 28rem; margin: 0 auto 6px;
}
@media (hover: hover) { .f6-nochmal:hover { background: #d5dde5; } }
/* Fragen und Antworten so groß wie im Üben (§10: mindestens ~20 px). Bis zum
   28.09.2026 standen die Fragen in 16 px, die Antworten in 18 px — kleiner als
   jede andere Aufgabe (Auftraggeber: „sehr kleine Schriftgröße"). */
/* Seit 28.09.2026 Wortfragen: der Satz aus dem Text in Leseschrift, die
   Lücke wie im Lückensatz-Üben (F1), nach der Antwort gefüllt. */
.f6-wortfrage { font-size: clamp(1.3rem, 5vw, 1.6rem); font-weight: 700; color: #1f2933; margin: 14px 0 4px; }
.f6-frage { margin: 18px 0; }
.f6-frage-text { font-size: clamp(1.3rem, 5vw, 1.6rem); line-height: 1.7; letter-spacing: .02em; color: #1f2933; margin-bottom: 12px; }
.f6-frage-text .gap {
  display: inline-block; min-width: 4.5em; border-bottom: 4px solid #9fb4c0;
  vertical-align: bottom; margin: 0 .12em; line-height: 1.3;
}
.f6-frage-text .gap.filled { border-bottom-color: #2e7d32; color: #2e7d32; font-weight: 700; }
.f6-luecke { white-space: nowrap; }
.f6-optionen { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.f6-optionen button {
  flex: 1 1 12rem; max-width: 22rem; min-height: 64px;
  font-size: clamp(1.25rem, 4.6vw, 1.5rem); padding: 10px 18px; border-radius: 16px;
}
/* Nach der Antwort (24.09.2026): wie die Antwortflächen im Üben — die
   eigene Antwort umrandet, die richtige grün, die übrige blass. Vorher sahen
   gewählte und nicht gewählte Antwort gleich aus (dieselbe Farbe, beide
   gesperrt), und die richtige Antwort stand nirgends (Regel 2). */
.f6-optionen button:disabled { opacity: 1; }
.f6-optionen button.gewaehlt { box-shadow: 0 0 0 3px #2f6f5e; }
.f6-optionen button.richtig { background: #e8f4e9; color: #1c5220; border: 2px solid #2e7d32; }
.f6-optionen button.rest { background: #eaeff3; color: #46586a; opacity: .55; }
.f6-optionen button.gewaehlt.rest { background: #eaeff3; color: #46586a; opacity: 1; }
.f6-optionen .choice-note { display: block; font-size: .8em; font-weight: 600; }
.f6-weiter { margin-top: 12px; }
/* Münzen nach einem Extra-Text — wie am Blockende, nur kleiner gesetzt. */
.f6-muenzen { text-align: center; margin-top: 10px; }
.f6-muenzen .coin-big { font-size: clamp(1.6rem, 6vw, 2.2rem); }
.f6-muenzen .note:empty { display: none; }
/* Menüknopf mit Unterzeile: was er ist, darunter klein, was er bringt. */
.knopf-zweizeilig { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.2; }
.knopf-zweizeilig .knopf-unter { font-size: .8em; font-weight: 600; opacity: .8; }
.knopf-zweizeilig .knopf-unter:empty { display: none; }
/* Der Verschwinde-Text im Menü: so breit wie die anderen, etwas flacher und
   in der ruhigeren Farbe — freiwillig, aber nicht versteckt (28.09.2026). */
#btn-f6.f6-menu { min-height: 64px; padding-top: 8px; padding-bottom: 8px; }

/* Mitlesen (zweites Gerät, Erwachsene): Wörter sind Tippflächen, Marken sind
   farbige Unterstriche je Art. Das Kind sieht diesen Bildschirm nie. */
.mitlesen-text .word { cursor: pointer; padding: 1px 3px; border-radius: 6px; border-bottom: 3px solid transparent; }
.mitlesen-text .word.gewaehlt { outline: 3px solid #2f6f5e; outline-offset: 1px; }
.mitlesen-text .word.marke-endung { border-bottom-color: #b07d1a; background: #fff4dc; }
.mitlesen-text .word.marke-ersatz { border-bottom-color: #8a3b3b; background: #fbe9e9; }
.mitlesen-text .word.marke-weg { border-bottom-color: #5b6b7a; background: #eef2f5; text-decoration: line-through; }
.mitlesen-text .word.marke-vorgesagt { border-bottom-color: #3b5f8a; background: #e8eef7; }
.mitlesen-text .word.marke-zeile { border-bottom-style: dashed; border-bottom-color: #7d95a6; }
.mitlesen-text .word.marke-selbst { border-bottom-color: #2e7d32; background: #e8f4ea; }
.f5-handy { margin-top: 12px; border-top: 1px solid #d7dfe5; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.f5-handy .note { margin: 0; }
.f5-handy-box { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; margin: 6px 0 10px; padding: 10px; background: #fff; border: 1px solid #d7dfe5; border-radius: 12px; }
.f5-handy-box canvas { width: 168px; height: 168px; image-rendering: pixelated; }
.f5-handy-box .note { max-width: 22rem; margin: 0; }
.f5-runden-zeile { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.f5-badge { font-size: 0.85rem; background: #e8f4ea; color: #2e7d32; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.mitlesen-handy { margin: 0; font-weight: 600; color: #2f6f5e; }
.handy-status { max-width: 32rem; text-align: center; }
.mitlesen-arten { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; max-width: 46rem; }
.mitlesen-arten button { min-height: 48px; font-size: 1rem; padding: 8px 14px; }
.mitlesen-wahl { gap: 10px; flex-wrap: wrap; justify-content: center; }
.mitlesen-wahl select { font-size: 1rem; padding: 8px 10px; border-radius: 10px; border: 1px solid #c7d3dc; }
/* Zeilenhöhe 2 wie überall im .reading-text: die Zeilenbänder (body.zeilenhilfe)
   sind 2em hoch — mit 2.1 wanderten sie Zeile für Zeile aus dem Text heraus. */
.mitlesen-main .reading-text { font-size: clamp(1.05rem, 3vw, 1.3rem); line-height: 2; }

/* ---------- Mitlesen: der Bildschirm des ERWACHSENEN (09.09.2026) ----------
   Er läuft fast immer auf einem HANDY, während das Kind auf dem Tablet liest.
   Bis zum 09.09.2026 trug er `f5-screen` und damit `overflow: hidden` — der
   Wert, der den Bildschirm des KINDES bewusst unscrollbar macht. Auf einem
   Handy lagen dadurch der Startknopf, das Ende des Textes und die halbe
   Artenleiste UNTER dem Bildrand, und zwar unerreichbar: `overflow: hidden`
   lässt sich per Skript scrollen, mit dem Finger nicht. Genau deshalb schlug
   die alte Prüfung nicht an — sie setzte `scrollTop` (Auftraggeber: „ich
   konnte auf dem Handy überhaupt nicht scrollen und keinen Fehler markieren").

   Die Bauweise ist jetzt dieselbe wie bei F5, aber mit anderer Rangfolge:
   nicht der Text ist das Wichtigste, sondern die ARTENLEISTE — sie muss
   immer unter dem Daumen liegen. Also Kopf und Fuß fest, der Text scrollt in
   seinem eigenen Kasten, die Leiste steht darunter und schrumpft nie. Passt
   selbst das nicht (sehr flaches Fenster, Querformat), scrollt der ganze
   Bildschirm — `overflow-y: auto` ist der Notausgang, den `f5-screen` nahm. */
.mitlesen-screen { overflow-y: auto; }
/* `flex: 1 0 auto` — WACHSEN ja, SCHRUMPFEN nein. Mit `1 1 auto` und
   `min-height: 0` schrumpfte der Mittelteil unter die Höhe seiner Kinder;
   die standen dann über ihn hinaus und malten über die Fußleiste, statt den
   Bildschirm scrollen zu lassen (gemessen auf 360×560). */
.mitlesen-main {
  flex: 1 0 auto; min-height: 0; justify-content: flex-start;
  gap: 10px; padding: 12px 16px;
}
.mitlesen-main > * { flex: 0 0 auto; }
/* Während der Runde: Erklärung, Handy-Hinweis und Textwahl sagen nichts mehr
   — sie kosteten 138 px, und „Fertig gelesen" lag darunter (360×560). */
.mitlesen-screen.laeuft #mitlesen-erklaerung, .mitlesen-screen.laeuft #mitlesen-handy,
.mitlesen-screen.laeuft #mitlesen-wahl { display: none; }
/* Der Text bekommt, was übrig bleibt, und rollt in sich. `flex-basis: 0` ist
   dabei entscheidend: mit `auto` verlangte der Kasten die Höhe des GANZEN
   Textes, und dann scrollte immer die Seite statt des Kastens. `min-height`
   hält ihn lesbar — passt selbst das nicht mehr, scrollt der Bildschirm. */
.mitlesen-main .reading-text {
  flex: 1 1 0; min-height: 7em; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; touch-action: pan-y;
}
/* Auf schmalen Geräten zwei Knöpfe je Reihe statt drei — sonst reicht die
   Leiste über den halben Bildschirm und drängt den Text weg. */
@media (max-width: 520px) {
  .mitlesen-arten { gap: 6px; }
  .mitlesen-arten button { flex: 1 1 44%; padding: 8px 6px; font-size: .95rem; }
  .mitlesen-arten button.quiet { flex: 1 1 100%; min-height: 44px; }
  .mitlesen-main .reading-text { line-height: 1.85; }
}
/* Flaches Fenster (Handy mit Browserleisten, Querformat): alles Beiwerk
   schrumpft, damit vom Text mehr als zwei Zeilen bleiben. Die Knöpfe nicht —
   sie sind das Bedienteil und bleiben bei 48 px (§10). */
@media (max-height: 700px) {
  .mitlesen-main { gap: 6px; padding: 8px 14px; }
  .mitlesen-screen .f5-head { padding-top: calc(6px + env(safe-area-inset-top)); padding-bottom: 6px; }
  .mitlesen-screen .ausgang { padding: 8px 12px; min-height: 40px; font-size: .95rem; }
  .mitlesen-screen .f5-foot { padding: 8px 14px calc(10px + env(safe-area-inset-bottom)); }
  .mitlesen-handy, .mitlesen-stand { font-size: .85rem; }
  .mitlesen-main .instruction { font-size: 1rem; }
  .mitlesen-main .reading-text { min-height: 5em; padding: 10px 12px; }
}

/* Silbenfärbung (Lesehilfe, Audit 05.09.2026): jede zweite Silbe in einem
   ruhigen zweiten Ton — kein Rot, kein Signal, nur eine Gliederung. Gilt für
   Blitzwort, Vorlesetext und Text-Fading, solange body.silben gesetzt ist. */
.silben .silbe.s1 { color: #7a4a12; }
/* Leseprobe: die Liste groß und ruhig, Marken erst nach dem Ende sichtbar. */
.lp-liste {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 8px 22px;
  width: 100%; max-width: 52rem; font-size: clamp(1.4rem, 4.2vw, 2rem); line-height: 1.5;
  background: #fff; border-radius: 16px; padding: 22px 26px; text-align: left;
}
.f5-main .lp-liste { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.lp-vorbereitung { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 46rem; margin: 0 auto; overflow-y: auto; min-height: 0; }
.lp-vorbereitung .note { margin: 0; }
.lp-schritte { margin: 0; padding-left: 22px; line-height: 1.55; }
.lp-schritte li { margin-bottom: 6px; }
.lp-wort { padding: 2px 8px; border-radius: 8px; cursor: pointer; border-bottom: 3px solid transparent; }
/* Auf dem Handy des Erwachsenen sind die Marken sofort sichtbar (Klasse
   `zeigen` steht dort dauerhaft) — auf dem geteilten Bildschirm nie. */
.lp-liste.zeigen .lp-wort { -webkit-tap-highlight-color: transparent; }
.mitlesen-stand { margin: 0; min-height: 1.4em; font-weight: 600; color: #2f6f5e; }
.lp-liste.zeigen .lp-wort.lp-fehler { background: #fbe9e9; border-bottom-color: #8a3b3b; }
/* Kleine Rückmeldung für den Erwachsenen, oben rechts — das Kind liest die Liste, nicht die Ecke. */
.lp-tick { position: fixed; top: 16px; right: 18px; width: 18px; height: 18px; border-radius: 50%; background: transparent; }
.lp-tick.puls { animation: lp-puls .6s ease-out; }
@keyframes lp-puls { 0% { background: #2f6f5e; transform: scale(1.6); } 100% { background: transparent; transform: scale(1); } }

/* ---------- Startseite ohne Kind (27.09.2026) ---------- */
.start-wahl { display: flex; flex-direction: column; gap: 12px; width: min(440px, 92vw); }
.start-wahl button { width: 100%; }
button.start-haupt { font-size: 1.5rem; min-height: 80px; }
.start-neben { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.start-neben button { font-size: 1.05rem; padding: 12px 10px; }
button.start-holen { font-size: 1rem; min-height: 48px; padding: 10px 14px; margin-top: 10px; }
@media (max-width: 340px) { .start-neben { grid-template-columns: 1fr; } }

/* ---------- Rundgang durch den Zoo (zoo/rundgang.js) ---------- */
/* Während des Rundgangs ist nichts anzutippen außer Weiter und Beenden. */
body.rundgang #zoo-top-left, body.rundgang #zoo-top-right, body.rundgang #zoo-prompt,
body.rundgang #test-banner, body.rundgang #touch-ui, body.rundgang #zoo-gespraech,
body.rundgang #zoo-sucher, body.rundgang #zoo-toast { display: none !important; }
/* Schnitt zwischen den Stationen: 0,4 s abblenden (rundgang.js: ABBLENDEN),
   im Dunkeln umstellen, wieder aufblenden. Unter dem Textkasten. */
.rundgang-blende { position: absolute; inset: 0; background: #0f1a16; opacity: 0; transition: opacity .38s ease; pointer-events: none; }
.rundgang-blende.an { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .rundgang-blende { transition: opacity .12s linear; } }
/* Durch die Tür des Baumhauses in den Zauberraum (zoo/zauberhaus.js): ein
   warmes Licht statt Dunkel, 0,38 s hin (SCHNITT), dort wird geschnitten. */
.zauber-blende { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .38s ease;
  background: radial-gradient(circle at 50% 55%, #fffbe8 0%, #ffe9a8 45%, #f2b968 100%); }
.zauber-blende.an { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .zauber-blende { transition: opacity .12s linear; } }
.zoo-rundgang {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: min(640px, calc(100vw - 32px));
  background: #fffffff2; color: #1f2933; border-radius: 18px; padding: 16px 20px 14px;
  box-shadow: 0 8px 26px #0004; display: flex; flex-direction: column; gap: 12px;
  pointer-events: auto;                /* #zoo-hud lässt Klicks sonst durch */
}
#rundgang-text { font-size: 1.35rem; line-height: 1.4; font-weight: 600; min-height: 2.8em; }
/* Zoo-Einführung (18.10.2026): oben in der Mitte, unter der Knopfleiste —
   unten liegen Kreis, Hand und der Hinweis, um die es gerade geht. */
.zoo-einfuehrung {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(84px + env(safe-area-inset-top));
  width: min(560px, calc(100vw - 32px));
  background: #fffffff2; color: #1f2933; border-radius: 18px; padding: 14px 18px 12px;
  box-shadow: 0 8px 26px #0004; display: flex; flex-direction: column; gap: 10px;
  pointer-events: auto; z-index: 2;
}
#zoo-einfuehrung-text { margin: 0; font-size: 1.3rem; line-height: 1.4; font-weight: 600; }
.zoo-einfuehrung-fuss { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.zoo-einfuehrung-fuss button { min-height: 48px; }
/* Der Knopf, um den es gerade geht. Im Zoo darf sich etwas bewegen —
   Regel 8 gilt auf dem Übungsbildschirm. */
.einf-ziel { box-shadow: 0 0 0 4px #ffc83d, 0 0 18px 4px #ffc83d; animation: einf-puls 1.2s ease-in-out infinite; }
@keyframes einf-puls { 50% { box-shadow: 0 0 0 7px #ffc83d, 0 0 26px 8px #ffc83daa; } }
/* Beim Hand-Schritt nach unten: der Pfeil steht über einer Bank weit weg,
   also knapp über dem Horizont — genau dort lag der Kasten oben. */
.zoo-einfuehrung[data-schritt="hand"] { top: auto; bottom: calc(5vh + 76px + env(safe-area-inset-bottom)); }
@media (max-width: 620px) {
  .zoo-einfuehrung { top: calc(74px + env(safe-area-inset-top)); padding: 12px 14px 10px; }
  #zoo-einfuehrung-text { font-size: 1.15rem; }
  /* Auf dem Handy nimmt er den Platz des Hinweises ein; was die Hand tut,
     steht dann auf der Hand selbst. */
  .zoo-einfuehrung[data-schritt="hand"] { bottom: calc(196px + env(safe-area-inset-bottom)); }
  body[data-zoo-einf="hand"] #zoo-prompt { display: none; }
}
body.gespraech-offen .zoo-einfuehrung, body.foto-modus .zoo-einfuehrung { display: none; }
.rundgang-fuss { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rundgang-punkte { display: flex; gap: 6px; margin-right: auto; }
.rundgang-punkte i { width: 9px; height: 9px; border-radius: 50%; background: #c9d6cf; }
.rundgang-punkte i.done { background: #7fb39f; }
.rundgang-punkte i.now { background: #1f4d40; }
.rundgang-fuss button { min-height: 48px; padding: 10px 18px; font-size: 1.05rem; }
@media (max-width: 520px) {
  #rundgang-text { font-size: 1.15rem; }
  .rundgang-punkte { width: 100%; }
}


/* ---------- Zusammen lesen auf dem Handy (03.10.2026) ---------------------
   Auftraggeber: „lässt sich auf dem Handy sehr schlecht lesen, es gibt
   Overlays und einfach zu wenig Platz und zu viel Ablenkung". Gemessen auf
   390 × 844: Anleitung offen → zwei Zeilen Text; beim Lesen nahm der
   Zählstreifen ein Viertel der Höhe. Quer (844 × 390) blieb beim Lesen EINE
   Zeile. Dieselbe Grenze wie `main.js: HANDY_MQ`. */
@media (max-width: 600px), (max-height: 500px) {
  .f5-main { gap: 8px; padding: 10px 12px; }
  .f5-screen .f5-anleitung { padding: 6px 12px 6px 14px; }
  .f5-screen #f5-instruction { font-size: 1rem; margin: 0; }
  .f5-screen #f5-title { margin: 0; font-size: 1.15rem; }
  .f5-foot { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  /* Vorbereitung: beide Knöpfe in EINER Reihe. */
  .f5-vorbereitung { flex-direction: row; gap: 8px; }
  .f5-vorbereitung > button { flex: 1 1 0; min-width: 0; width: auto; min-height: 52px; padding: 8px 10px; font-size: 1rem; }
  /* Beim Lesen: kein Titel im Streifen, die zwei Zählknöpfe nebeneinander. */
  .f5-laeuft { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 8px; max-width: none; border-width: 1px; }
  .f5-laeuft-titel { display: none; }
  .f5-laeuft .tally { flex: 2 1 0; min-width: 0; min-height: 56px; font-size: 1.15rem; margin: 0; }
  .f5-laeuft .tally.klein { flex: 1 1 0; min-height: 56px; font-size: .85rem; padding: 4px 6px; line-height: 1.15; }
  .f5-laeuft .f5-undo { flex: 0 0 100%; }
  /* „Der Text geht weiter": ein kleines Schild in der Ecke statt eines
     Streifens über die ganze Breite — er deckte anderthalb Zeilen zu. */
  .f5-screen .rollkasten.mehr::after {
    content: '▼';
    width: 40px; height: 40px; margin: -40px 4px 4px auto; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: #2f6f5e; color: #fff; font-size: .9rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  }
}
/* Quer: Text links über die ganze Höhe, die Knöpfe als schmale Spalte
   rechts. Übereinander blieb dem Text eine Zeile. */
@media (max-height: 500px) and (orientation: landscape) {
  .f5-screen {
    display: grid; grid-template-columns: minmax(0, 1fr) 13rem; grid-template-rows: auto minmax(0, 1fr);
    /* `.screen` zentriert (align-items: center) — im Raster hieße das: so
       hoch wie der Inhalt, mittig gesetzt, über die Ränder hinaus (gemessen:
       der Mittelteil 753 px hoch auf 390 px). Gestreckt passt er in seine Zeile. */
    align-items: stretch;
  }
  .f5-screen::before, .f5-screen::after { display: none; }
  .f5-screen > .f5-head { grid-column: 1 / -1; padding-top: calc(4px + env(safe-area-inset-top)); padding-bottom: 4px; }
  .f5-screen .ausgang { min-height: 40px; padding: 6px 12px; }
  .f5-screen > .f5-main { grid-column: 1; grid-row: 2; max-width: none; padding: 8px 10px 8px calc(12px + env(safe-area-inset-left)); }
  .f5-screen > .f5-foot { grid-column: 2; grid-row: 2; justify-content: center; padding: 8px calc(10px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) 4px; }
  .f5-vorbereitung { flex-direction: column; }
  .f5-vorbereitung > button { flex: 0 0 auto; width: 100%; }
  .f5-laeuft { flex-direction: column; flex-wrap: nowrap; }
  .f5-laeuft .tally, .f5-laeuft .tally.klein { flex: 0 0 auto; width: 100%; }
  .f5-laeuft .tally { min-height: 80px; }
  #btn-f5-fertig { width: 100%; }
}

/* ---------- Eigene Dialoge (05.10.2026, src/dialog.js) ---------- */
.app-dialog {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: #1f29334d; padding: 16px;
}
.app-dialog.hidden { display: none; }
.app-dialog-karte {
  background: #fff; border-radius: 18px; padding: 22px; box-shadow: 0 8px 30px #0003;
  width: min(460px, 100%); max-height: calc(100% - 32px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px; text-align: left;
}
.app-dialog-text { white-space: pre-line; font-size: 1.1rem; line-height: 1.5; color: #1f2933; margin: 0; }
.app-dialog-feld:empty { display: none; }
.app-dialog-feld input {
  width: 100%; font-family: inherit; font-size: 1.15rem; padding: 14px 16px;
  border: 2px solid #b8c4ce; border-radius: 12px; background: #fff; color: #1f2933;
}
.app-dialog-knoepfe { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.app-dialog-knoepfe.senkrecht { flex-direction: column; align-items: stretch; }

/* ---------- Eigene Symbole statt Geräte-Emojis (18.10.2026, symbole.js) ----
   Die Hülle zeigt das Bild; das Emoji bleibt unsichtbar darin stehen, damit
   Text, Vorlesen und Prüfungen unverändert bleiben. Etwas größer als 1 em:
   die Zeichnungen haben Rand, ein Emoji füllt seine Zelle fast ganz. */
.sym {
  display: inline-block; position: relative; width: 1.32em; height: 1.32em;
  vertical-align: -0.3em; line-height: 1;
  background: center / contain no-repeat;
}
.sym-e { position: absolute; inset: 0; opacity: 0; overflow: hidden; pointer-events: none; }

/* Umzug auf die neue Adresse (21.10.2026) — nur an der alten Adresse */
.panel.umzug { border: 2px solid #2f6f5e; }
.umzug-ergebnis { margin-top: .8em; }
.umzug-kinder { padding-left: 1.2em; margin: .5em 0; }
.umzug-kinder li.fehlt, .umzug-ergebnis .fehler { color: #8a6410; font-weight: 600; }
.umzug-ok { font-weight: 600; }
.umzug-schritte { padding-left: 1.4em; margin: .6em 0; }
.umzug-ergebnis a.button { display: inline-block; margin: .3em 0 .6em; padding: 12px 20px; border-radius: 14px;
  background: #2f6f5e; color: #fff; font-weight: 600; text-decoration: none; }
.umzug-qr { display: block; margin: .4em 0; image-rendering: pixelated; }


/* Impressum, Datenschutz, Kontakt (21.10.2026, recht.js) */
.recht-fuss { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 18px 0 6px; }
.recht-fuss .link-button { font-size: .85rem; color: #5b6b7a; min-height: 36px; padding: 6px 4px; }
#screen-recht { align-items: stretch; }
.recht-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; width: min(760px, 100%); margin: 0 auto 8px; }
.recht-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.recht-tab { background: #e2e8ee; color: #24313d; font-size: .95rem; min-height: 40px; padding: 8px 14px; }
.recht-tab:hover { background: #d5dde5; }
.recht-tab.an { background: #2f6f5e; color: #fff; }
.recht-body { width: min(760px, 100%); margin: 0 auto; text-align: left; line-height: 1.55; overflow-wrap: anywhere; }
.recht-kopf, .recht-body { box-sizing: border-box; padding-left: 16px; padding-right: 16px; }
.recht-body h2 { margin: 12px 0 6px; }
.recht-body h3 { margin: 18px 0 4px; font-size: 1.05rem; }
.recht-body p { margin: 6px 0; }
.recht-body .recht-punkt { padding-left: 1em; text-indent: -1em; }
.recht-kopfzeile { font-weight: 600; }
.recht-lizenzen { margin-top: 28px; padding-top: 10px; border-top: 1px solid #dbe3ea; }
.recht-inline { display: inline; min-height: 0; padding: 0; font-size: inherit; text-decoration: underline; }
.recht-formular { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.recht-formular input, .recht-formular textarea { font: inherit; padding: 10px; border: 1px solid #c9d4dd; border-radius: 10px; }
.recht-formular button[type=submit] { align-self: flex-start; margin-top: 8px; }
.recht-danke { font-weight: 600; }
/* Das Feld gegen Bots: für Menschen weg, für Vorleseprogramme verborgen. */
.recht-falle { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Elternkonto (21.10.2026, kontoansicht.js) */
label.haekchen { display: flex; gap: 10px; align-items: flex-start; text-align: left; margin: 8px 0; font-size: .92rem; line-height: 1.4; cursor: pointer; }
label.haekchen input { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; }
.setup-extra { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.setup-wort { margin-top: 10px; font-size: .9rem; }
.konto-kasten .menu-buttons.row { flex-wrap: wrap; }
details.mit-wort { margin-top: 14px; }
details.mit-wort summary { cursor: pointer; color: #5b6b7a; }

/* Start-Einführung im Menü (22.10.2026): wie die Zoo-Einführung, aber unten
   am Bildschirm, damit die Knöpfe, auf die sie zeigt, frei bleiben. */
.zoo-einfuehrung.start-einfuehrung { position: fixed; top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; }
#start-einfuehrung-text { margin: 0; font-size: 1.3rem; line-height: 1.4; font-weight: 600; }
@media (max-width: 620px) { #start-einfuehrung-text { font-size: 1.15rem; } }


/* Ersteinrichtung (22.10.2026): „Passwort anzeigen" statt doppelter Eingabe. */
label.pw-zeigen { display: flex; gap: 8px; align-items: center; justify-content: flex-start; font-size: .92rem; margin: 2px 0 8px; cursor: pointer; }
label.pw-zeigen input { width: 20px; height: 20px; }

/* ---------- Einstieg für Erwachsene (25.10.2026, geraetehilfe.js) ---------- */
/* Als App installieren, Speicher gesperrt: große Schritte mit Bild, für
   Erwachsene, die mit Technik wenig zu tun haben. */
.anleitung-card { width: min(620px, 100%); gap: 14px; }
.anleitung-card h2 { text-align: left; }
.anleitung-card > p { color: #3d4f5c; font-size: 1.05rem; line-height: 1.55; }
.ab-frage { font-weight: 700; color: #1f4d40; margin-top: 4px; }
.ab-schon { font-size: 1.15rem; font-weight: 700; color: #2f6f5e; }
.ab-wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.ab-wahl .ab-tab { flex: 1 1 120px; min-height: 52px; font-size: 1.05rem; padding: 10px 12px; }
.ab-tab.an { background: #1f4d40; color: #fff; }
button.ab-sofort { width: 100%; }
.ab-schritte { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.ab-schritt { display: flex; gap: 14px; align-items: flex-start; background: #f4f8f6; border-radius: 16px; padding: 14px; }
.ab-nummer { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: #1f4d40; color: #fff;
  font-size: 1.3rem; font-weight: 800; display: grid; place-items: center; }
.ab-inhalt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ab-satz { margin: 0; font-size: 1.15rem; line-height: 1.5; color: #1f2933; font-weight: 600; }
.ab-bildrahmen { display: flex; justify-content: center; }
.ab-bild { width: 100%; height: auto; max-height: 340px; }
.ab-bild.ab-iphone, .ab-bild.ab-android { max-width: 210px; }
.ab-bild.ab-ipad, .ab-bild.ab-computer { max-width: 340px; }
.ab-geraet { fill: #2b3640; }
.ab-schirm { fill: #fff; }
.ab-seite { fill: #d6eedd; }
.ab-seitentext { fill: #2f6f5e; }
.ab-leiste { fill: #eef1f4; }
.ab-pille { fill: #dfe4e9; }
.ab-blatt { fill: #fff; stroke: #c9d2da; stroke-width: 1; }
.ab-linie { stroke: #e3e8ec; stroke-width: 1; }
.ab-dunkel { fill: #0006; }
.ab-hell { fill: #f2f2f6; }
.ab-home { fill: #8fc3e8; }
.ab-app { fill: #ffffffb0; }
.ab-text { fill: #1f2933; font-family: inherit; }
.ab-blau { fill: #1a6fd6; }
.ab-knopf { fill: #1a6fd6; }
.ab-knopftext { fill: #fff; }
.ab-strich { fill: none; stroke: #1a6fd6; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ab-voll { fill: #2b3640; }
.ab-ring { fill: none; stroke: #ffb400; stroke-width: 4; animation: ab-puls 1.4s ease-in-out infinite; }
@keyframes ab-puls { 50% { stroke-width: 6; stroke: #ff9500; } }
@media (prefers-reduced-motion: reduce) { .ab-ring { animation: none; } }
details.ab-anderes summary { cursor: pointer; color: #5b6b7a; margin-top: 6px; }
details.ab-anderes .ab-wahl { margin-top: 10px; }
details.ab-anderes .ab-tab { font-size: .95rem; min-height: 44px; }
@media (max-width: 480px) {
  .ab-schritt.mit-bild { flex-direction: column; gap: 8px; }
  .ab-satz { font-size: 1.08rem; }
}

/* Willkommen und Speicher in der Einrichtung */
.setup-punkte { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.setup-punkte li { display: flex; gap: 12px; align-items: center; font-size: 1.02rem; color: #24313d; line-height: 1.4; }
.setup-punkte .punkt-sym { font-size: 1.7rem; flex: 0 0 auto; width: 2.2rem; text-align: center; }
.setup-plan { margin: 0; padding-left: 1.4em; color: #24313d; line-height: 1.7; }
.setup-card .ab-bildrahmen { margin: 4px 0; }
.setup-ok { font-weight: 700; color: #2f6f5e; }

/* Startseite: ein Gruß, und der Weg zur App */
.start-gruss { margin-top: -6px; }
.start-app { width: min(440px, 92vw); background: #ffffffc4; border-radius: 16px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px; text-align: left; }
.start-app p { margin: 0; color: #24313d; font-size: .98rem; line-height: 1.45; }
.start-app button { width: 100%; }

/* Start-Einführung mit Leo (25.10.2026): der Löwe spricht, die Punkte
   zeigen, wie weit es ist. Kein Zähler beim Üben — das hier ist das Menü. */
.einf-kopf { display: flex; gap: 14px; align-items: center; }
.einf-maskottchen { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; background: #fff3cf;
  display: grid; place-items: center; font-size: 2.6rem; box-shadow: inset 0 0 0 3px #ffc83d; }
.start-einfuehrung { border: 3px solid #ffe08a; }
@media (max-width: 620px) { .einf-maskottchen { width: 52px; height: 52px; font-size: 2.1rem; } }
/* Beide liegen unten — solange Leo spricht, wartet der Installations-Hinweis. */
body.start-einf-offen #install-hint { display: none; }
.setup-card .start-app { width: auto; background: #f4f8f6; }
.zoo-einfuehrung.start-einfuehrung.oben { top: calc(16px + env(safe-area-inset-top)); bottom: auto; }
.anleitung-card .menu-buttons { width: 100%; }
.anleitung-card .menu-buttons button { width: 100%; max-width: 100%; }

/* ---------- Eröffnungen (25.10.2026, zoo/zeremonie.js) ---------- */
/* Während einer Eröffnung führt die Kamera — nichts anzutippen außer der Karte. */
body.zeremonie #zoo-top-left, body.zeremonie #zoo-top-right, body.zeremonie #zoo-prompt,
body.zeremonie #test-banner, body.zeremonie #touch-ui, body.zeremonie #zoo-gespraech,
body.zeremonie #zoo-sucher, body.zeremonie #zoo-toast, body.zeremonie #zoo-mappe { display: none !important; }
.zoo-zeremonie {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: min(620px, calc(100vw - 32px));
  background: #fffdf4f5; color: #1f2933; border-radius: 20px; padding: 16px 20px 14px;
  border: 4px solid #ffc83d; box-shadow: 0 10px 30px #0005, inset 0 0 0 2px #fff;
  display: flex; flex-direction: column; gap: 8px; pointer-events: auto;
  animation: zeremonie-rein .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.zeremonie-titel { margin: 0; font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 800; color: #b5470e; line-height: 1.2; }
#zeremonie-text { margin: 0; font-size: 1.3rem; line-height: 1.4; font-weight: 600; }
@keyframes zeremonie-rein { from { opacity: 0; transform: translate(-50%, 30px) scale(.92); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .zoo-zeremonie { animation: none; } }
@media (max-width: 620px) { #zeremonie-text { font-size: 1.12rem; } .zoo-zeremonie { padding: 12px 14px 10px; } }

/* ---------- Futterregal (26.10.2026) ---------- */
.futter-regal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fffaf0f5; color: #1f2933; border-radius: 18px; padding: 16px 18px;
  box-shadow: 0 8px 30px #0003; pointer-events: auto; text-align: center;
}
.futter-regal h3 { margin: 0 0 10px; color: #6b4a22; }
.futter-regal h4 { margin: 12px 0 6px; color: #6b4a22; }
.futter-regal-liste, .futter-regal-tasche { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.futter-regal-liste button { min-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 14px; }
.futter-regal-liste button .emoji { font-size: 1.8rem; line-height: 1; }
.futter-regal-liste button small { font-weight: 500; font-size: .85rem; opacity: .8; }
.futter-regal-tasche button { min-height: 48px; padding: 8px 14px; }
#btn-futter-regal-fertig { margin-top: 12px; }
/* Solange das Regal offen ist: keine Touch-Steuerung darüber (Handy). */
body.regal-offen #touch-ui { display: none !important; }
body.regal-offen #zoo-prompt { display: none !important; }
@media (max-width: 600px), (max-height: 600px) {
  .futter-regal { padding: 12px; }
  .futter-regal-liste button { min-width: 112px; padding: 6px 8px; min-height: 48px; }
  .futter-regal-liste button .emoji { font-size: 1.4rem; }
}

/* ---------- Katzenhaus: das Lesefeld (02.11.2026, zoo/katzenbuch.js) -------
   NEBEN dem Bild, nicht darüber: quer rechts, hochkant unten — die Katzen
   bleiben zu sehen. Große Schrift, viel Zeilenabstand (§10), ein Knopf je
   Handlung. Solange es offen ist, steht sonst nichts auf dem Bildschirm. */
.katzen-buch {
  position: absolute; z-index: 3; pointer-events: auto;
  display: flex; flex-direction: column; gap: 10px;
  top: calc(10px + env(safe-area-inset-top)); bottom: calc(10px + env(safe-area-inset-bottom));
  right: calc(10px + env(safe-area-inset-right)); width: min(46vw, 580px);
  padding: 16px 18px; border-radius: 20px; text-align: left;
  background: #fffaf2f7; color: #2a2620; box-shadow: 0 10px 30px #0004;
}
@media (max-aspect-ratio: 1/1) {
  .katzen-buch {
    top: auto; left: calc(8px + env(safe-area-inset-left)); right: calc(8px + env(safe-area-inset-right));
    bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; height: 54%; padding: 12px 14px; gap: 8px;
  }
  .kb-text { line-height: 1.6; }
  .kb-fuss button { flex: 1 1 0; }
}
.kb-kopf { display: flex; align-items: flex-start; gap: 10px; flex: none; }
.kb-titel { margin: 0; font-size: 1.3rem; line-height: 1.3; color: #8a4b2e; text-wrap: balance; flex: 1 1 auto; }
button.kb-zu { flex: none; min-height: 40px; padding: 6px 12px; font-size: 1rem; border-radius: 12px; }
.kb-inhalt { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.kb-text { margin: 0; font-size: clamp(1.5rem, 1.05rem + 1.3vw, 2.15rem); line-height: 1.75; word-spacing: .12em; color: #1f1b16; }
.kb-schluss { color: #6b4a2e; }
.kb-fuss { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: none; }
.kb-punkte { display: flex; gap: 6px; width: 100%; }
.kb-punkte:empty { display: none; }
.kb-punkte i { width: 10px; height: 10px; border-radius: 50%; background: #e6dac8; }
.kb-punkte i.done { background: #d9a77f; }
.kb-punkte i.now { background: #8a4b2e; }
.kb-fuss button { min-height: 52px; padding: 10px 18px; font-size: 1.15rem; }
button.kb-weiter { background: #b0583a; min-width: 9em; }
button.kb-weiter:hover { background: #c0664a; }
/* Das Regal: Bücher als Buchrücken-Kacheln, hell mit farbigem Rücken — dunkle
   Schrift, damit auch die Silbenfarben lesbar bleiben. */
.kb-regal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 2px 2px 8px; }
button.kb-band {
  display: flex; align-items: flex-end; min-height: 112px; padding: 14px 12px 14px 26px;
  border-radius: 6px 14px 14px 6px; text-align: left; font-size: 1.3rem; line-height: 1.25;
  color: #2a2620; background: color-mix(in srgb, var(--band) 22%, #fffdf8);
  box-shadow: inset 12px 0 0 var(--band), inset 0 0 0 2px color-mix(in srgb, var(--band) 45%, #fff), 0 3px 0 #0001;
}
button.kb-band:hover { background: color-mix(in srgb, var(--band) 32%, #fffdf8); }
@media (max-height: 520px) {
  .katzen-buch { gap: 6px; padding: 10px 12px; }
  .kb-titel { font-size: 1.1rem; }
  .kb-fuss button { min-height: 44px; padding: 6px 12px; font-size: 1.05rem; }
  button.kb-band { min-height: 72px; font-size: 1.15rem; }
}
body.katzen-lesen #touch-ui, body.katzen-lesen #zoo-prompt, body.katzen-lesen #zoo-top-right,
body.katzen-lesen #zoo-top-left, body.katzen-lesen #btn-zoo-theater, body.katzen-lesen .zoo-einfuehrung { display: none !important; }

/* ---------- Forscherstation: der Blick in einen Versuch (03.11.2026,
   zoo/forscherblick.js) ------------------------------------------------------
   Über dem ganzen Bildschirm. Quer steht die Leiste rechts, hochkant unten;
   beim Fernrohr nur ein runder Ausschnitt über dem Zoo, die Knöpfe liegen im
   Schwarzen daneben. Zurück immer oben links. Solange er offen ist, steht sonst
   nichts vom Zoo auf dem Bildschirm (außer einem neuen Stempel). */
.forscher-blick {
  position: absolute; inset: 0; z-index: 5; pointer-events: auto;
  display: flex; flex-direction: row; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.forscher-blick.fb-deckt { background: #17120e; }
.fb-flaeche { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; touch-action: none; overflow: hidden; }
.fb-bild { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.forscher-blick:not(.fb-deckt) .fb-bild { display: none; }
.fb-ring { display: none; }
.forscher-blick[data-art="fernrohr"] .fb-ring {
  display: block; position: absolute; left: 50%; top: 50%; width: 88vmin; height: 88vmin;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 200vmax #0b0907, inset 0 0 0 7px #c9983a, inset 0 0 0 11px #6e4d17, inset 0 0 60px 16px #000a;
}
.fb-zurueck { position: absolute; z-index: 2; top: calc(12px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); }
.fb-text {
  position: absolute; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: max-content; max-width: min(92%, 34rem); padding: 8px 18px; border-radius: 16px; text-align: center;
  background: #fffaf0f2; color: #2a2620; box-shadow: 0 4px 14px #0005; pointer-events: none;
}
.fb-text.leer { display: none; }
.fb-titel { display: block; font-size: 1.25rem; line-height: 1.3; color: #6b3f1e; }
.fb-fakt { display: block; font-size: 1.05rem; line-height: 1.35; margin-top: 2px; }
.fb-fakt:empty { display: none; }
.fb-leiste {
  flex: none; width: min(34vw, 250px); display: flex; flex-direction: column; gap: 12px;
  padding: calc(74px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 12px 12px;
  background: #2a201a; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
}
.forscher-blick.fb-ohne-leiste .fb-leiste { display: none; }
.fb-wahl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
button.fb-k {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 0; padding: 6px 4px; border-radius: 14px; border: 2px solid transparent;
  background: #3b2e25; color: #f6ead8; font-size: .95rem;
}
button.fb-k:hover { background: #4a3a2c; }
button.fb-k.aktiv { border-color: #f2c14e; background: #4d3c2d; }
.fb-k-bild { width: 56px; height: 56px; pointer-events: none; }
.fb-k-wort { font-size: .9rem; line-height: 1.15; }
button.fb-k.fb-neu { grid-column: 1 / -1; min-height: 48px; background: #e2e8ee; color: #24313d; }
.fb-regeln { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fb-regler { flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; color: #f6ead8; font-weight: 700; font-size: 1rem; }
.fb-regler input { width: 100%; height: 40px; margin: 0; accent-color: #f2c14e; touch-action: pan-x; }
button.fb-zoom { flex: 1 1 0; min-height: 52px; padding: 4px 10px; font-size: 1.7rem; line-height: 1; background: #3b2e25; color: #fff; }
button.fb-zoom:disabled { opacity: .4; cursor: default; }
/* Fernrohr: die Leiste liegt im Schwarzen rechts neben dem Rohr. */
.forscher-blick[data-art="fernrohr"] .fb-leiste {
  position: absolute; z-index: 2; right: calc(14px + env(safe-area-inset-right)); top: 50%; transform: translateY(-50%);
  width: auto; padding: 0; background: none; overflow: visible;
}
.forscher-blick[data-art="fernrohr"] .fb-regeln { flex-direction: column; flex-wrap: nowrap; }
.forscher-blick[data-art="fernrohr"] button.fb-zoom { width: 64px; flex: none; background: #3b2e25e6; }
/* Zoo oder Himmel: zwei Knöpfe über Näher/Weiter (hochkant links daneben). */
.forscher-blick[data-art="fernrohr"] .fb-wahl { grid-template-columns: 64px; gap: 8px; }
.forscher-blick[data-art="fernrohr"] button.fb-blickwahl { width: 64px; min-height: 64px; padding: 4px 2px; gap: 2px; background: #3b2e25e6; }
.forscher-blick[data-art="fernrohr"] button.fb-blickwahl .fb-k-bild { width: 36px; height: 36px; }
.forscher-blick[data-art="fernrohr"] button.fb-blickwahl .fb-k-wort { font-size: .8rem; }
.forscher-blick[data-art="fernrohr"].fb-deckt { background: #0b0907; }
/* Kompass mit Höhenbogen (nur beim Himmel, 14.11.2026): quer unter „Zurück“ im
   Schwarzen links vom Rohr, hochkant oben rechts über dem Rohr. Nie über dem Kreis. */
.fb-kompass { display: none; }
.forscher-blick.fb-mit-kompass .fb-kompass {
  display: block; position: absolute; z-index: 1; pointer-events: none;
  top: calc(76px + env(safe-area-inset-top)); left: calc(14px + env(safe-area-inset-left));
  width: clamp(64px, min(22vmin, calc((100vw - 88vmin) / 2 - 28px)), 120px); aspect-ratio: 100 / 162; height: auto;
}
@media (max-aspect-ratio: 1/1) {
  .forscher-blick { flex-direction: column; }
  .fb-leiste { width: auto; max-height: 44%; padding: 10px calc(12px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left)); gap: 8px; }
  .fb-wahl { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
  .fb-k-bild { width: 42px; height: 42px; }
  .fb-k-wort { font-size: .8rem; }
  .fb-regeln { flex-wrap: nowrap; }
  .fb-regler { flex: 1 1 auto; flex-direction: row; align-items: center; gap: 10px; font-size: .95rem; }
  button.fb-zoom { flex: none; width: 54px; }
  .fb-text { bottom: 10px; }
  .fb-titel { font-size: 1.1rem; }
  .fb-fakt { font-size: .95rem; }
  .forscher-blick[data-art="fernrohr"] .fb-leiste { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); left: 50%; right: auto; transform: translateX(-50%); }
  .forscher-blick[data-art="fernrohr"] .fb-regeln { flex-direction: row; }
  .forscher-blick[data-art="fernrohr"] .fb-leiste { flex-direction: row; align-items: center; gap: 14px; max-height: none; padding: 0; }
  .forscher-blick[data-art="fernrohr"] .fb-wahl { grid-template-columns: 64px 64px; }
  .forscher-blick[data-art="fernrohr"] .fb-text { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .forscher-blick.fb-mit-kompass .fb-kompass {
    top: calc(12px + env(safe-area-inset-top)); left: auto; right: calc(14px + env(safe-area-inset-right));
    width: clamp(64px, min(22vmin, calc(((100vh - 88vmin) / 2 - 30px) / 1.62)), 112px);
  }
}
body.forscher-offen #zoo-hud > :not(.forscher-blick):not(#zoo-toast), body.forscher-offen #touch-ui { display: none !important; }

/* Begleiter-Knopf gesperrt, solange eine Szene läuft (01.12.2026, zooGame:
   `_begleiterKnopfStand`). Als Klasse statt `disabled` — `button[disabled]:hover`
   färbte gesperrte Knöpfe grün. */
#btn-zoo-pet.gesperrt, #btn-begleiter-pet.gesperrt,
#btn-zoo-pet.gesperrt:hover, #btn-begleiter-pet.gesperrt:hover { opacity: .4; filter: grayscale(1); cursor: default; }

/* Die Bitten der Tierpflegerin (02.12.2026, zooGame: `_pflegeHud`): höchstens
   drei Zeilen unter den Münzen, je ein Knopf. Ein Tipp zeigt den Pfeil zum Gehege. */
.zoo-pflege { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; pointer-events: auto;
  /* Breiter als die linke Spalte (auf dem Handy 38vw): darunter ist rechts nur
     „Zurück". 16 px Abstand: unter der Knopfreihe rechts oben, nicht neben ihr. */
  width: max-content; max-width: min(62vw, 250px); }
.zoo-pflege.hidden { display: none; }
.pflege-bitte { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: #1f3d33; font-weight: 700; font-size: 1rem; border: 2px solid transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,.12); text-align: left; max-width: 100%; }
.pflege-bitte .pflege-icon { font-size: 1.25rem; line-height: 1; }
/* Umbrechen statt abschneiden: auf dem Handy ist die linke Spalte schmal (38vw). */
.pflege-bitte .pflege-wort { white-space: normal; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.pflege-bitte.gewaehlt { border-color: #f2b33d; background: #fff7df; }
@media (hover: hover) { .pflege-bitte:hover { background: #ffffff; } }


/* Eine Frage mit Ja und Nein im Zoo (04.12.2026: die Delfin-Show auf der
   Tribüne). Über dem Hinweis unten, Knöpfe wie in der Satzleiste. */
.zoo-frage {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(5vh + 64px + env(safe-area-inset-bottom));
  background: #ffffffee; color: #1f2933; padding: 12px 16px; border-radius: 16px;
  box-shadow: 0 6px 18px #0002; max-width: min(92vw, 460px); text-align: center;
  /* #zoo-hud lässt Berührungen durch (pointer-events: none): ohne diese Zeile
     ging der Tipp auf dem iPad an die Spielfläche und startete den Joystick
     statt den Knopf (05.12.2026). */
  pointer-events: auto;
}
.zoo-frage .frage-text { margin: 0 0 10px; font-size: 1.35rem; font-weight: 600; }
.zoo-frage .frage-knoepfe { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.zoo-frage .frage-knoepfe button { min-height: 48px; min-width: 120px; font-size: 1.15rem; }

/* Zoo-Besuch (04.12.2026, zoo/besuchLeiste.js) — vorbereitet, abgeschaltet.
   Unten in der Mitte, über dem Bild: fertige Sätze, Zeichen, Tschüss. */
.besuch-leiste { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  pointer-events: auto; background: #fffffff2; color: #1f4d40; border-radius: 18px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px; width: min(92vw, 640px); max-height: 70vh; overflow-y: auto;
  box-shadow: 0 6px 24px #0003; }
.besuch-leiste.hidden { display: none; }
.besuch-saetze, .besuch-zeichen { display: flex; flex-wrap: wrap; gap: 8px; }
.besuch-saetze button, .besuch-zeichen button { flex: 1 1 auto; min-height: 48px; font-size: 1.15rem; }
#btn-besuch-tschuess { align-self: center; min-height: 48px; }
#zoo-hud.im-besuch #btn-zoo-shop, #zoo-hud.im-besuch #btn-zoo-editor, #zoo-hud.im-besuch #btn-zoo-heft,
#zoo-hud.im-besuch #btn-zoo-foto, #zoo-hud.im-besuch #zoo-coins, #zoo-hud.im-besuch #zoo-tasche { display: none !important; }
.besuch-kasten #besuch-qr { display: block; margin: 8px auto; image-rendering: pixelated; }
.besuch-kasten .besuch-code { text-align: center; font-family: ui-monospace, monospace; font-size: 1.1rem; letter-spacing: .05em; }
.besuch-kasten input { flex: 1 1 14em; min-width: 0; font-family: ui-monospace, monospace; }

/* Die Tierwelt hinter dem Zaubertor (05.12.2026, zoo/tierwelt.js). Alles, was
   man antippt, nimmt Berührungen an (#zoo-hud lässt sie sonst durch). */
.tierwelt-wahl { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: auto;
  background: #fffffff2; color: #2b2346; border-radius: 18px; padding: 16px; width: min(92vw, 560px); max-height: 80vh; overflow-y: auto;
  box-shadow: 0 8px 28px #0004; text-align: center; }
.tierwelt-wahl .tw-frage { font-size: 1.35rem; font-weight: 600; margin: 0 0 12px; }
.tierwelt-wahl .tw-arten { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.tierwelt-wahl .tw-arten button { min-height: 52px; min-width: 120px; font-size: 1.2rem; }
.tierwelt-leiste { position: absolute; left: 50%; bottom: max(12px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); pointer-events: auto;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: min(96vw, 760px); }
.tierwelt-leiste button { min-height: 50px; font-size: 1.1rem; }
.tierwelt-leiste button[hidden] { display: none; }
.tierwelt-blende { position: absolute; inset: 0; z-index: 30; pointer-events: none; opacity: 0; transition: opacity .8s ease;
  background: radial-gradient(circle, #f4e6ff 0%, #b48cff 55%, #5b3fa0 100%); display: grid; place-items: center; }
.tierwelt-blende.an { opacity: 1; }
.tierwelt-blende p { color: #fff; font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 700; text-shadow: 0 2px 8px #3b2470; margin: 0 16px; text-align: center; }
body.tierwelt #zoo-prompt, body.tierwelt #touch-buttons, body.tierwelt #btn-zoo-shop, body.tierwelt #btn-zoo-editor,
body.tierwelt #btn-zoo-heft, body.tierwelt #btn-zoo-foto, body.tierwelt #btn-zoo-animal, body.tierwelt #btn-zoo-pet,
body.tierwelt #zoo-pflege, body.tierwelt #zoo-tasche { display: none !important; }
