/* ki-training-kbd.de, Motiv „Lernpfad“: Wanderkarte, Wegweiser, Wegmarken, Höhenprofil.
   Schriften lokal (SIL OFL 1.1), keine Abrufe bei Dritten. Eine Hintergrundfarbe für die ganze Seite (auch Kopf und Fuß),
   damit iPhone-Safari die Ränder hinter Status- und Adressleiste nicht in einer falschen Farbe einfriert. */

@font-face { font-family: "Source Sans"; src: url("/assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/assets/fonts/cormorant-garamond-normal-300-700-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --karte: #E9EEE2;        /* Kartenpapier */
  --karte-2: #DCE4D2;      /* Waldfläche */
  --weiss: #FAFBF6;
  --tanne: #183526;        /* Schrift */
  --tanne-2: #45584B;
  --signal: #F2C230;       /* Wegweiser-Gelb */
  --signal-hell: #F8E7A6;
  --weg: #B3301C;          /* Wegmarkierung rot */
  --weg-hell: #F2D8D0;
  --hoehe: #9C8A63;        /* Höhenlinien */
  --linie: #BCC8B0;
  --schatten: 0 1px 0 rgba(24, 53, 38, .06), 0 16px 34px -22px rgba(24, 53, 38, .4);
  --kopf-h: 4.4rem;
  --serif: "Cormorant", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans", "Helvetica Neue", Arial, sans-serif;
  --rand: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--kopf-h) + 1.2rem); background: var(--karte); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--karte); color: var(--tanne); font: 400 1.125rem/1.62 var(--sans); font-kerning: normal; font-variant-numeric: lining-nums; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--tanne); text-decoration-color: var(--weg); text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { color: var(--weg); }
:focus-visible { outline: 3px solid var(--weg); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--signal); color: var(--tanne); }

h1, h2 { font-family: var(--serif); font-weight: 700; line-height: 1.04; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h3 { font: 700 1.22rem/1.25 var(--sans); margin: 0 0 .45em; letter-spacing: -.005em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .45em; }
strong, b { font-weight: 700; }
.huelle { max-width: 75rem; margin: 0 auto; padding: 0 var(--rand); }
.lesen { max-width: 44rem; }
.leise { color: var(--tanne-2); font-size: 1rem; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kicker { font: 600 1rem/1.4 var(--sans); color: var(--weg); margin: 0 0 .7rem; }
.offen { background: #FFE45C; padding: .05em .3em; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; outline: 1px dashed #8A6A00; }

.sprung { position: absolute; left: -999px; top: .5rem; background: var(--tanne); color: var(--weiss); padding: .6rem 1rem; z-index: 100; }
.sprung:focus { left: 1rem; }
.entwurf { background: var(--signal); color: var(--tanne); font: 600 .95rem/1.4 var(--sans); text-align: center; padding: .45rem var(--rand); }

/* Kopf mit Höhenprofil als Lesefortschritt */
.kopf { position: sticky; top: 0; z-index: 50; background: var(--karte); }
.kopf .huelle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--kopf-h); }
.marke { display: flex; align-items: center; gap: .75rem; min-height: 2.75rem; text-decoration: none; }
.marke-zeichen { width: 2.2rem; height: 2.2rem; flex: none; position: relative; border-radius: 4px; background: var(--weiss); border: 2px solid var(--tanne); }
.marke-zeichen::before { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 7px; margin-top: -3.5px; background: var(--weg); }
.marke-zeichen::after { content: ""; position: absolute; right: -9px; top: 50%; width: 0; height: 0; margin-top: -6px; border: 6px solid transparent; border-left: 7px solid var(--signal); }
.marke-text { display: grid; line-height: 1.05; }
.marke-text b { font: 700 1.55rem/1 var(--serif); letter-spacing: -.01em; }
.marke-text span { font-size: .875rem; color: var(--tanne-2); }
.menue { display: flex; align-items: center; gap: .2rem 1.15rem; }
.menue a { text-decoration: none; font-weight: 600; font-size: 1rem; padding: .35rem 0; white-space: nowrap; }
.menue a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--weg); text-decoration-thickness: 3px; text-underline-offset: .4em; }
.menue-schalter { display: none; }
.hoehenprofil { position: relative; height: 12px; margin-top: -2px; }
.hoehenprofil svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--linie); }
.hp-gelaufen { position: absolute; inset: 0; clip-path: inset(0 calc((1 - var(--fortschritt, 0)) * 100%) 0 0); }
.hp-gelaufen svg { fill: var(--weg); }

/* Knöpfe: rechteckig wie Schilder, nicht als Pillen */
.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .7rem 1.3rem; border-radius: 5px;
  background: var(--tanne); color: var(--weiss); font-weight: 700; font-size: 1.05rem; text-decoration: none; border: 2px solid var(--tanne); transition: background .2s, color .2s; }
.knopf:hover { background: var(--weg); border-color: var(--weg); color: var(--weiss); }
.knopf.hell { background: transparent; color: var(--tanne); }
.knopf.hell:hover { background: var(--tanne); color: var(--weiss); border-color: var(--tanne); }
.knopf.klein { min-height: 2.6rem; padding: .4rem 1rem; font-size: 1rem; }
.knopf.gross { background: var(--signal); border-color: var(--signal); color: var(--tanne); font-size: 1.12rem; min-height: 3.4rem; }
.knopf.gross:hover { background: var(--weiss); border-color: var(--weiss); color: var(--tanne); }
.menue .knopf.klein, .menue .knopf.klein:hover { color: var(--weiss); }
.knoepfe { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: .6rem; }
.aufruf { margin: 2rem 0 0; }

/* Startbühne mit Wegweiser */
.buehne { padding: clamp(2.2rem, 6vw, 4.8rem) 0 clamp(2rem, 5vw, 3.5rem); overflow: clip; }
.buehne .huelle { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.buehne h1 { margin-bottom: .3em; }
.buehne .unterzeile { font-size: clamp(1.15rem, 1.8vw, 1.32rem); max-width: 34rem; color: var(--tanne-2); }
.ziele { list-style: none; padding: 0; margin: 1.4rem 0 1.8rem; display: grid; gap: .5rem; }
.ziele li { display: grid; grid-template-columns: 1.3rem 1fr; gap: .6rem; margin: 0; align-items: baseline; }
.ziele li::before { content: ""; width: 1.05rem; height: .75rem; border: 2px solid var(--tanne); border-radius: 2px; transform: translateY(.1em);
  background: linear-gradient(var(--weiss) 0 30%, var(--weg) 30% 70%, var(--weiss) 70%); }

.wegweiser { position: relative; margin: 0; padding: 1rem 0 0; min-height: 26rem; }
.hoehenlinien { position: absolute; inset: -6% -10% auto -10%; width: 120%; color: var(--hoehe); opacity: .45; pointer-events: none; }
.ww-pfosten { position: absolute; left: 50%; top: 0; bottom: 3.6rem; width: 18px; margin-left: -9px; border-radius: 4px 4px 0 0;
  background: linear-gradient(90deg, #5B4A33, #7A6446 45%, #5B4A33); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); z-index: 0; }
.ww-blaze { position: absolute; left: 2px; right: 2px; bottom: 2.2rem; height: 22px; border: 2px solid var(--tanne); border-radius: 2px;
  background: linear-gradient(var(--weiss) 0 30%, var(--weg) 30% 70%, var(--weiss) 70%); }
.ww-standort { position: relative; z-index: 2; width: max-content; max-width: 70%; margin: 0 auto 1rem; padding: .45rem 1rem; text-align: center;
  background: var(--weiss); border: 2px solid var(--tanne); border-radius: 4px; display: grid; line-height: 1.2; }
.ww-standort span { font-size: .875rem; color: var(--tanne-2); }
.ww-standort b { font-size: 1.05rem; }
.schilder { position: relative; z-index: 1; list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.schild { --tiefe: 2.2rem; position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .3rem 1rem; margin: 0;
  width: calc(50% + 1.2rem); min-height: 3.6rem; padding: .55rem 1rem; background: var(--signal); color: var(--tanne);
  filter: drop-shadow(0 6px 8px rgba(24, 53, 38, .22)); }
.schild.rechts { margin-left: calc(50% - 1.4rem); padding-right: calc(var(--tiefe) + .6rem); clip-path: polygon(0 0, calc(100% - var(--tiefe)) 0, 100% 50%, calc(100% - var(--tiefe)) 100%, 0 100%); }
.schild.links { margin-right: calc(50% - 1.4rem); margin-left: auto; padding-left: calc(var(--tiefe) + .6rem); clip-path: polygon(var(--tiefe) 0, 100% 0, 100% 100%, var(--tiefe) 100%, 0 50%); }
.schild .ziel { font-weight: 700; font-size: 1.05rem; line-height: 1.15; display: flex; align-items: center; gap: .55rem; }
.schild .snr { flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--tanne); color: var(--signal); font-size: .9rem; }
.schild .zeit { font-size: 1rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wegweiser figcaption p { margin: 0; }
.wegweiser figcaption { position: relative; z-index: 2; margin-top: 2.2rem; text-align: center; font-size: .95rem; color: var(--tanne-2); background: var(--karte); }

/* kleines Schild im Seitenkopf der Unterseiten */
.kopf-raster { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: start; }
.kopf-schild { position: relative; width: 17rem; padding-top: 2.4rem; }
.ks-pfosten { position: absolute; left: 3rem; top: 0; bottom: -3rem; width: 14px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #5B4A33, #7A6446 45%, #5B4A33); }
.kopf-schild .schild { width: 100%; margin: 0; }
.kopf-schild .schild.rechts { margin-left: 0; }

/* Trenner: Wegstück mit Wegmarke */
.wegstueck { display: flex; align-items: center; gap: .9rem; max-width: 75rem; margin: 0 auto; padding: 0 var(--rand); height: 2.4rem; }
.w-linie { flex: 1; border-top: 3px dashed var(--linie); }
.w-marke { width: 1.5rem; height: 1rem; border: 2px solid var(--tanne); border-radius: 2px; background: linear-gradient(var(--weiss) 0 30%, var(--weg) 30% 70%, var(--weiss) 70%); }

/* Seitenkopf der Unterseiten */
.seitenkopf { padding: clamp(1.8rem, 5vw, 3.8rem) 0 1.4rem; }
.seitenkopf h1 { max-width: 19ch; font-size: clamp(2.4rem, 5.2vw, 4.1rem); }
.pfad { font-size: .95rem; color: var(--tanne-2); margin-bottom: 1.2rem; }
.pfad a { color: var(--tanne-2); }
.unterzeile { font-size: clamp(1.12rem, 1.6vw, 1.28rem); color: var(--tanne-2); max-width: 44rem; }
.kurz { max-width: 46rem; margin: 1.5rem 0 1.1rem; padding: 1.1rem 1.3rem 1.05rem; background: var(--weiss); border-radius: 6px;
  border-left: 8px solid var(--signal); box-shadow: var(--schatten); }
.kurz p { margin: 0; font-size: 1.1rem; }
.kurz .kurz-marke { font-weight: 700; color: var(--weg); margin-bottom: .35rem; font-size: 1rem; }
.stand { font-size: .95rem; color: var(--tanne-2); margin: 0; }

/* Abschnitte */
.abschnitt { padding: clamp(1.8rem, 4.5vw, 3.4rem) 0; }
.abschnitt.dicht { padding-top: 0; }
.etappen-marke { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--weg); margin: 0 0 .6rem; }
.etappen-marke::before { content: ""; width: 1.25rem; height: .85rem; border: 2px solid var(--tanne); border-radius: 2px; background: linear-gradient(var(--weiss) 0 30%, var(--weg) 30% 70%, var(--weiss) 70%); }
.zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.2rem, 3vw, 2.4rem); margin-bottom: 1.6rem; }
.drei { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin-bottom: 1.6rem; }
.tafel { background: var(--weiss); border-radius: 6px; padding: 1.25rem 1.3rem 1.05rem; border-top: 4px solid var(--tanne); }
.tafel h3 { margin-bottom: .35em; }
.tafel p:last-child { margin-bottom: 0; }
.tafel .traeger { font-size: .95rem; color: var(--tanne-2); margin-bottom: .5rem; }
.merk { padding-left: 1.2rem; }
.merk li::marker { color: var(--weg); }
.hinweis { background: var(--weg-hell); border-radius: 6px; padding: 1rem 1.2rem; margin: 1.4rem 0; }
.hinweis p:last-child { margin: 0; }
.zahl { font: 700 clamp(2.2rem, 4.5vw, 3.2rem)/1 var(--serif); font-variant-numeric: lining-nums; color: var(--weg); display: block; margin-bottom: .3rem; }

/* Lernpfad als Wegstrecke */
.pfad-huelle { position: relative; margin: 2rem 0 1rem; }
.pfad-etappen { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1.2rem; position: relative; }
.pfad-etappen::before { content: ""; position: absolute; left: 50%; top: 1rem; bottom: 1rem; border-left: 3px dashed var(--weg); margin-left: -1.5px; }
html.js-pfad .pfad-etappen::before { display: none; }
.etappe { position: relative; margin: 0; background: var(--weiss); border-radius: 6px; padding: 1.15rem 1.3rem 1.05rem; box-shadow: var(--schatten); }
.etappe { width: calc(50% - 2.5rem); }
.etappe:nth-child(odd) { align-self: flex-start; }
.etappe:nth-child(even) { align-self: flex-end; }
.etappe + .etappe { margin-top: -5.5rem; }
.etappe .marke { position: absolute; top: 1.3rem; width: 1.9rem; height: 1.3rem; border: 2px solid var(--tanne); border-radius: 3px; z-index: 2;
  background: linear-gradient(var(--weiss) 0 30%, var(--linie) 30% 70%, var(--weiss) 70%); transition: background .35s, transform .35s; }
.etappe:nth-child(odd) .marke { right: -2.25rem; }
.etappe:nth-child(even) .marke { left: -2.25rem; }
.etappe.erreicht .marke, html:not(.js-pfad) .etappe .marke { background: linear-gradient(var(--weiss) 0 30%, var(--weg) 30% 70%, var(--weiss) 70%); }
.etappe-nr { font-weight: 700; color: var(--weg); margin: 0 0 .2rem; font-size: 1rem; }
.etappe h3, .etappe h2 { font: 700 1.3rem/1.2 var(--sans); margin: 0 0 .3rem; }
.etappe-zeit { display: inline-block; font-weight: 600; font-size: .95rem; background: var(--signal-hell); padding: .1rem .5rem; border-radius: 3px; margin-bottom: .6rem; }
.etappe p:last-child { margin-bottom: 0; }
.etappe-link a { font-weight: 600; }
.pfad-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; }
.pfad-svg .p-weg { fill: none; stroke: var(--linie); stroke-width: 3; stroke-dasharray: 7 7; stroke-linecap: round; }
.pfad-svg .p-gelaufen { fill: none; stroke: var(--weg); stroke-width: 4; stroke-linecap: round; }

/* Prüfliste */
.pruefliste { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .8rem; counter-reset: p; }
.pruefliste li { display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem; margin: 0; background: var(--weiss); border-radius: 6px; padding: 1rem 1.2rem; box-shadow: var(--schatten); counter-increment: p; }
.p-marke { width: 2.4rem; height: 2.4rem; border-radius: 4px; background: var(--tanne); color: var(--signal); display: grid; place-items: center; font-weight: 700; }
.p-marke::before { content: counter(p); }
.pruefliste h3 { margin: .15rem 0 .3rem; }
.pruefliste p { margin: 0; }

/* Tabellen */
.tabelle-huelle { overflow-x: auto; margin: 1.4rem 0; }
.tabelle { width: 100%; border-collapse: collapse; background: var(--weiss); border-radius: 6px; overflow: hidden; box-shadow: var(--schatten); font-size: 1.02rem; }
.tabelle caption { caption-side: bottom; text-align: left; padding: .7rem .2rem 0; font-size: .95rem; color: var(--tanne-2); }
.tabelle th, .tabelle td { text-align: left; vertical-align: top; padding: .8rem 1rem; border-bottom: 1px solid var(--karte-2); }
.tabelle thead th { font-weight: 700; background: var(--tanne); color: var(--weiss); }
.tabelle tbody th { font-weight: 700; }
.tabelle tr:last-child th, .tabelle tr:last-child td { border-bottom: 0; }

/* Fragen */
.fragen { display: grid; gap: .6rem; margin: 1.2rem 0; }
.fragen details { background: var(--weiss); border-radius: 6px; box-shadow: var(--schatten); }
.fragen summary { -webkit-tap-highlight-color: transparent; cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.2rem; font-weight: 700; position: relative; }
.fragen summary::-webkit-details-marker { display: none; }
.fragen summary::after { content: ""; position: absolute; right: 1.1rem; top: 1.25rem; width: .7rem; height: .7rem; border-right: 3px solid var(--weg); border-bottom: 3px solid var(--weg); transform: rotate(45deg); transition: transform .2s; }
.fragen details[open] summary::after { transform: rotate(-135deg); top: 1.5rem; }
.fragen .antwort { padding: 0 1.2rem 1.1rem; }
.fragen .antwort p { margin: 0; }

/* Lernpfad-Planer */
.planer { background: var(--weiss); border-radius: 8px; padding: clamp(1.2rem, 4vw, 2.2rem); box-shadow: var(--schatten); margin: 1.5rem 0; }
.planer fieldset { border: 0; margin: 0 0 1.2rem; padding: 0; }
.planer legend { font-weight: 700; font-size: 1.15rem; padding: 0; margin-bottom: .6rem; }
.wahl { display: flex; flex-wrap: wrap; gap: .55rem; }
.wahl label { -webkit-tap-highlight-color: transparent; display: inline-flex; align-items: center; gap: .5rem; min-height: 2.9rem; padding: .4rem 1rem; border: 2px solid var(--linie); border-radius: 5px; cursor: pointer; font-weight: 600; background: var(--karte); }
.wahl input { width: 1.15rem; height: 1.15rem; accent-color: var(--weg); margin: 0; }
.wahl label:has(input:checked) { border-color: var(--tanne); background: var(--signal-hell); }
.route { margin-top: 1.4rem; border-top: 3px dashed var(--linie); padding-top: 1.3rem; }
.route-kopf { display: flex; flex-wrap: wrap; gap: .4rem 2rem; align-items: baseline; margin-bottom: 1rem; }
.route-kopf .zahl { display: inline; font-size: clamp(2rem, 4vw, 2.8rem); margin: 0; }
.route-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.route-liste li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) auto; gap: .4rem 1rem; align-items: center; margin: 0; }
.route-liste .r-name { font-weight: 700; }
.route-liste .r-balken { height: .9rem; border-radius: 2px; background: var(--karte-2); position: relative; overflow: hidden; }
.route-liste .r-balken span { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--weg) 0 10px, var(--weg-hell) 10px 14px); }
.route-liste .r-zeit { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 1rem; }
.route-liste .r-tipp { grid-column: 1 / -1; font-size: 1rem; color: var(--tanne-2); margin: -.2rem 0 .3rem; }

/* Terminblock: der Treffpunkt am Ende jeder Seite */
.termin-karte { background: var(--tanne); color: var(--weiss); border-radius: 8px; padding: clamp(1.4rem, 4vw, 2.6rem); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: center; }
.termin-karte h2 { color: var(--weiss); font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.termin-karte a { color: var(--weiss); text-decoration-color: var(--signal); }
.termin-karte .etappen-marke { color: var(--signal); }
.termin-karte .leise { color: #D3DDD0; margin-top: .9rem; }
.termin-fakten { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.termin-fakten li { margin: 0; padding: .25rem .7rem; border: 1px solid #6E8574; border-radius: 4px; font-size: 1rem; }
.termin-tat .knopf { width: 100%; }

/* Weiterlesen, Quellen */
.weiter-liste { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .8rem; }
.weiter-liste li { background: var(--weiss); border-radius: 6px; padding: 1rem 1.15rem; margin: 0; display: grid; gap: .25rem; border-left: 5px solid var(--signal); }
.weiter-liste a { font-weight: 700; }
.weiter-liste span { color: var(--tanne-2); font-size: 1rem; }
.quellen { font-size: .95rem; color: var(--tanne-2); border-top: 1px solid var(--linie); padding-top: 1rem; margin-top: 2rem; }

/* Glossar */
.glossar dt { font-weight: 700; font-size: 1.2rem; margin-top: 1.4rem; }
.glossar dd { margin: .3rem 0 0; max-width: 46rem; }
.buchstaben { display: flex; flex-wrap: wrap; gap: .4rem; }
.buchstaben a { min-width: 2.75rem; min-height: 2.75rem; display: inline-grid; place-items: center; background: var(--weiss); border-radius: 4px; font-weight: 700; text-decoration: none; }

/* Fuß: gleiche Grundfarbe wie die Seite */
.fuss { background: var(--karte); border-top: 3px dashed var(--linie); padding: 3rem 0 2.5rem; margin-top: 2rem; font-size: 1rem; }
.fuss .spalten { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 2rem; }
.fuss h2 { font: 700 1.05rem/1.3 var(--sans); margin-bottom: .7rem; }
.fuss ul { list-style: none; padding: 0; margin: 0; }
.fuss li { margin-bottom: .35rem; }
.fuss .klein { margin-top: 2rem; font-size: .95rem; color: var(--tanne-2); max-width: 62rem; }

/* Bewegung: nur mit JavaScript (html.bewegt) und ohne Wunsch nach reduzierter Bewegung */
html.bewegt .wegweiser .schild { opacity: 0; transition: opacity .3s ease-out, transform .7s cubic-bezier(.2, 1.4, .4, 1); transition-delay: .25s; }
html.bewegt .wegweiser .schild:nth-child(2) { transition-delay: .39s; } html.bewegt .wegweiser .schild:nth-child(3) { transition-delay: .53s; }
html.bewegt .wegweiser .schild:nth-child(4) { transition-delay: .67s; } html.bewegt .wegweiser .schild:nth-child(5) { transition-delay: .81s; }
html.bewegt .wegweiser .schild.rechts { transform-origin: 0 50%; transform: rotate(-11deg) translateX(-.6rem); }
html.bewegt .wegweiser .schild.links { transform-origin: 100% 50%; transform: rotate(11deg) translateX(.6rem); }
html.bewegt .wegweiser.da .schild { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.bewegt .wegweiser .schild { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Feste Aufrufleiste am Handy: erst nach dem ersten Bildschirm */
.leiste-unten { display: none; }
@media (max-width: 980px) {
  .leiste-unten { display: flex; gap: .6rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: .6rem var(--rand) calc(.6rem + env(safe-area-inset-bottom));
    background: var(--karte); border-top: 1px solid var(--linie); box-shadow: 0 -10px 24px -18px rgba(24, 53, 38, .5); transform: translateY(110%); transition: transform .3s ease; }
  .leiste-unten .knopf { flex: 1; min-height: 2.9rem; padding: .5rem .8rem; }
  .leiste-unten .knopf.hell { flex: 0 0 auto; background: var(--karte); }
  html.leiste-da .leiste-unten { transform: none; }
  /* Platz am Seitenende: Höhe der Leiste (rund 4,2rem) plus Luft und sicherer Gerätebereich.
     Der Abstand gehört in die Fußzeile, nicht als padding-bottom an den body: Unteres Polster des
     Scroll-Elements zählt nicht zur scrollHeight und scrollt deshalb nie ins Bild, die Fußzeile bliebe
     unter der Leiste. Unabhängig von html.leiste-da, damit beim Ein- und Ausblenden nichts springt.
     Geprüft mit werkzeug/leiste.mjs. */
  .fuss { padding-bottom: calc(2.5rem + 5.5rem + env(safe-area-inset-bottom)); }
}

/* Schmale Bildschirme */
@media (max-width: 1100px) {
  .fuss .spalten { grid-template-columns: 1fr 1fr 1fr; }
  .drei { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  :root { --kopf-h: 3.9rem; }
  .menue-schalter { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .4rem 1rem; border: 2px solid var(--tanne); border-radius: 5px; background: transparent; color: var(--tanne); font: 700 1rem/1 var(--sans); }
  .menue { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--karte); border-bottom: 1px solid var(--linie); flex-direction: column; align-items: stretch; padding: .5rem var(--rand) 1.2rem; gap: 0; }
  .menue.offen-menue { display: flex; }
  .menue a { padding: .8rem 0; border-bottom: 1px dotted var(--linie); font-size: 1.1rem; }
  .menue .knopf.klein { margin-top: .9rem; }
  .buehne .huelle { grid-template-columns: 1fr; }
  .wegweiser { max-width: 34rem; width: 100%; justify-self: center; }
  .zwei, .termin-karte { grid-template-columns: 1fr; }
  .kopf-raster { grid-template-columns: 1fr; }
  .kopf-schild { display: none; }
  .pfad-etappen { padding-left: 3rem; }
  .pfad-etappen::before { left: 1.45rem; }
  .etappe, .etappe:nth-child(odd), .etappe:nth-child(even) { width: auto; align-self: stretch; }
  .etappe + .etappe { margin-top: 0; }
  .etappe:nth-child(odd) .marke, .etappe:nth-child(even) .marke { left: -2.6rem; right: auto; }
}
@media (max-width: 640px) {
  .drei { grid-template-columns: 1fr; }
  .fuss .spalten { grid-template-columns: 1fr 1fr; }
  .fuss .spalten > div:first-child { grid-column: 1 / -1; }
  .marke-text b { font-size: 1.4rem; }
  .schild { width: calc(50% + 1rem); padding-top: .45rem; padding-bottom: .45rem; grid-template-columns: 1fr; gap: .1rem; }
  .schild.rechts { margin-left: calc(50% - 1rem); }
  .schild.links { margin-right: calc(50% - 1rem); }
  .schild .ziel { font-size: 1rem; gap: .4rem; }
  .schild .snr { width: 1.4rem; height: 1.4rem; font-size: .875rem; }
  .schild .zeit { font-size: .95rem; padding-left: 1.85rem; }
  .route-liste li { grid-template-columns: minmax(0, 1fr) auto; }
  .route-liste .r-balken { grid-column: 1 / -1; grid-row: 2; }
  .tabelle.stapel thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabelle.stapel, .tabelle.stapel tbody, .tabelle.stapel tr, .tabelle.stapel th, .tabelle.stapel td { display: block; width: 100%; }
  .tabelle.stapel tr { border-bottom: 2px solid var(--karte-2); padding: .4rem 0; }
  .tabelle.stapel tbody th { padding-bottom: .2rem; border: 0; }
  .tabelle.stapel td { border: 0; padding-top: .25rem; padding-bottom: .5rem; }
  .tabelle.stapel { display: flex !important; flex-direction: column; }
  .tabelle.stapel caption { display: block; width: 100%; padding: .7rem 1rem .2rem; order: 2; }
  .tabelle.stapel td::before { content: attr(data-spalte); display: block; font-weight: 700; font-size: .9rem; color: var(--tanne-2); margin-bottom: .1rem; }
  .knoepfe .knopf { width: 100%; }
}
