/* ==========================================================================
   Via Treverorum – Stylesheet
   Pergament und Ziegelrot: ruhige Flächen, Serifenschrift für Titel, Haarlinien,
   Farbe nur für das Wesentliche (Straßen, Reise, Kennzahlen). Kein Framework.
   Aufbau: Tokens · Basis · Kopf · Textseiten · Anmeldung · Knöpfe/Formulare ·
   Karte (Steuerung, Infofenster, Bedienfelder, Reiseplaner, Höhenprofil) ·
   Hilfen · Bewegung
   ========================================================================== */

/* ---------- 1. Design-Tokens ---------- */
:root {
    color-scheme: light;
    --c-bg: #f6f1e7;
    --c-surface: #fdfaf4;
    --c-surface-2: #f2eadd;
    --c-surface-3: #e7dccb;
    --c-text: #2a1f17;
    --c-muted: #6c5f51;
    --c-border: #e3d8c6;
    --c-border-strong: #c8b8a1;
    --c-brand: #8f2d14;        /* Ziegelrot: Marke, Hauptstraßen, Reiselinie */
    --c-brand-2: #a8462a;
    --c-brand-soft: #f5e6dd;
    --c-on-brand: #ffffff;
    --c-accent: #8f2d14;
    --c-accent-soft: #f6e9e1;
    --c-ziegel: #8f2d14;       /* Kennzahlen des Reiseplaners */
    --c-link: #8f2d14;
    --c-focus: #d0842a;

    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;

    --radius: 3px;
    --shadow-2: 0 10px 30px rgb(42 31 23 / .14);
    --kopf-h: 54px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --c-bg: #17120f;
    --c-surface: #1f1914;
    --c-surface-2: #29211b;
    --c-surface-3: #342a22;
    --c-text: #efe6da;
    --c-muted: #ab9d8c;
    --c-border: #3a2f26;
    --c-border-strong: #56473a;
    --c-brand: #e38b6b;
    --c-brand-2: #eaa184;
    --c-brand-soft: #3a241b;
    --c-on-brand: #1a0f0a;
    --c-accent: #e38b6b;
    --c-accent-soft: #35231b;
    --c-ziegel: #e9967a;
    --c-link: #eaa184;
    --shadow-2: 0 10px 30px rgb(0 0 0 / .5);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --c-bg: #17120f;
        --c-surface: #1f1914;
        --c-surface-2: #29211b;
        --c-surface-3: #342a22;
        --c-text: #efe6da;
        --c-muted: #ab9d8c;
        --c-border: #3a2f26;
        --c-border-strong: #56473a;
        --c-brand: #e38b6b;
        --c-brand-2: #eaa184;
        --c-brand-soft: #3a241b;
        --c-on-brand: #1a0f0a;
        --c-accent: #e38b6b;
        --c-accent-soft: #35231b;
        --c-ziegel: #e9967a;
        --c-link: #eaa184;
        --shadow-2: 0 10px 30px rgb(0 0 0 / .5);
    }
}

/* ---------- 2. Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.65rem); margin-top: 1.6em; }
p { margin: 0 0 1em; }
a { color: var(--c-link); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--c-text); }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
.sprung { position: absolute; left: 8px; top: -60px; z-index: 2000; padding: 8px 14px; background: var(--c-surface); border: 1px solid var(--c-border-strong); }
.sprung:focus { top: 8px; }

/* ---------- 3. Kopf ---------- */
.kopf {
    position: relative; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    height: var(--kopf-h); padding: 0 12px 0 14px;
    background: var(--c-surface); border-bottom: 1px solid var(--c-border);
}
.kopf__marke { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--c-text); text-decoration: none; }
.kopf__marke:hover { color: var(--c-text); }
.kopf__signet {
    flex: none; width: 30px; height: 30px; border-radius: 7px;
    background: var(--c-brand) url(../img/signet.svg) center / cover no-repeat;
}
.kopf__name { font: 400 1.45rem/1 var(--font-serif); letter-spacing: .02em; color: var(--c-brand); }
.kopf__unter { min-width: 0; overflow: hidden; font-size: .86rem; color: var(--c-muted); white-space: nowrap; text-overflow: ellipsis; }
.kopf__nav { display: flex; align-items: center; gap: 2px; flex: none; }
.kopf__link {
    display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 10px;
    border: 0; border-radius: var(--radius); background: none; color: var(--c-text);
    font-size: .9rem; text-decoration: none; cursor: pointer;
}
.kopf__link:hover { background: var(--c-surface-2); color: var(--c-text); }
.kopf__link[aria-current="page"] { color: var(--c-brand); }
.kopf__link i { color: var(--c-muted); }
.kopf__sprache { font-weight: 600; letter-spacing: .04em; }
.kopf__abmelden { margin: 0; }
@media (max-width: 760px) {
    .kopf__unter { display: none; }
    .kopf__name { font-size: 1.22rem; white-space: nowrap; }
    .kopf__link span { display: none; }
    .kopf__link { min-width: 40px; justify-content: center; padding: 0 8px; }
}

/* ---------- 4. Textseiten (Über, Datenschutz, Fehler) ---------- */
.text { max-width: 760px; margin: 0 auto; padding: 36px 20px 64px; }
.text__vorspann { margin: 0 0 6px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-brand); }
.text__einleitung { font-size: 1.12rem; line-height: 1.55; }
.text__bild { margin: 22px 0 14px; }
.text__bild img { width: 100%; border: 1px solid var(--c-border); border-radius: var(--radius); }
.text__knoepfe { display: flex; flex-wrap: wrap; gap: 10px; }
.text__klein { font-size: .9rem; color: var(--c-muted); }
.text ul { padding-left: 1.2em; }
.text li { margin-bottom: .45em; }
.legende { list-style: none; padding-left: 0 !important; }
.legende li { display: flex; align-items: baseline; gap: 10px; }
.legende__strich, .legende__leer { flex: none; display: inline-block; width: 28px; height: 4px; border-radius: 2px; transform: translateY(-3px); }
.legende__strich--provinz { height: 6px; border-radius: 3px; background: rgb(138 90 58 / .18) linear-gradient(90deg, #8a5a3a 0 60%, transparent 60% 100%) center / 8px 2px repeat-x; }
.legende__punkt { flex: none; display: inline-block; width: 9px; height: 9px; margin: 0 10px 0 9px; border-radius: 50%; background: #5b3a1e; box-shadow: 0 0 0 1px #fbf6ea; }
.quellen li { font-size: .95rem; }

/* ---------- 5. Anmeldung ---------- */
.anmeldeseite { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.anmeldung { position: relative; display: grid; place-items: center; padding: 28px 16px; overflow: hidden; }
.anmeldung__bild { position: absolute; inset: 0; background: url(../img/treveris.jpg) center / cover no-repeat; opacity: .55; }
:root[data-theme="dark"] .anmeldung__bild { opacity: .25; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .anmeldung__bild { opacity: .25; } }
.anmeldung__karte {
    position: relative; width: min(420px, 100%); padding: 26px 26px 18px;
    background: var(--c-surface); border: 1px solid var(--c-border); border-top: 4px solid var(--c-brand);
    border-radius: var(--radius); box-shadow: var(--shadow-2);
}
.anmeldung__titel { font-size: 1.7rem; margin-bottom: .35em; }
.anmeldung__text { color: var(--c-muted); font-size: .95rem; }
.anmeldung__fehler { padding: 8px 12px; border-left: 3px solid var(--c-brand); background: var(--c-accent-soft); font-size: .92rem; }
.anmeldung__knopf { width: 100%; margin-top: 6px; }
.anmeldung__fuss { margin: 16px 0 0; font-size: .82rem; color: var(--c-muted); text-align: center; }
.feld { display: grid; gap: 4px; margin-bottom: 12px; }
.feld__name { font-size: .82rem; color: var(--c-muted); }

/* ---------- 6. Knöpfe, Formulare ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 8px 18px; border: 1px solid transparent; border-radius: var(--radius);
    font-weight: 500; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--c-brand); color: var(--c-on-brand); }
.btn--primary:hover { background: var(--c-text); color: var(--c-bg); }
.btn--ghost { background: transparent; border-color: var(--c-border-strong); color: var(--c-text); }
.btn--ghost:hover { border-color: var(--c-text); color: var(--c-text); }
.btn--sm { min-height: 32px; padding: 5px 12px; font-size: .88rem; }
.input, .select {
    width: 100%; min-height: 40px; padding: 6px 10px;
    border: 1px solid var(--c-border-strong); border-radius: var(--radius); background: var(--c-surface); color: var(--c-text);
}
.select {
    appearance: none; padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--c-muted) 50%), linear-gradient(135deg, var(--c-muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
.input:focus, .select:focus { outline: none; border-color: var(--c-text); box-shadow: 0 0 0 1px var(--c-text); }

/* ---------- 7. Karte ---------- */
.kartenseite { height: 100dvh; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.karte-rahmen { position: relative; min-height: 0; }
.karte { position: absolute; inset: 0; background: #e6dfcf; }
.karte-hinweis {
    position: absolute; top: 40%; left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 32px)); margin: 0;
    padding: 14px 18px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); text-align: center;
}
.karte-recht {
    position: absolute; z-index: 3; left: 8px; bottom: 6px; margin: 0; padding: 1px 8px; border-radius: 3px;
    background: rgb(253 250 244 / .8); color: #6c5f51; font-size: .72rem;
}
.karte-recht a { color: #6c5f51; }
.maplibregl-map { font-family: var(--font-sans); font-size: .9rem; }
.maplibregl-ctrl-attrib { font-size: 11px; }
/* Steuerung oben links: Karte (Ebenen), Zoom, Kompass, Werkzeuge */
.maplibregl-ctrl-top-left { display: flex; flex-direction: column; align-items: flex-start; }
.maplibregl-ctrl-top-left .maplibregl-ctrl { margin: 10px 0 0 10px; }
.maplibregl-ctrl-group { background: var(--c-surface); border-radius: 4px; box-shadow: 0 0 0 2px rgb(0 0 0 / .18); }
.maplibregl-ctrl-group button { width: 32px; height: 32px; color: var(--c-text); font-size: .95rem; cursor: pointer; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--c-border); }
.maplibregl-ctrl-group button:not(:disabled):hover { background-color: var(--c-surface-2); }
.maplibregl-ctrl-group button:focus-visible { box-shadow: inset 0 0 0 2px var(--c-focus); }
.karten-leiste i { line-height: 32px; }
.kartenwahl-knopf button { width: 42px; height: 42px; border-radius: 4px; background: var(--c-brand); color: var(--c-on-brand); font-size: 1.2rem; }
.kartenwahl-knopf button:not(:disabled):hover { background: var(--c-brand); filter: brightness(1.12); }
.kartenwahl-knopf i { line-height: 42px; }
.karten-kompass svg { display: block; width: 20px; height: 20px; margin: auto; transition: transform .15s ease-out; }
.karten-kompass.is-gedreht { box-shadow: 0 0 0 2px var(--c-brand); }
.maplibregl-popup { z-index: 3; }
@media (max-width: 760px) {
    .maplibregl-ctrl-group button { width: 40px; height: 40px; }
    .karten-leiste i { line-height: 40px; }
    .karte-recht { bottom: 4px; font-size: .68rem; }
}

/* Laden */
.ladeanzeige { position: absolute; inset: 0; z-index: 1000; display: grid; place-items: center; background: color-mix(in srgb, var(--c-bg) 55%, transparent); }
.ladeanzeige__karte { min-width: 250px; max-width: calc(100% - 32px); padding: 18px 24px 16px; background: var(--c-surface); border: 1px solid var(--c-border-strong); box-shadow: var(--shadow-2); text-align: center; }
.ladeanzeige__text { display: block; margin-bottom: 14px; font-family: var(--font-serif); font-size: 1.12rem; }
.ladeanzeige__linie { position: relative; display: block; height: 2px; overflow: hidden; background: var(--c-surface-3); }
.ladeanzeige__linie::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--c-brand); animation: lade-linie 1.2s ease-in-out infinite; }
@keyframes lade-linie { from { transform: translateX(-100%); } to { transform: translateX(290%); } }

/* Infofenster (roemisch.js) */
.karten-popup .maplibregl-popup-content { min-width: 200px; padding: 12px 14px; border-radius: var(--radius); background: var(--c-surface); color: var(--c-text); box-shadow: var(--shadow-2); }
.karten-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.karten-popup.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.karten-popup.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--c-surface); }
.karten-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.karten-popup.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.karten-popup.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--c-surface); }
.karten-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--c-surface); }
.karten-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--c-surface); }
.map-popup__title { display: block; font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.25; margin-bottom: 2px; padding-right: 18px; }
.map-popup__meta { display: block; color: var(--c-muted); font-size: .85rem; margin-bottom: 6px; }
.map-popup__daten { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 8px; font-size: .84rem; line-height: 1.35; }
.map-popup__daten dt { color: var(--c-muted); }
.map-popup__daten dd { margin: 0; overflow-wrap: anywhere; }
.map-popup__quelle { display: block; margin-top: 6px; color: var(--c-muted); font-size: .76rem; }
.map-popup__reise { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.map-popup__reise .btn { min-height: 28px; padding: 3px 10px; font-size: .82rem; }
.map-popup--knoepfe { position: relative; }
.map-popup__knoepfe { position: absolute; top: -12px; right: -14px; z-index: 1; display: flex; overflow: hidden; border-radius: 0 var(--radius) 0 10px; background: var(--c-surface-2); }
.karten-popup .map-popup__knoepfe button {
    position: static; display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
    border: 0; border-radius: 0; background: transparent; color: var(--c-muted); font-size: 13px; line-height: 1; cursor: pointer;
}
.karten-popup .map-popup__knoepfe button + button { box-shadow: inset 1px 0 0 var(--c-border); }
.karten-popup .map-popup__knoepfe button:hover { color: var(--c-text); background: color-mix(in srgb, var(--c-text) 8%, transparent); }
.karten-popup .map-popup--knoepfe:has(.map-popup__zoom) .map-popup__title { padding-right: 46px; }

/* Namensschild Augusta Treverorum (HTML-Marker, roemisch.js): Farben fest wie die Kartenbeschriftung (Pergament) */
.maplibregl-marker.roemisch-hauptort { z-index: 1; pointer-events: none; }
.roemisch-hauptort__schild {
    position: relative; display: grid; justify-items: start; padding: .28em 30px .32em .6em;
    border: 1px solid rgba(140, 59, 35, .5); border-radius: 3px; background: rgba(251, 246, 234, .94);
    box-shadow: 0 1px 5px rgba(60, 35, 20, .28); font-family: var(--font-sans); line-height: 1.15; white-space: nowrap;
}
.roemisch-hauptort__name { font-weight: 700; letter-spacing: .01em; color: #8c3b23; }
.roemisch-hauptort__heute { font-size: .8em; font-weight: 600; color: #5b3a1e; }
.roemisch-hauptort__reise, .roemisch-hauptort__zu { pointer-events: auto; font: inherit; color: #8c3b23; background: none; border: 0; cursor: pointer; }
.roemisch-hauptort__reisen {
    display: flex; align-items: center; gap: .15em; justify-self: stretch; margin: .3em -.25em 0; padding: .1em .25em 0;
    border-top: 1px solid rgba(140, 59, 35, .28); font-size: 12px; color: #8c3b23;
}
.roemisch-hauptort__reisen > .roemer-icon { margin-right: .2em; font-size: 1.35em; }
.roemisch-hauptort__reise { display: inline-flex; align-items: center; padding: .25em .2em .1em; font-size: 12px; font-weight: 600; text-align: left; }
.roemisch-hauptort__reise + .roemisch-hauptort__reise { padding-left: .55em; border-left: 1px solid rgba(140, 59, 35, .28); }
.roemisch-hauptort__reise:hover span { text-decoration: underline; text-underline-offset: 2px; }
.roemisch-hauptort__zu {
    position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 22px; height: 22px; padding: 0;
    font-size: 11px; color: #5b3a1e; border-left: 1px solid rgba(140, 59, 35, .28); border-bottom: 1px solid rgba(140, 59, 35, .28);
    border-radius: 0 2px 0 6px; opacity: .75;
}
.roemisch-hauptort__zu:hover { opacity: 1; color: #8c3b23; background: rgba(140, 59, 35, .08); }
@media (pointer: coarse) {
    .roemisch-hauptort__schild { padding-right: 38px; }
    .roemisch-hauptort__zu { width: 30px; height: 30px; font-size: 13px; }
    .roemisch-hauptort__reise { min-height: 30px; }
}

/* Römer-Icons (img/roemer/*.svg) als Maske in der Textfarbe; Größe über font-size */
.roemer-icon { display: inline-block; flex: none; width: 1em; height: 1em; vertical-align: -.15em; background-color: currentColor; -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain; }
.roemer-icon--zu-fuss { -webkit-mask-image: url(../img/roemer/zu-fuss.svg); mask-image: url(../img/roemer/zu-fuss.svg); }
.roemer-icon--packtier { -webkit-mask-image: url(../img/roemer/packtier.svg); mask-image: url(../img/roemer/packtier.svg); }
.roemer-icon--ochsenkarren { -webkit-mask-image: url(../img/roemer/ochsenkarren.svg); mask-image: url(../img/roemer/ochsenkarren.svg); }
.roemer-icon--bote { -webkit-mask-image: url(../img/roemer/bote.svg); mask-image: url(../img/roemer/bote.svg); }
.roemer-icon--meilenstein { -webkit-mask-image: url(../img/roemer/meilenstein.svg); mask-image: url(../img/roemer/meilenstein.svg); }
.roemer-icon--flussschiff { -webkit-mask-image: url(../img/roemer/flussschiff.svg); mask-image: url(../img/roemer/flussschiff.svg); }
.roemer-icon--seeschiff { -webkit-mask-image: url(../img/roemer/seeschiff.svg); mask-image: url(../img/roemer/seeschiff.svg); }

/* „Reise planen“: Knopf unten mittig, solange der Planer zu ist (karte.js) */
.reise-knopf {
    position: absolute; z-index: 4; left: 50%; bottom: 40px; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px 0 16px;
    border: 0; border-radius: 22px; background: #8f2d14; color: #fff; box-shadow: var(--shadow-2);
    font: 600 .95rem/1 var(--font-sans); white-space: nowrap; cursor: pointer;
}
.reise-knopf .roemer-icon { font-size: 1.45em; }
.reise-knopf:hover { filter: brightness(1.15); }
.reise-knopf:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.ist-reiseplaner > .reise-knopf { display: none; }
@media (max-width: 760px) { .reise-knopf { bottom: 28px; } }

/* Bedienfelder (Karte, Reiseplaner) */
.kartenwahl {
    position: absolute; z-index: 1000; top: 10px; left: 62px;
    width: min(400px, calc(100% - 72px)); max-height: calc(100% - 20px); overflow-y: auto; overscroll-behavior: contain;
    background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-2);
    font: .92rem/1.35 var(--font-sans); cursor: auto;
}
.kartenwahl[hidden] { display: none; }
.kartenwahl__kopf {
    position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 8px 8px 16px; background: var(--c-surface); border-bottom: 1px solid var(--c-border);
}
.kartenwahl__titel { flex: 1; min-width: 0; margin: 0; font: 600 .74rem/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.kartenwahl__zu { width: 34px; height: 34px; border: 0; background: none; color: var(--c-muted); font-size: 1rem; cursor: pointer; }
.kartenwahl__zu:hover { color: var(--c-text); }
.kartenwahl__gruppe { margin: 0; padding: 4px 0 8px; border: 0; border-bottom: 1px solid var(--c-border); }
.kartenwahl__legende { padding: 8px 16px 2px; font: 400 1.02rem/1.3 var(--font-serif); }
.kartenwahl__wahl { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 2px 16px; cursor: pointer; }
.kartenwahl__wahl input { flex: none; margin: 0; width: 17px; height: 17px; accent-color: var(--c-brand); }
.kartenwahl__wahl:hover span:last-child { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.kartenwahl__zeichen { flex: none; width: 22px; height: 4px; border-radius: 2px; }
.kartenwahl__zeichen--punkt { width: 9px; height: 9px; margin: 0 6.5px; border-radius: 50%; box-shadow: 0 0 0 1px #fbf6ea; }
.kartenwahl__zeichen--provinz { height: 6px; border-radius: 3px; background: rgb(138 90 58 / .18) linear-gradient(90deg, #8a5a3a 0 60%, transparent 60% 100%) center / 8px 2px repeat-x; }
.kartenwahl__hinweis { margin: 4px 16px 4px; font-size: .78rem; color: var(--c-muted); }
.kartenwahl__fuss { margin: 10px 16px 14px; font-size: .86rem; }
/* Als Blatt von unten (Handy, niedrige Fenster) */
.kartenwahl.kartenwahl--blatt {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 72vh;
    border-radius: 10px 10px 0 0; border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 761px) { .kartenwahl.kartenwahl--blatt { left: 50%; right: auto; width: min(440px, 100%); transform: translateX(-50%); border-width: 1px 1px 0; } }
@media (max-width: 760px) {
    .kartenwahl__wahl { min-height: 44px; }
    .kartenwahl__zu { width: 44px; height: 44px; }
}

/* Reiseplaner (roemerreise.js) */
.kartenwahl.roemerreise.kartenwahl--blatt { max-height: 70vh; }
.kartenwahl.roemerreise.kartenwahl--blatt.ist-setzen { max-height: 36vh; }
.roemerreise .kartenwahl__titel { color: var(--c-brand); }
.roemerreise__neu { flex: none; min-height: 30px; padding: 2px 10px; font-size: .8rem; }
.roemerreise__neu[hidden] { display: none; }
.roemerreise__einleitung { margin: 10px 16px 0; font: 400 1.05rem/1.3 var(--font-serif); color: var(--c-text); }
.roemerreise__formular { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 8px 16px 12px; }
.roemerreise__punkte { display: grid; gap: 6px; }
.roemerreise__ort { position: relative; display: grid; gap: 3px; font-size: .84rem; color: var(--c-muted); }
.roemerreise__eingabezeile { display: flex; align-items: center; gap: 8px; }
.roemerreise__marke { flex: none; display: flex; cursor: pointer; }
.roemerreise__ort .input { flex: 1; min-width: 0; width: 100%; min-height: 38px; padding: 6px 10px; font-size: .94rem; color: var(--c-text); }
.roemerreise__weg { flex: none; width: 36px; min-height: 36px; padding: 0; }
.roemerreise__weg[hidden] { display: none; }
.roemerreise__buchstabe { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #8f2d14; color: #fff; font: 700 .68rem/1 var(--font-sans); }
.roemerreise__marke .roemerreise__buchstabe { width: 22px; height: 22px; font-size: .74rem; }
.roemerreise__griff { flex: none; display: grid; place-items: center; width: 16px; height: 36px; margin-right: -4px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--c-muted); opacity: .7; cursor: grab; touch-action: none; }
.roemerreise__griff:hover, .roemerreise__griff:focus-visible { opacity: 1; color: var(--c-text); }
.roemerreise__ort.ist-gezogen { z-index: 3; }
.roemerreise__ort.ist-gezogen .input { border-color: #8f2d14; box-shadow: 0 3px 10px rgb(0 0 0 / .25); }
.ist-ziehen, .ist-ziehen * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.roemerreise__ort .roemerreise__vorschlaege { margin-left: 50px; }
@media (pointer: coarse) {
    .roemerreise__griff { width: 26px; }
    .roemerreise__ort .roemerreise__vorschlaege { margin-left: 60px; }
}
.roemerreise__werkzeuge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.roemerreise__werkzeuge .btn { min-height: 34px; }
.roemerreise__karte[aria-pressed="true"] { background: #8f2d14; border-color: #8f2d14; color: #fff; }
.roemerreise__tauschen { width: 36px; padding: 0; }
.roemerreise__kartenhinweis { margin: 0; padding: 6px 10px; border-left: 3px solid #8f2d14; background: var(--c-surface-2); font-size: .8rem; line-height: 1.4; }
.roemerreise__kartenhinweis[hidden] { display: none; }
.roemerreise__optionhinweis { grid-column: 1 / -1; margin: -4px 0 0 26px; font-size: .76rem; line-height: 1.4; color: var(--c-muted); }
.roemerreise__optionhinweis[hidden] { display: none; }
.roemerreise__vorschlaege {
    position: absolute; z-index: 2; top: 100%; left: 0; right: 0; margin: 2px 0 0; padding: 4px 0; list-style: none;
    background: var(--c-surface); border: 1px solid var(--c-border-strong); border-radius: var(--radius); box-shadow: var(--shadow-2);
    max-height: 260px; overflow-y: auto;
}
.roemerreise__vorschlaege[hidden] { display: none; }
.roemerreise__vorschlaege button { display: grid; width: 100%; padding: 5px 10px; border: 0; background: none; text-align: left; color: var(--c-text); cursor: pointer; }
.roemerreise__vorschlaege button:hover, .roemerreise__vorschlaege button:focus-visible { background: var(--c-surface-2); outline: none; }
.roemerreise__name { font-size: .92rem; }
.roemerreise__zusatz { font-size: .76rem; color: var(--c-muted); }
.roemerreise__keine { padding: 6px 10px; font-size: .84rem; color: var(--c-muted); }
.roemerreise__optionen { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; font-size: .84rem; color: var(--c-muted); }
.roemerreise__optionen label[hidden] { display: none; }
.roemerreise__optionen .select { min-height: 32px; padding-top: 3px; padding-bottom: 3px; font-size: .86rem; color: var(--c-text); }
.roemerreise__arten { min-width: 0; margin: 0; padding: 0; border: 0; }
.roemerreise__arten legend { padding: 0 0 4px; }
.roemerreise__artwahl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.roemerreise__art { position: relative; display: grid; justify-items: center; gap: 1px; min-width: 0; padding: 6px 2px 5px; border: 1px solid var(--c-border-strong); border-radius: var(--radius); background: var(--c-surface); color: var(--c-text); line-height: 1.15; text-align: center; cursor: pointer; }
.roemerreise__art input { position: absolute; inset: 0; margin: 0; opacity: 0; pointer-events: none; }
.roemerreise__art .roemer-icon { margin-bottom: 2px; font-size: 28px; color: var(--c-muted); }
.roemerreise__artname { max-width: 100%; overflow: hidden; font-size: .76rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.roemerreise__tempo { font-size: .7rem; color: var(--c-muted); }
.roemerreise__art:hover { background: var(--c-surface-2); }
.roemerreise__art:has(input:checked) { border-color: #8f2d14; background: #8f2d14; color: #fff; }
.roemerreise__art:has(input:checked) .roemer-icon, .roemerreise__art:has(input:checked) .roemerreise__tempo { color: rgb(255 255 255 / .85); }
.roemerreise__art:has(input:focus-visible) { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.roemerreise__wasserzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.roemerreise__monat { display: flex; align-items: center; gap: 6px; }
.roemerreise__monat .select { width: auto; min-width: 120px; }
.roemerreise__wasser { display: flex; align-items: center; gap: 8px; color: var(--c-text); cursor: pointer; }
.roemerreise__wasser input { margin: 0; accent-color: var(--c-brand); }
.roemerreise__wasser .roemer-icon { margin-right: -2px; font-size: 1.45em; color: var(--c-muted); }
/* Beispielziele ab Trier */
.roemerreise__beispiele { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 16px 12px; padding-top: 10px; border-top: 1px solid var(--c-border); }
.roemerreise__beispieltitel { margin-right: 2px; font-size: .78rem; color: var(--c-muted); }
.roemerreise__beispiel { padding: 3px 10px; border: 1px solid var(--c-border-strong); border-radius: 999px; background: var(--c-surface); color: var(--c-text); font-size: .84rem; cursor: pointer; }
.roemerreise__beispiel:hover { border-color: var(--c-brand); color: var(--c-brand); }
/* Ergebnis */
.roemerreise__ergebnis { padding: 0 16px; }
.roemerreise__ergebnis:empty { display: none; }
.roemerreise__strecke { margin: 4px 0 6px; font: 400 1.05rem/1.3 var(--font-serif); }
.roemerreise__werte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 2px 0 8px; font-size: .88rem; }
.roemerreise__werte dd { margin: 0; }
.roemerreise__kennzahl { padding: 7px 10px 8px; border-left: 3px solid var(--c-ziegel); border-radius: 0 var(--radius) var(--radius) 0; background: var(--c-accent-soft); }
.roemerreise__kennzahl dt, .roemerreise__davon dt { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.roemerreise__gross { display: block; margin-top: 1px; font: 400 1rem/1.15 var(--font-serif); color: var(--c-ziegel); }
.roemerreise__gross .roemerreise__zahl { font-size: 1.6rem; letter-spacing: -.01em; }
.roemerreise__klein { display: block; margin-top: 2px; font-size: .76rem; color: var(--c-muted); }
.roemerreise__klein .roemerreise__zahl { font-weight: 600; color: inherit; }
.roemerreise__davon { grid-column: 1 / -1; padding: 0 2px; }
.roemerreise__davon dd { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 2px; }
.roemerreise__provinzen dd { display: block; font-family: var(--font-serif); font-size: .95rem; line-height: 1.4; }
.roemerreise__teil { display: inline-flex; align-items: center; gap: 6px; }
.roemerreise__teil .roemer-icon { font-size: 1.5rem; color: var(--c-muted); }
.roemerreise__zahl { font-weight: 700; color: var(--c-ziegel); font-variant-numeric: tabular-nums; }
.roemerreise__hinweis, .roemerreise__quelle { margin: 6px 16px 10px; font-size: .76rem; color: var(--c-muted); }
.roemerreise__ergebnis .roemerreise__hinweis { margin: 4px 0 8px; }
.roemerreise__fehler { margin: 6px 0 10px; color: var(--c-accent); font-size: .88rem; }
.roemerreise__laden { margin: 6px 0 10px; color: var(--c-muted); font-size: .88rem; }
.roemerreise__unterwegs { margin: 0 0 8px; font-size: .86rem; }
.roemerreise__unterwegs summary { cursor: pointer; color: var(--c-link); }
.roemerreise__unterwegs ol { margin: 6px 0 0; padding-left: 1.4em; max-height: 200px; overflow-y: auto; }
.roemerreise__etappen ol { list-style: none; padding-left: 0; }
.roemerreise__etappen li { display: flex; align-items: baseline; gap: 4px; padding: 2px 4px; border-radius: 4px; cursor: pointer; }
.roemerreise__etappen li:hover, .roemerreise__etappen li.ist-hervor { background: var(--c-surface-2); }
.roemerreise__etappen li.ist-hervor .roemerreise__buchstabe { background: #e8761c; }
.roemerreise__etappen li > span:last-child { margin-left: 4px; }
.roemerreise__orte li { padding: 1px 4px; border-radius: 4px; cursor: pointer; }
.roemerreise__orte li:hover, .roemerreise__orte li.ist-hervor { background: var(--c-surface-2); }
.roemerreise__orte li.ist-hervor { box-shadow: inset 3px 0 0 #e8761c; }
.roemerreise__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
/* Reisepunkte in der Karte */
.roemerreise-punkt { display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid #fff; border-radius: 50%; background: #8f2d14; color: #fff; font: 700 12px/1 var(--font-sans); box-shadow: 0 1px 5px rgba(0, 0, 0, .35); cursor: grab; }
.maplibregl-marker.roemerreise-punkt { z-index: 2; }
.roemerreise-punkt.ist-etappe { background: #e8761c; box-shadow: 0 0 0 3px rgba(232, 118, 28, .35), 0 1px 5px rgba(0, 0, 0, .35); }
.ist-reisepunkte .maplibregl-canvas-container.maplibregl-interactive { cursor: crosshair; }

/* Höhenprofil (hoehenprofil.js) im Ergebnis des Reiseplaners */
.hoehenprofil[hidden], .hoehenprofil [hidden] { display: none; }
.routenfeld__summe { display: flex; align-items: center; gap: 8px; margin: 2px 0; font-weight: 600; font-size: .9rem; }
.routenfeld__klapper { display: flex; flex: 1; min-width: 0; align-items: center; gap: 8px; min-height: 40px; padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.routenfeld__klapper::before { content: '▾'; flex: none; }
.routenfeld__klapper[aria-expanded="false"]::before { rotate: -90deg; }
.hoehenprofil__werte { margin-left: auto; padding-left: 8px; font-weight: 400; font-size: .8rem; color: var(--c-muted); white-space: nowrap; }
.hoehenprofil__flaeche { position: relative; height: 92px; margin: 2px 0 8px; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.hoehenprofil__flaeche svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hoehenprofil__flaechenpfad { fill-opacity: .2; }
.hoehenprofil__linie { fill: none; stroke-width: 2; stroke-linejoin: round; }
.hoehenprofil__marke { position: absolute; padding: 0 3px; border-radius: 3px; background: var(--c-surface); opacity: .9; color: var(--c-muted); font-size: .7rem; line-height: 1.4; pointer-events: none; }
.hoehenprofil__max { top: 0; left: 0; }
.hoehenprofil__min { bottom: 0; left: 0; }
.hoehenprofil__laenge { bottom: 0; right: 0; }
.hoehenprofil__objekt { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; box-shadow: 0 0 0 1px #fff; pointer-events: none; }
.hoehenprofil__zeiger { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--c-text); pointer-events: none; }
.hoehenprofil__punkt { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border: 2px solid var(--c-text); border-radius: 50%; background: var(--c-surface); pointer-events: none; }
.hoehenprofil__info { position: absolute; top: 0; transform: translateX(-50%); padding: 1px 6px; border-radius: 4px; background: var(--c-text); color: var(--c-surface); font-size: .74rem; font-weight: 600; white-space: nowrap; pointer-events: none; }

/* ---------- 8. Hilfen ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 1200; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 18px; background: var(--c-text); color: var(--c-bg); font-size: .92rem; box-shadow: var(--shadow-2); overflow-wrap: anywhere; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 9. Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.impressum { font-style: normal; line-height: 1.7; }
