/* autisten.at neu: die Hülle. Prototyp nach Falzbeins DESIGN_BRIEF.md (26.11.2026), Agent für Falzbein.
   Gedanke: ein Bilderbuch auf dem Tisch. Helles Papier, dunkle Tinte, Farbe nur aus Mos Welt (Gelb, Blau) und nur als Akzent.
   Runde 3 (Andy): KEIN BRAUN, nirgends. Tinte blaugrau statt Sepia, Nacht in tiefem Nachtblau, das Regalbrett hell
   blaugrau lackiert, Fuß auf hellem Papier. Keine Gegenfarbspiele.
   Eine Schrift (Atkinson Hyperlegible, OFL, selbst gehostet), Grundgröße 20 px.
   Logische Eigenschaften (inline/block) durchgehend, damit dir="rtl" (Arabisch, vorbereitet) ohne Zusatz spiegelt.
   Kontraste (WCAG, gemessen, siehe screens\befund.txt): alle Texte mindestens AA. */

:root {
  --papier: #F6F4EE;
  --papier-hell: #FCFBF8;
  --tisch: #E4EAF0;
  --tinte: #26303B;
  --tinte-leise: #4E5A67;
  --linie: #C9D1DA;
  --rand: #7A8796;
  --mo-gelb: #EDB63C;
  --gelb-text: #26303B;
  --gelb-kante: #3C4A5A;
  --mo-blau: #2E5C9E;
  --petrol: #2B6662;
  --schuh-rot: #B3362F;
  --holz: #C5D0DB;
  --holz-kante: #8F9DAD;
  --schatten: rgba(30, 40, 55, .45);
  --korn: url("../medien/papierkorn.png");
  --fokus: var(--mo-blau);

  /* für den Blätterer (er liest diese Namen) */
  --flaeche: var(--papier-hell);
  --grund: var(--papier);
  --text: var(--tinte);
  --leise: var(--tinte-leise);
  --akzent: var(--mo-blau);
  --akzent-text: #FFFFFF;

  --mass: 34em;
  --rand-seite: clamp(16px, 4vw, 48px);
  font-size: 125%; /* 20 px */
  color-scheme: light;
}

/* ---------- Nacht: tiefes Nachtblau, Text hell und warm. Automatisch nach prefers-color-scheme, oder gewählt
   (html[data-modus="dunkel"|"hell"], gemerkt unter "an-modus"). ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-modus="hell"]) {
    --papier: #17202E; --papier-hell: #1F2A3A; --tisch: #121A26;
    --tinte: #ECE7DC; --tinte-leise: #B8C2CF; --linie: #34445A; --rand: #8A9AB0;
    --mo-gelb: #EDBA45; --gelb-text: #17202E; --gelb-kante: #0B111B; --mo-blau: #A9C4EE; --petrol: #8FCAC2; --schuh-rot: #F0A096;
    --holz: #3A4C64; --holz-kante: #2A3A50; --korn: none; --akzent-text: #17202E; --schatten: rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-modus="dunkel"] {
    --papier: #17202E; --papier-hell: #1F2A3A; --tisch: #121A26;
    --tinte: #ECE7DC; --tinte-leise: #B8C2CF; --linie: #34445A; --rand: #8A9AB0;
    --mo-gelb: #EDBA45; --gelb-text: #17202E; --gelb-kante: #0B111B; --mo-blau: #A9C4EE; --petrol: #8FCAC2; --schuh-rot: #F0A096;
    --holz: #3A4C64; --holz-kante: #2A3A50; --korn: none; --akzent-text: #17202E; --schatten: rgba(0, 0, 0, .5);
    color-scheme: dark;
}

/* ---------- Leise: zwei Töne, keine Bewegung, größere Schrift ---------- */
html[data-leise="an"] {
  --papier: #F4F4F1; --papier-hell: #F4F4F1; --tisch: #F4F4F1;
  --tinte: #1F2730; --tinte-leise: #1F2730; --linie: #1F2730; --rand: #1F2730;
  --mo-gelb: #F4F4F1; --gelb-text: #1F2730; --gelb-kante: #1F2730; --mo-blau: #1F2730; --petrol: #1F2730; --schuh-rot: #1F2730;
  --holz: #1F2730; --holz-kante: #1F2730; --korn: none; --akzent-text: #F4F4F1;
  font-size: 140%; /* 22,4 px */
}
/* Leise bei Nacht: dieselben zwei Töne, dunkel */
@media (prefers-color-scheme: dark) {
  html[data-leise="an"]:not([data-modus="hell"]) {
    --papier: #17202E; --papier-hell: #17202E; --tisch: #17202E;
    --tinte: #ECE7DC; --tinte-leise: #ECE7DC; --linie: #ECE7DC; --rand: #ECE7DC;
    --mo-gelb: #17202E; --gelb-text: #ECE7DC; --gelb-kante: #ECE7DC; --mo-blau: #ECE7DC; --petrol: #ECE7DC; --schuh-rot: #ECE7DC;
    --holz: #ECE7DC; --holz-kante: #ECE7DC; --akzent-text: #17202E;
  }
}
html[data-leise="an"][data-modus="dunkel"] {
    --papier: #17202E; --papier-hell: #17202E; --tisch: #17202E;
    --tinte: #ECE7DC; --tinte-leise: #ECE7DC; --linie: #ECE7DC; --rand: #ECE7DC;
    --mo-gelb: #17202E; --gelb-text: #ECE7DC; --gelb-kante: #ECE7DC; --mo-blau: #ECE7DC; --petrol: #ECE7DC; --schuh-rot: #ECE7DC;
    --holz: #ECE7DC; --holz-kante: #ECE7DC; --akzent-text: #17202E;
}
html[data-leise="an"] *,
html[data-leise="an"] *::before,
html[data-leise="an"] *::after { transition: none !important; scroll-behavior: auto !important; }
html[data-leise="an"] .deko { filter: grayscale(1) contrast(.9); opacity: .8; }
html[data-leise="an"] .heft-cover,
html[data-leise="an"] .start-cover img { filter: saturate(.35); box-shadow: none; }
html[data-leise="an"] .knopf-gross { border: 3px solid var(--tinte); }
/* Blätterer: das Umblättern wird zum sofortigen Wechsel (Dauer 1 ms, damit sein animationend sofort kommt) */
html[data-leise="an"] .bl { --bl-dauer: 1ms; }
html[data-leise="an"] .bl-weg.bl-vor, html[data-leise="an"] .bl-weg.bl-rueck { animation-name: bl-blende-aus; transform: none; }
html[data-leise="an"] .bl-her.bl-vor, html[data-leise="an"] .bl-her.bl-rueck { animation-name: bl-blende-ein; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Grund ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--papier); }
body {
  margin: 0;
  background: var(--papier) var(--korn);
  color: var(--tinte);
  font-family: "Atkinson Hyperlegible", "Verdana", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mo-blau); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .16em; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; color: var(--tinte); }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.4rem); letter-spacing: -.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p, ul, ol, dl { margin: 0 0 1em; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.sprung { position: absolute; inset-inline-start: 12px; inset-block-start: -100px; background: var(--tinte); color: var(--papier); padding: 12px 18px; border-radius: 6px; z-index: 50; }
.sprung:focus { inset-block-start: 12px; }

/* ---------- Kopf: Registerreiter wie an einem Buch ---------- */
.kopf {
  background: var(--tisch);
  border-block-end: 2px solid var(--linie);
}
.kopf-innen {
  max-width: calc(1400px + 2 * var(--rand-seite));
  margin: 0 auto;
  padding: 10px var(--rand-seite) 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "marke reiter schalter";
  align-items: end;
  gap: 8px 24px;
}
.marke {
  grid-area: marke;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding-block-end: 12px;
  color: var(--tinte); text-decoration: none; font-weight: 700; font-size: 1.1rem; line-height: 1.1;
}
.marke img { width: 52px; height: 52px; border-radius: 50%; background: #FFFFFF; }
.marke small { display: block; font-weight: 400; font-size: .66rem; line-height: 1.25; max-width: 13.5em; color: var(--tinte-leise); margin-block-start: 3px; }

.reiter { grid-area: reiter; justify-self: center; }
.reiter ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: stretch; }
.reiter li { display: flex; }
.reiter li > a { flex: 1 1 auto; }
.reiter a {
  display: flex; align-items: center; gap: 8px;
  min-height: 64px; padding: 8px 14px 10px; white-space: nowrap;
  margin-block-end: -2px; /* liegt auf der Kante */
  border: 2px solid var(--linie); border-block-end: 0;
  border-start-start-radius: 14px; border-start-end-radius: 14px;
  background: var(--papier-hell);
  color: var(--tinte); text-decoration: none; font-weight: 700;
}
.reiter a img { width: 44px; height: 44px; }
/* Symbole in Reitern und Knöpfen: immer auf festem weißem Grund (nichts scheint durch), in jedem Modus gleich */
.reiter img, .knopf img, .knopf-gross img, .leise-knopf img, .baer-blase li img, .werkstatt img, .reize-hinweis img {
  background: #FFFFFF; border-radius: 8px; mix-blend-mode: normal; filter: none;
}
.reiter a:hover { background: var(--papier); }
.reiter a[aria-current="page"], .reiter a[aria-current="true"] {
  background: var(--papier);
  border-color: var(--rand);
  box-shadow: inset 0 5px 0 var(--mo-gelb);
  position: relative; z-index: 1;
  padding-block-end: 12px;
}
html[data-leise="an"] .reiter a[aria-current] { box-shadow: inset 0 4px 0 var(--tinte); }

.schalter { grid-area: schalter; display: flex; align-items: center; gap: 10px; padding-block-end: 10px; }
.leise-knopf, .sprache {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; min-width: 48px; padding: 4px 16px 4px 8px;
  border: 2px solid var(--rand); border-radius: 999px;
  background: var(--papier-hell); color: var(--tinte);
  font: inherit; font-weight: 700; font-size: .9rem; text-decoration: none; cursor: pointer;
}
.sprache { padding-inline: 12px; }
.sprache .lang-voll { display: none; }
.leise-knopf img { width: 36px; height: 36px; }
.leise-knopf .leise-zustand { display: none; } /* der Zustand zeigt sich an der Füllung (aria-pressed) */
.leise-knopf[aria-pressed="true"] { background: var(--tinte); color: var(--papier); border-color: var(--tinte); }
.leise-knopf[aria-pressed="true"] .leise-zustand { color: var(--papier); }
.leise-knopf[aria-pressed="true"] img { box-shadow: 0 0 0 2px var(--papier); }
/* Runde 4: Mos Karte, nur als Bild (Tooltip und aria-label sagen, was es ist) */
.karte-knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 48px; padding: 0 8px; box-sizing: border-box;
  border: 2px solid var(--rand); border-radius: 999px; background: var(--papier-hell); text-decoration: none;
}
.karte-knopf { padding: 0 12px; }
/* schräg gelegt und mit Kante, damit es als Karte zu lesen ist (und nicht als zweiter Mond-Schalter) */
.karte-knopf img { display: block; width: 25px; height: 39px; box-sizing: border-box; border: 1px solid #8C98A8; border-radius: 3px;
  background: #FFFFFF; box-shadow: 1px 2px 3px rgba(20, 30, 45, .35); transform: rotate(-9deg); transition: transform .15s; }
.karte-knopf:hover img, .karte-knopf:focus-visible img { transform: rotate(0deg) scale(1.08); }
@media (prefers-reduced-motion: reduce) { .karte-knopf img { transition: none; } }
html[data-leise="an"] .karte-knopf img { transition: none; }

@media (min-width: 1000px) {
  .kopf { position: sticky; inset-block-start: 0; z-index: 20; }
}
@media (max-width: 999px) {
  .kopf-innen { grid-template-columns: 1fr auto; grid-template-areas: "marke schalter" "reiter reiter"; padding-block-start: 8px; }
  .reiter { justify-self: stretch; }
  .reiter ul { gap: 4px; }
  .reiter li { flex: 1 1 0; min-width: 0; }
  .reiter a { flex-direction: column; gap: 2px; padding: 6px 4px 8px; min-height: 72px; justify-content: center; text-align: center; font-size: .78rem; line-height: 1.15; white-space: normal; }
  .reiter a img { width: 36px; height: 36px; }
  .reiter a[aria-current] { padding-block-end: 10px; }
  .marke { font-size: .85rem; padding-block-end: 4px; min-height: 48px; white-space: nowrap; gap: 8px; }
  .marke img { width: 44px; height: 44px; }
  .marke small { display: none; }
  .marke { min-width: 0; }
  html[data-leise="an"] .marke { font-size: .7rem; }
  .marke > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .schalter { padding-block-end: 4px; gap: 6px; }
  .leise-knopf .leise-zustand { display: none; }
  .leise-knopf, .sprache { padding-inline: 6px 12px; font-size: .8rem; }
  .sprache { padding-inline: 12px; }
}
@media (max-width: 520px) {
  /* am Handy: Leise und Abend nur als Bild, das Wort bleibt für Vorleseprogramme */
  .leise-knopf > span:not(.vh):not(.leise-zustand) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .leise-knopf { padding: 4px; justify-content: center; }
  /* Runde 4: ein vierter Schalter (Mos Karte) -- enger zusammen, damit „Mo merkt alles“ ganz bleibt */
  .kopf-innen { column-gap: 4px; }
  .marke { font-size: .82rem; }
  .schalter { gap: 4px; }
  .karte-knopf { padding: 0 4px; }
  .leise-knopf, .sprache, .karte-knopf { min-height: 44px; min-width: 44px; }
  .leise-knopf img { width: 32px; height: 32px; }
  .karte-knopf img { width: 20px; height: 32px; }
  .sprache { padding-inline: 8px; }
  .marke { gap: 6px; }
  .marke img { width: 40px; height: 40px; }
}

/* ---------- Wo bin ich ---------- */
.pfad { max-width: calc(1280px + 2 * var(--rand-seite)); margin: 0 auto; padding: 14px var(--rand-seite) 0; font-size: .85rem; color: var(--tinte-leise); }
.pfad ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.pfad li + li::before { content: "›"; padding-inline: 6px 8px; }
[dir="rtl"] .pfad li + li::before { content: "‹"; }
.pfad a { color: var(--tinte-leise); display: inline-block; padding-block: 12px; min-width: 48px; text-align: center; }
.pfad [aria-current] { color: var(--tinte); font-weight: 700; padding-block: 12px; display: inline-block; }

/* ---------- Seite ---------- */
main { max-width: calc(1280px + 2 * var(--rand-seite)); margin: 0 auto; padding: 8px var(--rand-seite) 64px; }
main > :first-child { margin-block-start: 16px; }
.abschnitt { margin-block: 56px; }
.text { max-width: var(--mass); }
.leit { font-size: 1.12rem; max-width: 30em; }
.leise-text { color: var(--tinte-leise); }

.knopf-gross {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 10px 34px 10px 14px;
  background: var(--mo-gelb); color: var(--gelb-text);
  border: 2px solid var(--gelb-kante); border-radius: 18px;
  font: inherit; font-size: 1.35rem; font-weight: 700; text-decoration: none;
  box-shadow: 0 4px 0 var(--gelb-kante);
}
.knopf-gross img { width: 52px; height: 52px; }
.knopf-gross:hover { filter: brightness(1.06); }
html[data-leise="an"] .knopf-gross:hover { filter: none; text-decoration: underline; }
.knopf-gross:active { box-shadow: 0 1px 0 var(--gelb-kante); transform: translateY(3px); }
html[data-leise="an"] .knopf-gross:active { transform: none; }
@media (prefers-reduced-motion: reduce) { .knopf-gross:active { transform: none; } }

.knopf {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 6px 20px;
  background: var(--papier-hell); color: var(--tinte);
  border: 2px solid var(--rand); border-radius: 12px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.knopf img { width: 34px; height: 34px; }
.knopf[disabled], .knopf[aria-disabled="true"] { color: var(--tinte-leise); border-style: dashed; cursor: not-allowed; }

/* ---------- Startseite: das aufgeschlagene Heft ---------- */
.start {
  display: flex;
  gap: 24px clamp(32px, 4vw, 72px);
  align-items: stretch;
  margin-block: 16px 40px;
}
/* Cover: bis etwa 55 % der Inhaltsbreite, aber höchstens etwa 70 % der Fensterhöhe hoch; der Text nimmt den Rest */
.start-cover { flex: 0 0 min(55%, calc(70svh * 2 / 3)); }
.start-text { flex: 1 1 0; min-width: 0; }
.start-cover { margin: 0; }
.start-cover a { display: block; border-radius: 4px 10px 10px 4px; }
.start-cover img {
  /* so breit wie die Spalte, aber höchstens etwa 70 % der Fensterhöhe hoch */
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
  border-radius: 4px 10px 10px 4px;
  box-shadow: -6px 0 0 -2px var(--holz-kante), 0 18px 30px -18px var(--schatten);
}
.start-text { padding-block-start: clamp(8px, 4svh, 48px); display: flex; flex-direction: column; align-items: flex-start; }
.start-text .folge-nr { font-size: 1.25rem; color: var(--tinte-leise); margin-block-end: .3em; }
.start-text h1 { font-size: clamp(2.6rem, 1rem + 4.6vw, 6rem); line-height: 1; letter-spacing: -.02em; margin-block-end: .3em; }
.start-text .reihe { font-size: 1.3rem; font-weight: 700; margin-block-end: .2em; }
.start-text .leit { font-size: clamp(1.12rem, .9rem + .5vw, 1.4rem); margin-block-end: 1.2em; }
.start-text .knopf-gross { min-height: 96px; font-size: clamp(1.4rem, 1rem + 1vw, 2rem); padding: 12px 44px 12px 16px; border-radius: 22px; }
.start-text .knopf-gross img { width: 68px; height: 68px; }
.start-knoepfe { display: flex; flex-wrap: wrap; gap: 16px 20px; }
.knopf-pdf { background: var(--papier-hell); color: var(--tinte); }
html[data-leise="an"] .knopf-pdf { background: var(--papier); }
@media (max-width: 860px) { .start-knoepfe { justify-content: center; } }
.start-text .nebenweg { margin-block-start: 18px; font-size: .9rem; }
.start-text .nebenweg a { display: inline-block; padding-block: 12px; }

@media (max-width: 860px) {
  .start { flex-direction: column; gap: 20px; margin-block-start: 8px; }
  .start-cover { flex: 0 0 auto; }
  .start-cover { max-width: 360px; align-self: center; width: 100%; }
  .start-cover img { width: 100%; }
  .start-text { text-align: center; align-items: center; padding-block-start: 0; }
  .start-text .leit { margin-inline: auto; }
}

/* ---------- Erklärbär: schwebende Box rechts unter der Leiste, zu klein, offen eine große Sprechblase ---------- */
.baer-anker { position: relative; max-width: calc(1280px + 2 * var(--rand-seite)); margin: 0 auto; height: 0; z-index: 15; }
.baer { position: absolute; inset-inline-end: var(--rand-seite); inset-block-start: -58px; display: flex; flex-direction: column; align-items: flex-end; }
.baer-knopf {
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 4px 16px 4px 4px;
  background: var(--papier-hell); color: var(--tinte); border: 2px solid var(--rand); border-radius: 999px;
  font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; box-shadow: 0 6px 14px -8px var(--schatten);
}
.baer-knopf img { width: 48px; height: 48px; border-radius: 50%; background: #FFFFFF; }
.baer-knopf[aria-expanded="true"] { border-color: var(--mo-blau); }
.baer-blase {
  position: relative; margin-block-start: 14px; width: min(30rem, calc(100vw - 2 * var(--rand-seite)));
  background: var(--papier-hell); color: var(--tinte); border: 2px solid var(--rand); border-radius: 20px;
  padding: 20px 24px 18px; font-size: 1rem; line-height: 1.5; box-shadow: 0 18px 36px -18px var(--schatten);
}
.baer-blase::before { /* Sprechzipfel nach oben zum Bären */
  content: ""; position: absolute; inset-block-start: -12px; inset-inline-end: 30px; width: 20px; height: 20px;
  background: var(--papier-hell); border-inline-start: 2px solid var(--rand); border-block-start: 2px solid var(--rand); transform: rotate(45deg);
}
[dir="rtl"] .baer-blase::before { transform: rotate(-45deg); }
.baer-blase[hidden] { display: none; }
.baer-blase p { margin-block-end: .5em; }
.baer-blase ul { list-style: none; padding: 0; margin: 0 0 .8em; }
.baer-blase li { display: flex; align-items: center; gap: 14px; padding-block: 5px; }
.baer-blase li img { width: 48px; height: 48px; flex: 0 0 auto; }
@media (max-width: 999px) {
  .baer { inset-block-start: -56px; }
  .baer-wort { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .baer-knopf { padding: 3px; min-width: 56px; justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
  html:not([data-leise="an"]) .baer-blase { animation: baer-auf 180ms ease-out; transform-origin: top right; }
}
@keyframes baer-auf { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Regal: Hefte stehen auf einem Brett ---------- */
.faecher { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0; }
.fach-reihe { flex: 1 1 auto; min-width: 0; }
.fach-sonder { flex: 0 0 auto; border-inline-start: 6px solid var(--holz-kante); padding-inline-start: 8px; margin-inline-start: 8px; }
.fach-titel { font-size: .95rem; font-weight: 700; color: var(--tinte-leise); margin: 0 0 10px; padding-inline-start: 30px; }
@media (max-width: 700px) {
  .fach-sonder { border-inline-start: 0; border-block-start: 6px solid var(--holz-kante); padding: 14px 0 0; margin: 0; width: 100%; }
  .fach-titel { padding-inline-start: 8px; }
}
.regal-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-block-end: 18px; }
.regal-kopf h2, .regal-kopf h1 { margin: 0; }
.regal-kopf a { display: inline-block; padding-block: 12px; font-weight: 700; }

.brett {
  --h: 300px;            /* Höhe eines Hefts */
  --luecke: 30px;
  list-style: none; margin: 0; padding: 0 var(--luecke) 0;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 var(--luecke);
}
.brett > li { position: relative; display: flex; flex-direction: column; padding-block-end: 22px; margin-block-end: 26px; }
.brett > li::after { /* das Brett: je Heft ein Stück, gemeinsam eine durchgehende Planke */
  content: ""; position: absolute;
  inset-block-start: var(--h); inset-inline: calc(var(--luecke) / -2 - 1px);
  height: 16px; background: var(--holz); border-block-end: 6px solid var(--holz-kante);
}
.heft { width: calc(var(--h) * 2 / 3); }
.heft-link { display: block; color: var(--tinte); text-decoration: none; border-radius: 3px 8px 8px 3px; }
.heft-cover {
  width: 100%; height: var(--h); object-fit: cover;
  border-radius: 3px 8px 8px 3px;
  box-shadow: -4px 0 0 -1px var(--holz-kante), 0 10px 16px -10px var(--schatten);
}
.heft-schild { display: block; margin-block-start: 34px; font-size: .9rem; line-height: 1.3; }
.heft-schild strong { display: block; font-size: 1rem; }
.heft-link:hover .heft-schild strong { text-decoration: underline; }

/* Lesezeichen (Lieblingsheft-Merker): ein rotes Band hängt aus dem Heft */
.heft { position: relative; }
.heft .band {
  position: absolute; inset-block-start: -10px; inset-inline-end: 26px; width: 22px; height: 70px;
  background: var(--schuh-rot);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  display: none; z-index: 1;
}
.heft.gemerkt .band { display: block; }
.merker { margin-block-start: 8px; font-size: .85rem; padding-inline: 12px; align-self: flex-start; }
.merker[aria-pressed="true"] { border-color: var(--schuh-rot); color: var(--schuh-rot); background: var(--papier-hell); }
.merker .herz { width: 28px; height: 28px; }

/* Rücken: was noch kommt, steht schmal im Regal */
.ruecken { width: 64px; }
.ruecken-koerper {
  height: var(--h);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 12px 0;
  background: var(--petrol); color: var(--akzent-text);
  border-radius: 3px; border: 2px solid var(--petrol);
}
html[data-leise="an"] .ruecken-koerper { background: var(--papier-hell); color: var(--tinte); border-color: var(--tinte); }
button.ruecken-koerper { width: 100%; font: inherit; cursor: pointer; }
.ruecken { position: relative; }
.ruecken-vorschau {
  position: absolute; inset-block-start: 0; inset-inline-start: calc(100% + 8px); z-index: 6;
  width: calc(var(--h) * 2 / 3); height: var(--h);
  transform: scaleX(0); transform-origin: left center; opacity: 0; visibility: hidden;
  transition: transform 260ms ease-out, opacity 200ms ease-out, visibility 0s linear 260ms;
}
[dir="rtl"] .ruecken-vorschau { transform-origin: right center; }
.ruecken-vorschau img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px 8px 8px 3px; box-shadow: 0 14px 30px -14px var(--schatten); }
.ruecken.mit-vorschau:hover .ruecken-vorschau, .ruecken.mit-vorschau:focus-within .ruecken-vorschau, .ruecken.offen .ruecken-vorschau {
  transform: none; opacity: 1; visibility: visible; transition: transform 260ms ease-out, opacity 200ms ease-out, visibility 0s;
}
html[data-leise="an"] .ruecken-vorschau { transition: none; transform: none; }
html[data-leise="an"] .ruecken-vorschau img { filter: saturate(.35); }
@media (prefers-reduced-motion: reduce) { .ruecken-vorschau { transition: none !important; transform: none; } }
.ruecken-titel { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 700; font-size: .95rem; line-height: 1.1; max-height: calc(var(--h) - 70px); overflow: hidden; }
.ruecken-nr { font-weight: 700; font-size: 1.1rem; }
.ruecken .heft-schild { width: 140px; }

@media (min-width: 1000px) {
  .brett { --h: 380px; --luecke: 40px; }
  .ruecken { width: 76px; }
  .heft-schild { font-size: 1rem; }
  .heft-schild strong { font-size: 1.15rem; }
}
@media (max-width: 600px) {
  .brett { --h: 222px; --luecke: 22px; padding-inline: 8px; }
  .ruecken { width: 52px; }
  .ruecken .heft-schild { width: 110px; }
}

/* ---------- Das ist Mo ---------- */
.mo { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px 48px; align-items: center; }
/* Runde 4: das runde Signet, durchsichtig: kein Kasten, kein Rahmen, kein Schatten, nichts angeschnitten */
.mo-bild { width: 260px; height: auto; aspect-ratio: 1; object-fit: contain; background: none; border: 0; box-shadow: none; }
.mo dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; max-width: 36em; }
.mo dt { font-weight: 700; }
.mo dd { margin: 0; }
@media (max-width: 700px) {
  .mo { grid-template-columns: 1fr; }
  .mo-bild { width: 200px; justify-self: center; }
  .mo dl { grid-template-columns: 1fr; gap: 0; }
  .mo dd { margin-block-end: 10px; }
}

/* ---------- Für Erwachsene: leiser Ton ---------- */
.erwachsene {
  border-block-start: 2px solid var(--linie);
  padding-block-start: 40px;
  color: var(--tinte);
}
.erwachsene h2 { font-size: 1.25rem; color: var(--petrol); }
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22em), 1fr)); gap: 8px 56px; }
.spalten > * { max-width: var(--mass); }

/* ---------- Lesen ---------- */
.lese-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; margin-block: 0; }
.lese-kopf h1 { margin: 0; font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem); }
.lese-kopf .reihe { margin: 0; color: var(--tinte-leise); font-size: .85rem; }
main.lesen { padding-block-start: 0; }
main.lesen > :first-child { margin-block-start: 0; }
.pfad.kompakt { padding-block-start: 2px; }
.lesepult { margin: 0 auto; }
.lesepult .bl { margin-block-start: 6px; }
/* Der Comic füllt die Höhe: Fenster minus Leiste (am Desktop fest, --kopf-h), Titelzeile und die Leisten des Blätterers.
   !important, weil der Blätterer seine Bühnenhöhe selbst als Stil setzt; er selbst bleibt unverändert. */
:root { --kopf-h: 80px; }
@media (max-width: 999px) { :root { --kopf-h: 0px; } }
.lesepult .bl-buehne { height: max(360px, calc(100svh - var(--kopf-h) - 170px)) !important; }
.lese-hinweis { text-align: center; font-size: .85rem; margin-block: 8px 0; }
.hilft {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px;
  max-width: 44em; margin: 48px auto 0;
  background: var(--papier-hell); border: 2px solid var(--linie); border-radius: 18px; padding: 24px;
}
.hilft img { width: 96px; height: 96px; border-radius: 50%; }
.hilft h2 { font-size: 1.3rem; }
.hilft .wer { font-size: .85rem; color: var(--tinte-leise); margin-block-end: .2em; }
@media (max-width: 600px) { .hilft { grid-template-columns: 1fr; } .hilft img { width: 72px; height: 72px; } }
.lese-fuss { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: center; margin-block-start: 32px; }

/* ---------- Karten (Platzhalter) ---------- */
.karten-tor { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-block: 8px 16px; }
.karten-tor .knopf-gross { font-size: clamp(1.4rem, 1rem + 1vw, 2rem); min-height: 96px; padding-inline-end: 40px; }
.karten-tor .knopf-gross img { width: 68px; height: 68px; }
.baustelle {
  display: flex; align-items: center; gap: 16px; max-width: 40em;
  background: var(--papier-hell); border: 2px dashed var(--rand); border-radius: 16px; padding: 12px 18px;
}
.baustelle img { width: 84px; flex: 0 0 auto; }
.baustelle p { margin: 0; }
.karten-brett .heft { width: auto; }
.karte { width: calc(var(--h) * .75); }
.karte-bild {
  height: var(--h); width: 100%;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  background: #FFFFFF; border: 2px solid var(--linie); border-radius: 12px; padding: 10px 8px 8px;
  box-shadow: 0 10px 16px -12px var(--schatten);
}
html[data-leise="an"] .karte-bild { background: var(--papier-hell); box-shadow: none; }
.karte-bild img { width: 100%; height: auto; }
.karte-bild span { font-weight: 700; font-size: 1rem; }
.karten-brett { --h: 190px; --luecke: 24px; }
.leer-platz {
  height: var(--h); width: calc(var(--h) * .75);
  border: 2px dashed var(--rand); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px;
  color: var(--tinte-leise); font-size: .85rem;
}
@media (max-width: 600px) { .karten-brett { --h: 150px; --luecke: 16px; } }

/* ---------- Fürs Zuhause ---------- */
.werkstaetten { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19em), 1fr)); gap: 24px; }
.werkstatt {
  display: grid; grid-template-columns: 96px 1fr; gap: 6px 18px; align-items: start;
  background: var(--papier-hell); border: 2px solid var(--linie); border-radius: 16px; padding: 18px;
}
.werkstatt img { width: 96px; height: 96px; grid-row: span 3; }
.werkstatt h2 { font-size: 1.2rem; margin: 0; }
.werkstatt p { margin: 0; font-size: .95rem; }
.werkstatt .stand { font-size: .85rem; color: var(--tinte-leise); }
.werkstatt .knopf { justify-self: start; margin-block-start: 6px; }

/* ---------- Wir ---------- */
.inklusion .ink-reihe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-block: 16px; max-width: 1040px; }
.inklusion figure { margin: 0; text-align: center; }
.inklusion figure img { border-radius: 12px; border: 2px solid var(--linie); width: 100%; }
.inklusion figcaption { font-weight: 700; margin-block-start: 6px; }
.ink-lizenz { font-size: .8rem; color: var(--tinte-leise); }
@media (max-width: 600px) { .inklusion .ink-reihe { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.recht-liste { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Fuß ---------- */
.fuss {
  border-block-start: 2px solid var(--linie);
  background: var(--papier-hell);
  font-size: .85rem; color: var(--tinte);
}
.fuss-innen { max-width: calc(1280px + 2 * var(--rand-seite)); margin: 0 auto; padding: 28px var(--rand-seite) 40px; }
.fuss p { margin: 0 0 .6em; max-width: 52em; }
.fuss a { color: var(--tinte); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.fuss img { width: 22px; height: 22px; }
/* Runde 4: Signet-Reihe, nur Bilder, alle gleich groß und rund (eckige Marken auf einer weißen Scheibe) */
.signete ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.signete li { margin: 0; }
.fuss .signete a { display: block; width: 56px; height: 56px; min-height: 0; border-radius: 50%; overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 30, 45, .18), 0 6px 14px -8px rgba(20, 30, 45, .45); transition: transform .2s; }
.fuss .signete a:hover, .fuss .signete a:focus-visible { transform: translateY(-3px); }
.fuss .signete a:focus-visible { outline: 3px solid var(--tinte); outline-offset: 4px; }
.fuss .signete img { display: block; width: 56px; height: 56px; object-fit: contain; }
.fuss .signete a.scheibe { background: #FFFFFF; }
.fuss .signete a.scheibe img { width: 34px; height: 34px; margin: 11px; }
@media (max-width: 480px) {
  .signete ul { gap: 12px; }
  .fuss .signete a, .fuss .signete img { width: 48px; height: 48px; }
  .fuss .signete a.scheibe img { width: 30px; height: 30px; margin: 9px; }
}
@media (prefers-reduced-motion: reduce) { .fuss .signete a { transition: none; } .fuss .signete a:hover, .fuss .signete a:focus-visible { transform: none; } }
html[data-leise="an"] .fuss .signete a { transition: none; transform: none; }
.fuss .lizenz { font-size: .8rem; color: var(--tinte-leise); }
.fuss .lizenz a, .ink-lizenz a { display: inline; min-height: 0; color: inherit; }

/* ---------- Sprachwahl (Wurzel) ---------- */
.wahl { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 24px; text-align: center; }
.wahl img { width: 120px; border-radius: 50%; }
.wahl .knoepfe { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ---------- Wie viel ist zu viel? (Reizbühne aus dem Bestand, Schritt für Schritt, ohne Bewegung) ---------- */
.reize-hinweis { display: flex; gap: 14px; align-items: flex-start; max-width: 44em; background: var(--papier-hell); border: 2px solid var(--linie); border-radius: 14px; padding: 12px 16px; }
.reize-hinweis img { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 50%; }
.reize-hinweis p { margin: 0; }
.reize-buehne { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 18px; margin-block: 18px 8px; max-width: 1040px; }
.reize-bild { position: relative; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; border: 2px solid var(--linie); background: var(--tisch); }
.reize-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.reize-bild[data-phase="alle"] .b-alle, .reize-bild[data-phase="mo"] .b-mo, .reize-bild[data-phase="ruhe"] .b-ruhe { display: block; }
.reize-bild svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.reize-bild[data-phase="mo"] svg, .reize-bild[data-phase="ruhe"] svg { display: none; }
.reize-bild .reiz { display: none; }
.reize-bild .reiz.an { display: inline; }
.reize-bild * { animation: none !important; transition: none !important; }
.reize-bild .reiz[data-reiz="lampen"] g { stroke-width: 12; }
.reize-bild .reiz[data-reiz="durchsage"] { stroke-width: 12; }
.reize-bild .reiz[data-reiz="durchsage"] .w2 { transform-box: fill-box; transform-origin: center; transform: scale(1.6); }
.reize-bild .reiz[data-reiz="durchsage"] .w3 { transform-box: fill-box; transform-origin: center; transform: scale(2.2); }
.reize-bild .reiz[data-reiz="kasse"] .pieps { transform-box: fill-box; transform-origin: center; transform: scale(1.8); }
.reize-bild .reiz[data-reiz="wagen"] g { stroke-width: 10; stroke: #FF7A1A; }
.reize-zeile { position: absolute; inset-inline: 12px; inset-block-end: 12px; display: flex; justify-content: center; }
.reize-zeile span { background: #FFFAF1; color: #2A2833; border-radius: 12px; padding: 6px 14px; font-weight: 700; font-size: .9rem; }
.reize-glas { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; background: var(--papier-hell); border: 2px solid var(--linie); border-radius: 14px; padding: 12px; }
.reize-glas svg { width: 90px; height: auto; }
.reize-glas small { color: var(--tinte-leise); font-size: .8rem; line-height: 1.3; }
.reize-glas .tropfen { display: none; }
.reize-text { max-width: 44em; min-height: 3.2em; }
.reize-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.reize-knoepfe .stand { color: var(--tinte-leise); font-size: .85rem; }
.reize-knoepfe .weiter { background: var(--mo-blau); color: var(--akzent-text); border-color: var(--mo-blau); }
.reize-liste { max-width: 44em; padding-inline-start: 1.4em; }
.reize-liste li { margin-block-end: .6em; }
.reize-liste .wo { font-weight: 700; display: block; }
/* ohne Skript und in Leise: nur der Text */
.reize:not(.reize-bereit) :is(.reize-buehne, .reize-text, .reize-knoepfe) { display: none; }
.reize.reize-bereit .reize-liste { display: none; }
html[data-leise="an"] .reize :is(.reize-buehne, .reize-text, .reize-knoepfe) { display: none; }
html[data-leise="an"] .reize .reize-liste { display: block; }
@media (max-width: 700px) {
  .reize-buehne { grid-template-columns: 1fr; }
  .reize-glas { flex-direction: row; justify-content: flex-start; padding: 6px 14px; }
  .reize-glas svg { width: 34px; }
}
