@charset "utf-8";

/* Schriften: selbst ausgeliefert (OFL, siehe assets/fonts/LIZENZ.txt), kein Google-Aufruf */
@font-face { font-family: "IM Fell English"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/im-fell-english.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English"; font-style: italic; font-weight: 400; font-display: swap; src: url("../assets/fonts/im-fell-english-italic.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English SC"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/im-fell-english-sc.woff2") format("woff2"); }
@font-face { font-family: "Pirata One"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/pirata-one.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: "Pirata One"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/pirata-one-latin-ext.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; }

/* ==========================================================================
   Der Kult der Ewigen Erdnuss — Stilblatt
   Aufbau:
     1. Farben und Grundwerte (:root)
     2. Grundgerüst / Typografie
     4. Navigation
     5. Bausteine (Karten, Tafeln, Listen, Tabellen …)
     6. Abschnitte im Einzelnen
     7. Fuß und „Nach oben“
     8. Dunkler Modus
     9. Druck
   ========================================================================== */

/* ==========================================================================
   1. Farben und Grundwerte
   ========================================================================== */
:root {
  /* Papier und Tinte */
  --pergament:        #f3e6c8;
  --pergament-hell:   #faf1dd;
  --pergament-dunkel: #e6d3ac;
  --tinte:            #2a1f14;
  --tinte-blass:      #5c4a36;

  /* Röstbraun */
  --roest:            #a5652c;
  --roest-dunkel:     #6b3f18;
  --roest-hell:       #c98a4b;

  /* Akzente */
  --salz:             #fbfaf4;
  --meer:             #2f6b5e;
  --meer-hell:        #4c9184;
  --rost:             #8c3b24;

  /* Flächen */
  --flaeche:          rgba(255, 253, 244, .58);
  --flaeche-stark:    rgba(255, 253, 244, .85);
  --linie:            rgba(107, 63, 24, .28);
  --linie-stark:      rgba(107, 63, 24, .55);
  --schatten:         0 2px 0 rgba(107, 63, 24, .12), 0 10px 26px -18px rgba(42, 31, 20, .8);

  /* SVG-Innenlinien der Erdnuss */
  --schale-linie:     rgba(42, 31, 20, .38);

  /* Pergamentscheibe hinter den freigestellten Vignetten. Sie bleibt in
     beiden Modi hell, damit die dunklen Stichlinien immer lesbar sind;
     im dunklen Modus wirkt sie wie ein aufgelegtes Medaillon. */
  --scheibe:          #f3e6c8;

  /* Schriften */
  --font-titel: "Pirata One", "IM Fell English SC", "Luminari", "Papyrus", serif;
  --font-kapitel: "IM Fell English SC", "Pirata One", Georgia, serif;
  --font-text: "IM Fell English", "EB Garamond", Georgia, "Times New Roman", serif;

  /* Maße */
  --lesebreite: 72ch;
  --rand: 16px;
  --radius: 4px;
}

/* ==========================================================================
   2. Grundgerüst / Typografie
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  /* Die Grundfarbe steht hier, damit die Papierstruktur des body nicht auf
     die Leinwand durchgereicht wird. Nur so können sich die Kupferstiche
     per mix-blend-mode mit dem Pergament verrechnen. */
  background-color: var(--pergament);
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--tinte);
  background-color: var(--pergament);
  /* Papierstruktur ausschließlich aus Verläufen, keine Bilddateien */
  background-image:
    radial-gradient(ellipse at 12% 8%,  rgba(255, 252, 238, .95), rgba(255, 252, 238, 0) 55%),
    radial-gradient(ellipse at 88% 22%, rgba(197, 160, 106, .28), rgba(197, 160, 106, 0) 45%),
    radial-gradient(ellipse at 30% 78%, rgba(160, 118, 66, .22),  rgba(160, 118, 66, 0) 50%),
    radial-gradient(ellipse at 95% 95%, rgba(107, 63, 24, .2),    rgba(107, 63, 24, 0) 45%),
    repeating-linear-gradient(94deg, rgba(120, 82, 40, .05) 0 2px, rgba(120, 82, 40, 0) 2px 7px),
    repeating-linear-gradient(6deg,  rgba(120, 82, 40, .04) 0 3px, rgba(120, 82, 40, 0) 3px 9px);
  background-attachment: fixed;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--lesebreite);
  margin-inline: auto;
  padding-inline: var(--rand);
}

section {
  position: relative;
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
  border-top: 1px solid var(--linie);
}
section:first-of-type { border-top: 0; }
/* Fleuron auf der Trennlinie, wie zwischen den Büchern eines alten Drucks.
   Der Kupferstich hat weißen Grund; „multiply“ gegen die Pergamentfläche
   darunter löst das Weiß auf, sodass nur die Zeichnung stehen bleibt.
   Die Pergamentfläche selbst unterbricht die Trennlinie und läuft an den
   Rändern weich aus, damit kein Kasten sichtbar wird. */
section + section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(17rem, 80%);
  height: 2.2rem;
  background-color: var(--pergament);
  background-image: url("../assets/web/fleuron.webp?v=cbb84d303f");
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(12.5rem, 76%) auto;
  background-blend-mode: multiply;
  /* Die Maske lässt die Pergamentfläche nach außen weich auslaufen,
     damit kein Kasten auf dem Papier steht */
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent);
  mask-image: radial-gradient(closest-side, #000 62%, transparent);
}

h1, h2, h3, h4 {
  font-family: var(--font-kapitel);
  font-weight: 400;
  line-height: 1.12;
  color: var(--roest-dunkel);
  letter-spacing: .01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-family: var(--font-titel); font-size: clamp(2.4rem, 11vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 7.5vw, 2.9rem); margin-bottom: .6em; }
h3 { font-size: clamp(1.35rem, 5vw, 1.7rem); margin-top: 2em; }
h4 { font-size: clamp(1.15rem, 4.2vw, 1.35rem); margin-top: 1.2em; }

p { margin: 0 0 1.1em; }
em { font-style: italic; }
strong { font-weight: 700; color: var(--roest-dunkel); }

a { color: var(--meer); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover, a:focus-visible { color: var(--roest-dunkel); }

:focus-visible {
  outline: 3px solid var(--meer);
  outline-offset: 3px;
  border-radius: 2px;
}

.visuell-versteckt {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sprung-zum-inhalt {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--roest-dunkel);
  color: var(--salz);
  padding: .7em 1.2em;
  text-decoration: none;
}
.sprung-zum-inhalt:focus { left: 0; }

.svg-lager { position: absolute; width: 0; height: 0; overflow: hidden; }

.ikone {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -.22em;
  color: var(--roest);
  flex: none;
}
.ikone.gross { width: 2.6rem; height: 2.6rem; vertical-align: middle; }

/* Vorspann, Ober- und Kleinzeilen */
.ober {
  font-family: var(--font-kapitel);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  color: var(--tinte-blass);
  margin-bottom: .5em;
}
.vorspann {
  font-size: 1.22rem;
  color: var(--tinte-blass);
}
/* Initiale: der erste Buchstabe eines Buches, wie im Druck der Zeit.
   Seit dem Kapitelkopf mit Vignette steht die Überschrift in .buchkopf. */
section > .wrap > h2 + .vorspann::first-letter,
section > .wrap > .buchkopf + .vorspann::first-letter {
  float: left;
  font-family: var(--font-titel);
  font-size: 3.3em;
  line-height: .8;
  padding: .08em .12em 0 0;
  color: var(--roest-dunkel);
}
.klein { font-size: .9rem; color: var(--tinte-blass); }

.knopf, button {
  font-family: var(--font-kapitel);
  font-size: 1.05rem;
  letter-spacing: .06em;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   4. Navigation — Kolumnentitel, Inhaltsblatt, Daumenregister
   ========================================================================== */

/* Kopfzeile wie der Kolumnentitel eines Buches: Papier, eine Tintenlinie */
.kopf {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--pergament) 88%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--linie-stark);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .kopf { background: var(--pergament); }
}

.kolumne {
  max-width: 82rem;
  margin-inline: auto;
  padding: .35rem var(--rand);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .6rem;
  min-height: 3.4rem;
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-titel);
  font-size: 1.3rem;
  color: var(--roest-dunkel);
  text-decoration: none;
  white-space: nowrap;
}
.marke-logo {
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
  border-radius: 50%;
}
.marke:hover, .marke:focus-visible { color: var(--roest); }
.marke-text { display: none; }

/* Laufender Titel: wandert beim Lesen mit */
.kolumnentitel {
  margin: 0;
  min-width: 0;
  text-align: center;
  font-family: var(--font-kapitel);
  line-height: 1.15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .05em;
}
.kol-nr {
  font-size: .68rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--tinte-blass);
}
.kol-titel {
  font-size: 1rem;
  color: var(--roest-dunkel);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blaettern {
  display: inline-flex;
  align-items: stretch;
  gap: .3rem;
}
.blatt {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  min-height: 2.5rem;
  font-family: var(--font-kapitel);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--roest-dunkel);
  text-decoration: none;
  border: 1px solid var(--linie-stark);
  border-radius: var(--radius);
  background: var(--flaeche);
}
.blatt:hover, .blatt:focus-visible { background: var(--roest-dunkel); color: var(--salz); }
.blatt[aria-disabled="true"] { opacity: .35; pointer-events: none; }

.inhalt-knopf {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.5rem;
  padding: 0 .8rem;
  color: var(--salz);
  background: linear-gradient(180deg, var(--roest), var(--roest-dunkel));
  border: 1px solid var(--roest-dunkel);
  border-radius: var(--radius);
  font-size: .98rem;
}
.inhalt-knopf .ikone { color: currentColor; width: 1.25em; height: 1.25em; }
.inhalt-knopf:hover, .inhalt-knopf:focus-visible,
.inhalt-knopf[aria-expanded="true"] { background: var(--roest-dunkel); }

/* Das Tau: Lesefortschritt als dünne, gedrehte Leine unter der Kopfzeile */
.tau {
  height: 4px;
  background: repeating-linear-gradient(90deg, rgba(107, 63, 24, .12) 0 6px, rgba(107, 63, 24, 0) 6px 10px);
}
.tau-fortschritt {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(-55deg, var(--roest) 0 4px, var(--roest-dunkel) 4px 8px);
  transition: width .15s linear;
}

@media (min-width: 40rem) {
  .marke-text { display: inline; }
  .kol-nr { font-size: .72rem; }
  .kol-titel { font-size: 1.1rem; }
}

/* --- Inhaltsblatt (Overlay) ------------------------------------------- */
.inhalt {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: start center;
  padding: var(--rand);
  padding-top: max(var(--rand), 4vh);
  overflow-y: auto;
  background: rgba(42, 31, 20, .62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.inhalt[hidden] { display: none; }

.inhalt-blatt {
  position: relative;
  width: min(72rem, 100%);
  background: var(--pergament-hell);
  background-image:
    radial-gradient(ellipse at 10% 0%, rgba(255, 252, 238, .9), rgba(255, 252, 238, 0) 50%),
    radial-gradient(ellipse at 95% 100%, rgba(160, 118, 66, .22), rgba(160, 118, 66, 0) 50%);
  color: var(--tinte);
  border: 1px solid var(--linie-stark);
  outline: 1px solid var(--linie);
  outline-offset: 4px;
  padding: clamp(1.2rem, 3vw, 1.7rem) clamp(1rem, 4vw, 3rem) clamp(.9rem, 2.5vw, 1.2rem);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9);
}
.inhalt-blatt > .ober { text-align: center; padding-inline: 2.4rem; margin-bottom: .3em; }
.inhalt-blatt > h2 {
  text-align: center;
  font-family: var(--font-titel);
  font-size: clamp(2rem, 6vw, 2.8rem);
  margin-top: .1em;
  margin-bottom: .3em;
}
.inhalt-blatt > h2::after {
  content: "";
  display: block;
  width: min(13rem, 70%);
  height: 1.3rem;
  margin: .15em auto 0;
  background: url("../assets/web/fleuron.webp?v=cbb84d303f") center/contain no-repeat;
  mix-blend-mode: multiply;   /* weißer Grund verschwindet auf dem Blatt */
}

.inhalt-zu {
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--roest-dunkel);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
}
.inhalt-zu:hover, .inhalt-zu:focus-visible { border-color: var(--linie-stark); background: var(--flaeche-stark); }

.inhalt-nav {
  display: grid;
  gap: .9rem 2.2rem;
  align-items: start;
}
.teil {
  margin: 0 0 .4em;
  font-size: 1.05rem;
  letter-spacing: .04em;
  color: var(--roest-dunkel);
  border-bottom: 1px solid var(--linie-stark);
  padding-bottom: .25em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.teil span {
  font-family: var(--font-text);
  font-style: italic;
  font-size: .95rem;
  letter-spacing: 0;
  color: var(--tinte-blass);
  text-align: right;
}

.inhalt-liste {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Ein Eintrag ist auf allen Breiten gleich gebaut: Vignette und Nummer
   links, Titel darüber der Kurzbeschreibung. Keine Punktlinie mehr — die
   rechtsbündige Zeile brach auf dem Schreibtisch um und machte das Blatt
   unruhig. */
.inhalt-liste a {
  display: grid;
  grid-template-columns: 2.1rem 2.3rem 1fr;
  grid-template-areas: "bild nr titel" "bild nr kurz";
  align-items: baseline;
  column-gap: .5rem;
  padding: .3em .3em .3em .5em;
  color: var(--tinte);
  text-decoration: none;
  border-radius: var(--radius);
}
/* Kapitelvignette im Inhalt: auf einer Pergamentscheibe, damit die
   dunklen Stichlinien auch im dunklen Modus lesbar bleiben */
.vignette-klein {
  grid-area: bild;
  align-self: center;
  width: 2rem;
  height: 2rem;
  background: var(--scheibe);
  border-radius: 50%;
}
.inhalt-liste .nr {
  grid-area: nr;
  font-family: var(--font-kapitel);
  color: var(--roest);
  text-align: right;
  padding-right: .3rem;
  border-right: 1px solid var(--linie);
  align-self: stretch;
}
.inhalt-liste .titel { grid-area: titel; font-family: var(--font-kapitel); font-size: 1rem; line-height: 1.3; }
.inhalt-liste .punkte { display: none; }
.inhalt-liste .kurz { grid-area: kurz; font-size: .85rem; font-style: italic; line-height: 1.35; color: var(--tinte-blass); }
.inhalt-liste a:hover, .inhalt-liste a:focus-visible { background: var(--flaeche-stark); }
.inhalt-liste a:hover .titel, .inhalt-liste a:focus-visible .titel { color: var(--roest-dunkel); }
/* Der aktuelle Eintrag bekommt einen Reiter am Rand wie im Daumenregister.
   Der frühere Kasten hinter der Nummer riss die Zeile auseinander. */
.inhalt-liste a.aktiv {
  background: var(--flaeche-stark);
  box-shadow: inset 3px 0 0 var(--roest);
}
.inhalt-liste a.aktiv .titel, .inhalt-liste a.aktiv .nr { color: var(--roest-dunkel); }

/* Ab Tablet zwei Spalten in Lesereihenfolge: Erster und Zweiter Teil oben,
   Dritter Teil und Anhang darunter. */
@media (min-width: 45rem) {
  .inhalt-nav { grid-template-columns: 1fr 1fr; }
}
/* Am Schreibtisch je eine Spalte pro Teil, von links nach rechts zu lesen,
   die Teilüberschriften auf einer Höhe. Der Anhang steht darunter quer über
   das ganze Blatt, seine drei Einträge nebeneinander. */
@media (min-width: 62rem) {
  .inhalt-nav { grid-template-columns: repeat(3, 1fr); }
  .inhalt-anhang { grid-column: 1 / -1; }
  .inhalt-anhang .inhalt-liste {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 2.2rem;
  }
}
.inhalt-fuss {
  margin: .9em 0 0;
  text-align: center;
  font-size: .85rem;
  color: var(--tinte-blass);
}
body.inhalt-offen { overflow: hidden; }

/* --- Anhangsblatt (Modal für Drucksachen, Impressum, Datenschutz) ------- */
/* Dasselbe Pergamentblatt wie das Inhaltsverzeichnis, nur schmaler, weil
   hier Fließtext steht und keine Tabelle. Es erbt .inhalt und damit auch
   den dunklen Modus und das Verschwinden im Druck. */
.modal-blatt { width: min(48rem, 100%); }
.modal-blatt > .inhalt-fuss { margin-top: 1.6em; }
body.modal-offen { overflow: hidden; }

.modal-inhalt > :first-child { margin-top: 0; }
.modal-inhalt > :last-child { margin-bottom: 0; }
.modal-inhalt h3 {
  font-family: var(--font-kapitel);
  color: var(--roest-dunkel);
  font-size: 1.4rem;
  margin: 1.3em 0 .15em;
}
.modal-inhalt dl { margin: 0 0 1.2em; }
.modal-inhalt dt {
  font-family: var(--font-kapitel);
  font-size: 1.05rem;
  color: var(--roest);
  margin-top: .8em;
}
.modal-inhalt dd { margin: .1em 0 0; }
.modal-inhalt code { font-size: .9em; }
.modal-inhalt .vorspann { font-size: 1.05rem; }

/* Eine Karte je Drucksache: Bild links, Text rechts, Knöpfe darunter */
.druck-liste {
  list-style: none;
  margin: 1.4em 0;
  padding: 0;
  display: grid;
  gap: .9rem;
}
.drucksache {
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 1rem;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-left: 3px solid var(--roest-hell);
  border-radius: var(--radius);
  padding: .9rem 1rem;
}
.drucksache-bild {
  width: 3rem;
  height: 3rem;
  background: var(--scheibe);
  border-radius: 50%;
}
.drucksache-text > :first-child { margin-top: 0; }
.drucksache-text > :last-child { margin-bottom: 0; }
.drucksache h3 { margin: 0 0 .15em; font-size: 1.25rem; }
.drucksache p { margin: 0 0 .4em; font-size: 1rem; }
.drucksache .drucksache-format {
  font-size: .85rem;
  font-style: italic;
  color: var(--tinte-blass);
}
.drucksache .drucksache-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .6em;
}
.drucksache-knoepfe .knopf {
  min-height: 2.4rem;
  padding: .3em .9em;
  font-size: .95rem;
  box-shadow: none;
}

@media (max-width: 30rem) {
  .drucksache { grid-template-columns: 1fr; row-gap: .5rem; }
  .drucksache-bild { width: 2.6rem; height: 2.6rem; }
}

/* --- Daumenregister (breite Bildschirme) -------------------------------- */
.register {
  display: none;
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 95;
}
.register ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.register a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 1.75rem;
  padding: 0 .4rem 0 .6rem;
  font-family: var(--font-kapitel);
  font-size: .78rem;
  color: var(--tinte-blass);
  text-decoration: none;
  background: var(--pergament-dunkel);
  border: 1px solid var(--linie);
  border-right: 0;
  border-radius: 3px 0 0 3px;
  transition: background-color .18s ease;
}
/* Lederne Textur auf den Reitern, von einer Pergamentlage gedämpft.
   Im dunklen Modus wird sie weiter unten wieder abgeschaltet. */
.register a {
  background-image:
    linear-gradient(rgba(243, 230, 200, .76), rgba(243, 230, 200, .76)),
    url("../assets/web/register-textur.webp?v=23dee5100d");
  background-size: auto, cover;
  background-position: center;
}
.register a:hover, .register a:focus-visible, .register a.aktiv {
  background-image:
    linear-gradient(rgba(250, 241, 221, .84), rgba(250, 241, 221, .84)),
    url("../assets/web/register-textur.webp?v=23dee5100d");
}
.register a::after {
  content: attr(data-nr);
  width: 1.9rem;
  text-align: center;
  color: var(--roest-dunkel);
  flex: none;
}
/* Der Titel klappt nur beim aktiven oder berührten Reiter aus */
.register a span {
  display: block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width .2s ease, opacity .15s ease, padding .2s ease;
}
.register a:hover span, .register a:focus-visible span, .register a.aktiv span {
  max-width: 12rem;
  opacity: 1;
  padding-right: .4rem;
}
.register a:hover, .register a:focus-visible, .register a.aktiv {
  background: var(--pergament-hell);
  color: var(--tinte);
}
.register a.aktiv { border-color: var(--roest); box-shadow: inset 3px 0 0 var(--roest); }
.register a.aktiv::after { color: var(--roest); }
@media (min-width: 78rem) and (min-height: 40rem) {
  .register { display: block; }
}

/* --- Unterseiten (Impressum, Datenschutz) ------------------------------ */
.unterseite main { min-height: 60vh; }
.unterseite section { border-top: 0; }
.unterseite h2 { font-size: clamp(2rem, 7vw, 2.6rem); }
.unterseite h3 { margin-top: 1.6em; }
.unterseite dl { margin: 0 0 1.2em; }
.unterseite dt { font-family: var(--font-kapitel); color: var(--roest-dunkel); margin-top: .8em; }
.unterseite dd { margin: .1em 0 0; }
.zurueck {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.5rem;
  padding: 0 .8rem;
  font-family: var(--font-kapitel);
  font-size: .98rem;
  color: var(--roest-dunkel);
  text-decoration: none;
  border: 1px solid var(--linie-stark);
  border-radius: var(--radius);
  background: var(--flaeche);
}
.zurueck:hover, .zurueck:focus-visible { color: var(--salz); background: var(--roest-dunkel); }
.fuss-links a + a::before { content: "·"; margin-inline: .5em; color: var(--tinte-blass); }
.fuss-druck { margin-top: .2em; }
.fuss-druck-titel { font-family: var(--font-kapitel); color: var(--tinte-blass); margin-right: .5em; }

/* ==========================================================================
   5. Bausteine
   ========================================================================== */

/* Knöpfe */
.knopfreihe {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 1.6em 0;
}
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .6em 1.2em;
  color: var(--salz);
  background: linear-gradient(180deg, var(--roest), var(--roest-dunkel));
  border: 2px solid var(--roest-dunkel);
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-kapitel);
  box-shadow: var(--schatten);
}
.knopf:hover, .knopf:focus-visible { color: var(--salz); background: var(--roest-dunkel); }
.knopf-still {
  color: var(--roest-dunkel);
  background: var(--flaeche-stark);
}
.knopf-still:hover, .knopf-still:focus-visible { color: var(--salz); background: var(--roest-dunkel); }

/* Karten */
.karten {
  display: grid;
  gap: 1rem;
  margin: 1.6em 0;
}
@media (min-width: 45rem) {
  .karten { grid-template-columns: repeat(2, 1fr); }
}
.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-left: 3px solid var(--roest-hell);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--schatten);
}
.karte h3, .karte h4 { margin-top: 0; font-size: 1.25rem; }
.karte p:last-child { margin-bottom: 0; }
.karte.mit-ikone { text-align: left; }
.karte.mit-ikone .ikone.gross { margin-bottom: .3rem; }

/* Hervorgehobene Kästen */
.hinweis-kasten {
  background: rgba(47, 107, 94, .1);
  border: 1px dashed var(--meer);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin: 1.4em 0;
  font-size: 1.02rem;
}
.mysterium {
  background: linear-gradient(180deg, rgba(255, 253, 244, .8), rgba(230, 211, 172, .55));
  border: 1px solid var(--linie-stark);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  margin: 1.4em 0;
  box-shadow: var(--schatten);
}
.mysterium p:last-child { margin-bottom: 0; }
.merksatz {
  font-family: var(--font-kapitel);
  font-size: clamp(1.25rem, 5vw, 1.6rem);
  text-align: center;
  color: var(--roest-dunkel);
  margin: .8em 0;
  line-height: 1.3;
}
.betont {
  font-family: var(--font-kapitel);
  font-size: 1.2rem;
  color: var(--roest-dunkel);
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  padding: .5em 0;
}

/* Petes Zitate */
blockquote.pete {
  margin: 1.8em 0;
  padding: 1rem 1.2rem;
  background: rgba(165, 101, 44, .12);
  border-left: 4px solid var(--roest);
  border-radius: var(--radius);
  font-style: italic;
  font-size: 1.12rem;
}
blockquote.pete p { margin-bottom: .4em; }
blockquote.pete footer {
  font-style: normal;
  font-family: var(--font-kapitel);
  font-size: .95rem;
  color: var(--tinte-blass);
}

/* Listen */
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .5em; }

.gegenueber { list-style: none; padding-left: 0; }
.gegenueber li {
  border-left: 3px solid var(--linie-stark);
  padding-left: .9em;
  margin-bottom: .8em;
}

.anleitung { counter-reset: schritt; list-style: none; padding-left: 0; }
.anleitung > li {
  counter-increment: schritt;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 1em;
}
.anleitung > li::before {
  content: counter(schritt);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  font-family: var(--font-kapitel);
  color: var(--salz);
  background: var(--roest);
  border-radius: 50%;
}
.gross-anleitung > li { margin-bottom: 1.6em; }
.gross-anleitung h3 { margin: 0 0 .3em; font-size: 1.3rem; }

.haken-liste, .kreuz-liste { list-style: none; padding-left: 0; }
.haken-liste li, .kreuz-liste li { padding-left: 1.7em; position: relative; }
.haken-liste li::before {
  content: "✔";
  position: absolute; left: 0;
  color: var(--meer);
  font-weight: 700;
}
.kreuz-liste li::before {
  content: "✘";
  position: absolute; left: 0;
  color: var(--rost);
  font-weight: 700;
}

.zwei-spalten { display: grid; gap: 1rem; margin-top: 1.5em; }
@media (min-width: 45rem) { .zwei-spalten { grid-template-columns: 1fr 1fr; } }
.spalte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.spalte h3 { margin-top: 0; }

/* Tabellen */
.tabelle-huelle {
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche);
}
.tabelle {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 1rem;
}
.tabelle caption {
  caption-side: top;
  text-align: left;
  padding: .8rem 1rem .4rem;
  font-family: var(--font-kapitel);
  color: var(--tinte-blass);
  font-size: .95rem;
}
.tabelle th, .tabelle td {
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--linie);
  text-align: left;
  vertical-align: top;
}
.tabelle thead th {
  font-family: var(--font-kapitel);
  color: var(--salz);
  background: var(--roest-dunkel);
  border-bottom: 2px solid var(--roest-dunkel);
}
.tabelle tbody th { font-weight: 700; color: var(--roest-dunkel); white-space: normal; }
.tabelle tbody tr:nth-child(even) { background: rgba(165, 101, 44, .07); }
.tabelle td.ja   { color: var(--meer); font-weight: 700; white-space: nowrap; }
.tabelle td.nein { color: var(--rost); font-weight: 700; white-space: nowrap; }

/* ==========================================================================
   6. Abschnitte im Einzelnen
   ========================================================================== */

/* Hero */
.hero {
  text-align: center;
  padding-block: clamp(2.5rem, 10vw, 5.5rem);
}
.hero h1 { margin-bottom: .25em; }
.gross-akzent { color: var(--roest); display: inline-block; }
.hero .unter { font-size: 1.15rem; color: var(--tinte-blass); }
.leitspruch {
  font-family: var(--font-kapitel);
  font-size: clamp(1.2rem, 5.2vw, 1.6rem);
  color: var(--roest-dunkel);
  line-height: 1.35;
  margin: 1.2em 0;
}
.gruss { font-size: 1.3rem; }
.hero .knopfreihe { justify-content: center; }
.hero-hinweis {
  font-size: 1.02rem;
  color: var(--tinte-blass);
  max-width: 52ch;
  margin-inline: auto;
  border-top: 1px solid var(--linie);
  padding-top: 1.2em;
}

/* Offenbarungsszene */
.szene {
  background: linear-gradient(180deg, rgba(255, 253, 244, .88), rgba(230, 211, 172, .6));
  border: 1px solid var(--linie-stark);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 5vw, 2rem);
  margin: 1.6em 0;
  font-size: 1.15rem;
  box-shadow: var(--schatten);
}
.szene p:last-child { margin-bottom: 0; }
.regie, .regie-inline {
  font-style: italic;
  color: var(--tinte-blass);
}
.regie { font-size: 1rem; }
.schluss-formel {
  font-family: var(--font-titel);
  font-size: clamp(1.4rem, 6vw, 2.1rem);
  color: var(--roest);
  text-align: center;
  line-height: 1.25;
  margin: 1.2em 0 2em;
}

.chronik { padding-left: 1.2em; }
.chronik > li { margin-bottom: 1.2em; }
.chronik h4 { margin: 0 0 .3em; }

/* Ehrenblock: Die drei vom Bannkreis */
.ehrenblock { display: grid; gap: 1rem; margin: 1.4em 0; }
.ehren-karte {
  background: linear-gradient(180deg, rgba(255, 253, 244, .7), rgba(230, 211, 172, .45));
  border: 1px solid var(--linie);
  border-left: 4px solid var(--meer);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--schatten);
}
.ehren-karte h4 { margin: 0 0 .5em; font-size: 1.3rem; }
.ehren-amt {
  display: block;
  font-family: var(--font-text);
  font-style: italic;
  font-size: .95rem;
  color: var(--tinte-blass);
  letter-spacing: 0;
}
.ehren-zitat {
  font-style: italic;
  color: var(--roest-dunkel);
  border-top: 1px dotted var(--linie-stark);
  padding-top: .7em;
  margin-bottom: 0;
}

/* Gebet */
.gebet-tafel {
  position: relative;
  text-align: center;
  background: linear-gradient(180deg, var(--pergament-hell), var(--pergament-dunkel));
  border: 2px double var(--roest-dunkel);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 6vw, 2.4rem) clamp(1rem, 4vw, 2rem);
  margin: 1.6em 0;
  box-shadow: var(--schatten);
}
.gebet-tafel .zier { margin-bottom: .6rem; }
.gebet {
  font-family: var(--font-kapitel);
  font-size: clamp(1.15rem, 4.6vw, 1.45rem);
  line-height: 1.75;
  color: var(--roest-dunkel);
  margin: 0;
}
.gebet strong { color: var(--roest); }
.klein-gebet {
  font-size: 1.1rem;
  text-align: left;
  border-left: 3px solid var(--roest-hell);
  padding-left: 1em;
  margin: 1.2em 0;
}

/* Gebote */
.gebote-liste { counter-reset: kern; list-style: none; padding-left: 0; }
.gebote-liste > li {
  counter-increment: kern;
  position: relative;
  padding: 1rem 1.2rem 1rem 3.6rem;
  margin-bottom: 1rem;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
}
.gebote-liste > li::before {
  content: counter(kern);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-family: var(--font-titel);
  font-size: 1.25rem;
  color: var(--salz);
  background: var(--roest);
  border-radius: 50% 50% 45% 45% / 55% 55% 45% 45%;
}
.gebote-liste h3 { margin: 0 0 .35em; font-size: 1.25rem; }
.gebote-liste p:last-child { margin-bottom: 0; }


/* Riten */
.riten-liste { display: grid; gap: 1.1rem; }
.ritus {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--roest);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--schatten);
}
.ritus h3 { margin-top: 0; }
.ritus-art {
  display: block;
  font-family: var(--font-text);
  font-style: italic;
  font-size: .95rem;
  color: var(--tinte-blass);
  letter-spacing: 0;
}
.ritus p:last-child { margin-bottom: 0; }

/* Stufen */
.stufen-liste { list-style: none; padding-left: 0; counter-reset: stufe; }
.stufen-liste > li {
  position: relative;
  margin: 0 0 1rem;
  padding: 1rem 1.2rem 1rem 1.6rem;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-left: 5px solid var(--roest-hell);
  border-radius: var(--radius);
}
.stufen-liste > li:nth-child(1) { border-left-color: var(--meer-hell); }
.stufen-liste > li:nth-child(2) { border-left-color: var(--roest-hell); }
.stufen-liste > li:nth-child(3) { border-left-color: var(--roest); }
.stufen-liste > li:nth-child(4) { border-left-color: var(--roest-dunkel); }
.stufen-liste > li:nth-child(5) { border-left-color: var(--tinte); }
.stufen-liste > li:nth-child(6) { border-left-color: var(--meer); border-left-style: dashed; }
.stufen-liste h3 { margin-top: 0; }
.stufe-nr {
  display: block;
  font-family: var(--font-text);
  font-style: italic;
  font-size: .95rem;
  color: var(--tinte-blass);
}
.aemter { list-style: none; padding-left: 0; }
.aemter li {
  padding-left: 1.4em;
  position: relative;
}
.aemter li::before {
  content: "·";
  position: absolute;
  left: .3em;
  color: var(--roest);
  font-size: 1.6em;
  line-height: .7;
}

/* Zeichen */
.farben-liste { list-style: none; padding-left: 0; }
.farben-liste li { display: flex; gap: .7rem; align-items: flex-start; }
.farbklecks {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  margin-top: .2em;
  border: 1px solid var(--linie-stark);
  border-radius: 50% 50% 45% 45% / 55% 55% 45% 45%;
}
.kl-roest { background: var(--roest); }
.kl-salz  { background: var(--salz); }
.kl-meer  { background: var(--meer); }
.kl-tinte { background: var(--tinte); }

.gesten { margin: 1.2em 0; }
.gesten dt {
  font-family: var(--font-kapitel);
  font-size: 1.2rem;
  color: var(--roest-dunkel);
  margin-top: 1em;
}
.gesten dd { margin: .2em 0 0; padding-left: 1em; border-left: 2px solid var(--linie); }

.losung-spiel {
  font-family: var(--font-kapitel);
  font-size: 1.2rem;
  background: rgba(47, 107, 94, .1);
  border: 1px dashed var(--meer);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.losung-spiel span { color: var(--tinte-blass); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; }

/* Lieder */
.lied {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.2em 0;
}
.lied-hinweis { font-style: italic; color: var(--tinte-blass); font-size: 1rem; margin-bottom: .6em; }
/* Aufnahme zum Lied: Abspielen und Herunterladen */
.lied-audio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  margin: 0 0 1.2em;
  padding: .7rem .9rem;
  background: var(--flaeche-stark);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
}
.lied-audio audio { flex: 1 1 16rem; min-width: 0; max-width: 100%; height: 2.4rem; }
.lied-laden {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.4rem;
  padding: 0 .8rem;
  font-family: var(--font-kapitel);
  font-size: .95rem;
  color: var(--roest-dunkel);
  text-decoration: none;
  border: 1px solid var(--linie-stark);
  border-radius: var(--radius);
  background: var(--flaeche);
  white-space: nowrap;
}
.lied-laden .ikone { color: currentColor; }
.lied-laden:hover, .lied-laden:focus-visible { color: var(--salz); background: var(--roest-dunkel); }
.strophe { line-height: 1.6; }
.refrain {
  font-family: var(--font-kapitel);
  color: var(--roest-dunkel);
  padding-left: 1.2em;
  border-left: 3px solid var(--roest);
  line-height: 1.6;
}
.lied p:last-child { margin-bottom: 0; }
.wechsel .rolle {
  font-family: var(--font-kapitel);
  font-size: .9rem;
  letter-spacing: .06em;
  color: var(--tinte-blass);
  display: inline-block;
  min-width: 7.5em;
}

.segen-liste { list-style: none; padding-left: 0; }
.segen-liste li {
  font-family: var(--font-kapitel);
  font-size: 1.15rem;
  color: var(--roest-dunkel);
  padding: .5em 0;
  border-bottom: 1px dotted var(--linie);
}
.anlass {
  display: block;
  font-family: var(--font-text);
  font-style: italic;
  font-size: .95rem;
  color: var(--tinte-blass);
}

.fluch {
  font-family: var(--font-kapitel);
  font-size: 1.15rem;
  color: var(--rost);
  background: rgba(140, 59, 36, .09);
  border: 1px solid rgba(140, 59, 36, .4);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  line-height: 1.6;
}

/* Häresien */
.haeresien { display: grid; gap: 1.1rem; }
.haeresie {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--schatten);
}
.haeresie h3 { margin-top: 0; }
.haeresie p:last-child { margin-bottom: 0; }

/* Orakel */
.orakel-kasten {
  text-align: center;
  background: linear-gradient(180deg, var(--pergament-hell), var(--pergament-dunkel));
  border: 2px double var(--roest-dunkel);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 6vw, 2.4rem) clamp(1rem, 4vw, 2rem);
  margin: 1.6em 0;
  box-shadow: var(--schatten);
}
.orakel-knopf {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  min-height: 48px;
  padding: 1rem 1.6rem;
  color: var(--salz);
  background: linear-gradient(180deg, var(--roest), var(--roest-dunkel));
  border: 2px solid var(--roest-dunkel);
  border-radius: var(--radius);
  font-size: 1.2rem;
  box-shadow: var(--schatten);
}
.orakel-knopf .ikone { color: var(--pergament-hell); }
.orakel-knopf:hover, .orakel-knopf:focus-visible { background: var(--roest-dunkel); }
.orakel-knopf:active { transform: translateY(1px); }
.orakel-knopf.knackt .ikone { animation: knacken .35s ease-out; }
@keyframes knacken {
  0%   { transform: scale(1) rotate(0deg); }
  40%  { transform: scale(1.18) rotate(-9deg); }
  70%  { transform: scale(.92) rotate(7deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .orakel-knopf.knackt .ikone { animation: none; }
}
.orakel-spruch {
  font-family: var(--font-kapitel);
  font-size: clamp(1.2rem, 5vw, 1.55rem);
  line-height: 1.45;
  color: var(--roest-dunkel);
  min-height: 3.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.2em 0 .2em;
}
.orakel-zaehler { font-size: .9rem; color: var(--tinte-blass); margin: 0; min-height: 1.4em; }

/* FAQ */
.faq details {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: .2rem 1.1rem;
  margin-bottom: .6rem;
}
.faq details[open] { background: var(--flaeche-stark); border-color: var(--linie-stark); }
.faq summary {
  cursor: pointer;
  font-family: var(--font-kapitel);
  font-size: 1.2rem;
  color: var(--roest-dunkel);
  padding: .75em 0;
  list-style: none;
  position: relative;
  padding-right: 1.8em;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: .55em;
  font-size: 1.4em;
  line-height: 1;
  color: var(--roest);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1em; }

/* OT-Hinweis */
.ot-kasten {
  background: rgba(47, 107, 94, .08);
  border: 1px solid var(--meer);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 5vw, 1.8rem);
}
.warnung {
  background: rgba(140, 59, 36, .1);
  border: 2px solid var(--rost);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 1.4em 0;
}
.warnung h3 { margin-top: 0; color: var(--rost); }
.warnung li { margin-bottom: .6em; }

/* ==========================================================================
   6b. Kupferstiche — Frontispiz, Kapitelvignetten, Figuren, Bänder
   Alle Bilder liegen als WebP in assets/web/ und werden selbst ausgeliefert.
   ========================================================================== */

img { height: auto; }

figure {
  margin: 1.6em 0;
  break-inside: avoid;
}
figure img { display: block; }

/* Damit rechts gestellte Figuren ihren Abschnitt nicht verlassen */
section > .wrap { display: flow-root; }

/* --- Frontispiz auf dem Titelblatt ------------------------------------- */
.frontispiz {
  max-width: 46rem;
  margin: 0 auto 1.8rem;
}
.frontispiz img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 14px 32px -22px rgba(42, 31, 20, .85);
}

/* --- Kapitelkopf: Vignette links, Ober- und Hauptzeile daneben --------- */
.buchkopf {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: .6em;
}
.buchkopf-text { min-width: 0; }
.buchkopf-text > .ober { margin-bottom: .25em; }
.buchkopf-text > h2 { margin-bottom: 0; }
.buchvignette {
  flex: none;
  width: 3.6rem;
  height: 3.6rem;
  background: var(--scheibe);
  border-radius: 50%;
}
@media (min-width: 45rem) {
  .buchkopf { gap: 1.2rem; }
  .buchvignette { width: 4.5rem; height: 4.5rem; }
}
@media (min-width: 62rem) {
  .buchvignette { width: 5.5rem; height: 5.5rem; }
}

/* --- Figuren: Szenen und Einzelstücke ---------------------------------- */
.figur { text-align: center; }
.figur img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 10px 24px -20px rgba(42, 31, 20, .9);
}
.figur figcaption {
  margin-top: .45em;
  font-size: .92rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--tinte-blass);
  text-align: center;
}

/* Ab Tablet wandert die Figur an den rechten Rand, der Text läuft herum */
@media (min-width: 45rem) {
  .figur.rechts {
    float: right;
    width: 42%;
    margin: .4em 0 1.2rem 1.2rem;
  }
  .figur.rechts.schmal { width: 30%; }
  .figur.rechts figcaption { text-align: left; }
}

/* Kästen mit eigener Fläche dürfen nicht unter eine Figur rutschen */
.chronik > li,
.ritus,
blockquote.pete,
.gebote-liste > li { display: flow-root; }

/* --- Emblem im Buch „Wie man Knacker wird“ ----------------------------- */
.emblem {
  margin: 1.4em auto;
  text-align: center;
}
.emblem img {
  width: 15rem;
  max-width: 100%;
  border-radius: 2px;
  box-shadow: 0 12px 26px -20px rgba(42, 31, 20, .9);
}

/* --- Symbolkarten im Buch der Zeichen ---------------------------------- */
.zeichen-bild {
  display: block;
  width: 5rem;
  height: 5rem;
  margin-bottom: .4rem;
}
.zeichen-bild.gerahmt {
  border: 1px solid var(--linie);
  border-radius: 3px;
}

/* --- Bänder zwischen den Liedern ---------------------------------------
   „darken“ lässt vom Band nur stehen, was dunkler ist als das Pergament,
   der Bildgrund verschwindet also. Die Maske blendet die Enden aus,
   damit kein Kasten zu sehen ist. */
.band {
  display: block;
  width: 100%;
  margin: 2em auto 1.6em;
  mix-blend-mode: darken;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

/* --- Siegel im Fuß ------------------------------------------------------ */
.fuss-siegel {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  box-shadow: 0 10px 24px -18px rgba(42, 31, 20, .9);
}

/* ==========================================================================
   7. Fuß und „Nach oben“
   ========================================================================== */
.fuss {
  text-align: center;
  padding-block: 2.5rem 3.5rem;
  border-top: 2px solid var(--roest-dunkel);
  background: linear-gradient(180deg, rgba(165, 101, 44, .1), rgba(107, 63, 24, .2));
}
.fuss-gruss { font-family: var(--font-titel); font-size: 1.8rem; color: var(--roest-dunkel); margin: .3em 0; }
.fuss-hinweis { font-size: 1rem; color: var(--tinte-blass); max-width: 46ch; margin-inline: auto; }
.fuss-zeile { font-size: .9rem; color: var(--tinte-blass); }
.fuss-links { font-family: var(--font-kapitel); }
.fuss-links a { padding: .4em .2em; display: inline-block; }

.nach-oben {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--salz);
  background: var(--roest-dunkel);
  border: 1px solid var(--roest);
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .8);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}
.nach-oben.sichtbar { opacity: .92; visibility: visible; }
.nach-oben:hover, .nach-oben:focus-visible { color: var(--salz); background: var(--roest); opacity: 1; }

/* ==========================================================================
   8. Dunkler Modus — Holz, Teer und Laternenlicht
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --pergament:        #1b1512;
    --pergament-hell:   #2b211a;
    --pergament-dunkel: #15100d;
    --tinte:            #ecdcc0;
    --tinte-blass:      #b9a486;

    --roest:            #d4914e;
    --roest-dunkel:     #e8b378;
    --roest-hell:       #f0c795;

    --salz:             #fdfaf2;
    --meer:             #6fc0ac;
    --meer-hell:        #8fd6c4;
    --rost:             #e08268;

    --flaeche:          rgba(255, 238, 210, .05);
    --flaeche-stark:    rgba(255, 238, 210, .09);
    --linie:            rgba(236, 220, 192, .18);
    --linie-stark:      rgba(236, 220, 192, .34);
    --schatten:         0 2px 0 rgba(0, 0, 0, .3), 0 12px 28px -20px #000;
    --schale-linie:     rgba(20, 14, 10, .55);
  }

  body {
    background-color: var(--pergament);
    background-image:
      radial-gradient(ellipse at 15% 5%,  rgba(212, 145, 78, .13), rgba(0, 0, 0, 0) 55%),
      radial-gradient(ellipse at 85% 30%, rgba(111, 192, 172, .07), rgba(0, 0, 0, 0) 45%),
      radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 60%),
      repeating-linear-gradient(92deg, rgba(0, 0, 0, .28) 0 3px, rgba(255, 255, 255, .012) 3px 11px),
      repeating-linear-gradient(4deg,  rgba(0, 0, 0, .14) 0 2px, rgba(0, 0, 0, 0) 2px 9px);
  }

  .kopf { background: color-mix(in srgb, var(--pergament) 90%, transparent); }
  .marke, .blatt, .kol-titel, .inhalt-zu { color: var(--roest-dunkel); }
  .blatt:hover, .blatt:focus-visible { color: #1b1512; background: var(--roest-dunkel); }
  .inhalt-knopf { color: #1b1512; background: linear-gradient(180deg, var(--roest-hell), var(--roest)); border-color: var(--roest); }
  .inhalt { background: rgba(0, 0, 0, .7); }
  .inhalt-blatt { background-image: radial-gradient(ellipse at 10% 0%, rgba(212, 145, 78, .12), rgba(0, 0, 0, 0) 50%); }
  .register a { background: var(--pergament-hell); }
  .lied-audio audio { color-scheme: dark; }
  .register a:hover, .register a:focus-visible, .register a.aktiv { background: #3a2c22; }
  .tau { background: repeating-linear-gradient(90deg, rgba(236, 220, 192, .12) 0 6px, rgba(0, 0, 0, 0) 6px 10px); }

  /* Fleuron: im Dunkeln die helle Fassung, ohne Mischmodus */
  section + section::before {
    background-image: url("../assets/web/fleuron-dunkel.webp?v=c97f37ec10");
    background-blend-mode: normal;
  }
  .inhalt-blatt > h2::after {
    background-image: url("../assets/web/fleuron-dunkel.webp?v=c97f37ec10");
    mix-blend-mode: normal;
  }

  /* Reiter ohne Ledertextur, sie würde im Dunkeln nur schmutzig wirken */
  .register a,
  .register a:hover, .register a:focus-visible, .register a.aktiv { background-image: none; }

  /* Bilder mit Pergamentgrund bekommen einen Rahmen und werden etwas
     zurückgenommen, damit sie nicht aus der dunklen Seite herausleuchten */
  .frontispiz img,
  .figur img,
  .emblem img,
  .zeichen-bild.gerahmt,
  .fuss-siegel,
  .band {
    border: 1px solid var(--linie-stark);
    filter: brightness(.88);
  }
  .fuss-siegel, .vignette-klein, .buchvignette { border-radius: 50%; }
  .vignette-klein, .buchvignette {
    border: 1px solid var(--linie-stark);
    box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .8);
  }
  /* Die Bänder werden umgekehrt: helle Zeichnung auf dunklem Grund.
     „lighten“ ist das dunkle Gegenstück zu „darken“ und lässt nur das
     stehen, was heller ist als die Seite — der Bildgrund fällt weg. */
  .band {
    border: 0;
    filter: invert(1) sepia(.7) saturate(1.25) brightness(.62);
    mix-blend-mode: lighten;
  }

  .knopf, .orakel-knopf {
    color: #1b1512;
    background: linear-gradient(180deg, var(--roest-hell), var(--roest));
    border-color: var(--roest);
  }
  .knopf:hover, .knopf:focus-visible,
  .orakel-knopf:hover, .orakel-knopf:focus-visible { color: #1b1512; background: var(--roest-hell); }
  .knopf-still { color: var(--roest-hell); background: var(--flaeche-stark); border-color: var(--roest); }
  .knopf-still:hover, .knopf-still:focus-visible { color: #1b1512; }
  .orakel-knopf .ikone { color: #1b1512; }

  .gebet-tafel,
  .orakel-kasten,
  .szene,
  .ehren-karte,
  .mysterium {
    background: linear-gradient(180deg, #2b211a, #191310);
    border-color: var(--roest);
    color: var(--tinte);
  }

  .ehren-karte { border-left-color: var(--meer); }

  .tabelle thead th { color: #1b1512; background: var(--roest); }
  .tabelle tbody tr:nth-child(even) { background: rgba(212, 145, 78, .06); }

  blockquote.pete { background: rgba(212, 145, 78, .09); }
  .fuss { background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .5)); }
  .nach-oben { color: #1b1512; background: var(--roest); border-color: var(--roest-hell); }
  .nach-oben:hover, .nach-oben:focus-visible { color: #1b1512; background: var(--roest-hell); }
  .kl-tinte { background: #0d0907; }
  .warnung { background: rgba(224, 130, 104, .12); }
  .ot-kasten { background: rgba(111, 192, 172, .07); }
  .sprung-zum-inhalt { background: var(--roest); color: #1b1512; }
}

/* ==========================================================================
   9. Druck — die Seite als Katechismus zum Mitnehmen
   ========================================================================== */
@media print {
  :root {
    --pergament: #fff;
    --tinte: #000;
    --tinte-blass: #333;
    --roest: #000;
    --roest-dunkel: #000;
    --roest-hell: #666;
    --linie: #999;
    --linie-stark: #666;
    --flaeche: transparent;
    --flaeche-stark: transparent;
    --schatten: none;
    --meer: #000;
    --rost: #000;
    --schale-linie: #888;
  }

  html { scroll-behavior: auto; }

  body {
    background: #fff !important;
    color: #000;
    font-size: 11pt;
    line-height: 1.45;
    overflow: visible !important;
  }
  .kopf, .inhalt, .register, .nach-oben, .sprung-zum-inhalt, .lied-audio { display: none !important; }
  section + section::before { display: none; }

  /* Navigation, Springknopf und Interaktives verschwinden */
  .kopf,
  .nav,
  .nach-oben,
  .sprung-zum-inhalt,
  .knopfreihe,
  .orakel-knopf,
  .orakel-zaehler,
  .fuss-links { display: none !important; }

  .wrap { max-width: none; padding-inline: 0; }

  section {
    padding-block: 1.2rem;
    border-top: 1pt solid #999;
    break-inside: auto;
  }

  h1, h2, h3, h4 { color: #000; break-after: avoid; }
  h2 { font-size: 18pt; margin-top: .6em; }
  h3 { font-size: 13pt; }

  .karte, .ritus, .haeresie, .spalte, .lied, .mysterium, .szene, .ehren-karte,
  .gebet-tafel, .orakel-kasten, .hinweis-kasten, .ot-kasten, .warnung,
  blockquote.pete, .gebote-liste > li, .stufen-liste > li {
    background: transparent !important;
    box-shadow: none !important;
    border: 1pt solid #999;
    break-inside: avoid;
  }

  .karten, .zwei-spalten { grid-template-columns: 1fr 1fr; }
  .riten-liste, .haeresien { display: block; }
  .ritus, .haeresie { margin-bottom: .8rem; }

  .tabelle-huelle { overflow: visible; border: 0; }
  .tabelle { min-width: 0; font-size: 9.5pt; break-inside: auto; }
  .tabelle thead th { color: #000; background: #ddd; }
  .tabelle tbody tr:nth-child(even) { background: #f2f2f2; }
  .tabelle tr { break-inside: avoid; }

  /* Im Druck sind alle Antworten offen */
  .faq details { border: 1pt solid #999; break-inside: avoid; }
  .faq details p { display: block !important; }
  .faq summary::after { content: ""; }

  a { color: #000; text-decoration: none; }
  .orakel-spruch { min-height: 0; }

  /* Bilder: keine Floats, nichts läuft über den Seitenrand */
  .figur.rechts {
    float: none !important;
    width: 100% !important;
    margin-inline: 0 !important;
  }
  .figur img, .frontispiz img, .emblem img {
    max-height: 60vh;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
    box-shadow: none !important;
  }
  .band { mix-blend-mode: normal; max-width: 12cm; }
  .buchvignette { width: 2.6rem; height: 2.6rem; }
  .vignette-klein { display: none; }

  .fuss { background: none; border-top: 1pt solid #999; }
}

/* Antworten im Druck erzwingen (details ohne open) */
@media print {
  details:not([open]) > *:not(summary) { display: block !important; }
}
