/* Seite /papstliste/: die Reihe der Päpste. Der Kopf steht auf dem Foto des Medaillonfrieses von St. Paul vor den Mauern
   (.foto-kopf in artikel.css), darunter die älteste Liste (Irenäus) als Goldmosaikband, alle Pontifikate als Medaillons mit Suche, Filter und Steckbrief (src/reihe.js),
   Zahlen (src/zahlen.css), Namen und Herkunft als Balken, der Vergleich der alten Listen mit Linien, die Papstgruft,
   das Schisma als Zeitleiste mit Erklärung und den Lücken der Zählung. Hell und dunkel über die Farben aus site.css; Nachtblau-Abschnitte in beiden Modi gleich. */

/* ------------------------------------------------------------ Gemeinsames */
.rh-text { max-width: 40rem; margin: 0 auto; padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) 0 max(1.25rem, env(safe-area-inset-left, 0px)); }
.rh-text p { margin: 0 0 1em; line-height: 1.7; hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
.rh-text a:not(.ref), .lu-liste a:not(.ref), .rh-quellen a:not(.ref), .rh-fussnote a:not(.ref) { color: inherit; text-decoration-color: var(--gold-line); text-underline-offset: .18em; }
.rh-text a:not(.ref):hover, .lu-liste a:not(.ref):hover, .rh-quellen a:not(.ref):hover, .rh-fussnote a:not(.ref):hover { color: var(--gold-text); text-decoration-color: currentColor; }
/* Verweise auf dunklem Grund: Gold statt der Farbe der Art (wie auf /petersdom/) */
.rh-aelteste .ref, .rh-gruft .ref { --c: var(--gold-hell); --c-line: rgba(236, 210, 142, .5); --c-tint: rgba(236, 210, 142, .16); }

/* ------------------------------------------------------------ Die älteste Liste (Irenäus) */
/* Der Schein von oben setzt weich ein: Darüber liegt der Kopf der Seite, der ebenfalls in Nachtblau endet */
.rh-aelteste {
  position: relative;
  background: linear-gradient(180deg, var(--night), transparent clamp(5rem, 12vw, 9rem)), radial-gradient(ellipse 70% 60% at 50% 0%, rgba(46, 66, 140, .5), transparent 70%), var(--night);
  color: var(--auf-nacht); --fokus: var(--gold-hell); --fokus-gold: var(--gold-hell);
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3.5rem, 8vw, 5.5rem);
}
.rh-aelteste-inner { max-width: 72rem; margin: 0 auto; }
.ir-band {
  list-style: none; margin: 0; padding: 1.1rem max(.75rem, env(safe-area-inset-left, 0px)) .9rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(4.4rem, 1fr)); gap: .9rem .35rem;
  background-color: var(--gold); background-size: 150px auto; border-block: 3px solid #6f5520; --fokus: var(--night);
  box-shadow: inset 0 10px 18px rgba(60, 38, 6, .35), inset 0 -10px 18px rgba(60, 38, 6, .35);
}
@media (min-width: 72rem) { .ir-band { grid-template-columns: repeat(13, minmax(0, 1fr)); border-radius: 14px; border: 3px solid #6f5520; } }
.ir-knopf {
  display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .3rem .1rem; border-radius: 12px;
  color: #2b1e06; text-decoration: none; transition: transform .25s ease, background-color .25s ease;
}
.ir-zahl, .ir-name { padding: .12rem .4rem; border-radius: 6px; background: rgba(255, 248, 226, .9); box-shadow: 0 1px 2px rgba(60, 38, 6, .3); color: #2b1e06; line-height: 1.1; white-space: nowrap; }
.ir-zahl { font-family: var(--font-kapitalis); font-weight: 700; font-size: .74rem; letter-spacing: .04em; }
.ir-p:first-child .ir-zahl { font-family: var(--font-ui); font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; }
.ir-bild { display: block; width: 4rem; height: 4rem; border-radius: 50%; filter: drop-shadow(0 3px 5px rgba(50, 30, 4, .45)); }
.ir-bild img, .ir-bild .rh-ohne { width: 100%; height: 100%; object-fit: contain; display: block; }
.ir-name { font-family: var(--font-ui); font-weight: 700; font-size: .72rem; text-align: center; }
.ir-knopf:hover, .ir-knopf:focus-visible, .ir-knopf.ist-hell { background: rgba(255, 246, 214, .4); transform: translateY(-3px); }
.ir-knopf.ist-hell .ir-name, .ir-knopf:hover .ir-name { background: var(--night); color: var(--gold-hell); }
.js .ir-p.zeigen { transition-delay: calc(var(--i, 0) * 70ms); }
.ir-hinweis {
  max-width: 40rem; margin: .9rem auto 0; padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) 0 max(1.25rem, env(safe-area-inset-left, 0px));
  text-align: center; font-family: var(--font-ui); font-size: .84rem; line-height: 1.5; color: var(--auf-nacht-3); text-wrap: pretty;
}
.ir-zitat {
  max-width: 46rem; margin: clamp(2rem, 5vw, 3rem) auto 0; padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) 0 max(1.25rem, env(safe-area-inset-left, 0px));
}
.ir-zitat p {
  margin: 0; font-family: var(--font-display); font-style: italic; font-size: clamp(1.18rem, 1.02rem + .65vw, 1.5rem); line-height: 1.5;
  color: var(--auf-nacht); text-wrap: pretty; hyphens: auto; -webkit-hyphens: auto;
}
.ir-zitat a[data-ir] {
  font-style: normal; font-weight: 600; color: var(--gold-hell); border-radius: 4px; padding: 0 .1em;
  text-decoration: underline; text-decoration-color: rgba(236, 210, 142, .35); text-underline-offset: .2em; transition: background-color .2s ease, color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.ir-zitat a[data-ir]:is(:hover, :focus-visible, .ist-hell) { background: var(--gold-hell); color: var(--night); text-decoration-color: transparent; }
.ir-zitat a[data-ir]:focus-visible { outline: 2px solid var(--gold-hell); outline-offset: 2px; }
.ir-zitat cite { display: block; margin-top: 1rem; font-style: normal; font-family: var(--font-ui); font-size: .9rem; }
.ir-weiter {
  max-width: 46rem; margin: 1.6rem auto 0; padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) 0 max(1.25rem, env(safe-area-inset-left, 0px));
  line-height: 1.68; color: var(--auf-nacht-2);
}

/* ------------------------------------------------------------ Die ganze Reihe */
.rh-bereich { padding: 0 0 clamp(2.5rem, 6vw, 4rem); scroll-margin-top: 3.6rem; }
/* Kopf über drei Medaillons aus St. Paul (.foto-kopf in artikel.css), niedriger als der Kopf der Seite */
.rh-reihe-kopf { --oben: clamp(13rem, 8rem + 12vw, 20rem); }
/* Oben aus dem Nachtblau des Abschnitts darüber heraus statt mit harter Kante */
.rh-reihe-kopf .foto-kopf-bild::after {
  background: linear-gradient(180deg, var(--night) 0%, rgba(8, 12, 34, .06) 18%, rgba(8, 12, 34, .1) 44%, rgba(8, 12, 34, .82) 58%, var(--night) 82%);
}
.rh-bereich .abschnitt-kopf { padding-left: max(1.25rem, env(safe-area-inset-left, 0px)); padding-right: max(1.25rem, env(safe-area-inset-right, 0px)); }

/* Werkzeugleiste: bleibt beim Scrollen unter der Kopfleiste stehen */
.rh-werkzeug {
  position: sticky; top: calc(3.6rem + env(safe-area-inset-top, 0px)); z-index: 30;
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-block: 1px solid var(--rule);
  padding: .55rem max(1rem, env(safe-area-inset-right, 0px)) .4rem max(1rem, env(safe-area-inset-left, 0px));
}
.rh-werkzeug-inner { max-width: 76rem; margin: 0 auto; display: flex; flex-wrap: wrap; gap: .45rem; }
.rh-suche {
  flex: 1 1 100%; position: relative; display: flex; align-items: center;
}
.rh-suche svg { position: absolute; left: .85rem; width: 1.05rem; height: 1.05rem; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.rh-suche input, .rh-wahl select {
  width: 100%; min-height: 2.6rem; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--ink);
  font: inherit; font-family: var(--font-ui); font-size: 1rem;
}
.rh-suche input { padding: .4rem 1rem .4rem 2.4rem; }
.rh-suche input::placeholder { color: var(--ink-3); }
.rh-wahl { flex: 1 1 0; min-width: 0; }
.rh-wahl select {
  -webkit-appearance: none; appearance: none; padding: .4rem 2rem .4rem .9rem; font-size: .9rem; font-weight: 600; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 1.05rem) 55%, calc(100% - .75rem) 55%; background-size: .32rem .32rem; background-repeat: no-repeat;
}
.rh-wahl--stand { flex: 0 0 5.6rem; }
.rh-wahl--jh { flex: 0 0 5.9rem; }
.rh-suche input:focus-visible, .rh-wahl select:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 1px; }
.rh-status {
  max-width: 76rem; margin: .3rem auto 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 1.9rem;
  font-family: var(--font-ui); font-size: .82rem; color: var(--ink-3);
}
.rh-treffer { display: inline-flex; gap: .3rem; }
.rh-treffer[hidden] { display: none; }
.rh-treffer button {
  min-height: 1.9rem; min-width: 1.9rem; padding: .1rem .65rem; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--sheet);
  font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
}
.rh-treffer button:hover { border-color: var(--gold); color: var(--gold-text); }
@media (min-width: 760px) {
  .rh-suche { flex: 1 1 18rem; }
  .rh-wahl { flex: 0 1 15rem; }
  .rh-wahl--stand { flex: 0 0 9rem; }
  .rh-wahl--jh { flex: 0 0 6.6rem; }
}

.rh-flaeche {
  max-width: 76rem; margin: 0 auto; padding: 1.25rem max(.75rem, env(safe-area-inset-right, 0px)) 0 max(.75rem, env(safe-area-inset-left, 0px));
}
.rh-jh { padding-top: 1.1rem; scroll-margin-top: calc(3.6rem + var(--werkzeug-h, 7.5rem) + .5rem); }
.rh-jh-kopf {
  display: flex; align-items: baseline; gap: .7rem; margin: 0 .25rem .6rem; padding-bottom: .45rem; border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui); font-weight: 600; font-size: .9rem; color: var(--ink-2);
}
.rh-jh-zahl { font-family: var(--font-kapitalis); font-weight: 700; font-size: 1.35rem; color: var(--gold-text); min-width: 2.6rem; letter-spacing: .04em; }
.rh-jh-anzahl { margin-left: auto; font-weight: 500; font-size: .78rem; color: var(--ink-3); }
.rh-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(5.3rem, 1fr)); gap: .2rem .25rem; }
@media (min-width: 600px) { .rh-liste { grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); } }
.rh-knopf {
  position: relative; display: flex; flex-direction: column; align-items: center; height: 100%;
  padding: .55rem .15rem .55rem; border-radius: 14px; color: var(--ink); text-decoration: none;
  transition: background-color .2s ease, opacity .3s ease, filter .3s ease, box-shadow .2s ease;
}
.rh-knopf:hover { background: var(--gold-tint); }
.rh-knopf:focus-visible { outline: 2px solid var(--gold-text); outline-offset: -2px; }
.rh-medaillon { display: block; width: 3.5rem; height: 3.5rem; border-radius: 50%; filter: drop-shadow(0 2px 3px rgba(40, 28, 6, .28)); transition: transform .2s ease; }
.rh-knopf:hover .rh-medaillon { transform: scale(1.06); }
.rh-medaillon img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Ohne freies Bild: blaues Mosaik im Goldring, der lateinische Name in goldener Kapitalis (wie die Inschrift der Kuppel) */
.rh-ohne {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%;
  background-color: var(--lapis); background-size: 70px auto;
  box-shadow: inset 0 0 0 3px #e0ad3c, inset 0 0 0 5px #8a5a10, inset 0 0 16px rgba(4, 10, 40, .6);
}
.rh-ohne span {
  padding: 0 .45rem; font-family: var(--font-kapitalis); font-weight: 700; font-size: .56rem; line-height: 1.12; letter-spacing: .02em;
  color: var(--gold-hell); text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 20, .8);
}
.rh-nr { position: absolute; top: .3rem; left: .45rem; font-family: var(--font-ui); font-size: .62rem; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rh-name { margin-top: .4rem; font-family: var(--font-ui); font-weight: 600; font-size: .8rem; line-height: 1.2; text-align: center; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.rh-jahre { margin-top: .15rem; font-family: var(--font-ui); font-size: .7rem; line-height: 1.2; color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }
/* Gewählt, gefiltert, Treffer */
.rh-knopf.ist-gewaehlt { background: var(--sheet); box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.rh-reihe.ist-gefiltert .rh-knopf.ist-aus { opacity: .2; filter: grayscale(1); }
.rh-reihe.ist-gefiltert .rh-knopf:not(.ist-aus) { box-shadow: inset 0 0 0 1.5px var(--gold-line); }
.rh-reihe.ist-gefiltert .rh-knopf.ist-gewaehlt { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.rh-knopf.ist-sprung { animation: rh-sprung 1.2s ease; }
@keyframes rh-sprung { 0%, 60% { background: var(--gold-tint); box-shadow: 0 0 0 3px var(--gold); } 100% { box-shadow: none; } }

/* Steckbrief: auf dem Handy ein Blatt von unten, ab 1024 px eine Spalte neben der Reihe */
.rh-karte { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .7, .2, 1); visibility: hidden; }
.rh-karte.ist-offen { transform: none; visibility: visible; }
.rh-karte-inner {
  max-height: min(64vh, 36rem); overflow: auto; overscroll-behavior: contain;
  background: var(--sheet); color: var(--ink); border-radius: 20px 20px 0 0; border-top: 1px solid var(--rule-strong);
  box-shadow: 0 -18px 50px rgba(10, 14, 30, .35);
  padding: 1.1rem max(1.25rem, env(safe-area-inset-right, 0px)) calc(1.1rem + env(safe-area-inset-bottom, 0px)) max(1.25rem, env(safe-area-inset-left, 0px));
}
.rh-karte-inner:focus { outline: none; }
.rh-karte-leer { display: none; }
.rh-karte-voll { position: relative; }
.rh-karte-zu {
  position: absolute; top: -.2rem; right: -.2rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--rule-strong);
  background: var(--paper); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.rh-karte-kopf { display: flex; align-items: center; gap: 1rem; padding-right: 2.6rem; }
.rh-karte-bild { flex: none; width: 5.5rem; height: 5.5rem; filter: drop-shadow(0 4px 8px rgba(40, 28, 6, .3)); }
.rh-karte-bild img, .rh-karte-bild .rh-ohne { width: 100%; height: 100%; object-fit: contain; display: block; }
.rh-karte-bild .rh-ohne span { font-size: .8rem; }
.rh-karte-nr { margin: 0; font-family: var(--font-ui); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); }
.rh-karte-titel { margin: .15rem 0 0; font-family: var(--font-display); font-weight: 500; font-size: 1.75rem; line-height: 1.1; }
.rh-karte-bei { display: block; margin-top: .15rem; font-family: var(--font-ui); font-size: .85rem; font-weight: 500; color: var(--ink-3); }
.rh-karte-latein { margin: .3rem 0 0; font-family: var(--font-kapitalis); font-weight: 600; font-size: .82rem; letter-spacing: .08em; color: var(--ink-3); }
.rh-karte-daten { margin: 1rem 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .4rem 1rem; font-family: var(--font-ui); font-size: .9rem; line-height: 1.4; }
.rh-karte-daten dt { color: var(--ink-3); }
.rh-karte-daten dd { margin: 0; }
.rh-karte-daten small { display: block; color: var(--ink-3); font-size: .78rem; }
.rh-karte-notiz { margin: 1rem 0 0; font-size: .95rem; line-height: 1.6; hyphens: auto; -webkit-hyphens: auto; }
.rh-karte-notiz:empty { display: none; }
.rh-karte-links { margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .45rem; font-family: var(--font-ui); font-size: .84rem; }
.rh-karte-links a {
  display: inline-flex; align-items: center; gap: .3rem; min-height: 2.2rem; padding: .25rem .8rem; border-radius: 999px;
  border: 1px solid var(--rule-strong); color: var(--ink); text-decoration: none; font-weight: 600;
}
.rh-karte-links a:hover { border-color: var(--gold); color: var(--gold-text); }
.rh-karte-links svg { width: .7em; height: .7em; }
.rh-karte-nav { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--rule); }
.rh-karte-nav button {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; padding: .3rem .9rem; border-radius: 999px;
  border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink); font-family: var(--font-ui); font-weight: 600; font-size: .88rem; cursor: pointer;
}
.rh-karte-nav button:first-child .pfeil { transform: scaleX(-1); }
.rh-karte-nav button:hover { border-color: var(--gold); color: var(--gold-text); }
.rh-karte-nav button:disabled { opacity: .4; cursor: default; }
@media (min-width: 1024px) {
  .rh-flaeche { display: grid; grid-template-columns: minmax(0, 1fr) 20.5rem; gap: 1.75rem; align-items: start; }
  .rh-karte {
    position: sticky; top: calc(3.6rem + var(--werkzeug-h, 7rem) + 1rem); left: auto; right: auto; bottom: auto; z-index: 1;
    transform: none; visibility: visible; transition: none; margin-top: 1.1rem;
  }
  .rh-karte-inner {
    max-height: calc(100vh - 3.6rem - var(--werkzeug-h, 7rem) - 2rem); border-radius: 18px; border: 1px solid var(--rule);
    box-shadow: var(--shadow); padding: 1.25rem;
  }
  .rh-karte-leer { display: block; }
  .rh-karte-leer[hidden] { display: none; }
  .rh-karte-hinweis { margin: 0; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.3; }
  .rh-karte-klein { margin: .8rem 0 0; font-family: var(--font-ui); font-size: .84rem; line-height: 1.5; color: var(--ink-3); }
  .rh-karte-zu { display: none; }
  .rh-karte-kopf { padding-right: 0; }
}
.rh-fussnote {
  max-width: 76rem; margin: 2rem auto 0; padding: 1rem max(1.25rem, env(safe-area-inset-right, 0px)) 0 max(1.25rem, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--rule); font-family: var(--font-ui); font-size: .8rem; line-height: 1.5; color: var(--ink-3);
}

/* ------------------------------------------------------------ Zahlen, Namen und Herkunft */
.rh-zahlen .zahl-text { max-width: 15rem; }
.rh-statistik { padding: clamp(3.5rem, 8vw, 5.5rem) max(1.25rem, env(safe-area-inset-right, 0px)) clamp(2.5rem, 6vw, 4rem) max(1.25rem, env(safe-area-inset-left, 0px)); }
.st-raster { max-width: 64rem; margin: 0 auto; display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .st-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; } }
.st-karte { margin: 0; padding: 1.25rem 1.1rem 1rem; border: 1px solid var(--rule); border-radius: 18px; background: var(--sheet); }
.st-titel { margin: 0 0 .8rem; font-family: var(--font-ui); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.st-balken { list-style: none; margin: 0; padding: 0; }
.st-zeile {
  display: grid; grid-template-columns: 8.2rem minmax(0, 1fr) 2.2rem; align-items: center; gap: .6rem; width: 100%; min-height: 2.15rem;
  padding: .1rem .35rem; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.st-zeile:hover, .st-zeile:focus-visible { background: var(--gold-tint); }
.st-name { font-family: var(--font-ui); font-size: .9rem; font-weight: 600; line-height: 1.2; }
.st-spur { position: relative; height: 10px; }
.st-wert {
  position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--w) * 100%); min-width: 4px; border-radius: 0 4px 4px 0;
  background: var(--gold); transform-origin: left center; transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.js .st-karte:not(.ist-sichtbar) .st-wert { transform: scaleX(0); }
.st-zeile:hover .st-wert { background: var(--gold-tief); }
.st-zahl { font-family: var(--font-ui); font-size: .9rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.st-fuss { margin: .8rem .35rem 0; font-family: var(--font-ui); font-size: .8rem; line-height: 1.45; color: var(--ink-3); }

/* ------------------------------------------------------------ Die alten Listen im Vergleich */
.rh-listen { padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem); background: var(--sheet); border-block: 1px solid var(--rule); }
.rh-listen .abschnitt-kopf { padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) 0 max(1.25rem, env(safe-area-inset-left, 0px)); }
.lv-rahmen {
  position: relative; max-width: 66rem; margin: 0 auto; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  padding: 0 max(1rem, env(safe-area-inset-right, 0px)) .5rem max(1rem, env(safe-area-inset-left, 0px));
}
.lv-tabelle { position: relative; min-width: 41rem; }
.lv-linien { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.lv-linien path { fill: none; stroke: var(--rule-strong); stroke-width: 1.5; transition: stroke .2s ease, stroke-width .2s ease, opacity .2s ease; }
.lv-linien path.ist-gekreuzt { stroke: var(--gold); opacity: .55; stroke-width: 2; }
.lv-linien.ist-hell path { opacity: .25; }
.lv-linien.ist-hell path.ist-hell { stroke: var(--gold); stroke-width: 3; opacity: 1; }
.lv-zeile { display: grid; grid-template-columns: 1.6rem repeat(5, minmax(0, 1fr)); column-gap: 1.6rem; align-items: center; min-height: 2.15rem; }
.lv-kopfzeile { align-items: end; padding-bottom: .5rem; margin-bottom: .3rem; border-bottom: 1px solid var(--rule); }
.lv-kopf { font-family: var(--font-ui); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); line-height: 1.2; }
.lv-kopf small { display: block; margin-top: .15rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-3); font-size: .78rem; }
.lv-platz { font-family: var(--font-ui); font-size: .72rem; font-weight: 600; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.lv-zelle { position: relative; z-index: 1; }
.lv-name {
  display: inline-block; max-width: 100%; padding: .12rem .55rem; border: 1px solid transparent; border-radius: 999px; background: var(--sheet);
  font-family: var(--font-body); font-size: .9rem; line-height: 1.3; color: var(--ink); text-align: left; cursor: pointer;
}
.lv-name:hover { border-color: var(--gold-line); }
.lv-name.ist-hell { border-color: var(--gold); background: var(--gold-tint); font-weight: 600; }
.lv-name:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 1px; }
.lv-gruender { font-style: italic; color: var(--ink-2); }
.lv-fuss { align-items: start; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--rule); }
.lv-hinweis { font-family: var(--font-ui); font-size: .74rem; line-height: 1.35; color: var(--ink-3); }
.rh-wischen { display: none; }
@media (max-width: 759px) { .rh-wischen { display: block; margin: 0 0 .5rem; text-align: center; font-family: var(--font-ui); font-size: .78rem; color: var(--ink-3); } }
.lv-tipp { max-width: 66rem; margin: .6rem auto 2rem; padding: 0 1.25rem; font-family: var(--font-ui); font-size: .8rem; color: var(--ink-3); text-align: center; }

/* ------------------------------------------------------------ Namen in Stein: die Papstgruft */
.rh-gruft {
  background: radial-gradient(ellipse 60% 70% at 25% 50%, rgba(46, 66, 140, .4), transparent 70%), var(--night); color: var(--auf-nacht); --fokus: var(--gold-hell); --fokus-gold: var(--gold-hell);
  padding: clamp(3.5rem, 8vw, 6rem) max(1.25rem, env(safe-area-inset-right, 0px)) clamp(3.5rem, 8vw, 6rem) max(1.25rem, env(safe-area-inset-left, 0px));
}
.rh-gruft-inner { max-width: 72rem; margin: 0 auto; display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 900px) { .rh-gruft-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
.rh-gruft-bild { margin: 0; }
.rh-gruft-rahmen { overflow: hidden; border-radius: 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); aspect-ratio: 4 / 3; }
.rh-gruft-rahmen picture, .rh-gruft-rahmen img { display: block; width: 100%; height: 100%; }
.rh-gruft-rahmen img { object-fit: cover; }
.rh-gruft-bild figcaption { margin-top: .6rem; font-family: var(--font-ui); font-size: .82rem; line-height: 1.45; color: var(--auf-nacht-3); }
.rh-gruft-bild .nachweis { display: block; }
.rh-gruft-text .eyebrow { color: var(--gold-hell); }
.rh-gruft-text .abschnitt-titel { color: #fff; margin-bottom: 1rem; }
.rh-gruft-text p { line-height: 1.7; color: var(--auf-nacht-2); hyphens: auto; -webkit-hyphens: auto; }
.rh-gruft-text a:not(.ref) { color: var(--gold-hell); text-decoration-color: rgba(236, 210, 142, .45); text-underline-offset: .18em; }
.rh-gruft .nachweis a { color: inherit; }
.rh-quelle { font-family: var(--font-ui); font-size: .82rem; }

/* ------------------------------------------------------------ Drei Päpste zugleich? Das Schisma */
.rh-schisma { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); background: var(--sheet); border-bottom: 1px solid var(--rule); }
.rh-schisma .abschnitt-kopf { padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) 0 max(1.25rem, env(safe-area-inset-left, 0px)); }
.sch-karte { max-width: 60rem; margin: 0 auto clamp(2rem, 5vw, 3rem); padding: 0 max(1rem, env(safe-area-inset-right, 0px)) 0 max(1rem, env(safe-area-inset-left, 0px)); }
.sch-rahmen { overflow-x: auto; overscroll-behavior-x: contain; padding: 1rem .75rem .5rem; border: 1px solid var(--rule); border-radius: 18px; background: var(--paper); }
.sch-svg { display: block; width: 100%; min-width: 40rem; height: auto; font-family: var(--font-ui); }
.sch-raster { stroke: var(--rule); stroke-width: 1; }
.sch-jahr { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.sch-bahn { fill: var(--ink-2); font-size: 13px; font-weight: 700; }
.sch-konzil { fill: var(--gold-tint); }
.sch-pisa { stroke: var(--ink-3); stroke-width: 1; }
.sch-konzil-text { fill: var(--ink-3); font-size: 11px; font-weight: 600; }
.sch-balken { fill: var(--gold); }
.sch-balken--neben { fill: var(--rule-strong); }
.sch-name { font-size: 12.5px; font-weight: 600; fill: #2b1e06; pointer-events: none; }
.sch-balken--neben + .sch-name { fill: var(--ink); }
.sch-name--unten, .sch-balken--neben + .sch-name--unten { fill: var(--ink-2); font-weight: 500; font-size: 11.5px; }
.sch-zusammen { fill: none; stroke: var(--gold); stroke-width: 2; }
.sch-papst { cursor: pointer; outline: none; }
.sch-papst:hover .sch-balken, .sch-papst:focus-visible .sch-balken { filter: brightness(1.1); stroke: var(--ink); stroke-width: 1.5; }
.sch-karte figcaption { max-width: 46rem; margin: .8rem auto 0; text-align: center; font-family: var(--font-ui); font-size: .84rem; line-height: 1.5; color: var(--ink-3); }
/* Was „Gegenpapst“ heißt: Kasten vor der Erzählung */
.sch-begriff {
  max-width: 40rem; margin: 0 auto clamp(2rem, 5vw, 2.75rem); padding: 1.2rem 1.25rem; border-left: 3px solid var(--gold); border-radius: 0 14px 14px 0;
  background: var(--paper);
}
@media (max-width: 42.5rem) { .sch-begriff { margin-inline: 1.25rem; } }
.sch-begriff h3 { margin: 0 0 .5rem; font-family: var(--font-ui); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.sch-begriff p { margin: 0 0 .8em; line-height: 1.65; hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
.sch-begriff p:last-child { margin-bottom: 0; }
.rh-schisma .rh-text + .rh-text { margin-top: 1.5rem; }
.lu-liste { list-style: none; max-width: 40rem; margin: 1rem auto 0; padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) 0 max(1.25rem, env(safe-area-inset-left, 0px)); }
.lu-liste li { padding: .8rem 0; border-top: 1px solid var(--rule); line-height: 1.6; }
.lu-titel { font-weight: 600; }


/* ------------------------------------------------------------ Quellen */
.rh-quellen {
  max-width: 46rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 3.5rem) max(1.25rem, env(safe-area-inset-right, 0px)) clamp(2rem, 5vw, 3rem) max(1.25rem, env(safe-area-inset-left, 0px));
  font-family: var(--font-ui); font-size: .88rem; line-height: 1.55; color: var(--ink-2);
}
.rh-quellen-titel { margin: 0 0 .8rem; font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; color: var(--ink); }
.rh-quellen ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; }
.rh-quellen strong { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------ Weniger Bewegung */
@media (prefers-reduced-motion: reduce) {
  .rh-karte { transition: none; }
  .js .st-karte:not(.ist-sichtbar) .st-wert { transform: none; }
  .rh-knopf.ist-sprung { animation: none; box-shadow: 0 0 0 3px var(--gold); }
}
