/* reitz-meln.de · Welt: Tabellenbuch */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Anton"; src: url("../fonts/anton-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("../fonts/overpass-vf.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("../fonts/overpass-vf-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  /* Farben */
  --papier: #f4f2ee;
  --flaeche: #e9e6df;
  --linie: #d6d2c9;
  --tinte: #15171a;
  --leise: #5b5e63;
  --funke: #ff7a1a;
  --funke-text: #ad4a07;
  --nacht: #15171a;
  --nacht-linie: #3a3b3d;
  --nacht-text: #f4f2ee;
  --nacht-leise: #b5b2ab;

  /* Schriften */
  --schrift-titel: "Archivo", "Arial Narrow", sans-serif;
  --schrift-text: "Overpass", system-ui, sans-serif;
  --schrift-kanal: "Anton", "Archivo", sans-serif;
  --titel-breite: 72%;

  /* Größen */
  --t-text: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  --t-lead: clamp(1.1875rem, 1.05rem + 0.6vw, 1.4375rem);
  --t-klein: 0.875rem;
  --t-h1: clamp(3.75rem, 1.6rem + 7vw, 8rem);
  --t-h2: clamp(2.25rem, 1.4rem + 3.6vw, 4.5rem);
  --t-h3: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  --t-nr: clamp(5.5rem, 2rem + 13vw, 17rem);

  /* Raster */
  --rand: clamp(16px, 4vw, 64px);
  --register-b: 0px;
  --kopf-h: 56px;
  --kapitel-luft: clamp(64px, 9vw, 144px);
  --spalte-rand: clamp(120px, 14vw, 240px);
  --einstieg-bild-b: clamp(220px, 20vw, 300px);
  --text-mass: 64ch;
  --ease: cubic-bezier(.16, 1, .3, 1);

  /* Waben: Sechskant-Prägung im Papier, auf Nacht als feines Netz (Raster wie im REITZ OS) */
  --wabe-hell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='72.75' viewBox='0 0 42 72.75'%3E%3Cg fill='none'%3E%3Cpath transform='translate(.8 .8)' d='M21 0l21 12.12v24.25L21 48.5 0 36.37V12.12zM21 48.5v24.25M0 12.12L-21 0M42 12.12L63 0' stroke='%23fff' stroke-opacity='.8'/%3E%3Cpath d='M21 0l21 12.12v24.25L21 48.5 0 36.37V12.12zM21 48.5v24.25M0 12.12L-21 0M42 12.12L63 0' stroke='%2315171a' stroke-opacity='.09'/%3E%3C/g%3E%3C/svg%3E");
  --wabe-flaeche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='72.75' viewBox='0 0 42 72.75'%3E%3Cg fill='none'%3E%3Cpath transform='translate(.8 .8)' d='M21 0l21 12.12v24.25L21 48.5 0 36.37V12.12zM21 48.5v24.25M0 12.12L-21 0M42 12.12L63 0' stroke='%23fff' stroke-opacity='.5'/%3E%3Cpath d='M21 0l21 12.12v24.25L21 48.5 0 36.37V12.12zM21 48.5v24.25M0 12.12L-21 0M42 12.12L63 0' stroke='%2315171a' stroke-opacity='.09'/%3E%3C/g%3E%3C/svg%3E");
  --wabe-nacht: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='72.75' viewBox='0 0 42 72.75'%3E%3Cg fill='none'%3E%3Cpath d='M21 0l21 12.12v24.25L21 48.5 0 36.37V12.12zM21 48.5v24.25M0 12.12L-21 0M42 12.12L63 0' stroke='%23f4f2ee' stroke-opacity='.065'/%3E%3C/g%3E%3C/svg%3E");
  --wabe-mass: 42px 72.75px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--kopf-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier) var(--wabe-hell) 0 0 / var(--wabe-mass); color: var(--tinte);
  font-family: var(--schrift-text); font-size: var(--t-text); line-height: 1.6;
  font-variant-numeric: tabular-nums; text-rendering: optimizeLegibility;
  caret-color: var(--funke);
  scrollbar-color: var(--tinte) var(--flaeche);
}
::selection { background: var(--funke); color: var(--tinte); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--funke-text); text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3, dt { font-family: var(--schrift-titel); font-stretch: var(--titel-breite); font-weight: 800; line-height: 0.95; letter-spacing: -0.005em; margin: 0; text-wrap: balance; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp { left: -9999px; }
.sprung { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--tinte); color: var(--papier); padding: 10px 16px; font-weight: 700; }
.sprung:focus { top: 12px; }

/* ---------- Kolumnentitel ---------- */
.kolumne {
  position: sticky; top: 0; z-index: 30; height: var(--kopf-h);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 0 calc(var(--rand) + var(--register-b)) 0 var(--rand);
  background: var(--papier); border-bottom: 3px solid var(--tinte);
  font-family: var(--schrift-titel); font-stretch: 85%; font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.kolumne p { margin: 0; overflow: hidden; height: 1.3em; line-height: 1.3em; }
.kolumne-marke { display: flex; align-items: center; gap: 10px; color: var(--tinte); text-decoration: none; }
.kolumne-marke svg { width: 30px; height: 30px; flex: none; }
.kolumne-name { font-size: 1.125rem; font-weight: 800; font-stretch: 72%; letter-spacing: 0; text-transform: none; }
.kolumne-kapitel { justify-self: center; }
.kolumne-seite { justify-self: end; }
.kolumne-wechsel { display: inline-block; }
.kolumne-wechsel.ist-neu { animation: kolumne-rein 420ms var(--ease) both; }
@keyframes kolumne-rein { from { transform: translateY(105%); } to { transform: none; } }

/* ---------- Daumenregister ---------- */
.register ol { list-style: none; margin: 0; padding: 0; }
.reiter {
  display: flex; text-decoration: none; color: var(--papier); background: var(--tinte);
  font-family: var(--schrift-titel); font-weight: 800; font-stretch: 72%;
  transition: transform 380ms var(--ease), background-color 200ms;
}
.reiter-nr { font-variant-numeric: lining-nums tabular-nums; }
.reiter-kontakt { background: var(--funke); color: var(--tinte); }
.reiter:focus-visible { outline-color: var(--funke); }

/* Handy: Register als Leiste unten */
.register {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  padding: 0 6px; padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(to bottom, transparent 0 14px, var(--tinte) 14px);
}
.register ol { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.reiter {
  flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 60px; border-radius: 10px 10px 0 0; padding: 6px 2px 4px;
  transform: translateY(8px); box-shadow: 0 -1px 0 rgba(244,242,238,.18);
}
.reiter-nr { font-size: 1.25rem; line-height: 1; }
.reiter-text { font-size: 0.75rem; font-weight: 700; font-stretch: 85%; line-height: 1.1; text-align: center; letter-spacing: .01em; }
.reiter.is-aktiv { transform: translateY(-4px); }
.reiter-lang { display: none; }
@media (min-width: 1024px) { .reiter-lang { display: inline; } }
body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }

/* ---------- Kapitel ---------- */
.kapitel { position: relative; padding: var(--kapitel-luft) calc(var(--rand) + var(--register-b)) var(--kapitel-luft) var(--rand); }
.kapitel-rand { line-height: 0.8; }
.kapitel-nr {
  display: block; font-family: var(--schrift-titel); font-weight: 800; font-stretch: 62%;
  font-size: var(--t-nr); line-height: 0.78; letter-spacing: -0.02em; color: var(--tinte);
  margin-bottom: 0.18em; font-variant-numeric: lining-nums;
}
.kapitel + .kapitel::before { content: ""; position: absolute; top: 0; left: var(--rand); right: calc(var(--rand) + var(--register-b)); border-top: 3px solid var(--tinte); }
.kapitel-inhalt > h2 { font-size: var(--t-h2); max-width: 16ch; margin-bottom: 0.45em; }
.lead { font-size: var(--t-lead); line-height: 1.5; max-width: 40ch; }
.fliesstext p { max-width: var(--text-mass); }
.abschnitt { margin-top: clamp(56px, 7vw, 112px); }
.abschnitt-nr, .feld-nr { font-variant-numeric: lining-nums tabular-nums; margin-right: 0.35em; }
h3, .h2-klein { font-size: var(--t-h3); margin-bottom: 0.8em; max-width: 24ch; }

/* ---------- Kapitel 1 ---------- */
.kapitel-1 { padding-top: clamp(32px, 6vw, 88px); }
.einstieg { display: grid; gap: 32px; }
h1 { font-size: var(--t-h1); font-stretch: 68%; line-height: 0.86; letter-spacing: -0.01em; white-space: nowrap; }
.untertitel { margin: 0.6em 0 1em; font-family: var(--schrift-titel); font-stretch: 85%; font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.06em; text-transform: uppercase; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0 0; }
.knopf {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 22px;
  font-family: var(--schrift-text); font-weight: 700; font-size: 1.0625rem; line-height: 1.2;
  text-decoration: none; color: var(--tinte); border: 2px solid var(--tinte); border-radius: 0; cursor: pointer;
  transition: transform 220ms var(--ease), background-color 160ms, color 160ms, border-color 160ms;
}
.knopf-primaer { background: var(--funke); border-color: var(--funke); }
.knopf-rahmen { background: transparent; }
.knopf:hover { transform: translateY(-2px); }
.knopf:active { transform: translateY(0); }
.knopf-primaer:hover { background: transparent; color: inherit; border-color: var(--funke); }
.knopf-rahmen:hover { background: var(--tinte); color: var(--papier); }
.knopf-icon { width: 14px; height: 14px; }
.knopf[disabled] { opacity: .6; cursor: progress; transform: none; }

.bild { margin: 0; }
.bild img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.04); background: var(--flaeche); }
.bild figcaption, caption, .fussnote { font-size: var(--t-klein); color: var(--leise); line-height: 1.45; }
.bild figcaption { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--linie); }
.bild-nr, .tab-nr { font-weight: 700; color: var(--tinte); margin-right: 0.5em; }

/* Tabellen */
.tabelle { width: 100%; border-collapse: collapse; caption-side: bottom; }
.tabelle caption { text-align: left; padding-top: 10px; }
.einstieg .tabelle-merk { margin-top: clamp(28px, 3vw, 44px); max-width: 640px; }
.einstieg .tabelle-merk tbody th, .einstieg .tabelle-merk td { padding-top: 10px; padding-bottom: 10px; }
.tabelle thead th {
  text-align: left; font-family: var(--schrift-titel); font-stretch: 85%; font-weight: 700; font-size: 0.8125rem;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 0 12px 8px 0; border-bottom: 3px solid var(--tinte);
}
.tabelle tbody th, .tabelle td { text-align: left; vertical-align: top; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--linie); }
.tabelle tbody th { font-family: var(--schrift-titel); font-stretch: 80%; font-weight: 800; font-size: 1.125rem; line-height: 1.3; white-space: nowrap; padding-right: 20px; }
.zweispaltig { display: grid; gap: 40px; }

/* ---------- Kapitel 2: Merksatz (die Strecke steht weiter unten) ---------- */
.merksatz {
  margin: 1.4em 0 0; padding-top: 0.7em; border-top: 3px solid var(--tinte); max-width: 22ch;
  font-family: var(--schrift-titel); font-stretch: 72%; font-weight: 800; font-size: var(--t-h3); line-height: 1.15; text-wrap: balance;
}

/* ---------- Kapitel 3: Funken & Maß ---------- */
.kapitel-3 { background: var(--nacht) var(--wabe-nacht) 0 0 / var(--wabe-mass); color: var(--nacht-text); margin-top: -2px; border-bottom: 1px solid var(--nacht-linie); }
.kapitel-3::before, .kapitel-3 + .kapitel::before { display: none; }
.kapitel-3 .kapitel-nr { font-family: var(--schrift-kanal); font-weight: 400; font-stretch: 100%; color: var(--nacht-text); }
.kapitel-3 h2 { font-family: var(--schrift-kanal); font-weight: 400; font-stretch: 100%; text-transform: uppercase; letter-spacing: 0.005em; line-height: 1.16; max-width: 14ch; }
.kanal-name { display: block; color: var(--funke); }
.kapitel-3 .lead { color: var(--nacht-text); }
.kanal-zitat { margin: clamp(40px, 6vw, 88px) 0; }
.kanal-zitat p { margin: 0; font-family: var(--schrift-kanal); text-transform: uppercase; font-size: clamp(2.5rem, 1.2rem + 5.4vw, 6rem); line-height: 1.08; max-width: 13ch; text-wrap: balance; }
.haengend { display: inline-block; margin-left: -0.42em; width: 0.42em; }
.glut { color: var(--funke); }
.kapitel-3 .tabelle { max-width: 980px; }
.kapitel-3 .tabelle thead th { border-bottom-color: var(--nacht-text); color: var(--nacht-text); }
.kapitel-3 .tabelle tbody th, .kapitel-3 .tabelle td { border-bottom-color: var(--nacht-linie); }
.kapitel-3 .tabelle tbody th { font-family: var(--schrift-kanal); font-weight: 400; font-stretch: 100%; text-transform: uppercase; letter-spacing: .02em; font-size: 1.25rem; white-space: normal; width: 13rem; }
.kapitel-3 caption, .kapitel-3 .fussnote { color: var(--nacht-leise); }
.kapitel-3 .tab-nr { color: var(--nacht-text); }
.kapitel-3 sup a, .kapitel-3 .kanal-frage a { color: var(--funke); }
.fussnote { margin-top: 14px; max-width: 64ch; }
.fussnote span { font-weight: 700; margin-right: 0.4em; }
.kapitel-3 .knoepfe { margin-top: 2.2em; }
.kapitel-3 .knopf:focus-visible, .kapitel-3 a:focus-visible { outline-color: var(--nacht-text); }
.kanal-frage { margin-top: 1.2em; color: var(--nacht-leise); }

/* ---------- Kapitel 4: Fragen ---------- */
.fragen { margin: clamp(24px, 3vw, 40px) 0 0; border-top: 3px solid var(--tinte); max-width: 1080px; }
.frage { display: grid; gap: 8px 48px; padding: 22px 0 24px; border-bottom: 1px solid var(--linie); }
.frage dt { font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem); line-height: 1.08; }
.frage dd { margin: 0; max-width: 60ch; }

/* ---------- Kapitel 5: Formblatt ---------- */
.kapitel-5 { background: var(--flaeche) var(--wabe-flaeche) 0 0 / var(--wabe-mass); margin-top: -2px; }
.kapitel-5::before { display: none; }
.formblatt { margin-top: clamp(28px, 4vw, 48px); max-width: 880px; background: var(--papier); border: 2px solid var(--tinte); }
.formblatt-kopf {
  display: flex; justify-content: space-between; gap: 16px; padding: 10px 20px; background: var(--tinte); color: var(--papier);
  font-family: var(--schrift-titel); font-stretch: 85%; font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
}
#anfrage { padding: 8px 20px 24px; }
.feld { margin: 0; padding: 18px 0 20px; border: 0; border-bottom: 1px solid var(--linie); min-inline-size: 0; }
.feld label, .feld legend { display: block; padding: 0; margin-bottom: 10px; font-family: var(--schrift-titel); font-stretch: 80%; font-weight: 800; font-size: 1.25rem; line-height: 1.2; }
.feld legend { float: left; width: 100%; }
.feld legend + * { clear: both; }
.optional { font-family: var(--schrift-text); font-weight: 400; font-size: var(--t-klein); color: var(--leise); margin-left: 0.4em; }
input[type="text"], input[type="email"], textarea {
  width: 100%; font: inherit; color: var(--tinte); background: #fbfaf7; border: 0; border-bottom: 2px solid var(--tinte); border-radius: 0;
  padding: 12px 12px; min-height: 52px; transition: background-color 160ms, border-color 160ms;
}
textarea { resize: vertical; min-height: 160px; line-height: 1.5; }
input:focus-visible, textarea:focus-visible { outline: none; background: #fff; border-bottom-color: var(--funke); box-shadow: 0 2px 0 var(--funke); }
.feld-hinweis { margin: 8px 0 0; font-size: var(--t-klein); color: var(--leise); }
.feld-fehler { display: none; margin: 8px 0 0; font-size: var(--t-klein); font-weight: 700; color: #a3261a; }
.feld.hat-fehler .feld-fehler { display: block; }
.feld.hat-fehler input, .feld.hat-fehler textarea { border-bottom-color: #a3261a; background: #fbefec; }

.kreuz-liste { display: grid; gap: 4px 24px; }
.feld label.kreuz, .kreuz { position: relative; display: flex; margin: 0; font-family: var(--schrift-text); font-stretch: 100%; font-weight: 400; line-height: 1.3; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: var(--t-text); }
.kreuz input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kreuz-feld { flex: none; position: relative; width: 24px; height: 24px; border: 2px solid var(--tinte); border-radius: 50%; background: #fbfaf7; transition: background-color 120ms; }
.kreuz-feld::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--tinte); transform: scale(0); transition: transform 220ms var(--ease); }
.kreuz input:checked + .kreuz-feld { background: var(--funke); }
.kreuz input:checked + .kreuz-feld::after { transform: scale(1); }
.kreuz:hover .kreuz-feld { background: var(--flaeche); }
.kreuz input:focus-visible + .kreuz-feld { outline: 3px solid var(--tinte); outline-offset: 3px; }
.feld-kreuz.hat-fehler .kreuz-feld { border-color: #a3261a; }

.absenden { display: grid; gap: 14px; padding-top: 24px; }
.absenden .knopf { justify-self: start; }
.form-status { margin: 14px 0 0; }
.form-status.ist-fehler { color: #a3261a; font-weight: 700; }
.form-danke { padding: 32px 20px 36px; }
.form-danke:focus { outline: none; }
.danke-titel { font-family: var(--schrift-titel); font-stretch: 72%; font-weight: 800; font-size: var(--t-h3); line-height: 1.05; margin-bottom: 0.5em; }
.danke-titel::before { content: ""; display: block; width: 48px; height: 48px; margin-bottom: 18px; border: 2px solid var(--tinte); background:
  linear-gradient(45deg, transparent calc(50% - 1.5px), var(--tinte) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
  linear-gradient(-45deg, transparent calc(50% - 1.5px), var(--tinte) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)), var(--funke); }
#form-wrap.ist-gesendet form { display: none; }

/* ---------- Fuß ---------- */
.fuss {
  background: var(--tinte) var(--wabe-nacht) 0 0 / var(--wabe-mass); color: var(--papier); margin-top: -2px;
  padding: 48px calc(var(--rand) + var(--register-b)) 40px var(--rand);
  display: grid; gap: 24px; font-size: var(--t-klein);
}
.fuss p { margin: 0; }
.fuss-marke { display: flex; align-items: center; gap: 14px; }
.fuss-marke svg { width: 44px; height: 44px; flex: none; }
.fuss-name { display: block; font-family: var(--schrift-titel); font-stretch: 72%; font-weight: 800; font-size: 1.5rem; line-height: 1; }
.fuss-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.fuss a { color: var(--papier); }
.fuss a:hover { color: var(--funke); }
.fuss :focus-visible { outline-color: var(--funke); }
.fuss-copy { color: var(--nacht-leise); }

/* ---------- ab Tablet ---------- */
@media (min-width: 700px) {
  .einstieg { grid-template-columns: 1fr minmax(220px, 34%); align-items: end; gap: 40px; }
  .frage { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .kreuz-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .absenden { grid-template-columns: auto 1fr; align-items: center; gap: 24px; }
  .fuss { grid-template-columns: 1fr auto; align-items: center; }
  .fuss-copy { grid-column: 1 / -1; }
}

/* ---------- Desktop: Register am rechten Rand ---------- */
@media (min-width: 1024px) {
  :root { --register-b: 168px; }
  body { padding-bottom: 0; }
  .register { left: auto; right: 0; bottom: auto; top: 50%; transform: translateY(-50%); padding: 0; background: none; width: var(--register-b); }
  .register ol { display: flex; flex-direction: column; gap: 6px; }
  .reiter {
    flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px;
    height: auto; min-height: 84px; padding: 12px 16px 12px 18px; border-radius: 12px 0 0 12px;
    transform: translateX(26px); box-shadow: 0 0 0 1px rgba(244,242,238,.16);
  }
  .reiter-nr { font-size: 0.9375rem; font-family: var(--schrift-titel); font-stretch: 85%; font-weight: 700; }
  .reiter-text { font-size: 1.375rem; font-weight: 800; font-stretch: 68%; text-align: left; line-height: 1; white-space: nowrap; }
  .reiter { padding-right: 34px; }
  .reiter-kurz { display: none; }
  .reiter:hover { transform: translateX(14px); }
  .reiter.is-aktiv { transform: translateX(0); }

  .kapitel { display: grid; grid-template-columns: var(--spalte-rand) minmax(0, 1fr); column-gap: clamp(24px, 3vw, 56px); }
  .kapitel-rand { position: relative; }
  .kapitel-nr { position: sticky; top: calc(var(--kopf-h) + 24px); }
  .einstieg { grid-template-columns: minmax(0, 1fr) var(--einstieg-bild-b); gap: clamp(32px, 4vw, 72px); align-items: start; }
  .kreuz-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 699px) {
  .kolumne { grid-template-columns: auto 1fr auto; gap: 10px; }
  .kolumne-name { display: none; }
  .kolumne-kapitel { justify-self: start; font-size: 0.75rem; }
  .bild-portraet { max-width: 420px; }
  .tabelle-merk tbody th { white-space: normal; }
  .kapitel-3 .tabelle tbody th { width: 8.5rem; font-size: 1.0625rem; }
  .formblatt-kopf span:first-child { display: none; }
  #anfrage { padding: 4px 16px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* ---------- Nebenseiten (Impressum, Datenschutz, 404) ---------- */
.nebenseite { padding-bottom: 0; }
.nebenseite .kapitel { min-height: 60vh; }
.h1-neben { font-size: var(--t-h2); max-width: 18ch; margin-bottom: 0.5em; hyphens: manual; }
.nebenseite .kapitel-nr { font-size: clamp(5rem, 2rem + 9vw, 12rem); }

@media (max-width: 699px) { .haengend { margin-left: 0; width: auto; } }
@media (min-width: 700px) { .kapitel-3 h2 { line-height: 1.24; } }
.rechtstext { max-width: 70ch; }
.rechtstext h2 { font-size: var(--t-h3); margin: 1.8em 0 0.5em; max-width: none; }
.rechtstext p { max-width: 70ch; }
.rechtstext-stand { margin-top: 2.4em; font-size: var(--t-klein); color: var(--leise); }

/* ---------- Kanäle: Symbole (Reiter, Knöpfe, Fuß) ---------- */
.symbole { position: absolute; width: 0; height: 0; overflow: hidden; }
.knopf-marke { width: 20px; height: 20px; flex: none; fill: currentColor; }
.knopf-nacht { background: transparent; color: var(--papier); border-color: var(--nacht-text); }
.knopf-nacht:hover { border-color: var(--funke); color: var(--funke); }
.fuss-kanal { display: inline-flex; align-items: center; gap: 8px; }
.fuss-symbol { width: 18px; height: 18px; flex: none; fill: currentColor; }
.kanal-reiter { display: none; }
@media (min-width: 1024px) {
  .kanal-reiter {
    display: block; margin-top: 14px; padding: 12px 16px 14px 18px;
    background: var(--tinte); color: var(--papier); border-radius: 12px 0 0 12px;
    box-shadow: 0 0 0 1px rgba(244,242,238,.16);
    transform: translateX(26px); transition: transform 380ms var(--ease);
  }
  .kanal-reiter:hover, .kanal-reiter:focus-within { transform: translateX(14px); }
  .kanal-reiter-titel { display: block; margin-bottom: 8px; font-family: var(--schrift-titel); font-stretch: 85%; font-weight: 700; font-size: 0.9375rem; line-height: 1; }
  .kanal-reiter ul { list-style: none; margin: 0 0 0 -7px; padding: 0; display: flex; gap: 4px; }
  .kanal-reiter a { display: grid; place-items: center; width: 36px; height: 36px; color: var(--papier); transition: color 160ms; }
  .kanal-reiter a:hover { color: var(--funke); }
  .kanal-reiter a:focus-visible { outline-color: var(--funke); outline-offset: 0; }
  .kanal-symbol { width: 22px; height: 22px; fill: currentColor; }
}
@media (prefers-reduced-motion: reduce) { .kanal-reiter { transition: none; } }

.figur-404 { margin: 32px 0 0; max-width: 320px; }
.figur-404 img { width: auto; height: 180px; display: block; }
.figur-404 figcaption { margin-top: 10px; font-size: var(--t-klein); color: var(--leise); }

/* ==========================================================================
   Figuren mit Tiefe (Funki, Korni, Mü)
   Das Buch bleibt flach. Nur die Figuren stehen auf dem Papier: Sie neigen
   sich, wölben sich (buehne.js) und werfen als Einzige einen Schatten.
   ========================================================================== */
.figur { position: relative; display: block; aspect-ratio: 480 / 500; perspective: 640px; }
.figur-koerper { position: absolute; inset: 0; display: block; transform-origin: 50% 94%; }
.figur-koerper img, .figur-koerper canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.figur.hat-tiefe .figur-koerper img { visibility: hidden; }
.figur-boden {
  position: absolute; left: 20%; right: 20%; bottom: 0; height: 9%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(21, 23, 26, .3), rgba(21, 23, 26, 0));
}
.figur.ist-wechsel { animation: figur-hops 460ms var(--ease) both; }
@keyframes figur-hops {
  0% { transform: translateY(0) scale(1, 1); }
  28% { transform: translateY(-9%) scale(.95, 1.06); }
  62% { transform: translateY(0) scale(1.05, .95); }
  100% { transform: none; }
}

/* Figur in der Randspalte, unter der Kapitelnummer */
.rand-kleber { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.figur-rand { flex: none; width: 96px; margin-bottom: 0.9em; }
@media (min-width: 1024px) {
  .rand-kleber { display: block; position: sticky; top: calc(var(--kopf-h) + 24px); }
  .rand-kleber .kapitel-nr { position: static; }
  .figur-rand { width: min(100%, 176px); margin: clamp(8px, 2vh, 28px) 0 0 -6%; }
}
@media (min-width: 1024px) and (max-height: 640px) { .figur-rand { display: none; } }

/* ---------- Kapitel 2: Werdegang als Strecke ---------- */
.strecke-bild { --schiene: 76px; --laeufer-b: 100px; --marke-y: 36px; position: relative; margin: clamp(32px, 4vw, 56px) 0 0; max-width: 980px; }
.strecke-kopf {
  display: grid; gap: 0 24px; margin: 0; padding: 0 0 8px var(--schiene); border-bottom: 3px solid var(--tinte);
  font-family: var(--schrift-titel); font-stretch: 85%; font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.strecke-kopf span + span { display: none; }
.strecke-bahn { position: relative; }
.strecke { list-style: none; margin: 0; padding: 0; }
.station { position: relative; display: grid; gap: 10px 24px; padding: 22px 0 26px var(--schiene); border-bottom: 1px solid var(--linie); }
.station::before { content: ""; position: absolute; left: calc(var(--schiene) / 2 - 1px); top: 0; bottom: -1px; border-left: 2px solid var(--tinte); }
.station:first-child::before { top: var(--marke-y); }
.station:last-child::before { bottom: auto; height: var(--marke-y); }
.station-marke { position: absolute; left: calc(var(--schiene) / 2 - 13px); top: calc(var(--marke-y) - 15px); width: 26px; height: 30px; }
.station-marke svg { display: block; width: 100%; height: 100%; overflow: visible; transition: transform 520ms var(--ease); }
.station-marke path { fill: var(--papier); stroke: var(--tinte); stroke-width: 2.5; stroke-linejoin: miter; transition: fill 200ms; }
.station.ist-erreicht .station-marke svg { transform: rotate(60deg); }
.station.ist-erreicht .station-marke path { fill: var(--tinte); }
.station-heute.ist-erreicht .station-marke path { fill: var(--funke); }
.station-wende { background: var(--flaeche); }
.station h3 { margin: 0; max-width: none; font-size: inherit; line-height: inherit; letter-spacing: 0; font-stretch: 100%; }
.station-wann { display: block; font-family: var(--schrift-titel); font-stretch: 72%; font-weight: 800; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); line-height: 1; margin-bottom: 0.3em; font-variant-numeric: lining-nums; }
.station-was { display: block; font-family: var(--schrift-text); font-weight: 400; font-size: var(--t-lead); line-height: 1.35; max-width: 26ch; text-wrap: pretty; }
.station-wort { margin: 0; max-width: 44ch; padding-right: 12px; }
.strecke-bild figcaption { margin-top: 10px; font-size: var(--t-klein); color: var(--leise); line-height: 1.45; }

.laeufer {
  position: absolute; z-index: 2; pointer-events: none; width: var(--laeufer-b);
  left: calc(var(--schiene) / 2 - var(--laeufer-b) / 2);
  top: calc(var(--marke-y) - var(--laeufer-b) * 0.6);
}
.ist-lebendig .laeufer { transition: transform 640ms var(--ease); }

.merksatz-weg { margin-top: clamp(40px, 5vw, 72px); max-width: 26ch; }

@media (min-width: 700px) {
  .strecke-bild { --schiene: 120px; --laeufer-b: 128px; --marke-y: 44px; }
  .strecke-kopf, .station { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .strecke-kopf span + span { display: block; }
  .station { padding-top: 28px; padding-bottom: 34px; min-height: 128px; }
}
@media (min-width: 1024px) {
  .strecke-bild { --schiene: 168px; --laeufer-b: 172px; --marke-y: 52px; }
  .station { padding-top: 34px; padding-bottom: 44px; min-height: 172px; }
  .merksatz-weg { font-size: clamp(1.75rem, 1rem + 1.6vw, 2.625rem); }
}

/* ---------- Kapitel 3: Funken auf den Waben, die Besetzung ---------- */
.waben-leinwand { position: absolute; left: 0; top: 0; width: 100%; height: 100vh; pointer-events: none; z-index: 0; }
.kapitel-3 > .kapitel-rand, .kapitel-3 > .kapitel-inhalt { position: relative; z-index: 1; }

.besetzung { margin: clamp(40px, 6vw, 72px) 0 0; max-width: 980px; }
.besetzung-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.besetzung-liste li { display: grid; grid-template-columns: 116px 1fr; gap: 4px 16px; align-items: center; }
.figur-knopf { grid-row: span 2; display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.figur-knopf:focus-visible { outline: 3px solid var(--nacht-text); outline-offset: 4px; }
.kapitel-3 .figur-boden { background: radial-gradient(closest-side, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); }
.kapitel-3 .figur-glut .figur-boden { left: 4%; right: 4%; height: 16%; bottom: -3%; background: radial-gradient(closest-side, rgba(255, 122, 26, .38), rgba(255, 122, 26, 0)); }
.besetzung-liste b { align-self: end; font-family: var(--schrift-kanal); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; font-size: 1.5rem; line-height: 1; color: var(--papier); }
.besetzung-liste li > span { align-self: start; color: var(--nacht-text); max-width: 32ch; }
.besetzung figcaption { margin-top: 18px; padding-top: 8px; border-top: 1px solid var(--nacht-linie); font-size: var(--t-klein); color: var(--nacht-leise); }
.kapitel-3 .bild-nr { color: var(--nacht-text); }
@media (min-width: 700px) {
  .besetzung-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .besetzung-liste li { grid-template-columns: 1fr; align-items: start; align-content: start; }
  .besetzung-liste b, .besetzung-liste li > span { align-self: start; }
  .figur-knopf { grid-row: auto; max-width: 264px; margin: 0 0 12px -16px; }
}

@media (prefers-reduced-motion: reduce) {
  .waben-leinwand { display: none; }
  .figur.ist-wechsel { animation: none; }
}
