.timetable-container {
    --timeline-location-width: 100px;
    --tt-accent: #06b6d4;
    --tt-panel: #0f172a;
    --tt-panel-alt: #111827;
    --tt-text: #e2e8f0;
    --tt-muted: #94a3b8;
    --tt-bg-image: none;
    background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.94)), var(--tt-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 14px;
    padding: 0.35rem;
}

.timeline-shell {
    border: 1px solid #1f2937;
    border-radius: 12px;
    background: var(--tt-panel);
}

.timeline-scroll {
    overflow-x: auto;
}

.timeline-board {
    min-width: 980px;
}

.timeline-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: var(--timeline-location-width) 1fr;
    background: var(--tt-panel-alt);
    border-bottom: 1px solid #1f2937;
}

.timeline-location-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--tt-text);
    text-transform: uppercase;
    border-right: 1px solid #1f2937;
}

.timeline-axis {
    position: relative;
    min-height: 44px;
}

.timeline-hour-marker {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--tt-muted);
    white-space: nowrap;
}

.timeline-hour-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 18px;
    width: 1px;
    height: 22px;
    background: rgba(71, 85, 105, 0.6);
}

.timeline-now-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--tt-accent);
}

.timeline-now-line span {
    position: absolute;
    top: 0;
    left: 4px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: var(--tt-accent);
}

.timeline-row {
    display: grid;
    grid-template-columns: var(--timeline-location-width) 1fr;
    min-height: 112px;
    border-bottom: 1px solid #1f2937;
}

.timeline-location-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-left: 4px solid var(--tt-accent);
    border-right: 1px solid #1f2937;
    background: var(--tt-panel-alt);
}

.timeline-location-icon {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--tt-text);
    font-size: 1.95rem;
    flex-shrink: 0;
    overflow: visible;
}

.timeline-location-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.timeline-location-name {
    color: var(--tt-text);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
}

.timeline-track {
    position: relative;
    min-height: 78px;
    padding: 0.45rem 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.9));
}

.timeline-track-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(71, 85, 105, 0.45);
}

.timeline-event-tile {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 62px;
    border-radius: 10px;
    border: 1px solid var(--tt-accent);
    padding: 0.45rem 0.55rem;
    text-align: left;
    backdrop-filter: blur(2px);
    overflow: hidden;
    min-width: 56px;
}

.timeline-event-tile.is-cancelled {
    opacity: 0.45;
    text-decoration: line-through;
}

.timeline-event-tile.is-live {
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.85);
}

.timeline-event-title {
    display: block;
    color: var(--tt-text);
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.15;
    margin-bottom: 0.3rem;
}

.timeline-event-time {
    display: block;
    color: var(--tt-muted);
    font-size: 0.7rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Light mode overrides — timetable defaults to dark festival theme */
:root:not(.dark) .timetable-container {
    --tt-panel: #f8fafc;
    --tt-panel-alt: #f1f5f9;
    --tt-text: #1e293b;
    --tt-muted: #64748b;
    background-image: none;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
}

:root:not(.dark) .timeline-shell {
    border-color: #e2e8f0;
    background: var(--tt-panel);
}

:root:not(.dark) .timeline-header {
    background: #e2e8f0;
    border-bottom-color: #cbd5e1;
}

:root:not(.dark) .timeline-hour-marker {
    border-color: #cbd5e1;
    color: #64748b;
}

:root:not(.dark) .timeline-location-header {
    background: var(--tt-panel-alt);
    color: var(--tt-text);
    border-right-color: #e2e8f0;
}

:root:not(.dark) .timeline-track {
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.97), rgba(248, 250, 252, 0.95));
}

:root:not(.dark) .timeline-track-line {
    background: rgba(148, 163, 184, 0.4);
}

:root:not(.dark) .timeline-row {
    border-bottom-color: #e2e8f0;
}

:root:not(.dark) .timeline-location-cell {
    border-right-color: #e2e8f0;
    background: var(--tt-panel-alt);
}

:root:not(.dark) .timeline-shell {
    border-color: #e2e8f0;
}

@media (max-width: 768px) {
    .timetable-container {
        --timeline-location-width: 100px;
    }

    .timeline-board {
        min-width: 860px;
    }

    .timeline-event-tile {
        height: 56px;
    }
}

