:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --card-bg-elevated: #252525;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-color: #00e676;
    --accent-dim: rgba(0, 230, 118, 0.15);
    --danger-color: #ff5252;
    --warning-color: #ffab40;
    --border-color: #333;
    --border-radius: 12px;
    --spacing: 16px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: var(--spacing);
    font-size: 16px;
    line-height: 1.5;
}

/* ==========================================
   LAYOUT: Desktop Grid
   ========================================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 300px 300px;
    grid-template-areas:
        "header    header    header"
        "status    status    status"
        "visual    visual    visual"
        "route     midcol    rightcol"
        "map       map       map"
        "weather   weather   weather"
        "settings  settings  settings";
    align-items: start;
}

.weather-card {
    grid-area: weather;
}

header {
    grid-area: header;
    text-align: center;
    padding-bottom: 4px;
}

.status-card {
    grid-area: status;
}

.visual-card {
    grid-area: visual;
}

.route-section {
    grid-area: route;
}

.mid-column {
    grid-area: midcol;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.right-column {
    grid-area: rightcol;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-card {
    grid-area: settings;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1 {
    font-size: 1.4rem;
    margin: 0;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.02em;
}

h3 {
    font-size: 1rem;
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

h4 {
    margin: 0;
}

/* ==========================================
   CARDS
   ========================================== */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: var(--spacing);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   STATUS CARD: Progress Bars + Stats
   ========================================== */
.status-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

.progress-bar-container {
    height: 10px;
    background-color: #2a2a2a;
    border-radius: 5px;
    margin-bottom: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 5px;
    transition: width 0.4s ease;
    width: 0%;
}

.elevation-fill {
    background-color: #2979ff;
}

.time-fill {
    background-color: var(--warning-color); /* Orange für die Zeit */
}

.distance-display {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.distance-display:last-child {
    margin-bottom: 0;
}

#current-km,
#current-hm, 
#current-time {
    color: var(--text-primary);
    font-weight: bold;
    font-size: 1.2rem;
}

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

.stat-item {
    background: rgba(255, 255, 255, 0.04);
    padding: 12px 10px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-item .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-item .value {
    font-size: 1.3rem;
    font-weight: bold;
    display: inline-block; 
}

.stat-item .unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-ahead {
    color: var(--accent-color);
}

.status-behind {
    color: var(--danger-color);
}

.status-ready {
    color: var(--text-secondary);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================
   TIMELINE / PROGNOSE
   ========================================== */
.timeline-container {
    position: relative;
    padding: 30px 40px 70px 40px; 
    margin: 10px 0;
}

.timeline-track {
    position: relative;
    height: 6px;
    background-color: #2a2a2a;
    border-radius: 3px;
    width: 100%;
}

.timeline-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background-color: #555;
    border-radius: 50%;
    z-index: 1;
}

.timeline-marker.start {
    background-color: #fff;
    left: 0%;
    z-index: 2;
}

.timeline-marker.finish {
    background-color: #555;
    left: 100%;
    z-index: 2;
}

.timeline-marker.current {
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background-color: var(--accent-color);
    z-index: 3;
    box-shadow: 0 0 10px var(--accent-color);
}

.timeline-marker.break {
    width: 4px;
    height: 8px;
    border-radius: 1px;
    background-color: var(--warning-color);
}

.timeline-marker.past {
    background-color: #444;
}

.marker-label {
    position: absolute;
    font-size: 0.65rem;
    color: #999;
    white-space: nowrap;
    transform: translateX(-50%);
    text-align: center;
    line-height: 1.2;
}

.marker-label.top {
    bottom: 120%;
}

.marker-label.bottom {
    top: 120%;
}

/* Start-Texte linksbündig ab dem Punkt ausrichten */
.timeline-marker.start .marker-label {
    left: 50%;
    transform: translateX(-15px); /* Minimaler Ausgleich für den dicken grünen Balken */
    text-align: left;
}

/* Ziel-Texte rechtsbündig bis zum Punkt ausrichten */
.timeline-marker.finish .marker-label {
    left: auto;
    right: 50%;
    transform: translateX(12px); /* Schiebt die farbigen Striche exakt mittig über den grauen Ziel-Punkt */
    text-align: right;
}

.timeline-marker.start .marker-label.bottom {
    color: #ccc;
}

.projection-stats {
    text-align: center;
    color: var(--text-secondary);
}

.projection-stats small {
    font-size: 0.8rem;
}

/* ==========================================
   TABLES (Route Sections)
   ========================================== */
.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    text-align: left;
    padding: 8px 10px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 10px;
    border-bottom: 1px solid #252525;
}

.data-table tfoot td {
    border-top: 2px solid #444;
    font-weight: bold;
}

.status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #2a2a2a;
    color: #999;
    display: inline-block;
}

.status-badge.done {
    background-color: var(--accent-dim);
    color: var(--accent-color);
}

.status-badge.in-progress {
    background-color: rgba(41, 121, 255, 0.15);
    color: #64b5f6;
}

.section-row.active {
    background-color: rgba(41, 121, 255, 0.05);
}

/* ==========================================
   FORMS & INPUTS
   ========================================== */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

input,
select {
    width: 100%;
    padding: 10px 12px;
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

/* ==========================================
   BUTTONS
   ========================================== */
button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s, transform 0.1s;
}

button:active {
    transform: scale(0.97);
}

.primary-btn {
    background-color: var(--accent-color);
    color: #000;
}

.primary-btn:hover {
    background-color: #00c853;
}

.large-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--accent-color);
    color: #000;
    font-size: 0.95rem;
    margin-bottom: 0;
    border-radius: 10px;
}

.large-btn:hover {
    background-color: #00c853;
}

.full-width-btn {
    width: 100%;
}

.outline-btn {
    background-color: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
}

.outline-btn:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.danger-btn {
    background-color: transparent;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    width: 100%;
    margin-top: 10px;
}

.danger-btn:hover {
    background-color: rgba(255, 82, 82, 0.1);
}

.danger-btn.small {
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* ==========================================
   CHECKPOINT LOG LIST
   ========================================== */
.log-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.log-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 6px 0;
    border-bottom: 1px solid #2a2a2a;
    font-size: 0.82rem;
    color: #e0e0e0;
    gap: 6px;
}

.log-item:last-child {
    border-bottom: none;
}

.log-time {
    font-weight: bold;
    margin-left: auto;
    color: var(--accent-color);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.log-dist {
    font-weight: bold;
    margin-left: auto;
    color: var(--accent-color);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.hidden {
    display: none;
}
/* ==========================================
   TYPE SELECTOR (Segmented Control)
   ========================================== */
.type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}

.type-btn {
    padding: 8px 6px;
    font-size: 0.75rem;
    background-color: #2a2a2a;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.15s;
}

.type-btn:hover {
    background-color: #333;
    color: var(--text-primary);
}

/* 1. FAHRT-AKTIONEN (Weiter, Wach, Checkpoint, Etappe) -> GRÜN */
.type-btn.active,
.type-btn[data-type="checkpoint"].active,
.type-btn[data-type="pause_end"].active,
.type-btn[data-type="sleep_end"].active,
.type-btn[data-type="section_complete"].active {
    background-color: var(--accent-color) !important;
    color: #000 !important;
    border-color: var(--accent-color) !important;
}

/* 2. UNTERBRECHUNGEN (Pause, Schlaf) -> ORANGE */
.type-btn[data-type="pause_start"].active,
.type-btn[data-type="sleep_start"].active {
    background-color: var(--warning-color) !important;
    color: #000 !important;
    border-color: var(--warning-color) !important;
}

/* ==========================================
   LOG ENTRY TYPES
   ========================================== */
.log-icon {
    font-size: 0.75rem;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.log-icon-pause {
    color: var(--warning-color);
}

.log-icon-resume {
    color: var(--accent-color);
}

.log-icon-section {
    color: var(--accent-color);
    font-weight: bold;
}

.log-type-label {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
    flex-shrink: 0;
}

.log-type-label.pause {
    background-color: rgba(255, 171, 64, 0.15);
    color: var(--warning-color);
}

.log-type-label.resume {
    background-color: var(--accent-dim);
    color: var(--accent-color);
}

.log-type-label.section {
    background-color: rgba(41, 121, 255, 0.15);
    color: #64b5f6;
}

/* ==========================================
   PAUSE STATUS
   ========================================== */
.status-paused {
    color: var(--warning-color);
    animation: pulse-pause 2s ease-in-out infinite;
}

.status-moving {
    color: var(--accent-color);
}

@keyframes pulse-pause {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==========================================
   TIMELINE PROGRESS (IST-Bereich)
   ========================================== */
.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 230, 118, 0.25), rgba(0, 230, 118, 0.08));
    border-radius: 3px 0 0 3px;
}

.timeline-marker.break.real {
    width: 6px;
    height: 10px;
    border-radius: 2px;
    background-color: var(--warning-color);
    z-index: 2;
}

.timeline-marker.break.real.open {
    animation: pulse-pause 2s ease-in-out infinite;
}

.timeline-marker.break.projected {
    width: 4px;
    height: 8px;
    border-radius: 1px;
    background-color: #555;
    opacity: 0.7;
}

/* ==========================================
   SECTION BOUNDARY MARKERS (Abschnittsmarker)
   ========================================== */
.timeline-marker.section-boundary {
    width: 2px;
    height: 20px;
    border-radius: 1px;
    background-color: #888;
    z-index: 2;
}

.timeline-marker.section-boundary.past {
    background-color: #444;
}

/* ==========================================
   ZIELZEIT-MARKER (Rot, linear)
   ========================================== */
.timeline-marker.target-linear {
    width: 2px;
    height: 22px;
    border-radius: 1px;
    background: repeating-linear-gradient(
        to bottom,
        #ff5252 0px,
        #ff5252 3px,
        transparent 3px,
        transparent 6px
    );
    z-index: 2;
    opacity: 0.9;
}

/* ==========================================
   HOCHRECHNUNG-MARKER (Blau, per Etappe)
   ========================================== */
.timeline-marker.target-plan {
    width: 2px;
    height: 22px;
    border-radius: 1px;
    background: repeating-linear-gradient(
        to bottom,
        #64b5f6 0px,
        #64b5f6 3px,
        transparent 3px,
        transparent 6px
    );
    z-index: 2;
    opacity: 0.9;
}

/* ==========================================
   READONLY INPUT STYLE
   ========================================== */
input[readonly] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================
   TEAM LOG
   ========================================== */
.team-btn {
    background-color: #2979ff;
}

.team-btn:hover {
    background-color: #2262cc;
}

.team-log-item {
    flex-direction: column;
    align-items: stretch;
}

.team-log-line1 {
    display: flex;
    align-items: center;
    gap: 6px;
}

.team-log-del {
    margin-left: auto !important;
    flex-shrink: 0;
}

.team-log-line1 .log-dist {
    margin-left: 0;
}

.team-log-line2 {
    font-size: 0.82rem;
    color: #ccc;
    line-height: 1.4;
    word-break: break-word;
}

.team-input-card .log-form-grid,
.team-section .log-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.full-width {
    grid-column: 1 / -1;
}

.team-history-heading {
    margin-top: 16px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ==========================================
   SETTINGS (collapsible)
   ========================================== */
.settings-card {
    border: 1px solid #2a2a2a;
    background-color: var(--card-bg);
}

.settings-toggle {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 4px 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-toggle::-webkit-details-marker {
    display: none;
}

.settings-toggle::before {
    content: "\25B6";
    font-size: 0.65rem;
    transition: transform 0.2s;
    display: inline-block;
}

details[open] .settings-toggle::before {
    transform: rotate(90deg);
}

.settings-content {
    padding-top: 16px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* ==========================================
   RESPONSIVE: Tablet (<=1024px)
   ========================================== */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "header    header"
            "status    status"
            "visual    visual"
            "route     route"
            "midcol    rightcol"
            "map       map"
            "weather   weather"
            "settings  settings";
    }

    .status-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "status"
            "visual"
            "midcol"
            "rightcol"
            "route"
            "map"
            "weather"
            "settings";
    }
}
/* Mini Progress Bars für Stats */
.mini-progress-container {
    height: 6px;
    background-color: #2a2a2a;
    border-radius: 3px;
    margin: 8px 0 4px 0;
    overflow: hidden;
    width: 100%;
}
.mini-progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}
#time-mini-bar {
    background-color: #64b5f6; /* Blau zur Unterscheidung */
}
.mini-progress-text {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}
/* ==========================================
   RESPONSIVE: Mobile (<=600px)
   ========================================== */
@media (max-width: 600px) {
    body {
        padding: 8px;
        font-size: 15px;
    }

    .container {
        gap: 10px;
    }

    .card {
        padding: 12px;
        border-radius: 10px;
    }

    h1 {
        font-size: 1.15rem;
    }

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

    .stat-item {
        padding: 10px 6px;
    }

    .stat-item .value {
        font-size: 1.1rem;
    }

    .stat-item .label {
        font-size: 0.7rem;
    }

    .timeline-container {
        padding: 24px 30px 70px 30px;    
    }

    .team-input-card .log-form-grid,
    .team-section .log-form-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.82rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }

    .type-selector {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }

    .type-btn {
        font-size: 0.7rem;
        padding: 6px 4px;
    }
}
/* ==========================================
   MOBILE OPTIMIERUNG (Anti-Zoom Fix)
   ========================================== */
html, body {
    max-width: 100vw;
    overflow-x: hidden; /* Verhindert horizontales Scrollen der gesamten Seite */
}

.card {
    min-width: 0; /* Zwingt Grid-Elemente, sich dem Bildschirm anzupassen */
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Weiches Wischen auf dem iPhone */
    padding-bottom: 10px; /* Platz für den Scrollbalken */
}

/* Platz für den Logout-Button auf kleinen Displays machen */
@media (max-width: 600px) {
    header {
        padding-top: 24px; 
    }
    #logout-btn {
        top: -10px;
        right: 0;
    }
    .timeline-track {
        min-width: 500px; /* Zwingt den Zeitstrahl auf dem Handy in eine wischbare Breite */
    }
    .timeline-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 30px;
    }
}
.map-card {
    grid-area: map;
}

/* iOS-Style Toggle Schalter */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #2a2a2a; transition: .4s; border-radius: 24px; border: 1px solid #444; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: #999; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-dim); border-color: var(--accent-color); }
input:checked + .slider:before { transform: translateX(20px); background-color: var(--accent-color); }

#map { z-index: 1; } /* Verhindert, dass die Karte über Dropdowns rutscht */


/* =========================================================
   ULTIMATIVE FORM-INPUT NORMALISIERUNG (Höhen-Fix für Datum)
   ========================================================= */

/* Wir zwingen alle betroffenen Input-Arten auf exakt dieselbe Basis */
input[type="datetime-local"],
input[type="number"],
input[type="text"],
select {
    display: block !important;
    width: 100% !important;
    height: 44px !important; /* Exakt gleiche, feste Höhe für alle */
    min-height: 44px !important;
    max-height: 44px !important;
    box-sizing: border-box !important;
    
    /* Wir überschreiben das Padding minimal, damit es in die 44px Höhe passt */
    padding: 10px 12px !important;
    margin: 0 !important;
    
    background-color: #2a2a2a !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    
    font-family: inherit !important;
    font-size: 16px !important; /* 16px verhindert iOS Auto-Zoom */
    line-height: normal !important;
    
    appearance: none !important;
    -webkit-appearance: none !important;
}

/* Speziell für das Datums-Icon (Kalender) in Chrome/Safari/Edge */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1); /* Macht das Icon hell */
    cursor: pointer;
    margin: 0;
    padding: 0;
}

/* Verhindert das Aufblähen durch Browser-eigene Pfeile bei Nummernfeldern */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    height: auto;
    margin: 0;
}

/* Container-Schutz gegen Überlauf und Flexbox-Verzerrung */
#entry-form > div,
#team-log-form > div {
    max-width: 100%;
    overflow-x: hidden;
}

/* Stellt sicher, dass Felder, die nebeneinander liegen, unten bündig abschließen */
div[style*="display: flex"] {
    align-items: flex-end !important;
}

/* =========================================================
   TIMELINE ÜBERLAGERUNGS-FIX V3 (Minimalistisch & Aufgeräumt)
   ========================================================= */

/* Basis-Ebene für alle Marker */
.timeline-marker {
    z-index: 10;
    transition: z-index 0.2s ease;
}

/* Hover-Effekt: Wichtige Dinge beim Antippen nach vorne holen */
.timeline-marker:hover,
.timeline-marker:active {
    z-index: 100 !important;
}

/* =========================================
   1. START, ZIEL & ETAPPEN (Nackter Text)
   ========================================= */
.start .marker-label,
.finish .marker-label,
.section-boundary .marker-label {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    text-shadow: 1px 1px 2px black, -1px -1px 2px black; /* Sichert Lesbarkeit ohne Box */
    white-space: nowrap;
}

/* =========================================
   2. SOLL & PLAN (Labels komplett weg)
   ========================================= */
.target-linear .marker-label,
.target-plan .marker-label {
    display: none !important; /* Blendet die Texte komplett aus */
}

/* =========================================
   3. PAUSEN & SCHLAF (Kärtchen, nach unten)
   ========================================= */
.timeline-marker.break .marker-label.bottom {
    background-color: var(--card-bg, #2c2c3e) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    border: 1px solid var(--border-color, #444) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6) !important;
    text-shadow: none !important; /* Im Kärtchen brauchen wir keinen Text-Schatten */
    white-space: nowrap;
    
    /* Massiv nach unten versetzen, aus der Gefahrenzone der Uhrzeiten */
    top: 40px !important; 
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 0 !important;
    z-index: 20;
}

/* Dezenter Stiel für Pausen/Schlaf zur Timeline */
.timeline-marker.break::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%; 
    width: 1px;
    height: 40px; /* Verbindet die Timeline mit dem Kärtchen */
    background-color: var(--text-secondary, #888);
    transform: translateX(-50%);
    z-index: -1;
    opacity: 0.5;
}

/* =========================================
   ZIEL-ZEITEN (Rot, Blau, Grün) VERSATZ
   ========================================= */
.timeline-marker.finish .marker-label.bottom {
    margin-top: 16px !important; /* Schiebt den kompletten Block nach unten weg von der Linie */
    line-height: 1.8 !important; /* Gibt den drei Zeiten untereinander etwas mehr Luft */
}