/* ==========================================================================
   Elternabend Vorschule - Deutsche Schule Valencia
   --------------------------------------------------------------------------
   BEWUSST KONSERVATIV GEBAUT.
   Der Samsung-TV-Browser (Tizen) hat je nach Modelljahr eine aeltere
   Chromium-Version. Deshalb hier NICHT verwendet:
     gap (Flexbox), :has(), aspect-ratio, clamp(), grid-gap, subgrid
   Stattdessen: Flexbox + Margins, feste Custom Properties, transform/opacity.
   ========================================================================== */

/* --- Schrift, selbst gehostet, keine externen Server ---------------------- */
@font-face {
  font-family: "InterDSV";
  src: url("schrift/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "InterDSV";
  src: url("schrift/inter-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* DSV-Markenfarben, entnommen aus dem offiziellen Logo-SVG */
  --rot:      #C71A1A;
  --rot-mild: #E8D3D0;
  --gelb:     #E1B425;
  --gelb-mild:#F7EBC6;
  --dunkel:   #2E2B27;
  --grau:     #F2F2F2;
  --papier:   #FAF9F7;
  --weiss:    #FFFFFF;
  --linie:    #DCD8D2;
  --gedaempft:#6B655D;

  /* Wird von deck.js gesetzt, damit jedes Panel in den Bildschirm passt */
  --s: 16px;

  --rand: 4vmin;          /* Sicherheitsrand gegen Overscan am TV */
}

/* --- Grundlagen ---------------------------------------------------------- */
* { box-sizing: border-box; }

/* Hoehenkette statt 100vh: TV-Browser blenden eigene Leisten ein und
   melden vh-Werte falsch. height:100% ist auf jeder Engine verlaesslich. */
html {
  height: 100%;
  font-size: var(--s);
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--papier);
  color: var(--dunkel);
  font-family: "InterDSV", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.9rem;
  line-height: 1.45;
  overflow: hidden;              /* im Quermodus scrollt nur das Deck */
  -webkit-font-smoothing: antialiased;
}

.noscript {
  padding: 2rem;
  background: var(--rot);
  color: #fff;
  font-size: 1.2rem;
}

.nur-lesbar {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  /* Tippen reagiert sofort, ohne die 300-ms-Doppeltipp-Wartezeit */
  touch-action: manipulation;
}

/* ==========================================================================
   KOPFZEILE
   ========================================================================== */
.kopf {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 7rem;
  padding: 0 var(--rand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
  pointer-events: none;          /* Panels bleiben antippbar */
}
.kopf > * { pointer-events: auto; }

.kopf-logo {
  height: 3.6rem;
  width: auto;
  display: block;
}

.kopf-rechts {
  display: flex;
  align-items: center;
}

/* Sprachumschalter */
.sprache {
  display: flex;
  border: 0.14rem solid var(--linie);
  border-radius: 999px;
  overflow: hidden;
  background: var(--weiss);
  margin-right: 1rem;
}
.sprache-knopf {
  border: 0;
  background: transparent;
  padding: 0.6rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gedaempft);
  min-height: 3.2rem;
}
.sprache-knopf.ist-aktiv {
  background: var(--rot);
  color: var(--weiss);
}

/* Kapitelmenue-Knopf */
.kopf-knopf {
  border: 0.14rem solid var(--linie);
  background: var(--weiss);
  border-radius: 999px;
  width: 3.6rem;
  height: 3.6rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.kopf-knopf-strich {
  display: block;
  width: 1.5rem;
  height: 0.16rem;
  background: var(--dunkel);
  margin: 0.14rem 0;
  border-radius: 2px;
}

/* ==========================================================================
   DECK UND PANELS  (Quermodus = TV / Laptop)
   ========================================================================== */
.deck {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;           /* laut Tizen-Doku noetig gegen pointercancel */
}
.deck::-webkit-scrollbar { display: none; }

/* Verhindert, dass ein Ueberwischen nach links den Browser-Zurueck ausloest
   und die Seite mitten im Vortrag verlaesst. Ab Chromium 63. */
@supports (overscroll-behavior-x: contain) {
  .deck { overscroll-behavior: contain; }
}

/* scroll-snap ist reine Zugabe: gibt es das nicht, uebernimmt deck.js */
@supports (scroll-snap-type: x mandatory) {
  .deck { scroll-snap-type: x mandatory; }
  .panel { scroll-snap-align: start; }
}
@supports (scroll-snap-stop: always) {
  .panel { scroll-snap-stop: always; }
}

.panel {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  padding: 9rem var(--rand) 6rem var(--rand);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Weit entfernte Panels werden nicht mehr gezeichnet.
   visibility statt display, damit die Vermessung intakt bleibt. */
.panel.ist-fern { visibility: hidden; }
.panel:not(.ist-aktiv) .deko-teil { animation-play-state: paused; }

/* abwechselnde Flaechen, damit Kapitel sich optisch trennen */
.panel-ton-hell   { background: var(--papier); }
.panel-ton-grau   { background: var(--grau); }
.panel-ton-gelb   { background: var(--gelb-mild); }
.panel-ton-dunkel { background: var(--dunkel); color: var(--papier); }
.panel-ton-dunkel .kicker { color: var(--gelb); }
.panel-ton-dunkel .panel-titel { color: var(--weiss); }

/* Der Einpass-Mechanismus.
   Spanisch ist typisch 15-25 % laenger als Deutsch. Passt ein Panel nicht,
   verkleinert deck.js es per transform statt den Text abzuschneiden.
   transform statt Schriftgroesse, weil dabei nichts neu umbricht:
   die Verkleinerung ist dadurch exakt berechenbar. */
.panel-innen {
  width: 100%;
  max-width: 105rem;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  transform-origin: center center;
}

/* --- Typografie ---------------------------------------------------------- */
.kicker {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rot);
  margin: 0 0 1.2rem 0;
}
.kicker::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 0.25rem;
  background: var(--gelb);
  margin-top: 0.7rem;
}

.panel-titel {
  font-size: 4.2rem;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.6rem 0;
  max-width: 22ch;
}

.panel-text {
  font-size: 1.95rem;
  line-height: 1.5;
  margin: 0 0 1.4rem 0;
  max-width: 46ch;
  color: var(--dunkel);
}
.panel-ton-dunkel .panel-text { color: #E6E2DC; }

.panel-text strong { font-weight: 700; }

.hervor {
  color: var(--rot);
  font-weight: 700;
}

/* ==========================================================================
   TITELPANEL
   ========================================================================== */
.titel-panel { justify-content: center; }
.titel-gruppe {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rot);
  margin: 0 0 1.5rem 0;
}
.titel-haupt {
  font-size: 6.4rem;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1.2rem 0;
}
.titel-unter {
  font-size: 2.3rem;
  color: var(--gedaempft);
  margin: 0 0 3rem 0;
}
.titel-datum {
  display: inline-block;
  background: var(--gelb);
  color: var(--dunkel);
  font-weight: 700;
  font-size: 1.7rem;
  padding: 0.9rem 1.8rem;
}
.titel-hinweis {
  margin-top: 3.5rem;
  font-size: 1.35rem;
  color: var(--gedaempft);
  display: flex;
  align-items: center;
}
.titel-hinweis-pfeil {
  display: inline-block;
  width: 2.4rem;
  height: 0.16rem;
  background: var(--gedaempft);
  position: relative;
  margin-left: 1rem;
  animation: wink 2.2s ease-in-out infinite;
}
.titel-hinweis-pfeil::after {
  content: "";
  position: absolute;
  right: 0; top: -0.32rem;
  width: 0.8rem; height: 0.8rem;
  border-top: 0.16rem solid var(--gedaempft);
  border-right: 0.16rem solid var(--gedaempft);
  transform: rotate(45deg);
}
@keyframes wink {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(0.8rem); }
}

/* ==========================================================================
   LISTEN (Ablauf des Abends)
   ========================================================================== */
.liste { list-style: none; margin: 0; padding: 0; }
.liste-punkt {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.3rem;
  font-size: 1.85rem;
  line-height: 1.4;
}
.liste-nummer {
  flex: 0 0 auto;
  width: 3rem; height: 3rem;
  border-radius: 999px;
  background: var(--rot);
  color: var(--weiss);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.4rem;
  margin-top: 0.15rem;
}
.liste-haken .liste-nummer { background: var(--gelb); color: var(--dunkel); }

/* ==========================================================================
   KARTEN  (Team, Faehigkeiten, Tipps)
   ========================================================================== */
.karten {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.8rem;          /* Ersatz fuer gap, das Tizen evtl. nicht kann */
}
/* Farbe explizit setzen: auf einem dunklen Panel wuerden weisse Karten
   sonst die helle Schriftfarbe des Panels erben und leer wirken. */
.karte {
  color: var(--dunkel);
  flex: 1 1 26rem;
  margin: 0.8rem;
  background: var(--weiss);
  border: 0.14rem solid var(--linie);
  border-top: 0.4rem solid var(--rot);
  padding: 1.8rem;
  text-align: left;
  font: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.karte-klickbar:hover,
.karte-klickbar:focus {
  transform: translateY(-0.4rem);
  box-shadow: 0 1rem 2.4rem rgba(46, 43, 39, 0.14);
  outline: none;
}
.karte-titel {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.7rem 0;
}
.karte-text {
  font-size: 1.5rem;
  line-height: 1.42;
  color: var(--gedaempft);
  margin: 0;
}
.karte-mehr {
  margin-top: 1.2rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--rot);
  letter-spacing: 0.04em;
}

/* Team-Karten mit Avatar. Bewusst kompakt gehalten - der laengere Text
   liegt hinter dem Antippen, damit die Seite auf einen Bildschirm passt. */
.karte-person {
  flex: 1 1 17rem;
  text-align: center;
  align-items: center;
  border-top-color: var(--gelb);
  padding: 1.4rem 1.1rem;
}
.karte-person .karte-text { text-align: center; font-size: 1.32rem; }
.karte-person .karte-titel { font-size: 1.7rem; margin-bottom: 0.4rem; }
.avatar {
  width: 6.4rem; height: 6.4rem;
  margin-bottom: 0.9rem;
  display: block;
}
.karte-rolle {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rot);
  margin: 0 0 0.4rem 0;
}
/* margin-top:auto schiebt das Badge an den Kartenboden, damit alle
   Badges auf einer Linie sitzen, egal wie lang der Text darueber ist. */
.karte-dauer {
  margin-top: auto;
  font-size: 1.15rem;
  background: var(--gelb-mild);
  border-left: 0.3rem solid var(--gelb);
  padding: 0.45rem 0.8rem;
  color: var(--dunkel);
  text-align: left;
}

/* Kleiner Hinweis, dass hinter der Karte noch mehr steckt */
.karte-person.karte-klickbar { position: relative; }
.karte-person.karte-klickbar::after {
  content: "+";
  position: absolute;
  top: 0.7rem; right: 0.9rem;
  width: 1.9rem; height: 1.9rem;
  line-height: 1.75rem;
  text-align: center;
  border-radius: 999px;
  background: var(--gelb-mild);
  color: #8A6B0F;
  font-size: 1.3rem;
  font-weight: 700;
}

/* ==========================================================================
   DIE TREPPE (Entwicklungsstufen)
   ========================================================================== */
.treppe {
  display: flex;
  align-items: flex-end;
  margin: 2rem -0.5rem 0 -0.5rem;
}
.stufe {
  color: var(--dunkel);
  flex: 1 1 0;
  margin: 0 0.5rem;
  background: var(--weiss);
  border: 0.14rem solid var(--linie);
  border-bottom: 0.45rem solid var(--gelb);
  padding: 1.3rem 1rem;
  text-align: center;
  font: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.stufe:hover, .stufe:focus {
  transform: translateY(-0.4rem);
  box-shadow: 0 0.8rem 2rem rgba(46, 43, 39, 0.14);
  outline: none;
}
/* display:block ist hier Pflicht - als inline-Elemente wuerden Nummer und
   Titel auf derselben Zeile landen und sich ueberlappen. */
.stufe-num {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rot);
  letter-spacing: 0.1em;
}
.stufe-titel {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.5rem;
}
/* ansteigende Hoehen = Treppenoptik */
.stufe-1 { padding-bottom: 1.3rem; }
.stufe-2 { padding-bottom: 2.3rem; }
.stufe-3 { padding-bottom: 3.3rem; }
.stufe-4 { padding-bottom: 4.3rem; }
.stufe-5 { padding-bottom: 5.3rem; }
.stufe-6 { padding-bottom: 6.3rem; border-bottom-color: var(--rot); }

/* ==========================================================================
   WAS / WIE / WARUM  - der wiederkehrende Dreischritt
   ========================================================================== */
.dreischritt {
  display: flex;
  flex-wrap: wrap;
  margin: 1.5rem -0.7rem 0 -0.7rem;
}
.schritt {
  color: var(--dunkel);
  flex: 1 1 24rem;
  margin: 0.7rem;
  padding: 1.6rem;
  background: var(--weiss);
  border: 0.14rem solid var(--linie);
}
.schritt-warum {
  background: var(--gelb-mild);
  border-color: var(--gelb);
}
.schritt-marke {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rot);
  margin: 0 0 0.8rem 0;
}
.schritt-warum .schritt-marke { color: #8A6B0F; }
.schritt-text {
  font-size: 1.5rem;
  line-height: 1.45;
  margin: 0;
}

/* ==========================================================================
   MITMACH-DEMOS
   ========================================================================== */
.demo {
  margin-top: 1.8rem;
  background: var(--dunkel);
  color: var(--papier);
  padding: 1.8rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.demo-text { flex: 1 1 22rem; margin-right: 1.5rem; }
.demo-marke {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gelb);
  margin: 0 0 0.5rem 0;
}
.demo-frage { font-size: 1.6rem; margin: 0; line-height: 1.35; }
.demo-knopf {
  flex: 0 0 auto;
  border: 0;
  background: var(--gelb);
  color: var(--dunkel);
  font-size: 1.5rem;
  font-weight: 700;
  padding: 1.1rem 2.2rem;
  min-height: 4rem;
  margin-top: 0.8rem;
}
.demo-knopf:active { transform: translateY(0.15rem); }

.demo-buehne {
  flex: 1 1 100%;
  margin-top: 1.4rem;
  min-height: 14rem;
  background: var(--weiss);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dunkel);
  text-align: center;
  padding: 1.2rem;
}
.demo-buehne-leer { color: var(--gedaempft); font-size: 1.4rem; }

/* Wuerfel */
.wuerfel {
  width: 11rem; height: 11rem;
  background: var(--weiss);
  border: 0.2rem solid var(--dunkel);
  border-radius: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  padding: 1rem;
}
.wuerfel-feld {
  width: 33.33%;
  height: 33.33%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wuerfel-auge {
  width: 2rem; height: 2rem;
  border-radius: 999px;
  background: var(--rot);
}
.demo-aufloesung {
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--rot);
}

/* Silben klatschen */
.silben { display: flex; flex-wrap: wrap; justify-content: center; }
.silbe {
  font-size: 2.6rem;
  font-weight: 700;
  padding: 0.7rem 1.3rem;
  margin: 0.4rem;
  background: var(--gelb-mild);
  border-bottom: 0.3rem solid var(--gelb);
}
.silbe-aktiv {
  background: var(--rot);
  color: var(--weiss);
  border-bottom-color: var(--dunkel);
  transform: scale(1.08);
}

/* Anlaut-Animation: Der erste Buchstabe loest sich aus dem Wort,
   steigt auf und wird gross. Nur transform/opacity/color animiert -
   das schafft auch ein alter Fernseher-Browser fluessig. */
.anlautfilm-buehne { min-height: 16rem; overflow: hidden; }
.anlautfilm-wort {
  display: flex;
  align-items: baseline;
  font-size: 4.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--dunkel);
}
.anlautfilm-zeichen {
  display: inline-block;
  transition: transform 0.65s ease, opacity 0.65s ease, color 0.65s ease;
  transform-origin: center bottom;
}
/* Phase "neu": noch unsichtbar, leicht abgesenkt */
.anlautfilm-buehne[data-phase="neu"] .anlautfilm-zeichen {
  opacity: 0;
  transform: translateY(0.35em);
  transition: none;             /* Startlage sofort einnehmen, nicht hinfaden */
}
/* Phase "frei": der erste Buchstabe loest sich */
.anlautfilm-buehne[data-phase="frei"] .anlautfilm-erst {
  transform: translateY(-0.22em) scale(1.9);
  color: var(--rot);
}
.anlautfilm-buehne[data-phase="frei"] .anlautfilm-rest {
  opacity: 0.28;
  transform: translateX(0.12em);
}

/* ==========================================================================
   JAHRES-TIMELINE
   ========================================================================== */
.zeit-kopf { display: flex; align-items: baseline; flex-wrap: wrap; }
.zeit-monat {
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 1.5rem 0 0;
}
.zeit-spanne {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rot);
}
.zeit-themen { list-style: none; margin: 1.8rem 0 0 0; padding: 0; }
.zeit-thema {
  display: flex;
  align-items: flex-start;
  font-size: 1.7rem;
  line-height: 1.4;
  margin-bottom: 0.9rem;
}
.zeit-thema::before {
  content: "";
  flex: 0 0 auto;
  width: 0.9rem; height: 0.9rem;
  background: var(--gelb);
  margin: 0.55rem 1.1rem 0 0;
  border-radius: 999px;
}

/* der Mathe-Balken, der durch das ganze Jahr laeuft */
.mathe-balken {
  position: absolute;
  left: 0; right: 0; bottom: 3.2rem;
  height: 2.6rem;
  background: var(--rot);
  color: var(--weiss);
  display: flex;
  align-items: center;
  padding: 0 var(--rand);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 3;
}

/* Elternaktionen im Jahresplan hervorheben */
.zeit-thema-text { display: block; }
.zeit-thema-eltern::before { background: var(--rot); }
.eltern-marke {
  display: inline-block;
  margin-left: 0.7rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rot);
  background: var(--rot-mild);
  padding: 0.12rem 0.6rem;
  vertical-align: 0.15em;
  white-space: nowrap;
}
.panel-ton-dunkel .eltern-marke {
  background: rgba(255, 255, 255, 0.15);
  color: var(--gelb);
}

/* ==========================================================================
   ELTERNAKTIONEN  (eigene Uebersichtsseite)
   ========================================================================== */
.aktionen {
  display: flex;
  flex-wrap: wrap;
  margin: 1.5rem -0.7rem 0 -0.7rem;
}
.aktion {
  color: var(--dunkel);
  flex: 1 1 23rem;
  margin: 0.7rem;
  padding: 1.4rem 1.5rem;
  background: var(--weiss);
  border: 0.14rem solid var(--linie);
  border-left: 0.45rem solid var(--rot);
}
.aktion-wann {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rot);
  margin: 0 0 0.45rem 0;
}
.aktion-was {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.45rem 0;
}
.aktion-text {
  font-size: 1.32rem;
  line-height: 1.4;
  color: var(--gedaempft);
  margin: 0;
}

/* ==========================================================================
   MITLESEN  -  die beiden QR-Codes gleich am Anfang
   ========================================================================== */
.codes {
  display: flex;
  flex-wrap: wrap;
  margin: 1.6rem -0.9rem 0 -0.9rem;
}
.code {
  color: var(--dunkel);
  flex: 0 1 23rem;
  margin: 0.9rem;
  padding: 1.3rem;
  background: var(--weiss);
  border: 0.14rem solid var(--linie);
  border-top: 0.4rem solid var(--rot);
  text-align: center;
}
/* Bewusst gross: Die Codes muessen aus der dritten Stuhlreihe
   mit einer Handykamera scannbar sein. */
.code-bild {
  width: 17.5rem; height: 17.5rem;
  margin: 0 auto 0.9rem auto;
  display: block;
}
.code-bild img { width: 100%; height: 100%; display: block; }
.code-marke {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.3rem 0;
}
.code-text {
  font-size: 1.25rem;
  color: var(--gedaempft);
  margin: 0;
}

/* Seitenzahl - nur auf dem Handy, damit Eltern beim Mitlesen
   der Ansage "Seite 7" folgen koennen. */
.panel-nummer { display: none; }
.modus-hoch .panel-nummer {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gedaempft);
  margin-bottom: 0.5rem;
}
.modus-hoch .panel-ton-dunkel .panel-nummer { color: #9A9287; }

/* ==========================================================================
   DEKO-ANIMATIONEN  (bewusst sparsam - der TV-Browser ist langsam)
   ========================================================================== */
.deko {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.deko-teil {
  position: absolute;
  opacity: 0.5;
}

/* Herbstblaetter */
.blatt {
  width: 2.6rem; height: 2.6rem;
  border-radius: 0 100% 0 100%;
  background: var(--gelb);
  animation: fallen 11s linear infinite;
}
.blatt-b { background: #D08A2C; }
.blatt-c { background: var(--rot); opacity: 0.35; }
@keyframes fallen {
  0%   { transform: translateY(-12vh) rotate(0deg); }
  100% { transform: translateY(112vh) rotate(420deg); }
}

/* Laternenschein St. Martin */
.schein {
  width: 26rem; height: 26rem;
  border-radius: 999px;
  background: var(--gelb);
  opacity: 0.22;
  animation: atmen 5s ease-in-out infinite;
}
@keyframes atmen {
  0%, 100% { transform: scale(1);    opacity: 0.18; }
  50%      { transform: scale(1.14); opacity: 0.3; }
}

/* Schnee / Advent */
.flocke {
  width: 0.9rem; height: 0.9rem;
  border-radius: 999px;
  background: #fff;
  opacity: 0.85;
  animation: fallen 15s linear infinite;
}

/* Fallas-Funken */
.funke {
  width: 0.8rem; height: 0.8rem;
  border-radius: 999px;
  background: var(--gelb);
  animation: steigen 6s ease-in infinite;
}
@keyframes steigen {
  0%   { transform: translateY(0) scale(1);   opacity: 0; }
  15%  { opacity: 0.9; }
  100% { transform: translateY(-80vh) scale(0.3); opacity: 0; }
}

/* Fruehling / Ostern */
.knospe {
  width: 2rem; height: 2rem;
  border-radius: 100% 0 100% 0;
  background: #8FBF6B;
  animation: schweben 8s ease-in-out infinite;
}
@keyframes schweben {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-2.5rem) rotate(18deg); }
}

@media (prefers-reduced-motion: reduce) {
  .blatt, .flocke, .funke, .knospe, .schein, .titel-hinweis-pfeil {
    animation: none;
  }
  .karte, .stufe { transition: none; }
}

/* ==========================================================================
   BLAETTERN, PUNKTE, MENUE, OVERLAY
   ========================================================================== */
.blaettern {
  position: fixed;
  top: 0; bottom: 0;
  width: 11vw;
  min-width: 6rem;
  border: 0;
  background: transparent;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.blaettern-zurueck { left: 0;  justify-content: flex-start; padding-left: 1.5vw; }
.blaettern-vor     { right: 0; justify-content: flex-end;   padding-right: 1.5vw; }
.blaettern:hover { background: rgba(46, 43, 39, 0.05); }
.blaettern[disabled] { opacity: 0.18; pointer-events: none; }

.blaettern-pfeil {
  width: 2.2rem; height: 2.2rem;
  border-top: 0.28rem solid var(--dunkel);
  border-right: 0.28rem solid var(--dunkel);
  display: block;
}
.blaettern-vor .blaettern-pfeil     { transform: rotate(45deg); }
.blaettern-zurueck .blaettern-pfeil { transform: rotate(-135deg); }

.punkte {
  position: fixed;
  left: 0; right: 0; bottom: 1.1rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  z-index: 35;
  pointer-events: none;
}
.punkt {
  pointer-events: auto;
  width: 2.4rem; height: 2.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  position: relative;
}
.punkt::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  margin: -0.35rem 0 0 -0.35rem;
  width: 0.7rem; height: 0.7rem;
  border-radius: 999px;
  background: var(--linie);
  transition: background 0.2s ease, transform 0.2s ease;
}
.punkt.ist-aktiv::after {
  background: var(--rot);
  transform: scale(1.7);
}

/* Kapitelmenue */
.menue {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(46, 43, 39, 0.93);
  z-index: 60;
  overflow-y: auto;
  padding: 8rem var(--rand) 4rem var(--rand);
}
.menue-innen { max-width: 92rem; margin: 0 auto; }
.menue-kapitel {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gelb);
  margin: 2.2rem 0 0.9rem 0;
}
.menue-eintrag {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 0.1rem solid rgba(255,255,255,0.14);
  background: transparent;
  color: var(--papier);
  font-size: 1.7rem;
  padding: 1rem 0.4rem;
}
.menue-eintrag:hover, .menue-eintrag:focus { color: var(--gelb); outline: none; }

/* Overlay fuer Detailkarten */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(46, 43, 39, 0.72);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--rand);
}
/* Muss nach der display-Regel stehen, sonst gewinnt display:flex
   gegen das hidden-Attribut und das Overlay klebt beim Start auf dem Bild. */
.overlay[hidden], .menue[hidden] { display: none; }
.overlay-karte {
  background: var(--papier);
  max-width: 78rem;
  width: 100%;
  max-height: 84vh;
  overflow-y: auto;
  padding: 3rem;
  position: relative;
  border-top: 0.5rem solid var(--rot);
}
.overlay-zu {
  position: absolute;
  top: 1rem; right: 1.2rem;
  border: 0;
  background: transparent;
  font-size: 3rem;
  line-height: 1;
  color: var(--gedaempft);
  width: 4rem; height: 4rem;
}
.overlay-titel {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1.4rem 0;
}
.overlay-text {
  font-size: 1.7rem;
  line-height: 1.5;
  margin: 0 0 1.2rem 0;
}

/* ==========================================================================
   HOCHMODUS  (Handy / schmales Fenster): alles wird vertikal
   ========================================================================== */
/* WICHTIG fuer das Handy:
   Im Quermodus bekommen html und body height:100%, damit das Deck genau
   einen Bildschirm hoch ist. Auf dem Handy muss das wieder weg - sonst wird
   der BODY zum Scroll-Container statt der Seite selbst. Folgen davon waeren:
   zaehes Scrollen, die Adressleiste klappt nie ein, und window.scrollTo
   greift ins Leere, wodurch die Spruenge aus dem Kapitelmenue nichts tun. */
.modus-hoch,
.modus-hoch body {
  height: auto;
  min-height: 100%;
  overflow: visible;
}
.modus-hoch .deck {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  /* KRITISCH fuers Handy: Das Deck bedeckt hier die gesamte Seite.
     Das pan-x aus dem Quermodus wuerde jeden senkrechten Fingerwisch
     verwerfen - die Seite liesse sich per Touch ueberhaupt nicht
     scrollen. Deshalb hier zwingend zuruecksetzen. */
  touch-action: auto;
  -webkit-overflow-scrolling: auto;
}
.modus-hoch .panel {
  flex: none;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 3rem 1.5rem;
  display: block;
  border-bottom: 0.1rem solid var(--linie);
}
/* Auf Handybreite muss der Kopf deutlich kleiner werden, sonst schieben
   Logo, Sprachumschalter und Menueknopf die Seite seitlich auf. */
.modus-hoch .kopf {
  position: sticky;
  height: 4rem;
  padding: 0 1rem;
  background: var(--papier);
  border-bottom: 0.1rem solid var(--linie);
}
.modus-hoch .kopf-logo { height: 2.1rem; }
.modus-hoch .sprache { margin-right: 0.5rem; }
.modus-hoch .sprache-knopf {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  min-height: 2.3rem;
}
.modus-hoch .kopf-knopf { width: 2.4rem; height: 2.4rem; }
.modus-hoch .kopf-knopf-strich { width: 1rem; height: 0.11rem; margin: 0.1rem 0; }
.modus-hoch .blaettern { display: none; }
.modus-hoch .punkte { display: none; }
.modus-hoch .mathe-balken { position: static; margin-top: 2rem; padding: 0.8rem 1rem; height: auto; }
.modus-hoch .deko { display: none; }
.modus-hoch .treppe { display: block; }
.modus-hoch .stufe { display: block; width: 100%; margin: 0 0 0.8rem 0; padding: 1.2rem !important; text-align: left; }
.modus-hoch .karte { flex: 1 1 100%; }
.modus-hoch .schritt { flex: 1 1 100%; }
.modus-hoch .aktion { flex: 1 1 100%; }
.modus-hoch .code { flex: 1 1 100%; }

/* im Hochmodus normale Lesegroessen statt TV-Groessen */
.modus-hoch { font-size: 17px; }
.modus-hoch .titel-haupt  { font-size: 2.3rem; }
.modus-hoch .titel-gruppe { font-size: 0.85rem; letter-spacing: 0.14em; }
.modus-hoch .titel-unter  { font-size: 1.1rem; margin-bottom: 1.6rem; }
.modus-hoch .titel-datum  { font-size: 1rem; padding: 0.6rem 1.1rem; }
.modus-hoch .titel-hinweis{ font-size: 0.85rem; margin-top: 2rem; }
.modus-hoch .kicker       { font-size: 0.8rem; }
.modus-hoch .panel-titel  { font-size: 1.75rem; max-width: none; }
.modus-hoch .panel-text   { font-size: 1.05rem; max-width: none; }
.modus-hoch .zeit-monat   { font-size: 1.9rem; margin-bottom: 0.5rem; }
.modus-hoch .zeit-spanne  { font-size: 0.85rem; }
.modus-hoch .zeit-thema   { font-size: 1.02rem; }
.modus-hoch .liste-punkt  { font-size: 1.05rem; }
.modus-hoch .liste-nummer { width: 1.9rem; height: 1.9rem; font-size: 0.9rem; margin-right: 0.8rem; }
.modus-hoch .karte-titel  { font-size: 1.15rem; }
.modus-hoch .karte-text   { font-size: 1rem; }
.modus-hoch .karte-rolle  { font-size: 0.8rem; }
.modus-hoch .karte-dauer  { font-size: 0.85rem; }
.modus-hoch .stufe-titel  { font-size: 1.05rem; }
.modus-hoch .stufe-num    { font-size: 0.8rem; }
.modus-hoch .schritt-text { font-size: 1rem; }
.modus-hoch .schritt-marke,
.modus-hoch .demo-marke   { font-size: 0.8rem; }
.modus-hoch .demo-frage   { font-size: 1.05rem; }
.modus-hoch .demo-knopf   { font-size: 1rem; padding: 0.8rem 1.4rem; min-height: 2.8rem; }
.modus-hoch .demo-aufloesung { font-size: 2rem; }
.modus-hoch .silbe        { font-size: 1.3rem; }
.modus-hoch .anlautfilm-wort   { font-size: 2.6rem; }
.modus-hoch .anlautfilm-buehne { min-height: 9rem; }
.modus-hoch .mathe-balken { font-size: 0.8rem; }
.modus-hoch .overlay-titel{ font-size: 1.5rem; }
.modus-hoch .overlay-text { font-size: 1.05rem; }
.modus-hoch .overlay-karte{ padding: 2rem 1.4rem; }
.modus-hoch .aktion-wann  { font-size: 0.8rem; }
.modus-hoch .aktion-was   { font-size: 1.15rem; }
.modus-hoch .aktion-text  { font-size: 1rem; }
.modus-hoch .code-bild    { width: 11rem; height: 11rem; }
.modus-hoch .code-marke   { font-size: 1.15rem; }
.modus-hoch .code-text    { font-size: 0.95rem; }
.modus-hoch .eltern-marke { font-size: 0.7rem; margin-left: 0.5rem; }
.modus-hoch .qr-bild      { width: 9rem; height: 9rem; margin-bottom: 1rem; }
.modus-hoch .qr-text      { font-size: 0.95rem; }
.modus-hoch .qr-adresse   { font-size: 0.85rem; }
.modus-hoch .druck-knopf  { font-size: 1rem; }
.modus-hoch .avatar { width: 6rem; height: 6rem; margin: 0 auto 1rem auto; }

/* ==========================================================================
   BEWEGUNG AUS  -  Notausstieg, wenn der Fernseher ueberfordert ist
   Wird per Schalter oder ueber die Adresse ...?plain=1 gesetzt.
   prefers-reduced-motion gibt es erst ab Chromium 74, deshalb zusaetzlich
   dieser manuelle Weg, der auf jedem Geraet funktioniert.
   ========================================================================== */
.bewegung-aus .deko { display: none; }
.bewegung-aus * {
  animation: none !important;
  transition: none !important;
}

/* ==========================================================================
   DRUCKKNOPF  (nur auf dem letzten Panel)
   ========================================================================== */
.druck-knopf {
  display: inline-block;
  margin-top: 2rem;
  border: 0.14rem solid var(--gelb);
  background: transparent;
  color: var(--gelb);
  font-size: 1.4rem;
  font-weight: 700;
  padding: 1rem 2rem;
  min-height: 4rem;
}

.qr {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.qr-bild {
  width: 14rem; height: 14rem;
  background: #fff;
  padding: 0.8rem;
  margin-right: 1.8rem;
}
.qr-bild img, .qr-bild svg { width: 100%; height: 100%; display: block; }
.qr-text { font-size: 1.4rem; color: #E6E2DC; }
.qr-adresse {
  font-size: 1.25rem;
  color: var(--gelb);
  word-break: break-all;
  margin-top: 0.5rem;
}

/* ==========================================================================
   DIAGNOSE  (nur sichtbar ueber ...?diag=1)
   Damit laesst sich am echten Fernseher in 30 Sekunden feststellen,
   welche Technik das Geraet wirklich kann.
   ========================================================================== */
.diag {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #14120F;
  color: #E6E2DC;
  z-index: 90;
  overflow-y: auto;
  padding: 2rem;
  font-size: 1.1rem;
  line-height: 1.5;
}
.diag h2 { color: var(--gelb); font-size: 1.6rem; margin: 0 0 1rem 0; }
.diag table { border-collapse: collapse; width: 100%; margin-bottom: 1.5rem; }
.diag td { border-bottom: 1px solid #3A352E; padding: 0.35rem 0.6rem; vertical-align: top; }
.diag td:first-child { color: #9A9287; width: 42%; }
.diag .ja   { color: #7BC47F; font-weight: 700; }
.diag .nein { color: #E86A5E; font-weight: 700; }
.diag-zu {
  position: fixed; top: 1rem; right: 1rem;
  background: var(--rot); color: #fff; border: 0;
  padding: 0.8rem 1.4rem; font-size: 1.2rem; font-weight: 700;
}

/* ==========================================================================
   DRUCKANSICHT  -  ergibt das Eltern-Handout per Browser-Druck / PDF
   ========================================================================== */
@media print {
  @page { margin: 16mm; }

  body {
    overflow: visible;
    background: #fff;
    font-size: 10.5pt;
    line-height: 1.4;
  }
  html { font-size: 12px; }

  .kopf, .blaettern, .punkte, .menue, .overlay, .diag, .diag-zu,
  .karte-mehr, .demo-knopf, .demo-buehne, .deko, .titel-hinweis,
  .druck-knopf {
    display: none !important;
  }

  .deck { display: block; width: auto; height: auto; overflow: visible; }

  /* Einpass-Verkleinerung und Ausblendung entfernter Panels zuruecknehmen,
     sonst fehlt im Ausdruck die Haelfte. */
  .panel-innen { transform: none !important; max-width: none; }
  .panel.ist-fern { visibility: visible !important; }

  .panel {
    flex: none;
    width: auto;
    height: auto;
    min-height: 0;
    display: block;
    overflow: visible;
    padding: 0 0 8mm 0;
    background: #fff !important;
    color: #000 !important;
    page-break-inside: avoid;
    border-bottom: 0.3mm solid #ccc;
    margin-bottom: 6mm;
  }
  .panel-ton-dunkel, .panel-ton-dunkel .panel-titel,
  .panel-ton-dunkel .panel-text { color: #000 !important; }

  .titel-haupt { font-size: 22pt; }
  .panel-titel { font-size: 15pt; max-width: none; margin-bottom: 3mm; }
  .panel-text  { font-size: 10.5pt; max-width: none; }
  .kicker      { font-size: 8pt; color: #C71A1A !important; }

  .karten, .dreischritt, .treppe, .aktionen, .codes { display: block; }
  .karte, .schritt, .stufe, .aktion, .code {
    display: block;
    width: auto;
    margin: 0 0 3mm 0;
    padding: 3mm !important;
    border: 0.3mm solid #bbb;
    page-break-inside: avoid;
  }
  .aktion { border-left: 0.8mm solid #C71A1A; }
  .code { text-align: left; }
  .code-bild { width: 28mm; height: 28mm; margin: 0 0 2mm 0; }
  .eltern-marke { background: none !important; color: #C71A1A !important; padding: 0; }
  .panel-nummer { display: none !important; }
  .schritt-warum { background: #F7EBC6 !important; -webkit-print-color-adjust: exact; }

  .demo { background: #fff !important; color: #000 !important; border: 0.3mm solid #bbb; padding: 3mm; }
  .demo-marke, .schritt-marke, .zeit-spanne { color: #C71A1A !important; }
  .mathe-balken {
    position: static; background: #fff !important; color: #000 !important;
    border: 0.3mm solid #C71A1A; padding: 2mm; height: auto; margin-top: 3mm;
  }
  .zeit-monat { font-size: 15pt; }
  .avatar { width: 18mm; height: 18mm; }
}
