/* ════════════════════════════════════════════════════════════════
   phibs.at – Design-System
   Dunkel ist Standard. Hell über [data-theme="light"] oder die
   Systemeinstellung (prefers-color-scheme), solange nichts gewählt ist.
   ════════════════════════════════════════════════════════════════ */

:root {
    color-scheme: dark;
    --bg: #08090B;
    --surf: #111318;
    --surf2: #181B21;
    --line: rgba(255, 255, 255, 0.08);
    --line2: rgba(255, 255, 255, 0.16);
    --track-rail: #5A616C;          /* Gleis unter dem Header */
    --track-sleeper: #22262E;
    --t1: #EEF1F5;
    --t2: #A7AEBA;
    --t3: #868D99;
    --acc: #6196FF;                     /* Phibs.-Blau (dunkel) */
    --soft: rgba(97, 150, 255, 0.14);
    --btn: #6196FF;
    --on-btn: #08090B;
    --nav: rgba(17, 19, 24, 0.88);
    --glass: rgba(12, 14, 18, 0.9);
    --ph1: #14161B;
    --ph2: #191C22;
    --glow: rgba(97, 150, 255, 0.16);
    --ok: #34D399;
    --ok-bg: rgba(52, 211, 153, 0.14);
    --warn: #FBBF24;
    --warn-bg: rgba(251, 191, 36, 0.12);
    --err: #F87171;
    --err-bg: rgba(248, 113, 113, 0.12);
    --live: #EF4444;
    /* Text auf Bildern (z. B. „Neueste Bewertung“): dunkler Verlauf + weiße Schrift – in beiden Modi gleich */
    --img-scrim: rgba(0, 0, 0, 0.82);
    --img-scrim-mid: rgba(0, 0, 0, 0.45);
    --img-scrim-none: rgba(0, 0, 0, 0);
    --on-img: #FFFFFF;
    --on-img-dim: rgba(255, 255, 255, 0.82);
    --on-img-ink: #0B0E14;   /* dunkle Schrift auf weißen Pillen über Bildern */
    /* Gleisplan (SVG aus Illustrator, angesprochen über die Füllfarben der Datei) */
    --plan-wall: #26413C;
    --plan-window: #3B4C61;
    --plan-table: #6A5034;
    --plan-line: #7D8794;
    --plan-mark: var(--surf);
    --plan-mark-line: var(--t1);
    --plan-lower: #3A404A;

    /* Bahn-Elemente – in beiden Modi gleich */
    --board: #0A1426;
    --board-text: #F3F6FA;
    --board-label: #FFC94D;
    --board-line: rgba(255, 255, 255, 0.08);
    /* ÖBB-Anzeigetafel (.ob: Abfahrtstafel Startseite, Steckbrief & Abfahrt Modellbahn) – in beiden Modi gleich */
    --ob-bg: #00008E;     /* Dunkelblau (echter ÖBB-Monitor) */
    --ob-row: #0000C6;    /* Hellblau, Zeilen im Wechsel */
    --ob-hover: #2424D8;
    --ob-head: #00008E;
    --ob-line: rgba(255, 255, 255, 0.12);
    --ob-text: #FFFFFF;
    --ob-dim: #A9B9D0;
    --ob-yellow: #FFFF54;
    --ob-red: #E2002A;
    /* Fahrkarte (/modellbahn, templates/partials/ticket.php) – in beiden Modi gleich, Papier mit feinem Rand */
    --ticket-paper: #F1F7FA;
    --ticket-pattern: #CFE3EE;
    --ticket-ink: #1B2530;
    --ticket-mute: #4A5A6A;
    --ticket-line: #B9CCD8;
    --ticket-dash: #6F8798;
    --ticket-wave: #D9A07A;
    --ticket-link: #0B4F9C;
    --ticket-qr-bg: #FFFFFF;

    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
    --font-rail: 'Barlow Semi Condensed', 'Arial Narrow', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --font-manskribo: 'Manskribo Sans', var(--font-display);

    --radius-s: 10px;
    --radius: 18px;
    --radius-l: 26px;
    /* Animationen (Abschnitt „Animationen“ am Ende) */
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
    --dur-fast: 150ms;
    --dur: 250ms;
    --dur-slow: 500ms;
    --max: 1180px;

    /* Kategorien der Reiseziele (Punkt auf der Karte + Nummer): Farbe und Schrift darauf */
    --cat-sehen: #6196FF;   --cat-sehen-on: #08090B;
    --cat-erleben: #FFC94D; --cat-erleben-on: #08090B;
    --cat-essen: #FF8A5B;   --cat-essen-on: #08090B;
    --cat-hotel: #EEF1F5;   --cat-hotel-on: #08090B;
    /* Spielbewertungen: Skala (Abzeichen mit Text in -on) */
    --score-top: #34D399;     --score-top-on: #08090B;
    --score-sehrgut: #6196FF; --score-sehrgut-on: #08090B;
    --score-gut: #7DD3FC;     --score-gut-on: #08090B;
    --score-mittel: #FBBF24;  --score-mittel-on: #08090B;
    --score-schwach: #F87171; --score-schwach-on: #08090B;
}

:root[data-theme="light"] {
    color-scheme: light;
    --plan-wall: #D5EBE6;
    --plan-window: #FFFFFF;
    --plan-table: #C99E67;
    --plan-line: #1D1D1B;
    --plan-lower: #D6D6D6;
    --bg: #F6F7F9;
    --surf: #FFFFFF;
    --surf2: #EDF0F4;
    --line: rgba(12, 20, 36, 0.10);
    --line2: rgba(12, 20, 36, 0.20);
    --track-rail: #9AA1AC;
    --track-sleeper: #DDE2E9;
    --t1: #0B0E14;
    --t2: #454C58;
    --t3: #5E6572;
    --acc: #0066CC;                     /* Phibs.-Blau (hell) */
    --soft: #E9F2FF;
    --btn: #0066CC;
    --on-btn: #FFFFFF;
    --nav: rgba(255, 255, 255, 0.9);
    --glass: rgba(255, 255, 255, 0.93);
    --ph1: #E8EBF0;
    --ph2: #E1E5EB;
    --glow: rgba(0, 102, 204, 0.10);
    --ok: #0E7A52;
    --ok-bg: #E3F7EE;
    --warn: #8A5A00;
    --warn-bg: #FFF6DB;
    --err: #B42318;
    --err-bg: #FDECEA;
    --cat-sehen: #0066CC;   --cat-sehen-on: #FFFFFF;
    --cat-erleben: #F5B700; --cat-erleben-on: #0B0E14;
    --cat-essen: #D9480F;   --cat-essen-on: #FFFFFF;
    --cat-hotel: #454C58;   --cat-hotel-on: #FFFFFF;
    /* Spielbewertungen: Skala (Abzeichen mit Text in -on) */
    --score-top: #0E7A55;     --score-top-on: #FFFFFF;
    --score-sehrgut: #0066CC; --score-sehrgut-on: #FFFFFF;
    --score-gut: #0B6E99;     --score-gut-on: #FFFFFF;
    --score-mittel: #9A5B00;  --score-mittel-on: #FFFFFF;
    --score-schwach: #C4302B; --score-schwach-on: #FFFFFF;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        color-scheme: light;
        --plan-wall: #D5EBE6;
        --plan-window: #FFFFFF;
        --plan-table: #C99E67;
        --plan-line: #1D1D1B;
        --plan-lower: #D6D6D6;
        --bg: #F6F7F9;
        --surf: #FFFFFF;
        --surf2: #EDF0F4;
        --line: rgba(12, 20, 36, 0.10);
        --line2: rgba(12, 20, 36, 0.20);
        --track-rail: #9AA1AC;
        --track-sleeper: #DDE2E9;
        --t1: #0B0E14;
        --t2: #454C58;
        --t3: #5E6572;
        --acc: #0066CC;
        --soft: #E9F2FF;
        --btn: #0066CC;
        --on-btn: #FFFFFF;
        --nav: rgba(255, 255, 255, 0.9);
        --glass: rgba(255, 255, 255, 0.93);
        --ph1: #E8EBF0;
        --ph2: #E1E5EB;
        --glow: rgba(0, 102, 204, 0.10);
        --ok: #0E7A52;
        --ok-bg: #E3F7EE;
        --warn: #8A5A00;
        --warn-bg: #FFF6DB;
        --err: #B42318;
        --err-bg: #FDECEA;
        --cat-sehen: #0066CC;   --cat-sehen-on: #FFFFFF;
        --cat-erleben: #F5B700; --cat-erleben-on: #0B0E14;
        --cat-essen: #D9480F;   --cat-essen-on: #FFFFFF;
        --cat-hotel: #454C58;   --cat-hotel-on: #FFFFFF;
        /* Spielbewertungen: Skala (Abzeichen mit Text in -on) */
        --score-top: #0E7A55;     --score-top-on: #FFFFFF;
        --score-sehrgut: #0066CC; --score-sehrgut-on: #FFFFFF;
        --score-gut: #0B6E99;     --score-gut-on: #FFFFFF;
        --score-mittel: #9A5B00;  --score-mittel-on: #FFFFFF;
        --score-schwach: #C4302B; --score-schwach-on: #FFFFFF;
    }
}

/* ───────────────────────── Grundlagen ───────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    background: var(--bg);
    color: var(--t1);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}
img, video, svg { max-width: 100%; }
img { display: block; height: auto; }
[hidden] { display: none !important; } /* sonst hebt z. B. img { display: block } das hidden-Attribut auf */
a { color: var(--acc); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: 16px; }
.section { padding-block: 0 96px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--btn); color: var(--on-btn); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ───────────────────────── Typografie ───────────────────────── */

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--acc); }
.h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(44px, 6.6vw, 88px); line-height: 0.98; letter-spacing: -0.045em; }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4vw, 50px); line-height: 1.05; letter-spacing: -0.04em; }
.h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; }
.lead { font-size: 18px; color: var(--t2); max-width: 620px; }
.muted { color: var(--t3); }
.text-2 { color: var(--t2); }
.mono { font-family: var(--font-mono); }
.acc { color: var(--acc); }
.prose { color: var(--t2); font-size: 17px; max-width: 70ch; }
.prose p + p { margin-top: 1em; }
.prose h2, .prose h3 { color: var(--t1); margin: 1.8em 0 0.5em; }
.prose > :first-child { margin-top: 0; }
.prose h3:not([class]) { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.prose ul { margin: 0.6em 0 1em; padding-left: 1.3em; }
.prose li + li { margin-top: 0.3em; }
.prose strong { color: var(--t1); }
.prose a { color: var(--acc); text-decoration: underline; text-underline-offset: 0.15em; }
.prose code { font-family: var(--font-mono); font-size: 0.9em; }

/* ───────────────────────── Buttons ───────────────────────── */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 20px; border-radius: 14px;
    border: 1px solid var(--line2); background: var(--surf); color: var(--t1);
    font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--acc); }
.btn--primary { background: var(--btn); border-color: var(--btn); color: var(--on-btn); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--sm { min-height: 40px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.btn--danger { color: var(--err); }
.btn--rail { border-radius: 0; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); padding-inline: 26px; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
    background: transparent; color: var(--t2); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { color: var(--t1); border-color: var(--line2); }
.link-arrow { font-weight: 600; color: var(--acc); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* ───────────────────────── Kopfzeile ───────────────────────── */

/* Material Symbols: Umriss normal, ausgefüllt bei aktiven Punkten (icon_pair()) */
.icon { flex: none; }
.icon-pair { display: inline-flex; flex: none; }
.icon-pair .icon--f { display: none; }
[aria-current] > .icon-pair .icon--o, .is-shown > .icon-pair .icon--o { display: none; }
[aria-current] > .icon-pair .icon--f, .is-shown > .icon-pair .icon--f { display: block; }
.is-browsing .admin-rail__item[aria-current]:not(.is-shown) > .icon-pair .icon--o { display: block; }
.is-browsing .admin-rail__item[aria-current]:not(.is-shown) > .icon-pair .icon--f { display: none; }
/* Hauptmenü: Symbole nur im Handy-Menü */
.nav__links .icon-pair { display: none; }

/* Leiste über die ganze Breite; Inhalt auf --max begrenzt */
.site-header { display: flex; flex-direction: column; align-items: center; }
.site-header .subnav { margin-top: 10px; }
/* Gleis als Trenner: zwei Schienen auf Schwellen, über die ganze Breite */
.site-track {
    position: relative; width: 100%; height: 22px;
    background: repeating-linear-gradient(90deg, var(--track-sleeper) 0 7px, transparent 7px 22px);
}
.site-track::before, .site-track::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--track-rail); }
.site-track::before { top: 5px; }
.site-track::after { bottom: 5px; }
.site-bar { width: 100%; display: flex; justify-content: center; padding: 0 16px; background: var(--nav); }
.nav {
    width: 100%; max-width: var(--max); min-height: 70px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px;
    padding: 10px 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--t1); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.03em; }
/* Logo „Phibs.“ – Bilder je Modus: weiß im Dunkel-, schwarz im Hellmodus (siehe site_logo()) */
.site-logo { display: block; height: 34px; width: auto; }
.site-logo--admin { height: 30px; }
.site-logo--lg { height: 48px; }
.site-logo--footer { height: 40px; }
.theme-light-only { display: none; }
:root[data-theme="light"] .theme-light-only { display: block; }
:root[data-theme="light"] .theme-dark-only { display: none; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .theme-light-only { display: block; }
    :root:not([data-theme="dark"]) .theme-dark-only { display: none; }
}
.nav__links { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; font-size: 15px; }
/* Aktiver Punkt: helle Schrift mit kurzer, runder Akzentlinie darunter (statt Box) */
.nav__links a { position: relative; padding: 10px 12px; border-radius: 10px; color: var(--t2); text-decoration: none; transition: color 0.15s; }
.nav__links a::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; border-radius: 3px; background: var(--acc); transform: translateX(-50%) scaleX(0); transition: transform 0.2s; }
.nav__links a:hover { color: var(--t1); }
.nav__links a:hover::after { transform: translateX(-50%) scaleX(0.6); opacity: 0.5; }
.nav__links a[aria-current="page"] { color: var(--t1); font-weight: 600; }
.nav__links a[aria-current="page"]::after { transform: translateX(-50%) scaleX(1); opacity: 1; }
.nav__links a:focus-visible { outline: 2px solid var(--acc); outline-offset: 0; }
@media (prefers-reduced-motion: reduce) { .nav__links a, .nav__links a::after { transition: none; } }
.nav__actions { display: flex; gap: 6px; }

/* Modellbahn: eigene Unternavigation im ÖBB-Stil */
.subnav {
    width: calc(100% - 32px); max-width: var(--max);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
    padding: 6px; background: var(--surf); border: 1px solid var(--line); border-radius: 14px;
}
.subnav__links { display: flex; flex-wrap: wrap; gap: 2px; font-family: var(--font-rail); font-weight: 600; font-size: 17px; }
.subnav__links a { padding: 8px 18px; color: var(--t2); text-decoration: none; }
.subnav__links a:hover { color: var(--t1); }
.subnav__links a[aria-current="page"] {
    padding-inline: 24px; background: var(--btn); color: var(--on-btn);
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.subnav__meta { padding: 0 10px; font-family: var(--font-mono); font-size: 12px; color: var(--t3); }

/* Desktop: Leiste, Menü und Logo etwas größer */
@media (min-width: 761px) {
    .nav { min-height: 84px; }
    .nav .site-logo { height: 42px; }
    .nav__links { font-size: 16px; gap: 6px; }
    .nav__links a { padding: 10px 14px; }
    .nav__links a::after { width: 22px; }
}

/* Handy: Hauptmenü hinter „Menü“-Knopf, Unternavigation als wischbare Zeile */
.nav__menu { display: none; }
@media (max-width: 760px) {
    .nav__menu { display: inline-flex; }
    .nav__links { display: none; order: 3; width: 100%; flex-direction: column; padding: 4px 0 2px; }
    .nav.is-open .nav__links { display: flex; }
    .nav__links a { display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 18px; font-size: 15px; }
    .nav__links .icon-pair { display: inline-flex; color: var(--t3); }
    .nav__links a[aria-current="page"] .icon-pair { color: var(--acc); }
    .nav__links a::after { left: 4px; top: 50%; bottom: auto; width: 3px; height: 18px; transform: translateY(-50%) scaleY(0); }
    .nav__links a:hover::after { transform: translateY(-50%) scaleY(0.6); }
    .nav__links a[aria-current="page"]::after { transform: translateY(-50%) scaleY(1); }
    .subnav { flex-wrap: nowrap; }
    .subnav__links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; font-size: 16px; }
    .subnav__links::-webkit-scrollbar { display: none; }
    .subnav__links a { white-space: nowrap; padding: 8px 14px; }
    .subnav__meta { display: none; }
}

.status-strip {
    width: 100%; max-width: var(--max);
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    padding: 10px 16px; background: var(--surf); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; color: var(--t2);
}
.status-strip strong { color: var(--t1); font-weight: 600; }
.board-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 2px 10px; border-radius: 6px;
    background: var(--board); color: var(--board-text); font-family: var(--font-mono); font-size: 12px; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--warn); flex: none; }
.dot--live { background: var(--live); }
.dot--ok { background: var(--ok); }

/* ───────────────────────── Bausteine ───────────────────────── */

.card { background: var(--surf); border: 1px solid var(--line); border-radius: var(--radius-l); }
.card--pad { padding: 28px; }
.pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 8px;
    background: var(--soft); color: var(--acc); font-size: 12px; font-weight: 600;
}
.pill--outline { background: transparent; border: 1px solid var(--line2); color: var(--t2); font-weight: 500; }
.pill--board { background: var(--board); color: var(--board-text); font-family: var(--font-mono); font-weight: 500; border-radius: 5px; }
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--warn { background: var(--warn-bg); color: var(--warn); }

/* Bild-Platzhalter (gestreift), bis echte Fotos da sind */
.ph {
    display: flex; align-items: center; justify-content: center; text-align: center;
    background: repeating-linear-gradient(135deg, var(--ph1) 0 16px, var(--ph2) 16px 32px);
    color: var(--t3); font-size: 14px; padding: 12px;
}

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.grid--shop { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px;
    border-radius: 10px; border: 1px solid var(--line2); background: transparent; color: var(--t2);
    font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer;
}
.chip:hover { color: var(--t1); }
.chip[aria-current="page"], .chip[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--on-btn); }

.toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
    padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line);
}
.search {
    display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px;
    border-radius: 10px; border: 1px solid var(--line2); background: var(--surf); color: var(--t3);
}
.search input { width: 180px; border: 0; outline: 0; background: transparent; color: var(--t1); font-size: 14px; }

.empty { padding: 56px 24px; border: 1px dashed var(--line2); border-radius: var(--radius-l); text-align: center; color: var(--t3); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; font-size: 14px; color: var(--t3); }
.breadcrumb a { color: var(--t3); text-decoration: none; }
.breadcrumb a:hover { color: var(--t1); }

/* ───────────────────────── Startseite ───────────────────────── */

.hero { padding: 72px 0 96px; background: radial-gradient(45% 60% at 85% 0%, var(--glow), transparent 70%); }
.hero__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero__text { flex: 1 1 520px; min-width: 0; max-width: 820px; display: flex; flex-direction: column; gap: 22px; }

.split { display: flex; flex-wrap: wrap; overflow: hidden; }
.split__text { flex: 1 1 480px; min-width: 0; padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.split__media { flex: 1 1 480px; min-height: 420px; margin: 10px; border-radius: 20px; overflow: hidden; }
.split__media img, .split__media .ph { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) { .split__text { padding: 28px 22px; } }

.signal { display: inline-flex; flex-direction: column; gap: 3px; padding: 4px; border-radius: 6px; background: var(--board); }
.signal span { width: 6px; height: 6px; border-radius: 999px; background: #2A3242; }
.signal span:first-child { background: #34D399; }

.facts { display: flex; flex-wrap: wrap; gap: 28px; margin: 6px 0 4px; }
.facts dt { font-size: 13px; color: var(--t3); }
.facts dd { margin: 0; font-family: var(--font-mono); font-size: 22px; font-weight: 500; }

.feature { display: flex; flex-wrap: wrap; align-items: center; overflow: hidden; }
.feature__text { flex: 1 1 380px; min-width: 0; padding: 40px 44px; display: flex; flex-direction: column; gap: 14px; }
.feature__media { flex: 1.3 1 480px; min-width: 0; position: relative; aspect-ratio: 16 / 9; margin: 10px; border-radius: 18px; overflow: hidden; }
.feature__media video, .feature__media .ph { width: 100%; height: 100%; object-fit: cover; display: flex; }
@media (max-width: 560px) { .feature__text { padding: 28px 22px; } }
/* jede zweite Karte am Desktop gespiegelt – im HTML (und am Handy) steht der Text immer zuerst */
.feature--reverse { flex-direction: row-reverse; }

/* Startseite: Reisen (Einleitung im HTML zuerst, am Desktop rechts) */
.start-travel { flex-direction: row-reverse; gap: 40px; align-items: center; }
.start-travel__text { flex: 1 1 380px; min-width: 0; gap: 18px; }
.start-travel__card { flex: 1 1 560px; min-width: 0; overflow: hidden; color: inherit; text-decoration: none; }
.start-travel__img { height: 300px; margin: 10px 10px 0; border-radius: 18px; overflow: hidden; }
.start-travel__img img, .start-travel__img .ph { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) { .start-travel__img { height: 220px; } }

/* Startseite: Manskribo Sans */
.start-font { overflow: hidden; }
.start-font__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px; padding: 44px 44px 32px; }
.start-font__head > .stack { flex: 1 1 480px; }
.start-font__title { font-family: var(--font-manskribo); font-weight: 400; font-size: clamp(52px, 8vw, 112px); line-height: 0.95; letter-spacing: -0.01em; color: var(--t1); }
.start-font__stats { display: flex; flex-wrap: wrap; gap: 18px 36px; margin: 0; }
.start-font__stats dt { font-family: var(--font-mono); font-size: 12px; color: var(--t3); }
.start-font__stats dd { margin: 4px 0 0; font-family: var(--font-mono); font-size: 26px; color: var(--t1); }
.start-font__glyphs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); border-top: 1px solid var(--line); background: var(--surf2); }
.start-font__glyphs span { display: flex; align-items: center; justify-content: center; padding: 22px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--font-manskribo); font-size: clamp(40px, 5vw, 60px); line-height: 1.1; color: var(--t1); }
.start-font__glyphs span:nth-child(3n+1) { color: var(--acc); }
.start-font__sample { padding: 26px 44px 32px; font-family: var(--font-manskribo); font-size: clamp(22px, 3.2vw, 36px); line-height: 1.3; color: var(--t2); overflow-wrap: anywhere; }
@media (max-width: 560px) { .start-font__head { padding: 28px 22px 24px; } .start-font__sample { padding: 20px 22px 26px; } }


.linktile { display: flex; align-items: center; gap: 16px; padding: 20px 22px; color: var(--t1); text-decoration: none; }
.linktile__icon { flex: none; display: inline-flex; width: 46px; height: 46px; border-radius: 13px; align-items: center; justify-content: center; background: var(--soft); color: var(--acc); }


.partner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; padding: 22px; color: var(--t1); text-decoration: none; }
.partner__logo { flex: none; display: flex; width: 84px; height: 84px; border-radius: 18px; align-items: center; justify-content: center; overflow: hidden; background: var(--surf2); color: var(--t3); font-size: 12px; }
/* echte Logos sind Querformat: breiter Platz, ohne Kästchen */
.partner__logo--img { width: 180px; height: 56px; border-radius: 10px; background: none; }
.partner__logo img { width: 100%; height: 100%; object-fit: contain; object-position: left center; }

/* ───────────────────────── Fußzeile ───────────────────────── */

.site-footer { border-top: 1px solid var(--line); padding: 56px 16px 36px; }
.site-footer__cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 48px; font-size: 14px; }
.site-footer__nav div { display: flex; flex-direction: column; gap: 9px; }
.site-footer__nav p { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t3); margin-bottom: 4px; }
.site-footer a { color: var(--t2); text-decoration: none; }
.site-footer a:hover { color: var(--t1); }
.site-footer__bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--t3); }

/* ───────────────────────── Modellbahn ───────────────────────── */

.rail h1, .rail h2, .rail .rail-title { font-family: var(--font-rail); letter-spacing: -0.005em; }
.rail .h1 { font-weight: 700; font-size: clamp(42px, 5.6vw, 72px); line-height: 0.98; }
.rail .h2 { font-weight: 700; font-size: clamp(32px, 4vw, 48px); line-height: 1.02; }
.rail .eyebrow { font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }

/* Bilder-Slider */
.slider { position: relative; height: clamp(420px, 52vw, 620px); border-radius: 24px; overflow: hidden; border: 1px solid var(--line); }
.slider__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; }
.slider__slide.is-active { opacity: 1; }
.slider__slide img, .slider__slide .ph { width: 100%; height: 100%; object-fit: cover; }
/* Foto bis ganz unten; dunkler Verlauf unten, damit Punkte und Pfeile auf jedem Foto lesbar sind */
.slider::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; z-index: 0; background: linear-gradient(to top, var(--img-scrim-mid), var(--img-scrim-none)); pointer-events: none; }
.slider__count, .slider__panel, .slider__controls { z-index: 1; }
.slider__count { position: absolute; top: 20px; left: 20px; padding: 4px 10px; border-radius: 8px; background: var(--board); color: var(--board-text); font-family: var(--font-mono); font-size: 13px; }
.slider__panel {
    position: absolute; left: 20px; right: 20px; bottom: 76px; max-width: 580px;
    display: flex; flex-direction: column; gap: 12px; padding: 28px 30px;
    border-radius: 18px; background: var(--glass); border: 1px solid var(--line);
}
.slider__controls { position: absolute; left: 20px; right: 20px; bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.slider__dots { display: flex; align-items: center; gap: 4px; }
.slider__dots button { display: inline-flex; width: 48px; height: 44px; padding: 0; border: 0; background: transparent; align-items: center; cursor: pointer; }
.slider__dots button span { width: 44px; height: 5px; border-radius: 3px; background: var(--on-img-dim); opacity: 0.6; }
.slider__dots button[aria-current="true"] span { background: var(--acc); opacity: 1; }
.round-btn { display: inline-flex; width: 48px; height: 48px; border-radius: 999px; border: 0; background: var(--glass); color: var(--t1); align-items: center; justify-content: center; cursor: pointer; }
.square-btn { display: inline-flex; width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--glass); color: var(--t1); align-items: center; justify-content: center; cursor: pointer; }

/* Abfahrtstafel / Steckbrief */
.board { background: var(--board); color: var(--board-text); border-radius: 22px; overflow: hidden; }
.board__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.board__head h2 { font-family: var(--font-rail); font-weight: 700; font-size: 26px; }
.board__head a { color: var(--board-label); text-decoration: none; font-family: var(--font-mono); font-size: 13px; }
.board dl { margin: 0; font-family: var(--font-mono); font-size: 15px; }
.board dl > div { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 14px 24px; border-bottom: 1px solid var(--board-line); }
.board dl > div:last-child { border-bottom: 0; }
.board dt { flex: 0 0 140px; color: var(--board-label); text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; padding-top: 3px; }
.board dd { margin: 0; }
.board table { width: 100%; min-width: 680px; border-collapse: collapse; font-family: var(--font-mono); font-size: 15px; }
.board th { text-align: left; padding: 12px; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(243, 246, 250, 0.7); }
.board td { padding: 16px 12px; border-top: 1px solid var(--board-line); }
.board th:first-child, .board td:first-child { padding-left: 24px; }
.board th:last-child, .board td:last-child { padding-right: 24px; text-align: right; }
.board td a { color: var(--board-text); font-family: var(--font-body); font-weight: 600; text-decoration: none; }
.board td a:hover { text-decoration: underline; }
.board .time { color: var(--board-label); white-space: nowrap; }
.board .area { color: rgba(243, 246, 250, 0.75); }
/* ÖBB-Anzeigetafel: Kopf (Abfahrt/Departure + Uhr), Tabelle mit zweisprachigen Spaltenköpfen,
   Zugnummer als Kästchen, „neu“/„live“ gelb, Gleis groß rechts, gelbe Infozeile. Schrift = Seitenschrift. */
.ob { background: var(--ob-bg); color: var(--ob-text); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22); }
.ob a { color: inherit; text-decoration: none; }
.ob a:focus-visible { outline: 2px solid var(--ob-yellow); outline-offset: 2px; }
.ob i.en { font-weight: 400; color: var(--ob-dim); }
.ob__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; background: var(--ob-head); }
.ob__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.ob__title i { font-size: 18px; }
.ob__clock { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ob table { width: 100%; border-collapse: collapse; }
.ob th { text-align: left; padding: 8px 12px; font-size: 13px; font-weight: 700; line-height: 1.15; border-bottom: 1px solid var(--ob-line); vertical-align: bottom; }
.ob th i.en { display: block; font-size: 11px; }
.ob td { padding: 10px 12px; vertical-align: top; font-size: 18px; font-weight: 700; line-height: 1.25; }
.ob tbody tr { position: relative; }
.ob tbody tr:nth-child(odd) { background: var(--ob-row); }   /* erste Zeile hellblau, dann im Wechsel */
.ob tbody tr:hover { background: var(--ob-hover); }
.ob .ob-t { width: 1%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ob .ob-exp { width: 1%; white-space: nowrap; color: var(--ob-yellow); }
.ob .ob-to a::after { content: ""; position: absolute; inset: 0; } /* ganze Zeile anklickbar */
.ob .ob-to { overflow-wrap: anywhere; hyphens: auto; } /* lange Titel umbrechen statt Tafel verbreitern (Handy) */
.ob .ob-via { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--ob-dim); }
.ob .ob-pf { width: 1%; text-align: right; font-size: 24px; }
.ob th.ob-pf { font-size: 13px; }
.ob-train { display: inline-block; padding: 1px 7px; border-radius: 3px; background: var(--ob-text); color: var(--ob-head); font-size: 14px; font-weight: 700; white-space: nowrap; }
.ob-train--red { background: var(--ob-red); color: var(--ob-text); }
.ob__info { display: flex; gap: 10px; align-items: baseline; margin: 0; padding: 10px 20px; background: var(--ob-head); color: var(--ob-yellow); font-size: 15px; font-weight: 600; }
.ob__info b { flex: none; padding: 0 6px; border-radius: 3px; background: var(--ob-yellow); color: var(--ob-head); }
.ob__empty { margin: 0; padding: 20px; color: var(--ob-dim); }
@media (max-width: 600px) {
    .ob .ob-exp { display: none; }
    .ob td { padding: 9px 8px; font-size: 16px; }
    .ob th { padding: 8px; }
    .ob .ob-pf { font-size: 20px; }
    .ob__title, .ob__clock { font-size: 22px; }
    .ob__title i { font-size: 15px; }
}
/* Modell-Detailseite: Funktionen als Abfahrtsmonitor – Zeitstempel springt im Video */
.fn-board td { vertical-align: middle; }
.fn-board tbody tr.is-active { background: var(--ob-hover); box-shadow: inset 4px 0 0 var(--ob-yellow); }
.ob-ts { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid var(--ob-line); border-radius: 4px; background: transparent; color: var(--ob-text); font: inherit; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.ob-ts:hover { border-color: var(--ob-dim); }
.ob-ts:focus-visible { outline: 2px solid var(--ob-yellow); outline-offset: 2px; }
.ob-ts[aria-pressed="true"] { background: var(--ob-yellow); border-color: var(--ob-yellow); color: var(--ob-head); }
.ob-ts--none { border-color: transparent; color: var(--ob-dim); cursor: default; }
.ob-ts--none:hover { border-color: transparent; }

/* Startseite: Tafel neben der Einleitung */
.hero__board { flex: 1 1 440px; min-width: 0; }

.gleis { display: inline-flex; width: 30px; height: 30px; border-radius: 5px; align-items: center; justify-content: center; background: var(--board-text); color: var(--board); font-weight: 600; }
.gleis--lg { width: 36px; height: 36px; font-family: var(--font-rail); font-size: 22px; font-weight: 700; }
.scroll-x { overflow-x: auto; }

.linklist { list-style: none; margin: 0; padding: 0; background: var(--surf); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.linklist a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--t1); text-decoration: none; font-weight: 500; }
.linklist li:last-child a { border-bottom: 0; }
.linklist a::after { content: "›"; color: var(--acc); font-size: 20px; }
.linklist a:hover { background: var(--surf2); }

/* Kilometertafeln */
.segmented { display: flex; padding: 4px; border-radius: 12px; background: var(--surf); border: 1px solid var(--line); }
.segmented button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--t2); font-weight: 600; font-size: 14px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--btn); color: var(--on-btn); }
.kmposts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px 20px; margin-bottom: 40px; }
.kmpost { display: flex; flex-direction: column; align-items: center; }
.kmpost__board {
    width: 100%; max-width: 210px; padding: 22px 12px 18px; background: #FFFFFF; border: 4px solid #0B0E14; border-radius: 10px;
    display: flex; flex-direction: column; align-items: center; color: #0B0E14; font-family: var(--font-rail);
}
.kmpost__value { font-weight: 700; font-size: 58px; line-height: 1; }
.kmpost__unit { font-weight: 600; font-size: 20px; }
.kmpost__pole { width: 8px; height: 26px; background: var(--t3); }
.kmpost__label { margin-top: 8px; font-size: 14px; color: var(--t2); }
/* Modellbahn: „Fahrkarte“ (templates/partials/ticket.php, Daten aus ticket_data()).
   Muster und Wellenlinie als SVG-Maske, damit die Farben aus den Tokens kommen. Stapelt per Container Query. */
.anlage-head { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 48px; margin-bottom: 36px; } /* Text senkrecht mittig zum Menü */
.anlage-head__text { flex: 1 1 420px; min-width: 0; gap: 12px; }
.anlage-head__links { flex: 0 1 380px; min-width: 260px; }
.fahrkarte-wrap { max-width: 680px; }
.fahrkarte { container-type: inline-size; position: relative; margin: 0; overflow: hidden; border: 1px solid var(--ticket-line); border-radius: 6px; background: var(--ticket-paper); color: var(--ticket-ink); font-family: var(--font-rail); line-height: 1.35; }
.fahrkarte::before { content: ""; position: absolute; inset: 0; background: var(--ticket-pattern); pointer-events: none;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cpath d='M0 0H26L0 26Z' fill-opacity='.6'/%3E%3Cpath d='M26 26V0L0 26Z' fill-opacity='.35'/%3E%3C/svg%3E");
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cpath d='M0 0H26L0 26Z' fill-opacity='.6'/%3E%3Cpath d='M26 26V0L0 26Z' fill-opacity='.35'/%3E%3C/svg%3E"); }
.fahrkarte > * { position: relative; }
.fahrkarte__in { padding: 14px 18px 6px; }
.fahrkarte__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1.5px solid var(--ticket-ink); }
.fahrkarte__logo { display: block; width: auto; height: 30px; }
.fahrkarte__title { margin: 0; font-family: var(--font-rail); font-size: 24px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.fahrkarte__nr { margin: 0; font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--ticket-mute); }
.fahrkarte__grid { display: grid; grid-template-columns: minmax(0, 1fr) 164px; gap: 16px; }
.fahrkarte__route { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.25; text-transform: uppercase; }
.fahrkarte__via { margin: 2px 0 12px; font-size: 15px; color: var(--ticket-mute); }
.fahrkarte__list { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: baseline; gap: 8px 12px; margin: 0; font-size: 16px; font-weight: 600; }
.fahrkarte__list dt { color: var(--ticket-mute); font-weight: 500; }
.fahrkarte__list dd { margin: 0; }
.fahrkarte__list small { display: block; font-size: 13px; font-weight: 500; color: var(--ticket-mute); }
.fahrkarte__list a { color: var(--ticket-link); text-decoration: underline; text-underline-offset: 2px; }
.fahrkarte__list a:focus-visible { outline: 2px solid var(--ticket-link); outline-offset: 2px; border-radius: 2px; }
.fahrkarte__price { font-family: var(--font-mono); font-size: 26px; font-weight: 500; }
.fahrkarte__side { min-width: 0; }
.fahrkarte__proto { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.fahrkarte__qr { display: inline-block; padding: 7px; border: 1px solid var(--ticket-line); border-radius: 4px; background: var(--ticket-qr-bg); line-height: 0; }
.fahrkarte__qr img { display: block; width: 148px; height: 148px; }
.fahrkarte__qr--missing { display: grid; place-items: center; width: 164px; height: 164px; padding: 10px; border-style: dashed; color: var(--ticket-mute); font: 500 11px/1.4 var(--font-mono); text-align: center; word-break: break-all; }
.fahrkarte__small { margin: 6px 0 0; font-size: 13px; color: var(--ticket-mute); }
.fahrkarte__qrlink { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ticket-link); font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.fahrkarte__qrlink svg { flex: none; }
.fahrkarte__qrlink:focus-visible { outline: 2px solid var(--ticket-link); outline-offset: 2px; border-radius: 2px; }
.fahrkarte__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 0; padding-top: 10px; border-top: 1px dashed var(--ticket-dash); }
.fahrkarte__stats dt { font-size: 13px; color: var(--ticket-mute); }
.fahrkarte__stats dd { margin: 0; font-family: var(--font-mono); font-size: 18px; font-weight: 500; }
.fahrkarte__wave { height: 18px; margin-top: 6px; background: var(--ticket-wave);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='18'%3E%3Cpath d='M0 9Q10 0 20 9T40 9' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='18'%3E%3Cpath d='M0 9Q10 0 20 9T40 9' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x; }
.fahrkarte__code { margin: 0; padding: 0 18px 10px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; color: var(--ticket-mute); overflow-wrap: anywhere; }
@container (max-width: 520px) {
    .fahrkarte__grid { grid-template-columns: minmax(0, 1fr); }
    .fahrkarte__title, .fahrkarte__route { font-size: 20px; }
}
@container (max-width: 300px) {
    .fahrkarte__list { grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
    .fahrkarte__list dd { margin-bottom: 8px; }
}

.statgroups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 14px; }
.statgroup { padding: 22px 22px 12px; }
.statgroup h3 { font-family: var(--font-rail); font-weight: 700; font-size: 22px; margin-bottom: 8px; }
.statgroup dl { margin: 0; }
.statgroup dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.statgroup dt { color: var(--t2); }
.statgroup dd { margin: 0; font-family: var(--font-mono); font-weight: 500; }

/* Gleisplan – SVG aus Illustrator (templates/partials/gleisplan.svg) bleibt unverändert,
   Farben kommen über die Füllfarben der Datei → Tokens --plan-*. Marker-Gruppen baut app.js. */
.map { flex: 999 1 560px; min-width: 0; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.map__toggle { align-self: flex-start; }
.map__toggle[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--on-btn); }
.map__plan > svg { display: block; width: 100%; height: auto; max-height: 82vh; }
.map #raum [fill="#d5ebe6"] { fill: var(--plan-wall); }
.map #raum [fill="#fff"] { fill: var(--plan-window); }
.map #raum [fill="#c99e67"], .map #raum [fill="#ca9e67"] { fill: var(--plan-table); }
.map #raum [stroke="#1d1d1b"] { stroke: var(--plan-line); }
.map #raum, .map #bahnhoefe { transition: opacity 0.2s; }
.map #untergeschoss { display: none; }
.map.show-lower #untergeschoss { display: inline; }
.map.show-lower #raum, .map.show-lower #bahnhoefe { opacity: 0.4; }
/* Marker: Klickfläche = unsichtbarer dicker Rand (fürs Handy), Buchstabe in der Mitte */
.plan-mark { cursor: pointer; outline: none; }
.plan-hit { fill: transparent; stroke: transparent; stroke-width: 80px; pointer-events: all; }
.plan-mark > rect:not(.plan-hit) { fill: var(--plan-mark); stroke: var(--plan-mark-line); }
#untergeschoss .plan-mark:not(.is-active) > rect:not(.plan-hit) { fill: var(--plan-lower); }
.plan-mark__code { fill: var(--t1); font-family: var(--font-rail); font-weight: 700; font-size: 44px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.plan-mark:hover > rect:not(.plan-hit) { stroke: var(--acc); }
.plan-mark.is-active > rect:not(.plan-hit) { fill: var(--btn); stroke: var(--btn); }
.plan-mark.is-active .plan-mark__code { fill: var(--on-btn); }
.plan-mark:focus-visible > rect:not(.plan-hit) { stroke: var(--acc); stroke-width: 12px; }
.plan-mark.is-active:focus-visible > rect:not(.plan-hit) { stroke: var(--t1); }
@media (prefers-reduced-motion: reduce) { .map #raum, .map #bahnhoefe { transition: none; } }
.map-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.station-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 8px; }
.station-btns button { min-height: 48px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surf); color: var(--t1); font-family: var(--font-rail); font-weight: 700; font-size: 22px; cursor: pointer; }
.station-btns button[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--on-btn); }
.legend { list-style: none; margin: 0; padding: 18px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; font-size: 13px; color: var(--t2); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend__mark { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--plan-mark-line); background: var(--plan-mark); color: var(--t1); font-family: var(--font-rail); font-weight: 700; font-size: 12px; line-height: 1; }
.legend__mark--lower { border-style: dashed; background: var(--plan-lower); }
.legend__table { flex: none; width: 22px; height: 12px; border-radius: 2px; border: 1px solid var(--plan-line); background: var(--plan-table); }

/* Shop-Kacheln (Modelle & Downloads) */
.tile { display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; }
.tile__img { position: relative; aspect-ratio: 1 / 1; margin: 8px 8px 0; border-radius: 12px; overflow: hidden; }
.tile__img img, .tile__img .ph { width: 100%; height: 100%; object-fit: cover; }
.tile__badge { position: absolute; top: 10px; left: 10px; }
.tile__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.tile__cat { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--acc); }
.tile__title { font-family: var(--font-rail); font-weight: 700; font-size: 22px; line-height: 1.15; }
.tile__meta { font-size: 13px; color: var(--t3); }
.tile .btn { align-self: flex-start; margin-top: auto; }
.tile__body .btn { margin-top: 10px; }
/* Ganze Karte anklickbar: der Link im Titel deckt per ::after die Karte ab (Screenreader liest nur den Titel) */
.tile--link { position: relative; transition: border-color 0.2s; }
.tile--link .tile__title a { color: inherit; text-decoration: none; }
.tile--link .tile__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tile--link .tile__title a:focus-visible { outline: none; }
.tile--link .tile__title a:focus-visible::after { outline: 2px solid var(--acc); outline-offset: 2px; }
.tile--link:hover { border-color: var(--acc); }
.tile--link:hover .tile__title { color: var(--acc); }
.tile--link .tile__img img { transition: transform 0.3s; }
.tile--link:hover .tile__img img { transform: scale(1.03); }
.tile--link:hover .btn--primary { filter: brightness(1.08); }
@media (prefers-reduced-motion: reduce) { .tile--link, .tile--link .tile__img img { transition: none; } .tile--link:hover .tile__img img { transform: none; } }

/* Detailseiten */
.detail { display: flex; flex-wrap: wrap; gap: 40px; }
.gallery { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.gallery__main { aspect-ratio: 1 / 1; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.gallery__main img, .gallery__main .ph { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gallery__thumbs button { aspect-ratio: 1 / 1; padding: 0; border-radius: 12px; border: 2px solid transparent; overflow: hidden; background: var(--surf2); cursor: pointer; }
.gallery__thumbs button[aria-current="true"] { border-color: var(--acc); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail__info { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.spec-board dl > div { justify-content: space-between; padding: 12px 18px; }
.spec-board dt { flex: none; }

.specs { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); column-gap: 32px; padding: 6px 24px 10px; }
.specs > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.specs dt { color: var(--t3); }
.specs dd { margin: 0; text-align: right; font-weight: 500; }
.intern { padding: 22px 24px; border-style: dashed; border-color: var(--line2); }

.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.compare > div { padding: 22px; }
/* Vorbild & Modell: Fotos vom Original (Slider) links, Vergleichswerte rechts */
.proto { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.proto > .compare { flex: 1 1 360px; min-width: 0; }
.proto__media { position: relative; flex: 1 1 420px; min-width: 0; aspect-ratio: 3 / 2; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--surf2); }
.proto__media .mini-slider, .proto__media .mini-slider img { width: 100%; height: 100%; }
.proto__media .mini-slider img { object-fit: cover; }
.proto:has(.proto__media) > .compare { grid-template-columns: 1fr; }
.compare p:last-child { font-family: var(--font-rail); font-weight: 700; font-size: 32px; line-height: 1.1; }

/* Video (Zwei-Klick-Lösung) + Funktionstabelle */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--surf2); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__consent { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; color: var(--t2); font-size: 14px; }
.video__consent .play { display: inline-flex; width: 68px; height: 68px; border-radius: 999px; border: 0; background: var(--btn); color: var(--on-btn); align-items: center; justify-content: center; cursor: pointer; }
.video__consent small { max-width: 420px; color: var(--t3); }
.fn-layout { display: flex; flex-direction: column; gap: 20px; }
/* Video über der Funktionstafel; Klick auf einen Zeitstempel scrollt hierher (Abstand für die Kopfzeile) */
.fn-layout__video { width: 100%; max-width: 960px; margin: 0 auto; scroll-margin-top: 100px; }
.fn-layout__table { min-width: 0; overflow: hidden; border-radius: 18px; }
.fkey { display: inline-flex; min-width: 40px; justify-content: center; padding: 2px 6px; border-radius: 6px; background: var(--board); color: var(--board-text); font-family: var(--font-mono); font-size: 12px; }

.filelist { list-style: none; margin: 0; padding: 0; overflow: hidden; border-radius: 16px; }
.filelist li { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.filelist li:last-child { border-bottom: 0; }
.filelist__name { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--soft); font-size: 14px; color: var(--t2); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: step; }
.steps li { display: flex; gap: 14px; color: var(--t2); counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); flex: none; display: inline-flex; width: 36px; height: 36px; border-radius: 10px; align-items: center; justify-content: center; background: var(--surf2); font-family: var(--font-mono); font-size: 13px; color: var(--acc); }

.soon { padding: 96px 0 120px; text-align: center; }
.soon .stack { align-items: center; }

/* ───────────────────────── Formulare ───────────────────────── */

.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--t3); }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
    min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2);
    background: var(--bg); color: var(--t1); font-size: 14px;
}
.field textarea { padding: 10px 12px; resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--acc); outline-offset: 0; border-color: transparent; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.check { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--t1); }
.check input { width: 20px; height: 20px; accent-color: var(--btn); }
.dropzone { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1.5px dashed var(--line2); border-radius: 12px; background: var(--bg); color: var(--t2); font-size: 14px; }
.flash { padding: 12px 16px; border-radius: 12px; font-size: 14px; background: var(--ok-bg); color: var(--ok); }
.flash--error { background: var(--err-bg); color: var(--err); }

/* ───────────────────────── Admin ───────────────────────── */

/* Admin: Symbol-Leiste (Bereiche) + Spalte mit den Unterpunkten des gewählten Bereichs */
.admin { min-height: 100vh; display: flex; font-size: 15px; line-height: 1.55; }
.admin-rail { position: sticky; top: 0; height: 100vh; width: 76px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0; background: var(--surf); border-right: 1px solid var(--line); overflow-y: auto; }
.admin-rail__brand { display: inline-flex; margin-bottom: 10px; border-radius: 12px; }
.admin-rail__brand img { width: 40px; height: 40px; display: block; }
.admin-rail__item { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 62px; padding: 8px 0; border: 0; border-radius: 12px; background: none; color: var(--t2); font: inherit; font-size: 10.5px; line-height: 1.2; text-decoration: none; cursor: pointer; }
.admin-rail__item:hover { color: var(--t1); background: var(--surf2); }
.admin-rail__item[aria-current], .admin-rail__item.is-shown { background: var(--soft); color: var(--acc); font-weight: 600; }
.is-browsing .admin-rail__item[aria-current]:not(.is-shown) { background: none; color: var(--t2); font-weight: 400; }
.admin-rail__item:focus-visible, .admin-rail__brand:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.admin-rail__theme { margin-top: auto; }
.admin-rail__avatar { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--surf2); color: var(--acc); font-size: 13px; font-weight: 700; }
.admin-sub { position: sticky; top: 0; height: 100vh; width: 232px; flex: none; padding: 22px 12px; background: var(--bg); border-right: 1px solid var(--line); overflow-y: auto; }
.admin--nosub .admin-sub { display: none; }
.admin--nosub.has-sub .admin-sub { display: block; }
.admin-sub__panel { display: flex; flex-direction: column; gap: 10px; }
.admin-sub__panel[hidden] { display: none; }
.admin-sub__title { padding: 0 10px; font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--t1); }
.admin-sub__new { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border: 1px dashed var(--line2); border-radius: 9px; color: var(--acc); font-size: 14px; text-decoration: none; }
.admin-sub__new:hover { background: var(--soft); }
.admin-sub__foot { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.admin__main { flex: 1 1 auto; min-width: 0; padding: 24px 32px 48px; }
@media (max-width: 560px) { .admin__main { padding: 20px 16px 40px; } }
.admin__inner { max-width: 1120px; display: flex; flex-direction: column; gap: 20px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.admin-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; color: var(--t2); text-decoration: none; }
.admin-nav a:hover { color: var(--t1); background: var(--surf2); }
.admin-nav a[aria-current="page"] { background: var(--surf2); color: var(--t1); font-weight: 600; }
/* Handy/Tablet: Leiste als Tab-Leiste unten, Unterpunkte als waagrechte Reihe oben */
@media (max-width: 860px) {
    .admin { flex-direction: column; padding-bottom: 72px; }
    .admin-rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 50; height: auto; width: auto; flex-direction: row; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); overflow: visible; }
    .admin-rail__brand { display: none; }
    .admin-rail__item { width: auto; flex: 1 1 0; min-width: 0; padding: 6px 0; }
    .admin-rail__theme { margin-top: 0; }
    .admin-sub, .admin--nosub.has-sub .admin-sub { position: static; height: auto; width: auto; padding: 12px 16px 0; border-right: 0; overflow: visible; }
    .admin-sub__panel { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
    .admin-sub__title { display: none; }
    .admin-sub .admin-nav { flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
    .admin-sub .admin-nav::-webkit-scrollbar { display: none; }
    .admin-sub .admin-nav a, .admin-sub__new { white-space: nowrap; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; }
    .admin-sub__foot { flex-direction: row; margin-top: 0; }
}
.admin-box { padding: 20px 22px; background: var(--surf); border: 1px solid var(--line); border-radius: 18px; }
.admin-box h2 { font-family: var(--font-display); font-size: 18px; margin-bottom: 14px; }
.admin-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.admin-cols__main { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.admin-cols__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.stat-card { padding: 16px 18px; border-radius: 14px; background: var(--surf); border: 1px solid var(--line); }
.stat-card b { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 500; color: var(--t3); }
.admin-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.admin-table input, .admin-table select { width: 100%; min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg); color: var(--t1); font-size: 14px; }
.admin-table a { color: var(--t1); font-weight: 600; text-decoration: none; }
.admin-table a:hover { color: var(--acc); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumb { position: relative; border-radius: 10px; overflow: hidden; background: var(--surf2); }
.thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.thumb__bar { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 4px 6px; font-size: 12px; }
.thumb__bar button { border: 0; background: transparent; color: var(--err); cursor: pointer; font-size: 12px; }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; padding: 32px; }

/* ───────────────────────── Admin: Beitrags-Editor (Editor.js) ───────────────────────── */

.post-editor { display: flex; flex-direction: column; gap: 16px; }
.post-editor__bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -32px; padding: 12px 32px; background: var(--bg); border-bottom: 1px solid var(--line); }
.post-title-input { width: 100%; padding: 4px 0; border: 0; background: transparent; color: var(--t1); font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.03em; }
.post-title-input::placeholder { color: var(--t3); }
.post-title-input:focus { outline: none; }
.post-title-input:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; border-radius: 6px; }
.post-cover-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-cover-preview img { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }

/* Segment-Auswahl (Bereich) – echte Radio-Buttons, nur optisch als Kacheln */
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 11px; font-size: 14px; color: var(--t1); }
.seg input:checked + span { background: var(--btn); border-color: var(--btn); color: var(--on-btn); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }

/* Adresse: fester Teil + eigener Teil. Ist es zu eng (Seitenleiste), rutscht das Eingabefeld in eine eigene Zeile. */
.slug-field { display: flex; flex-wrap: wrap; align-items: stretch; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg); overflow: hidden; }
.slug-field > span { display: flex; align-items: center; max-width: 100%; padding: 6px 0 6px 10px; font-size: 12px; color: var(--t3); overflow-wrap: anywhere; }
.field .slug-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { flex: 1 1 14ch; min-width: 14ch; border: 0; border-radius: 0; background: transparent; padding-left: 6px; font-size: 13px; }
.dl-pick { margin-top: 14px; padding: 0; border: 0; }
.dl-pick legend { margin-bottom: 4px; font-size: 13px; color: var(--t3); }

/* Editor-Fläche */
.editor { min-height: 320px; color: var(--t1); font-size: 17px; line-height: 1.6; }
.editor-hint { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.editor .ce-block__content, .editor .ce-toolbar__content { max-width: none; }
.editor .ce-header { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.editor h2.ce-header { font-size: 28px; }
.editor h3.ce-header { font-size: 21px; }
.editor .ce-toolbar__plus, .editor .ce-toolbar__settings-btn { color: var(--t2); }
.editor .ce-toolbar__plus:hover, .editor .ce-toolbar__settings-btn:hover { background: var(--surf2); color: var(--t1); }
.editor .cdx-input { border-color: var(--line2); background: var(--bg); color: var(--t1); box-shadow: none; }
.editor .cdx-marker, .editor mark { background: var(--soft); color: var(--t1); }
.editor .inline-code { background: var(--surf2); color: var(--t1); }
.editor .ce-block--selected .ce-block__content { background: var(--soft); }
/* Menüs von Editor.js an Hell/Dunkel anpassen (Editor.js nutzt eigene CSS-Variablen) */
.editor .ce-popover, .ce-popover {
    --color-background: var(--surf);
    --color-text-primary: var(--t1);
    --color-text-secondary: var(--t3);
    --color-border: var(--line2);
    --color-shadow: var(--line2);
    --color-background-item-hover: var(--surf2);
    --color-background-item-focus: var(--surf2);
    --color-background-icon-active: var(--soft);
    --color-text-icon-active: var(--acc);
    --color-background-item-confirm: var(--err);
    --color-background-item-confirm-hover: var(--err);
}
.ce-popover-item__icon { background: var(--surf2); color: var(--t1); box-shadow: none; }
.ce-inline-toolbar, .ce-conversion-toolbar, .ce-settings { color: var(--t1); }

/* Galerie-Tool */
.gallery-tool { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surf2); }
.gallery-tool__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery-tool__grid:empty { display: none; }
.gallery-tool__item { display: flex; flex-direction: column; gap: 6px; }
.gallery-tool__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--bg); }
.gallery-tool__item .cdx-input { padding: 6px 8px; font-size: 13px; }
.gallery-tool__bar { display: flex; gap: 4px; }
.gallery-tool__bar button { flex: 1; min-height: 30px; padding: 0 6px; border: 1px solid var(--line2); border-radius: 7px; background: var(--surf); color: var(--t2); font-size: 12px; cursor: pointer; }
.gallery-tool__bar button:last-child { color: var(--err); }
.gallery-tool__bar button:disabled { opacity: 0.4; cursor: default; }
.gallery-tool__add { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1.5px dashed var(--line2); border-radius: 10px; color: var(--t2); font-size: 14px; cursor: pointer; }
.gallery-tool__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gallery-tool__add:focus-within { outline: 2px solid var(--acc); outline-offset: 2px; }
.gallery-tool__status:empty { display: none; }
.gallery-tool__status { font-size: 13px; color: var(--t2); }

@media (max-width: 560px) {
    .post-editor__bar { margin: 0 -16px; padding: 12px 16px; }
}

/* ───────────────────────── Beiträge (öffentlich) ───────────────────────── */

.tile--post .tile__img { aspect-ratio: 16 / 9; }
.tile--post .tile__title { font-size: 24px; }
.tile--post .tile__title a { color: inherit; text-decoration: none; }
.tile--post .tile__title a:hover { color: var(--acc); }
.tile__excerpt { margin-top: 4px; font-size: 15px; color: var(--t2); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.post-head { max-width: 820px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; color: var(--t3); }
.post-cover { margin: 0 0 40px; border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--line); }
.post-cover img { width: 100%; max-height: 560px; object-fit: cover; }

/* Inhalt aus Editor.js (app/blocks.php) */
.post-body { max-width: 760px; color: var(--t2); font-size: 18px; line-height: 1.7; }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2, .post-body h3 { color: var(--t1); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; scroll-margin-top: 96px; }
.post-body h2 { margin-top: 2em; font-size: clamp(26px, 3vw, 32px); }
.post-body h3 { margin-top: 1.6em; font-size: 22px; }
.post-body a { color: var(--acc); text-decoration: underline; text-underline-offset: 0.15em; }
.post-body b { color: var(--t1); }
.post-body mark { padding: 0 0.15em; border-radius: 3px; background: var(--soft); color: var(--t1); }
.post-body code { padding: 0.1em 0.35em; border-radius: 5px; background: var(--surf2); color: var(--t1); font-family: var(--font-mono); font-size: 0.88em; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li, .post-body li > ul, .post-body li > ol { margin-top: 0.35em; }
.post-body ul.checklist { list-style: none; padding-left: 0; }
.post-body ul.checklist li { position: relative; padding-left: 30px; }
.post-body ul.checklist li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; border: 1.5px solid var(--line2); border-radius: 5px; }
.post-body ul.checklist li.is-checked::before { border-color: var(--acc); background: var(--acc); }
.post-body ul.checklist li.is-checked::after { content: ""; position: absolute; left: 6px; top: calc(0.3em + 3px); width: 5px; height: 9px; border: solid var(--on-btn); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.post-body hr { height: 1px; margin-block: 2.4em; border: 0; background: var(--line2); }
.post-figure { margin-inline: 0; }
.post-figure img { width: 100%; border-radius: 16px; border: 1px solid var(--line); }
.post-figure figcaption, .post-quote figcaption { margin-top: 8px; font-size: 14px; color: var(--t3); }
.gallery--post { flex: none; }
.gallery--post .gallery__main { aspect-ratio: 3 / 2; }
.gallery--post .gallery__thumbs { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.post-quote { margin-inline: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--acc); }
.post-quote blockquote { margin: 0; color: var(--t1); font-size: 21px; line-height: 1.5; }
.post-table table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surf); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.post-table th { padding: 12px 16px; text-align: left; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t3); background: var(--surf2); }
.post-table td { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--t1); }
.post-code { padding: 16px 18px; overflow-x: auto; border-radius: 14px; background: var(--surf2); border: 1px solid var(--line); font-size: 14px; line-height: 1.55; }
.post-code code { padding: 0; background: none; font-size: inherit; }
.callout { display: flex; gap: 12px; padding: 16px 20px; border: 1px solid var(--line2); border-left: 3px solid var(--acc); border-radius: 14px; background: var(--soft); }
.callout__icon { flex: none; padding-top: 0.2em; color: var(--acc); }
.callout p { margin: 0; }
.callout p + p { margin-top: 4px; }
.callout__title { color: var(--t1); font-weight: 600; }
.step-heading { display: flex; align-items: center; gap: 14px; }
.step-heading__no { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--soft); color: var(--acc); font-family: var(--font-mono); font-size: 14px; font-weight: 500; letter-spacing: 0; }

/* Vorheriger / nächster Beitrag */
.post-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; margin-top: 64px; }
.post-nav a { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surf); color: var(--t1); text-decoration: none; }
.post-nav a:hover { border-color: var(--acc); }
.post-nav span { font-size: 13px; color: var(--t3); }
.post-nav b { font-family: var(--font-display); font-size: 19px; line-height: 1.25; }
.post-nav .post-nav__next { text-align: right; }

/* Tutorials */
.tut-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-row { display: flex; flex-wrap: wrap; gap: 8px; }
.spec { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--surf); font-size: 14px; color: var(--t1); }
.spec span { color: var(--t3); }
.tut-video { margin-bottom: 48px; }
/* Beiträge (Baufortschritt, Tutorials): Text links, mitlaufende Seitenspalte rechts (partials/post-aside.php) */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.post-aside { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.post-aside__box { padding: 20px 22px; }
.post-aside__label { margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3); }
.post-aside__links { border: 0; background: none; border-radius: 0; margin-inline: -4px; }
.post-aside__links a { min-height: 44px; padding: 0 4px; }
.toc a[aria-current="true"] { color: var(--acc); border-left-color: var(--acc); }
@media (max-width: 999px) {
    /* Handy/Tablet: Inhaltsverzeichnis vor den Text, Links „Zur Anlage“ danach */
    .post-aside { display: contents; }
    .post-aside > .toc { order: -1; }
    .post-aside > :not(.toc) { order: 1; }
    .post-layout { gap: 28px; }
}
.toc { font-size: 15px; }
.toc p { margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line2); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--t2); text-decoration: none; }
.toc a:hover { color: var(--t1); border-left-color: var(--acc); }
.needs { padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surf); scroll-margin-top: 96px; }
.needs h2 { margin: 0 0 14px; font-family: var(--font-display); font-size: 22px; color: var(--t1); }
.needs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px 20px; }
.needs li { display: flex; gap: 10px; color: var(--t1); font-size: 16px; line-height: 1.45; }
.needs li svg { flex: none; margin-top: 2px; color: var(--acc); }
.tut-downloads { margin-top: 56px; scroll-margin-top: 96px; }
.tut-downloads h2 { margin-bottom: 16px; font-family: var(--font-display); font-size: clamp(24px, 3vw, 28px); color: var(--t1); }
.dl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.dl-cards a { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surf); color: var(--t1); text-decoration: none; font-weight: 600; }
.dl-cards a:hover { border-color: var(--acc); }
.dl-cards b { flex: 1; min-width: 0; }
.dl-cards svg { color: var(--t3); }
@media (min-width: 1000px) {
    .post-layout { grid-template-columns: minmax(0, 760px) 280px; justify-content: space-between; gap: 56px; }
    .post-aside { position: sticky; top: 96px; align-self: start; }
}

/* ───────────────────────── Admin: Reisen ───────────────────────── */

.country-list { padding: 8px; }
.country-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.country-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid transparent; border-radius: 12px; color: var(--t1); text-decoration: none; }
.country-list a:hover { background: var(--surf2); }
.country-list a[aria-current="page"] { border-color: var(--acc); background: var(--soft); }
.country-list__flag { font-size: 22px; line-height: 1; }
.country-list__name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.country-list__name small { font-size: 12px; color: var(--t3); }

/* Kategorie-Farben (Punkt + Nummer) – auch auf der öffentlichen Seite */
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.cat-no { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.cat-dot--sehen, .cat-no--sehen { background: var(--cat-sehen); color: var(--cat-sehen-on); }
.cat-dot--erleben, .cat-no--erleben { background: var(--cat-erleben); color: var(--cat-erleben-on); }
.cat-dot--essen, .cat-no--essen { background: var(--cat-essen); color: var(--cat-essen-on); }
.cat-dot--hotel, .cat-no--hotel { background: var(--cat-hotel); color: var(--cat-hotel-on); }

/* Reiter */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--surf); align-self: flex-start; }
.tabs button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--t2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tabs button:hover { color: var(--t1); }
.tabs button[aria-selected="true"] { background: var(--btn); color: var(--on-btn); }

.btn--dashed { border-style: dashed; }
.icon-btn--sm { width: 30px; height: 30px; min-height: 30px; font-size: 13px; }
.drag-handle { cursor: grab; padding: 4px 2px; color: var(--t3); letter-spacing: -2px; user-select: none; }
.is-dragging { opacity: 0.5; }
.sub-label { margin: 14px 0 6px; font-size: 13px; color: var(--t3); }

/* Einträge */
.entry-group { display: flex; flex-direction: column; gap: 8px; }
.entry-group__head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t3); }
.entry-list { display: flex; flex-direction: column; gap: 8px; min-height: 8px; }
.entry { border: 1px solid var(--line); border-radius: 14px; background: var(--surf); }
.entry[open] { border-color: var(--acc); }
.entry > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.entry > summary::-webkit-details-marker { display: none; }
.entry__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry__meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t2); }
.entry__body { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.entry__body > .seg { margin-top: 12px; }
.seg--cats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.seg--cats span { gap: 8px; min-height: 38px; font-size: 13px; }
.geo-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.geo-row .field { flex: 1 1 260px; }
.geo-status { padding-bottom: 10px; font-size: 13px; color: var(--t3); }
.geo-status--ok { color: var(--ok); }
.geo-adjust summary { font-size: 13px; color: var(--acc); cursor: pointer; }
.access-list { display: flex; flex-direction: column; gap: 6px; }
.access-row { display: grid; grid-template-columns: 34px minmax(110px, 160px) minmax(0, 1fr) 36px; align-items: center; gap: 8px; }
.access-row__icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 36px; border-radius: 9px; background: var(--surf2); color: var(--acc); cursor: grab; }
.access-row select, .access-row input, .visit-row select, .visit-row input { min-height: 38px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 9px; background: var(--bg); color: var(--t1); font: inherit; font-size: 14px; }
.access-row > *:last-child { justify-self: end; }
.image-list__items { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.image-list__items:empty { display: none; }
.img-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surf2); cursor: grab; counter-increment: img; }
.image-list__items { counter-reset: img; }
.img-thumb::before { content: counter(img); position: absolute; top: 4px; left: 6px; padding: 0 5px; border-radius: 5px; background: var(--board); color: var(--board-text); font-family: var(--font-mono); font-size: 11px; }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.img-thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 7px; background: var(--surf); color: var(--err); font-size: 16px; line-height: 1; cursor: pointer; }
.image-list__add { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; margin-top: 8px; padding: 0 16px; border: 1.5px dashed var(--line2); border-radius: 10px; font-size: 14px; color: var(--t2); cursor: pointer; }
.image-list__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.image-list__add:focus-within { outline: 2px solid var(--acc); outline-offset: 2px; }
.image-list__status { font-size: 13px; color: var(--t2); }
.image-list__status:empty { display: none; }
.repeat-card { padding: 12px 14px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg); }
.repeat-card__head { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 10px; }
/* Admin → Bahnhöfe: Buchstabe wie im Gleisplan, daneben die Felder */
.station-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
.station-row__code { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--t1); border-radius: 11px; background: var(--surf); font-family: var(--font-rail); font-size: 22px; font-weight: 700; }
/* Admin → Slider: Griff · Vorschau · Felder · Entfernen (am Handy untereinander) */
.slide-row { display: grid; grid-template-columns: auto 180px minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.slide-row__img { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: var(--surf2); display: grid; place-items: center; color: var(--t3); font-size: 12px; }
.slide-row__img img { width: 100%; height: 100%; object-fit: cover; }
.slide-row__fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.slide-row__fields input { width: 100%; min-width: 0; }
@media (max-width: 640px) {
    .slide-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .slide-row__img { grid-column: 2; grid-row: 1; }
    .slide-row > .icon-btn { grid-column: 3; grid-row: 1; align-self: start; }
    .slide-row__fields { grid-column: 1 / -1; grid-row: 2; }
}
.visit-row { display: grid; grid-template-columns: 160px 150px minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
@media (max-width: 640px) {
    .visit-row, .access-row { grid-template-columns: 1fr 1fr; }
    .visit-row input[name$="[note]"], .access-row input { grid-column: 1 / -1; }
}

/* Seitenleiste: Länderdaten überschreiben, sichtbare Abschnitte */
.fact { padding: 10px 0; border-top: 1px solid var(--line); }
.fact__label { font-size: 12px; color: var(--t3); }
.fact__toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--acc); cursor: pointer; }
.fact__toggle input { accent-color: var(--btn); }
.fact__value { margin-top: 2px; font-size: 14px; color: var(--t3); }
.fact input[data-override] { width: 100%; min-height: 36px; margin-top: 6px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 9px; background: var(--bg); color: var(--t1); font: inherit; font-size: 14px; }
.visible-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.visible-list li { display: flex; gap: 8px; align-items: flex-start; }
.visible-list li > span:first-child { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; }
.visible-list .is-on > span:first-child { background: var(--ok-bg); color: var(--ok); }
.visible-list .is-off { color: var(--t3); }

/* ───────────────────────── Reisen: Reiseziel (öffentlich) ───────────────────────── */

.pill--soft { background: var(--soft); color: var(--acc); }
.place-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
.place-head__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.jump-nav { margin-top: 4px; }
.jump-nav .chip { min-height: 36px; padding: 0 12px; font-size: 13px; }
.place-section { padding-top: 72px; scroll-margin-top: 80px; }
.place-section__title { margin: 6px 0 24px; }

/* Region & Karte */
.place-map { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.place-map__map { position: relative; min-height: 380px; border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; background: var(--surf2); }
.place-map__consent { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; }
.place-map__consent small { max-width: 380px; color: var(--t3); font-size: 13px; }
.place-map__list { list-style: none; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surf); font-size: 14px; max-height: 460px; overflow-y: auto; }
.place-map__list li a { display: flex; align-items: center; gap: 10px; padding: 4px 0; color: var(--t1); text-decoration: none; }
.place-map__list li a:hover { color: var(--acc); }
.place-map__group { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t3); }
.place-map__group:first-child { margin-top: 0; }
@media (min-width: 900px) {
    .place-map { grid-template-columns: minmax(0, 1fr) 300px; }
}

/* Auf einen Blick */
.blick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) { .blick { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 18px 24px; margin: 0; }
.facts-grid dt, .kv dt { font-size: 12px; color: var(--t3); }
.facts-grid dd, .kv dd { margin: 2px 0 0; color: var(--t1); font-size: 15px; }
.arrival-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.arrival-list li { display: flex; gap: 12px; }
.arrival-list p { font-size: 14px; }
.arrival__icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; background: var(--soft); color: var(--acc); }
.arrival__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.arrival__tip { margin-top: 14px; color: var(--t2); font-size: 15px; }
.kv { margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.kv dd { margin: 0; text-align: right; }
.kv--small > div { padding: 7px 0; }
.kv--small dt, .kv--small dd { font-size: 13px; }

/* Mehrere Besuche (Tafel-Optik wie bei der Modellbahn) */
.visits { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) { .visits { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.visits__board { padding: 28px; border-radius: var(--radius-l); background: var(--board); color: var(--board-text); }
.visits__label { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--board-label); }
.visits__count { margin: 10px 0 14px; font-family: var(--font-display); font-weight: 700; font-size: 72px; line-height: 1; }
.visits__board ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-family: var(--font-mono); font-size: 15px; }
.visits__board li { display: flex; align-items: center; gap: 10px; }
.visits__icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--board-line); color: var(--board-label); }
.visits__last { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--board-line); font-size: 14px; }
.visits__list .h3 { margin-bottom: 8px; }
.visit-list { list-style: none; margin: 0; padding: 0; }
.visit-list li { display: grid; grid-template-columns: 130px 110px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.visits__mode { display: inline-flex; align-items: center; gap: 6px; color: var(--t1); }
.visits__mode svg { color: var(--acc); }
.interrail-tag { padding: 3px 8px; border-radius: 6px; background: var(--board); color: var(--board-text); font-size: 12px; text-decoration: none; }
.interrail-tag b { font-family: var(--font-mono); color: var(--board-label); letter-spacing: 0.08em; }
.visit-more { margin-top: 12px; }
.visit-more > summary { list-style: none; display: inline-flex; cursor: pointer; }
.visit-more > summary::-webkit-details-marker { display: none; }
.visit-more[open] > summary { display: none; }
@media (max-width: 640px) {
    .visit-list li { grid-template-columns: 1fr 1fr; }
}

/* Einträge */
.entry-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.place-entry { display: flex; flex-direction: column; overflow: hidden; scroll-margin-top: 80px; }
.place-entry__media { position: relative; aspect-ratio: 4 / 3; margin: 8px 8px 0; border-radius: 14px; overflow: hidden; background: var(--surf2); }
.place-entry__media .ph, .mini-slider, .mini-slider img { width: 100%; height: 100%; }
.mini-slider img { object-fit: cover; }
.place-entry__no { position: absolute; top: 10px; left: 10px; z-index: 2; }
.place-entry__ad { position: absolute; top: 10px; right: 10px; z-index: 2; font-size: 11px; }
.mini-slider__nav { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.mini-slider__nav .icon-btn { background: var(--surf); }
.mini-slider__count { padding: 2px 8px; border-radius: 6px; background: var(--board); color: var(--board-text); font-size: 12px; }
.place-entry__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.place-entry__name { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--t1); }
.place-entry__local { margin-top: -4px; font-size: 13px; color: var(--t3); }
.place-entry__text { color: var(--t2); font-size: 15px; }
.access { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--t2); }
.access li { display: flex; align-items: center; gap: 8px; }
.access__icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; background: var(--surf2); color: var(--acc); }
.place-entry__link { align-self: flex-start; margin-top: auto; }
.place-entry__body .kv { margin-top: 6px; }
.callout-card { border-color: var(--warn); background: var(--warn-bg); }
.callout-card .h3 { display: flex; align-items: center; gap: 8px; color: var(--warn); }

/* Leaflet-Karte: Nummern-Punkte in Kategoriefarbe */
.place-map__map.leaflet-container { font: inherit; background: var(--surf2); }
.map-pin { display: flex !important; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--surf); box-shadow: 0 0 0 1px var(--line2); font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.map-pin--sehen { background: var(--cat-sehen); color: var(--cat-sehen-on); }
.map-pin--erleben { background: var(--cat-erleben); color: var(--cat-erleben-on); }
.map-pin--essen { background: var(--cat-essen); color: var(--cat-essen-on); }
.map-pin--hotel { background: var(--cat-hotel); color: var(--cat-hotel-on); }

/* ───────────────────────── Reisen: Übersicht ───────────────────────── */

.reisen-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin-bottom: 36px; }
.reisen-hero .h1 { max-width: 640px; }
.reisen-hero .lead { flex: 0 1 460px; }
.reisen-filter { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.land-select label { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 6px 0 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--surf); font-size: 14px; }
.land-select label > span { color: var(--t3); }
.land-select select { min-height: 38px; border: 0; background: transparent; color: var(--t1); font: inherit; font-size: 14px; cursor: pointer; }
.land-select select:focus-visible { outline: 2px solid var(--acc); border-radius: 6px; }
.reisen-map { margin-top: 32px; }
.world-map { min-height: 420px; }
.map-pin--dot { background: var(--acc); border-width: 3px; }
.reisen-block { margin-top: 56px; }
.reisen-block__title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 28px; }
.reisen-block__title svg { color: var(--acc); }

/* Interrail-Reise als „Fahrkarte“ (gleiche Tafel-Farben wie bei der Modellbahn) */
.ticket { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; overflow: hidden; border-radius: var(--radius-l); background: var(--board); color: var(--board-text); }
.ticket__img { aspect-ratio: 16 / 9; margin: 10px; border-radius: 18px; overflow: hidden; }
.ticket__img img, .ticket__img .ph { width: 100%; height: 100%; object-fit: cover; }
.ticket__body { display: flex; flex-direction: column; gap: 14px; padding: 18px 28px 28px; }
.ticket__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; }
.ticket__label { padding: 5px 10px; border-radius: 6px; background: var(--board-label); color: var(--board); font-weight: 700; letter-spacing: 0.12em; }
.ticket__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; letter-spacing: -0.03em; }
.ticket__route { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 15px; }
.ticket__route span[aria-hidden] { color: var(--board-label); opacity: 0.8; }
.ticket__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin: 4px 0 0; padding-top: 16px; border-top: 1px solid var(--board-line); }
.ticket__stats dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--board-label); }
.ticket__stats dd { margin: 4px 0 0; font-family: var(--font-mono); font-size: 18px; }
.ticket__link { align-self: flex-start; color: var(--board-label); font-weight: 600; text-decoration: none; }
.ticket__link:hover { text-decoration: underline; }
@media (min-width: 900px) {
    .ticket { grid-template-columns: 380px minmax(0, 1fr); }
    .ticket__img { aspect-ratio: auto; min-height: 280px; }
    .ticket__body { padding: 28px 32px 28px 24px; }
}
.tile--report .tile__img { aspect-ratio: 4 / 3; }

/* ───────────────────────── Bilder vergrößern (Lightbox, app.js) ───────────────────────── */

.zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; color: inherit; cursor: zoom-in; }
.zoom:focus-visible { outline-offset: -3px; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 56px 16px; border: 0; background: transparent; color: var(--board-text); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: color-mix(in srgb, var(--board) 94%, transparent); }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox__figure { display: grid; justify-items: center; gap: 10px; width: 100%; height: 100%; margin: 0; align-content: center; }
.lightbox__img { max-width: min(1400px, 100%); max-height: calc(100vh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 10px; }
.lightbox__cap { max-width: 720px; font-size: 14px; text-align: center; color: var(--board-text); }
.lightbox .icon-btn { position: fixed; background: var(--surf); color: var(--t1); border-color: var(--line2); }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 12px; }
.lightbox__next { right: 12px; }
.lightbox__count { position: fixed; top: 20px; left: 16px; font-size: 13px; color: var(--board-text); }
@media (max-width: 640px) {
    .lightbox__prev, .lightbox__next { top: auto; bottom: 12px; transform: none; }
}

/* ───────────────────────── Betreiber & Zuggattungen ───────────────────────── */

.admin-table tr.is-current td { background: var(--soft); }
.op-name { display: flex; align-items: center; gap: 12px; }
.op-logo { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 52px; height: 32px; padding: 4px; border: 1px dashed var(--line2); border-radius: 8px; color: var(--t3); font-size: 11px; }
.op-logo img { max-width: 100%; max-height: 22px; width: auto; height: auto; }
.op-logo--lg { width: 96px; height: 48px; }
.op-logo--lg img { max-height: 36px; }
.op-modes, .op-cats { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.op-mode { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--soft); color: var(--acc); flex: none; }
.train-cat { display: inline-block; padding: 2px 7px; border-radius: 5px; background: var(--board); color: var(--board-label); font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.train-cat b { color: var(--board-text); }
.mode-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.mode-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; color: var(--t1); }
.segment-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: var(--t2); }
.segment-row--preview { padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.op-inline-logo { display: inline-block; max-height: 18px; width: auto; }

/* ───────────────────────── Admin: Interrail-Reise ───────────────────────── */

.stop-list { display: flex; flex-direction: column; gap: 8px; }
.stop { display: flex; flex-direction: column; gap: 6px; }
.stop.is-dragging { opacity: 0.5; }
.stop__no { color: var(--acc); font-size: 13px; }
.stop-dot { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--acc); }
.stop-dot--start, .stop-dot--end { border-radius: 4px; background: var(--t1); }
.stop-dot--unplanned { background: transparent; border: 2px dashed var(--board-label); }
.stop__media { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 12px; }
.stop__media .image-list__items { grid-template-columns: 1fr; }
@media (max-width: 640px) { .stop__media { grid-template-columns: 1fr; } }

.ride { margin-left: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.ride--warn { border-color: var(--warn); }
.ride > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; list-style: none; font-size: 14px; }
.ride > summary::-webkit-details-marker { display: none; }
.ride__chips { display: inline-flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.ride__warn { color: var(--warn); font-size: 13px; font-weight: 600; }
.ride__toggle { pointer-events: none; }
.ride[open] .ride__toggle { visibility: hidden; }
.ride__body { padding: 4px 12px 12px; border-top: 1px solid var(--line); overflow-x: auto; }
.seg-head, .seg-row__main { display: grid; grid-template-columns: 18px 28px 112px 72px 84px 150px minmax(120px, 1fr) minmax(120px, 1fr) 76px 30px; gap: 6px; align-items: center; min-width: 880px; }
.seg-head { padding: 8px 0 4px; font-size: 12px; color: var(--t3); }
.seg-list { display: flex; flex-direction: column; gap: 4px; }
.seg-row__main input, .seg-row__main select, .seg-row__transfer input {
    width: 100%; min-height: 36px; padding: 0 8px; border: 1px solid var(--line2); border-radius: 8px;
    background: var(--surf); color: var(--t1); font: inherit; font-size: 14px;
}
.seg-row__main input.mono { font-family: var(--font-mono); font-weight: 600; }
.seg-row__transfer { display: grid; grid-template-columns: 46px auto minmax(200px, 1fr); gap: 8px; align-items: center; min-width: 880px; padding: 2px 0; font-size: 13px; color: var(--t2); }
.seg-row__line { justify-self: center; width: 0; height: 26px; border-left: 2px dotted var(--line2); }

.check-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--t2); }
.check-list__item { display: flex; gap: 10px; align-items: flex-start; }
.check-list__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.check-list__item--ok .check-list__icon { background: var(--ok-bg); color: var(--ok); }
.check-list__item--warn .check-list__icon { background: var(--warn-bg); color: var(--warn); }
.check-list__item--info .check-list__icon { background: var(--soft); color: var(--acc); }
.calc-list { margin: 0; }
.calc-list div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.calc-list dt { color: var(--t2); }
.calc-list dd { margin: 0; font-family: var(--font-mono); text-align: right; color: var(--t1); }
.op-side { display: flex; flex-direction: column; margin: 12px 0 0; padding: 0; list-style: none; }
.op-side li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.op-side li .mono { margin-left: auto; font-size: 12px; }
.op-dialog { width: min(480px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--line2); border-radius: 18px; background: var(--surf); color: var(--t1); }
.op-dialog::backdrop { background: color-mix(in srgb, var(--board) 70%, transparent); }

/* ───────────────────────── Interrail-Reise (öffentlich) ───────────────────────── */

.trip-ticket { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; border-radius: var(--radius-l); background: var(--board); color: var(--board-text); }
.trip-ticket__main { display: flex; flex-direction: column; gap: 18px; padding: 28px 28px 30px; }
.trip-ticket__countries { padding: 4px 9px; border: 1px solid var(--board-line); border-radius: 6px; }
.trip-ticket__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 5vw, 58px); line-height: 1.05; letter-spacing: -0.03em; }
.trip-ticket__lead { max-width: 640px; font-size: 18px; line-height: 1.55; opacity: 0.85; }
.trip-ticket__side { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 22px 28px 28px; border-top: 1px dashed var(--board-line); font-family: var(--font-mono); }
.trip-ticket__side div { display: flex; justify-content: space-between; gap: 16px; }
.trip-ticket__side dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--board-label); }
.trip-ticket__side dd { margin: 0; font-size: 15px; }
.trip-ticket__days { flex-direction: column; margin-bottom: auto; }
.trip-ticket__days dd { font-family: var(--font-display); font-size: 54px; font-weight: 700; line-height: 1; }
@media (min-width: 900px) {
    .trip-ticket { grid-template-columns: minmax(0, 1fr) 240px; }
    .trip-ticket__main { padding: 32px 40px 36px; }
    .trip-ticket__side { padding: 32px 28px; border-top: 0; border-left: 1px dashed var(--board-line); }
}
.trip-route { display: flex; flex-wrap: wrap; gap: 8px 6px; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--board-line); list-style: none; font-size: 14px; font-weight: 600; }
.trip-route__stop { display: inline-flex; align-items: center; gap: 6px; }
.trip-route__stop + .trip-route__stop::before { content: "→"; margin-right: 2px; color: var(--board-label); opacity: 0.7; font-weight: 400; }
.trip-route__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--board-text); }
.trip-route__stop--unplanned { color: var(--board-label); }
.trip-route__stop--unplanned .trip-route__dot { background: transparent; border: 1.5px dashed var(--board-label); }
.trip-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }

.trip-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 12px; margin: 0; }
.trip-fact { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surf); }
.trip-fact dt { font-size: 13px; color: var(--t3); }
.trip-fact dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--t1); }

.trip-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 40px; }
@media (min-width: 1000px) { .trip-layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.trip-map { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surf); }
.trip-map img { width: 100%; }
.trip-notes { font-size: 15px; }

/* Timeline: Linie links, Halte als Karten, dazwischen die Fahrten */
.timeline { position: relative; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0 0 0 34px; list-style: none; }
.timeline::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 8px; width: 2px; background: var(--line2); }
.timeline__stop { position: relative; display: flex; flex-direction: column; gap: 10px; }
.timeline__marker { position: absolute; top: 20px; left: -34px; width: 18px; height: 18px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px var(--bg); }
.timeline__stop--start .timeline__marker, .timeline__stop--end .timeline__marker { border-radius: 5px; background: var(--t1); }
.timeline__stop--unplanned .timeline__marker { background: var(--bg); border: 2px dashed var(--warn); }

.stop-card { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surf); }
.stop-card--unplanned { border-style: dashed; border-color: var(--warn); }
@media (min-width: 640px) { .stop-card:not(.stop-card--compact) { grid-template-columns: 200px minmax(0, 1fr); } }
.stop-card__img { aspect-ratio: 4 / 3; margin: 8px; border-radius: 12px; overflow: hidden; background: var(--surf2); }
.stop-card__img img, .stop-card__img .ph { width: 100%; height: 100%; object-fit: cover; }
.stop-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; }
.stop-card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.stop-card__name { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--t1); }
.stop-card__name small { margin-left: 6px; font-family: var(--font-body); font-size: 14px; font-weight: 400; color: var(--t3); }
.stop-card__no { margin-right: 4px; font-size: 13px; font-weight: 400; color: var(--acc); }
.stop-card__text { color: var(--t2); }
.stop-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 13px; }

.ride-card { padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.ride-card__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 14px; color: var(--t1); }
.ride-card__head > span:first-child { color: var(--acc); }
.ride-card__head .mono { font-size: 12px; }
.ride-card__list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ride-card__seg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14px; color: var(--t2); }
.ride-card__op { display: inline-flex; align-items: center; gap: 6px; color: var(--t1); }
.ride-card__route { color: var(--t3); }
.ride-card__res { margin-left: auto; font-size: 12px; color: var(--t3); }
.ride-card__transfer { margin-left: 13px; padding: 2px 0 2px 21px; border-left: 2px dotted var(--line2); font-size: 13px; color: var(--t3); }
.ride-card__transfer--note { border-left-color: var(--warn); color: var(--warn); }

/* ───────────────────────── Reiseziel als Etappe (Entwurf Ort-Etappe) ───────────────────────── */

.stage-band { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-bottom: 24px; padding: 16px 20px; border-radius: 18px; background: var(--board); color: var(--board-text); }
.stage-band__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stage-band__eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--board-label); }
.stage-band__title { color: var(--board-text); font-weight: 700; text-decoration: none; }
.stage-band__title:hover { text-decoration: underline; }
.stage-band__dots { display: flex; align-items: center; flex: 1 1 260px; min-width: 200px; margin: 0; padding: 0; list-style: none; }
.stage-dot { position: relative; display: flex; align-items: center; flex: 1; }
.stage-dot:last-child { flex: 0; }
.stage-dot::after { content: ""; flex: 1; height: 2px; margin: 0 4px; background: var(--board-line); }
.stage-dot:last-child::after { display: none; }
.stage-dot--past::after { background: var(--board-text); }
.stage-dot > a, .stage-dot > span { display: block; flex: none; width: 12px; height: 12px; border: 2px solid var(--board-text); border-radius: 50%; }
.stage-dot--past > a { background: var(--board-text); }
.stage-dot--current > span { width: 18px; height: 18px; border-color: var(--board-label); background: var(--board-label); }
.stage-dot--unplanned > a, .stage-dot--unplanned > span { border-style: dashed; border-color: var(--board-label); }
.stage-dot > a:hover { border-color: var(--board-label); }
.stage-dot > a:focus-visible { outline: 2px solid var(--board-label); outline-offset: 3px; }
.stage-band__link { margin-left: auto; color: var(--board-label); font-weight: 700; text-decoration: none; white-space: nowrap; }
.stage-band__link:hover { text-decoration: underline; }

.stage-nav { margin-top: 64px; }
.stage-nav__label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.stage-nav__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.stage-nav__cards a { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surf); color: var(--t1); text-decoration: none; }
.stage-nav__cards a:hover { border-color: var(--acc); }
.stage-nav__cards span { font-size: 13px; color: var(--t3); }
.stage-nav__cards b { font-family: var(--font-display); font-size: 21px; line-height: 1.2; }
.stage-nav__cards .stage-nav__all { align-items: center; justify-content: center; text-align: center; background: var(--board); border-color: var(--board); }
.stage-nav__cards .stage-nav__all span { font-family: var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--board-label); }
.stage-nav__cards .stage-nav__all b { font-family: var(--font-body); font-size: 16px; color: var(--board-text); }
.stage-nav__next { text-align: right; }
.stage-nav + .post-nav { margin-top: 14px; }

/* ───────────────────────── Videospiele ───────────────────────── */

/* Score-Abzeichen: Farbe je Urteil (Tokens --score-*), „–“ = noch nicht bewertet */
.score-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; font-family: var(--font-mono); font-size: 16px; font-weight: 700; }
.score-badge--sm { min-width: 34px; height: 34px; font-size: 14px; border-radius: 9px; }
.score-badge--lg { min-width: 96px; height: 96px; font-size: 40px; border-radius: 18px; }
.score-badge--xl { min-width: 120px; height: 120px; font-size: 52px; border-radius: 22px; }
.score-badge--range { min-width: 64px; height: 30px; font-size: 13px; font-weight: 600; border-radius: 8px; }
.score--top { background: var(--score-top); color: var(--score-top-on); }
.score--sehrgut { background: var(--score-sehrgut); color: var(--score-sehrgut-on); }
.score--gut { background: var(--score-gut); color: var(--score-gut-on); }
.score--mittel { background: var(--score-mittel); color: var(--score-mittel-on); }
.score--schwach { background: var(--score-schwach); color: var(--score-schwach-on); }
.score--none { border: 1.5px dashed var(--line2); background: transparent; color: var(--t3); }

/* Übersicht */
.games-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 64px; }
@media (min-width: 1000px) { .games-hero { grid-template-columns: minmax(0, 1fr) 420px; } }
.games-hero__main { position: relative; display: flex; align-items: flex-end; min-height: 360px; padding: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surf2); color: var(--on-img); text-decoration: none; }
.games-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.games-hero__img--top { object-position: center top; }
.games-hero__img--bottom { object-position: center bottom; }
/* Verlauf statt deckender Fläche: unten dunkel (Text bleibt auch auf weißen Artworks lesbar), oben frei */
.games-hero__main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--img-scrim) 0%, var(--img-scrim-mid) 38%, var(--img-scrim-none) 68%); pointer-events: none; }
.games-hero__card { position: relative; z-index: 1; display: flex; align-items: center; gap: 20px; width: 100%; padding: 12px 10px 8px; text-shadow: 0 1px 3px var(--img-scrim); }
.games-hero__main:hover { border-color: var(--acc); }
.games-hero__main:hover .games-hero__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.games-hero__card .pill, .games-hero__card .score-badge { text-shadow: none; }
/* Pille auf dem Bild: fest weiß mit dunkler Schrift (--soft ist im Dunkelmodus halbdurchsichtig → unlesbar) */
.games-hero__card .pill--soft { background: var(--on-img); color: var(--on-img-ink); }
.games-hero__meta { color: var(--on-img-dim); }
.games-hero__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.games-hero__text .pill { align-self: flex-start; }
.games-hero__title { font-family: var(--font-display); font-size: clamp(24px, 3vw, 36px); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.games-top { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surf); }
.games-top__list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.games-top__list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surf2); color: var(--t1); text-decoration: none; }
.games-top__list a:hover { outline: 1px solid var(--acc); }
.games-top__rank { width: 18px; color: var(--t3); }
.games-top__cover { flex: none; width: 40px; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 6px; background: var(--surf); }
.games-top__cover img, .games-top__cover .ph { width: 100%; height: 100%; object-fit: cover; }
.games-top__name { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.games-top__name small { color: var(--t3); }
.games-top__all { margin-top: auto; justify-content: center; }
/* DLC / Online: Abzeichen, Verweis aufs Hauptspiel, Liste beim Hauptspiel */
.game-kind { font-size: 11px; padding: 2px 8px; }
.game-head__parent { align-self: flex-start; color: var(--acc); font-size: 15px; text-decoration: none; }
.game-head__parent:hover { text-decoration: underline; }
.game-parts { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.game-parts a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surf2); color: var(--t1); text-decoration: none; }
.game-parts a:hover { outline: 1px solid var(--acc); }
.game-parts__name { display: flex; flex-direction: column; min-width: 0; font-size: 14px; line-height: 1.3; }
.game-parts__name small { color: var(--t3); }
.games-all__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.games-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 28px 20px; }
.game-tile { display: flex; flex-direction: column; gap: 10px; }
.game-tile__cover { display: block; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surf2); }
.game-tile__cover img, .game-tile__cover .ph { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.game-tile:hover .game-tile__cover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .game-tile__cover img { transition: none; } .game-tile:hover .game-tile__cover img { transform: none; } }
.game-tile__body { display: flex; gap: 10px; align-items: flex-start; }
.game-tile__title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.game-tile__title a { color: var(--t1); text-decoration: none; }
.game-tile__title a:hover { color: var(--acc); }
.game-tile__meta { font-size: 12px; color: var(--t3); }
.games-method { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 96px; }
@media (min-width: 900px) { .games-method { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.weight-list { margin: 0; }
.weight-list > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.weight-list dt { display: flex; flex-direction: column; gap: 2px; color: var(--t1); }
.weight-list dt small, .score-list dt small { color: var(--t3); font-size: 13px; }
.weight-list dd { display: flex; align-items: center; gap: 16px; margin: 0; }
.weight-list dd .mono { width: 48px; text-align: right; color: var(--t1); }
.weight-bar, .score-bar { position: relative; flex: 1; height: 6px; border-radius: 3px; background: var(--surf2); overflow: hidden; }
.weight-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--acc); }
.score-bar > span { display: block; height: 100%; border-radius: 3px; }
.score-bar > .score--none { border: 0; }
.scale-list { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.scale-list li { display: flex; align-items: center; gap: 14px; }

/* Bewertung */
.game-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surf); }
@media (min-width: 760px) { .game-head { grid-template-columns: 170px minmax(0, 1fr) auto; align-items: center; } }
.game-head__cover { width: 170px; max-width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 16px; background: var(--surf2); }
.game-head__cover img, .game-head__cover .ph { width: 100%; height: 100%; object-fit: cover; }
.game-head__text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.game-head__title { font-size: clamp(32px, 4.6vw, 54px); }
.game-head .tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.game-head__score { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 24px; }
@media (min-width: 1000px) { .game-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.game-layout__main, .game-layout__side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.score-list { margin: 0; }
.score-list > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.score-list dt { display: flex; flex-direction: column; gap: 2px; color: var(--t1); }
.score-list dd { display: flex; align-items: center; gap: 16px; margin: 0; }
.score-list__value { width: 32px; text-align: right; font-weight: 700; color: var(--t1); }
.game-review { margin-top: 16px; }
.pro-contra__title { margin-bottom: 12px; }
.pro-contra__title--pro { color: var(--ok); }
.pro-contra__title--contra { color: var(--err); }
.pro-contra__list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; color: var(--t1); }
.pro-contra__list li { display: flex; gap: 10px; align-items: flex-start; }
.pro-contra__icon { display: inline-flex; flex: none; margin-top: 3px; }
.pro-contra__icon--pro { color: var(--ok); }
.pro-contra__icon--contra { color: var(--err); }
.game-verdict { padding: 24px 28px; border-radius: 20px; background: var(--soft); }
.game-verdict p:last-child { margin-top: 8px; font-size: 18px; color: var(--t1); }
.game-infos dd { font-family: var(--font-body); }
.video-link { display: flex; align-items: center; gap: 14px; color: var(--t1); text-decoration: none; }
.video-link:hover { border-color: var(--acc); }
.video-link span:last-child { display: flex; flex-direction: column; }
.video-link small { color: var(--t3); }
.video-link__play { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--btn); color: var(--on-btn); }

/* Admin: Wertung eingeben */
.score-inputs { display: flex; flex-direction: column; }
.score-input { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 1fr) 72px; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .score-input { grid-template-columns: minmax(0, 1fr) 72px; } .score-input__label { grid-column: 1 / -1; } }
.score-input__label { display: flex; flex-direction: column; gap: 2px; color: var(--t1); font-size: 14px; }
.score-input__label small { color: var(--t3); font-size: 12px; }
.score-input__range { width: 100%; accent-color: var(--acc); }
.score-input__range[data-empty] { opacity: 0.35; }
.score-input__number { width: 100%; min-height: 38px; padding: 0 8px; border: 1px solid var(--line2); border-radius: 9px; background: var(--bg); color: var(--t1); font-size: 15px; text-align: center; }
.score-total { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ───────────────────────── Social, YouTube, Livestream ───────────────────────── */

/* Markenlogo im Kästchen (Logos folgen der Textfarbe) */
.brand-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--soft); color: var(--t1); }
.brand-badge--lg { width: 48px; height: 48px; border-radius: 14px; color: var(--acc); }
.brand-short { font-family: var(--font-mono); font-size: 12px; font-weight: 700; }

.live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 8px; background: var(--surf2); color: var(--t2); font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.live-badge > span { width: 8px; height: 8px; border-radius: 50%; background: var(--t3); }
.live-badge--on { color: var(--t1); }
.live-badge--on > span { background: var(--err); animation: live-pulse 1.6s ease-in-out infinite; }
.live-badge--float { position: absolute; top: 14px; left: 14px; z-index: 2; background: var(--err); color: var(--on-btn); }
.live-badge--float > span { background: var(--on-btn); }
@keyframes live-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .live-badge--on > span { animation: none; } }

.social-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-bottom: 18px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.social-head__text { display: flex; flex-direction: column; flex: 1; min-width: 160px; }
.social-block { margin-top: 80px; }
.social-yt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1000px) { .social-yt { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.social-yt__main { display: flex; flex-direction: column; overflow: hidden; padding: 10px; }
.social-yt__main .video { border-radius: 16px; }
.social-yt__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px 14px 8px; }
.social-live { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--soft); }
.social-live .live-badge { align-self: flex-start; }
.social-live__next { font-size: 14px; color: var(--t3); }
.social-live__next b { color: var(--t1); font-weight: 500; }
.social-cats { margin-top: 16px; }
.social-cat { display: flex; flex-direction: column; overflow: hidden; color: var(--t1); text-decoration: none; }
.social-cat:hover { border-color: var(--acc); }
.social-cat__img { display: block; aspect-ratio: 16 / 9; margin: 8px 8px 0; overflow: hidden; border-radius: 16px; background: var(--surf2); }
.social-cat__img img, .social-cat__img .ph { width: 100%; height: 100%; object-fit: cover; }
.social-cat__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 22px; }
.social-cat__body .pill { align-self: flex-start; }
.social-feature { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.social-feature__handle { font-size: 24px; overflow-wrap: anywhere; }
.social-more { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 24px; }
@media (min-width: 900px) { .social-more { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.social-more__label { margin-bottom: 12px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3); }
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.account { display: flex; align-items: center; gap: 12px; height: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surf); color: var(--t1); text-decoration: none; }
a.account:hover { border-color: var(--acc); }
.account__text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.account__handle { color: var(--t3); font-size: 13px; overflow-wrap: anywhere; }
.account-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.account--compact { padding: 8px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.account--compact .brand-badge { width: 28px; height: 28px; border-radius: 8px; }
.account--compact .account__text { flex-direction: row; flex: 1; justify-content: space-between; gap: 12px; }
.account--compact .account__handle { font-family: var(--font-mono); text-align: right; }

/* YouTube */
.yt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; margin-bottom: 32px; }
.yt-head__avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 96px; height: 96px; overflow: hidden; border: 2px solid var(--line2); border-radius: 50%; background: var(--surf2); color: var(--acc); }
.yt-head__avatar img { width: 100%; height: 100%; object-fit: cover; }
.yt-head__text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 220px; }
.yt-head__handle { color: var(--t1); }
.yt-newest { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 14px; }
@media (min-width: 1000px) { .yt-newest { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; } }
.yt-newest__text { display: flex; flex-direction: column; gap: 12px; padding: 8px 14px 14px; }
.yt-newest__text .link-arrow { font-size: 17px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tag-row a { text-decoration: none; }
.yt-all { margin-top: 64px; }
.yt-playlists { margin-top: 80px; }
.video-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px 20px; }
.video-tile { display: flex; flex-direction: column; gap: 6px; }
.video-tile__link { display: flex; flex-direction: column; gap: 10px; color: var(--t1); text-decoration: none; }
.video-tile__thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surf2); }
.video-tile__thumb img, .video-tile__thumb .ph { width: 100%; height: 100%; object-fit: cover; }
.video-tile__play { position: absolute; inset: 0; margin: auto; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--btn); color: var(--on-btn); opacity: 0; transform: scale(0.9); transition: opacity 0.2s, transform 0.2s; }
.video-tile__link:hover .video-tile__play, .video-tile__link:focus-visible .video-tile__play { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .video-tile__play { transition: none; } }
.video-tile__title { font-size: 16px; line-height: 1.35; }
.video-tile__link:hover .video-tile__title { color: var(--acc); }
.video-tile__meta { font-size: 13px; color: var(--t3); }
.playlist-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.playlist-card { display: flex; flex-direction: column; overflow: hidden; color: var(--t1); text-decoration: none; }
.playlist-card:hover { border-color: var(--acc); }
.playlist-card__img { position: relative; display: block; aspect-ratio: 16 / 9; margin: 8px 8px 0; overflow: hidden; border-radius: 14px; background: var(--surf2); }
.playlist-card__img img, .playlist-card__img .ph { width: 100%; height: 100%; object-fit: cover; }
.playlist-card__count { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 40%; background: var(--board); color: var(--board-text); font-size: 13px; }
.playlist-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; font-size: 14px; }
.video-dialog__inner { display: flex; flex-direction: column; gap: 10px; width: min(1100px, 100%); }
.video-dialog__inner .video { width: 100%; }

/* Livestream */
.stream-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1000px) { .stream-top { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); } }
.stream-player { position: relative; }
.stream-offline { display: flex; align-items: center; justify-content: center; }
.stream-offline__inner { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; text-align: center; }
.stream-details { display: flex; flex-direction: column; gap: 14px; }
.stream-details__title { font-weight: 700; color: var(--t1); }
.stream-details__watch { justify-content: center; }
.stream-details__buddy { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.stream-details__buddy .btn { align-self: flex-start; gap: 8px; }
.stream-game { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 64px; padding: 24px; }
@media (min-width: 900px) { .stream-game { grid-template-columns: 150px minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; } }
.stream-game__cover { display: block; width: 150px; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 14px; background: var(--surf2); }
.stream-game__cover img, .stream-game__cover .ph { width: 100%; height: 100%; object-fit: cover; }
.stream-game__info h2 a { color: inherit; text-decoration: none; }
.stream-game__info h2 a:hover { color: var(--acc); }
.stream-game__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px 24px; margin: 18px 0 0; }
.stream-game__facts dt, .stream-game__scores dt { font-size: 13px; color: var(--t3); }
.stream-game__facts dd { margin: 2px 0 0; color: var(--t1); }
.stream-game__scores { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.stream-game__scores dt { display: flex; justify-content: space-between; margin-bottom: 8px; }
.stream-game__scores dd { display: flex; margin: 0; }
.stream-links { margin-top: 80px; }
.stream-links__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.stream-support { display: flex; flex-direction: column; gap: 10px; background: var(--soft); }
.stream-support .btn { gap: 8px; }

/* Admin */
.video-admin__thumb { display: block; width: 120px; aspect-ratio: 16 / 9; margin-bottom: 4px; overflow: hidden; border-radius: 8px; background: var(--surf2); }
.video-admin__thumb img, .video-admin__thumb .ph { width: 100%; height: 100%; object-fit: cover; }
.admin-table tr.is-muted td { opacity: 0.55; }
.admin-box h2 svg { vertical-align: -3px; margin-right: 4px; }

/* ───────────────────────── Manskribo Sans ───────────────────────── */

.ms-lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line2); border-radius: 10px; }
.ms-lang a { padding: 4px 10px; border-radius: 7px; color: var(--t2); font-size: 13px; font-weight: 600; text-decoration: none; }
.ms-lang a[aria-current="page"] { background: var(--soft); color: var(--t1); }
.ms-hero__title { margin: 18px 0 28px; font-family: var(--font-manskribo); font-weight: 400; font-size: clamp(64px, 12vw, 168px); line-height: 0.95; letter-spacing: -0.02em; color: var(--t1); }
.ms-hero__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .ms-hero__row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.ms-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin: 0; }
.ms-stats dt { font-family: var(--font-mono); font-size: 12px; color: var(--t3); }
.ms-stats dd { margin: 4px 0 0; font-family: var(--font-mono); font-size: 22px; color: var(--t1); }
.ms-preview { margin-top: 64px; overflow: hidden; }
.ms-preview__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ms-preview__bar .chips { flex: 1; }
.ms-chip { font-family: var(--font-manskribo); }
.ms-size { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--t3); }
.ms-size input { width: 140px; accent-color: var(--acc); }
.ms-size output { min-width: 52px; color: var(--t1); font-size: 13px; }
.ms-preview__text { display: block; width: 100%; min-height: 280px; padding: 24px; border: 0; background: var(--surf); color: var(--t1); font-family: var(--font-manskribo); font-size: 72px; line-height: 1.2; resize: vertical; }
.ms-preview__text:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.ms-section { margin-top: 96px; }
.ms-section > .muted { margin: 8px 0 22px; }
.ms-glyphs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) { .ms-glyphs { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.ms-glyphs__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.ms-glyph { aspect-ratio: 1; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--t1); font-family: var(--font-manskribo); font-size: 26px; cursor: pointer; }
.ms-glyph:hover { background: var(--soft); }
.ms-glyph[aria-pressed="true"] { background: var(--btn); color: var(--on-btn); }
.ms-glyph.is-missing { color: var(--t3); opacity: 0.45; }
.ms-glyph:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.ms-glyph-detail { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 300px; padding: 24px; text-align: center; }
.ms-glyph-detail__char { font-family: var(--font-manskribo); font-size: 160px; line-height: 1; color: var(--t1); }
.ms-blocks { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ms-blocks > li { border-bottom: 1px solid var(--line); }
.ms-block > summary { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 2fr) 120px; align-items: center; gap: 16px; padding: 12px 0; font-size: 14px; cursor: pointer; list-style: none; }
.ms-block > summary::-webkit-details-marker { display: none; }
.ms-block > summary b::before { content: "›"; display: inline-block; width: 16px; color: var(--acc); transition: transform 0.15s; }
.ms-block[open] > summary b::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .ms-block > summary b::before { transition: none; } }
.ms-block > summary:hover b { color: var(--acc); }
.ms-block__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 4px 0 20px; }
@media (min-width: 900px) { .ms-block__body { grid-template-columns: minmax(0, 1fr) 220px; align-items: start; } }
.ms-table-wrap { overflow-x: auto; }
.ms-table { border-collapse: collapse; font-size: 13px; }
.ms-table th { padding: 4px 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--t3); text-align: center; }
.ms-table th[scope="row"] { text-align: right; padding-right: 10px; }
.ms-table td { padding: 0; border: 1px solid var(--line); }
.ms-cell { display: block; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--t1); font-family: var(--font-manskribo); font-size: 22px; line-height: 44px; text-align: center; cursor: pointer; }
.ms-cell:hover { background: var(--soft); }
.ms-cell[aria-pressed="true"] { background: var(--btn); color: var(--on-btn); }
.ms-cell:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.ms-table td.is-empty { background: var(--surf2); }
.ms-cell-preview { position: sticky; top: 90px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 200px; padding: 20px; text-align: center; }
.ms-cell-preview__char { font-family: var(--font-manskribo); font-size: 110px; line-height: 1.05; color: var(--t1); }
.ms-blocks .mono { font-size: 12px; }
.ms-blocks__count { text-align: right; color: var(--t1); }
@media (max-width: 760px) { .ms-block > summary { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; } .ms-block > summary > .mono.muted { order: 3; } .ms-block .ms-bar { grid-column: 1 / -1; order: 4; } }
.ms-bar { display: block; height: 6px; border-radius: 3px; background: var(--surf2); overflow: hidden; }
.ms-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--acc); }
.ms-about { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 48px; }
@media (min-width: 900px) { .ms-about { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.ms-about__text { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; color: var(--t2); font-size: 17px; line-height: 1.7; }
.ms-code { overflow-x: auto; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surf); color: var(--t1); font-family: var(--font-mono); font-size: 13px; line-height: 1.6; }
.ms-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; margin-top: 96px; }
.ms-card { display: flex; flex-direction: column; gap: 12px; }
.ms-card .btn, .ms-card .link-arrow { align-self: flex-start; }
.ms-card--dl { background: var(--soft); }
.ms-log { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ms-log > li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--t2); }
.ms-log__head { display: flex; gap: 10px; margin-bottom: 4px; }
.ms-log__sub { margin-top: 6px; font-size: 12px; color: var(--t3); }
.ms-log ul { margin: 0; padding-left: 18px; }

/* ───────────────────────── Setup: Hardware, Werkstatt, Software ───────────────────────── */

.setup-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.setup-stand { padding: 6px 12px; border: 1px solid var(--line2); border-radius: 9px; font-size: 13px; color: var(--t2); }
.setup-section { margin-top: 80px; scroll-margin-top: 80px; }
/* Reiter Hardware · Werkstatt · Software (nur mit JS sichtbar; ohne JS stehen die Bereiche untereinander) */
.setup-tabs { display: flex; width: fit-content; max-width: 100%; margin-top: 28px; scroll-margin-top: 100px; }
.setup-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; font-size: 15px; }
.setup-tabs:not([hidden]) ~ .setup-section { margin-top: 36px; }
.setup-tabs:not([hidden]) ~ .setup-section > .h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* Reiter nennt den Bereich schon */
@media (max-width: 520px) { .setup-tabs { width: 100%; } .setup-tabs button { flex: 1; justify-content: center; padding: 0 10px; } }
.setup-section > .h2 { margin-bottom: 24px; }
.setup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; align-items: start; }
.setup-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.setup-list { margin: 0; }
.setup-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.setup-list dt { color: var(--t3); }
.setup-list dd { margin: 0; color: var(--t1); font-weight: 500; text-align: right; }
.setup-list a { color: var(--t1); }
.setup-workshop { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-bottom: 24px; }
@media (min-width: 900px) { .setup-workshop { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; } }
.setup-workshop__photo { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surf2); }
.setup-workshop__photo img { width: 100%; max-height: 520px; object-fit: cover; }
.setup-workshop__text { display: flex; flex-direction: column; gap: 12px; color: var(--t2); font-size: 17px; line-height: 1.7; }
.setup-device { display: flex; flex-direction: column; overflow: hidden; }
.setup-device__img { aspect-ratio: 4 / 3; margin: 8px 8px 0; overflow: hidden; border-radius: 18px; background: var(--surf2); }
.setup-device__img img { width: 100%; height: 100%; object-fit: cover; }
.setup-device__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px 24px; }
.setup-device__body .setup-card__head { margin-bottom: 0; }
.setup-software { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.setup-software .account { padding: 14px 16px; }
.brand-badge img { width: 70%; height: 70%; object-fit: contain; }

/* Admin */
.setup-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 150px) 34px 30px; align-items: center; gap: 8px; }
.setup-row__hl { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line2); border-radius: 9px; color: var(--t3); cursor: pointer; }
.setup-row__hl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.setup-row__hl:has(input:checked) { background: var(--soft); border-color: var(--acc); color: var(--acc); }
.setup-row__hl:has(input:focus-visible) { outline: 2px solid var(--acc); outline-offset: 2px; }
.setup-row select { width: 100%; min-height: 36px; padding: 0 6px; border: 1px solid var(--line2); border-radius: 9px; background: var(--bg); color: var(--t2); font: inherit; font-size: 13px; }
@media (max-width: 640px) { .setup-row { grid-template-columns: 18px minmax(0, 1fr) 30px; } .setup-row > input:nth-of-type(2), .setup-row > select { grid-column: 2; } .setup-row > button { grid-column: 3; grid-row: 1; } .setup-row__hl { grid-column: 2; justify-self: start; } }
.setup-row input { width: 100%; min-height: 36px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 9px; background: var(--bg); color: var(--t1); font: inherit; font-size: 14px; }
.image-list--single .image-list__items { grid-template-columns: minmax(0, 160px); }

/* ───────────────────────── Konten: Autorenzeile, Profil, Rechte im Admin ───────────────────────── */

.byline { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; color: var(--t2); font-size: 14px; text-decoration: none; }
.byline b { color: var(--t1); font-weight: 600; }
.byline:hover b { color: var(--acc); }
.byline__avatar, .author-head__avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; border-radius: 50%; background: var(--soft); color: var(--acc); font-weight: 700; }
.byline__avatar { width: 32px; height: 32px; font-size: 14px; }
.byline__avatar img, .author-head__avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px; }
.author-head__avatar { width: 128px; height: 128px; font-size: 48px; border: 2px solid var(--line2); }
.author-head > .stack { flex: 1 1 420px; }
.author-head__bio { display: flex; flex-direction: column; gap: 10px; max-width: 680px; color: var(--t2); font-size: 17px; line-height: 1.7; }
.author-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.author-link { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; color: var(--t1); font-size: 14px; text-decoration: none; }
.author-link:hover { border-color: var(--acc); }
.author-link .brand-badge { width: 28px; height: 28px; border-radius: 50%; }

/* Admin: nur ansehen, Bereiche, Profil-Links */
.readonly-note { align-items: center; border: 1px solid var(--line2); }
.admin-nav__ro { display: inline-flex; margin-left: 4px; color: var(--t3); vertical-align: -1px; }
.area-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 0 20px; }
.profile-link { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px; }
.profile-link select, .profile-link input { min-height: 38px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 9px; background: var(--bg); color: var(--t1); font: inherit; font-size: 14px; }
.updated-by { font-size: 12px; color: var(--t3); }
.bar-author { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--t3); }
.bar-author select { min-height: 32px; padding: 0 8px; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg); color: var(--t1); font: inherit; font-size: 13px; }

/* ───────────── Material Symbols in Faktenlisten, Technik, Admin ───────────── */
.facts-grid dt, .trip-fact dt { display: flex; align-items: center; gap: 6px; }
.facts-grid dt .icon, .trip-fact dt .icon { color: var(--acc); }
.eyebrow--icon { display: inline-flex; align-items: center; gap: 8px; }
.setup-card__title { display: flex; align-items: center; gap: 10px; }
.setup-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--soft); color: var(--acc); flex: none; }
.setup-list dt { display: flex; align-items: center; gap: 8px; }
.setup-list dt .icon { color: var(--t3); }
.setup-list__gap { display: inline-block; width: 16px; flex: none; }
/* Geräte-Karte (setup_groups.layout = geraete): je Zeile ein Gerät */
.setup-card__icon--brand { background: var(--surf2); color: var(--t1); }
.device-list { margin: 0; padding: 0; list-style: none; }
.device-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.device-list__icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--surf2); color: var(--t2); flex: none; }
.device-list__text { display: flex; flex-direction: column; min-width: 0; }
.device-list__text b { font-weight: 600; font-size: 15px; color: var(--t1); }
.device-list__text b a { color: inherit; }
.device-list__text span { font-size: 13px; color: var(--t3); }

/* Technik → Hardware: breite Hauptkarte (≥ SETUP_WIDE_MIN_ITEMS Zeilen) mit Eckdaten-Kacheln und Gruppen */
.setup-card--wide { margin-bottom: 16px; }
.spec-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin: 4px 0 24px; }
.spec-tile { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surf2); }
.spec-tile dt { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; color: var(--t3); }
.spec-tile dt .icon { box-sizing: content-box; padding: 7px; border-radius: 9px; background: var(--soft); color: var(--acc); }
.spec-tile dd { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--t1); }
.spec-tile a { color: inherit; }
.spec-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px 36px; }
.spec-col__title { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3); }
.spec-list { margin: 0; }
.spec-list > div { padding: 10px 0; border-top: 1px solid var(--line); }
.spec-list dt { font-size: 13px; color: var(--t3); }
.spec-list dd { margin: 2px 0 0; font-size: 15px; font-weight: 500; color: var(--t1); }
.spec-list a { color: inherit; }
/* übrige Hardware-Karten nebeneinander, gleich hoch */
.setup-grid--rest { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: stretch; }
/* Konsolen o. Ä.: nach Marke gruppiert – Logo, Marke, Geräte als Kacheln */
.brand-groups { margin: 0; padding: 0; list-style: none; }
.brand-groups > li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.brand-groups__logo { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surf2); color: var(--t1); font-size: 14px; font-weight: 700; }
.brand-groups__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.brand-groups__body > b { font-size: 15px; color: var(--t1); }
.brand-groups__items { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.brand-groups__items li { padding: 4px 11px; border: 1px solid var(--line2); border-radius: 999px; font-size: 14px; color: var(--t2); }
.brand-groups__items a { color: inherit; }
/* Werkstatt ohne Text: Foto über die volle Breite */
@media (min-width: 900px) { .setup-workshop--photo { grid-template-columns: minmax(0, 1fr); } }
.setup-workshop--photo .setup-workshop__photo img { aspect-ratio: 21 / 9; max-height: none; }
/* Software: hochgeladene Logos etwas größer */
.setup-software .brand-badge img { width: 82%; height: 82%; }
.drag-handle { display: inline-flex; align-items: center; letter-spacing: 0; }
.flash { display: flex; align-items: flex-start; gap: 10px; }
.flash > .icon { margin-top: 1px; }
/* Admin-Listen: Stift neben dem Namen zeigt, dass der Name zum Bearbeiten führt */
.edit-link { display: inline-flex; align-items: center; gap: 6px; }
.edit-link .icon { color: var(--t3); transition: color 0.15s; }
.edit-link:hover .icon, .edit-link:focus-visible .icon { color: var(--acc); }
@media (prefers-reduced-motion: reduce) { .edit-link .icon { transition: none; } }

/* ═══════════════════════════ Animationen (11/2026) ═══════════════════════════
   Dezent: nur transform/opacity, 150–500 ms (Tokens --dur*, --ease-out).
   Einblenden, Hochzählen, Balken und Fallblatt nur mit html.anim – das setzt app.js, wenn JS läuft,
   „Bewegung reduzieren“ aus ist und es nicht der Admin ist (body.is-admin). Ohne JS ist alles sichtbar. */

/* Seitenwechsel: weiches Überblenden (View Transitions; Browser ohne Unterstützung wechseln wie bisher) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; }
.nav { view-transition-name: site-nav; } /* Navigation bleibt stehen */
html:has(body.is-admin)::view-transition-old(root), html:has(body.is-admin)::view-transition-new(root) { animation: none; }

/* Einblenden beim Scrollen (Klasse .reveal setzt app.js nur bei Elementen unterhalb des Bildschirms;
   nach dem Einblenden entfernt app.js die Klassen wieder, damit Hover-Effekte ungestört bleiben) */
@keyframes reveal-in { from { opacity: 0; transform: translateY(12px); } }
.anim .reveal { opacity: 0; }
.anim .reveal.is-in { opacity: 1; animation: reveal-in var(--dur-slow) var(--ease-out) both; animation-delay: var(--reveal-delay, 0ms); }

/* Hover & Klick (nicht im Admin) */
body:not(.is-admin) :is(.tile--link, .game-tile, .video-tile) { transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color 0.2s; }
body:not(.is-admin) :is(.tile--link, .game-tile, .video-tile):hover { transform: translateY(-2px); }
body:not(.is-admin) .tile--link:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); }
body:not(.is-admin) :is(.btn, .icon-btn, .round-btn, .square-btn) { transition: transform var(--dur-fast) var(--ease-out), border-color 0.2s, background-color 0.2s; }
body:not(.is-admin) :is(.btn, .icon-btn, .round-btn, .square-btn):active { transform: scale(0.97); }
body:not(.is-admin) .linklist a::after { transition: transform var(--dur) var(--ease-out); }
body:not(.is-admin) .linklist a:hover::after { transform: translateX(3px); }

/* Handy-Menü klappt weich auf */
@keyframes nav-in { from { opacity: 0; transform: translateY(-6px); } }
body:not(.is-admin) .nav.is-open .nav__links { animation: nav-in var(--dur) var(--ease-out); }

/* Kilometertafeln: Werte blenden beim Umschalten Modell ↔ Vorbild weich über (app.js), Zahlen zählen hoch */
@keyframes value-swap { from { opacity: 0; transform: translateY(4px); } }
.anim .is-swapping { animation: value-swap var(--dur) var(--ease-out); }

/* Gleisplan: gewählter Bahnhof „ploppt“ kurz auf, untere Ebene blendet ein */
@keyframes plan-pop { 40% { transform: scale(1.18); } }
.anim .plan-mark.is-popping { animation: plan-pop 320ms var(--ease-out); transform-box: fill-box; transform-origin: center; }
@keyframes fade-in { from { opacity: 0; } }
.anim .map.show-lower #untergeschoss { animation: fade-in 300ms var(--ease-out); }

/* Spielbewertung: Balken füllen sich beim Sichtbarwerden */
.anim .score-bar > span { transform: scaleX(0); transform-origin: left center; transition: transform 800ms var(--ease-out); }
.anim .score-bar.is-in > span { transform: none; }

/* ── Fallblatt: Zeilen der Abfahrtstafeln klappen nacheinander herein ──
   Abschalten: in app.js FLAP_ROWS = false setzen (oder diesen Block und den in app.js löschen). */
@keyframes ob-flap { from { opacity: 0; transform: perspective(700px) rotateX(-80deg); } 60% { opacity: 1; } }
.anim.flap .ob:not(.ob--flap) tbody tr { opacity: 0; } /* bis die Tafel im Bild ist */
.anim .ob--flap tbody tr { transform-origin: 50% 0; animation: ob-flap 460ms var(--ease-out) both; animation-delay: calc(var(--row, 0) * 70ms); }
/* ── Ende Fallblatt ── */

/* Drucken: alles sichtbar, nichts animiert */
@media print {
    .anim .reveal, .anim.flap .ob tbody tr, .anim .score-bar > span { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* „Bewegung reduzieren“: alles sofort, ohne Bewegung (gilt für die ganze Seite) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
    ::view-transition-old(root), ::view-transition-new(root), ::view-transition-group(*) { animation: none !important; }
}
