/* reivi.de · „Heft aus der Reihe“
   Jede App ist ein schmales Heft im selben Umschlag. Hellgrauer Tisch, Papierseiten,
   gelbes Titelschild, Grün nur für Handlung, Gelb nur hinter Eingetragenem.
   Werte, die im Regler-Panel (Phase 6) verschoben werden, stehen als Variablen auf :root. */

@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Farben (Palette A) */
  --tisch: #E7E8E5;
  --umschlag: #F7F5EF;
  --seite: #FFFDF8;
  --tinte: #17150F;
  --grau: #5E5A50;
  --linie: #DCD6C8;
  --marker: #FFD966;
  --signal: #1F6B4A;
  --signal-tief: #17573C;
  --auf-tinte: #F7F5EF;
  --auf-tinte-grau: #BDB8AB;

  /* Schrift */
  --sans: "Instrument Sans", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --text: clamp(1.0625rem, 0.98rem + 0.25vw, 1.1875rem);
  --klein: 0.9375rem;
  --mono-klein: 0.8125rem;
  --h1: clamp(2.5rem, 1.35rem + 3.6vw, 4.5rem);
  --h2: clamp(1.75rem, 1.3rem + 1.5vw, 2.625rem);
  --h3: clamp(1.1875rem, 1.1rem + 0.3vw, 1.375rem);
  --schild: clamp(2rem, 1.2rem + 2.4vw, 3.25rem);

  /* Raum */
  --rand: clamp(16px, 3.9vw, 56px);
  --breite: 1328px;
  --fuge: 14px;
  --seite-innen: clamp(24px, 1rem + 4vw, 88px);
  --heft-split: 36%;
  --ecke: 4px;
  --heftschatten: 0 1px 0 rgba(23, 21, 15, .06), 0 22px 40px -28px rgba(23, 21, 15, .38);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: #A9A79F var(--tisch); }
body {
  margin: 0; background: var(--tisch); color: var(--tinte);
  font-family: var(--sans); font-size: var(--text); line-height: 1.6;
  font-kerning: normal; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
::selection { background: var(--marker); color: var(--tinte); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--tisch); }
::-webkit-scrollbar-thumb { background: #A9A79F; border: 3px solid var(--tisch); border-radius: 6px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--signal-tief); text-decoration-thickness: 2px; }
strong { font-weight: 600; }
mark { background: var(--marker); color: inherit; padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.mono, .zahl { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.nur-vorleser { position: absolute !important; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprung { position: absolute; left: var(--rand); top: -60px; z-index: 50; background: var(--tinte); color: var(--seite); padding: 10px 16px; border-radius: var(--ecke); }
.sprung:focus { top: 12px; }
.sprung:focus, .sprung:hover { color: var(--seite); }
.fuss .marke:hover { color: var(--auf-tinte); }

/* ---------- Kopf ---------- */
.kopf {
  max-width: calc(var(--breite) + 2 * var(--rand)); margin: 0 auto; padding: 0 var(--rand);
  height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.marke { display: inline-flex; align-items: center; gap: 10px; color: var(--tinte); text-decoration: none; }
.marke:hover { color: var(--tinte); }
.marke .zeichen { width: 34px; height: 34px; }
.marke .wortmarke { height: 20px; width: auto; }
.nav { display: flex; gap: clamp(16px, 3vw, 32px); font-size: 1.0625rem; font-weight: 500; }
.nav a { color: var(--tinte); text-decoration: none; padding: 10px 0; background-image: linear-gradient(var(--tinte), var(--tinte)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 calc(100% - 6px); transition: background-size .25s cubic-bezier(.2,.7,.2,1); }
.nav a:hover, .nav a[aria-current="page"] { background-size: 100% 1px; }

/* ---------- Bühne: aufgeschlagenes Heft ---------- */
.rahmen-breite { max-width: calc(var(--breite) + 2 * var(--rand)); margin: 0 auto; padding: 0 var(--rand); }
.heft {
  position: relative; display: grid; grid-template-columns: var(--heft-split) 1fr;
  background: var(--seite); box-shadow: var(--heftschatten);
}
.heft > * { min-width: 0; }

/* Umschlag mit doppelter Rahmenlinie und Titelschild */
.umschlag { background: var(--umschlag); padding: clamp(20px, 2.8vw, 40px); display: flex; border-right: 1px solid var(--linie); }
.umschlag .rahmen { flex: 1; border: 2px solid var(--tinte); padding: 9px; display: flex; }
.umschlag .rahmen-innen {
  container-type: inline-size; flex: 1; border: 1px solid var(--tinte); display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 32px); gap: 18px;
}
.reihe { font-family: var(--mono); font-size: var(--mono-klein); letter-spacing: .04em; line-height: 1.5; }
.reihe::after { content: ""; display: block; width: 64px; margin: 16px auto 0; border-top: 1px solid var(--tinte); }
.schild {
  margin: auto 0; width: 100%; background: var(--marker); padding: clamp(20px, 2.4vw, 30px) clamp(14px, 1.6vw, 24px);
  border-top: 2px solid var(--tinte); border-bottom: 2px solid var(--tinte);
}
.schild strong { display: block; font-size: min(var(--schild), calc((100cqi - 2 * clamp(14px, 1.6vw, 24px)) / (var(--laenge, 10) * 0.6))); line-height: 1.02; letter-spacing: -0.03em; font-weight: 600; hyphens: manual; overflow-wrap: break-word; }
.schild span { display: block; margin-top: 12px; font-size: clamp(1.0625rem, .95rem + .45vw, 1.375rem); line-height: 1.3; }
.umschlag .zeichen { width: 44px; height: 44px; }

/* Erste Seite */
.seite-eins { padding: clamp(28px, 4.4vw, 64px) var(--seite-innen) clamp(24px, 3vw, 44px); display: flex; flex-direction: column; }
.anlass { font-size: clamp(1.1875rem, 1rem + .7vw, 1.625rem); line-height: 1.35; color: var(--grau); max-width: 30ch; }
.seite-eins h1 { font-size: var(--h1); line-height: 1.02; letter-spacing: -0.03em; margin-top: clamp(14px, 1.6vw, 22px); max-width: 15ch; }
.seite-eins .einleitung { margin-top: clamp(18px, 2vw, 28px); max-width: 38em; font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem); }
.handlung { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; margin-top: clamp(22px, 2.4vw, 32px); }
.knopf {
  display: inline-flex; align-items: center; gap: 12px; background: var(--signal); color: #fff;
  font-weight: 600; font-size: clamp(1.0625rem, 1rem + .35vw, 1.3125rem); line-height: 1.2;
  padding: 16px 26px; border-radius: 6px; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, transform .2s cubic-bezier(.2,.7,.2,1);
}
.knopf:hover { background: var(--signal-tief); color: #fff; text-decoration: none; }
.knopf:active { transform: translateY(1px); }
.knopf svg { width: 20px; height: 20px; flex: none; }
.knopf-leise { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1.0625rem; padding: 12px 0; }
.knopf-leise svg { width: 18px; height: 18px; transition: transform .2s cubic-bezier(.2,.7,.2,1); }
.knopf-leise:hover svg { transform: translateX(3px); }
.unter { font-family: var(--mono); font-size: var(--mono-klein); color: var(--grau); line-height: 1.55; max-width: 36ch; }
.leiste {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--tinte);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px;
  font-family: var(--mono); font-size: var(--mono-klein); line-height: 1.5;
}
.seite-eins .handlung { margin-bottom: 36px; }
.leiste ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.leiste li + li::before { content: "·"; padding: 0 .6em; color: var(--grau); }
.leiste .ort { color: var(--grau); }

/* Zweite Doppelseite: Protokoll links, Ablauf rechts */
.innen { display: grid; grid-template-columns: var(--heft-split) 1fr; background: var(--seite); }
.innen > * { min-width: 0; }
.seite-zwei { padding: clamp(28px, 3.4vw, 52px) clamp(20px, 2.6vw, 40px); border-right: 1px solid var(--linie); background: var(--seite); display: flex; flex-direction: column; }
.seite-drei { padding: clamp(28px, 3.4vw, 52px) var(--seite-innen); display: flex; flex-direction: column; }
.blattzahl { margin-top: auto; padding-top: 18px; font-family: var(--mono); font-size: 12px; color: var(--grau); display: flex; justify-content: space-between; gap: 12px; }

/* Beispiel-Protokoll: Buchungszeilen */
.protokoll { font-family: var(--mono); font-variant-numeric: tabular-nums; border-top: 3px solid var(--tinte); margin: auto 0; }
.protokoll-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0 10px; border-bottom: 1px solid var(--tinte); font-size: var(--mono-klein); }
.protokoll-kopf .zeitraum { color: var(--grau); white-space: nowrap; }
.protokoll table { width: 100%; border-collapse: collapse; }
.protokoll th { font-weight: 400; font-size: 12px; color: var(--grau); text-align: left; padding: 10px 6px 6px 0; }
.protokoll td { padding: 11px 8px 11px 0; border-bottom: 1px dashed var(--linie); font-size: clamp(.8125rem, .76rem + .12vw, .875rem); color: #3B382F; vertical-align: baseline; line-height: 1.35; }
.protokoll td.art { font-family: var(--sans); }
.protokoll td:first-child, .protokoll td.zeit-spalte { white-space: nowrap; }
.protokoll th:last-child, .protokoll td:last-child { text-align: right; padding-right: 0; white-space: nowrap; }
.protokoll tr.schwer td { color: var(--tinte); font-size: clamp(1rem, .9rem + .3vw, 1.1875rem); font-weight: 500; padding-top: 14px; padding-bottom: 14px; }
.protokoll tr.schwer td:last-child span { background: var(--marker); padding: 2px 6px; margin-right: -6px; }
.protokoll .summe { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0 0; border-top: 2px solid var(--tinte); margin-top: -1px; font-size: var(--mono-klein); font-weight: 500; }
.ausgedacht { margin-top: 12px; font-size: 12px; color: var(--grau); font-family: var(--mono); }

/* Ablauf als Strecke */
.seite-drei h2 { font-size: var(--h2); line-height: 1.08; max-width: 18ch; }
.strecke { list-style: none; padding: 0; margin-top: clamp(24px, 3vw, 40px); position: relative; display: grid; gap: clamp(18px, 2.2vw, 30px); }
.strecke::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--linie); }
.strecke::after { content: ""; position: absolute; left: 21px; top: 22px; width: 2px; height: calc((100% - 44px) * var(--fortschritt, 1)); background: var(--tinte); transition: height .5s cubic-bezier(.2,.7,.2,1); }
.strecke li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 20px; align-items: start; z-index: 1; }
.strecke .nr { width: 44px; height: 44px; border: 2px solid var(--tinte); border-radius: 50%; background: var(--seite); display: grid; place-items: center; font-family: var(--mono); font-weight: 500; font-size: 1rem; }
.strecke li.erreicht .nr { background: var(--tinte); color: var(--seite); }
.strecke h3 { font-size: var(--h3); line-height: 1.25; padding-top: 8px; }
.strecke p { margin-top: 6px; max-width: 46ch; color: var(--tinte); }

/* Bildschirmfotos */
.bilder { display: flex; gap: clamp(14px, 2vw, 28px); margin-top: clamp(24px, 3vw, 36px); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.bilder figure { flex: 0 0 auto; width: clamp(150px, 15vw, 200px); scroll-snap-align: start; }
.bilder img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--linie); background: var(--umschlag); }
.bilder figcaption { font-family: var(--mono); font-size: 12px; color: var(--grau); margin-top: 8px; line-height: 1.45; }

/* ---------- Gestapelte Blätter ---------- */
.stapel { display: grid; gap: var(--fuge); margin-top: var(--fuge); }
.blatt { background: var(--seite); box-shadow: var(--heftschatten); padding: clamp(32px, 5vw, 80px) var(--seite-innen) clamp(24px, 3vw, 36px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); }
.blatt > * { grid-column: 1 / -1; }
.blatt > h2 { grid-column: 1 / span 4; font-size: var(--h2); line-height: 1.08; padding-right: 12px; align-self: start; }
.blatt > .inhalt { grid-column: 5 / span 8; }
.blatt > .blattzahl { margin-top: clamp(36px, 4vw, 56px); border-top: 1px solid var(--linie); padding-top: 12px; }
.inhalt > * + * { margin-top: 1em; }
.inhalt p, .inhalt li { max-width: 36em; }
.inhalt ul { padding-left: 1.1em; }
.inhalt li + li { margin-top: .35em; }
.inhalt h3 { font-size: var(--h3); margin-top: 1.6em; }

/* Tabellen im Heft */
.tabelle-wrap { overflow-x: auto; margin-top: 1.4em; }
.tafel { width: 100%; border-collapse: collapse; font-size: var(--klein); line-height: 1.45; min-width: 520px; }
.tafel th { text-align: left; font-weight: 400; font-family: var(--mono); font-size: 12px; color: var(--grau); padding: 0 16px 10px 0; border-bottom: 1px solid var(--tinte); vertical-align: bottom; }
.tafel td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tafel td:first-child { font-weight: 600; width: 24%; }
.tafel tbody th { font: 600 var(--klein)/1.45 var(--sans); color: var(--tinte); text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--linie); vertical-align: top; width: 22%; }
.tafel tr:last-child th { border-bottom: 2px solid var(--tinte); }
.tafel td.beispiel { font-family: var(--mono); font-size: .875rem; font-variant-numeric: tabular-nums; width: 28%; }
.tafel tr:last-child td { border-bottom: 2px solid var(--tinte); }
.tafel.vergleich td:first-child { width: 22%; }
.tafel.vergleich th:last-child, .tafel.vergleich td:last-child { font-weight: 600; }
.nachsatz { color: var(--grau); }

/* Dunkle Seite: die eine Besonderheit */
.blatt.dunkel { background: var(--tinte); color: var(--auf-tinte); box-shadow: none; }
.blatt.dunkel > h2 { color: var(--auf-tinte); }
.blatt.dunkel .inhalt p:first-child { font-size: clamp(1.25rem, 1.05rem + .7vw, 1.625rem); line-height: 1.4; }
.blatt.dunkel a, .blatt.dunkel a:hover { color: var(--marker); }
.blatt.dunkel .blattzahl { border-top-color: #3A372F; color: var(--auf-tinte-grau); }

/* Beilage: Kosten auf Umschlagpapier, oben eine kräftige Tintenlinie wie ein eingelegter Zettel */
.blatt.beilage { background: var(--umschlag); box-shadow: none; border-radius: 0; border-top: 3px solid var(--tinte); }
.beilage .preisfrei { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: var(--mono-klein); }
.beilage .preisfrei span { border: 1px solid var(--tinte); padding: 4px 10px; border-radius: 2px; }
.blatt > .kopfspalte { grid-column: 1 / span 4; padding-right: 12px; align-self: start; }
.blatt > .kopfspalte h2 { font-size: var(--h2); line-height: 1.08; }

/* Häufige Fragen */
.fragen { border-top: 1px solid var(--tinte); }
.fragen details { border-bottom: 1px solid var(--linie); }
.fragen summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 28px; gap: 16px; align-items: start; padding: 18px 0; font-weight: 600; font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem); line-height: 1.35; }
.fragen summary::-webkit-details-marker { display: none; }
.fragen summary:hover { color: var(--signal-tief); }
.fragen summary svg { width: 22px; height: 22px; margin-top: 2px; transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.fragen details[open] summary svg { transform: rotate(45deg); }
.fragen .antwort { padding: 0 44px 22px 0; max-width: 38em; }
.fragen .antwort p + p { margin-top: .8em; }

/* Von ReiVi und Hinweis */
.absender { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--tinte); }
.absender + .kleingedruckt { margin-top: 22px; }
.absender .zeichen { width: 40px; height: 40px; flex: none; }
.absender p { flex: 1 1 320px; max-width: 62ch; }
.kleingedruckt, .inhalt .kleingedruckt { font-size: var(--klein); color: var(--grau); max-width: 34em; }

/* ---------- Regal: Hefte nebeneinander ---------- */
.regal-bereich { padding: clamp(40px, 6vw, 88px) 0 clamp(24px, 3vw, 40px); }
.regal-bereich > h2 { font-size: var(--h2); line-height: 1.08; max-width: 22ch; }
.regal-bereich > p { margin-top: 12px; max-width: 60ch; }
.regal { list-style: none; padding: 0; margin-top: clamp(22px, 3vw, 36px); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(16px, 2vw, 28px); align-items: start; }
.regal > li { min-width: 0; }
.heftchen { display: block; position: relative; text-decoration: none; color: var(--tinte); }
.heftchen .deckel { overflow: hidden; }
.heftchen:hover { color: var(--tinte); }
.heftchen .deckel { background: var(--umschlag); padding: 10px; box-shadow: 0 10px 14px -12px rgba(23,21,15,.45); aspect-ratio: 3 / 4; display: flex; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s cubic-bezier(.2,.7,.2,1); }
.heftchen .deckel > span { flex: 1; border: 2px solid var(--tinte); padding: 5px; display: flex; }
.heftchen .deckel > span > span { flex: 1; border: 1px solid var(--tinte); display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: 14px 10px; gap: 10px; }
.heftchen .mini-reihe { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; }
.heftchen .mini-schild { width: 100%; background: var(--marker); border-top: 1.5px solid var(--tinte); border-bottom: 1.5px solid var(--tinte); padding: 14px 8px; }
.heftchen .deckel > span > span { container-type: inline-size; }
.heftchen .mini-schild b { font-size: min(clamp(1.125rem, 1rem + .4vw, 1.375rem), calc((100cqi - 16px) / (var(--laenge, 10) * 0.6))); display: block; line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: normal; }
.heftchen .mini-schild i { display: block; font-style: normal; font-size: 13px; margin-top: 6px; line-height: 1.3; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: normal; }
.heftchen .mini-zeichen { width: 22px; height: 22px; }
.heftchen .unterschrift { display: block; border-top: 3px solid var(--tinte); padding-top: 12px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; margin-top: 0; font-size: var(--klein); line-height: 1.45; }
.heftchen .unterschrift strong { display: block; font-size: 1rem; }
.heftchen .zur-app { display: flex; gap: 6px; align-items: center; margin-top: 8px; color: var(--signal); font-weight: 600; font-size: var(--klein); }
.heftchen .zur-app svg { width: 15px; height: 15px; transition: transform .2s cubic-bezier(.2,.7,.2,1); }
.heftchen:hover .deckel { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 1px 0 rgba(23,21,15,.06), 0 30px 44px -26px rgba(23,21,15,.45); }
.heftchen:hover .zur-app { text-decoration: underline; text-underline-offset: .2em; }
.heftchen:hover .zur-app svg { transform: translateX(3px); }
.heftchen:focus-visible { outline-offset: 6px; }

/* ---------- Fuß ---------- */
.fuss { margin-top: clamp(48px, 7vw, 96px); background: var(--tinte); color: var(--auf-tinte); }
.fuss .rahmen-breite { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(28px, 4vw, 48px); display: grid; gap: 24px 48px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); }
.fuss a { color: var(--auf-tinte); }
.fuss a:hover { color: var(--marker); }
.fuss .marke { color: var(--auf-tinte); }
.fuss .wer { margin-top: 14px; color: var(--auf-tinte-grau); max-width: 34ch; font-size: var(--klein); }
.fuss nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: var(--klein); }
.fuss nav a { text-decoration: none; }
.fuss nav a:hover { text-decoration: underline; }
.fuss .kontakt { margin-top: 18px; font-family: var(--mono); font-size: var(--mono-klein); color: var(--auf-tinte-grau); }
.fuss .sprachen { grid-column: 1 / -1; border-top: 1px solid #3A372F; padding-top: 14px; font-family: var(--mono); font-size: var(--mono-klein); color: var(--auf-tinte-grau); }
.fuss .sprachen summary { display: inline-flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; list-style: none; color: var(--auf-tinte); }
.fuss .sprachen summary::-webkit-details-marker { display: none; }
.fuss .sprachen summary:hover { color: var(--marker); }
.fuss .sprachen svg { width: 16px; height: 16px; flex: none; }
.fuss .sprachen .winkel { transition: transform .2s ease; }
.fuss .sprachen[open] .winkel { transform: rotate(180deg); }
.fuss .sprachen ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5em, 1fr)); gap: 0 20px; }
.fuss .sprachen a { display: block; padding: 7px 0; color: var(--auf-tinte-grau); text-decoration: none; }
.fuss .sprachen a:hover, .fuss .sprachen a[aria-current] { color: var(--auf-tinte); text-decoration: underline; }

/* Hinweis auf die Sprachversion in der Browsersprache (setzt main.js) */
.sprach-hinweis { display: flex; align-items: center; justify-content: center; gap: 6px 16px; flex-wrap: wrap; padding: 8px var(--rand); background: var(--seite); border-bottom: 1px solid var(--linie); font-size: var(--klein); }
.sprach-hinweis a { color: var(--signal); font-weight: 600; }
.sprach-hinweis a:hover { color: var(--signal-tief); }
.sprach-hinweis button { background: none; border: 0; padding: 6px 10px; font: inherit; font-size: 1.25rem; line-height: 1; color: var(--grau); cursor: pointer; }
.sprach-hinweis button:hover { color: var(--tinte); }

/* ---------- Formular ---------- */
.formular { display: grid; gap: 22px; max-width: 640px; margin-top: 1.6em; }
.feld label, .feld legend { display: block; font-weight: 600; margin-bottom: 6px; }
.feld .optional { font-weight: 400; color: var(--grau); }
.feld input[type=text], .feld input[type=email], .feld textarea, .feld select {
  width: 100%; font: inherit; color: var(--tinte); background: #fff; border: 1px solid #8C877B; border-radius: var(--ecke);
  padding: 12px 14px; min-height: 48px; caret-color: var(--signal); transition: border-color .15s ease, box-shadow .15s ease;
}
.feld textarea { min-height: 140px; resize: vertical; }
.feld input:focus, .feld textarea:focus, .feld select:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px rgba(31, 107, 74, .25); }
.feld .hilfe { font-size: var(--klein); color: var(--grau); margin-top: 6px; }
.feld .fehler { display: none; color: #8A2A12; font-size: var(--klein); margin-top: 6px; font-weight: 500; }
.feld.has-error .fehler { display: block; }
.feld.has-error input, .feld.has-error textarea { border-color: #8A2A12; }
.feld.haken label { display: grid; grid-template-columns: 24px 1fr; gap: 12px; font-weight: 400; align-items: start; }
.feld.haken input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--signal); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formular button { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }
.formular button[disabled] { opacity: .6; cursor: progress; }
.form-status { font-size: var(--klein); }
.erfolg { border-top: 3px solid var(--tinte); padding-top: 18px; margin-top: 1.6em; }
.erfolg h3 { font-size: var(--h3); }
#form-wrap.is-sent form { display: none; }

/* ---------- Startseite: Anlässe ---------- */
.anlaesse { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: clamp(16px, 2vw, 26px); list-style: none; padding: 0; margin-top: clamp(22px, 3vw, 36px); }
.sprungmarken { display: flex; flex-wrap: wrap; gap: 8px 10px; list-style: none; padding: 0; margin-top: 22px; font-family: var(--mono); font-size: var(--mono-klein); }
.sprungmarken a { display: inline-block; border: 1px solid var(--tinte); color: var(--tinte); padding: 8px 12px; border-radius: 2px; text-decoration: none; transition: background-color .15s ease; }
.sprungmarken a:hover { background: var(--seite); color: var(--tinte); }
.gruppe { scroll-margin-top: 20px; }
.gruppe + .gruppe { margin-top: clamp(36px, 5vw, 64px); }
.gruppe h2 { font-size: var(--h2); line-height: 1.08; padding-bottom: 12px; border-bottom: 1px solid var(--tinte); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.gruppe h2 .anzahl { font-family: var(--mono); font-size: var(--mono-klein); font-weight: 400; color: var(--grau); letter-spacing: 0; }

/* Steckbrief */
.steckbrief { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; border-top: 3px solid var(--tinte); }
.steckbrief dt, .steckbrief dd { padding: 12px 0; border-bottom: 1px dashed var(--linie); }
.steckbrief dt { font-family: var(--mono); font-size: var(--mono-klein); color: var(--grau); padding-top: 15px; }

/* Rechtstexte und Ratgeber */
.lesetext { max-width: 36em; }
.lesetext h2 { font-size: var(--h3); margin-top: 1.8em; }
.lesetext h3 { font-size: 1.0625rem; margin-top: 1.4em; }
.lesetext p, .lesetext ul, .lesetext ol { margin-top: .9em; }

/* ---------- Bewegung: Blättern (nur mit JS, breitem Fenster und ohne reduzierte Bewegung) ----------
   Ruhezustand ohne JS: Umschlag | Seite 1, darunter Protokoll | Ablauf als zweite Doppelseite.
   Mit JS: Die Bühne bleibt stehen, Seite 1 wird beim Scrollen um den Falz umgeblättert.
   Auf ihrer Rückseite steht das Protokoll, darunter kommt der Ablauf zum Vorschein. */
.heft > .umschlag { grid-column: 1; grid-row: 1; }
.heft > .blatt-vorn { grid-column: 2; grid-row: 1; display: flex; }
.blatt-vorn > .seite-eins { flex: 1; min-width: 0; }
.heft > .innen { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--linie); }
.rueckseite { display: none; }

.blaettern-aktiv .blaettern { height: 220vh; position: relative; }
.blaettern-aktiv .buehne { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.blaettern-aktiv .buehne > .kopf { flex: none; width: 100%; }
.blaettern-aktiv .buehne > .rahmen-breite { flex: 1; width: 100%; padding-bottom: 22px; min-height: 0; }
.blaettern-aktiv .heft { height: 100%; perspective: 2800px; grid-template-rows: 100%; }
.blaettern-aktiv .heft > .innen { position: absolute; inset: 0; grid-area: 1 / 1 / 2 / 3; border-top: 0; z-index: 0; grid-template-rows: 100%; }
.blaettern-aktiv .innen > .seite-drei { grid-column: 2; grid-row: 1; }
.blaettern-aktiv .heft > .umschlag { position: relative; z-index: 1; }
.blaettern-aktiv .heft > .blatt-vorn { position: relative; z-index: 3; transform-origin: 0 50%; transform-style: preserve-3d; will-change: transform; background: transparent; }
.blaettern-aktiv .blatt-vorn > .seite-eins { position: absolute; inset: 0; background: var(--seite); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.blaettern-aktiv .rueckseite { display: block; position: absolute; inset: 0; transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--seite); }
.blaettern-aktiv .rueckseite > .seite-zwei { position: absolute; top: 0; bottom: 0; left: 0; transform-origin: 0 0; border-right: 0; }
.blaettern-aktiv .blatt-vorn.gewendet { z-index: 2; }
.blaettern-aktiv .weiter-hinweis { display: flex; }
.blaettern-aktiv .heft::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--heft-split); width: 22px; z-index: 2; pointer-events: none;
  border-left: 1px solid var(--linie); background: linear-gradient(to right, rgba(23, 21, 15, .07), rgba(23, 21, 15, 0)); }
.blaettern-aktiv .heft.eng .seite-eins h1 { font-size: calc(var(--h1) * .84); }
.blaettern-aktiv .heft.eng .seite-eins .anlass { font-size: 1.1875rem; }
.blaettern-aktiv .heft.eng .seite-eins .einleitung { margin-top: 14px; }
.blaettern-aktiv .heft.eng .strecke { gap: 14px; margin-top: 20px; }
.weiter-hinweis { display: none; position: absolute; left: 50%; bottom: -21px; transform: translateX(-50%); z-index: 4; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--grau); pointer-events: none; transition: opacity .3s ease; }
.weiter-hinweis svg { width: 14px; height: 14px; }

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

/* ---------- Breiten ---------- */
@media (max-width: 1080px) {
  .blatt > h2 { grid-column: 1 / -1; margin-bottom: 18px; }
  .blatt > .inhalt { grid-column: 1 / -1; }
  .blatt > .kopfspalte { grid-column: 1 / -1; margin-bottom: 18px; }
}
@media (max-width: 900px) {
  :root { --heft-split: 100%; }
  .heft, .innen { grid-template-columns: minmax(0, 1fr); }
  .umschlag { border-right: 0; border-bottom: 1px solid var(--linie); padding: 12px; }
  .umschlag .rahmen { padding: 5px; }
  .umschlag .rahmen-innen { flex-direction: row; text-align: left; padding: 12px 14px; gap: 14px; align-items: center; }
  .umschlag .reihe { display: none; }
  .schild { margin: 0; padding: 12px 14px; flex: 1; }
  .schild strong { font-size: clamp(1.5rem, 1.1rem + 2vw, 2.125rem); }
  .schild span { margin-top: 4px; font-size: .9375rem; }
  .umschlag .zeichen { width: 32px; height: 32px; }
  .seite-eins { padding-top: 24px; }
  .seite-eins h1, .blatt h2, .regal-bereich > h2 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
  .seite-eins .leiste { margin-top: 28px; }
  .seite-zwei { border-right: 0; border-bottom: 1px solid var(--linie); }
  .heft > .umschlag, .heft > .blatt-vorn, .heft > .innen { grid-column: 1; grid-row: auto; }
  .fuss .rahmen-breite { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tafel { min-width: 0; }
  .tafel thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tafel tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--linie); }
  .tafel tr:last-child { border-bottom: 2px solid var(--tinte); }
  .tafel td, .tafel tbody th { display: block; width: auto !important; padding: 2px 0; border: 0 !important; }
  .tafel td[data-label]::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--grau); margin-top: 6px; }
  .leiste .ort { display: none; }
  .leiste ul { gap: 4px 16px; }
  .leiste li + li::before { content: none; }
  .kopf { height: 64px; }
  .marke .wortmarke { height: 18px; }
  .marke .zeichen { width: 30px; height: 30px; }
  .nav { font-size: 1rem; gap: 18px; }
  .handlung { gap: 12px; }
  .knopf { width: 100%; justify-content: center; padding: 16px 18px; white-space: normal; text-align: center; }
  .protokoll td:first-child, .protokoll td.zeit-spalte, .protokoll-kopf .zeitraum { white-space: normal; }
  .protokoll-kopf { flex-wrap: wrap; }
  .protokoll td { overflow-wrap: anywhere; }
  .protokoll table, .protokoll tbody { display: block; width: 100%; }
  .protokoll td { min-width: 0; }
  .protokoll thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .protokoll tr { display: grid; grid-template-columns: max-content minmax(0, 1fr) minmax(0, auto); column-gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--linie); }
  .protokoll td { padding: 0; border: 0; }
  .protokoll td:first-child { grid-column: 1; grid-row: 1; }
  .protokoll td.zeit-spalte { grid-column: 2; grid-row: 1; }
  .protokoll td.art { grid-column: 1 / 3; grid-row: 2; margin-top: 2px; }
  .protokoll td:last-child { grid-column: 3; grid-row: 1 / 3; align-self: center; white-space: normal; max-width: 42vw; text-align: right; }
  .protokoll tr.schwer td { padding: 0; }
  .blatt { padding-left: 20px; padding-right: 20px; }
  .regal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .heftchen .deckel { padding: 6px; }
  .heftchen .deckel > span { padding: 3px; }
  .heftchen .deckel > span > span { padding: 10px 6px; }
  .heftchen .mini-reihe { display: none; }
  .heftchen .mini-schild { padding: 10px 6px; }
  .heftchen .mini-schild b { font-size: min(1rem, calc((100cqi - 12px) / (var(--laenge, 10) * 0.6))); }
  .heftchen .mini-schild i { font-size: 11.5px; }
}
@media print {
  body { background: #fff; }
  .kopf nav, .fuss, .knopf, .regal-bereich { display: none; }
  .heft, .blatt { box-shadow: none; }
}
