/* === Rapsblüten-Tracker — Design System === */

:root {
    --raps-yellow: #E8C820;
    --raps-yellow-light: #F5E06B;
    --raps-yellow-glow: #F8D832;
    --earth-dark: #2A2118;
    --earth-warm: #4A3C2E;
    --earth-mid: #7A6B5A;
    --cream: #FAF5E8;
    --cream-warm: #F2EAD8;
    --green-field: #5A8C3C;
    --green-dark: #3A6B28;
    --red-late: #C44D3E;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Outfit', system-ui, sans-serif;

    --sidebar-width: 360px;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow-card: 0 4px 24px rgba(42, 33, 24, 0.12), 0 1px 4px rgba(42, 33, 24, 0.08);
    --shadow-btn: 0 2px 8px rgba(42, 33, 24, 0.10);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.nowrap { white-space: nowrap; }

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--earth-dark);
    background: var(--cream);
    overflow: hidden;
    height: 100dvh;
}

/* === Map === */

#map {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Karte etwas abdunkeln, damit gelbe Rapsfelder/rote Umrandungen besser auffallen.
   Nur Basis-Tile-Kacheln, nicht ImageOverlays (Satelliten-Layer) o. Marker. */
.leaflet-tile-pane .leaflet-layer:first-child .leaflet-tile {
    filter: brightness(0.82) saturate(0.7);
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow-card) !important;
    margin-top: 12px !important;
    margin-right: 12px !important;
}

.leaflet-control-zoom a {
    background: var(--cream) !important;
    color: var(--earth-dark) !important;
    font-family: var(--font-body) !important;
    font-weight: 500 !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 16px !important;
}

.leaflet-control-zoom a:hover {
    background: var(--raps-yellow) !important;
    color: var(--earth-dark) !important;
}

.leaflet-control-zoom-in {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
}

.leaflet-control-zoom-out {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
}

/* === Abbreviations === */

abbr[title] {
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    cursor: help;
}

/* === Layer Toggle Buttons === */

.layer-toggles {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 400;
    display: flex;
    gap: 4px;
}

.layer-toggle-btn {
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--cream-warm);
    border-radius: var(--radius-sm);
    background: var(--cream);
    color: var(--earth-mid);
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--shadow-btn);
    transition: var(--transition);
    transition-property: background, color, border-color, box-shadow;
}

.layer-toggle-btn:hover {
    border-color: var(--raps-yellow);
    color: var(--earth-dark);
}

.layer-toggle-btn.active {
    background: var(--raps-yellow);
    color: var(--earth-dark);
    border-color: var(--raps-yellow);
}

.layer-toggle-btn.loading {
    background: var(--cream-warm);
    color: var(--earth-mid);
    border-color: var(--raps-yellow-light);
    pointer-events: none;
}

.layer-toggle-btn.loading::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 4px;
    border: 2px solid var(--earth-mid);
    border-top-color: var(--raps-yellow);
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

.lbl-short { display: none; }
.lbl-long { display: inline; }

@media (max-width: 640px) {
    .layer-toggles {
        gap: 3px;
    }
    .sidebar-open .layer-toggles {
        display: none;
    }
    .layer-toggle-btn {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
}

@media (max-width: 400px) {
    .lbl-long { display: none; }
    .lbl-short { display: inline; }
}

/* === Sidebar Toggle === */

.sidebar-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--cream);
    color: var(--earth-dark);
    cursor: pointer;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    transition-property: background, transform;
}

.sidebar-toggle:hover {
    background: var(--raps-yellow);
    transform: scale(1.05);
}

.sidebar-open .sidebar-toggle {
    left: calc(var(--sidebar-width) + 12px);
}

.sidebar-open .layer-toggles {
    left: calc(50% + var(--sidebar-width) / 2);
}

.sidebar-open .rapsroute-teaser {
    left: calc(var(--sidebar-width) + 12px);
}

/* === Sidebar === */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 500;
    background: var(--cream);
    border-right: 1px solid var(--cream-warm);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform var(--transition);
    overflow: hidden;
}

.sidebar-open .sidebar {
    transform: translateX(0);
}

/* Header */

.sidebar-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--cream-warm);
    background:
        radial-gradient(ellipse at 80% 20%, rgba(232, 200, 32, 0.12) 0%, transparent 60%),
        var(--cream);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    flex-shrink: 0;
    border-radius: 8px;
}

.sidebar-header h1 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--earth-dark);
    font-optical-sizing: auto;
}

.brand-sh {
    font-weight: 300;
    letter-spacing: 0.01em;
}

.brand-subtitle {
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--earth-mid);
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* Proof-of-Concept Banner */

.poc-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #FFF8E1, #FFF3CC);
    border-bottom: 1px solid var(--cream-warm);
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--earth-warm);
}

.poc-banner p {
    flex: 1;
}

.poc-banner-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--earth-mid);
    padding: 0 2px;
    line-height: 1;
}

.poc-banner-close:hover {
    color: var(--earth-dark);
}

.poc-banner[hidden] {
    display: none;
}

/* === Donate Strip === */

.donate-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.18), rgba(248, 216, 50, 0.12));
    border: none;
    border-top: 1px solid rgba(232, 200, 32, 0.3);
    border-bottom: 1px solid rgba(232, 200, 32, 0.3);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--earth-warm);
    cursor: pointer;
    transition: var(--transition);
    transition-property: background, color;
    letter-spacing: 0.01em;
    flex-shrink: 0;
}

.donate-strip:hover {
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.35), rgba(248, 216, 50, 0.25));
    color: var(--earth-dark);
}

/* === Dialog-Element Resets (native <dialog> als full-screen Backdrop) === */

.donate-modal-backdrop,
.info-modal-backdrop,
.notice-backdrop {
    border: none;
    max-width: 100%;
    max-height: 100%;
    width: 100vw;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
}

dialog.donate-modal-backdrop::backdrop,
dialog.info-modal-backdrop::backdrop,
dialog.notice-backdrop::backdrop {
    display: none; /* Backdrop liegt im Element selbst */
}

/* Geschlossene <dialog>-Elemente verstecken (überschreibt display:flex aus den Backdrop-Klassen) */
dialog.info-modal-backdrop:not([open]),
dialog.notice-backdrop:not([open]),
dialog.donate-modal-backdrop:not([open]) {
    display: none;
}

/* .sr-only: visuell verborgen, für Screenreader sichtbar */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === Donate Modal === */

.donate-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(42, 33, 24, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

.donate-modal-backdrop[hidden] {
    display: none;
}

.donate-modal {
    position: relative;
    background: var(--cream);
    border-radius: var(--radius);
    padding: 40px 36px 32px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-card);
    animation: fadeInUp 0.3s ease;
    text-align: center;
}

.donate-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--earth-mid);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    transition-property: background, color;
}

.donate-modal-close:hover {
    background: var(--cream-warm);
    color: var(--earth-dark);
}

.donate-modal-coffee {
    font-size: 2.4rem;
    margin-bottom: 12px;
    line-height: 1;
}

.donate-modal-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--earth-dark);
    margin-bottom: 16px;
}

.donate-modal p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--earth-warm);
    margin-bottom: 8px;
}

.btn-donate-paypal {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: var(--raps-yellow);
    color: var(--earth-dark);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-btn);
    transition: var(--transition);
    transition-property: background, transform, box-shadow;
    letter-spacing: 0.01em;
}

.btn-donate-paypal:hover {
    background: var(--raps-yellow-glow);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232, 200, 32, 0.4);
}

/* Body */

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--cream-warm) transparent;
}

/* --- Season Hint --- */

.season-hint {
    padding: 10px 24px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--earth-warm);
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.10), rgba(232, 200, 32, 0.03));
    border-bottom: 1px solid var(--cream-warm);
}

.season-hint strong {
    color: var(--earth-dark);
}

/* === Analyse Context Bar === */

.analyse-context {
    padding: 10px 24px;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--earth-warm);
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.12), rgba(232, 200, 32, 0.04));
    border-bottom: 1px solid var(--cream-warm);
}

.context-row {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.context-result {
    font-weight: 600;
    color: var(--earth-dark);
}

/* === Sidebar Tabs === */

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--cream-warm);
    padding: 0 24px;
    gap: 4px;
    flex-shrink: 0;
}

.sidebar-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 6px 6px;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--earth-mid);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    transition-property: color, border-color;
}

.tab-label {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.tab-title {
    font-size: 0.72rem;
    font-weight: 500;
}

.sidebar-tab.active .tab-title {
    font-weight: 600;
}

.tab-subtitle {
    font-size: 0.56rem;
    font-weight: 300;
    color: var(--earth-mid);
    opacity: 0.7;
}

.sidebar-tab:hover {
    color: var(--earth-dark);
}

.sidebar-tab.active {
    color: var(--earth-dark);
    border-bottom-color: var(--raps-yellow);
    font-weight: 600;
}

.sidebar-tab svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.sidebar-tab.active svg {
    opacity: 0.8;
}

/* === Tab Panes === */

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* === Stepper === */

/* Badge-Spalte: Badge 22px + 8px gap = 30px Einrückung für Inhalt */
.sidebar-section[data-step] .section-content,
.sidebar-section[data-step] .step-summary,
.sidebar-section[data-step] .step-desc {
    margin-left: 30px;
}

.step-desc {
    font-size: 0.75rem;
    color: var(--earth-mid);
    line-height: 1.45;
    margin: -6px 0 10px;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: var(--transition);
    transition-property: background, color, border-color;
    line-height: 1;
}

/* Step states */

.step-upcoming .step-badge {
    background: var(--cream-warm);
    color: var(--earth-mid);
    border: 1.5px dashed var(--earth-mid);
}

.step-upcoming .section-title {
    opacity: 0.5;
}

.step-upcoming .step-desc,
.step-upcoming .section-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.step-active .step-badge {
    background: var(--raps-yellow);
    color: var(--earth-dark);
    border: 1.5px solid var(--raps-yellow);
}

.step-active .section-content {
    max-height: 600px;
    opacity: 1;
    transition: max-height 0.4s ease, opacity 0.3s ease 0.1s;
}

.step-completed .step-badge {
    background: var(--green-field);
    color: white;
    border: 1.5px solid var(--green-field);
}

.step-completed .step-desc,
.step-completed .section-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.2s ease;
}

.step-completed.step-expanded .step-desc,
.step-completed.step-expanded .section-content {
    max-height: 600px;
    overflow: visible;
    opacity: 1;
    transition: max-height 0.4s ease, opacity 0.3s ease 0.1s;
}

/* Step summary (shown when completed) */

.step-summary {
    font-size: 0.8rem;
    color: var(--earth-mid);
    padding: 2px 0 0;
    cursor: pointer;
}

.step-summary:hover {
    color: var(--earth-dark);
}

/* Step prompt (shown before scene selection in step 3) */

.step-prompt {
    font-size: 0.82rem;
    color: var(--earth-mid);
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.08), transparent);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--raps-yellow);
    text-align: center;
}

/* Empty results hint */

.empty-hint {
    font-size: 0.82rem;
    color: var(--earth-mid);
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.06), transparent);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--cream-warm);
    line-height: 1.5;
    margin: 0;
}

.empty-hint-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.empty-hint-action {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--earth-dark);
    padding: 6px 10px;
    background: rgba(232, 200, 32, 0.1);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background var(--transition);
}

.empty-hint-action:hover {
    background: rgba(232, 200, 32, 0.22);
}

/* Scenes info in step 3 */

.scenes-info {
    font-size: 0.82rem;
    color: var(--earth-mid);
    margin: 0;
    line-height: 1.5;
}

/* Timeline highlight flash */

.timeline-highlight {
    animation: timeline-flash 1.5s ease;
}

@keyframes timeline-flash {
    0%, 100% { border-top: 2px solid transparent; }
    20%, 80% { border-top: 2px solid var(--raps-yellow); }
}

/* Stepper: Chevron + cursor on completed steps */

.step-completed .section-title,
.step-completed .step-summary {
    cursor: pointer;
}

.step-completed .section-title::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--earth-mid);
    border-bottom: 2px solid var(--earth-mid);
    transform: rotate(45deg);
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.step-completed.step-expanded .section-title::after {
    transform: rotate(-135deg);
}

/* Stepper connector arrows (line + arrowhead) */

.tab-pane .sidebar-section[data-step] {
    position: relative;
    z-index: auto !important;
}

/* Vertikale Linie: Badge-Mitte = 35px → left 34px für 2px Linie */
.tab-pane .sidebar-section[data-step="1"]::after,
.tab-pane .sidebar-section[data-step="2"]::after,
.tab-pane .sidebar-section[data-step="3"]::after {
    content: '';
    position: absolute;
    left: 34px;
    top: 38px;
    bottom: -11px;
    width: 2px;
    background: var(--cream-warm);
    z-index: 2;
    transition: background var(--transition);
}

.tab-pane .sidebar-section.step-completed[data-step="1"]::after,
.tab-pane .sidebar-section.step-completed[data-step="2"]::after,
.tab-pane .sidebar-section.step-completed[data-step="3"]::after {
    background: var(--green-field);
}

/* Pfeilspitze direkt über dem nächsten Badge */
.tab-pane .sidebar-section[data-step="2"]::before,
.tab-pane .sidebar-section[data-step="3"]::before,
.tab-pane .sidebar-section[data-step="4"]::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 10px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--cream-warm);
    z-index: 3;
    transition: border-top-color var(--transition);
}

/* Pfeilfarbe grün wenn vorheriger Schritt completed */
.tab-pane .sidebar-section.step-completed[data-step="1"] ~ .sidebar-section[data-step="2"]::before,
.tab-pane .sidebar-section.step-completed[data-step="2"] ~ .sidebar-section[data-step="3"]::before,
.tab-pane .sidebar-section.step-completed[data-step="3"] ~ .sidebar-section[data-step="4"]::before {
    border-top-color: var(--green-field);
}

/* --- Location & Radius --- */

.location-display {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.08), transparent);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--raps-yellow);
}

.location-name {
    font-weight: 500;
    font-size: 0.85rem;
}

.location-coords {
    font-size: 0.7rem;
    color: var(--earth-mid);
    font-family: monospace;
}

.location-search {
    position: relative;
    margin-bottom: 10px;
    display: flex;
    gap: 4px;
    z-index: 20;
}

.location-search input {
    flex: 1;
    padding: 6px 10px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    border: 1px solid var(--cream-warm);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--earth-dark);
    transition: var(--transition);
}

.location-search input:focus {
    outline: none;
    border-color: var(--raps-yellow);
    box-shadow: 0 0 0 2px rgba(232, 200, 32, 0.2);
}

.btn-geolocation {
    padding: 4px 8px;
    border: 1px solid var(--cream-warm);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--earth-mid);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.btn-geolocation:hover {
    border-color: var(--raps-yellow);
    color: var(--earth-dark);
}

.btn-geolocation.loading {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.location-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 36px;
    background: white;
    border: 1px solid var(--cream-warm);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

ul.geo-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.geo-results-list li {
    margin: 0;
    padding: 0;
}

.geo-result {
    display: block;
    width: 100%;
    padding: 8px 10px;
    text-align: left;
    font-family: var(--font-body);
    font-size: 0.8rem;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 1px solid var(--cream-warm);
    color: var(--earth-dark);
    transition: var(--transition);
}

.geo-result:hover {
    background: var(--cream-warm);
}

ul.geo-results-list li:last-child .geo-result {
    border-bottom: none;
}

.geo-no-results {
    padding: 8px 10px;
    font-size: 0.8rem;
    color: var(--earth-mid);
    font-style: italic;
}

fieldset.radius-control {
    border: none;
    margin: 0;
    padding: 0;
}

.radius-control legend {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--earth-mid);
    margin-bottom: 4px;
    padding: 0;
}

.radius-buttons {
    display: flex;
    gap: 4px;
}

.radius-btn {
    flex: 1;
    padding: 5px 4px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid var(--cream-warm);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--earth-mid);
    cursor: pointer;
    transition: var(--transition);
}

.radius-btn:hover {
    border-color: var(--raps-yellow);
    color: var(--earth-dark);
}

.radius-btn.active {
    background: var(--raps-yellow);
    color: var(--earth-dark);
    border-color: var(--raps-yellow);
    font-weight: 600;
}

.sidebar-section {
    padding: 16px 24px;
}

.sidebar-section + .sidebar-section {
    border-top: 1px solid var(--cream-warm);
}

.section-title {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--earth-mid);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-icon {
    font-size: 0.9rem;
    opacity: 0.6;
}

.section-content {
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Loading */

.loading-placeholder {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loading-bar {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--cream-warm) 25%, var(--cream) 50%, var(--cream-warm) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.loading-bar.short {
    width: 60%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* DWD Hint */

.dwd-hint {
    font-size: 0.75rem;
    color: var(--earth-mid);
    line-height: 1.5;
    margin-bottom: 10px;
}

/* DWD station list — scrollable for many stations */
#dwd-info {
    max-height: 400px;
    overflow-y: auto;
}

/* Station List */

ul.station-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.station-list .station-list-item {
    margin: 0;
    padding: 0;
}

/* Station Cards (compact) */

button.station-card {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.station-card {
    padding: 6px 10px;
    margin-bottom: 4px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--cream-warm);
    cursor: pointer;
    transition: var(--transition);
    transition-property: border-color, box-shadow;
}

.station-card:hover {
    border-color: var(--raps-yellow);
    box-shadow: 0 0 0 2px rgba(232, 200, 32, 0.15);
}

.station-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.station-name {
    font-weight: 500;
    font-size: 0.8rem;
}

.station-distance {
    font-size: 0.7rem;
    color: var(--earth-mid);
}

.station-bloom {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}

.bloom-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 100px;
    background: var(--cream-warm);
    color: var(--earth-warm);
}

.bloom-tag .year {
    opacity: 0.6;
}

.bloom-tag.latest {
    background: var(--raps-yellow);
    color: var(--earth-dark);
}

/* Regional average */

.regional-avg {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.10) 0%, rgba(90, 140, 60, 0.06) 100%);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--raps-yellow);
}

.regional-avg-label {
    font-size: 0.75rem;
    color: var(--earth-mid);
    font-weight: 400;
}

.regional-avg-value {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--earth-dark);
}

/* Date range picker */

.date-range-picker {
    margin-bottom: 12px;
}

.date-range-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.date-range-row + .date-range-row {
    margin-top: 8px;
    align-items: center;
}

.cloud-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--earth-mid);
}

.date-field {
    flex: 1;
}

.date-field label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--earth-mid);
    margin-bottom: 3px;
}

.date-field input[type="date"] {
    width: 100%;
    padding: 6px 8px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    border: 1px solid var(--cream-warm);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--earth-dark);
    transition: border-color var(--transition);
}

.date-field input[type="date"]:focus {
    outline: none;
    border-color: var(--raps-yellow);
    box-shadow: 0 0 0 3px rgba(232, 200, 32, 0.2);
}

.cloud-select {
    flex-shrink: 0;
    width: 64px;
    padding: 6px 4px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    border: 1px solid var(--cream-warm);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--earth-dark);
    cursor: pointer;
    transition: border-color var(--transition);
}

.cloud-select:focus {
    outline: none;
    border-color: var(--raps-yellow);
    box-shadow: 0 0 0 3px rgba(232, 200, 32, 0.2);
}

.btn-search {
    flex: 1;
    padding: 6px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.btn-search.is-loading {
    background: var(--earth-warm);
    color: var(--cream);
    border-color: var(--earth-warm);
}

/* Active scene label */

.active-scene-label {
    margin-top: 10px;
    padding: 6px 10px;
    background: var(--earth-dark);
    color: var(--cream);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    text-align: center;
    letter-spacing: 0.02em;
}

/* Stats grid */

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

dl.stat-card {
    margin: 0;
}

.stat-card {
    padding: 10px 12px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--cream-warm);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--earth-dark);
}

.stat-label {
    font-size: 0.65rem;
    color: var(--earth-mid);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    transition-property: background, color, box-shadow, transform;
}

.btn-outline {
    background: white;
    color: var(--earth-warm);
    border: 1px solid var(--cream-warm);
    box-shadow: var(--shadow-btn);
}

.btn-outline:hover:not(:disabled) {
    background: var(--raps-yellow);
    color: var(--earth-dark);
    border-color: var(--raps-yellow);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.export-buttons {
    display: flex;
    gap: 8px;
}

.export-buttons[hidden] {
    display: none;
}

.export-buttons .btn {
    flex: 1;
}

#export-buttons {
    margin-top: 10px;
}

/* Footer */

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 24px;
    border-top: 1px solid var(--cream-warm);
    font-size: 0.7rem;
    color: var(--earth-mid);
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.sidebar-footer a {
    color: var(--earth-warm);
    text-decoration: none;
    border-bottom: 1px solid var(--cream-warm);
    transition: border-color var(--transition);
}

.sidebar-footer a:hover {
    border-color: var(--raps-yellow);
}

.footer-row--pages {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

.footer-row--pages a {
    flex: 1;
    text-align: center;
    padding: 5px 8px;
    font-weight: 600;
    font-size: 0.72rem;
    color: var(--earth-dark);
    background: rgba(232, 200, 32, 0.12);
    border: 1px solid rgba(232, 200, 32, 0.3);
    border-radius: var(--radius-sm);
    border-bottom: none;
}

.footer-row--pages a:hover {
    background: rgba(232, 200, 32, 0.25);
    border-color: var(--raps-yellow);
}

/* Leaflet Popup Styling */

.leaflet-popup-content-wrapper {
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-card) !important;
    font-family: var(--font-body) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 14px 16px !important;
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
}

.leaflet-popup-tip {
    box-shadow: none !important;
}

.popup-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--earth-mid);
    margin-bottom: 2px;
}

.popup-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.popup-distance {
    font-size: 0.75rem;
    color: var(--earth-mid);
    margin-bottom: 8px;
}

.popup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.popup-table td {
    padding: 3px 0;
    border-bottom: 1px solid var(--cream-warm);
}

.popup-table td:last-child {
    text-align: right;
    font-weight: 500;
}

/* NDYI Notice */

.cdse-notice {
    padding: 10px 12px;
    background: var(--cream-warm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--earth-mid);
    line-height: 1.5;
}

/* === Responsive === */

@media (max-width: 640px) {
    :root {
        --sidebar-width: 100vw;
    }

    .sidebar-open .sidebar-toggle {
        left: auto;
        right: 16px;
        top: 16px;
    }

    .sidebar {
        border-right: none;
        border-radius: 0;
    }
}

/* === Info Button (Sidebar Header) === */

.btn-info-header {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--cream-warm);
    border-radius: 50%;
    background: white;
    color: var(--earth-mid);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    transition-property: background, color, border-color, transform, box-shadow;
}

.btn-info-header:hover {
    background: var(--raps-yellow);
    color: var(--earth-dark);
    border-color: var(--raps-yellow);
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(232, 200, 32, 0.2);
}

/* === Info Modal === */

.info-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(42, 33, 24, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

.info-modal-backdrop[hidden] {
    display: none;
}

.info-modal {
    position: relative;
    background: var(--cream);
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(42, 33, 24, 0.3), 0 4px 16px rgba(42, 33, 24, 0.15);
    max-width: 960px;
    width: 100%;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 40px 44px 36px;
    scrollbar-width: thin;
    scrollbar-color: var(--cream-warm) transparent;
    animation: fadeInUp 0.3s ease;
}

.info-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--earth-mid);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    transition-property: background, color;
}

.info-modal-close:hover {
    background: var(--cream-warm);
    color: var(--earth-dark);
}

.info-modal-close:focus {
    outline: none;
}

.info-modal-close:focus-visible {
    outline: 2px solid var(--earth-mid);
    outline-offset: 2px;
}

.info-modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.info-modal-ok {
    min-width: 220px;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.info-modal-experiment {
    background: linear-gradient(135deg, #FFF8E1, #FFF3CC);
    border: 1px solid #E8D9A0;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--earth-dark);
    margin-bottom: 20px;
}

.info-modal-experiment strong {
    color: #B8860B;
}

.info-modal-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--earth-dark);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    padding-right: 28px;
}

.info-modal-intro {
    font-size: 0.95rem;
    color: var(--earth-mid);
    margin-bottom: 24px;
}

/* Three-column card grid */

.info-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.info-card {
    background: white;
    border: 1px solid var(--cream-warm);
    border-radius: var(--radius);
    padding: 20px 18px 16px;
    display: flex;
    flex-direction: column;
}

.info-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.info-card h3 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--earth-dark);
    margin-bottom: 8px;
}

.info-card p {
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--earth-warm);
    margin-bottom: 6px;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-card-map-hint {
    margin-top: auto;
    padding-top: 10px;
    font-size: 0.75rem !important;
    font-weight: 500;
    color: var(--earth-mid) !important;
    border-top: 1px solid var(--cream-warm);
}

.info-section-summary {
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.08) 0%, rgba(90, 140, 60, 0.05) 100%);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--raps-yellow);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--earth-warm);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === Notice Dialog === */

.notice-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(42, 33, 24, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

.notice-backdrop[hidden] {
    display: none;
}

.notice-dialog {
    position: relative;
    background: var(--cream);
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(42, 33, 24, 0.3), 0 4px 16px rgba(42, 33, 24, 0.15);
    max-width: 420px;
    width: 100%;
    padding: 28px 28px 24px;
    animation: fadeInUp 0.3s ease;
    text-align: center;
}

.notice-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--earth-mid);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    transition-property: background, color;
}

.notice-close:hover {
    background: var(--cream-warm);
    color: var(--earth-dark);
}

.notice-title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--earth-dark);
    margin-bottom: 8px;
}

.notice-body {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--earth-warm);
    margin-bottom: 18px;
}

.notice-ok {
    min-width: 100px;
}

.notice-dialog[data-type="error"] .notice-title {
    color: var(--red-late);
}

.notice-dialog[data-type="warning"] .notice-title {
    color: var(--earth-warm);
}

@media (max-width: 800px) {
    .info-modal-backdrop {
        padding: 16px;
    }

    .info-modal-actions {
        margin-top: 14px;
    }

    .info-modal {
        padding: 22px 18px 18px;
        max-height: calc(100dvh - 24px);
    }

    .info-modal-experiment {
        padding: 10px 12px;
        font-size: 0.8rem;
        line-height: 1.45;
        margin-bottom: 14px;
    }

    .info-modal-title {
        font-size: 1.15rem;
        margin-bottom: 2px;
        padding-right: 24px;
    }

    .info-modal-intro {
        font-size: 0.88rem;
        margin-bottom: 16px;
    }

    .info-modal-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 14px;
    }

    .info-card {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 10px;
        row-gap: 6px;
        align-items: center;
        padding: 12px 14px;
    }

    .info-card-icon {
        grid-column: 1;
        grid-row: 1;
        width: 26px;
        height: 26px;
        font-size: 0.9rem;
        margin-bottom: 0;
    }

    .info-card h3 {
        grid-column: 2;
        grid-row: 1;
        font-size: 0.92rem;
        margin-bottom: 0;
    }

    .info-card p,
    .info-card-map-hint {
        grid-column: 1 / -1;
    }

    .info-card p {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .info-card-map-hint {
        padding-top: 8px;
        font-size: 0.72rem !important;
    }

    .info-section-summary {
        padding: 12px 14px;
        font-size: 0.82rem;
        line-height: 1.5;
    }
}

@media (max-width: 600px) {
    .info-modal {
        padding: 18px 14px 14px;
    }

    .info-modal-experiment {
        font-size: 0.75rem;
        padding: 8px 10px;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .info-modal-title {
        font-size: 1.05rem;
        padding-right: 22px;
    }

    .info-modal-intro {
        font-size: 0.82rem;
        margin-bottom: 12px;
    }

    .info-modal-grid {
        gap: 8px;
        margin-bottom: 0;
    }

    .info-card {
        padding: 10px 12px;
        row-gap: 4px;
    }

    .info-card p:not(.info-card-map-hint) {
        display: none;
    }

    .info-card-map-hint {
        padding-top: 0;
        border-top: none;
        font-size: 0.78rem !important;
        grid-column: 1 / -1;
    }

    .info-section-summary {
        display: none;
    }
}

/* === Animations === */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-section {
    animation: fadeInUp 0.4s ease both;
    position: relative;
    z-index: 1;
}

#location-section {
    z-index: 10 !important;
}

.sidebar-section[data-step="1"] { animation-delay: 0.05s; }
.sidebar-section[data-step="2"] { animation-delay: 0.1s; }
.sidebar-section[data-step="3"] { animation-delay: 0.15s; }
.sidebar-section[data-step="4"] { animation-delay: 0.2s; }

/* Field List (erkannte Rapsfelder) */

ul.field-list-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.field-list-items .field-list-item {
    margin: 0;
    padding: 0;
}

button.field-card {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.field-list {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--cream-warm) transparent;
}

.field-card {
    padding: 6px 10px;
    margin-bottom: 3px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--cream-warm);
    cursor: pointer;
    transition: var(--transition);
    transition-property: border-color, box-shadow;
}

.field-card:hover {
    border-color: var(--raps-yellow);
    box-shadow: 0 0 0 2px rgba(232, 200, 32, 0.15);
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.field-area {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--earth-dark);
}

.field-pixels {
    font-size: 0.7rem;
    color: var(--earth-mid);
}

.btn-show-all {
    width: 100%;
    margin-top: 8px;
    font-size: 0.75rem;
}

.field-bar {
    height: 3px;
    background: var(--cream-warm);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.field-bar-fill {
    height: 100%;
    background: var(--raps-yellow);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* === Timeline Slider === */

.timeline {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 400;
    background: linear-gradient(to top, rgba(42, 33, 24, 0.92) 0%, rgba(42, 33, 24, 0.75) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 24px 14px;
    transform: translateY(100%);
    transition: transform var(--transition);
}

.timeline.visible {
    transform: translateY(0);
}

.sidebar-open .timeline {
    left: var(--sidebar-width);
}

/* Timeline hint tooltip */

.timeline-hint {
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--cream);
    padding: 8px 14px;
    margin-bottom: 6px;
    background: rgba(232, 200, 32, 0.12);
    border: 1px solid rgba(232, 200, 32, 0.2);
    border-radius: var(--radius-sm);
    animation: fadeInUp 0.3s ease;
}

.timeline-hint[hidden] {
    display: none;
}

.timeline-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: rgba(250, 245, 232, 0.6);
    text-align: center;
    margin-bottom: 6px;
    height: 16px;
    transition: color 0.15s;
}

.timeline-track {
    position: relative;
    height: 32px;
    display: flex;
    align-items: center;
    /* Reserve Platz unterhalb für das Monats-Label, sonst überlappen große
     * Dots (bis zu 30 px) mit dem Text. */
    margin-bottom: 18px;
}

.timeline-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: rgba(250, 245, 232, 0.15);
    transform: translateY(-50%);
}

.timeline-dot {
    --dot-size: 10px;
    --clear-pct: 100%;
    position: absolute;
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background: conic-gradient(
        rgba(232, 200, 32, 0.75) 0% var(--clear-pct),
        rgba(160, 160, 160, 0.35) var(--clear-pct) 100%
    );
    border: 2px solid rgba(250, 245, 232, 0.3);
    transform: translate(-50%, -50%);
    top: 50%;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 2;
}

.timeline-dot.no-area {
    background: conic-gradient(
        rgba(232, 200, 32, 0.3) 0% var(--clear-pct),
        rgba(160, 160, 160, 0.18) var(--clear-pct) 100%
    );
    border-style: dashed;
}

/* .partial: Szene mit teilweiser Satellitenabdeckung. Gleiche Kreis-Form
 * wie die anderen, dezenter innerer Ring als visuelles Signal. */
.timeline-dot.partial {
    box-shadow: inset 0 0 0 2px rgba(250, 245, 232, 0.45);
}

.timeline-dot:hover {
    background: conic-gradient(
        var(--raps-yellow) 0% var(--clear-pct),
        rgba(160, 160, 160, 0.5) var(--clear-pct) 100%
    );
    border-color: var(--cream);
    border-style: solid;
    transform: translate(-50%, -50%) scale(1.25);
    box-shadow: 0 0 10px rgba(232, 200, 32, 0.4);
}

.timeline-dot.active {
    background: conic-gradient(
        var(--raps-yellow) 0% var(--clear-pct),
        rgba(160, 160, 160, 0.5) var(--clear-pct) 100%
    );
    border: 3px solid var(--cream);
    width: calc(var(--dot-size) + 8px);
    height: calc(var(--dot-size) + 8px);
    /* Äußerer Ring (outline statt box-shadow-Glow) plus weicher Glow dahinter:
     * macht die Auswahl auf jeder Track-Position unübersehbar. */
    outline: 2px solid var(--raps-yellow);
    outline-offset: 2px;
    box-shadow: 0 0 20px rgba(232, 200, 32, 0.65);
    z-index: 3;
}

/* Partial-Indikator darf die Active-Hervorhebung nicht übertönen */
.timeline-dot.active.partial {
    box-shadow: 0 0 20px rgba(232, 200, 32, 0.65),
                inset 0 0 0 2px rgba(250, 245, 232, 0.45);
}

.timeline-dot.loading {
    animation: dotPulse 1s infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232, 200, 32, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(232, 200, 32, 0); }
}

.timeline-month {
    position: absolute;
    top: calc(100% + 2px);
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: rgba(250, 245, 232, 0.3);
    transform: translateX(-50%);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    pointer-events: none;
}

.coverage-warning {
    font-size: 0.75rem;
    color: var(--earth-dark);
    padding: 4px 8px;
    background: rgba(255, 165, 0, 0.15);
    border-radius: 4px;
    border-left: 3px solid rgba(255, 165, 0, 0.5);
}

.partial-badge {
    color: orange;
    font-weight: 500;
}

/* === Prose Pages (Impressum, Datenschutz, Landingpages) === */

body.page-prose {
    overflow-y: auto;
    height: auto;
}

/* --- Page Brand Header (shared across all prose pages) --- */

.page-header {
    border-bottom: 1px solid var(--cream-warm);
    background:
        radial-gradient(ellipse at 80% 20%, rgba(232, 200, 32, 0.12) 0%, transparent 60%),
        var(--cream);
}

.page-brand {
    max-width: 42rem;
    margin: 0 auto;
    padding: 16px 1.5rem;
}

.page-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.page-brand-link:hover {
    text-decoration: none;
}

.page-brand-title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--earth-dark);
}

.page-header .poc-banner {
    max-width: 42rem;
    margin: 0 auto;
    border-bottom: none;
    border-top: 1px solid var(--cream-warm);
}

.prose-page {
    max-width: 42rem;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.prose-page h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--earth-dark);
}

.prose-page .prose-subtitle {
    font-size: 0.85rem;
    color: var(--earth-mid);
    margin-bottom: 2rem;
}

.prose-page h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--earth-dark);
}

.prose-page p,
.prose-page ul {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--earth-warm);
    margin-bottom: 0.75rem;
}

.prose-page ul {
    padding-left: 1.25rem;
}

.prose-page a {
    color: var(--earth-dark);
    text-decoration: underline;
    text-decoration-color: var(--raps-yellow);
    text-underline-offset: 2px;
    transition: text-decoration-color var(--transition);
}

.prose-page a:hover {
    text-decoration-color: var(--earth-dark);
}

.prose-page .back-link {
    display: inline-block;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--earth-mid);
    border-bottom: 1px solid var(--cream-warm);
}

.prose-page .back-link:hover {
    color: var(--earth-dark);
    border-color: var(--raps-yellow);
}

/* --- Prose: Badge / SH-Hinweis --- */

.prose-badge {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--earth-mid);
    background: var(--cream-warm);
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    margin-bottom: 1.5rem;
}

/* --- Prose: CTA Button --- */

.prose-cta {
    margin-top: 2rem;
    text-align: center;
}

.cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--raps-yellow);
    color: var(--earth-dark);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
}

.cta-button:hover {
    background: var(--raps-gold);
    transform: translateY(-1px);
    text-decoration: none;
}

/* --- Prose: Definition Lists --- */

.prose-page dt {
    font-weight: 600;
    color: var(--earth-dark);
    margin-top: 1rem;
}

.prose-page dd {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--earth-warm);
    margin-left: 0;
    margin-bottom: 0.5rem;
}

/* --- Prose: Details/Summary (FAQ) --- */

.prose-page details {
    border: 1px solid var(--cream-warm);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.prose-page summary {
    font-weight: 600;
    color: var(--earth-dark);
    cursor: pointer;
    font-size: 0.95rem;
}

.prose-page details[open] summary {
    margin-bottom: 0.5rem;
}

/* --- Blog --- */

.blog-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.blog-list-item a {
    display: block;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: 1px solid var(--cream-warm);
    transition: var(--transition);
}

.blog-list-item a:hover {
    border-color: var(--raps-yellow);
    background: rgba(232, 200, 32, 0.06);
}

.blog-date {
    display: block;
    font-size: 0.8rem;
    color: var(--earth-mid);
    margin-bottom: 0.15rem;
}

.blog-list-title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--earth-dark);
    margin-bottom: 0.25rem;
}

.blog-list-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--earth-mid);
    line-height: 1.5;
}

.blog-article h2 {
    margin-top: 2.5rem;
}

.blog-article h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.blog-article pre {
    background: var(--earth-dark);
    color: var(--cream);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 1rem 0;
}

.blog-article code {
    font-size: 0.88em;
    background: var(--cream-warm);
    padding: 0.15em 0.35em;
    border-radius: 3px;
}

.blog-article pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.blog-article blockquote {
    border-left: 3px solid var(--raps-yellow);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    color: var(--earth-warm);
    font-style: italic;
}

.blog-article img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.blog-article hr {
    border: none;
    border-top: 1px solid var(--cream-warm);
    margin: 2rem 0;
}

/* --- Rapsometer Page: Hero --- */

.rapsometer-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--cream-warm);
    border-radius: 12px;
}

.rapsometer-hero-img {
    flex-shrink: 0;
}

.rapsometer-hero-text {
    margin: 0;
}

/* --- Rapsometer Page: Level Grid --- */

.rapsometer-levels {
    display: grid;
    gap: 1rem;
}

.rapsometer-level {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--cream-warm);
}

.rapsometer-level h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--earth-dark);
    margin: 0 0 0.25rem;
}

.rapsometer-level p {
    font-size: 0.85rem;
    margin: 0;
}

/* --- RapsRoute Page: Modes --- */

.rapsroute-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rapsroute-mode {
    padding: 1rem;
    border-radius: 8px;
    background: var(--cream-warm);
}

.rapsroute-mode h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--earth-dark);
    margin: 0 0 0.5rem;
}

.rapsroute-mode p {
    font-size: 0.85rem;
    margin: 0;
}

/* --- RapsRoute Page: Steps --- */

.rapsroute-steps {
    padding-left: 1.5rem;
}

.rapsroute-steps li {
    margin-bottom: 1rem;
}

/* --- Share Buttons --- */

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--cream-warm);
}

.share-label {
    font-size: 0.85rem;
    color: var(--earth-mid);
}

.share-btn {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--cream-warm);
    background: none;
    color: var(--earth-dark);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition), border-color var(--transition);
}

.share-btn:hover {
    background: var(--cream-warm);
    border-color: var(--earth-mid);
    text-decoration: none;
}

/* --- Responsive (small screens) --- */

@media (max-width: 480px) {
    .rapsometer-hero {
        flex-direction: column;
        text-align: center;
    }

    .rapsometer-level {
        flex-direction: column;
        text-align: center;
    }

    .rapsroute-modes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sidebar-tabs {
        padding: 0 16px;
    }

    .step-badge {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }

    .sidebar-section[data-step] .section-content,
    .sidebar-section[data-step] .step-summary,
    .sidebar-section[data-step] .step-desc {
        margin-left: 28px;
    }

    .tab-pane .sidebar-section[data-step="1"]::after,
    .tab-pane .sidebar-section[data-step="2"]::after,
    .tab-pane .sidebar-section[data-step="3"]::after {
        left: 25px;
        top: 32px;
        bottom: -8px;
    }

    .tab-pane .sidebar-section[data-step="2"]::before,
    .tab-pane .sidebar-section[data-step="3"]::before,
    .tab-pane .sidebar-section[data-step="4"]::before {
        left: 21px;
        top: 6px;
    }

    .tab-pane .sidebar-section[data-step] {
        padding: 12px 16px;
    }

    .timeline {
        padding: 8px 16px 12px;
    }

    .timeline-hint {
        font-size: 0.68rem;
        padding: 6px 12px;
    }

    .sidebar-open .timeline {
        left: 0;
    }
}

/* === RapsRoute Teaser === */

.rapsroute-teaser {
    position: fixed;
    bottom: 100px;
    left: 12px;
    z-index: 800;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    filter: drop-shadow(0 4px 16px rgba(12, 21, 37, 0.5));
}

.rapsroute-teaser:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 6px 24px rgba(12, 21, 37, 0.65));
}

.rapsroute-teaser-svg {
    width: 300px;
    height: 64px;
    display: block;
}

.rapsroute-teaser[hidden] {
    display: none;
}

@media (max-width: 640px) {
    .rapsroute-teaser-svg {
        width: 200px;
        height: 44px;
    }
    .sidebar-open .rapsroute-teaser {
        display: none;
    }
}

/* Tablet/Notebook mit offener Sidebar: schmaler Map-Bereich → kleinere Bottom-Controls */
@media (min-width: 641px) and (max-width: 1000px) {
    .sidebar-open .rapsroute-teaser-svg {
        width: 200px;
        height: 44px;
    }
    .sidebar-open .rapsometer {
        width: 80px;
        height: 92px;
    }
    .sidebar-open .rapsometer.hero {
        width: 120px;
        height: 138px;
    }
}

/* === Rapsometer === */

.rapsometer {
    position: fixed;
    bottom: 100px;
    right: 12px;
    z-index: 450;
    width: 120px;
    height: 138px;
    cursor: pointer;
    filter: drop-shadow(0 4px 16px rgba(12, 21, 37, 0.5));
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                bottom 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                right 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.2s ease;
}

.rapsometer.hero {
    width: 200px;
    height: 230px;
    filter: drop-shadow(0 8px 32px rgba(12, 21, 37, 0.6));
}

.rapsometer:not(.hero):hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 24px rgba(12, 21, 37, 0.65));
}

.rapsometer[hidden] {
    display: none;
}

.rapsometer-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 17px;
}

@media (max-width: 640px) {
    .rapsometer {
        width: 60px;
        height: 69px;
    }

    .rapsometer.hero {
        width: 100px;
        height: 115px;
    }

    .rapsometer-img {
        border-radius: 9px;
    }

    .sidebar-open .rapsometer {
        display: none;
    }
}

/* === Subscribe Prompt === */

.subscribe-prompt {
    margin: 0 0 4px;
    padding: 14px 20px 14px 16px;
    border-left: 3px solid var(--raps-yellow);
    background: var(--cream-warm);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.subscribe-prompt[hidden] {
    display: none;
}

.subscribe-prompt-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--earth-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.subscribe-bell {
    flex-shrink: 0;
    color: var(--earth-warm);
}

.subscribe-form {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.subscribe-form input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid var(--cream-warm);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--earth-dark);
    background: #fff;
    outline: none;
    transition: border-color var(--transition);
}

.subscribe-form input[type="email"]:focus {
    border-color: var(--raps-yellow);
}

.subscribe-hint {
    font-size: 0.72rem;
    color: var(--earth-mid);
    line-height: 1.4;
}

.field-respect-hint {
    margin: 16px 12px 8px;
    padding: 10px 12px;
    border-left: 3px solid var(--green-field);
    background: rgba(90, 140, 60, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--earth-warm);
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.field-respect-icon {
    flex: 0 0 auto;
    font-size: 0.95rem;
    line-height: 1.2;
}

/* === Conflict Table (Bestätigungsseite) === */

.conflict-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.9rem;
}

.conflict-table th,
.conflict-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--cream-warm);
}

.conflict-table th {
    font-weight: 600;
    color: var(--earth-dark);
}

.conflict-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--raps-yellow);
    color: var(--earth-dark);
    text-decoration: none;
    transition: background var(--transition);
}

.btn-primary:hover {
    background: var(--raps-yellow-glow);
}

/* === RapsRoute === */

.route-offseason-banner {
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.12), rgba(232, 200, 32, 0.04));
    border-bottom: 1px solid var(--cream-warm);
    border-left: 3px solid var(--raps-yellow);
    margin: 0 0 8px;
}

.route-offseason-banner p {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--earth-warm);
    margin-bottom: 10px;
}

.route-offseason-banner strong {
    color: var(--earth-dark);
}

.offseason-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.route-offseason-cta {
    width: 100%;
    font-size: 0.78rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--earth-warm);
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 0;
}

.btn-text:hover {
    color: var(--earth-dark);
}

/* Route Toggle Buttons (Mode, Vehicle, Detour, Duration) */

.route-toggle-group {
    border: none;
    margin-bottom: 10px;
}

.route-toggle-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--earth-mid);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.route-toggle {
    display: flex;
    gap: 4px;
}

.route-toggle-btn {
    flex: 1;
    padding: 7px 8px;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid var(--cream-warm);
    background: transparent;
    color: var(--earth-mid);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    transition-property: background, border-color, color;
}

.route-toggle-btn:hover {
    border-color: var(--raps-yellow);
    color: var(--earth-dark);
}

.route-toggle-btn.active {
    background: var(--raps-yellow);
    border-color: var(--raps-yellow);
    color: var(--earth-dark);
    font-weight: 600;
}

.route-toggle-hint {
    font-size: 0.65rem;
    color: var(--earth-mid);
    margin-top: 4px;
    opacity: 0.7;
}

.route-option {
    margin-bottom: 10px;
}

.route-option label {
    font-size: 0.76rem;
    color: var(--earth-warm);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.route-option input[type="checkbox"] {
    accent-color: var(--raps-yellow);
}

/* Route Location Inputs */

.route-location-group {
    margin-bottom: 10px;
}

.route-location-label {
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    display: block;
}

.route-location-label--start {
    color: var(--green-field);
}

.route-location-label--end {
    color: var(--red-late);
}

.route-location-display {
    font-size: 0.72rem;
    color: var(--earth-mid);
    margin-top: 2px;
}

.route-location-name {
    font-weight: 500;
    color: var(--earth-dark);
}

.route-location-coords {
    font-size: 0.65rem;
    margin-left: 4px;
    opacity: 0.6;
}

.route-map-hint {
    font-size: 0.72rem;
    color: var(--earth-mid);
    padding: 8px 12px;
    border-left: 2px solid var(--raps-yellow);
    background: rgba(232, 200, 32, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 8px 0 12px;
}

.route-active-input-hint {
    font-size: 0.68rem;
    color: var(--raps-yellow-glow);
    margin-bottom: 8px;
}

.route-calculate-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 0.82rem;
}

.route-calculate-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Route Results */

.route-progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--earth-light, #e8e0d4);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
}

.route-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--raps-gold, #e8c840);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.route-loading-text {
    font-size: 0.82rem;
    color: var(--earth-mid);
    text-align: center;
    margin-top: 8px;
}

.route-bloom-hint {
    padding: 6px 10px;
    background: rgba(232, 200, 32, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 0.68rem;
    color: var(--earth-mid);
}

.route-summary-text {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--earth-mid);
    margin: 8px 0 12px;
}

.route-summary-text strong {
    color: var(--earth-dark);
}

.route-adjust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.btn-adjust {
    padding: 4px 12px;
    font-size: 0.78rem;
    min-width: unset;
}

.route-adjust-label {
    font-size: 0.78rem;
    color: var(--earth-mid);
    min-width: 80px;
    text-align: center;
}

.route-export-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--earth-mid);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.route-export-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 12px;
}

.route-export-buttons .btn {
    font-size: 0.72rem;
    padding: 7px 10px;
    text-align: center;
}

.route-export-hint {
    font-size: 0.65rem;
    color: var(--earth-mid);
    text-align: center;
    margin: 4px 0 8px;
    line-height: 1.3;
}

.route-new-link {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--earth-mid);
    text-decoration: none;
    padding: 4px;
    transition: color var(--transition);
}

.route-new-link:hover {
    color: var(--earth-dark);
}

/* Route CTA in Analyse Step 4 */

.route-cta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--cream-warm);
}

.btn-route-cta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--earth-dark);
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.15), rgba(232, 200, 32, 0.08));
    border: 1px solid rgba(232, 200, 32, 0.3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    transition-property: background, border-color, transform, box-shadow;
}

.btn-route-cta:hover {
    background: linear-gradient(135deg, rgba(232, 200, 32, 0.3), rgba(232, 200, 32, 0.15));
    border-color: var(--raps-yellow);
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn);
}

/* Route Map Markers */

.route-marker-start,
.route-marker-end {
    width: 28px;
    height: 28px;
    border-radius: 50% 50% 50% 0;
    border: 2px solid var(--earth-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-45deg);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.7rem;
    box-shadow: var(--shadow-btn);
}

.route-marker-start {
    background: var(--raps-yellow);
    color: var(--earth-dark);
}

.route-marker-end {
    background: var(--green-field);
    color: white;
}

.route-marker-letter {
    transform: rotate(45deg);
}

/* ===== Screenshot-Einbettungen ===== */

.screenshot {
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
    margin: 0;
}
.screenshot img {
    width: 100%;
    height: auto;
    display: block;
}

/* Layout-Varianten */
.screenshot-inline {
    max-width: 280px;
    margin: .5em 0;
}
.screenshot-wide {
    margin: 2rem 0;
}
.screenshot-breakout {
    margin: 2rem -4rem;
    max-width: calc(100% + 8rem);
}
.screenshot-float-left {
    float: left;
    margin: 0 1.5rem 1rem 0;
    max-width: 45%;
}
.screenshot-float-right {
    float: right;
    margin: 0 0 1rem 1.5rem;
    max-width: 45%;
}

/* Responsive: Breakout + Floats zurücknehmen */
@media (max-width: 768px) {
    .screenshot-breakout {
        margin: 1.5rem 0;
        max-width: 100%;
    }
    .screenshot-float-left,
    .screenshot-float-right {
        float: none;
        max-width: 100%;
        margin: 1.5rem 0;
    }
}

/* ===== Page Footer (Prose Pages) ===== */

.page-footer {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
    border-top: 2px solid var(--raps-yellow);
}

.page-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.25rem 0 1rem;
}

@media (max-width: 480px) {
    .page-footer-nav {
        gap: 0.4rem;
    }
    .page-footer-link {
        padding: 0.35rem 0.7rem;
        font-size: 0.78rem;
    }
}

.page-footer-link {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--earth-dark);
    background: var(--cream);
    border: 1px solid var(--cream-warm);
    border-radius: 6px;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.page-footer-link:hover {
    background: var(--raps-yellow-light);
    border-color: var(--raps-yellow);
    transform: translateY(-1px);
    text-decoration: none;
}

.page-footer-link--current {
    background: var(--raps-yellow);
    border-color: var(--raps-yellow);
    cursor: default;
}

.page-footer-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--earth-mid);
    padding-top: 0.75rem;
    border-top: 1px solid var(--cream-warm);
}

.page-footer-meta a {
    color: var(--earth-mid);
    text-decoration: none;
}

.page-footer-meta a:hover {
    color: var(--earth-dark);
    text-decoration: underline;
}

/* Route-Animation: Bloom-Feld-Pulse */
.bloom-field-pulse path {
    transition: fill-opacity 0.3s ease-out;
}

/* Explorations-Linien: pulsierender Dash-Effekt */
.exploration-line {
    animation: exploration-dash 1.5s linear infinite;
}
@keyframes exploration-dash {
    to { stroke-dashoffset: -40; }
}

/* === Print-Button (Leaflet-Control) — Optik identisch zu Zoom === */

.leaflet-control-print {
    border: none !important;
    box-shadow: var(--shadow-card) !important;
    margin-top: 8px !important;
    margin-right: 12px !important;
    border-radius: var(--radius-sm) !important;
}

.leaflet-control-print a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    background: var(--cream) !important;
    color: var(--earth-dark) !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer;
}

.leaflet-control-print a:hover {
    background: var(--raps-yellow) !important;
    color: var(--earth-dark) !important;
}

.leaflet-control-print a svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* === Print-Overlay (im Bildschirm versteckt, nur Druck sichtbar) === */

#print-overlay {
    display: none;
}

@media print {
    /* Browser-Druck-Layout: A4 quer, knapper Rand */
    @page {
        size: A4 landscape;
        margin: 10mm;
    }

    /* Alle Bedienelemente verstecken */
    .sidebar,
    .sidebar-toggle,
    .timeline,
    .layer-toggles,
    .rapsometer,
    .rapsroute-teaser,
    .donate-strip,
    .poc-banner,
    .leaflet-control-container,
    dialog,
    .notice-backdrop,
    .info-modal-backdrop,
    .donate-modal-backdrop {
        display: none !important;
    }

    html, body {
        background: #fff !important;
    }

    /* WICHTIG: #map wird im Druck NICHT in der Größe verändert.
       Der Browser skaliert den Bildschirm-Map-Bereich (mit dem aktuell
       sichtbaren Ausschnitt) maßstabsgetreu auf die Druckseite —
       dadurch gibt es keine Tile-/Bounds-/Reload-Probleme. */

    /* Karten-Tiles im Druck nicht abdunkeln (Standard-Filter aufheben) */
    .leaflet-tile-pane .leaflet-layer:first-child .leaflet-tile {
        filter: none !important;
    }

    /* Print-Overlay als überlagerte Header/Footer-Streifen */
    #print-overlay {
        display: block;
        position: fixed;
        inset: 0;
        pointer-events: none;
        font-family: var(--font-body);
        color: var(--earth-dark);
        z-index: 9000;
    }

    .print-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 14mm;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 4mm;
        background: rgba(255, 255, 255, 0.92);
        border-bottom: 1px solid #d7cfbf;
    }

    .print-logo {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .print-header-text {
        flex: 1;
        line-height: 1.15;
    }

    .print-title {
        font-family: var(--font-display);
        font-weight: 700;
        font-size: 15pt;
    }

    .print-title .brand-sh {
        color: var(--raps-yellow-dark, #c9a200);
    }

    .print-subtitle {
        font-size: 9pt;
        color: var(--earth-mid);
    }

    .print-url {
        font-size: 10pt;
        font-weight: 600;
        color: var(--earth-mid);
    }

    .print-footer {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        min-height: 18mm;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 4mm;
        padding: 3mm 4mm;
        background: rgba(255, 255, 255, 0.92);
        border-top: 1px solid #d7cfbf;
        font-size: 8.5pt;
        line-height: 1.35;
    }

    .print-meta strong {
        display: block;
        font-size: 7.5pt;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--earth-mid);
        font-weight: 600;
        margin-bottom: 1mm;
    }

    .print-sources {
        grid-column: 1 / -1;
        font-size: 7.5pt;
        color: var(--earth-mid);
        border-top: 1px dotted #d7cfbf;
        padding-top: 1.5mm;
    }

    /* Leaflet-Marker und Tooltips dürfen auf den Druck */
    .leaflet-marker-pane,
    .leaflet-overlay-pane,
    .leaflet-shadow-pane,
    .leaflet-tile-pane {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
