@import url("/static/schriften/schriften.css");

/* ---------------------------------------------------------------- Grundwerte */
:root {
  --papier:      #f7f3ea;
  --flaeche:     #fffdf8;
  --flaeche-tief:#f1ebdd;
  --tinte:       #221e17;
  --tinte-weich: #4a4239;
  --gedaempft:   #756b5d;
  --linie:       #e0d8c6;
  --linie-stark: #c9bda3;
  --akzent:      #8a5320;
  --akzent-hell: #b5813f;
  --akzent-flach:#f0e4d0;
  --gold:        #b08c4a;
  --schatten:    0 1px 2px rgba(60,45,20,.06), 0 6px 18px rgba(60,45,20,.06);
  --schatten-tief: 0 2px 6px rgba(60,45,20,.10), 0 16px 40px rgba(60,45,20,.12);
  --rund:        10px;
  --bahn:        1180px;
  --schrift:     "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --ui:          system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier:      #14120e;
    --flaeche:     #1c1915;
    --flaeche-tief:#221e19;
    --tinte:       #ece5d7;
    --tinte-weich: #cdc4b4;
    --gedaempft:   #9d9283;
    --linie:       #342e25;
    --linie-stark: #4a4133;
    --akzent:      #dda86a;
    --akzent-hell: #e8bd88;
    --akzent-flach:#2c2419;
    --gold:        #c9a05c;
    --schatten:    0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.3);
    --schatten-tief: 0 2px 6px rgba(0,0,0,.5), 0 16px 40px rgba(0,0,0,.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: 18px;
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
}

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

a { color: var(--akzent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--tinte); }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); }
h3 { font-size: 1.2rem; }

.bahn { width: min(100% - 2.5rem, var(--bahn)); margin-inline: auto; }
.abschnitt { padding-block: clamp(1.75rem, 4vw, 3.25rem); }
.versteckt {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.sprung {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--flaeche); padding: .6rem 1rem; border: 1px solid var(--linie-stark);
}
.sprung:focus { left: .5rem; top: .5rem; }

/* ---------------------------------------------------------------- Kopfleiste */
.kopfleiste {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--flaeche) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--linie);
}
.kopfbahn { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; flex-wrap: wrap; }

.wortmarke { display: block; text-decoration: none; color: inherit; margin-right: auto; padding: .4rem 0; }
.wortmarke-name {
  display: block; font-size: 1.32rem; font-weight: 600;
  letter-spacing: .06em; color: var(--tinte);
}
.wortmarke-zusatz {
  display: block; font-family: var(--ui); font-size: .68rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--gedaempft);
}

.menuknopf {
  display: none; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--linie-stark); border-radius: var(--rund);
  color: var(--tinte); font-family: var(--ui); font-size: .85rem;
  padding: .45rem .8rem; cursor: pointer;
}
.menubalken { position: relative; width: 16px; height: 2px; background: currentColor; display: inline-block; }
.menubalken::before, .menubalken::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor;
}
.menubalken::before { top: -5px; } .menubalken::after { top: 5px; }

.hauptmenue { display: flex; align-items: center; gap: 1rem; }
.menuliste { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.menuliste > li { position: relative; }
.menuliste > li > a {
  display: block; padding: .5rem .7rem; border-radius: 6px;
  font-family: var(--ui); font-size: .88rem; color: var(--tinte-weich); text-decoration: none;
}
.menuliste > li > a:hover { background: var(--akzent-flach); color: var(--akzent); }
.menuliste > li.aktiv > a { color: var(--akzent); font-weight: 600; }
.menuliste > li.betont > a {
  border: 1px solid var(--akzent); color: var(--akzent); margin-left: .35rem;
}
.menuliste > li.betont > a:hover { background: var(--akzent); color: var(--flaeche); }

.untermenue {
  position: absolute; left: 0; top: 100%; min-width: 300px; max-width: 380px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund);
  box-shadow: var(--schatten-tief); padding: .4rem; margin: 0; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .13s ease, transform .13s ease, visibility .13s;
}
.hat-unter:hover > .untermenue, .hat-unter:focus-within > .untermenue {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.untermenue a {
  display: block; padding: .45rem .6rem; border-radius: 6px;
  font-family: var(--ui); font-size: .84rem; line-height: 1.35;
  color: var(--tinte-weich); text-decoration: none;
}
.untermenue a:hover { background: var(--akzent-flach); color: var(--akzent); }

.kopfsuche { display: flex; gap: .35rem; }
.kopfsuche input {
  width: 150px; padding: .42rem .6rem; font-family: var(--ui); font-size: .85rem;
  border: 1px solid var(--linie-stark); border-radius: 6px;
  background: var(--papier); color: var(--tinte);
}
.kopfsuche input:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.kopfsuche button {
  border: 1px solid var(--linie-stark); border-radius: 6px; background: var(--papier);
  color: var(--gedaempft); cursor: pointer;
  font-family: var(--ui); font-size: .8rem; padding: .42rem .7rem;
}
.kopfsuche button:hover { color: var(--akzent); }

@media (max-width: 1040px) {
  .menuknopf { display: inline-flex; }
  .hauptmenue {
    display: none; flex-basis: 100%; flex-direction: column; align-items: stretch;
    padding-bottom: 1rem; gap: .5rem;
  }
  .hauptmenue.offen { display: flex; }
  .menuliste { flex-direction: column; align-items: stretch; }
  .menuliste > li > a { padding: .55rem .5rem; font-size: .95rem; }
  .untermenue {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 2px solid var(--linie);
    border-radius: 0; margin-left: .6rem; max-width: none; min-width: 0;
  }
  .kopfsuche input { width: 100%; }
  .kopfsuche { width: 100%; }
}

/* ---------------------------------------------------------------- Auftakt */
.auftakt { border-bottom: 1px solid var(--linie); background: linear-gradient(180deg, var(--flaeche), var(--papier)); }
.auftakt-bahn {
  display: grid; grid-template-columns: 1.25fr .85fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; padding-block: clamp(2rem, 5vw, 4rem);
}
.oberzeile {
  font-family: var(--ui); font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 .6rem;
}
.auftakt h1 { margin-bottom: .35em; }
.vorspann { font-size: 1.1rem; color: var(--tinte-weich); max-width: 62ch; margin-top: 0; }

.grosse-suche { position: relative; display: flex; gap: .5rem; margin: 1.6rem 0 1.2rem; flex-wrap: wrap; }
.grosse-suche input {
  flex: 1 1 260px; padding: .8rem 1rem; font-family: var(--schrift); font-size: 1rem;
  border: 1px solid var(--linie-stark); border-radius: var(--rund);
  background: var(--flaeche); color: var(--tinte); box-shadow: var(--schatten);
}
.grosse-suche input:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.grosse-suche button {
  padding: .8rem 1.3rem; border: 0; border-radius: var(--rund); cursor: pointer;
  background: var(--akzent); color: #fff; font-family: var(--ui); font-size: .92rem; font-weight: 500;
}
.grosse-suche button:hover { background: var(--tinte); }

.vorschau {
  position: absolute; top: calc(100% + .35rem); left: 0; right: 0; z-index: 30;
  background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: var(--rund);
  box-shadow: var(--schatten-tief); overflow: hidden; max-height: 60vh; overflow-y: auto;
}
.vorschau a {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: .55rem .85rem; text-decoration: none; color: var(--tinte);
  border-bottom: 1px solid var(--linie);
}
.vorschau a:last-child { border-bottom: 0; }
.vorschau a:hover, .vorschau a.markiert { background: var(--akzent-flach); }
.vorschau .vspanne { font-family: var(--ui); font-size: .78rem; color: var(--gedaempft); white-space: nowrap; }
.vorschau .valle { font-family: var(--ui); font-size: .8rem; color: var(--akzent); }

.kennzahlen { display: flex; gap: 2.2rem; list-style: none; padding: 0; margin: 1.6rem 0 0; flex-wrap: wrap; }
.kennzahlen strong { display: block; font-size: 1.85rem; font-weight: 600; color: var(--tinte); line-height: 1.1; }
.kennzahlen span { font-family: var(--ui); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gedaempft); }

.auftakt-bild img {
  display: block; width: auto; max-width: 100%; max-height: 460px;
  margin-inline: auto; border-radius: var(--rund); box-shadow: var(--schatten-tief);
  border: 1px solid var(--linie-stark);
}
.auftakt-bild .bildunterschrift { text-align: center; max-width: 34ch; margin-inline: auto; }
.bildunterschrift, figcaption {
  font-family: var(--ui); font-size: .78rem; color: var(--gedaempft); margin-top: .55rem;
}
@media (max-width: 860px) {
  .auftakt-bahn { grid-template-columns: 1fr; }
  .auftakt-bild { order: -1; }
}

/* ---------------------------------------------------------------- Bausteine */
.abschnitt-titel { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.abschnitt-titel .anzahl, .anzahl {
  font-family: var(--ui); font-size: .76rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gedaempft); font-weight: 400;
}
.abschnitt-vorspann { color: var(--tinte-weich); max-width: 68ch; margin-top: -.2rem; }

.kartenreihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.25rem; }
.karte {
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--rund); padding: 1.4rem 1.5rem; box-shadow: var(--schatten);
}
.karte h2 { margin-top: 0; font-size: 1.25rem; }
.karte p { color: var(--tinte-weich); }
.karte p:last-child { margin-bottom: 0; }
a.karte.klickbar { display: block; text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
a.karte.klickbar:hover { transform: translateY(-2px); box-shadow: var(--schatten-tief); border-color: var(--linie-stark); }
a.karte.klickbar h2 { color: var(--akzent); }

.knopf {
  display: inline-block; padding: .6rem 1.1rem; border-radius: var(--rund);
  background: var(--akzent); color: #fff; text-decoration: none;
  font-family: var(--ui); font-size: .88rem; font-weight: 500;
}
.knopf:hover { background: var(--tinte); color: #fff; }
.knopf.schlicht { background: none; color: var(--akzent); border: 1px solid var(--linie-stark); }
.knopf.schlicht:hover { background: var(--akzent-flach); color: var(--akzent); }

.weiter { font-family: var(--ui); font-size: .88rem; }
.weiter::after { content: " →"; }

.namenwolke { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1rem 0; }
.namenwolke a {
  display: inline-flex; align-items: baseline; gap: .45rem;
  padding: .35rem .75rem; border: 1px solid var(--linie); border-radius: 999px;
  background: var(--flaeche); text-decoration: none; color: var(--tinte);
  font-size: .95rem;
}
.namenwolke a:hover { border-color: var(--akzent); color: var(--akzent); }
.namenwolke span { font-family: var(--ui); font-size: .72rem; color: var(--gedaempft); }

.zweispalt { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.schlichtliste { list-style: none; padding: 0; margin: 0; }
.schlichtliste li { border-bottom: 1px solid var(--linie); }
.schlichtliste a { display: block; padding: .5rem 0; text-decoration: none; color: var(--tinte-weich); }
.schlichtliste a:hover { color: var(--akzent); }

.widmung {
  text-align: center; font-style: italic; color: var(--gedaempft);
  border-top: 1px solid var(--linie); max-width: 60ch; margin-inline: auto;
}

/* ---------------------------------------------------------------- Lesetext */
.seitenraster { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: clamp(1.75rem, 4vw, 3rem); }
@media (max-width: 900px) { .seitenraster { grid-template-columns: 1fr; } }

.seitenleiste { font-family: var(--ui); font-size: .87rem; }
.seitenleiste h2 {
  font-family: var(--ui); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gedaempft); margin-bottom: .8rem;
}
.seitenleiste ul { list-style: none; padding: 0; margin: 0; }
.seitenleiste li { margin-bottom: .1rem; }
.seitenleiste a {
  display: block; padding: .4rem .6rem; border-radius: 6px; line-height: 1.35;
  text-decoration: none; color: var(--tinte-weich); border-left: 2px solid transparent;
}
.seitenleiste a:hover { background: var(--flaeche); color: var(--akzent); }
.seitenleiste li.aktiv a { border-left-color: var(--akzent); color: var(--akzent); background: var(--akzent-flach); font-weight: 600; }

.lesetext { max-width: 72ch; }
.lesetext h1 { margin-bottom: 1rem; }
.lesetext p { margin: 0 0 1.1em; }
.lesetext img { border-radius: 6px; border: 1px solid var(--linie); }
.lesetext figure { margin: 1.6rem 0; }
.lesetext .spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin: 1.5rem 0; }
.lesetext .spalte > :first-child { margin-top: 0; }
.lesetext .bildreihe { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; }
.lesetext .bildreihe figure { margin: 0; flex: 1 1 220px; }
.lesetext table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.lesetext td, .lesetext th { border: 1px solid var(--linie); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.lesetext hr { border: 0; border-top: 1px solid var(--linie); margin: 2rem 0; }
.lesetext blockquote {
  margin: 1.5rem 0; padding-left: 1.2rem; border-left: 3px solid var(--linie-stark);
  color: var(--tinte-weich); font-style: italic;
}

.brotkrumen { font-family: var(--ui); font-size: .8rem; color: var(--gedaempft); margin: 0 0 .8rem; }
.brotkrumen a { color: var(--gedaempft); }
.hinweis {
  background: var(--flaeche); border: 1px solid var(--linie); border-left: 3px solid var(--gold);
  border-radius: 0 var(--rund) var(--rund) 0; padding: .9rem 1.1rem; color: var(--tinte-weich);
}

/* ---------------------------------------------------------------- Suche */
.suchmaske {
  display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund);
  padding: 1.1rem 1.2rem; margin: 1.5rem 0 2rem; box-shadow: var(--schatten);
}
.suchmaske .feld { position: relative; display: flex; flex-direction: column; gap: .3rem; flex: 1 1 150px; }
.suchmaske .feld.gross { flex: 2 1 260px; }
.suchmaske .feld.schmal { flex: 0 1 100px; }
.suchmaske label {
  font-family: var(--ui); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gedaempft);
}
.suchmaske input {
  padding: .55rem .7rem; font-family: var(--schrift); font-size: .98rem;
  border: 1px solid var(--linie-stark); border-radius: 6px;
  background: var(--papier); color: var(--tinte); width: 100%;
}
.suchmaske input:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.suchmaske > button {
  padding: .62rem 1.2rem; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--akzent); color: #fff; font-family: var(--ui); font-size: .9rem;
}
.suchmaske > button:hover { background: var(--tinte); }

.ergebniszahl { font-family: var(--ui); font-size: .85rem; color: var(--gedaempft); }
.trefferliste { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--linie); }
.trefferliste li { border-bottom: 1px solid var(--linie); }

.ptreffer {
  display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap;
  padding: .6rem .3rem; text-decoration: none; color: var(--tinte);
}
.ptreffer:hover { background: var(--flaeche); }
.ptreffer-name { font-weight: 600; }
.ptreffer:hover .ptreffer-name { color: var(--akzent); }
.ptreffer-spanne { font-family: var(--ui); font-size: .8rem; color: var(--gedaempft); }
.ptreffer-ort { font-family: var(--ui); font-size: .8rem; color: var(--gedaempft); margin-left: auto; }
.ptreffer.privat .ptreffer-name { color: var(--gedaempft); font-style: italic; font-weight: 400; }

.blaettern { display: flex; gap: 1.2rem; align-items: center; justify-content: center; margin: 2rem 0; font-family: var(--ui); font-size: .88rem; }
.blaettern span { color: var(--gedaempft); }

.buchstabenleiste { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1.2rem 0 2rem; }
.buchstabenleiste a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.1rem; height: 2.1rem; border: 1px solid var(--linie); border-radius: 6px;
  background: var(--flaeche); text-decoration: none; font-family: var(--ui); font-size: .85rem;
}
.buchstabenleiste a:hover { border-color: var(--akzent); }
.buchstabengruppe { margin-bottom: 2.2rem; scroll-margin-top: 90px; }
.buchstabengruppe h2 {
  border-bottom: 1px solid var(--linie-stark); padding-bottom: .3rem; color: var(--gold);
}
.registerliste {
  list-style: none; padding: 0; margin: 0;
  columns: 3 220px; column-gap: 2rem;
}
.registerliste.breit { columns: 3 300px; }
.registerliste li { break-inside: avoid; margin-bottom: .18rem; }
.registerliste a { text-decoration: none; color: var(--tinte-weich); }
.registerliste a:hover { color: var(--akzent); }
.registerliste span { font-family: var(--ui); font-size: .74rem; color: var(--gedaempft); }

.filterzeile { display: flex; gap: .5rem; flex-wrap: wrap; }
.filterknopf {
  padding: .3rem .8rem; border: 1px solid var(--linie); border-radius: 999px;
  font-family: var(--ui); font-size: .82rem; text-decoration: none; color: var(--tinte-weich);
}
.filterknopf.aktiv { background: var(--akzent); color: #fff; border-color: var(--akzent); }

.seitenfunde { list-style: none; padding: 0; margin: 0; }
.seitenfunde li { padding: .9rem 0; border-bottom: 1px solid var(--linie); }
.seitenfunde a { font-weight: 600; }
.seitenfunde p { margin: .3rem 0 0; color: var(--gedaempft); font-size: .93rem; }

/* ---------------------------------------------------------------- Person */
.personseite { max-width: 900px; }
.personkopf {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 2rem; flex-wrap: wrap; padding-bottom: 1.2rem; border-bottom: 1px solid var(--linie);
}
.personkopf h1 { margin-bottom: .15em; }
.lebensspanne { font-family: var(--ui); font-size: .95rem; color: var(--gold); margin: 0; letter-spacing: .04em; }
.personkopf-zahlen { display: flex; gap: 1.6rem; font-family: var(--ui); font-size: .76rem; color: var(--gedaempft); }
.personkopf-zahlen strong { display: block; font-size: 1.4rem; color: var(--tinte); font-weight: 600; }
.schutzhinweis {
  margin: .8rem 0 0; font-family: var(--ui); font-size: .85rem;
  color: var(--gedaempft); max-width: 55ch;
}
.baumknopfzeile { margin: 1.4rem 0; }

.datenraster { margin: 1.6rem 0 2rem; }
.datenzeile {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1rem;
  padding: .6rem 0; border-bottom: 1px solid var(--linie);
}
.datenzeile dt {
  font-family: var(--ui); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gedaempft); padding-top: .2rem;
}
.datenzeile dd { margin: 0; }
@media (max-width: 620px) { .datenzeile { grid-template-columns: 1fr; gap: .1rem; } }

.beziehungen { display: grid; gap: 1.25rem; }
.beziehungsblock {
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--rund); padding: 1.1rem 1.3rem;
}
.beziehungsblock h2 { font-size: 1.1rem; margin-bottom: .5rem; }
.beziehungsliste { list-style: none; padding: 0; margin: 0; }
.beziehungsliste li { display: flex; align-items: baseline; gap: .8rem; border-bottom: 1px solid var(--linie); }
.beziehungsliste li:last-child { border-bottom: 0; }
.beziehungsliste .rolle {
  flex: 0 0 92px; font-family: var(--ui); font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gedaempft);
}
.beziehungsliste .ptreffer { flex: 1; }
.trauung { font-family: var(--ui); font-size: .84rem; color: var(--gedaempft); margin: 0 0 .5rem; }
.familiennotiz { font-size: .93rem; color: var(--tinte-weich); border-left: 2px solid var(--linie-stark); padding-left: .8rem; margin: .8rem 0 0; }
.ortemarken { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.ortemarken a {
  display: inline-block; padding: .25rem .7rem; border: 1px solid var(--linie);
  border-radius: 999px; font-size: .88rem; text-decoration: none; color: var(--tinte-weich);
}
.ortemarken a:hover { border-color: var(--akzent); color: var(--akzent); }
.quellenhinweis { font-family: var(--ui); font-size: .8rem; color: var(--gedaempft); margin-top: 2rem; }
.ortlink { text-decoration: none; }

/* ---------------------------------------------------------------- Baum */
.baumbereich { border-block: 1px solid var(--linie); background: var(--flaeche-tief); }
.baumleiste {
  display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap;
  padding-block: .75rem; font-family: var(--ui); font-size: .85rem;
}
.schaltergruppe { display: flex; align-items: center; gap: .35rem; }
.schaltergruppe label { color: var(--gedaempft); font-size: .78rem; }
.schaltergruppe button, .schaltergruppe select {
  padding: .38rem .8rem; border: 1px solid var(--linie-stark); border-radius: 6px;
  background: var(--flaeche); color: var(--tinte-weich); cursor: pointer;
  font-family: var(--ui); font-size: .85rem;
}
.schaltergruppe button:hover { border-color: var(--akzent); color: var(--akzent); }
.schaltergruppe button.aktiv { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.baumbuehne {
  position: relative; height: min(74vh, 760px); overflow: hidden;
  cursor: grab; background:
    radial-gradient(circle at 1px 1px, var(--linie) 1px, transparent 0) 0 0/26px 26px;
}
.baumbuehne:active { cursor: grabbing; }
.baumsvg { width: 100%; height: 100%; display: block; touch-action: none; }
.baumladen {
  position: absolute; inset: 0; display: grid; place-content: center;
  font-family: var(--ui); font-size: .9rem; color: var(--gedaempft); margin: 0;
}
.baumladen[hidden] { display: none; }

.bkasten { cursor: pointer; }
.bkasten rect {
  fill: var(--flaeche); stroke: var(--linie-stark); stroke-width: 1; rx: 7;
}
.bkasten:hover rect { stroke: var(--akzent); stroke-width: 1.5; }
.bkasten.mann rect { fill: color-mix(in srgb, var(--flaeche) 88%, #6d8ea8); }
.bkasten.frau rect { fill: color-mix(in srgb, var(--flaeche) 88%, #b58098); }
.bkasten.mitte rect { stroke: var(--akzent); stroke-width: 2; }
.bkasten.privat rect { stroke-dasharray: 4 3; }
.bkasten .bname { font-size: 13px; font-weight: 600; fill: var(--tinte); font-family: var(--schrift); }
.bkasten .bspanne, .bkasten .bort { font-size: 11px; fill: var(--gedaempft); font-family: var(--ui); }
.bkante { fill: none; stroke: var(--linie-stark); stroke-width: 1.5; }
.bmehr { font-size: 11px; fill: var(--akzent); font-family: var(--ui); }

/* ---------------------------------------------------------------- Zeitachse */
.zeitachse {
  display: flex; align-items: flex-end; gap: 3px; height: 190px;
  padding: 1rem 0 0; border-bottom: 1px solid var(--linie-stark);
}
.zbalken { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.zsaeule { width: 100%; background: linear-gradient(180deg, var(--gold), var(--akzent)); border-radius: 3px 3px 0 0; min-height: 2px; }
.zbalken:hover .zsaeule { background: var(--akzent); }
.zmarke {
  position: absolute; bottom: -1.5rem; font-family: var(--ui); font-size: .62rem;
  color: var(--gedaempft); transform: rotate(-45deg); transform-origin: top left; white-space: nowrap;
}
.zeitachse + * { margin-top: 2.5rem; }

/* ---------------------------------------------------------------- Galerie */
.bilderreihe { display: flex; gap: 1rem; flex-wrap: wrap; }
.bildkachel {
  flex: 0 1 190px; text-decoration: none; color: var(--tinte-weich);
  font-family: var(--ui); font-size: .8rem;
}
.bildkachel img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--linie); box-shadow: var(--schatten);
}
.bildkachel:hover img { border-color: var(--akzent); }
.bildkachel span { display: block; margin-top: .4rem; }

.bildgitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.75rem; }
.bildeintrag { margin: 0; }
.bildeintrag img {
  width: 100%; border-radius: 6px; border: 1px solid var(--linie);
  box-shadow: var(--schatten); background: var(--flaeche);
}
.bildeintrag a:hover img { border-color: var(--akzent); }
.bildeintrag figcaption { display: flex; flex-direction: column; gap: .15rem; margin-top: .55rem; }
.bildeintrag figcaption strong { color: var(--tinte); font-family: var(--schrift); font-size: .95rem; font-weight: 600; }

.lichtkasten {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(20,16,10,.9); padding: 2rem;
}
.lichtkasten img { max-width: 100%; max-height: 80vh; border-radius: 6px; box-shadow: var(--schatten-tief); }
.lichtkasten figcaption { color: #f0e8d8; text-align: center; margin-top: 1rem; max-width: 60ch; }
.lichtkasten button {
  position: absolute; top: 1rem; right: 1rem; background: none; border: 1px solid #8a8070;
  color: #f0e8d8; border-radius: 6px; padding: .4rem .8rem; cursor: pointer; font-family: var(--ui);
}

/* ---------------------------------------------------------------- Listen */
.dateiliste { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.dateiliste li { padding: .9rem 0; border-bottom: 1px solid var(--linie); }
.dateiliste a { display: flex; align-items: baseline; gap: .8rem; text-decoration: none; }
.dateiart {
  font-family: var(--ui); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--linie-stark); border-radius: 4px; padding: .1rem .4rem;
  color: var(--gedaempft); flex: 0 0 auto;
}
.dateititel { font-weight: 600; }
.dateiauszug { margin: .35rem 0 0 3.4rem; color: var(--gedaempft); font-size: .9rem; }

.gbeintrag { border: 1px solid var(--linie); border-radius: var(--rund); background: var(--flaeche); padding: 1.1rem 1.3rem; margin-bottom: 1rem; }
.gbeintrag header { display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; font-family: var(--ui); font-size: .82rem; color: var(--gedaempft); }
.gbeintrag header strong { color: var(--tinte); font-size: .95rem; }
.gbeintrag h2 { font-size: 1.05rem; margin: .5rem 0 .3rem; }
.gbeintrag p { margin: 0; }

/* ---------------------------------------------------------------- Fussleiste */
.fussleiste { border-top: 1px solid var(--linie); background: var(--flaeche); margin-top: 3rem; }
.fussbahn {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem; padding-block: 2.75rem 2rem;
}
.fussspalte h2 {
  font-family: var(--ui); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gedaempft); margin-bottom: .8rem;
}
.fussspalte p { font-size: .93rem; color: var(--tinte-weich); margin: 0 0 .7rem; }
.fussspalte .klein { font-size: .84rem; color: var(--gedaempft); }
.fussliste { list-style: none; padding: 0; margin: 0; font-family: var(--ui); font-size: .88rem; }
.fussliste li { margin-bottom: .35rem; }
.fussliste a { color: var(--tinte-weich); text-decoration: none; }
.fussliste a:hover { color: var(--akzent); text-decoration: underline; }
.fussende {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--linie); padding-block: 1.1rem;
  font-family: var(--ui); font-size: .78rem; color: var(--gedaempft);
}
.fussende p { margin: 0; }
.fussende a { color: var(--gedaempft); }

@media print {
  .kopfleiste, .fussleiste, .baumleiste, .seitenleiste { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
}

.bkante.paar { stroke-dasharray: 3 3; }

/* Uebersichtsseiten eines Bereichs */
.unterseiten { margin-top: 2.5rem; border-top: 1px solid var(--linie-stark); padding-top: 1.5rem; }
.unterseiten h2 {
  font-family: var(--ui); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gedaempft); margin-bottom: 1rem;
}
.unterseiten ul { list-style: none; padding: 0; margin: 0; }
.unterseiten li { padding: .75rem 0; border-bottom: 1px solid var(--linie); }
.unterseiten a { font-weight: 600; text-decoration: none; }
.unterseiten a:hover { text-decoration: underline; }
.unterseiten p { margin: .25rem 0 0; color: var(--gedaempft); font-size: .92rem; }

.lebensspanne .errechnet {
  font-family: var(--ui); font-size: .74rem; color: var(--gedaempft);
  letter-spacing: 0; margin-left: .4rem;
}

.legende {
  font-family: var(--ui); font-size: .84rem; color: var(--gedaempft);
  max-width: 70ch; margin: 0 0 1.8rem;
}
