* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: #25211d;
  background: #f7f2ea;
  line-height: 1.7;
}

.hero {
  min-height: 82vh;
  background:
    linear-gradient(rgba(20, 18, 15, 0.22), rgba(20, 18, 15, 0.48)),
    url("images/start/header/start-header.jpeg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 6rem 8vw;
}

.hero-overlay {
  max-width: 850px;
  color: #fffaf2;
}

.hero h1 {
  font-family: "Crimson Text", serif;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.0;
  margin: 0 0 1rem;
  font-weight: 600;
}

body:has(.lebensraeume) > .hero h1 {
  color: #f8f6f2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.38);
}

.hero-subtitle {
  font-size: clamp(1.15rem, 2.5vw, 1.7rem);
  max-width: 760px;
  margin: 0;
  font-weight: 400;
}

main {
  width: 100%;
}

.prolog {
  padding: 7rem 8vw 6rem;
}

.content {
  max-width: 820px;
  margin: 0 auto;
}

.prolog p {
  font-family: "Crimson Text", serif;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.65;
  margin: 0 0 1.7rem;
}

.lebensraeume {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 8vw 8rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.raum {
  display: block;
  min-height: 260px;
  padding: 2.4rem;
  text-decoration: none;
  color: #2b2621;
  background: rgba(255, 250, 243, 0.78);
  border: 1px solid rgba(70, 55, 35, 0.12);
  border-radius: 22px;
  box-shadow: 0 14px 35px rgba(45, 35, 20, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.raum:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(45, 35, 20, 0.13);
}

.raum h2 {
  font-family: "Crimson Text", serif;
  font-size: 2.4rem;
  margin: 0 0 0.7rem;
}

.raum p {
  margin: 0;
  font-size: 1.05rem;
  color: #5f574e;
}

@media (max-width: 900px) {
  .lebensraeume {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 62vh;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 58vh;
    padding: 4rem 6vw;
  }

  .prolog {
    padding: 4rem 6vw 2rem;
  }

  .lebensraeume {
    grid-template-columns: 1fr;
    padding: 2rem 6vw 5rem;
  }

  .raum {
    min-height: auto;
  }
}

.einstiege {
  padding: 0 8vw 7rem;
}

.einstiege h2 {
  font-family: "Crimson Text", serif;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  margin: 0 0 2rem;
  color: #2b2621;
}

.einstiegsliste {
  display: grid;
  gap: 1rem;
}

.einstiegsliste a {
  display: block;
  padding: 1.4rem 1.6rem;
  background: rgba(255, 250, 243, 0.75);
  border-left: 4px solid #8a5d3b;
  text-decoration: none;
  color: #2b2621;
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.einstiegsliste a:hover {
  background: #fffaf3;
  transform: translateX(4px);
}

.einstiegsliste span {
  display: block;
  font-family: "Crimson Text", serif;
  font-size: 1.55rem;
  margin-bottom: 0.25rem;
}

.einstiegsliste p {
  margin: 0;
  color: #5f574e;
}

@media (max-width: 600px) {
  .einstiege {
    padding: 0 6vw 5rem;
  }
}

.topnav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 5vw;
  display: flex;
  justify-content: center;
  gap: 2rem;
  z-index: 1000;
  background: rgba(18, 18, 18, 0.18);
  backdrop-filter: blur(10px);
}

.topnav a {
  color: rgba(255, 250, 245, 0.92);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}

.topnav a:hover {
  opacity: 0.7;
}

@media (max-width: 800px) {
  .topnav {
    gap: 1rem;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 1rem 1rem;
  }

  .topnav a {
    white-space: nowrap;
    font-size: 0.9rem;
  }
}

.schlussgedanke {
  padding: 1rem 8vw 8rem;
}

.schlussgedanke p {
  max-width: 820px;
  margin: 0 auto;
  font-family: "Crimson Text", serif;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  line-height: 1.45;
  color: #4a4037;
}

@media (max-width: 600px) {
  .schlussgedanke {
    padding: 1rem 6vw 5rem;
  }
}

.abschlusssatz {
  margin-top: 3rem !important;
  font-size: clamp(1.8rem, 3vw, 2.5rem) !important;
  line-height: 1.35 !important;
  color: #2f2924;
}

.kapitel-intro {
  padding: 70px 0 90px;
}

.kapitel-intro h2 {
  font-family: "Crimson Text", serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  margin: 0 0 1rem;
  color: #2b2621;
}

.kapitel-intro p {
  max-width: 780px;
  margin: 0;
  font-size: 1.08rem;
  color: #5f574e;
}

@media (max-width: 600px) {
  .kapitel-intro {
    padding: 0 6vw 1.5rem;
  }
}

.footer {
  padding: 2rem 8vw;
  text-align: center;
  color: #7a7066;
  font-size: 0.9rem;
  border-top: 1px solid rgba(70, 55, 35, 0.12);
}

@media (max-width: 600px) {
  .footer {
    padding: 2rem 6vw;
  }
}

.geschichte-text {
  padding: 6rem 8vw 4rem;
}

.geschichte-text p {
  font-family: "Crimson Text", serif;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.7;
  margin: 0 0 1.8rem;
}

.weiterlesen {
  padding: 2rem 8vw 7rem;
}

.weiterlesen h2 {
  font-family: "Crimson Text", serif;
  font-size: 2.3rem;
  margin-bottom: 2rem;
}

.weiter-grid {
  display: grid;
  gap: 1rem;
}

.weiter-grid a {
  display: block;
  padding: 1.4rem 1.6rem;
  background: rgba(255,250,243,0.78);
  border-radius: 16px;
  text-decoration: none;
  color: #2b2621;
  transition: transform 0.2s ease;
}

.weiter-grid a:hover {
  transform: translateY(-2px);
}

.weiter-grid span {
  font-family: "Crimson Text", serif;
  font-size: 1.5rem;
}

.geschichtenliste {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 8vw 7rem;
  display: grid;
  gap: 1.5rem;
}

.geschichte {
  display: block;
  text-decoration: none;
  color: #2b2621;
  background: rgba(255,250,243,0.78);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(70,55,35,0.1);
  transition: transform 0.2s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.geschichte:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(45,35,20,0.14);
}

.geschichte::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.10),
    rgba(0,0,0,0.02)
  );
  pointer-events: none;
}

.geschichte h2 {
  font-family: "Crimson Text", serif;
  font-size: 2rem;
  margin: 0 0 0.7rem;
  line-height: 1.1;
}

.geschichte p {
  margin: 0;
  margin-top: 0.8rem;
  color: #5f574e;
  line-height: 1.6;
}

.raumintro {
  padding: 6rem 8vw 3rem;
}

.seitenkopf {
  min-height: 58vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 6rem 8vw 4rem;
}

.kindheit-header {
  background-image:
    linear-gradient(rgba(20, 18, 15, 0.25), rgba(20, 18, 15, 0.55)),
    url("images/kindheit/header/kindheit-header.jpg");
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  background-color: #e8dfd3;
}

.story-header {
  min-height: 58vh;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: #1f1a16;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 6rem 8vw 4rem;
}

.schuhe-header {
  background:
    linear-gradient(rgba(20, 18, 15, 0.25), rgba(20, 18, 15, 0.58)),
    url("images/kindheit/header/kindheit-schuhe-header.jpg");
}

.story-image {
  max-width: 980px;
  margin: 4rem auto;
}

.story-image img {
  width: 100%;
  display: block;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.12);
}

.story-intro {
  font-family: "Crimson Text", serif;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  line-height: 1.45;
  color: #4a4037;
  margin-bottom: 3rem;
}

.geschichte-text .content {
  max-width: 760px;
}

.geschichte-text p {
  text-align: left;
}

.story-back {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(70,55,35,0.12);
}

.story-header {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-color: #e8dfd3;
}

.button {
  display: inline-block;
  margin: 1.5rem 0 2rem;
}

.jugend-header {
  background-image:
    linear-gradient(rgba(20, 18, 15, 0.25), rgba(20, 18, 15, 0.55)),
    url("images/jugend/header/jugend-header.jpg");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  background-color: #e8dfd3;

  min-height: 28vh;
}

.geschichtenliste.lehrergrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8rem;
}

.geschichtenliste.lehrergrid .geschichte {
  margin: 0;
}

.geschichtenliste.lehrergrid summary {
  list-style: none;
  cursor: pointer;
  padding: 1.4rem 1.6rem;
  font-weight: 600;
}

.geschichtenliste.lehrergrid summary::-webkit-details-marker {
  display: none;
}

.geschichtenliste.lehrergrid summary small {
  display: block;
  margin-top: 0.35rem;
  font-weight: 400;
  opacity: 0.75;
}

.geschichtenliste.lehrergrid details p {
  padding: 0 1.6rem 1.6rem;
  margin: 0;
}

@media (max-width: 900px) {
  .geschichtenliste.lehrergrid {
    grid-template-columns: 1fr;
  }
}

/* Musik */

.musik-header .hero-overlay {
  color: #fffaf3;
  text-shadow: 0 3px 12px rgba(0,0,0,0.45);
}

.songs-grid {
  max-width: 820px;
  margin: 0 auto 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.song-card {
  background: rgba(255,255,255,0.55);
  border-radius: 18px;
  padding: 0.6rem;
  box-shadow: 0 10px 26px rgba(0,0,0,0.07);
}

.song-card img {
  width: 100%;
  aspect-ratio: 1 / 0.85;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 0.5rem;
}

.song-card h3 {
  margin: 0.25rem 0 0.15rem;
  font-size: 1.15rem;
  line-height: 1.2;
}

.song-card > p {
  margin: 0.15rem 0 0.5rem;
  color: #5f574e;
}

.song-card audio {
  width: 100%;
  margin: 0.45rem 0 0.6rem;
}

.song-card details {
  margin-top: 0.4rem;
}

.song-card summary {
  cursor: pointer;
  font-weight: 600;
}

.song-card details p {
  margin-top: 0.7rem;
}

@media (max-width: 900px) {
  .songs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .songs-grid {
    grid-template-columns: 1fr;
  }
}

.musik-header {
  background-image:
    linear-gradient(rgba(20,18,15,0.35), rgba(20,18,15,0.60)),
    url("images/musik/header/musik-header.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #e8dfd3;
}

.seitenkopf.jugend-header {
  min-height: 26vh;
  padding: 4rem 8vw 2rem;
  background-size: cover;
  background-position: center 30%;
}

.seitenkopf h1 {
  font-size: clamp(2.2rem, 3.5vw, 3.4rem);
  margin-bottom: 0.8rem;
}

.seitenkopf .hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.8rem);
  max-width: 700px;
  line-height: 1.35;
}

.gymnasium-header {
  min-height: auto;
  padding: 0;
  position: relative;
}

.gymnasium-header img {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.gymnasium-header .hero-overlay {
  position: absolute;
  left: 8vw;
  top: 60px;
  bottom: auto;
  color: #fffaf3;
  text-shadow: 0 3px 12px rgba(0,0,0,0.5);
}

.gymnasium-header h1 {
  font-size: clamp(2.2rem, 3.5vw, 3.4rem);
  margin-bottom: 0.8rem;
}

.gymnasium-header .hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.8rem);
  max-width: 700px;
  line-height: 1.35;
}

.haltungen {
  margin-top: 5rem;
}

.haltungen h2 {
  font-family: "Crimson Text", serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin-bottom: 3rem;
}

.haltung {
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(70,55,35,0.12);
}

.haltung h3 {
  font-family: "Crimson Text", serif;
  font-size: 2.3rem;
  margin: 0 0 1.2rem;
  color: #2b2621;
}

.haltung p {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.9;
  color: #3d3832;
  max-width: 900px;
}

.lebensmotto,
.blogmotto {
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid rgba(138,93,59,0.35);

  font-family: "Crimson Text", serif;
  font-size: 2rem;
  font-style: italic;
  line-height: 1.4;
  color: #2b2621;
}

.lebensmotto span,
.blogmotto span {
  display: block;
  margin-top: 0.8rem;

  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-style: normal;
  font-weight: 500;
  color: #6a6258;
}

.blogmotto {
  margin-bottom: 4rem;
}

.personenblock {
  border-top: 1px solid rgba(0, 0, 0, 0.16);
  padding-top: 2.6rem;
  margin-top: 3.2rem;
}

.personen-kopf {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.personen-kopf img {
  width: 54px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  flex-shrink: 0;
}

.personen-kopf h2 {
  margin: 0;
}

@media (max-width: 640px) {
  .personen-kopf img {
    width: 48px;
    height: 60px;
  }
}

/* ========================================================================== 
   KOMPATIBILITÄTSSCHICHT 2026-07-15

   Ziel
   ----
   Diese Schicht vereinheitlicht die vorhandenen Layoutgenerationen, ohne eine
   HTML-Datei anzufassen. Die Referenz ist 03-leben-sfo-ankunft.html.

   Dokumentation der Änderungen
   -----------------------------
   01. Wiederverwendbare Designwerte für Farben, Breiten, Schatten und Abstände.
   02. Einheitliche Grundtypografie, Überschriften, Links und Medien.
   03. Gemeinsame Navigation für .topnav und die neuere .page-Navigation.
   04. Konsolidierte Hero-Regeln für .story-header, .seitenkopf und .page .hero.
   05. Zentrale Regeln für .bildhinweis, figure, figcaption und Bildvarianten.
   06. Einheitliche Story-Typografie für .geschichte-text, .story und .story-post.
   07. Unterstützung aller Index-, Kachel- und Weiterlese-Varianten.
   08. Unterstützung der bisher ungestylten page/site-*-Layoutgeneration.
   09. Unterstützung für Musik-, Lehrer-, Personen- und Gymnasium-Sonderseiten.
   10. Gemeinsame Rück-, Kapitel- und Button-Navigation.
   11. Einheitlicher Footer für .footer und .site-footer.
   12. Mobile Anpassungen für Navigation, Hero, Text, Raster und Sonderseiten.

   Bestehende Regeln oberhalb dieses Blocks bleiben als Rückwärtskompatibilität
   erhalten. Bewusste Überschreibungen stehen gesammelt hier und vermeiden
   weitere !important-Regeln. Die vorhandene ältere !important-Regel für
   .story-header wird nur dort mit gleicher Spezifitätsart korrigiert, wo dies
   technisch notwendig ist.
   ========================================================================== */

/* 01 — Gemeinsame Designwerte */
:root {
  --lr-bg: #f7f2ea;
  --lr-surface: rgba(255, 250, 243, 0.82);
  --lr-surface-solid: #fffaf3;
  --lr-text: #25211d;
  --lr-heading: #2b2621;
  --lr-muted: #655d54;
  --lr-accent: #8a5d3b;
  --lr-line: rgba(70, 55, 35, 0.14);
  --lr-serif: "Crimson Text", Georgia, serif;
  --lr-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --lr-content: 820px;
  --lr-reading: 760px;
  --lr-wide: 1080px;
  --lr-page: 1180px;
  --lr-radius: 18px;
  --lr-shadow: 0 18px 45px rgba(45, 35, 20, 0.12);
  --lr-section-x: 8vw;
  --lr-nav-height: 64px;
}

/* 02 — Grundtypografie und robuste Medien */
body {
  font-family: var(--lr-sans);
  color: var(--lr-text);
  background: var(--lr-bg);
  line-height: 1.7;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--lr-serif);
  color: var(--lr-heading);
  text-wrap: balance;
}

a {
  text-underline-offset: 0.18em;
}

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

audio {
  max-width: 100%;
}

.content {
  width: min(100%, var(--lr-content));
}

/* 03 — Eine sichtbare, konsistente Hauptnavigation */
.topnav,
.page > header .header-inner {
  min-height: var(--lr-nav-height);
  padding: 1rem 5vw;
  background: rgba(24, 21, 18, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topnav {
  align-items: center;
}

.topnav a,
.page > header nav a {
  color: rgba(255, 250, 245, 0.94);
  font-family: var(--lr-sans);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  text-decoration: none;
}

.topnav a:hover,
.topnav a:focus-visible,
.page > header nav a:hover,
.page > header nav a:focus-visible {
  color: #fff;
  opacity: 1;
  text-decoration: underline;
}

.topnav a:focus-visible,
.page > header nav a:focus-visible,
.button:focus-visible,
.geschichte:focus-visible,
.story-card:focus-visible,
.story-link:focus-visible,
.story-category:focus-visible {
  outline: 3px solid rgba(255, 245, 220, 0.95);
  outline-offset: 4px;
}

/* Neuere Seiten besitzen statt .topnav einen eigenen Header. */
.page > header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.page > header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.page > header .site-title {
  flex: 0 1 auto;
}

.page > header .site-title h2,
.page > header .site-name {
  margin: 0;
  color: #fffaf3;
  font-family: var(--lr-sans);
}

.page > header .site-title h2 {
  font-size: 1rem;
  font-weight: 600;
}

.page > header .site-name {
  margin-top: 0.12rem;
  font-size: 0.82rem;
  opacity: 0.78;
}

.page > header nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
}

/* 04 — Gemeinsames Hero-System */
.story-header,
.seitenkopf,
.page main > .hero {
  position: relative;
  isolation: isolate;
  min-height: 58vh;
  padding: 6rem var(--lr-section-x) 4rem;
  display: flex;
  align-items: flex-end;
  background-color: #342d27;
  background-repeat: no-repeat;
  background-position: center;
}

/* Storybilder bleiben – wie in der Referenz – vollständig sichtbar. */
.story-header {
  background-size: contain !important;
  background-color: #2a241f;
}

/* Raum-, Index- und Berlin-Header füllen die Fläche. */
.seitenkopf {
  background-size: cover;
}

/* Alle Hero-Texte erhalten dieselbe Lesbarkeit und Typografie. */
.story-header .hero-overlay,
.seitenkopf .hero-overlay,
.page main > .hero > div {
  position: relative;
  z-index: 1;
  width: min(100%, 850px);
  color: #fffaf2;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.5);
}

.story-header h1,
.seitenkopf h1,
.page main > .hero h1 {
  margin: 0 0 0.8rem;
  color: #fffaf2;
  font-family: var(--lr-serif);
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  font-weight: 600;
  line-height: 1.02;
}

.story-header .hero-subtitle,
.seitenkopf .hero-subtitle,
.page main > .hero .hero-lead {
  max-width: 760px;
  margin: 0;
  color: #fffaf2;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  font-weight: 400;
  line-height: 1.45;
}

/* Seiten der neueren Generation haben kein Bildattribut: warmer, ruhiger Hero. */
.page main > .hero {
  min-height: 46vh;
  background:
    linear-gradient(135deg, rgba(35, 29, 24, 0.82), rgba(95, 68, 48, 0.68)),
    radial-gradient(circle at 80% 15%, #b28a66 0, #6e503b 38%, #302823 100%);
  background-size: cover;
}

.page main > .hero .eyebrow,
.eyebrow {
  margin: 0 0 0.8rem;
  color: rgba(255, 250, 242, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* Kompakte und bildbasierte Sonderheader bleiben als dokumentierte Varianten. */
.seitenkopf.jugend-header {
  min-height: 28vh;
}

.gymnasium-header {
  min-height: 340px;
  overflow: hidden;
  background: #342d27;
}

.gymnasium-header img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.gymnasium-header .hero-overlay {
  position: absolute;
  left: var(--lr-section-x);
  right: var(--lr-section-x);
  top: auto;
  bottom: 4rem;
  transform: none;
}

/* 05 — Bildhinweise, Figures und Bildunterschriften */
.bildhinweis {
  padding: 1rem var(--lr-section-x) 0;
  color: var(--lr-muted);
  text-align: center;
}

.bildhinweis p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

figure,
.story-image {
  width: min(100%, 980px);
  margin: 3rem auto;
}

.geschichte-text figure {
  max-width: 760px;
}

figure img,
.story-image img,
.post-image img {
  display: block;
  width: 100%;
  border-radius: var(--lr-radius);
  box-shadow: var(--lr-shadow);
}

figcaption,
.post-image figcaption {
  margin-top: 0.8rem;
  color: var(--lr-muted);
  font-family: var(--lr-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.story-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  width: min(100%, 980px);
  margin: 3rem auto;
}

.story-image-grid .story-image {
  margin: 0;
}

/* 06 — Storytext für alle drei vorhandenen Benennungen */
.geschichte-text,
main > .story,
.story-post,
.article {
  padding: 5.5rem var(--lr-section-x) 4rem;
}

.geschichte-text > .content,
main > .story,
.story-post,
.article {
  width: min(100%, var(--lr-reading));
  max-width: var(--lr-reading);
  margin-inline: auto;
}

.geschichte-text p,
main > .story p,
.story-post .post-text,
.story-post .post-text p,
.article p {
  font-family: var(--lr-serif);
  font-size: clamp(1.3rem, 2vw, 1.68rem);
  line-height: 1.72;
  text-align: left;
}

.geschichte-text p,
main > .story p,
.story-post .post-text p,
.article p {
  margin: 0 0 1.75rem;
}

.story-intro,
.post-date,
.kicker {
  margin: 0 0 2.5rem;
  color: #51473e;
  font-family: var(--lr-serif);
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  line-height: 1.45;
}

.story-post > h1,
.article > h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 1.05;
}

/* Verhindert doppeltes Außenpadding, wenn .story eine innere .content-Hülle hat. */
main > .story > .content {
  width: 100%;
  max-width: none;
}

/* 07 — Index-, Kachel- und Weiterlesevarianten */
.raumintro,
.kapitel-intro {
  padding-inline: var(--lr-section-x);
}

.raumintro > .content,
.kapitel-intro > .content {
  width: min(100%, var(--lr-wide));
  max-width: var(--lr-wide);
}

.kapitel-intro h2,
.raumintro h2,
.story-section-header h2 {
  font-size: clamp(2.25rem, 4.5vw, 3.7rem);
  line-height: 1.08;
}

.geschichtenliste,
.story-list,
.story-grid,
.teacher-grid {
  width: min(calc(100% - 2 * var(--lr-section-x)), var(--lr-wide));
  max-width: var(--lr-wide);
  margin-inline: auto;
}

.geschichtenliste {
  padding-inline: 0;
}

.geschichte,
.story-card,
.story-link,
.story-category,
.teacher-card {
  position: relative;
  display: block;
  padding: 1.8rem;
  overflow: hidden;
  color: var(--lr-heading);
  background: var(--lr-surface);
  border: 1px solid var(--lr-line);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(45, 35, 20, 0.07);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.geschichte:hover,
.story-card:hover,
.story-link:hover,
.story-category:hover,
.teacher-card:hover {
  z-index: 1;
  background: var(--lr-surface-solid);
  box-shadow: var(--lr-shadow);
  transform: translateY(-3px);
}

.geschichte h2,
.story-card span,
.story-link span,
.story-category h2,
.teacher-card h2,
.teacher-card h3 {
  margin: 0;
  font-family: var(--lr-serif);
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.15;
}

.geschichte p,
.story-category p,
.teacher-card p {
  color: var(--lr-muted);
}

.weiterlesen,
.story-section {
  padding: 2rem var(--lr-section-x) 7rem;
}

.weiterlesen > .content,
.story-section > * {
  width: min(100%, var(--lr-content));
  max-width: var(--lr-content);
  margin-inline: auto;
}

.weiter-grid,
.story-list {
  display: grid;
  gap: 1rem;
}

.story-list {
  width: min(100%, var(--lr-content));
}

.weiter-grid a {
  border: 1px solid var(--lr-line);
  box-shadow: 0 8px 22px rgba(45, 35, 20, 0.06);
}

/* 08 — Vollständige Unterstützung der page/site-*-Generation */
.page {
  min-height: 100vh;
  background: var(--lr-bg);
}

.page main {
  width: 100%;
}

.story-section {
  width: 100%;
}

.story-section-header {
  margin-bottom: 2rem;
}

.story-section-header h2 {
  margin: 0;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 5rem 0 7rem;
}

.story-category-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.story-category-arrow {
  color: var(--lr-accent);
  font-size: 1.5rem;
}

.story-post {
  background: transparent;
}

.post-image {
  margin: 2.5rem 0;
}

/* 09 — Musik-, Lehrer-, Personen- und weitere Sondermodule */
.songs-grid {
  width: min(calc(100% - 2 * var(--lr-section-x)), var(--lr-wide));
  max-width: var(--lr-wide);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.song-card {
  border: 1px solid var(--lr-line);
}

.song-card h3 {
  font-family: var(--lr-serif);
  font-size: 1.35rem;
}

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 0 0 7rem;
}

.personenblock,
.haltungen,
.orientierung,
.kollegium-intro,
.klassenfoto-tabelle {
  width: min(100%, var(--lr-wide));
  margin-inline: auto;
}

.textbild {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.65fr);
  align-items: start;
  gap: 2rem;
}

.lebensmotto,
.blogmotto {
  max-width: var(--lr-content);
}

/* Ergänzung 09a — seltene, aber vorhandene Sonderklassen vollständig abdecken. */
.geschichten {
  padding: 1rem var(--lr-section-x) 7rem;
}

.geschichten > .content {
  width: min(100%, var(--lr-wide));
  max-width: var(--lr-wide);
}

.geschichten .geschichtenliste {
  width: 100%;
  max-width: none;
  padding-bottom: 0;
}

.section-intro {
  max-width: var(--lr-content);
  margin: 0 0 2rem;
  color: var(--lr-muted);
  font-size: 1.08rem;
}

.person {
  margin: 0 0 3rem;
  padding: 0 0 2rem;
  border-bottom: 1px solid var(--lr-line);
}

.person h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
}

.kollegium-header {
  background-color: #342d27;
}

.kollegium-foto {
  max-width: var(--lr-wide);
}

.foto-marker-wrap {
  position: relative;
  width: 100%;
}

.foto-marker-wrap > img {
  display: block;
  width: 100%;
}

.foto-marker {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 1.75rem;
  min-height: 1.75rem;
  padding: 0.2rem 0.35rem;
  color: #fff;
  background: rgba(35, 29, 24, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.klassenfoto-tabelle {
  width: 100%;
  margin-bottom: 2.5rem;
  border-collapse: collapse;
  background: var(--lr-surface);
}

.klassenfoto-tabelle th,
.klassenfoto-tabelle td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--lr-line);
  text-align: left;
}

.klassenfoto-tabelle .nummer {
  width: 6rem;
  color: var(--lr-accent);
  font-weight: 700;
}

/* 10 — Eine gemeinsame Rück-, Kapitel- und Buttondarstellung */
.story-back,
.back-link,
.kapitelnavigation,
.chapter-nav {
  width: min(100%, var(--lr-content));
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--lr-line);
}

.story-back a,
.back-link,
.back-link a,
.kapitelnavigation a,
.chapter-nav a {
  color: var(--lr-accent);
  font-weight: 600;
  text-decoration: none;
}

.story-back a:hover,
.back-link:hover,
.back-link a:hover,
.kapitelnavigation a:hover,
.chapter-nav a:hover {
  text-decoration: underline;
}

.button {
  padding: 0.85rem 1.2rem;
  color: #fffaf3;
  background: var(--lr-accent);
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.page main > .button {
  margin: 0 var(--lr-section-x) 5rem;
}

.button:hover {
  background: #70472d;
}

/* 11 — Gemeinsamer Footer */
.footer,
.site-footer {
  padding: 2rem var(--lr-section-x);
  color: #7a7066;
  background: transparent;
  border-top: 1px solid var(--lr-line);
  font-family: var(--lr-sans);
  font-size: 0.9rem;
  text-align: center;
}

.footer p,
.site-footer p {
  margin: 0;
}

/* 12 — Mobile Regeln für alle Layoutfamilien */
@media (max-width: 900px) {
  :root {
    --lr-section-x: 6vw;
  }

  .page > header .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .page > header nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .story-grid,
  .teacher-grid,
  .geschichtenliste.lehrergrid {
    grid-template-columns: 1fr;
  }

  .textbild {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  :root {
    --lr-section-x: 5.5vw;
    --lr-nav-height: 56px;
  }

  .topnav {
    min-height: var(--lr-nav-height);
    padding: 0.9rem var(--lr-section-x);
  }

  .story-header,
  .seitenkopf,
  .page main > .hero {
    min-height: 48vh;
    padding: 5.5rem var(--lr-section-x) 2.5rem;
  }

  .story-header {
    min-height: 44vh;
  }

  .seitenkopf.jugend-header {
    min-height: 26vh;
  }

  .geschichte-text,
  main > .story,
  .story-post,
  .article {
    padding: 3.5rem var(--lr-section-x) 2.5rem;
  }

  .raumintro,
  .kapitel-intro {
    padding-top: 3.5rem;
    padding-bottom: 2.5rem;
  }

  .weiterlesen,
  .story-section {
    padding: 1rem var(--lr-section-x) 4rem;
  }

  .story-image-grid,
  .story-grid,
  .songs-grid {
    grid-template-columns: 1fr;
  }

  figure,
  .story-image,
  .story-image-grid {
    margin-block: 2rem;
  }

  .gymnasium-header,
  .gymnasium-header img {
    min-height: 280px;
    height: 280px;
  }

  .gymnasium-header .hero-overlay {
    left: var(--lr-section-x);
    right: var(--lr-section-x);
    top: auto;
    bottom: 2.5rem;
    transform: none;
  }

  .geschichte,
  .story-card,
  .story-link,
  .story-category,
  .teacher-card {
    padding: 1.35rem;
  }
}

@media (max-width: 430px) {
  .story-header,
  .seitenkopf,
  .page main > .hero {
    min-height: 42vh;
  }

  .story-header h1,
  .seitenkopf h1,
  .page main > .hero h1 {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
  }

  .geschichte-text p,
  main > .story p,
  .story-post .post-text,
  .story-post .post-text p,
  .article p {
    font-size: 1.25rem;
    line-height: 1.68;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Startseite: kompaktere Typografie unterhalb des unveränderten Heros */
body:has(.lebensraeume) .schlussgedanke {
  padding: 2.5rem 8vw 3rem;
}

body:has(.lebensraeume) .schlussgedanke p {
  font-size: clamp(1.35rem, 1.8vw, 1.65rem);
  line-height: 1.5;
  max-width: 760px;
}

body:has(.lebensraeume) .prolog {
  padding: 3.5rem 8vw 2rem;
}

body:has(.lebensraeume) .prolog .content {
  max-width: 760px;
}

body:has(.lebensraeume) .prolog p {
  font-size: clamp(1.2rem, 1.5vw, 1.4rem);
  line-height: 1.65;
  margin-bottom: 1.35rem;
}

body:has(.lebensraeume) .prolog .abschlusssatz {
  font-size: clamp(1.5rem, 2vw, 1.9rem) !important;
  line-height: 1.4 !important;
  margin-top: 2rem !important;
}

body:has(.lebensraeume) .kapitel-intro {
  padding-top: 2.5rem;
}

@media (max-width: 700px) {
  body:has(.lebensraeume) .schlussgedanke {
    padding: 2rem 5.5vw 2.5rem;
  }

  body:has(.lebensraeume) .prolog {
    padding: 2.5rem 5.5vw 2rem;
  }
}
