/* Nils N. Rohe, Startseite. Gestaltung: ein Blatt der Alpenvereinskarte auf weißem Kartenpapier. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --papier: #FFFFFF;
  --tinte: #141414;
  --druck: #000;
  --hoehenlinie: #8B5A2B;
  --wald: #7FA66B;
  --sand: #E8DCC0;      /* Laufbahn im Stadion (gelaende.py: SAND) */
  --rasen: #C6DAB8;     /* Rasen im Stadion (gelaende.py: RASEN) */
  --wasser: #2F6FA3;
  --wasser-hell: #BFD6EA;
  --route: #C8102E;
  --route-dunkel: #A40D26;
  --weiss: #fff;
  --schrift: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --rand: 48px;
  --leiste: 52px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--hoehenlinie) var(--papier);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--papier); }
::-webkit-scrollbar-thumb { background: var(--hoehenlinie); border: 2px solid var(--papier); }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font: 400 17px/1.55 var(--schrift);
  font-stretch: 100%;
  caret-color: var(--route);
}

::selection { background: var(--route); color: var(--weiss); }
:focus-visible { outline: 3px solid var(--route); outline-offset: 3px; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
img { display: block; }
b, strong { font-weight: 700; }

.nur-vorlesen {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.sprung {
  position: absolute; left: var(--rand); top: -100px; z-index: 40;
  padding: 10px 16px; background: var(--weiss); color: var(--druck); border: 1px solid var(--druck);
  font-weight: 600; text-decoration: none;
}
.sprung:focus { top: 12px; }

/* Kopfbalken: der Titelstreifen des Kartenblatts */
h1, h2, h3 { text-wrap: balance; }

.kopf {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 48px;
  min-height: 118px; padding: 22px var(--rand);
  background: var(--druck); color: var(--weiss);
}
.kopf h1 {
  margin: 0; font-size: clamp(40px, 4.45vw, 64px); line-height: 1; font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em;
  white-space: nowrap;
}
.kopf .satz { margin: 0; max-width: min(560px, 48%); font-size: clamp(17px, 1.53vw, 22px); line-height: 1.3; }
.kopf-links { position: absolute; right: var(--rand); top: 10px; display: flex; gap: 22px; }
.kopf-links .sprache { position: static; }
.kopf-kontakt {
  font-size: 14px; font-weight: 600; color: var(--weiss);
  display: inline-block; padding: 11px 6px; margin: -11px -6px;
}
.kopf-kontakt:focus-visible { outline-color: var(--weiss); }
.sprache {
  position: absolute; right: var(--rand); top: 10px;
  font-size: 14px; font-weight: 500; color: var(--weiss);
  /* Trefferfläche mindestens 44 px hoch; der Gegenrand hält das Layout unverändert */
  display: inline-block; padding: 11px 6px; margin: -11px -6px;
}
.sprache:focus-visible { outline-color: var(--weiss); }

/* Schmale Leiste: bleibt oben, sobald der große Kopfbalken aus dem Bild ist (js/site.js) */
html { scroll-padding-top: var(--leiste); }
.leiste {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--leiste);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 var(--rand);
  background: var(--druck); color: var(--weiss);
  transform: translateY(-100%); visibility: hidden; transition: transform 0.25s ease-out, visibility 0s linear 0.25s;
}
.leiste.da { transform: none; visibility: visible; transition: transform 0.25s ease-out; }
.leiste a { color: var(--weiss); padding: 11px 0; }
.leiste a:focus-visible { outline-color: var(--weiss); }
.leiste-name { font-size: 22px; line-height: 1; font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em; text-decoration: none; }
.leiste-kontakt { font-size: 15px; font-weight: 600; }

/* Karte */
.karte { position: relative; max-width: 1600px; margin: 0 auto; background: var(--papier); }
.blatt { position: relative; aspect-ratio: 1440 / 782; overflow: hidden; }
.karte picture { display: contents; }
/* Das Geländebild reicht über das Blatt hinaus (Rand 402 × 450 Blatteinheiten), damit die Bühne
   jedes Fenster füllt; ohne Bühne schneidet das Blatt den Rand ab */
.gelaende { position: absolute; left: -27.9167%; top: -57.5448%; width: 155.8333%; height: 215.0895%; max-width: none; }
.ueberlagerung { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ueberlagerung-hoch { display: none; }

.route { fill: none; stroke: var(--route); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.schweif { fill: none; stroke: var(--route); stroke-width: 3; stroke-linecap: round; }
.ring { fill: var(--weiss); stroke: var(--route); stroke-width: 3; }
.dreieck { fill: var(--druck); }

.wegpunkte, .hoehenpunkte { list-style: none; margin: 0; padding: 0; }
.wegpunkte li, .hoehenpunkte li {
  position: absolute;
  left: calc(var(--xq) * 1%); top: calc(var(--yq) * 1%);
  --t: var(--tq);
  white-space: nowrap;
}
.wegpunkte li {
  transform: translate(11px, 9px);
  font-size: clamp(13px, 0.98vw, 14px); line-height: 1.2; font-weight: 600; font-stretch: 90%; color: var(--route);
}
.wegpunkte .jahr { font-variant-numeric: tabular-nums; }
.wegpunkte li[data-id="studium"] { transform: translate(9px, -50%); }
.hoehenpunkte li { transform: translate(12px, -50%); line-height: 1; }
.hoehenpunkte b {
  display: block; font-size: clamp(21px, 1.95vw, 28px); font-weight: 700; font-stretch: 76%; color: var(--druck);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.hoehenpunkte span { display: block; margin-top: 4px; font-size: clamp(13px, 1.05vw, 15px); line-height: 1.2; font-weight: 500; font-stretch: 90%; }
.hoehenpunkte .gipfel b { font-size: clamp(30px, 2.8vw, 40px); }

/* Relief: die Karte kippt zum Gebirge (js/relief.js) */
.blatt.kippbar { cursor: grab; touch-action: pan-y pinch-zoom; }
.blatt.dreiD { cursor: grabbing; }
.blatt.kippbar .wegpunkte, .blatt.kippbar .hoehenpunkte { user-select: none; -webkit-user-select: none; }
.relief, .relief-linien { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.relief { opacity: 0; transition: opacity 0.15s ease-out; }
.relief.sichtbar { opacity: 1; }
.relief-linien { display: none; overflow: visible; }
.blatt.dreiD .relief-linien { display: block; }
.blatt.dreiD .gelaende, .blatt.dreiD .ueberlagerung { visibility: hidden; }
.r3-route { fill: none; stroke: var(--route); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.r3-schweif { fill: none; stroke: var(--route); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 10 8; }
.r3-ring { fill: var(--weiss); stroke: var(--route); stroke-width: 3; }
.r3-dreieck { fill: var(--druck); }
/* Stadion im 3D-Bild: gleiche Zeichnung wie im Geländebild, Strichstärken folgen dem Maßstab (--st) */
.r3-stadion path { fill: none; stroke: var(--druck); stroke-linecap: round; stroke-linejoin: round; }
.r3-stadion .r3-st-flaeche { fill: var(--papier); stroke: none; }
.r3-stadion .r3-st-reihen { stroke-opacity: 0.6; stroke-width: calc(var(--st, 1) * 0.4px); }
.r3-stadion .r3-st-gaenge { stroke-width: calc(var(--st, 1) * 0.55px); }
.r3-stadion .r3-st-arkaden { stroke-width: calc(var(--st, 1) * 0.5px); }
.r3-stadion .r3-st-mauer { stroke-width: calc(var(--st, 1) * 1.1px); }
.r3-stadion .r3-st-podest { stroke-width: calc(var(--st, 1) * 0.75px); }
.r3-stadion .r3-st-bahn { fill: var(--sand); stroke-width: calc(var(--st, 1) * 0.75px); }
.r3-stadion .r3-st-bahnen { stroke-opacity: 0.45; stroke-width: calc(var(--st, 1) * 0.35px); }
.r3-stadion .r3-st-rasen { fill: var(--rasen); stroke-width: calc(var(--st, 1) * 0.75px); }
/* Tempel im 3D-Bild: Grundriss wie im Geländebild, Gebälk und Dach wachsen mit dem Relief */
.r3-tempel path { fill: var(--papier); stroke: var(--druck); stroke-linejoin: miter; stroke-width: calc(var(--st, 1) * 0.5px); }
.r3-tempel .r3-t-stufe-0 { stroke-width: calc(var(--st, 1) * 0.75px); }
.r3-tempel .r3-t-cella, .r3-tempel .r3-t-flaeche { stroke-width: calc(var(--st, 1) * 0.7px); }
.r3-tempel .r3-t-saeulen { fill: none; stroke-linecap: round; stroke-width: calc(var(--st, 1) * 1.6px); }
.zeichen-hinweis { color: var(--tinte); }

/* Scrollflug: das Blatt klebt, während die Spur durchläuft (js/relief.js) */
.flug-huelle { position: relative; }
.flug-spur { height: 700svh; }
html.flug-an { scroll-behavior: auto; }
.karte.flug { max-width: none; padding: 0; }
.flug-buehne { position: sticky; top: var(--buehne-oben, 0px); height: calc(100svh - var(--buehne-oben, 0px)); overflow: hidden; overflow: clip; background: var(--papier); }
.karte.flug .blatt { position: absolute; margin: 0; max-width: none; aspect-ratio: auto; overflow: visible; }
.zeichenerklaerung { transition: opacity 0.3s ease-out; }
.karte.im-flug .zeichenerklaerung { opacity: 0; pointer-events: none; }
.blatt.dreiD .hoehenpunkte li, .blatt.dreiD .wegpunkte li { opacity: var(--sicht, 1); }
.blatt.im-flug .hoehenpunkte li:not(.hier) { opacity: calc(var(--sicht, 1) * 0.3); }
.blatt.im-flug { cursor: default; }
.blatt.im-flug .gipfel-knopf { pointer-events: none; }
.flug-hinweis { display: none; }
.flug-tafel {
  position: absolute; left: var(--rand); bottom: var(--rand); z-index: 6; width: min(360px, calc(100% - 2 * var(--rand)));
  padding: 16px 18px 14px; background: var(--weiss); border: 1px solid var(--druck);
  opacity: 0; transform: translateY(8px); transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.flug-tafel[hidden] { display: none; }
.flug-tafel.da { opacity: 1; transform: none; }
.flug-tafel h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.2; font-weight: 700; }
.flug-tafel p { margin: 0; font-size: 15px; line-height: 1.45; }
.flug-tafel .station-zeit { margin-bottom: 4px; font-size: 14px; }
.flug-tafel .flug-titel { margin-bottom: 6px; font-size: 24px; line-height: 1.1; font-weight: 700; font-stretch: 112%; }
@media (min-width: 900px) {
  .kopf { position: sticky; top: 0; z-index: 30; }
  .leiste { display: none; }
  html { scroll-padding-top: var(--buehne-oben, 118px); }
  .flug-buehne .zeichenerklaerung { z-index: 5; }
  .flug-buehne .zeichenerklaerung.oben { top: var(--rand); bottom: auto; }
}
/* Werdegang: mit Flug nur noch für Screenreader und Google, ohne Flug als Liste */
.flug-an #werdegang { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Gipfel sind klickbar: die Zahl öffnet ihre Erläuterung */
.gipfel-knopf { display: block; color: inherit; text-decoration: none; padding: 6px 4px; margin: -6px -4px; cursor: pointer; }
.gipfel-knopf b { text-decoration: underline 2px transparent; text-underline-offset: 0.12em; transition: text-decoration-color 0.15s ease-out; }
.gipfel-knopf:hover b, .gipfel-knopf[aria-expanded="true"] b { text-decoration-color: var(--route); }
.weg-knopf { color: var(--route); text-decoration: underline 1px transparent; text-underline-offset: 0.15em; padding: 15px 6px; margin: -15px -6px; }
.weg-knopf:hover, .weg-knopf[aria-expanded="true"] { text-decoration-color: var(--route); }

/* Erläuterungen: ohne JavaScript als Liste unter der Karte, mit JavaScript als Tafel am Gipfel */
.erlaeuterungen { max-width: 1180px; margin: 0 auto; padding: 40px var(--rand) 8px; }
.erlaeuterungen h2 { margin: 0 0 16px; font-size: 22px; font-weight: 700; font-stretch: 104%; }
.erlaeuterung { max-width: 62ch; margin-bottom: 18px; }
.erlaeuterung h3, .gipfeltafel h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.3; font-weight: 700; }
.erlaeuterung p, .gipfeltafel p { margin: 0; }
.js .erlaeuterungen { display: none; }

.gipfeltafel {
  position: absolute; z-index: 5; width: 320px;
  padding: 14px 44px 14px 16px; background: var(--weiss); border: 1px solid var(--druck);
  font-size: 15px; line-height: 1.45;
}
.gipfeltafel[hidden] { display: none; }
.tafel-zu {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px;
  display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--druck); cursor: pointer;
}
.tafel-zu svg { width: 14px; height: 14px; }
.tafel-zu:hover { color: var(--route); }

/* Wegweiser: die einzige Knopfform der Seite */
.wegweiser {
  --tafel: var(--route);
  --hoehe: 54px;
  position: relative;
  display: inline-flex; align-items: center; height: var(--hoehe); padding: 0 16px 0 22px;
  background: var(--tafel); color: var(--weiss);
  font-size: 22px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.wegweiser::after {
  content: ""; position: absolute; left: 100%; top: 0;
  border-top: calc(var(--hoehe) / 2) solid transparent; border-bottom: calc(var(--hoehe) / 2) solid transparent;
  border-left: calc(var(--hoehe) * 0.41) solid var(--tafel);
}
.blatt > .wegweiser { --hoehe: clamp(44px, 3.75vw, 54px); font-size: clamp(17px, 1.53vw, 22px); padding: 0 clamp(12px, 1.1vw, 16px) 0 clamp(16px, 1.53vw, 22px); }
.wegweiser:hover { --tafel: var(--route-dunkel); }
.wegweiser:focus-visible { outline-color: var(--druck); }
.blatt > .wegweiser { position: absolute; left: 79.9%; top: 13.4%; }

/* Zeichenerklärung */
.zeichenerklaerung {
  display: flow-root;
  position: absolute; left: var(--rand); bottom: var(--rand); width: clamp(236px, 18vw, 280px);
  padding: 14px 14px 12px; background: var(--weiss); border: 1px solid var(--druck);
}
.zeichenerklaerung h2 { margin: 0 0 10px; font-size: clamp(13px, 1.05vw, 15px); line-height: 1.2; font-weight: 700; }
.zeichenerklaerung img {
  float: left; width: clamp(64px, 6vw, 88px); height: auto; aspect-ratio: 140 / 176; object-fit: cover; object-position: 50% 58%;
  margin: 0 14px 4px 0; border: 1px solid var(--druck);
}
.zeichen { list-style: none; margin: 0; padding: 0; font-size: clamp(13px, 1.05vw, 15px); line-height: 1.3; }
.zeichen li { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 7px; }
.zeichen svg { flex: none; width: 24px; height: 16px; margin-top: 2px; }
.ort { clear: both; margin: 10px 0 0; font-size: clamp(12px, 0.98vw, 14px); font-stretch: 90%; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Kartenrand als Fuß */
.rand {
  position: relative;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  padding: 26px var(--rand) 22px; border-top: 1px solid var(--druck);
  font-size: 14px; font-stretch: 90%; font-variant-numeric: tabular-nums;
}
.rand::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: repeating-linear-gradient(90deg, var(--druck) 0 1px, transparent 1px 72px);
  background-position: calc(var(--rand) - 1px) 0;
}
.rand p { margin: 0; }
.rand-zeile { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.rand nav { display: flex; flex-wrap: wrap; gap: 20px; }
.rand nav a { padding: 11px 6px; margin: -11px -6px; }

/* Abschnitte unter dem Blatt */
.abschnitt { border-top: 1px solid var(--druck); padding: 72px 0 88px; }
.spalte { max-width: 1180px; margin: 0 auto; padding: 0 var(--rand); }
.abschnitt h2 {
  margin: 0 0 18px; font-size: 44px; line-height: 1.05; font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em;
}
.vorspann { max-width: 60ch; margin: 0 0 56px; font-size: 20px; line-height: 1.45; }

.projekt {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px 64px; align-items: start;
  padding: 44px 0 52px; border-top: 1px solid var(--hoehenlinie);
}
.projekt h3 { margin: 0 0 18px; font-size: 26px; line-height: 1.15; font-weight: 700; font-stretch: 104%; }
.projekt dl { margin: 0; }
.projekt dt { margin: 0 0 2px; font-weight: 600; font-stretch: 90%; color: var(--hoehenlinie); line-height: 1.4; }
.projekt dd { margin: 0 0 16px; max-width: 58ch; }
.projekt dd:last-child { margin-bottom: 0; }
/* Der kurze Text begleitet das Exponat beim Scrollen */
@media (min-width: 900px) { .projekt-text { position: sticky; top: calc(var(--buehne-oben, 118px) + 32px); } }

.exponat { margin: 0; }
.exponat figcaption { margin-top: 10px; font-size: 14px; font-stretch: 90%; }
.ausgabe {
  background: var(--weiss); border: 1px solid var(--druck); padding: 22px 26px 18px;
  font-size: 15px; line-height: 1.45;
}
.ausgabe p { margin: 0 0 8px; }
.ausgabe ul, .ausgabe ol { margin: 0 0 10px; padding-left: 20px; }
.ausgabe li { margin-bottom: 4px; }
.ausgabe-firma { font-size: 20px; font-weight: 700; line-height: 1.2; margin-bottom: 8px !important; }
.ausgabe-zwischen { font-weight: 700; margin: 14px 0 4px !important; }
.mail-betreff { padding-bottom: 10px; margin-bottom: 14px !important; border-bottom: 1px solid var(--druck); font-weight: 700; }
.mail-betreff span { font-weight: 500; font-stretch: 90%; color: var(--hoehenlinie); margin-right: 8px; }

/* Exponat Follow-up-Generator: Vorlage und Fassung umschalten */
.gen-knoepfe { display: none; flex-wrap: wrap; gap: 8px; }
.js .gen-knoepfe { display: flex; }
.gen-vorlagen { margin-bottom: 16px; }
.gen-fassungen { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--druck); }
.gen-knopf {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--druck); border-radius: 0;
  background: var(--weiss); color: var(--druck); cursor: pointer;
  font: 600 14px/1 var(--schrift); font-stretch: 90%; letter-spacing: 0.02em;
}
.gen-knopf:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.gen-knopf[aria-pressed="true"] { background: var(--druck); color: var(--weiss); text-decoration: none; }
.gen-felder { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0 0 16px; font-size: 14px; line-height: 1.4; }
.gen-feld { display: contents; }
.gen-feld dt { font-weight: 600; font-stretch: 90%; color: var(--hoehenlinie); }
.gen-feld dd { margin: 0; }
.generator[data-vorlage="hot"] .gen-feld[data-nur] { display: none; }
.gen-mail { padding-top: 14px; border-top: 1px solid var(--druck); }
.gen-text[hidden] { display: none; }
.pitch-eingabe { margin: 0 0 12px !important; padding-bottom: 10px; border-bottom: 1px solid var(--druck); font-weight: 700; }
.pitch-eingabe span { font-weight: 500; font-stretch: 90%; color: var(--hoehenlinie); margin-right: 8px; }
.pitch .gen-vorlagen { margin-bottom: 14px; }
.pitch-ausgabe .ausgabe-zwischen:first-child { margin-top: 0 !important; }

.nebenbei { margin: 0; padding-top: 28px; border-top: 1px solid var(--hoehenlinie); }

/* Werdegang: die Route als Liste */
.stationen { list-style: none; margin: 0; padding: 0; position: relative; max-width: 760px; }
.stationen::before { content: ""; position: absolute; left: 11px; top: 10px; bottom: 6px; width: 3px; background: var(--route); }
.stationen::after { content: ""; position: absolute; left: 10px; bottom: -34px; height: 32px; border-left: 3px dashed var(--route); }
.station { position: relative; padding: 0 0 44px 44px; }
.station:last-child { padding-bottom: 6px; }
.station::before {
  content: ""; position: absolute; left: 3px; top: 4px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--weiss); border: 3px solid var(--route);
}
.station.aktuell::before { background: var(--route); }
.station-zeit { margin: 0 0 4px; font-size: 15px; font-weight: 600; font-stretch: 90%; color: var(--route); font-variant-numeric: tabular-nums; }
.station h3 { margin: 0 0 8px; font-size: 22px; line-height: 1.2; font-weight: 700; }
.station p { margin: 0; max-width: 60ch; }

/* Über mich */
.ueber-raster { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 40px 64px; align-items: start; }
.ueber-bild { width: 100%; height: auto; border: 1px solid var(--druck); }
.ueber-liste { list-style: none; margin: 0; padding: 0; max-width: 46ch; font-size: 20px; line-height: 1.45; }
.ueber-liste li { position: relative; padding-left: 30px; margin-bottom: 22px; }
.ueber-liste li:last-child { margin-bottom: 0; }
.ueber-liste li::before {
  content: ""; position: absolute; left: 4px; top: 0.5em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--druck);
}

/* Kontakt: Wegweiser an einem Pfosten */
.pfosten { list-style: none; margin: 0; padding: 12px 0 12px 34px; position: relative; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.pfosten::before { content: ""; position: absolute; left: 10px; top: -8px; bottom: -16px; width: 8px; background: var(--druck); }
.pfosten li { position: relative; }
.pfosten li::before { content: ""; position: absolute; left: -24px; top: 50%; width: 24px; height: 4px; margin-top: -2px; background: var(--druck); }

/* Bewegung: die Route zeichnet sich einmal, alles andere steht */
@media (prefers-reduced-motion: no-preference) {
  .route {
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: route-zeichnen 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
  }
  .schweif, .ring, .dreieck, .wegpunkte li, .hoehenpunkte li, .blatt > .wegweiser {
    animation: erscheinen 0.35s cubic-bezier(0.22, 1, 0.36, 1) calc(0.3s + var(--t, 1) * 1.5s) both;
  }
  html { scroll-behavior: smooth; }
  .schweif { --t: 1.02; }
  .blatt > .wegweiser { --t: 1.14; }
}
@keyframes route-zeichnen { to { stroke-dashoffset: 0; } }
@keyframes erscheinen { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .gipfeltafel:not([hidden]) { animation: erscheinen 0.15s ease-out; }
}

/* Mittlere Breiten: der höchste Punkt beschriftet nach links, damit der Pfad frei bleibt */
@media (min-width: 900px) and (max-width: 1200px) {
  .hoehenpunkte .gipfel { transform: translate(calc(-100% - 12px), -50%); text-align: right; }
  .hoehenpunkte li[data-id="112"] { transform: translate(12px, calc(-100% - 2px)); }
}

/* Handy und schmale Fenster: das Blatt steht hochkant */
@media (max-width: 899px) {
  :root { --rand: 16px; --leiste: 48px; }
  .leiste-name { font-size: 19px; }
  .kopf { flex-direction: column; align-items: flex-start; gap: 14px; min-height: 0; padding: 22px var(--rand) 24px; }
  .kopf h1 { font-size: 40px; white-space: normal; }
  .kopf .satz { font-size: 17px; max-width: 34em; }
  .sprache { position: static; align-self: flex-end; margin: -13px -6px -11px; }
  .kopf-links { position: static; align-self: flex-end; margin-top: -2px; }
  .kopf-links .sprache { margin: -11px -6px; }
  .blatt { aspect-ratio: 390 / 700; max-width: 600px; margin: 0 auto; }
  .gelaende { left: -38.4615%; top: -21.4286%; width: 176.9231%; height: 142.8571%; }   /* Rand 150 × 150 */
  .ueberlagerung-quer { display: none; }
  .ueberlagerung-hoch { display: block; }
  .wegpunkte li, .hoehenpunkte li { left: calc(var(--xh) * 1%); top: calc(var(--yh) * 1%); --t: var(--th); }
  .wegpunkte li { transform: translate(12px, -50%); }
  .wegpunkte li[data-id="studium"] { transform: translate(6px, -50%); }
  .hoehenpunkte li { transform: translate(-50%, 9px); width: 128px; text-align: center; white-space: normal; }
  .wegpunkte li { font-size: 14px; }
  .hoehenpunkte b { font-size: 26px; }
  .hoehenpunkte .gipfel b { font-size: 34px; }
  .gipfeltafel { position: fixed; left: 16px !important; right: 16px; top: auto !important; bottom: 16px; width: auto; z-index: 20; }
  .hoehenpunkte span { font-size: 14px; }
  .wegweiser { --hoehe: 46px; padding: 0 14px 0 18px; font-size: 18px; }
  .blatt > .wegweiser { --hoehe: 46px; left: 61.5%; top: 4.3%; font-size: 18px; padding: 0 14px 0 18px; }
  .abschnitt { padding: 48px 0 56px; }
  .abschnitt h2 { font-size: 34px; }
  .vorspann { font-size: 18px; margin-bottom: 36px; }
  .projekt { grid-template-columns: 1fr; gap: 24px; padding: 32px 0 40px; }
  .projekt h3 { font-size: 23px; }
  .ausgabe { padding: 18px 18px 14px; }
  .station h3 { font-size: 20px; }
  .ueber-raster { grid-template-columns: 1fr; gap: 28px; }
  .ueber-bild { max-width: 280px; }
  .ueber-liste { font-size: 18px; }
  .flug-spur { height: 600svh; }
  .flug-an .zeichenerklaerung .zeichen-hinweis { display: none; }
  .karte.flug.oben .flug-hinweis {
    display: block; position: absolute; left: 12px; top: 10px; z-index: 4; margin: 0;
    padding: 6px 10px; background: var(--weiss); border: 1px solid var(--druck); font-size: 13px; font-stretch: 90%; white-space: nowrap;
  }
  .flug-legende { display: flow-root; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--druck); }
  .flug-legende img { float: left; width: 64px; height: auto; aspect-ratio: 140 / 176; object-fit: cover; object-position: 50% 58%; margin-right: 12px; border: 1px solid var(--druck); }
  .flug-legende .zeichen { font-size: 14px; }
  .flug-legende .zeichen li { margin-bottom: 4px; }
  .flug-tafel { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 12px 14px; }
  .karte.flug > .zeichenerklaerung { margin-left: var(--rand); margin-right: var(--rand); }
  .flug-tafel h3 { font-size: 18px; }
  .flug-tafel p { font-size: 14px; }
  .gen-felder { grid-template-columns: 1fr; gap: 0; }
  .projekt .gen-feld dd { margin-bottom: 14px; }
  .zeichenerklaerung { position: static; width: auto; max-width: 600px; margin: 16px auto 0; }
  .karte { padding: 0 var(--rand); }
  .karte .blatt { margin-left: calc(-1 * var(--rand)); margin-right: calc(-1 * var(--rand)); }
  @media (min-width: 640px) { .karte .blatt { margin-left: auto; margin-right: auto; } }
  .zeichenerklaerung h2, .zeichen { font-size: 15px; }
  .ort { font-size: 14px; }
  .zeichenerklaerung img { width: 120px; }
}

/* Textseiten: Impressum, Datenschutz, 404 */
.kopf-name { margin: 0; font-size: clamp(28px, 2.5vw, 36px); line-height: 1; font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em; }
.kopf-name a { text-decoration: none; padding: 8px 0; }
.kopf-name a:focus-visible { outline-color: var(--weiss); }
.textseite .kopf { min-height: 0; padding: 26px var(--rand); }
.textseite .sprache { position: static; }
.lesen { border-top: 0; padding-top: 56px; }
.lesen h1 { margin: 0 0 20px; font-size: clamp(34px, 3vw, 44px); line-height: 1.05; font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em; }
.lesen h2 { margin: 36px 0 8px; font-size: 22px; line-height: 1.2; font-weight: 700; font-stretch: 104%; }
.lesen p { max-width: 66ch; margin: 0 0 14px; }
.nachtrag { color: var(--route); font-weight: 600; }
.stand { margin-top: 32px; font-size: 14px; font-stretch: 90%; }
.pfosten-einzeln { margin-top: 32px; }
@media (max-width: 899px) {
  .textseite .kopf { flex-direction: row; align-items: center; justify-content: space-between; }
  .lesen { padding-top: 36px; }
}
