:root {
            /* Craft palette */
            --craft-purple: #2D1B69;
            --craft-magenta: #E91E8C;
            --craft-cyan: #00D4E5;
            --craft-green: #7ED321;
            --craft-yellow: #F5A623;
            --craft-blue: #4A90D9;

            /* Legacy aliases (keep existing CSS working) */
            --advania-green: var(--craft-green);
            --advania-pink: var(--craft-magenta);
            --advania-indigo: var(--craft-purple);
            --advania-blue: var(--craft-cyan);
            --advania-orange: var(--craft-yellow);

            /* Artboard1 neutrals */
            --ink: #30302f;
            --paper: #fafbff;

            /* UI Colors */
            --primary: var(--paper);
            --secondary: #ffffff;
            --accent: var(--craft-purple);
            --accent-green: var(--craft-green);
            --accent-blue: var(--craft-cyan);
            --accent-orange: var(--craft-yellow);
            --text: var(--ink);
            --text-muted: rgba(48, 48, 47, 0.65);

            --accent-gradient: linear-gradient(90deg, var(--craft-magenta), var(--craft-cyan));

            /* Live badge */
            --live-red: #E11D48;
            --live-red-dark: #B91C1C;

            /* Darker data accents for light background */
            --data-accent: var(--craft-purple);

            /* Overlay panel background (kept var name to minimize churn) */
            --panel-purple-bg: rgba(250, 251, 255, 0.70);
            --panel-border: rgba(48, 48, 47, 0.14);
            --chip-bg: rgba(48, 48, 47, 0.06);
            --shadow-soft: 0 18px 50px rgba(16, 16, 18, 0.10);
            --shadow-card: 0 10px 24px rgba(16, 16, 18, 0.10);

            /* Layout heights (used for fixed header + clock bar) */
            --header-h: 80px;
            --clockbar-h: 0px;
        }

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

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background:
                radial-gradient(1200px 500px at 20% -10%, rgba(0, 212, 229, 0.10), transparent 60%),
                radial-gradient(900px 400px at 90% 0%, rgba(233, 30, 140, 0.10), transparent 55%),
                var(--primary);
            color: var(--text);
            min-height: 100vh;
            min-height: 100svh;
            overflow-x: hidden;
        }

        /* Header */
        .header {
            background: rgba(250, 251, 255, 0.85);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--panel-border);
            box-shadow: var(--shadow-soft);
            height: var(--header-h);
            padding: 0 40px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
        }

        .clock-bar {
            position: fixed;
            top: var(--header-h);
            left: 0;
            right: 0;
            height: var(--clockbar-h);
            z-index: 900;
            display: none;
            align-items: center;
            justify-content: flex-end;
            padding: 0 40px;
            background: rgba(250, 251, 255, 0.85);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--panel-border);
        }

        .clock-bar .flight-number {
            background: var(--chip-bg);
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo-icon {
            font-size: 32px;
            animation: float 2s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-5px); }
        }

        .logo h1 {
            font-size: 24px;
            font-weight: 700;
            color: var(--craft-purple);
        }

        .logo h1 span {
            color: var(--craft-magenta);
        }

        .flight-info {
            display: flex;
            align-items: center;
            gap: 30px;
        }

        .flight-number {
            background: var(--chip-bg);
            border: 1px solid var(--panel-border);
            padding: 8px 16px;
            border-radius: 8px;
            font-family: inherit;
            font-size: 14px;
            letter-spacing: 0;
            font-variant-numeric: tabular-nums;
        }

        /* Main Layout */
        .main-container {
            display: grid;
            grid-template-columns: 1fr 380px;
            height: 100vh;
            height: 100svh;
            padding-top: calc(var(--header-h) + var(--clockbar-h));
        }

        @media (min-width: 2001px) {
            .main-container {
                grid-template-columns: 1fr 580px;
            }
        }

        /* Map Section */
        .map-section {
            position: relative;
        }

        #map {
            width: 100%;
            height: 100%;
        }

        .leaflet-container {
            background: var(--primary);
        }

        /* Map Overlays */
        .map-overlay {
            position: absolute;
            z-index: 500;
        }

        .eta-panel {
            top: 20px;
            left: 20px;
            background: var(--panel-purple-bg);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            padding: 25px 35px;
            border-radius: 16px;
            border: 1px solid var(--panel-border);
            box-shadow: var(--shadow-card);
        }

        .eta-label {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: var(--text-muted);
            margin-bottom: 8px;
        }

        .eta-time {
            font-size: 48px;
            font-weight: 700;
            font-variant-numeric: tabular-nums;
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .eta-date {
            font-size: 14px;
            color: var(--text-muted);
            margin-top: 5px;
        }

        .stats-panel {
            bottom: 20px;
            left: 20px;
            display: flex;
            gap: 15px;
        }

        .stat-card {
            background: var(--panel-purple-bg);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            padding: 15px 25px;
            border-radius: 12px;
            border: 1px solid var(--panel-border);
            box-shadow: var(--shadow-card);
            min-width: 120px;
        }

        .stat-label {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-muted);
            margin-bottom: 5px;
        }

        .stat-value {
            font-size: 24px;
            font-weight: 700;
        }

        .stat-value.speed { color: var(--data-accent); }
        .stat-value.altitude { color: var(--advania-green); }
        .stat-value.distance { color: var(--advania-orange); }

        /* Wind inside stats panel */
        .stat-card.wind {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .stat-card.wind .wind-indicator {
            position: static;
            z-index: auto;
            background: transparent;
            backdrop-filter: none;
            padding: 0;
            border-radius: 0;
            border: none;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .stat-card.wind .wind-compass {
            width: 42px;
            height: 42px;
        }

        .stat-card.wind .wind-speed {
            font-size: 18px;
        }

        /* Wind Indicator */
        .wind-indicator {
            position: absolute;
            top: 20px;
            right: 400px;
            z-index: 500;
            background: var(--panel-purple-bg);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            padding: 15px 20px;
            border-radius: 12px;
            border: 1px solid var(--panel-border);
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .wind-compass {
            width: 50px;
            height: 50px;
            position: relative;
            border: 2px solid var(--panel-border);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .wind-arrow {
            width: 0;
            height: 0;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
            border-bottom: 10px solid var(--data-accent);
            transition: transform 0.5s ease;
            position: relative;
        }

        .wind-arrow::after {
            content: '';
            position: absolute;
            top: 6px;
            left: -1px;
            width: 3px;
            height: 6px;
            background: var(--data-accent);
        }

        .wind-directions {
            position: absolute;
            width: 100%;
            height: 100%;
            font-size: 11px;
            color: var(--text-muted);
        }

        .wind-directions span {
            position: absolute;
        }

        .wind-directions .n { top: 2px; left: 50%; transform: translateX(-50%); }
        .wind-directions .s { bottom: 2px; left: 50%; transform: translateX(-50%); }
        .wind-directions .e { right: 4px; top: 50%; transform: translateY(-50%); }
        .wind-directions .w { left: 4px; top: 50%; transform: translateY(-50%); }

        .wind-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .wind-label {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-muted);
        }

        .wind-speed {
            font-size: 20px;
            font-weight: 700;
            color: var(--data-accent);
            white-space: nowrap;
        }

        .wind-direction-text {
            font-size: 11px;
            color: var(--text-muted);
        }

        /* Sidebar - Livestream */
        .sidebar {
            background: var(--secondary);
            display: flex;
            flex-direction: column;
            border-left: 1px solid var(--panel-border);
        }

        .livestream-container {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .livestream-header {
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--panel-border);
        }

        .live-badge {
            display: flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(90deg, var(--live-red), var(--live-red-dark));
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #fff;
        }

        .live-dot {
            width: 8px;
            height: 8px;
            background: white;
            border-radius: 50%;
            animation: pulse-dot 1.5s ease-in-out infinite;
        }

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

        .viewer-count {
            font-size: 13px;
            color: var(--text-muted);
        }

        .viewer-count span {
            color: var(--text);
            font-weight: 600;
        }

        .video-wrapper {
            flex: 0 0 auto;
            position: relative;
            background: #000;
            overflow: hidden;
            aspect-ratio: 9 / 16;
            width: 100%;
            max-height: 75vh;
        }

        .video-frame {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .live-video {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: 50% 50%;
            z-index: 0;
            background: #000;
        }

        .video-placeholder {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: linear-gradient(180deg, #1a1a2e 0%, #0d0d1a 100%);
            transition: opacity 0.5s ease;
            z-index: 1;
        }

        /* When we have a real video playing behind, keep overlay readable */
        .video-placeholder.has-video {
            background: transparent;
        }

        /* (Was used for readability when overlay text is shown; now kept off to avoid dark pulsing) */
        .video-placeholder.has-video:not(.campaign)::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                radial-gradient(120% 80% at 50% 20%, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.72) 100%),
                linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.55) 100%);
            pointer-events: none;
            z-index: 0;
            display: none;
        }

        .video-placeholder.has-video > * {
            z-index: 1;
        }

        .video-placeholder.fade-out {
            opacity: 0;
        }

        .video-placeholder.night-mode:not(.has-video) {
            background: linear-gradient(180deg, #0a0a14 0%, #050508 100%);
        }

        .video-placeholder .icon {
            font-size: 80px;
            margin-bottom: 20px;
        }

        .video-placeholder .title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .video-placeholder .subtitle {
            font-size: 14px;
            color: var(--text-muted);
        }

        .video-main {
            position: relative;
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            gap: 8px;
            padding: 18px 18px 22px;
        }

        /* Keep the video clean: hide the big centered overlay in non-campaign mode */
        .video-placeholder:not(.campaign) #videoIcon,
        .video-placeholder:not(.campaign) #videoTitle,
        .video-placeholder:not(.campaign) #videoBody,
        .video-placeholder:not(.campaign) #videoCtaInline {
            display: none !important;
        }

        .video-placeholder:not(.campaign) .video-main {
            padding: 0;
            gap: 0;
        }

        .video-placeholder .body {
            margin-top: 10px;
            font-size: 13px;
            line-height: 1.35;
            color: rgba(255,255,255,0.85);
            text-align: center;
            max-width: 520px;
            padding: 0 24px;
            display: none;
        }

        .video-cta {
            margin-top: 10px;
            display: none;
            width: fit-content;
            padding: 10px 14px;
            border-radius: 10px;
            background: linear-gradient(90deg, var(--advania-pink), var(--advania-orange));
            color: white;
            text-decoration: none;
            font-weight: 700;
            font-size: 12px;
            letter-spacing: 0.5px;
            border: none;
            cursor: pointer;
        }

        .video-cta.inline {
            margin-top: 12px;
        }

        .video-cta:active {
            transform: scale(0.98);
        }

        /* Campaign media (image) */
        .campaign-media {
            width: 100%;
            border-radius: 12px;
            overflow: hidden;
            background: rgba(0,0,0,0.25);
            border: 1px solid rgba(255,255,255,0.10);
            display: none;
            margin: 10px 0 8px;
        }

        .campaign-media img {
            display: block;
            width: 100%;
            height: 150px;
            object-fit: cover;
        }

        /* Campaign mode: internal look for all campaigns */
        .video-placeholder.campaign {
            position: absolute;
            inset: 0;
            overflow: hidden;
            justify-content: flex-end;
        }

        /* Per-campaign placement: default bottom, optionally top */
        .video-placeholder.campaign.campaign-pos-top {
            justify-content: flex-start;
        }

        .video-placeholder.campaign .campaign-media {
            display: block;
            position: absolute;
            inset: 0;
            margin: 0;
            border: none;
            border-radius: 0;
            background: transparent;
        }

        .video-placeholder.campaign .campaign-media img {
            height: 100%;
            width: 100%;
            object-fit: cover;
            object-position: 50% 50%;
            filter: saturate(1.1) contrast(1.05);
            transform: scale(1.02);
        }

        /* Auto-pan (Ken Burns) for images cropped by aspect ratio */
        .video-placeholder.campaign .campaign-media img.pan-x {
            animation-name: campaignPanX;
            animation-duration: var(--campaign-pan-duration, 14000ms);
            animation-timing-function: linear;
            animation-delay: var(--campaign-pan-delay, 500ms);
            animation-fill-mode: both;
            animation-direction: alternate;
            animation-iteration-count: infinite;
        }

        .video-placeholder.campaign .campaign-media img.pan-y {
            animation-name: campaignPanY;
            animation-duration: var(--campaign-pan-duration, 14000ms);
            animation-timing-function: linear;
            animation-delay: var(--campaign-pan-delay, 500ms);
            animation-fill-mode: both;
            animation-direction: alternate;
            animation-iteration-count: infinite;
        }

        @keyframes campaignPanX {
            0% { object-position: 15% 50%; }
            6% { object-position: 17% 50%; }
            94% { object-position: 83% 50%; }
            100% { object-position: 85% 50%; }
        }

        @keyframes campaignPanY {
            0% { object-position: 50% 15%; }
            6% { object-position: 50% 17%; }
            94% { object-position: 50% 83%; }
            100% { object-position: 50% 85%; }
        }

        @media (prefers-reduced-motion: reduce) {
            .video-placeholder.campaign .campaign-media img.pan-x,
            .video-placeholder.campaign .campaign-media img.pan-y {
                animation: none;
            }
        }

        .video-placeholder.campaign::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.85) 100%);
            pointer-events: none;
            z-index: 0;
        }

        /* When content sits at the top, bias gradient contrast to the top */
        .video-placeholder.campaign.campaign-pos-top::before {
            background:
                linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 55%, rgba(0,0,0,0.65) 100%);
        }

        .video-placeholder.campaign .campaign-media {
            z-index: 0;
            pointer-events: none;
        }

        .video-placeholder.campaign > *:not(.campaign-media):not(.campaign-badge) {
            position: relative;
            z-index: 1;
        }

        /* Campaign text card (better contrast, less collisions) */
        .video-placeholder.campaign .video-main {
            width: calc(100% - 32px);
            max-width: 560px;
            margin: 0 auto 16px;
            background: rgba(0,0,0,0.55);
            border: 1px solid rgba(255,255,255,0.14);
            border-radius: 16px;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            box-shadow: 0 16px 40px rgba(0,0,0,0.45);
        }

        .video-placeholder.campaign.campaign-pos-top .video-main {
            margin: 16px auto 0;
        }

        /* Reduce visual noise: hide the big icon in campaigns */
        .video-placeholder.campaign #videoIcon {
            display: none;
        }

        .video-placeholder.campaign .title {
            color: rgba(255,255,255,0.98);
        }

        .video-placeholder.campaign .subtitle {
            color: rgba(255,255,255,0.80);
        }

        .video-placeholder.campaign .body {
            color: rgba(255,255,255,0.92);
            display: block;
        }

        /* Put CTA right by the text, not hidden in bottom overlay */
        .video-placeholder.campaign .video-cta.inline {
            display: inline-flex;
        }

        .video-placeholder.campaign .clip-info {
            display: none;
        }

        /* Campaign badge: “REKLAME – tilbake om …” */
        .campaign-badge {
            position: absolute;
            right: 14px;
            top: 14px;
            z-index: 2;
            background: rgba(0,0,0,0.55);
            border: 1px solid rgba(255,255,255,0.16);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            padding: 8px 10px;
            border-radius: 999px;
            font-size: 11px;
            display: none;
            align-items: center;
            gap: 8px;
            color: rgba(255,255,255,0.92);
            pointer-events: none;
        }

        .campaign-badge .tag {
            font-weight: 800;
            letter-spacing: 0.6px;
            color: rgba(255,255,255,0.95);
        }

        .campaign-badge .count {
            color: rgba(255,255,255,0.80);
            font-weight: 700;
        }

        .video-placeholder.campaign .campaign-badge {
            display: inline-flex;
        }

        /* Badge should dock opposite the content card (not inside it) */
        .video-placeholder.campaign.campaign-pos-top .campaign-badge {
            top: auto;
            bottom: 14px;
        }

        .video-placeholder.campaign.campaign-pos-bottom .campaign-badge {
            top: 14px;
            bottom: auto;
        }

        .video-placeholder .clip-info {
            position: absolute;
            bottom: 20px;
            left: 20px;
            right: 20px;
            background: rgba(0,0,0,0.6);
            padding: 12px 16px;
            border-radius: 10px;
            font-size: 12px;
            padding: 20px;
            border-top: 1px solid var(--panel-border);
            display: none;
        }

        /* Show clip-info only when explicitly enabled in debug UI */
        body.debug-mode.show-clip-info .video-placeholder:not(.campaign) .clip-info {
            display: block;
        }

        .video-placeholder .clip-info .type {
            color: var(--accent-green);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 10px;
        }

        /* Journey Progress */
        .journey-info {
            margin: 12px 0 0 0;
            padding: 10px 20px 12px;
        }
        .journey-route {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 0;
        }
        .route-point {
            text-align: center;
            flex: 1;
        }
        .route-point .city {
            font-size: 16px;
            font-weight: 700;
        }
        .route-point .time {
            font-size: 12px;
            color: rgba(48, 48, 47, 0.78);
            margin-top: 4px;
        }
        .route-line {
            flex: 2;
            height: 4px;
            background: var(--chip-bg);
            border-radius: 2px;
            position: relative;
        }
        .route-progress {
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            background: var(--accent-gradient);
            border-radius: 2px;
            transition: width 1s ease;
        }
        .route-balloon {
            position: absolute;
            top: 50%;
            transform: translate(-50%, -50%);
            font-size: 20px;
            transition: left 1s ease;
        }

        /* (Removed duplicate Journey Progress CSS + title/% styles to keep the box compact) */

        /* Debug Panel */
        .debug-toggle {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: rgba(45, 27, 105, 0.70);
            appearance: none;
            -webkit-appearance: none;
            padding: 10px 15px;
            border-radius: 8px;
            border: 1px solid rgba(0,0,0,0.06);
            box-shadow: var(--shadow-card);
            z-index: 2001;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            color: #fff;
            display: none;
            font-family: inherit;
        }

        .debug-toggle.active {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .debug-toggle:hover {
            background: rgba(36, 21, 89, 0.86);
        }

        .debug-panel {
            position: fixed;
            bottom: 60px;
            right: 20px;
            background: rgba(250, 251, 255, 0.70);
            backdrop-filter: blur(12px);
            padding: 20px;
            border-radius: 12px;
            border: 1px solid var(--panel-border);
            box-shadow: var(--shadow-soft);
            z-index: 2000;
            min-width: 300px;
            max-width: min(420px, calc(100vw - 40px));
            display: none;
        }

        .debug-panel.active {
            display: block;
        }

        .debug-panel h2 {
            font-size: 14px;
            color: var(--craft-purple);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .debug-panel label,
        .debug-panel .debug-label {
            display: block;
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 5px;
        }

        .debug-panel input,
        .debug-panel select {
            width: 100%;
            padding: 10px;
            border: 1px solid var(--panel-border);
            border-radius: 8px;
            background: #fff;
            color: var(--ink);
            font-family: inherit;
            margin-bottom: 15px;
        }

        .debug-panel select option {
            background: #fff;
            color: var(--ink);
        }

        /* Ad list (preview all campaigns at once) */
        .adlist-overlay {
            position: fixed;
            inset: 0;
            z-index: 5000;
            display: none;
            background: rgba(0,0,0,0.78);
        }

        .adlist-overlay.active {
            display: flex;
            flex-direction: column;
        }

        .adlist-header {
            position: sticky;
            top: 0;
            z-index: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 14px 16px;
            background: linear-gradient(180deg, rgba(250, 251, 255, 0.98) 0%, rgba(250, 251, 255, 0.90) 100%);
            border-bottom: 1px solid var(--panel-border);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .adlist-header .meta {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .adlist-header .meta .title {
            font-size: 14px;
            font-weight: 800;
            letter-spacing: 0.2px;
            color: var(--text);
        }

        .adlist-header .meta .subtitle {
            font-size: 12px;
            color: var(--text-muted);
        }

        .adlist-close {
            appearance: none;
            border: 1px solid var(--panel-border);
            background: rgba(48, 48, 47, 0.06);
            color: var(--text);
            padding: 10px 12px;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 700;
            font-size: 12px;
        }

        .adlist-close:hover {
            background: rgba(48, 48, 47, 0.10);
        }

        .adlist-body {
            flex: 1;
            overflow: auto;
            padding: 18px;
        }

        .adlist-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 18px;
            align-items: flex-start;
            justify-content: center;
        }

        .adlist-item {
            width: min(var(--adlist-preview-width, 360px), 100%);
        }

        .adlist-item .video-wrapper {
            max-height: none;
        }

        .adlist-caption {
            margin-top: 8px;
            font-size: 12px;
            color: rgba(255,255,255,0.78);
            display: flex;
            justify-content: space-between;
            gap: 10px;
        }

        .adlist-caption .id {
            color: rgba(255,255,255,0.55);
            font-weight: 700;
        }

        .speed-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-bottom: 15px;
        }

        .speed-btn {
            padding: 5px 10px;
            background: var(--chip-bg);
            border: 1px solid var(--panel-border);
            border-radius: 4px;
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            width: auto !important;
        }

        .speed-btn:hover {
            background: rgba(48, 48, 47, 0.10);
            color: var(--text);
        }

        .speed-btn.active {
            background: var(--accent) !important;
            border-color: var(--accent) !important;
            color: white !important;
        }

        .debug-panel button:not(.speed-btn) {
            width: 100%;
            padding: 10px;
            background: var(--craft-purple);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
        }

        .debug-panel .current-time {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid var(--panel-border);
        }

        .debug-panel .current-time span {
            color: var(--craft-purple);
            font-family: monospace;
        }

        /* Balloon Marker */
        .balloon-marker {
            background: none !important;
            border: none !important;
            transition: transform 1s ease-out !important;
        }

        .balloon-marker img {
            width: 48px;
            height: 48px;
            filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
            animation: float 2s ease-in-out infinite;
        }

        /* Smooth movement for Leaflet markers */
        .leaflet-marker-icon {
            transition: transform 1s ease-out;
        }

        .city-label {
            background: linear-gradient(180deg, rgba(250, 251, 255, 0.98) 0%, rgba(250, 251, 255, 0.82) 100%);
            padding: 8px 14px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            border: 1px solid var(--panel-border);
            box-shadow:
                0 10px 22px rgba(16, 16, 18, 0.14),
                0 2px 0 rgba(255, 255, 255, 0.65) inset;
            color: var(--ink);
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            line-height: 1.1;
        }

        .city-label.start { border-left: 3px solid var(--advania-green); }
        .city-label.end { border-left: 3px solid var(--advania-pink); }

        /* Status Messages */
        .status-badge {
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 500;
            padding: 10px 20px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
        }

        .status-badge.not-started {
            background: var(--chip-bg);
            color: var(--text-muted);
        }

        .status-badge.in-flight {
            background: var(--advania-green);
            color: var(--ink);
            border: 1px solid rgba(0,0,0,0.10);
        }

        .status-badge.landed {
            background: var(--advania-pink);
            color: white;
        }

        .status-badge.sleeping {
            background: var(--advania-indigo);
            color: white;
        }

        /* ========== RESPONSIVE / MOBILE STYLES ========== */
        @media (max-width: 900px) {
            :root {
                --header-h: 64px;
                --clockbar-h: 38px;
            }

            /* Header */
            .header {
                padding: 0 15px;
                flex-wrap: wrap;
                gap: 10px;
            }

            .clock-bar {
                padding: 0 15px;
                display: flex;
                justify-content: flex-end;
            }

            .header .flight-info {
                display: none;
            }

            .logo {
                gap: 10px;
            }

            .logo img {
                height: 28px !important;
            }

            .logo h1 {
                font-size: 14px;
            }

            .logo > span {
                display: none;
            }

            .flight-number {
                padding: 6px 10px;
                font-size: 11px;
            }

            /* Main Layout - Stack vertically */
            .main-container {
                grid-template-columns: 1fr;
                grid-template-rows: 45vh auto;
                grid-template-rows: 45svh auto;
                padding-top: calc(var(--header-h) + var(--clockbar-h));
            }

            /* Map Section */
            .map-section {
                height: 45vh;
                height: 45svh;
                min-height: 45vh;
                min-height: 45svh;
                overflow: hidden;
            }

            /* ETA Panel */
            .eta-panel {
                top: 10px;
                left: 10px;
                padding: 12px 18px;
                max-width: 280px;
            }

            .eta-time {
                font-size: 28px;
            }

            .eta-label, .eta-date {
                font-size: 10px;
            }

            /* Stats Panel */
            .stats-panel {
                bottom: 10px;
                left: 10px;
                right: 10px;
                gap: 8px;
                display: grid;
                grid-template-columns: repeat(4, minmax(0, 1fr));
                align-items: stretch;
            }

            .stat-card {
                padding: 10px 12px;
                min-width: 0;
            }

            .stat-card.wind {
                min-width: 0;
            }

            .stat-label {
                font-size: 9px;
            }

            .stat-value {
                font-size: 16px;
            }

            .stat-card.wind .wind-direction-text {
                display: none;
            }

            .stat-card.wind {
                gap: 10px;
            }

            /* Status Badge */
            .status-badge {
                top: 10px;
                right: 10px;
                padding: 6px 12px;
                font-size: 11px;
            }

            /* Wind Indicator */
            .wind-indicator {
                top: auto;
                bottom: 80px;
                right: 10px;
                left: auto;
                padding: 10px 12px;
                gap: 10px;
            }

            /* Wind inside stats panel should not behave like a floating overlay */
            .stats-panel .wind-indicator {
                bottom: auto;
                right: auto;
                left: auto;
                padding: 0;
                background: transparent;
                border: none;
            }

            .stat-card.wind .wind-compass {
                width: 34px;
                height: 34px;
            }

            .stat-card.wind .wind-arrow {
                border-left-width: 6px;
                border-right-width: 6px;
                border-bottom-width: 14px;
            }

            .stat-card.wind .wind-arrow::after {
                top: 8px;
                left: -2px;
                width: 4px;
                height: 10px;
            }

            .stat-card.wind .wind-speed {
                font-size: 12px;
                white-space: nowrap;
            }

            /* Prevent wind value overflow */
            .stat-card.wind .wind-info {
                min-width: 0;
            }
            .stat-card.wind .wind-speed {
                display: block;
                max-width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                font-size: clamp(11px, 3.0vw, 13px);
            }

            .wind-compass {
                width: 40px;
                height: 40px;
            }

            .wind-arrow {
                font-size: 18px;
            }

            .wind-speed {
                font-size: 16px;
            }

            /* Sidebar */
            .sidebar {
                border-left: none;
                border-top: 1px solid var(--panel-border);
                position: relative;
                z-index: 1;
            }

            .livestream-header {
                padding: 12px 15px;
            }

            .video-wrapper {
                min-height: 360px;
                height: 60vh;
                height: 60svh;
                aspect-ratio: auto;
                flex: 1;
                max-height: none;
            }

            /* Campaign (reklame) – better mobile layout */
            .video-placeholder.campaign .video-main {
                width: calc(100% - 24px);
                max-width: none;
                margin: 0 auto;
                padding: 14px 14px 16px;
                border-radius: 14px;
                max-height: calc(100% - 72px);
                overflow: auto;
            }

            .video-placeholder.campaign {
                justify-content: center;
                padding: 12px 0;
            }

            .video-placeholder.campaign .title {
                font-size: 16px;
            }

            .video-placeholder.campaign .body {
                font-size: 12px;
                padding: 0;
                max-height: 8.5em;
                overflow: hidden;
            }

            .video-placeholder.campaign .video-cta.inline {
                width: 100%;
                justify-content: center;
            }

            /* Always keep badge top-right on mobile */
            .video-placeholder.campaign .campaign-badge {
                top: 10px;
                right: 10px;
                bottom: auto;
                z-index: 10;
            }

            /* Journey progress as a fixed bottom bar */
            .livestream-container {
                padding-bottom: calc(60px + env(safe-area-inset-bottom));
            }

            .journey-info {
                position: fixed;
                left: 0;
                right: 0;
                bottom: 0;
                margin: 0;
                padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
                background: rgba(250, 251, 255, 0.94);
                backdrop-filter: blur(12px);
                border-top: 1px solid var(--panel-border);
                box-shadow: 0 -12px 30px rgba(16, 16, 18, 0.10);
                z-index: 1500;
                min-height: 58px;
            }

            .journey-route {
                margin: 0;
            }

            .route-line {
                height: 3px;
            }

            .route-balloon {
                font-size: 18px;
            }

            .journey-route {
                gap: 10px;
            }

            .route-point .city {
                font-size: 14px;
            }

            .route-point .time {
                display: none;
            }

            /* Debug Panel */
            .debug-toggle {
                right: 10px;
                bottom: 10px;
            }

            .debug-panel {
                right: 10px;
                bottom: 50px;
                min-width: auto;
                max-width: min(420px, calc(100vw - 20px));
                max-height: 50vh;
                max-height: 50svh;
                overflow-y: auto;
            }

            .debug-panel h2 {
                font-size: 12px;
            }
        }

        @media (max-width: 480px) {
            :root {
                --header-h: 58px;
                --clockbar-h: 36px;
            }

            .logo h1 {
                font-size: 12px;
            }

            .main-container {
                grid-template-rows: 40vh auto;
                grid-template-rows: 40svh auto;
                padding-top: calc(var(--header-h) + var(--clockbar-h));
            }

            .map-section {
                height: 40vh;
                height: 40svh;
                min-height: 40vh;
                min-height: 40svh;
            }

            .eta-panel {
                padding: 10px 14px;
                max-width: 240px;
            }

            .eta-time {
                font-size: 24px;
            }

            .stat-card {
                padding: 8px 10px;
                min-width: 0;
            }

            .stat-card.wind {
                min-width: 0;
            }

            .stat-value {
                font-size: 14px;
            }

            .stat-label {
                font-size: 8px;
            }

            .stat-card.wind .wind-compass {
                width: 30px;
                height: 30px;
            }

            .stat-card.wind .wind-arrow {
                border-left-width: 5px;
                border-right-width: 5px;
                border-bottom-width: 12px;
            }

            .stat-card.wind .wind-arrow::after {
                top: 7px;
                left: -2px;
                width: 4px;
                height: 9px;
            }

            .stat-card.wind .wind-speed {
                display: block;
                max-width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                font-size: clamp(10px, 3.4vw, 12px);
            }

            .stat-card.wind {
                gap: 8px;
            }

            .stat-card.wind .wind-label {
                display: none;
            }

            /* Slightly taller bottom bar padding on very small screens */
            .livestream-container {
                padding-bottom: calc(58px + env(safe-area-inset-bottom));
            }

            .journey-info {
                padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
                min-height: 56px;
            }

            .video-placeholder .body {
                font-size: 12px;
                padding: 0 16px;
            }

            .video-wrapper {
                aspect-ratio: auto;
                max-height: none;
                min-height: 330px;
                height: 56vh;
                height: 56svh;
            }

            .stat-card.wind .wind-direction-text {
                display: none;
            }

            .wind-indicator {
                bottom: 70px;
                padding: 8px 10px;
            }

            .stats-panel .wind-indicator {
                bottom: auto;
                padding: 0;
                background: transparent;
                border: none;
            }

            .wind-compass {
                width: 35px;
                height: 35px;
            }

            .wind-speed {
                font-size: 14px;
            }

            .video-placeholder .icon {
                font-size: 50px;
            }

            .video-placeholder .title {
                font-size: 14px;
            }

            .video-placeholder .subtitle {
                font-size: 12px;
            }

            /* Campaign (reklame) – tighter on small phones */
            .video-placeholder.campaign .video-main {
                width: calc(100% - 20px);
                margin: 0 auto;
                padding: 12px 12px 14px;
                border-radius: 12px;
                max-height: calc(100% - 64px);
                overflow: auto;
            }

            .video-placeholder.campaign {
                justify-content: center;
                padding: 10px 0;
            }

            .video-placeholder.campaign .title {
                font-size: 15px;
            }

            .video-placeholder.campaign .body {
                font-size: 12px;
                max-height: 7.5em;
                overflow: hidden;
            }

            .video-placeholder.campaign .video-cta.inline {
                width: 100%;
                justify-content: center;
            }

            .video-placeholder.campaign .campaign-badge {
                top: 8px;
                right: 8px;
                bottom: auto;
                z-index: 10;
            }

            .city-label {
                padding: 5px 10px;
                font-size: 11px;
            }

            .balloon-marker img {
                width: 36px;
                height: 36px;
            }
        }
