html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #eef2f7;
    color: #202124;
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.meta-panel {
    background: #fff;
    border-top: 1px solid #d9dee8;
    box-sizing: border-box;
    padding: 12px 16px;
    z-index: 2;
}

#summary {
    color: #5f6368;
    font-size: 13px;
    margin: 8px 0 0;
}

#route-meta {
    color: #5f6368;
    font-size: 12px;
    margin: 4px 0 0;
}

.timeline-controls {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 90px minmax(160px, 1fr) minmax(150px, 220px) minmax(240px, 380px);
}

#play-pause {
    background: #2d2d56;
    border: 0;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-weight: 700;
    padding: 9px 14px;
    width: 100%;
}

.timeline-track {
    min-width: 0;
    padding-top: 24px;
    position: relative;
}

#timeline {
    width: 100%;
}

#timeline-tooltip {
    background: #202124;
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    left: 0;
    padding: 4px 7px;
    pointer-events: none;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

#timeline-tooltip::after {
    border: 5px solid transparent;
    border-top-color: #202124;
    content: '';
    left: 50%;
    position: absolute;
    top: 100%;
    transform: translateX(-50%);
}

.speed-control {
    align-items: center;
    color: #5f6368;
    display: grid;
    font-size: 12px;
    gap: 8px;
    grid-template-columns: auto minmax(80px, 1fr) 32px;
}

#speed {
    width: 100%;
}

#speed-label {
    color: #202124;
    font-weight: 700;
    text-align: right;
}

#current-stop {
    color: #202124;
    font-size: 14px;
    line-height: 1.4;
}

#current-stop span {
    color: #5f6368;
    display: block;
    font-size: 13px;
    margin-top: 4px;
}

#map {
    flex: 1;
    min-height: 0;
}

.flight-line {
    animation: flightDash 1.2s linear infinite;
}

.current-dot-marker {
    background: #111827;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

.stop-marker {
    background: #2d2d56;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.latest-marker {
    background: #dc2626;
}

.current-marker {
    background: #f97316;
}

@keyframes flightDash {
    to {
        stroke-dashoffset: -24;
    }
}

@media (max-width: 760px) {
    .timeline-controls {
        grid-template-columns: 1fr;
    }

    #map {
        min-height: 62vh;
    }
}
