/* worbis.wien — eine Stilvorlage, keine Bibliothek.
   Warum so schlicht: Das Archiv soll in zehn Jahren noch lesbar
   sein, ohne dass jemand ein Werkzeug aktualisiert. Systemschriften,
   keine Icons von aussen, keine Skripte fuer die Darstellung.
   Grundton Papier und Tinte -- es ist ein Archiv, kein Werbeblatt. */

:root {
  --papier: #f7f4ee;
  --karte: #fffdf8;
  --tinte: #2b2723;
  --leise: #7a7166;
  --linie: #ddd5c8;
  --akzent: #7a2e2e;        /* dunkles Rot, wie Siegellack */
  --zweifel: #a05a00;       /* Zweifel sind orange, nicht versteckt */
  --geburt: #4a7c46; --taufe: #3d7c74; --heirat: #a8842c;
  --tod: #55524e; --begraebnis: #7a5c46;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font: 16px/1.55 Georgia, 'Times New Roman', serif;
}
a { color: var(--akzent); }
h1, h2 { font-weight: normal; letter-spacing: .01em; }
h1 { font-size: 1.7rem; margin: .3rem 0 .6rem; }
h2 { font-size: 1.15rem; margin: .2rem 0 .6rem; }

header {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  padding: .7rem 1.2rem; background: var(--tinte); color: var(--papier);
}
.marke { color: var(--papier); text-decoration: none; font-size: 1.15rem;
  letter-spacing: .06em; }
header nav { display: flex; gap: .9rem; flex-wrap: wrap; }
header nav a { color: var(--papier); text-decoration: none; opacity: .85; }
header nav a:hover { opacity: 1; text-decoration: underline; }
.nutzer { margin-left: auto; display: flex; gap: .8rem; align-items: center;
  font-size: .9rem; }
.nutzer a { color: var(--papier); opacity: .85; }
.nutzer form { display: inline; }

main { max-width: 68rem; margin: 1.2rem auto 3rem; padding: 0 1.2rem; }
footer { max-width: 68rem; margin: 0 auto 1.5rem; padding: 0 1.2rem;
  color: var(--leise); font-size: .85rem; border-top: 1px solid var(--linie);
  padding-top: .8rem; }

.karte { background: var(--karte); border: 1px solid var(--linie);
  border-radius: 4px; padding: 1rem 1.2rem; margin: 0 0 1rem; }
.schmal { max-width: 26rem; margin: 3rem auto; }
.spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 44rem) { .spalten { grid-template-columns: 1fr; } }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem; margin-top: 1.2rem; }
.kachel { display: block; background: var(--karte); border: 1px solid var(--linie);
  border-radius: 4px; padding: 1rem 1.2rem; text-decoration: none;
  color: var(--tinte); }
.kachel:hover { border-color: var(--akzent); }
.kachel h2 { color: var(--akzent); margin-top: 0; }
.kachel p { margin: 0; color: var(--leise); font-size: .92rem; }

.hinweis { color: var(--leise); font-size: .9rem; }
.meldung { background: #e8efdf; border: 1px solid #b7c9a2; padding: .6rem .9rem;
  border-radius: 4px; }
.fehler { background: #f3e0dc; border: 1px solid #cf9d92; padding: .6rem .9rem;
  border-radius: 4px; }

/* Zweifel und Besonderes werden MARKIERT, nie versteckt */
.marke-klein { font-size: .75rem; border: 1px solid var(--linie);
  border-radius: 3px; padding: 0 .35rem; color: var(--leise);
  vertical-align: middle; white-space: nowrap; }
.marke-klein.zweifel { border-color: var(--zweifel); color: var(--zweifel); }
.marke-klein.lebt { border-color: #4a7c46; color: #4a7c46; }
tr.unsicher td, li.unsicher { border-left: 3px solid var(--zweifel); }
.zweifel-text { color: var(--zweifel); }

table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: normal; color: var(--leise);
  font-size: .85rem; border-bottom: 1px solid var(--linie); padding: .3rem .5rem; }
td { padding: .35rem .5rem; border-bottom: 1px solid var(--linie);
  vertical-align: top; }

dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; margin: 0; }
dt { color: var(--leise); font-size: .9rem; }
dd { margin: 0; }

.kopf-zeile { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.kopf-zeile .knopf { margin-left: auto; }

.rohtext { background: #f1ecdf; border: 1px dashed var(--linie);
  padding: .7rem .9rem; white-space: pre-wrap; font-family: inherit; }

/* Formulare */
form label { display: block; margin: 0 0 .7rem; }
form label.zeile { display: flex; gap: .5rem; align-items: center; }
input, select, textarea {
  font: inherit; width: 100%; padding: .35rem .5rem; margin-top: .15rem;
  border: 1px solid var(--linie); border-radius: 3px; background: #fff;
  color: var(--tinte); }
label.zeile input[type=checkbox] { width: auto; margin: 0; }
button, .knopf {
  font: inherit; background: var(--akzent); color: #fff; border: 0;
  border-radius: 3px; padding: .4rem 1rem; cursor: pointer;
  text-decoration: none; display: inline-block; }
button.leise, .knopf.leise { background: transparent; color: var(--akzent);
  border: 1px solid var(--linie); padding: .15rem .5rem; font-size: .85rem; }
.suchfeld { display: flex; gap: .5rem; margin: 1rem 0; }
.suchfeld input { margin: 0; }
.formular hr { border: 0; border-top: 1px solid var(--linie); margin: 1rem 0; }
.zeile { display: flex; gap: .4rem; align-items: center; }
.handgriffe form { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Einrichtungs-Code: gross und abschreibbar */
.code-kasten { border-color: var(--akzent); }
.code { font-family: ui-monospace, 'Courier New', monospace;
  font-size: 1.25rem; letter-spacing: .05em; background: #f1ecdf;
  padding: .6rem .9rem; border-radius: 4px; user-select: all; }

/* Hausgeschichten */
.haus-liste { display: flex; flex-wrap: wrap; gap: .5rem; }
.haus { display: flex; flex-direction: column; border: 1px solid var(--linie);
  border-radius: 4px; padding: .4rem .7rem; text-decoration: none;
  color: var(--tinte); min-width: 7.5rem; }
.haus:hover { border-color: var(--akzent); }
.haus span { color: var(--leise); font-size: .8rem; }

.chronik { list-style: none; margin: 0; padding: 0; }
.chronik li { padding: .3rem .5rem; border-bottom: 1px solid var(--linie); }
.chronik-jahr { display: inline-block; min-width: 9.5rem; color: var(--leise); }
.chronik-art { display: inline-block; min-width: 6.5rem; font-size: .9rem; }
.art-geburt { color: var(--geburt); } .art-taufe { color: var(--taufe); }
.art-heirat { color: var(--heirat); } .art-tod { color: var(--tod); }
.art-begraebnis { color: var(--begraebnis); }

/* Lebenslinien */
.linien-achse { display: flex; justify-content: space-between;
  color: var(--leise); font-size: .85rem; border-bottom: 1px solid var(--linie);
  margin-bottom: .5rem; }
.linien-zeile { display: grid; grid-template-columns: 17rem 1fr; gap: .8rem;
  align-items: center; padding: .2rem 0; }
@media (max-width: 44rem) { .linien-zeile { grid-template-columns: 1fr; gap: .1rem; } }
.linien-name { font-size: .92rem; line-height: 1.25; }
.linien-name .hinweis { display: block; }
.linien-band { position: relative; height: 14px; background: #f1ecdf;
  border-radius: 2px; }
.balken { position: absolute; top: 2px; bottom: 2px; background: var(--geburt);
  border-radius: 2px; }
.balken.kindstod { background: var(--akzent); }
.balken.offen { background: linear-gradient(90deg, var(--tod), transparent); }
.probe { display: inline-block; width: .9rem; height: .6rem; border-radius: 2px;
  background: var(--geburt); vertical-align: baseline; }
.probe.kindstod { background: var(--akzent); }
.probe.offen { background: linear-gradient(90deg, var(--tod), transparent); }

/* Zeitband: Farbproben nutzen dieselben art-Klassen wie die Balkenteile */
.zeitband { display: flex; align-items: flex-end; gap: 2px; overflow-x: auto;
  padding-bottom: .2rem; }
.zb-spalte { flex: 1 0 auto; min-width: 10px; text-align: center; }
.zb-balken { display: flex; flex-direction: column-reverse; justify-content: flex-start;
  height: 165px; align-items: stretch; }
.zb-teil { width: 100%; }
.zb-teil.art-geburt { background: var(--geburt); }
.zb-teil.art-taufe { background: var(--taufe); }
.zb-teil.art-heirat { background: var(--heirat); }
.zb-teil.art-tod { background: var(--tod); }
.zb-teil.art-begraebnis { background: var(--begraebnis); }
.zb-jahr { font-size: .72rem; color: var(--leise); height: 1.1rem; }
span.probe.art-geburt { background: var(--geburt); }
span.probe.art-taufe { background: var(--taufe); }
span.probe.art-heirat { background: var(--heirat); }
span.probe.art-tod { background: var(--tod); }
span.probe.art-begraebnis { background: var(--begraebnis); }

/* Karte mit Zeitschieber */
.zs-steuer { position: sticky; top: 0; z-index: 5; }
.zs-zeile { display: flex; gap: .8rem; align-items: center; }
.zs-zeile input[type=range] { flex: 1; margin: 0; padding: 0; }
.zs-zeile strong { font-weight: normal; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
button.zs-an { background: var(--akzent); color: #fff; }
.zs-band { display: flex; align-items: flex-end; gap: 1px; height: 36px;
  margin-top: .5rem; cursor: pointer; }
.zs-streifen { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.zs-streifen div { width: 100%; background: var(--linie); min-height: 1px; }
.zs-streifen:hover div, .zs-streifen.zs-an div { background: var(--akzent); }
.zs-grund { fill: #f1ecdf; }
/* Papier-Schleier ueber der Grundkarte: daempft das Bunte, die
   Punkte bleiben die Hauptsache. */
.zs-schleier { fill: var(--papier); opacity: .42; }
.zs-punkt { fill: var(--geburt); opacity: .88; stroke: #fffdf8; }
.zs-label { font-family: Georgia, serif; fill: var(--tinte);
  stroke: #fffdf8; paint-order: stroke; stroke-linejoin: round; }

/* Beitraege: Notizen und Bilder der Familie */
.beitraege { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: .8rem; margin-bottom: 1rem; }
.beitrag { border: 1px solid var(--linie); border-radius: 4px; padding: .6rem .8rem; }
.beitrag img { max-width: 100%; height: auto; border-radius: 3px; display: block; }
.beitrag p { margin: .4rem 0 0; }
.beitrag-pdf { display: inline-block; border: 1px dashed var(--linie);
  padding: .5rem .8rem; }
form.innen { display: inline; }

/* Zeitgeschehen ueber dem Zeitband */
.zeitband-rahmen { position: relative; padding-top: 1.3rem; }
.zg-band { position: absolute; top: 0; bottom: 1.3rem;
  background: var(--zweifel); opacity: .16; border-left: 1px solid var(--zweifel);
  border-right: 1px solid var(--zweifel); pointer-events: auto; }
.zg-band.zg-welt { background: var(--akzent); border-color: var(--akzent); }
.zg-band span { position: absolute; top: -1.25rem; left: 0; font-size: .72rem;
  color: var(--tinte); opacity: 1; white-space: nowrap; }
.zg-marke { position: absolute; top: 0; transform: translateX(-50%);
  font-size: .7rem; color: var(--akzent); cursor: default; }
.zg-neu { margin-top: 1rem; }
details summary { cursor: pointer; color: var(--akzent); }
details form { margin-top: .6rem; max-width: 24rem; }

/* Karten-Bedienung: Ziehen + Zoomen */
.karten-halter { position: relative; }
.karten-halter svg { cursor: grab; touch-action: none; display: block; }
.karten-halter svg.greift { cursor: grabbing; }
.karten-knoepfe { position: absolute; top: .5rem; right: .5rem;
  display: flex; flex-direction: column; gap: .25rem; }
.karten-knoepfe button { width: 2rem; height: 2rem; padding: 0;
  font-size: 1.1rem; line-height: 1; background: var(--karte);
  color: var(--tinte); border: 1px solid var(--linie); border-radius: 3px; }
.karten-knoepfe button:hover { border-color: var(--akzent); }
.zs-geschehen { fill: var(--akzent); stroke: #fffdf8;
  paint-order: stroke; stroke-linejoin: round; cursor: default; }
.zs-lage { margin: .4rem 0 0; min-height: 1.2em; }

/* Formatierte Beitraege */
.md h3, .md h4, .md h5 { margin: .5rem 0 .2rem; }
.md p { margin: .3rem 0; }
.md ul, .md ol { margin: .3rem 0 .3rem 1.2rem; padding: 0; }
/* Bilder IM Notiz-Text (md_mini: ![links|rechts|breit](b<nr>)) --
   links/rechts laesst den Text umfliessen wie in der Zeitung,
   overflow:auto am .md-Behaelter schliesst den Umlauf sauber ab,
   sonst ragt ein hohes Bild in den naechsten Beitrag. */
.md { overflow: auto; }
.md .md-bild { margin: .2rem 0 .5rem; }
.md .md-bild img { max-width: 100%; border-radius: 3px; display: block; }
.md .md-links  { float: left;  width: 42%; margin: .2rem 1rem .5rem 0; }
.md .md-rechts { float: right; width: 42%; margin: .2rem 0 .5rem 1rem; }
.md .md-breit  { clear: both; }
.md figcaption { font-size: .82rem; color: var(--tinte-leise, #79705f);
  margin-top: .25rem; }
@media (max-width: 46rem) {
  /* am Handy ist 42% zu schmal zum Erkennen -- halbe Breite */
  .md .md-links, .md .md-rechts { width: 50%; }
}
.kopf-knoepfe { margin-left: auto; display: flex; gap: .5rem; }
.kopf-knoepfe .knopf { margin-left: 0; }

/* Lagen-Schalter: heutige Karte / Kaiser-Kataster 1824 */
.lagen-schalter { display: flex; gap: .4rem; margin: 0 0 .5rem; }
.lagen-schalter button { background: transparent; color: var(--tinte);
  border: 1px solid var(--linie); padding: .25rem .8rem; font-size: .9rem; }
.lagen-schalter button.lage-an { background: var(--akzent); color: #fff;
  border-color: var(--akzent); }

/* Haus-Marken, Umkreise, Welt-Schleier auf der Karte */
.zs-hausmarke { fill: var(--akzent); stroke: #fffdf8; opacity: .92; }
.zs-hausmarke:hover { fill: var(--tinte); }
.zs-umkreis { fill: var(--akzent); fill-opacity: .12; stroke: var(--akzent);
  stroke-dasharray: 4 3; }
.zs-welt-schleier { fill: var(--akzent); opacity: .07; }
svg.verortet-gleich { cursor: crosshair; }
.zs-schleier.aus { opacity: 0; }

/* Verorten-Fliessband */
.verorten-spalten { display: grid; grid-template-columns: 17rem 1fr; gap: 1rem; }
@media (max-width: 52rem) { .verorten-spalten { grid-template-columns: 1fr; } }
.nr-liste { display: flex; flex-wrap: wrap; gap: .35rem; max-height: 24rem;
  overflow-y: auto; }
.nr { border: 1px solid var(--linie); border-radius: 3px; padding: .15rem .5rem;
  text-decoration: none; color: var(--tinte); font-variant-numeric: tabular-nums; }
.nr-fertig { border-color: var(--geburt); color: var(--geburt); }
.nr-dran { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.verorten-dran { margin-left: auto; color: var(--akzent); }

/* Personen-Liste: Reiter + Filter */
.reiter-zeile { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center;
  margin: 0 0 .7rem; }
.reiter { border: 1px solid var(--linie); border-radius: 3px 3px 0 0;
  padding: .2rem .7rem; background: var(--karte); }
.reiter a { text-decoration: none; color: var(--tinte); }
.reiter-an { border-bottom: 2px solid var(--akzent); }
.reiter-an a { color: var(--akzent); }
.reiter-weg { background: none; border: 0; color: var(--leise); padding: 0 0 0 .3rem;
  cursor: pointer; font-size: .9rem; }
.reiter-weg:hover { color: var(--akzent); }
.reiter-speichern { display: flex; gap: .3rem; margin-left: auto; }
.reiter-speichern input { width: 14rem; margin: 0; }
.filter-zeile { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 .8rem; }
.filter-zeile input[name=suche] { flex: 1; min-width: 12rem; margin: 0; }
.filter-zeile select { width: auto; margin: 0; }

/* Stammbaum-Gabel: oeffnet sich nach rechts */
.g-rollen { overflow-x: auto; }
.gabel { min-width: max-content; padding: .3rem; }
.g-knoten { display: flex; align-items: center; }
.g-box { border: 1px solid var(--linie); border-radius: 4px;
  padding: .3rem .6rem; min-width: 11rem; background: var(--karte);
  line-height: 1.25; margin: .18rem 0; }
.g-box a { text-decoration: none; }
.g-box .hinweis { display: block; font-variant-numeric: tabular-nums; }
.g-m { border-left: 3px solid #7d9bb8; }
.g-w { border-left: 3px solid #c49898; }
.g-platzhalter, .g-luecke { border-style: dashed; color: var(--leise); }
.g-luecke { background: transparent; font-size: .85rem; }
.g-weiter { display: inline-block; font-size: .8rem; }
.g-eltern { display: flex; flex-direction: column; margin-left: 1.4rem; }
.g-eltern > .g-knoten { position: relative; padding-left: 1.3rem; }
.g-eltern > .g-knoten::before { content: ''; position: absolute; left: 0;
  top: 50%; width: 1.3rem; border-top: 1px solid var(--linie); }
.g-eltern > .g-knoten::after { content: ''; position: absolute; left: 0;
  top: 0; height: 100%; border-left: 1px solid var(--linie); }
.g-eltern > .g-knoten:first-child::after { top: 50%; height: 50%; }
.g-eltern > .g-knoten:last-child::after { height: 50%; }
.g-eltern > .g-knoten:only-child::after { display: none; }
.g-probe { display: inline-block; width: .85rem; height: .85rem;
  border: 1px solid var(--linie); border-radius: 2px; vertical-align: middle; }
.g-probe.g-m { border-left: 3px solid #7d9bb8; }
.g-probe.g-w { border-left: 3px solid #c49898; }
.g-probe.g-luecke { border-style: dashed; }
.zs-punkt.fern { opacity: .3; }

/* ================= Handy-Tauglichkeit ================= */
/* Zeitband: Schleier und Balken rollen ZUSAMMEN (der Rahmen ist
   die Mess-Basis der Prozent-Lagen, der Scroll liegt aussen) */
.zeitband-scroll { overflow-x: auto; }
.zeitband-rahmen { min-width: 38rem; }
.zeitband { overflow-x: visible; }

/* Breite Inhalte (Tabellen) rollen im Kasten, nie die ganze Seite */
.karte { overflow-x: auto; }

@media (max-width: 46rem) {
  header { padding: .5rem .8rem; gap: .4rem .8rem; }
  .marke { font-size: 1.05rem; }
  /* Die Leiste wird EINE rollbare Zeile statt vier gewickelter */
  header nav { order: 3; width: 100%; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0; }
  header nav a { padding: .45rem .55rem; white-space: nowrap; }
  .nutzer { margin-left: auto; gap: .5rem; }
  main { padding: 0 .8rem; margin-top: .8rem; }
  h1 { font-size: 1.35rem; }
  .karte { padding: .8rem .8rem; }
  th, td { padding: .3rem .35rem; }
  .chronik-jahr { min-width: 6.2rem; font-size: .85rem; }
  .chronik-art { min-width: 4.6rem; }
  .reiter-speichern { margin-left: 0; width: 100%; }
  .reiter-speichern input { flex: 1; width: auto; }
  .zs-zeile { flex-wrap: wrap; }
  .zs-zeile input[type=range] { flex-basis: 100%; order: 3; }
  .linien-name .hinweis { font-size: .8rem; }
}

/* Grobe Zeiger (Finger): alles Anfassbare waechst auf Finger-Mass */
@media (pointer: coarse) {
  button, .knopf { padding: .55rem 1.1rem; }
  button.leise, .knopf.leise { padding: .4rem .7rem; font-size: .95rem; }
  .karten-knoepfe button { width: 2.75rem; height: 2.75rem;
    font-size: 1.35rem; }
  input, select, textarea { padding: .5rem .6rem; }
  .nr { padding: .45rem .75rem; }
  .zs-band { height: 44px; }
  header nav a { padding: .6rem .6rem; }
  .reiter { padding: .4rem .8rem; }
}

/* ============ Zeitkarte (Vollbild) ============ */
.zk-voll { position: relative; height: calc(100vh - 3.2rem); min-height: 24rem; }
/* Karten-Zug ist keine Text-Auswahl: ohne diese Regel "markiert"
   jeder Zieh-Griff Knoepfe und Beschriftungen blau (Arthurs Befund).
   Gilt fuer die Vollbild-Zeitkarte UND die kleinen Karten
   (Haus-Seite, Verorten) ueber ihren gemeinsamen Halter. */
.zk-voll, .karten-halter {
  user-select: none; -webkit-user-select: none;
}
.zk-seite, .zk-seite * { user-select: text; -webkit-user-select: text; }
.zk-voll svg { width: 100%; height: 100%; display: block; cursor: grab;
  touch-action: none; background: #f1ecdf; }
.zk-voll svg.greift { cursor: grabbing; }
.zk-suche { position: absolute; top: .7rem; left: .7rem; display: flex;
  gap: .3rem; background: var(--karte); border: 1px solid var(--linie);
  border-radius: 4px; padding: .3rem; box-shadow: 0 1px 4px rgba(43,39,35,.15); }
.zk-suche input { width: 13rem; margin: 0; border: 0; background: transparent; }
.zk-lagen { position: absolute; top: .7rem; right: 3.6rem; margin: 0;
  background: var(--karte); border: 1px solid var(--linie); border-radius: 4px;
  padding: .25rem; box-shadow: 0 1px 4px rgba(43,39,35,.15); }
.zk-zoom { top: 3.6rem; }
.zk-zeit { position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--karte); border-top: 1px solid var(--linie);
  padding: .3rem .9rem .4rem; }
.zk-zeit .zs-band { height: 28px; margin: 0 0 .2rem; }
.zk-zeit-zeile { display: flex; gap: .7rem; align-items: center; }
.zk-zeit-zeile input[type=range] { flex: 1; margin: 0; }
.zk-zeit-zeile strong { font-weight: normal; white-space: nowrap;
  font-variant-numeric: tabular-nums; min-width: 7.5rem; text-align: right; }
.zk-klein { margin: .15rem 0 0; font-size: .75rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
/* Seitliches Overlay (Vorbild oldmapsonline): Namensliste und
   Personenblatt oeffnen sich RECHTS ueber der Karte, die Karte
   bleibt daneben bedienbar. Ersetzt den frueheren kleinen Kasten. */
.zk-seite { position: absolute; right: 0; top: 0; bottom: 4.9rem;
  width: 24rem; max-width: 92%; margin: 0; border-radius: 0;
  border-width: 0 0 0 1px; display: flex; flex-direction: column;
  box-shadow: -2px 0 10px rgba(43,39,35,.25); }
/* eigenes display:flex wuerde das hidden-Attribut uebersteuern --
   ohne diese Zeile faengt das "geschlossene" Overlay weiter Klicks */
.zk-seite[hidden] { display: none; }
.zk-seite p { margin: .15rem 0; font-size: .92rem; }
#zk-seite-liste { overflow-y: auto; flex: 1; }
#zk-seite-person { display: flex; flex-direction: column; flex: 1;
  min-height: 0; }
#zk-seite-person[hidden] { display: none; }
.zk-seite-wege { display: flex; justify-content: space-between;
  align-items: center; gap: .6rem; }
#zk-blatt-rahmen { border: 1px solid var(--linie); border-radius: 4px;
  width: 100%; flex: 1; background: var(--karte); }
/* Filter-Leiste: was auf der Karte liegt, laesst sich abschalten */
.zk-filter { position: absolute; top: 3.4rem; right: 3.6rem; margin: 0;
  background: var(--karte); border: 1px solid var(--linie); border-radius: 4px;
  padding: .25rem; box-shadow: 0 1px 4px rgba(43,39,35,.15); }
.zk-leutemarke { cursor: pointer; }
.zk-leutemarke:hover { fill: var(--akzent); }
/* Bild-Anhaenge in der Zeitgeschehen-Tabelle: kleine Vorschau */
.zg-bild { max-width: 180px; max-height: 130px; border-radius: 3px;
  display: block; margin: .3rem 0; }

@media (max-width: 46rem) {
  .zk-voll { height: calc(100vh - 6.2rem); }
  .zk-suche input { width: 8.5rem; }
  .zk-lagen { right: .7rem; top: 3.4rem; }
  .zk-filter { right: .7rem; top: 6.1rem; }
  .zk-zoom { top: 8.8rem; }
  .zk-seite { width: 100%; max-width: 100%; border-left: 0; }
  .zk-zeit-zeile strong { min-width: 5.5rem; font-size: .9rem; }
  .zk-klein { display: none; }
}
/* Beschriftungen fangen keine Klicks -- die gehoeren der Marke */
.zs-label { pointer-events: none; }
/* Schlachten-Marken (Wikidata) */
.zs-schlacht { fill: #4a3423; stroke: #fffdf8; paint-order: stroke;
  stroke-linejoin: round; cursor: pointer; }
.zs-schlacht:hover { fill: var(--akzent); }
/* Historische Staatsgrenzen */
.zs-gebiet { fill-opacity: .32; fill-rule: evenodd;
  vector-effect: non-scaling-stroke; stroke-width: 1.4px;
  stroke-opacity: .8; }
.zs-gebiet:hover { fill-opacity: .42; }
.zs-grenzname { font-family: Georgia, serif; font-style: italic;
  fill: #4a3423; stroke: #fffdf8; paint-order: stroke;
  stroke-linejoin: round; pointer-events: none; letter-spacing: .08em; }

/* Bibliothek */
.bib-liste { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.bib-kopf { margin: 0 0 .3rem; }
.zs-grenzjahre { font-style: normal; opacity: .85; }
.zs-flagge { pointer-events: none; }
