/* Tilda & Bruno – Stylesheet für Startseite und Textseiten.
   Schrift Baloo 2 (OFL) wird selbst gehostet, Fließtext in Systemschrift. Keine externen Anfragen. */
@font-face {
  font-family: "Baloo 2";
  src: url("fonts/Baloo2.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --creme: #FFF3E6; --hell: #FFF8F0; --papier: #FFFDF9; --weiss: #FFFFFF; --tinte: #2B1A0E; --text: #4A3423; --grau: #6B5040;
  --rost: #9C4A12; --rost-hell: #B05E23; --petrol: #1F7A8C; --petrol-dunkel: #155A68; --orange: #E8731B; --braun: #7A4A1E;
  --gelb: #F7C948; --linie: #F1DFC9; --rand: #E4CDB3; --rand-feld: #A88A70; --beige: #8A6E58; --pfirsich: #FFE7D1;
  --fehler-hell: #FDECEA; --fehler: #8A1C12; --schatten: rgba(43,26,14,.08); --abgedunkelt: rgba(43,26,14,.75);
  --kopf: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --fliess: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  /* Pfeil der Aufgabengruppen, als Maske eingefärbt */
  --pfeil: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M9 5l7 7-7 7"/></svg>');
  --haken: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></svg>');
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--fliess); background: var(--papier); color: var(--tinte); line-height: 1.55; font-size: 17px; caret-color: var(--rost); }
::selection { background: var(--gelb); color: var(--tinte); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; }
.abschnitt.dunkel :focus-visible, .fuss :focus-visible { outline-color: var(--gelb); }
h1, h2, h3 { font-family: var(--kopf); font-weight: 800; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(38px, 6vw, 64px); color: var(--rost); }
h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 8px; }
h3 { font-size: 24px; font-weight: 700; }
p { margin: 0 0 12px; color: var(--text); }
.inhalt { max-width: 1248px; margin: 0 auto; padding: 0 16px; }
.springen { position: absolute; left: -999px; top: 8px; background: var(--gelb); color: var(--tinte); font-weight: 700; padding: 12px 16px; border-radius: 8px; }
.springen:focus { left: 8px; z-index: 20; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; padding: 0 16px; background: var(--creme); border-bottom: 1px solid var(--linie); }
.marke { display: flex; align-items: center; gap: 12px; font-family: var(--kopf); font-weight: 800; font-size: 24px; text-decoration: none; color: var(--tinte); line-height: 1; min-width: 0; }
.marke img { border-radius: 999px; flex-shrink: 0; }
.kopf .marke > span { white-space: nowrap; }
.marke .t { color: var(--orange); } .marke .u { color: var(--petrol); } .marke .b { color: var(--braun); }
.menue-knopf { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--tinte); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.menue { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; gap: 4px; padding: 12px 16px 16px; background: var(--creme); border-bottom: 1px solid var(--linie); box-shadow: 0 16px 24px var(--schatten); }
.menue.offen { display: flex; }
.menue a { padding: 10px 4px; font-weight: 700; text-decoration: none; color: var(--tinte); }
.kopf nav a.knopf { color: var(--weiss); margin-top: 8px; }
.menue-youtube { display: inline-flex; align-items: center; gap: 8px; }

/* Knöpfe, Pillen */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 8px 28px; border-radius: 999px; border: 0; font-family: var(--fliess); font-weight: 700; font-size: 18px; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.knopf.klein { min-height: 48px; padding: 6px 22px; font-size: 16px; }
.knopf.breit { width: 100%; }
.knopf-akzent { background: var(--petrol); color: var(--weiss); }
.knopf-akzent:hover { background: var(--petrol-dunkel); color: var(--weiss); }
.knopf-rand { background: var(--weiss); border: 2px solid var(--rost); color: var(--rost); }
.knopf-rand:hover { background: var(--creme); }
.knopf-gelb { background: var(--gelb); color: var(--tinte); }
.knopf:disabled { background: var(--rand); color: var(--grau); border-color: var(--rand); cursor: not-allowed; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.marke-pille { position: absolute; top: 16px; left: 16px; padding: 6px 12px; border-radius: 999px; background: var(--gelb); font-family: var(--kopf); font-weight: 700; font-size: 14px; color: var(--tinte); }
.blase { display: inline-block; padding: 10px 16px; border-radius: 16px 16px 16px 4px; background: var(--creme); border: 1px solid var(--linie); font-weight: 700; font-size: 15px; color: var(--rost); }
.blase.bruno { color: var(--braun); }
.gross { font-size: 19px; }
.schmal { max-width: 720px; }
.leise { color: var(--beige); font-weight: 400; font-size: 14px; }
.hinweis { font-size: 14px; color: var(--grau); margin: 8px 0 0; }
.hinweis.oben { margin: -4px 0 12px; }
.hinweis.stark { color: var(--rost); font-weight: 700; }
.hinweis:empty { display: none; }
.textlink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.textlink.mit-symbol { gap: 6px; }
.knopf-leise { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--rost); font-family: var(--fliess); font-weight: 700; font-size: 15px; cursor: pointer; align-self: center; }
.knopf-leise:hover { background: var(--creme); }

/* Abschnitte */
.abschnitt { padding: 64px 0; }
.abschnitt.hell { background: var(--hell); }
.abschnitt.dunkel { background: var(--rost); color: var(--creme); }
.abschnitt.dunkel h2 { color: var(--weiss); }
.abschnitt.dunkel p { color: var(--pfirsich); }
.drei, .zwei, .zwei-breit { display: grid; gap: 24px; }
.hero { background: var(--creme); padding: 24px 0 48px; }
.hero-raster { display: grid; gap: 28px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hero-text .gross { margin: 0; }
.hero h1 { font-size: clamp(32px, 5.6vw, 60px); }
/* Handy: Figuren zuerst, aber flach, damit die Klassenwahl noch auf den ersten Bildschirm passt */
.hero-bild { order: -1; position: relative; border-radius: 28px; background: var(--weiss); border: 1px solid var(--linie); overflow: hidden; }
.hero-bild > img { width: 100%; object-fit: cover; object-position: center 30%; aspect-ratio: 16 / 9; }
.hero-bild .marke-pille { top: 12px; left: 12px; }
.hero-bild .blase { display: none; }
/* Beispielblatt mit Kindernamen, schräg auf dem Bild */
.hero-blatt { position: absolute; right: 12px; bottom: 10px; width: 76px; display: flex; flex-direction: column; align-items: center; transform: rotate(4deg); text-decoration: none; }
.hero-blatt img { width: 100%; border-radius: 4px; border: 1px solid var(--rand); box-shadow: 0 8px 18px rgba(43,26,14,.22); }
.hero-blatt span { display: none; }
/* Einstieg in den Generator: Klasse antippen, dann steht sie dort schon drin */
.einstieg { width: 100%; }
.einstieg-titel { margin: 0 0 10px; font-family: var(--kopf); font-weight: 700; font-size: 21px; color: var(--tinte); }
.einstieg-klassen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 560px; }
.einstieg-kachel { display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 64px; padding: 12px 10px; border-radius: 18px; background: var(--petrol); color: var(--weiss); text-decoration: none; box-shadow: 0 6px 16px rgba(31,122,140,.28); }
.einstieg-kachel:hover { background: var(--petrol-dunkel); color: var(--weiss); }
.einstieg-kachel strong { font-family: var(--kopf); font-weight: 800; font-size: clamp(19px, 5.4vw, 24px); line-height: 1.1; white-space: nowrap; }
.einstieg-kachel span { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .hero .gross { font-size: 18px; } }
.versprechen { padding: 24px 0; border-bottom: 1px solid var(--linie); }
.versprechen-eintrag { display: flex; align-items: center; gap: 14px; }
.versprechen-eintrag div { display: flex; flex-direction: column; }
.versprechen-eintrag span:not(.symbol) { font-size: 15px; color: var(--grau); }
.symbol { width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px; background: var(--creme); color: var(--rost); display: flex; align-items: center; justify-content: center; }
.karte { padding: 28px; border-radius: 24px; background: var(--weiss); border: 1px solid var(--linie); }
.karte.creme { background: var(--creme); border: 0; }
.schritte { margin-top: 32px; }
.nummer { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 999px; background: var(--rost); color: var(--weiss); font-family: var(--kopf); font-weight: 800; font-size: 24px; margin-bottom: 14px; }
.nummer.klein { width: 34px; height: 34px; font-size: 17px; margin: 0 8px 0 0; vertical-align: middle; }
.haken { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.haken li { position: relative; padding-left: 34px; }
.haken li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 18px; height: 18px; border-radius: 999px; background: var(--rost); -webkit-mask: var(--haken) center/contain no-repeat; mask: var(--haken) center/contain no-repeat; }
.abschnitt.dunkel .haken li::before { background: var(--gelb); }
.haken.kaesten { gap: 12px; }
.haken.kaesten li { padding: 18px 20px 18px 52px; border-radius: 18px; background: var(--rost-hell); color: var(--weiss); }
.haken.kaesten li::before { left: 20px; top: 21px; }
.rund { border-radius: 24px; width: 100%; object-fit: cover; }

/* Folgen */
.trailer { display: grid; gap: 20px; margin-top: 32px; padding: 20px; border-radius: 24px; background: var(--weiss); border: 1px solid var(--linie); }
.trailer h3 { font-size: 26px; }
.trailer p { margin: 8px 0 0; }
.folgen { margin-top: 32px; }
.folge h3 { margin-top: 14px; font-size: 22px; }
.folge p { color: var(--grau); font-size: 15px; }
.folge-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.vorschaubild { position: relative; border-radius: 20px; overflow: hidden; background: var(--tinte); aspect-ratio: 16 / 9; }
.vorschaubild img, .vorschaubild iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.abspielen { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 999px; border: 0; background: var(--weiss); color: var(--rost); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.vorschaubild .datenschutz-hinweis, .vorschaubild .bald { position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; border-radius: 999px; background: var(--abgedunkelt); color: var(--weiss); font-size: 12px; font-weight: 700; }
.kanal-band { display: grid; gap: 20px; margin-top: 40px; padding: 20px; border-radius: 24px; background: var(--weiss); border: 1px solid var(--linie); text-decoration: none; color: var(--tinte); }
.kanal-band img { border-radius: 16px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.kanal-band h3 { font-size: 28px; }
.kanal-band .knopf { margin-top: 6px; }

/* Generator */
.generator-einleitung { display: grid; gap: 16px 32px; align-items: center; }
.beispielblatt { display: flex; align-items: center; gap: 16px; padding: 12px 20px 12px 12px; border-radius: 20px; background: var(--creme); color: var(--tinte); text-decoration: none; justify-self: start; }
.beispielblatt img { width: 72px; border-radius: 6px; border: 1px solid var(--rand); box-shadow: 0 6px 14px var(--schatten); transform: rotate(-3deg); }
.beispielblatt > span { display: flex; flex-direction: column; }
.beispielblatt strong { font-family: var(--kopf); font-size: 19px; line-height: 1.2; }
.beispielblatt span span { font-size: 14px; color: var(--petrol-dunkel); text-decoration: underline; text-underline-offset: 3px; }
.generator { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 32px; align-items: start; }
.formular { display: flex; flex-direction: column; gap: 28px; }
fieldset.schritt { border: 0; padding: 0; margin: 0; min-width: 0; }
.schritt legend, .legende { display: block; width: 100%; font-family: var(--kopf); font-weight: 700; font-size: 21px; margin: 0 0 12px; padding: 0; color: var(--tinte); }
.schnellstart { padding: 18px 20px 20px; border-radius: 20px; background: var(--creme); }
.chip.vorlage { border-color: var(--rost); color: var(--rost); }
.chip.vorlage:hover { background: var(--weiss); border-color: var(--rost); }
.zaehler { float: right; margin-top: 2px; padding: 5px 10px; border-radius: 999px; background: var(--creme); font-family: var(--fliess); font-weight: 700; font-size: 13px; color: var(--rost); }
.zaehler.voll { background: var(--rost); color: var(--weiss); }
.kacheln { display: grid; gap: 10px; }
.kacheln-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kacheln-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kachel { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 60px; padding: 12px 12px; border-radius: 18px; border: 2px solid var(--rand-feld); background: var(--weiss); color: var(--tinte); font-family: var(--fliess); text-align: left; cursor: pointer; }
.kachel:hover { background: var(--hell); }
.kachel strong { font-family: var(--kopf); font-weight: 800; font-size: 20px; color: var(--rost); line-height: 1.1; }
.kachel span { font-size: 13px; color: var(--grau); line-height: 1.3; }
.kachel.aktiv { border-color: var(--rost); background: var(--creme); box-shadow: inset 0 0 0 1px var(--rost); }
.suche { position: relative; max-width: 520px; }
.suche::before { content: ""; position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; margin-top: -10px; background: var(--grau); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") center/contain no-repeat; }
#aufgabe-suche { width: 100%; height: 52px; padding: 0 18px 0 48px; border-radius: 999px; border: 2px solid var(--rand-feld); background: var(--weiss); font-family: var(--fliess); font-size: 17px; color: var(--tinte); }
#aufgabe-suche::placeholder { color: var(--beige); }
#suche-status { margin: 8px 0 0; }
.suche-treffer { margin-top: 12px; padding: 14px 0 16px; border-radius: 16px; border: 2px solid var(--rost); background: var(--weiss); }
.suche-treffer .chips { padding: 4px 16px 0; }
.suche-anderswo { padding: 0 16px; }
.suche-treffer .chips + .suche-anderswo { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rand); }
.suche-anderswo p { margin: 0 0 8px; font-size: 15px; color: var(--grau); }
.suche-anderswo ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.suche-anderswo li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 8px 12px; border-radius: 12px; background: var(--hell); font-size: 15px; }
.suche-anderswo li span { flex: 1 1 220px; min-width: 0; }
.suche-anderswo strong { color: var(--rost); }
#gruppen { margin-top: 16px; }
.gruppen { display: flex; flex-direction: column; gap: 10px; }
.gruppe { border: 1px solid var(--rand); border-radius: 16px; background: var(--weiss); }
.gruppe summary { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; border-radius: 16px; cursor: pointer; list-style: none; }
.gruppe summary::-webkit-details-marker { display: none; }
.gruppe summary::before { content: ""; width: 20px; height: 20px; background: var(--rost); -webkit-mask: var(--pfeil) center/contain no-repeat; mask: var(--pfeil) center/contain no-repeat; transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.gruppe[open] summary::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .gruppe summary::before { transition: none; } }
.gruppe summary:hover { background: var(--hell); }
.gruppe-text { display: flex; flex-direction: column; min-width: 0; }
.gruppe-name { font-weight: 700; }
.gruppe-auswahl { font-size: 14px; color: var(--grau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gruppe[open] .gruppe-auswahl { display: none; }
.gruppe summary .zaehler { float: none; margin: 0; }
.gruppe .chips { padding: 4px 16px 16px; }
/* Beispielzeile bleibt beim Scrollen durch eine lange Gruppe oben stehen */
.beispiel { position: sticky; top: 76px; z-index: 1; margin: 0 16px 8px; padding: 10px 14px; border-radius: 12px; background: var(--hell); box-shadow: 0 4px 10px var(--schatten); font-size: 15px; color: var(--text); min-height: 44px; }
@media (min-width: 1400px) { .beispiel { top: 88px; } }
.beispiel strong { color: var(--rost); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--rand-feld); background: var(--weiss); color: var(--tinte); font-family: var(--fliess); font-weight: 700; font-size: 15px; line-height: 1.2; text-align: left; cursor: pointer; }
.chip:hover { background: var(--hell); }
.chip.aktiv { border-color: var(--rost); background: var(--rost); color: var(--weiss); }
.chip:disabled { border-style: dashed; border-color: var(--rand); color: var(--beige); background: var(--weiss); cursor: not-allowed; }
.chip .zusatz { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1.5px solid currentColor; opacity: .85; }
.punkt { width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--weiss); flex-shrink: 0; }
.nummer-zeile { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#blattnummer { flex: 1 1 200px; max-width: 260px; height: 52px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--rand-feld); background: var(--weiss); font-family: var(--fliess); font-size: 17px; color: var(--tinte); letter-spacing: .04em; }
#blattnummer::placeholder { color: var(--beige); letter-spacing: 0; }
#nummer-status:empty { display: none; }
.blattnummer [hidden] { display: none; }
.blattnummer .knopfreihe { margin-top: 0; }
#kindname { width: 100%; max-width: 360px; height: 52px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--rand-feld); background: var(--weiss); font-family: var(--fliess); font-size: 17px; color: var(--tinte); }
#kindname::placeholder { color: var(--beige); }
#kindname[aria-invalid="true"] { border-color: var(--fehler); }
.feldfehler { margin: 8px 0 0; font-size: 15px; font-weight: 700; color: var(--fehler); }
.zwei { grid-template-columns: minmax(0, 1fr); }
.vorschau { display: flex; flex-direction: column; gap: 14px; }
.vorschau-titel { margin: 0; font-family: var(--kopf); font-weight: 700; font-size: 21px; color: var(--tinte); }
.blatt { border-radius: 20px; border: 1px solid var(--rand); background: var(--weiss); overflow: hidden; box-shadow: 0 12px 32px var(--schatten); }
.blatt-kopf { display: flex; flex-direction: column; gap: 2px; padding: 18px 22px; border-bottom: 3px solid; }
.blatt-kopf strong { font-family: var(--kopf); font-weight: 800; font-size: 22px; overflow-wrap: anywhere; }
.blatt-kopf span { font-size: 14px; font-weight: 600; }
.stationen { list-style: none; margin: 0; padding: 18px 22px; min-height: 120px; display: flex; flex-direction: column; gap: 10px; }
.stationen li { display: flex; align-items: center; gap: 12px; font-weight: 700; counter-increment: station; }
.stationen li .station { width: 28px; height: 28px; border-radius: 999px; color: var(--weiss); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.stationen li .station::before { content: counter(station); }
.stationen li.leer { font-weight: 400; color: var(--grau); }
.blatt-fuss { display: flex; justify-content: space-between; gap: 12px; padding: 12px 22px; border-top: 1px dashed var(--rand); font-size: 13px; font-weight: 700; color: var(--grau); }
.ergebnis { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 16px; border-radius: 16px; background: var(--creme); }
.ergebnis[hidden] { display: none; }
.ergebnis img { width: 56px; border-radius: 999px; background: var(--weiss); }
.ergebnis p { margin: 0; color: var(--tinte); }
.ergebnis .knopfreihe { grid-column: 1 / -1; margin-top: 10px; }
/* Handy und Tablet: feste Leiste unten, solange weder Klassenwahl noch Generator zu sehen sind */
.leiste-blatt { position: fixed; left: 0; right: 0; bottom: 12px; z-index: 9; width: calc(100% - 32px); max-width: 480px; margin: 0 auto; box-shadow: 0 10px 28px rgba(43,26,14,.28);
  transform: translateY(calc(100% + 24px)); visibility: hidden; transition: transform .25s cubic-bezier(.16, 1, .3, 1), visibility .25s; }
.leiste-blatt.sichtbar { transform: none; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .leiste-blatt { transition: none; } }
.fehlermeldung { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--fehler-hell); color: var(--fehler); font-weight: 700; }

/* Figuren */
.figuren { margin-top: 32px; }
.figur { display: flex; gap: 20px; align-items: flex-start; }
.portraet { width: 120px; height: 120px; flex-shrink: 0; border-radius: 999px; background: var(--creme); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.portraet img { width: 96px; height: auto; }
h3.tilda { color: var(--orange); } h3.bruno { color: var(--braun); }
.figur p { margin: 8px 0 12px; }

/* Textseiten (Impressum, Datenschutz) */
.text { max-width: calc(68ch + 32px); margin: 0 auto; padding: 40px 16px 64px; overflow-wrap: break-word; hyphens: auto; }
.text h1 { font-size: clamp(26px, 8vw, 40px); margin: 0 0 24px; }
.text h2 { font-size: 22px; margin: 32px 0 8px; }
.text .kurz { padding: 16px 20px; border-radius: 16px; background: var(--creme); color: var(--tinte); font-weight: 600; }
.text .stand { margin-top: 40px; color: var(--grau); font-size: 14px; }

/* Fuß */
.fuss { padding: 32px 0 104px; background: var(--tinte); color: var(--rand); font-size: 15px; }
.fuss-raster { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.fuss .marke { color: var(--weiss); font-size: 20px; flex-wrap: wrap; }
.fuss .marke .leise { color: var(--rand); }
.fuss nav { display: flex; flex-wrap: wrap; column-gap: 24px; }
.fuss nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--rand); text-decoration: none; font-weight: 700; }
.fuss nav a:hover { color: var(--weiss); text-decoration: underline; }

/* Sehr schmale Handys: Kacheln untereinander statt drei gequetscht nebeneinander */
@media (max-width: 400px) {
  .karte.formular { padding: 20px 16px; }
  .kacheln-3 { grid-template-columns: minmax(0, 1fr); }
  .kacheln-3 .kachel { flex-direction: row; align-items: baseline; gap: 10px; min-height: 52px; }
  .marke { font-size: 21px; }
  .kopf:has(> .knopf) .marke img { display: none; }
}

/* Breite Bildschirme */
@media (min-width: 720px) {
  .drei { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .drei.wenige { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .kacheln-4, .einstieg-klassen { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kanal-band { grid-template-columns: 380px minmax(0, 1fr); align-items: center; }
  .trailer { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; gap: 32px; }
  .generator-einleitung { grid-template-columns: minmax(0, 1fr) auto; }
  .hero-blatt { right: 20px; bottom: 16px; width: 112px; }
  .abschnitt { padding: 88px 0; }
  .karte { padding: 32px; }
}
@media (min-width: 1000px) {
  .hero { padding: 80px 0 88px; }
  .hero-raster { grid-template-columns: minmax(0, 1fr) 520px; gap: 64px; }
  .hero-bild { order: 0; }
  .hero-bild > img { aspect-ratio: 7 / 6; padding-top: 48px; object-position: center bottom; }
  .hero-bild .marke-pille { top: 16px; left: 16px; }
  .hero-bild .blase { display: inline-block; position: absolute; top: 16px; right: 16px; margin: 0; }
  .hero-blatt { right: 24px; bottom: 24px; width: 150px; }
  .hero-blatt span { display: block; margin-top: -18px; padding: 6px 12px; border-radius: 12px; background: var(--gelb); color: var(--tinte); font-family: var(--kopf); font-weight: 700; font-size: 14px; line-height: 1.15; text-align: center; transform: rotate(-6deg); }
  .zwei-breit { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .generator { grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; }
  .vorschau { position: sticky; top: 100px; }
  .formular { padding: 40px; }
  .portraet { width: 150px; height: 150px; } .portraet img { width: 120px; }
}
/* Das volle Menü passt erst ab 1400 px in eine Zeile */
@media (min-width: 1400px) {
  .menue-knopf { display: none; }
  .leiste-blatt { display: none; }
  .fuss { padding-bottom: 32px; }
  .menue { display: flex; position: static; flex-direction: row; align-items: center; gap: 24px; padding: 0; background: none; border: 0; box-shadow: none; }
  .menue a { white-space: nowrap; }
  .kopf nav a.knopf { margin-top: 0; }
  .kopf { height: 80px; padding: 0 40px; }
}
/* Befristeter Menüpunkt (data-bis, z. B. Adventskalender): im einzeiligen Menü erst ab 1560 px, sonst wird es am Logo zu eng */
@media (min-width: 1400px) and (max-width: 1559px) {
  .menue a[data-bis] { display: none; }
}

/* Wichtel-Krimi (advent.html): Lösungswort eingeben, Video des Türchens, Fallakte */
.advent-figuren { display: flex; gap: 8px; margin-bottom: 8px; }
.advent-figuren img { width: 96px; height: 96px; object-fit: contain; }
.advent-form { margin: 24px 0 8px; padding: 20px; border-radius: 20px; background: var(--creme); }
.advent-form label { display: block; margin-bottom: 8px; font-family: var(--kopf); font-weight: 800; font-size: 20px; color: var(--rost); }
.advent-zeile { display: flex; flex-wrap: wrap; gap: 12px; }
.advent-zeile input { flex: 1 1 220px; min-width: 0; min-height: 56px; padding: 8px 16px; border: 2px solid var(--rand-feld); border-radius: 14px; background: var(--weiss); color: var(--tinte); font-family: var(--kopf); font-weight: 800; font-size: 26px; letter-spacing: .12em; text-transform: uppercase; }
.advent-zeile input[aria-invalid="true"] { border-color: var(--fehler); }
.advent-ergebnis { margin-top: 32px; }
.advent-ergebnis h2 { margin-bottom: 12px; }
.advent-ergebnis .vorschaubild .bald { position: static; display: flex; align-items: center; justify-content: center; height: 100%; margin: 0; padding: 24px; border-radius: 0; background: none; font-size: 18px; text-align: center; }
.advent-akte { margin-top: 40px; }
.akte-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.akte-tuer { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 72px; padding: 8px; border: 2px solid var(--rost); border-radius: 14px; background: var(--weiss); color: var(--rost); cursor: pointer; font-family: var(--kopf); }
.akte-tuer:hover { background: var(--creme); }
.akte-tuer .nr { font-weight: 800; font-size: 24px; line-height: 1; }
.akte-tuer .wort { font-weight: 700; font-size: 13px; letter-spacing: .08em; color: var(--text); }

/* Hinweis-Streifen unter dem Kopf der Startseite und Satz auf den Themen-Seiten (Adventskalender) */
.advent-streifen { display: block; min-height: 56px; padding: 15px 16px; background: #8E1B2E; color: var(--weiss); font-weight: 700; font-size: 16px; line-height: 1.6; text-align: center; text-decoration: none; }
@media (min-width: 720px) { .advent-streifen { padding: 18px 24px; font-size: 18px; } }
.advent-streifen:hover span:not(.advent-neu) { text-decoration: underline; text-underline-offset: 3px; }
.advent-streifen:focus-visible { outline-color: var(--gelb); outline-offset: -4px; }
.advent-neu { display: inline-block; margin-right: 8px; padding: 0 10px; border-radius: 999px; background: var(--gelb); color: var(--tinte); font-family: var(--kopf); font-size: 14px; }
.advent-satz { margin: 28px 0 0; padding: 14px 18px; border-left: 4px solid #8E1B2E; background: var(--hell); border-radius: 8px; }

/* Verkaufsseite Wichtel-Krimi (adventskalender.html) */
.ak-hero { background: linear-gradient(180deg, #EAF2F8 0%, var(--papier) 100%); padding: 32px 0 48px; }
.ak-hero-raster { display: grid; gap: 28px; align-items: center; }
.ak-hero-text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.ak-hero-text .gross { margin: 0; }
.ak-hero h1 { font-size: clamp(38px, 6.4vw, 68px); color: #8E1B2E; }
.ak-dachzeile { margin: 0; font-family: var(--kopf); font-weight: 700; font-size: 18px; color: #1F6E4A; }
.ak-hero-bild { width: 100%; height: auto; border-radius: 24px; box-shadow: 0 16px 40px rgba(20, 40, 60, .18); }
.ak-kauf { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.ak-schritte { display: grid; gap: 20px; margin-top: 32px; }
.ak-schritte h3 { font-size: 22px; margin-bottom: 6px; }
.ak-schritte p { margin: 0; }
.ak-seiten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.ak-seiten figure { margin: 0; }
.ak-seiten img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--rand); box-shadow: 0 8px 18px rgba(43,26,14,.12); }
.ak-seiten figcaption { margin-top: 8px; font-size: 15px; font-weight: 700; color: var(--text); }
.ak-wege { margin-top: 32px; }
.ak-wege .karte { display: flex; flex-direction: column; align-items: flex-start; }
.ak-wege h3 { font-size: 24px; }
.ak-wege .haken { margin-bottom: 20px; }
.ak-wege .knopf { margin-top: auto; }
.text-schmal .ak-frage { max-width: 820px; }
.ak-frage { border-bottom: 1px solid var(--linie); }
.ak-frage summary { min-height: 56px; display: flex; align-items: center; padding: 12px 0; font-weight: 700; cursor: pointer; }
.ak-frage p { margin: 0 0 16px; }
@media (min-width: 720px) {
  .ak-schritte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ak-seiten { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .ak-hero { padding: 72px 0 80px; }
  .ak-hero-raster { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; }
  .ak-schritte { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Themen-Seiten (/arbeitsblaetter, gebaut von web/themen.py) */
.unsichtbar { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.th-hero { background: var(--creme); padding: 24px 0 48px; }
.th-hero .inhalt { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.th-hero .gross { margin: 0; }
.th-hero h1 { font-size: clamp(32px, 5.4vw, 56px); }
.brotkrume { font-size: 15px; color: var(--grau); }
.brotkrume a { color: var(--petrol-dunkel); font-weight: 600; }
.th-dachzeile { margin: 0; font-family: var(--kopf); font-weight: 700; font-size: 18px; color: var(--petrol-dunkel); }
.th-stufe { margin: 0 0 4px; font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--petrol-dunkel); }
.th-blaetter { display: grid; gap: 20px; margin-top: 28px; }
.th-blatt { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: start; padding: 20px; border-radius: 24px; background: var(--weiss); border: 1px solid var(--linie); }
.th-blatt-bild img { width: 100%; border-radius: 4px; border: 1px solid var(--rand); box-shadow: 0 8px 18px rgba(43,26,14,.14); }
.th-blatt h3 { font-size: 22px; margin-bottom: 6px; }
.th-blatt .hinweis { margin: 0 0 14px; }
.th-tipps-raster { display: grid; gap: 40px; }
.th-tipps h3 { font-size: 20px; margin: 24px 0 6px; color: var(--rost); }
.th-tipps p { margin: 0; }
.th-videos { display: flex; flex-direction: column; gap: 16px; }
.th-videos h2 { margin-bottom: 0; }
.th-videos h2.th-zweite { margin-top: 20px; }
.th-videos > p { margin: 0; }
.th-video { display: grid; gap: 12px; padding: 14px; border-radius: 20px; background: var(--weiss); border: 1px solid var(--linie); color: var(--tinte); text-decoration: none; }
.th-video:hover { border-color: var(--rost); }
.th-video .vorschaubild { display: block; }
.th-video-text { display: flex; flex-direction: column; gap: 2px; }
.th-video-text strong { font-family: var(--kopf); font-size: 22px; line-height: 1.15; }
.th-video-text > span:not(.th-stufe):not(.textlink) { font-size: 15px; color: var(--grau); }
.th-video-text .th-stufe { margin: 0; }
.th-video .textlink { color: var(--petrol); min-height: 36px; }
.th-generator { display: grid; gap: 20px; align-items: center; padding-top: 32px; padding-bottom: 32px; border-radius: 28px; background: var(--creme); }
.th-generator p:last-child { margin-bottom: 0; }
.th-generator .knopf { justify-self: start; }
.th-weitere { margin-top: 20px; }
.th-weitere .chip { text-decoration: none; }
.th-weitere .chip .leise { font-size: 13px; }
.th-themen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.th-thema { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 20px; background: var(--weiss); border: 1px solid var(--linie); color: var(--tinte); text-decoration: none; }
.th-thema:hover { border-color: var(--rost); }
.th-thema img { width: 100%; aspect-ratio: 300 / 260; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--rand); }
.th-thema > span { display: flex; flex-direction: column; }
.th-thema strong { font-family: var(--kopf); font-size: 20px; line-height: 1.15; color: var(--rost); }
.th-thema span span { font-size: 14px; color: var(--grau); }
@media (min-width: 720px) {
  .th-hero { padding: 40px 0 64px; }
  .th-blaetter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .th-blatt { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .th-blatt-bild { max-width: 220px; }
  .th-generator { grid-template-columns: minmax(0, 1fr) auto; gap: 32px; padding: 40px; }
  .th-themen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .th-tipps-raster { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 64px; align-items: start; }
  .th-themen { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Mathe-Stolpersteine (web/stolpersteine.py): Sammelseite und Kästen auf den Themen-Seiten. Handy: Vorschaubild
   klein rechts neben der Überschrift, Text darunter über die volle Breite (neben dem Bild war die Spalte nur ~190 px
   breit). Ab 720 px Bild links über die ganze Höhe. */
.st-liste { display: grid; gap: 24px; }
.st-eintrag, .st-kasten { display: grid; grid-template-columns: minmax(0, 1fr) 72px; grid-template-areas: "kopf bild" "text text"; gap: 12px 16px; align-items: start; padding: 20px; border-radius: 24px; background: var(--weiss); border: 1px solid var(--linie); scroll-margin-top: 84px; }
.st-kasten { padding: 14px; border-radius: 20px; }
.st-kopf { grid-area: kopf; }
.st-bild { grid-area: bild; }
.st-text { grid-area: text; }
.st-text > p:first-child { margin-bottom: 4px; }
.st-bild img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; border: 1px solid var(--rand); }
.st-kopf .th-stufe { margin-bottom: 6px; }
.st-eintrag h2 { font-size: clamp(24px, 3.4vw, 30px); color: var(--rost); }
.st-kasten h3 { font-size: 21px; }
.st-kasten .st-text p { font-size: 15px; }
.st-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; margin: 0; font-weight: 700; }
.st-links .textlink { min-height: 44px; }
.abschnitt.dunkel p a { color: var(--gelb); }
@media (min-width: 720px) {
  .st-eintrag { grid-template-columns: 150px minmax(0, 1fr); grid-template-areas: "bild kopf" "bild text"; gap: 10px 28px; padding: 24px; }
  .st-eintrag .st-kopf { align-self: end; }
}
