/* ==========================================================================
   www.vera-maienschein.de — Buchgetreues Dissertations-Stylesheet (1999)
   Originalvorlage: Dr. Vera Maienschein, J. W. Goethe-Universität Frankfurt
   Zero External Fonts | Statisches CSS3 | Desktop, Tablet, Smartphone, Print
   ========================================================================== */

:root {
  /* Buchpapier & Drucktinte */
  --desk-bg: #f1efe9;
  --paper-bg: #ffffff;
  --paper-edge: #dcd9d0;
  --ink: #161614;
  --ink-soft: #4e4b45;
  --ink-muted: #78746b;
  --rule: #1a1a18;
  --rule-light: #d7d4cb;
  --accent-subtle: #3d3a34;
  --highlight-bg: #f7f6f2;

  /* Originaltypografie (Times New Roman, 0 externe Font-Server) */
  --font-book: "Times New Roman", Times, "Liberation Serif", "Nimbus Roman", Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Satzspiegel-Proportionen (DIN-A4-Buchseite, ca. 65-72 Zeichen/Zeile) */
  --page-max: 790px;
  --page-pad-top: 3.1rem;
  --page-pad-x: 4.5rem;
  --page-pad-bottom: 3.8rem;
  --book-size: 1.125rem;      /* ~18px am Bildschirm ≈ 12pt Buchdruck */
  --book-leading: 1.68;       /* großzügiger 1,5-facher Satzabstand wie im Original */
  --para-gap: 1.18rem;
}

/* Reset & Basis */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  background-color: var(--desk-bg);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-book);
  font-size: var(--book-size);
  line-height: var(--book-leading);
  color: var(--ink);
  background-color: var(--desk-bg);
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Barrierefreier Skip-Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  z-index: 2000;
}

.skip-link:focus {
  left: 1rem;
  top: 0.75rem;
}

/* ==========================================================================
   Unaufdringliche Buch-Kopfzeile (Reader-Chrome außerhalb der Buchseite)
   ========================================================================== */
.reader-bar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(241, 239, 233, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--paper-edge);
  font-family: var(--font-book);
}

.reader-bar-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.reader-brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-brand:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reader-brand-year {
  color: var(--ink-muted);
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.reader-link,
.reader-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-book);
  font-size: 0.92rem;
  line-height: 1.2;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 0.32rem 0.62rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.reader-link:hover,
.reader-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--paper-edge);
}

.reader-btn-toc {
  border-color: var(--paper-edge);
  background: rgba(255, 255, 255, 0.65);
}

.reader-link[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Buch-Container & Gedruckte Buchseite (.book-page)
   ========================================================================== */
.book-stage {
  max-width: var(--page-max);
  margin: 1.85rem auto 2.5rem;
  padding: 0 0.75rem;
}

.book-page {
  background: var(--paper-bg);
  border: 1px solid var(--paper-edge);
  box-shadow: 0 2px 10px rgba(22, 22, 20, 0.045);
  padding: var(--page-pad-top) var(--page-pad-x) var(--page-pad-bottom);
  position: relative;
  overflow-x: hidden;
}

.book-page + .book-page {
  margin-top: 2rem;
}

/* Feste Seitenproportion für Titelei-Blätter (wie DIN-A4-Druckseite) */
.book-page--sheet {
  min-height: 760px;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Originalgetreue Buch-Kopfzeile (Kapitälchen + Originalseite + Trennlinie)
   ========================================================================== */
.running-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.32rem;
  margin-bottom: 2.1rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.94rem;
  line-height: 1.25;
  color: var(--ink);
}

.running-head-title {
  font-variant: small-caps;
  letter-spacing: 0.03em;
}

.running-head-page {
  font-variant-numeric: lining-nums;
  padding-right: 0.6rem;
  white-space: nowrap;
}

/* Dezente Originalseiten-Referenz innerhalb von Fließtext-Kapiteln */
.orig-page-break {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 2rem 0 1.35rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
  line-height: 1;
  user-select: none;
}

.orig-page-break::before,
.orig-page-break::after {
  content: "";
  flex: 1;
  border-top: 1px solid #e6e4dc;
}

.orig-page-break span {
  font-variant: small-caps;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Inline-Seitenwechsel-Marke bei Seitenumbruch mitten im Satz */
.orig-pg-inline {
  display: inline-block;
  margin: 0 0.28em;
  padding: 0 0.28em;
  font-size: 0.68em;
  line-height: 1.35;
  color: var(--ink-muted);
  border: 1px solid #e2dfd6;
  border-radius: 2px;
  vertical-align: 0.14em;
  font-style: normal;
  font-weight: 400;
  text-decoration: none;
  user-select: none;
}

/* ==========================================================================
   Originalgetreues Titelblatt (index.html, Dr 001.pdf Seite 1)
   ========================================================================== */
.titlepage-sheet {
  text-align: center;
  justify-content: space-between;
  padding-top: 4.2rem;
  padding-bottom: 4.2rem;
}

.titlepage-main-title {
  margin: 0 auto 3.6rem;
  max-width: 19.5em;
  font-family: var(--font-book);
  font-size: clamp(1.65rem, 3.2vw, 2.12rem);
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: -0.005em;
  color: var(--ink);
  hyphens: none;
}

.titlepage-block {
  margin: 0 auto 2.8rem;
  font-size: 1.2rem;
  line-height: 1.48;
}

.titlepage-author {
  margin: 0 auto 3.4rem;
  font-size: 1.2rem;
  line-height: 1.5;
}

.titlepage-author strong {
  display: block;
  font-size: 1.34rem;
  font-weight: 700;
  margin: 0.12rem 0;
}

.titlepage-place {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.4;
}

/* Ruhige Buch-Begleitkarte unter dem Titelblatt (Einstieg & Zitierhinweis) */
.book-companion {
  margin-top: 1.75rem;
  background: var(--paper-bg);
  border: 1px solid var(--paper-edge);
  padding: 1.85rem var(--page-pad-x);
}

.companion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.6rem;
}

.companion-action {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--paper-edge);
  background: var(--highlight-bg);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.companion-action:hover {
  border-color: var(--ink);
  background: #ffffff;
}

.companion-action-kicker {
  display: block;
  font-size: 0.78rem;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 0.2rem;
}

.companion-action-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.companion-action-meta {
  display: block;
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-top: 0.22rem;
}

.citation-box {
  border-top: 1px solid var(--rule-light);
  padding-top: 1.25rem;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.citation-box h2 {
  margin: 0 0 0.45rem;
  font-size: 0.94rem;
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.citation-box p {
  margin: 0 0 0.55rem;
  text-align: left;
}

.citation-box p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Vorspann-Blätter (Gutachter/Disputation, Widmung, Danksagung)
   ========================================================================== */
.disputation-sheet {
  justify-content: flex-end;
  padding-bottom: 5.5rem;
}

.disputation-block {
  font-size: 1.12rem;
  line-height: 1.6;
}

.disputation-lead {
  margin: 0 0 2.5rem;
}

.disputation-table {
  border-collapse: collapse;
  margin: 0 0 2.8rem;
}

.disputation-table th,
.disputation-table td {
  text-align: left;
  vertical-align: top;
  font-weight: 400;
  padding: 0.18rem 0;
}

.disputation-table th {
  width: 9.5rem;
  padding-right: 1.2rem;
}

.disputation-date {
  margin: 0;
}

.dedication-sheet {
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 620px;
}

.dedication-text {
  margin: -3rem 0 0;
  font-style: italic;
  font-size: 1.22rem;
  line-height: 1.75;
}

/* ==========================================================================
   Buch-Fließtext, Überschriften, Absätze & Silbentrennung
   ========================================================================== */
.book-content h1 {
  margin: 0 0 1.85rem;
  font-family: var(--font-book);
  font-size: 1.38rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  color: var(--ink);
}

.book-content h2 {
  margin: 2.35rem 0 1.15rem;
  font-family: var(--font-book);
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.38;
  text-align: left;
  color: var(--ink);
  scroll-margin-top: 4.5rem;
}

.book-content h1 + h2 {
  margin-top: 1.5rem;
}

.book-content h3 {
  margin: 2rem 0 0.95rem;
  font-family: var(--font-book);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.38;
  text-align: left;
  color: var(--ink);
  scroll-margin-top: 4.5rem;
}

.book-content p {
  margin: 0 0 var(--para-gap);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 6 3 2;
  overflow-wrap: break-word;
}

.book-content p:last-child {
  margin-bottom: 0;
}

.book-content a:not(.toc-link) {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--paper-edge);
  transition: text-decoration-color 0.15s ease;
}

.book-content a:not(.toc-link):hover,
.book-content a:not(.toc-link):focus-visible {
  text-decoration-color: var(--ink);
}

.book-content u {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.book-content sup,
.book-content sub {
  font-size: 0.74em;
  line-height: 0;
}

/* Nummerierte Thesen-Blöcke in 1.7 Fragestellung (exakt mit hängendem Einzug) */
.thesis-item {
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  gap: 0.25rem;
  margin: 1.35rem 0 1.4rem;
}

.thesis-item-num {
  font-weight: 700;
}

.thesis-item-body p {
  font-weight: 700;
  margin: 0 0 0.55rem;
}

.thesis-item-body p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Originalgetreue Buch-Abbildungen (2-spaltig wie S. 3 & S. 10)
   ========================================================================== */
.book-figure {
  margin: 2rem 0 2.1rem;
  break-inside: avoid;
}

.book-figure-header {
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.book-figure-num {
  display: block;
  font-weight: 700;
  font-size: 1.04rem;
}

.book-figure-title {
  display: inline-block;
  font-size: 1.04rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.book-figure-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: stretch;
}

.book-figure-frame {
  border: 1px solid var(--rule);
  background: #ffffff;
  padding: 0.45rem;
  cursor: zoom-in;
  align-self: start;
  transition: box-shadow 0.15s ease;
}

.book-figure-frame:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.book-figure-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.book-figure-caption {
  display: flex;
  flex-direction: column;
  font-size: 0.96rem;
  line-height: 1.46;
}

.book-figure-caption p {
  margin: 0 0 0.6rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.book-figure-source {
  margin-top: auto !important;
  padding-top: 0.85rem;
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.42;
  text-align: left !important;
  hyphens: none !important;
}

.book-figure-zoom-hint {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-style: normal;
}

/* Vollbreite Abbildungen (Diagramme 3.1-3.3, Schemata 2.3/2.3.1.3/2.12.2/4.1) */
.book-figure--wide .book-figure-frame {
  margin-bottom: 0.85rem;
}

.book-figure--wide .book-figure-caption {
  display: block;
  border: 1px solid var(--rule-light);
  background: var(--highlight-bg);
  padding: 0.9rem 1.15rem;
  font-size: 0.95rem;
  line-height: 1.48;
}

.book-figure--wide .book-figure-caption ul {
  margin: 0.45rem 0 0;
  padding-left: 1.2rem;
}

.book-figure--wide .book-figure-caption li {
  margin: 0.16rem 0;
  text-align: left;
}

/* Ganzseitige Abbildungstafeln I–XXII (Mikroskopie / Immunfluoreszenz / EM) */
.book-plate {
  margin: 2.2rem 0 2.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule-light);
  break-inside: avoid;
}

.book-plate-frame {
  border: 1px solid var(--rule);
  background: #ffffff;
  padding: 0.35rem;
  cursor: zoom-in;
  transition: box-shadow 0.15s ease;
}

.book-plate-frame:hover {
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
}

.book-plate-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.book-plate-caption {
  margin-top: 0.85rem;
  font-size: 0.94rem;
  line-height: 1.48;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.book-plate-num {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
}

.book-plate-title {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  text-align: left;
}

.book-plate-caption p {
  margin: 0 0 0.45rem;
  font-size: 0.93rem;
  line-height: 1.46;
}

/* Listen & Unterkapitel-H4/H5 im Fließtext */
.book-content h4 {
  margin: 1.55rem 0 0.7rem;
  font-family: var(--font-book);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.38;
  text-align: left;
  color: var(--ink);
  scroll-margin-top: 4.5rem;
}

.book-content h5 {
  margin: 1.15rem 0 0.45rem;
  font-family: var(--font-book);
  font-size: 1rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.38;
  text-align: left;
  color: var(--ink);
  scroll-margin-top: 4.5rem;
}

.anchor-target {
  display: block;
  height: 0;
  scroll-margin-top: 4.5rem;
}

.book-content ul,
.book-content ol {
  margin: 0 0 var(--para-gap);
  padding-left: 1.65rem;
}

.book-content li {
  margin: 0.28rem 0;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.book-content h1,
.book-content h2,
.book-content h3,
.book-content h4,
.book-content h5 {
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Buchgetreue wissenschaftliche Tabellen (Tabellen 1-4, Puffer- & Gel-Tabellen) */
.book-table-wrap {
  margin: 1.35rem 0 1.6rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.book-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.42;
  font-variant-numeric: tabular-nums;
}

.book-table th,
.book-table td {
  padding: 0.42rem 0.65rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e2dfd7;
}

.book-table thead th {
  font-weight: 700;
  border-top: 1.5px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--highlight-bg);
}

.book-table tbody tr:last-child td {
  border-bottom: 1.5px solid var(--rule);
}

/* Literaturverzeichnis & Liste der Veröffentlichungen (hängender Buch-Einzug) */
.bib-list {
  margin: 0;
  padding: 0;
}

.bib-entry {
  margin: 0 0 1rem !important;
  padding-left: 2.1rem;
  text-indent: -2.1rem;
  text-align: left !important;
  hyphens: none !important;
  font-size: 1rem;
  line-height: 1.48;
  overflow-wrap: break-word;
}

.bib-section-label {
  margin: 1.8rem 0 0.75rem !important;
  font-style: normal;
  font-weight: 700;
  text-align: left !important;
}

/* Lebenslauf (tabellarische Buchseite S. 156) */
.cv-heading {
  text-align: center !important;
  font-size: 1.42rem !important;
  margin: 0 0 2.2rem !important;
}

.cv-group-title {
  margin: 1.6rem 0 0.65rem !important;
  font-size: 1.08rem !important;
  font-weight: 700;
}

.cv-grid {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0.45rem 1.4rem;
  margin: 0 0 1.25rem;
  font-size: 1.04rem;
  line-height: 1.52;
}

.cv-grid dt {
  margin: 0;
  font-weight: 400;
}

.cv-grid dd {
  margin: 0;
}

.cv-signature {
  margin-top: 3.2rem;
  display: flex;
  justify-content: flex-end;
}

.cv-signature-box {
  width: 14rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.35rem;
  text-align: center;
  font-style: italic;
  font-size: 1.02rem;
}

/* ==========================================================================
   Originalgetreues Inhaltsverzeichnis (I–V mit Führungspunkten)
   ========================================================================== */
.toc-heading-center {
  text-align: center !important;
  font-size: 1.32rem !important;
  margin: 0 0 2.1rem !important;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-row {
  display: grid;
  grid-template-columns: 4.3rem minmax(0, 1fr);
  align-items: start;
  margin: 0.18rem 0;
  line-height: 1.42;
  font-size: 1.03rem;
}

.toc-row--space {
  margin-top: 1.05rem;
}

.toc-row--bold .toc-link,
.toc-row--bold .toc-num,
.toc-row--bold .toc-pg {
  font-weight: 700;
}

.toc-num {
  padding-right: 0.5rem;
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}

.toc-entry {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  min-width: 0;
}

.toc-link {
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.toc-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toc-dots {
  flex: 1 0 1.2rem;
  border-bottom: 1.5px dotted #6c6960;
  margin-bottom: 0.28em;
  min-width: 0.8rem;
}

.toc-pg {
  flex-shrink: 0;
  text-align: right;
  min-width: 2.2rem;
  font-variant-numeric: lining-nums;
  padding-left: 0.35rem;
}

.toc-status-note {
  margin: 0 0 1.5rem;
  padding: 0.7rem 0.95rem;
  background: var(--highlight-bg);
  border-left: 2px solid var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.48;
  color: var(--ink-soft);
  text-align: left !important;
}

/* ==========================================================================
   Originalgetreues Abkürzungsverzeichnis (VI, 2 Spalten wie Original)
   ========================================================================== */
.abbr-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.4rem;
  align-items: start;
}

.abbr-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.28rem 0.7rem;
  font-size: 0.98rem;
  line-height: 1.38;
}

.abbr-list dt {
  font-weight: 700;
  margin: 0;
}

.abbr-list dd {
  margin: 0;
}

/* ==========================================================================
   Vorbereitete Kapitel-Strukturseiten (Kapitel 2–6 & Anhang)
   ========================================================================== */
.planned-banner {
  margin: 0 0 1.8rem;
  padding: 0.9rem 1.1rem;
  background: var(--highlight-bg);
  border: 1px solid var(--rule-light);
  border-left: 3px solid var(--ink);
  font-size: 0.96rem;
  line-height: 1.52;
  color: var(--ink-soft);
}

.planned-banner strong {
  color: var(--ink);
}

.planned-outline-title {
  font-size: 1rem !important;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--rule-light);
  padding-bottom: 0.35rem;
  margin: 1.8rem 0 1rem !important;
}

.planned-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.planned-item {
  display: grid;
  grid-template-columns: 4.3rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  padding: 0.32rem 0;
  border-bottom: 1px dotted #e2dfd7;
  font-size: 1rem;
  line-height: 1.42;
  scroll-margin-top: 4.8rem;
}

.planned-item > span:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.planned-item--bold {
  font-weight: 700;
  margin-top: 0.55rem;
}

.planned-item-pg {
  color: var(--ink-muted);
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}

/* ==========================================================================
   Dezenter Original-Scan-Verweis (Faksimile-PDF pro Abschnitt, nur Bildschirm)
   ========================================================================== */
.book-scan-bar {
  max-width: var(--page-max);
  margin: 1.15rem auto 0;
  padding: 0 0.75rem;
}

.book-scan-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  padding: 0.62rem 1rem;
  background: var(--paper-bg);
  border: 1px solid var(--paper-edge);
  font-family: var(--font-book);
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-muted);
}

.book-scan-label {
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.book-scan-link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--paper-edge);
  font-weight: 700;
  white-space: nowrap;
  transition: text-decoration-color 0.15s ease;
}

.book-scan-link:hover,
.book-scan-link:focus-visible {
  text-decoration-color: var(--ink);
}

/* ==========================================================================
   Buch-Blätternavigation & Fußzeile außerhalb des Satzspiegels
   ========================================================================== */
.book-pager {
  max-width: var(--page-max);
  margin: 1.45rem auto 0;
  padding: 0 0.75rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.pager-link {
  display: inline-flex;
  flex-direction: column;
  padding: 0.65rem 0.9rem;
  background: var(--paper-bg);
  border: 1px solid var(--paper-edge);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.3;
  transition: border-color 0.15s ease;
}

.pager-link:hover {
  border-color: var(--ink);
}

.pager-link--prev {
  justify-self: start;
  text-align: left;
}

.pager-link--center {
  justify-self: center;
  text-align: center;
  padding: 0.65rem 1rem;
}

.pager-link--next {
  justify-self: end;
  text-align: right;
}

.pager-kicker {
  font-size: 0.74rem;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.pager-title {
  font-weight: 700;
}

.book-footer {
  max-width: var(--page-max);
  margin: 2.2rem auto 2.8rem;
  padding: 1rem 0.75rem 0;
  border-top: 1px solid var(--paper-edge);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.25rem;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.book-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.book-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.book-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
}

/* ==========================================================================
   Ausklappbares Inhaltsverzeichnis (Buch-Drawer, unaufdringlich)
   ========================================================================== */
.toc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 22, 20, 0.34);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toc-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.toc-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(360px, 90vw);
  background: var(--paper-bg);
  border-right: 1px solid var(--paper-edge);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 1200;
  transform: translateX(-102%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}

.toc-drawer.is-open {
  transform: translateX(0);
}

.toc-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.toc-drawer-title {
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: 1rem;
  font-weight: 700;
}

.toc-drawer-close {
  background: transparent;
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  font-family: var(--font-book);
  font-size: 0.9rem;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  color: var(--ink);
}

.toc-drawer-close:hover {
  border-color: var(--ink);
}

.toc-drawer-body {
  overflow-y: auto;
  padding: 1rem 1.25rem 2rem;
  font-size: 0.96rem;
  line-height: 1.45;
}

.drawer-group-label {
  margin: 1.1rem 0 0.35rem;
  font-size: 0.78rem;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.drawer-group-label:first-child {
  margin-top: 0;
}

.drawer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.drawer-nav li {
  margin: 0.12rem 0;
}

.drawer-nav a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.32rem 0.45rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: 2px;
}

.drawer-nav a:hover {
  background: var(--highlight-bg);
}

.drawer-nav a[aria-current="page"] {
  background: var(--highlight-bg);
  font-weight: 700;
  border-left: 2px solid var(--ink);
}

.drawer-pg {
  color: var(--ink-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.drawer-subnav {
  list-style: none;
  margin: 0.15rem 0 0.45rem 1.05rem;
  padding: 0 0 0 0.65rem;
  border-left: 1px solid var(--rule-light);
}

.drawer-subnav a {
  font-size: 0.89rem;
  padding: 0.22rem 0.35rem;
  color: var(--ink-soft);
}

.drawer-badge-planned {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--ink-muted);
}

/* ==========================================================================
   Schlichte Abbildungs-Lightbox (Zero Dependencies)
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(22, 22, 20, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-dialog {
  background: #ffffff;
  border: 1px solid var(--rule);
  max-width: min(880px, 95vw);
  max-height: 92vh;
  overflow: auto;
  padding: 1.4rem 1.6rem;
  position: relative;
}

.lightbox-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule-light);
  padding-bottom: 0.65rem;
}

.lightbox-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.lightbox-close {
  background: transparent;
  border: 1px solid var(--paper-edge);
  padding: 0.2rem 0.6rem;
  font-family: var(--font-book);
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--ink);
}

.lightbox-close:hover {
  border-color: var(--ink);
}

.lightbox-img-wrap {
  border: 1px solid var(--rule);
  padding: 0.65rem;
  background: #ffffff;
  text-align: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  display: inline-block;
}

.lightbox-caption {
  margin: 0.9rem 0 0;
  font-size: 0.94rem;
  line-height: 1.48;
  color: var(--ink-soft);
}

/* ==========================================================================
   Responsive Anpassung (Tablet & Smartphone)
   ========================================================================== */
@media (max-width: 820px) {
  :root {
    --page-pad-top: 2.2rem;
    --page-pad-x: 2.4rem;
    --page-pad-bottom: 2.8rem;
    --book-size: 1.0625rem;
  }

  .book-page--sheet {
    min-height: 680px;
  }

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

  .abbr-columns {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
}

@media (max-width: 620px) {
  :root {
    --page-pad-top: 1.65rem;
    --page-pad-x: 1.25rem;
    --page-pad-bottom: 2.2rem;
    --book-size: 1.03rem;
    --book-leading: 1.62;
  }

  .reader-bar-inner {
    padding: 0.45rem 0.75rem;
  }

  .reader-brand {
    font-size: 0.88rem;
  }

  .reader-link-hide-sm {
    display: none;
  }

  .book-stage {
    margin: 0.75rem auto 1.6rem;
    padding: 0 0.35rem;
  }

  .book-page--sheet {
    min-height: auto;
    padding-top: 2.4rem;
    padding-bottom: 2.4rem;
  }

  .titlepage-main-title {
    margin-bottom: 2.1rem;
  }

  .titlepage-block,
  .titlepage-author {
    margin-bottom: 1.8rem;
    font-size: 1.06rem;
  }

  .book-companion {
    padding: 1.25rem 1.1rem;
  }

  .book-figure-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .toc-row {
    grid-template-columns: 3.3rem minmax(0, 1fr);
    font-size: 0.96rem;
  }

  .planned-item {
    grid-template-columns: 3.3rem minmax(0, 1fr) auto;
    font-size: 0.95rem;
  }

  .abbr-list {
    grid-template-columns: 4.8rem 1fr;
    font-size: 0.94rem;
  }

  .cv-grid {
    grid-template-columns: 1fr;
    gap: 0.12rem 0;
  }

  .cv-grid dt {
    font-weight: 700;
    margin-top: 0.6rem;
  }

  .bib-entry {
    padding-left: 1.25rem;
    text-indent: -1.25rem;
    font-size: 0.94rem;
  }

  .book-table {
    font-size: 0.8rem;
    line-height: 1.34;
  }

  .book-table th,
  .book-table td {
    padding: 0.32rem 0.34rem;
    overflow-wrap: break-word;
  }

  .disputation-table th {
    width: 6.4rem;
  }

  .book-scan-bar {
    padding: 0 0.35rem;
  }

  .book-scan-card {
    padding: 0.56rem 0.78rem;
    font-size: 0.87rem;
  }

  .book-scan-link {
    white-space: normal;
  }

  .book-pager {
    grid-template-columns: 1fr 1fr;
    padding: 0 0.35rem;
  }

  .pager-link--center {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
  }

  .pager-link {
    width: 100%;
    padding: 0.55rem 0.7rem;
    font-size: 0.88rem;
  }

  .book-footer {
    padding: 0.85rem 0.5rem 0;
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   Druckausgabe (@media print) — 100 % sauberes Buchdruck-Blatt
   ========================================================================== */
@media print {
  html,
  body {
    background: #ffffff !important;
    font-size: 11.5pt;
  }

  .reader-bar,
  .book-scan-bar,
  .book-pager,
  .book-footer,
  .toc-drawer,
  .toc-backdrop,
  .lightbox,
  .book-companion,
  .book-figure-zoom-hint,
  .toc-status-note {
    display: none !important;
  }

  .book-stage {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .book-page {
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: auto;
    page-break-after: always;
  }
}
