/* Seite /petersdom/: „Hinab“ (Schnitt durch den Petersdom von der Kuppel bis zum Grab, die Kamera fährt beim Scrollen
   hinab) und „Schicht für Schicht“ (was über dem Grab gewachsen ist, vom Erdgrab bis zum Baldachin). Die Zeichnungen
   erzeugt scripts/schnitt.mjs in Metern; Linien behalten beim Zoomen ihre Breite. Bewegung: src/hinab.js. */

/* ------------------------------------------------------------ Farben der Zeichnungen (fest, in hell und dunkel gleich) */
.zeichnung { display: block; overflow: hidden; }
.zeichnung * { vector-effect: non-scaling-stroke; }
.z-nacht { stop-color: var(--night); }
.z-stern { fill: #ecd28e; opacity: .75; }
.z-wand { fill: #22306a; }
.z-wand2 { fill: #283877; }
.z-tiefe { fill: #0a1029; }
.z-nische { fill: #141c46; stroke: #4a5a98; stroke-width: .8; }
.z-stuck { fill: #b8954a; }
.z-stuck-dunkel { fill: #8a6a2a; }
.z-pilaster { fill: #2f3f84; }
.z-pilaster-fern { fill: #1e2a5c; }
.z-trommel { fill: #1d2963; }
.z-trommel-sockel { fill: #26346f; }
.z-relief { fill: #33448a; stroke: #b8954a; stroke-width: .8; }
.z-relief-rund { fill: #b8954a; opacity: .8; }
.z-attika-feld { fill: #2a3a7a; stroke: #8a6a2a; stroke-width: .6; }
.z-oeffnung { fill: #0d1433; }
.z-kapitell { fill: #c9a24a; }
.z-fensterrahmen { fill: #d9cfb8; }
.z-giebel { fill: #c9b88f; stroke: #8a7552; stroke-width: .8; }
.z-luenette { fill: #9a7428; opacity: .55; }
.z-bogenfeld { fill: none; stroke: #f6e2a0; stroke-width: 1; opacity: .6; }
.z-kandelaber { fill: none; stroke: #d8cba8; stroke-width: 1.6; stroke-linecap: round; }
.z-confessio-wand { fill: #6b5232; opacity: .85; }
.z-tuer { fill: #1a120a; }
.z-gitter { fill: none; stroke: #c99a48; stroke-width: 1.2; }
.z-gewoelbe-linie { fill: none; stroke: #8a7552; stroke-width: 1.2; }
.z-fenster { stroke: none; }
.z-gelaender { fill: #d9cfb8; opacity: .8; }
.z-gelaender-stab { fill: none; stroke: #d9cfb8; stroke-width: 1.2; opacity: .8; }
.z-buchstabe { font-family: var(--font-kapitalis); font-weight: 700; font-size: 2px; text-anchor: middle; fill: #1d3687; }
.z-kreuzrot { fill: #c8343b; }
.z-ringschrift { font-family: var(--font-kapitalis); font-weight: 700; font-size: .95px; fill: #1d2a60; }
.z-feld { fill: #1d2d6c; opacity: .14; }
.z-kuppelring { fill: #f4dc95; opacity: .55; }
.z-rippe { fill: none; stroke: #f6e2a0; stroke-width: 1.4; opacity: .9; }
.z-medaillon { fill: #20306f; stroke: #f0d48a; stroke-width: 1; }
.z-medaillon-rand { fill: #c39b45; stroke: #f0d48a; stroke-width: 1; }
.z-evangelist { fill: #3a2a12; opacity: .55; }
.z-statue { fill: #e9e2d2; }
.z-mensch { fill: #f4dca6; }
.z-mensch-gold { fill: #9a7428; opacity: .7; }
.z-saeule-alt { fill: #ece5d4; stroke: #a69c86; stroke-width: .6; }
.z-saeule-alt-rille { fill: none; stroke: #a69c86; stroke-width: .6; }
.z-saeule-aussen { fill: #efe6d0; stroke: #8f7d57; stroke-width: .8; }
.z-stein { fill: #e2d6ba; stroke: #8f7d57; stroke-width: 1; stroke-linejoin: round; }
.z-stein-alt { fill: #b9a882; stroke: #7a6a47; stroke-width: 1; }
.z-fundament { fill: #7d6d4f; stroke: #5a4c33; stroke-width: 1; }
.z-blei { fill: #6f7c99; stroke: #46516b; stroke-width: 1; }
.z-blei-linie { fill: none; stroke: #8794b0; stroke-width: 3; stroke-linejoin: round; }
.z-treppe { fill: none; stroke: #a8946b; stroke-width: 1; stroke-dasharray: 3 2; }
.z-strahl { mix-blend-mode: screen; pointer-events: none; }
.z-gewoelbe-gold { stroke: #8a6a22; stroke-width: 1; }
.z-gold { fill: #e6c063; stroke: #8a6a22; stroke-width: 1; }
.z-mosaik-gold { fill: #e6c063; }
.z-erde { fill: #2f2218; }
.z-aufschuettung { fill: #4a3726; }
.z-schutt { opacity: .9; }
.z-abgetragen { fill: none; stroke: #c9a96b; stroke-width: 1; stroke-dasharray: 4 3; opacity: .7; }
.z-ziegel { stroke: #4f2716; stroke-width: 1; }
.z-ziegel-dach { fill: #6e3a22; stroke: #4f2716; stroke-width: 1; }
.z-grabhaus-innen { fill: #1c140e; }
.z-grabnische { fill: #120c08; stroke: #6b4a30; stroke-width: .8; }
.z-grabnische-zu { fill: #3e2d1e; stroke: #6b4a30; stroke-width: .8; }
.z-grotte { fill: #1e1812; }
.z-gewoelbe { fill: #4a3f30; stroke: #6a5a42; stroke-width: 1; }
.z-lampe { fill: #ffd27a; }
.z-sarkophag { fill: #d8d0bf; stroke: #8f8672; stroke-width: 1; }
.z-boden { fill: #ddd4c0; stroke: #8f8266; stroke-width: 1; }
.z-boden-band { fill: none; stroke: #a5452e; stroke-width: 1.5; stroke-dasharray: 6 4; }
.z-boden-alt { fill: #b49e74; stroke: #7b6a49; stroke-width: 1; }
.z-pflaster { fill: #a8936b; stroke: #6f5e3f; stroke-width: 1; }
.z-stufenkante { fill: none; stroke: #8a7552; stroke-width: 1.2; }
.z-grab { fill: #120b06; stroke: #e2bd5d; stroke-width: 1.4; stroke-dasharray: 4 3; }
.z-grab-anders { fill: #24190f; stroke: #7a6248; stroke-width: 1; stroke-dasharray: 3 3; }
.z-glut { pointer-events: none; }
.z-rot { fill: #b23b2e; stroke: #6e1d15; stroke-width: 1; }
.z-riss { fill: none; stroke: #2b0a06; stroke-width: 1.2; }
.z-nische-dunkel { fill: #2a0f0b; }
.z-travertin { fill: #d6c7a1; stroke: #7f6f4b; stroke-width: 1; }
.z-marmor { fill: #f1ebdf; stroke: #9a917c; stroke-width: 1; }
.z-mauer-g { fill: #c7bba5; stroke: #847862; stroke-width: 1; }
.z-graffiti { fill: none; stroke: #4f4639; stroke-width: 1; }
.z-loculus { fill: #0f0b08; stroke: #f1ebdf; stroke-width: 1.4; }
.z-gebeine { fill: #6a2b5c; stroke: #e2bd5d; stroke-width: 1; }
.z-pavonazzetto { fill: #e9dde6; }
.z-pavonazzetto-schnitt { fill: #e9dde6; stroke: #7a5a78; stroke-width: 1; }
.z-porphyr { fill: #6f1d2c; }
.z-ader { fill: none; stroke: #9a7598; stroke-width: 1; opacity: .7; }
.z-schatten { fill: #000; opacity: .38; }
.z-gang { fill: #1a120c; stroke: #7a6a47; stroke-width: 1; }
.z-altar { fill: #ece4d1; stroke: #8f8266; stroke-width: 1; }
.z-altar-feld { fill: #8a3b33; opacity: .55; }
.z-altar-ziegel { fill: #a8603c; stroke: #5e2f1b; stroke-width: 1; }
.z-altar-calixt { fill: #efeae0; stroke: #8f8266; stroke-width: 1; opacity: .9; }
.z-cosmaten { fill: #2b7a64; opacity: .7; }
.z-umriss { fill: none; stroke: #a8603c; stroke-width: 1.2; stroke-dasharray: 3 2; }
.z-kapelle { stroke: none; }
.z-confessio { stroke: none; }
.z-stab { fill: none; stroke: #e2d8c3; stroke-width: 1.6; }
.z-flamme { fill: #fff0b8; }
.z-urne { fill: #8a6424; stroke: #e6c063; stroke-width: 1; }
.z-sockel { fill: #ece6d8; stroke: #8f8672; stroke-width: 1; }
.z-sockel-feld { fill: #7a4a6a; opacity: .45; }
.z-bronze { stroke: #20120a; stroke-width: 1; }
.z-bronze-hell { fill: #b8873a; stroke: #4a2d12; stroke-width: 1; }
.z-bronze-saeule { fill: #6a4219; stroke: #24140a; stroke-width: 1; }
.z-bronze-saeule-rille { fill: none; stroke: #d6a556; stroke-width: 1.4; opacity: .85; }
.z-bronze-figur { fill: #c99a48; }
.z-volute { fill: none; stroke: #8a5a22; stroke-width: .5px; vector-effect: none; stroke-linecap: round; }
.z-rand { pointer-events: none; }
.zeichnung [data-teil] { cursor: pointer; }

/* Übersicht in der Ecke */
.m-erde { fill: #3a2a1c; }
.m-bau { fill: #2c3c7c; stroke: #ecd28e; stroke-width: 1; stroke-linejoin: round; }
.m-innen { fill: none; stroke: rgba(236, 210, 142, .35); stroke-width: 1; }
.m-grab { fill: #6a4a30; }
.m-ziel { fill: #ffd27a; }
.m-blick { fill: rgba(236, 210, 142, .16); stroke: #fff2c4; stroke-width: 1.6; }

/* ------------------------------------------------------------ Hinab: Von der Kuppel zum Grab */
.hinab {
  position: relative; background: var(--night); color: var(--auf-nacht); --fokus: var(--gold-hell); --fokus-gold: var(--gold-hell);
  padding-top: clamp(4rem, 9vw, 7rem);
}
.hinab-kopf { padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) 0 max(1.25rem, env(safe-area-inset-left, 0px)); }
.hinab .eyebrow { color: var(--gold-hell); }
.hinab .abschnitt-titel { color: #fff; }
.hinab .abschnitt-lead { color: var(--auf-nacht-2); }
/* Verweise auf dunklem Grund: Gold statt der Farbe der Art */
.hinab .ref { --c: var(--gold-hell); --c-line: rgba(236, 210, 142, .5); --c-tint: rgba(236, 210, 142, .16); }
.hinab a:not(.ref) { color: inherit; text-decoration-color: rgba(236, 210, 142, .5); text-underline-offset: .16em; }
.hinab a:not(.ref):hover { color: var(--gold-hell); }

/* Ohne Skript: die ganze Zeichnung, darunter die Stationen */
.hinab-buehne { position: relative; height: min(90vh, 62rem); max-width: 60rem; margin: 0 auto; }
.hinab-svg { width: 100%; height: 100%; }
.hinab-hoehe, .hinab-karte { display: none; }
.hinab-stationen { list-style: none; margin: 0 auto; padding: 1.5rem max(1.25rem, env(safe-area-inset-right, 0px)) 4rem max(1.25rem, env(safe-area-inset-left, 0px)); max-width: 40rem; display: grid; gap: 1rem; }
.station { scroll-margin-top: 4rem; }
.station-karte {
  background: rgba(8, 12, 34, .88); border: 1px solid rgba(236, 210, 142, .22); border-radius: 18px;
  padding: 1rem 1.2rem 1.15rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
.station-hoehe { margin: 0 0 .3rem; font-family: var(--font-ui); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hell); }
.station-titel { margin: 0 0 .4rem; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 1.2rem + .9vw, 1.85rem); line-height: 1.15; color: #fff; }
.station-text { margin: 0; font-size: .97em; line-height: 1.58; color: var(--auf-nacht-2); hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
.station-text + .station-text { margin-top: .5rem; }
.hinab a.station-weiter { display: inline-flex; align-items: center; gap: .35rem; margin-top: .7rem; font-family: var(--font-ui); font-size: .9rem; font-weight: 700; color: var(--gold-hell); text-decoration: none; }
.hinab a.station-weiter:hover .pfeil { transform: rotate(90deg) translateX(3px); }
.hinab .station-weiter .pfeil { transform: rotate(90deg); }
.hinab-nachweis { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem 3.5rem; font-family: var(--font-ui); font-size: .78rem; line-height: 1.5; color: var(--auf-nacht-3); text-align: center; }

/* Mit Skript: Die Bühne bleibt stehen, die Stationen ziehen vorbei; jede Station füllt einen Bildschirm */
.js .hinab-rahmen { position: relative; }
.js .hinab-buehne { position: sticky; top: 3.6rem; height: calc(100vh - 3.6rem); height: calc(100svh - 3.6rem); max-width: none; margin: 0; }
.js .hinab-hoehe, .js .hinab-karte { display: block; }
.js .hinab-stationen { position: relative; margin-top: calc(-100vh + 3.6rem); margin-top: calc(-100svh + 3.6rem); max-width: none; padding: 0; display: block; }
.js .station { min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: 0 max(1rem, env(safe-area-inset-right, 0px)) 1.1rem max(1rem, env(safe-area-inset-left, 0px)); pointer-events: none; }
.js .station-karte { pointer-events: auto; width: 100%; max-width: 30rem; margin: 0 auto; transition: opacity .5s ease, transform .5s ease; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.js .station:not(.ist-aktiv) .station-karte { opacity: 1; }
@media (max-width: 899px) {
  /* Die Karte liegt über dem unteren Teil der Zeichnung (src/hinab.js rückt den Ausschnitt darüber) */
  .js .station-karte { font-size: .94em; }
}
@media (min-width: 900px) {
  .js .hinab-rahmen { display: grid; grid-template-columns: minmax(22rem, 32rem) minmax(0, 1fr); }
  .js .hinab-buehne { grid-column: 2; grid-row: 1; align-self: start; }
  .js .hinab-stationen { grid-column: 1; grid-row: 1; margin-top: 0; }
  .js .station { align-items: center; padding: 0 0 0 max(2rem, calc((100vw - 80rem) / 2)); }
  .js .station-karte { margin: 0; }
}
.hinab-hoehe {
  position: absolute; left: max(1rem, env(safe-area-inset-left, 0px)); top: .9rem; margin: 0; padding: .25rem .75rem; border-radius: 999px;
  font-family: var(--font-kapitalis); font-weight: 600; font-size: 1rem; letter-spacing: .06em; color: var(--gold-hell);
  background: rgba(8, 12, 34, .72); border: 1px solid rgba(236, 210, 142, .3); pointer-events: none;
}
.hinab-karte {
  position: absolute; right: max(.9rem, env(safe-area-inset-right, 0px)); top: .9rem; width: 3.2rem; height: auto; aspect-ratio: 96 / 150;
  padding: .3rem; border-radius: 10px; background: rgba(8, 12, 34, .72); border: 1px solid rgba(236, 210, 142, .3); cursor: pointer;
}
@media (min-width: 900px) { .hinab-karte { width: 4.2rem; } }

/* Die Vorlage von 1694: Fontanas Tafeln zum Vergrößern (src/gross.js) */
.vorlage { max-width: 72rem; margin: 0 auto; padding: 0 max(1.25rem, env(safe-area-inset-right, 0px)) clamp(3.5rem, 8vw, 5.5rem) max(1.25rem, env(safe-area-inset-left, 0px)); }
.vorlage-titel { margin: 0 auto .5rem; max-width: 46rem; text-align: center; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); color: #fff; }
.vorlage-text { margin: 0 auto 1.6rem; max-width: 40rem; text-align: center; line-height: 1.6; color: var(--auf-nacht-2); text-wrap: pretty; }
.vorlage-bilder { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .vorlage-bilder { grid-template-columns: 1fr 1fr; align-items: start; } }
.vorlage-bild { margin: 0; }
.vorlage-rahmen { display: block; overflow: hidden; border-radius: 12px; background: #e9dfc7; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.vorlage-rahmen picture, .vorlage-rahmen img { display: block; width: 100%; height: auto; }
.vorlage-bild figcaption { margin-top: .7rem; font-family: var(--font-ui); font-size: .85rem; line-height: 1.5; color: var(--auf-nacht-2); }
.vorlage-bild .nachweis { display: block; margin-top: .25rem; color: var(--auf-nacht-3); }
.hinab-nachweis { padding-bottom: 2.5rem; }

/* ------------------------------------------------------------ Schicht für Schicht */
.schichten { padding: clamp(4rem, 9vw, 7rem) max(1.25rem, env(safe-area-inset-right, 0px)) clamp(3rem, 7vw, 5rem) max(1.25rem, env(safe-area-inset-left, 0px)); background: var(--paper); }
.schichten-bild { max-width: 62rem; margin: 0 auto; }
.schichten-buehne {
  position: relative; aspect-ratio: 3 / 2; border-radius: 18px; overflow: hidden; background: #1e1812;
  box-shadow: var(--shadow); isolation: isolate;
}
.schichten-svg { width: 100%; height: 100%; }
@media (max-width: 559px) { .schichten-buehne { aspect-ratio: 1 / 1; border-radius: 14px; } }
.schicht { transition: opacity .8s ease; }
.schicht:not(.ist-da) { opacity: 0; }
.marke { display: none; }
.js .marke {
  display: block; position: absolute; width: 0; height: 0; padding: 0; border: 0; background: none;
  opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.js .marke.ist-da { opacity: 1; visibility: visible; }
.js .marke.ist-da.ist-aussen { opacity: 0; visibility: hidden; }
.marke-punkt {
  position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold-hell);
  box-shadow: 0 0 0 3px rgba(8, 12, 34, .55), 0 0 14px rgba(236, 210, 142, .85);
}
.marke-text {
  position: absolute; top: 0; left: 13px; transform: translateY(-50%); white-space: nowrap;
  font-family: var(--font-ui); font-size: .78rem; font-weight: 600; line-height: 1.2; color: #fff;
  background: rgba(8, 12, 34, .86); padding: .3rem .6rem; border-radius: 999px; border: 1px solid rgba(236, 210, 142, .4);
  transition: background-color .2s ease, color .2s ease;
}
.marke[data-lage="links"] .marke-text { left: auto; right: 13px; }
.marke[aria-expanded="true"] .marke-text, .marke:hover .marke-text { background: var(--gold-hell); color: var(--night); }
.marke:focus-visible { outline: none; }
.marke:focus-visible .marke-text { outline: 2px solid var(--gold-hell); outline-offset: 2px; }
@media (max-width: 559px) {
  .marke-text { font-size: .7rem; padding: .22rem .5rem; }
}

.schichten-steuer { display: none; }
.js .schichten-steuer { display: flex; align-items: center; gap: .6rem; margin: 1.1rem auto 0; max-width: 46rem; }
.schichten-knopf {
  flex: none; display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--gold-line);
  background: var(--sheet); color: var(--gold-text); font-family: var(--font-ui); font-size: 1.15rem; font-weight: 700; cursor: pointer;
}
.schichten-knopf:hover { background: var(--gold-tint); }
.schichten-knopf:disabled { opacity: .4; cursor: default; }
.schichten-knopf svg { width: 1rem; height: 1rem; }
.schichten-regler { flex: 1; min-width: 0; accent-color: var(--gold); height: 2.6rem; cursor: pointer; }
.schichten-jahre { display: none; }
.js .schichten-jahre { display: flex; justify-content: space-between; gap: .2rem; max-width: 46rem; margin: .1rem auto 0; padding: 0 3.3rem; list-style: none; }
/* Höher, als sie aussehen: Die Tippfläche reicht über und unter die Zahl, die Zeile bleibt gleich hoch */
.schichten-jahr-knopf {
  border: 0; background: none; padding: .6rem .1rem; margin-block: -.35rem; cursor: pointer; font-family: var(--font-ui); font-size: .72rem; font-weight: 600;
  color: var(--ink-3); font-variant-numeric: tabular-nums; border-radius: 6px;
}
.schichten-jahr-knopf[aria-current="true"] { color: var(--gold-text); }
@media (max-width: 559px) { .js .schichten-jahre { padding: 0 3.2rem; } .schichten-jahr-knopf { font-size: .62rem; } }

.schichten-liste { list-style: none; margin: 1.6rem auto 0; padding: 0; max-width: 46rem; display: grid; gap: 1.2rem; }
.js .schichten-liste { display: block; position: relative; margin-top: 1rem; min-height: 11.5rem; }
/* Die übrigen Stufen nur unsichtbar, nicht display: none: Safaris Reader und „Seite anhören“ lassen Verstecktes weg und
   sollen alle Stufen zeigen. inert (src/hinab.js) nimmt sie Tastatur und Screenreader. */
.js .schichten-stufe:not(.ist-aktiv) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.js .schichten-stufe.ist-aktiv { animation: stufe .5s ease; }
@keyframes stufe { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.schichten-jahr { margin: 0; font-family: var(--font-kapitalis); font-weight: 600; font-size: 1.05rem; letter-spacing: .08em; color: var(--gold-text); }
.schichten-titel { margin: .1rem 0 .4rem; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.45rem, 1.25rem + .8vw, 1.9rem); line-height: 1.15; }
.schichten-text { margin: 0; line-height: 1.62; color: var(--ink-2); hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
.schichten-text a:not(.ref) { text-decoration-color: var(--gold-line); }
.schichten-infos { max-width: 46rem; margin: 0 auto; }
.schichten-info { display: none; }
.js .schichten-info.ist-offen {
  display: block; margin: 1rem 0 0; padding: .8rem 1rem; border-left: 3px solid var(--gold); background: var(--gold-tint); border-radius: 0 10px 10px 0;
  font-size: .95em; line-height: 1.55; color: var(--ink-2); animation: stufe .4s ease;
}
.schichten-info strong { color: var(--ink); font-weight: 600; }
.schichten-nachweis { max-width: 46rem; margin: 1.2rem auto 0; font-family: var(--font-ui); font-size: .78rem; line-height: 1.5; color: var(--ink-3); }
.schichten-nachweis a { color: inherit; text-decoration-color: var(--gold-line); text-underline-offset: .15em; }

/* ------------------------------------------------------------ Weniger Bewegung */
@media (prefers-reduced-motion: reduce) {
  .schicht, .js .marke, .js .station-karte { transition: none; }
}
.artikel-lead a { color: inherit; text-decoration-color: var(--gold-line); text-underline-offset: .18em; }
.artikel-lead a:hover { color: var(--gold-text); }
