        body {
            font-family: 'Poppins', sans-serif;
        }

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

        /* Fullscreen overlay styles */
        .fullscreen-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 9999;
            display: none;
            display: flex;
            flex-direction: column;
        }

        .header {
            background: #e74c3c;
            border-bottom: 2px solid #c0392b;
            padding: 10px 20px;
            font-size: 12px;
            font-weight: bold;
            color: #fff;
            cursor: pointer;
            position: relative;
            display: flex;
            justify-content: flex-start;
            align-items: center;
            height: 15px;
        }

        .header span {
            flex-grow: 1;
            text-align: center;
        }

        .header .close-icon {
            font-size: 15px;
            color: #fff;
            cursor: pointer;
            margin-left: 12px;
        }

        .popup-title {
            padding: 10px 20px;
            font-size: 15px;
            background: #FFF;
            color: #000;
            margin: 0;
            font-weight: bold;
            text-align: center;
            height: 15px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .iframe-container {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 0;
        }

        .fullscreen-overlay iframe {
            width: 100%;
            height: 100%;
            border: none;
        }

        /* Blinking animation for the user location icon */
        @keyframes blink {
            0% {
                opacity: 1; /* Fully visible */
            }
            50% {
                opacity: 0; /* Invisible (blinks) */
            }
            100% {
                opacity: 1; /* Back to visible */
            }
        }

        /* Styling for the user's location marker (crosshair) */
        .user-location-icon {
            font-size: 24px;
            color: #e74c3c; /* Red crosshairs */
            transform: translate(-50%, -50%);
            animation: blink 1.5s infinite; /* Blinking effect */
        }

        .leaflet-popup {
            
            min-height: 20px;
            font-size: 14px;
            font-weight: bold;
            background-color: rgba(255, 255, 255, 0.5);

        
        }

        .leaflet-popup-content {
            padding: 5px;
            margin: 0;
            overflow: hidden;
            background: transparent;
        }

        .leaflet-popup-content-wrapper {
            background: transparent;
            border: none;


        }

        .leaflet-popup-tip {
            display: none;
            background: transparent;

        }

        .leaflet-div-icon {
            background: none;
            border: none;
            text-align: center;
        }

        .leaflet-div-icon i {
            font-size: 16px;
            color: white;
            line-height: 24px;
            width: 24px;
            height: 24px;
            background-color: #3498db; /* Default color */
            border-radius: 50%;
            display: inline-block;
            padding: 0px;
            box-sizing: border-box;
        }

        .leaflet-div-icon-2 {
            background: none;
            border: none;
            text-align: left;
            padding-top: 5px;
        }

        .leaflet-div-icon-2 i {
            font-size: 16px;
            color: white;
            line-height: 24px;
            width: 24px;
            height: 24px;
            background-color: #3498db; /* Default color */
            border-radius: 50%;
            display: inline-block;
            padding: 0px;
            box-sizing: border-box;
        }

        .red-icon i {
            background-color: #e74c3c;
        }

        .blue-icon i {
            background-color: #2980b9;
        }

        .green-icon i {
            background-color: #27ae60;
        }

        .orange-icon i {
            background-color: #f39c12;
        }

        .purple-icon i {
            background-color: #9C27B0;
        }
        .pink-icon i {
            background-color: #ff5e9f;
        }

        /* Remove the cluster boundary style */
        .cluster-boundary {
            display: none; /* Do not show additional boundaries */
        }

        /* Information icon button */
        .info-btn {
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.7);
            color: white;
            border: none;
            padding: 10px;
            font-size: 20px;
            border-radius: 5px;
            cursor: pointer;
            z-index: 1000;
        }

            /* Default styling for the info window */
            .info-window {
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                background: white;
                padding: 20px;
                border-radius: 10px;
                box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
                display: none;
                z-index: 9999;
                max-width: 100%; /* Full width by default */
                text-align: left;
                overflow-y: auto;
            }

            /* For phones (max-width: 767px), make the window full screen */
           @media (max-width: 767px) {
            .info-window {
                top: 50%; /* Keep it vertically centered */
                left: 50%; /* Keep it horizontally centered */
                transform: translate(-50%, -50%); /* Correct for centering */
                width: 80vw; /* 90% of the viewport width */
                height: 80vh; /* 90% of the viewport height */
                padding: 20px; /* Padding to ensure content doesn't touch the edges */
                border-radius: 10px; /* Keep rounded corners */
                box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* Keep the box shadow */
                display: none; /* Ensure it’s initially hidden */
                z-index: 9999;
                max-width: 80%; /* Full width by default */
                text-align: left;
                overflow-y: auto;
            }
            }

        .info-window h3 {
            margin-top: 0;
        }

        .close-info-window {
            position: absolute;
            top: 10px;
            right: 10px;
            font-size: 18px;
            cursor: pointer;
        }

       /* Camera Icon Styles */
        .camera-icons {
            display: flex;
            justify-content: flex-start;  /* Align items to the left */
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 20px;
            
        }

        .camera-icons .icon {
            display: flex;
            align-items: center;  /* Keep icons vertically centered */
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
        }

        .camera-icons .icon i {
            font-size: 20px;
            color: white;
            line-height: 40px;
        }

        .camera-icons li .icon {
            width: 30px;
            height: 30px;
            margin-right: 10px;
            display: flex;
            justify-content: flex-start;
            align-items: left;  /* Center the icon within the circle */
            border-radius: 50%;
        }

        .container-menu {
      display: flex;          /* Use flexbox for layout */
      width: 100%;            /* Ensure container takes up full width of the parent */
    }
    .container-menu-left {
      width: 40px;            /* Fixed width for left and right divs */
      background-color: #FFF;
      padding-right: 0;
    }
    .container-menu-right {
      width: 40px;            /* Fixed width for left and right divs */
      background-color: #FFF; 
      padding-left: 0;
    }

    .container-menu-center {
      flex-grow: 1;           /* Center div takes up remaining space */
    }
    .arrow-icon-button {
      font-size: 15px;
      cursor: pointer;
      display: inline-block;
      padding: 10px;
      transition: all 0.3s ease;
    }

    .arrow-icon-button:hover {
      color: #007bff;
      transform: scale(1.1);
    }
/* tekur út draw tool circle */
    .leaflet-draw-toolbar .leaflet-draw-draw-circle {
    display: none !important;
}

/* ICEWEBCAMS V2 */
:root{--ink:#0b1220;--muted:#64748b;--panel:#fff;--line:#e7ebf1;--accent:#2563eb}*{box-sizing:border-box}html,body,#map{height:100%;margin:0}body{overflow:hidden;background:#dbeafe;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif}.info-btn{display:none!important}
.v2-topbar{position:fixed;z-index:6600;top:16px;left:50%;transform:translateX(-50%);height:64px;width:min(780px,calc(100vw - 32px));display:grid;grid-template-columns:190px 1fr 48px;align-items:center;padding:8px;background:rgba(255,255,255,.94);border:1px solid rgba(255,255,255,.7);border-radius:20px;box-shadow:0 18px 55px rgba(15,23,42,.18);backdrop-filter:blur(16px)}.v2-brand{border:0;background:none;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer;color:var(--ink)}.v2-brand b{display:block;font-size:15px}.v2-brand small{display:block;color:var(--muted);font-size:10px;margin-top:1px}.v2-logo{width:40px;height:40px;border-radius:13px;background:var(--ink);color:#fff;display:grid;place-items:center}.v2-tabs{height:48px;padding:4px;background:#f1f5f9;border-radius:14px;display:grid;grid-template-columns:repeat(3,1fr);gap:3px}.v2-tabs button{border:0;background:transparent;border-radius:11px;color:#64748b;font-weight:700;cursor:pointer;display:flex;gap:7px;align-items:center;justify-content:center}.v2-tabs button.active{background:#fff;color:var(--ink);box-shadow:0 2px 8px rgba(15,23,42,.08)}.v2-icon{width:42px;height:42px;border:0;border-radius:13px;background:var(--ink);color:#fff;cursor:pointer;justify-self:end}
.v2-panel{position:fixed;z-index:6550;top:96px;left:18px;width:360px;max-height:calc(100vh - 120px);overflow:auto;background:rgba(255,255,255,.97);border-radius:24px;border:1px solid rgba(255,255,255,.8);box-shadow:0 22px 60px rgba(15,23,42,.22);padding:20px;transform:translateX(calc(-100% - 35px));opacity:0;transition:.24s ease;backdrop-filter:blur(16px)}.v2-panel.open{transform:none;opacity:1}.v2-panel-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}.v2-panel-head small{font-size:10px;font-weight:900;letter-spacing:.12em;color:#94a3b8}.v2-panel-head h2{font-size:24px;margin:2px 0 0;color:var(--ink)}.v2-close{border:0;width:36px;height:36px;border-radius:11px;background:#f1f5f9;color:var(--ink);cursor:pointer}.v2-intro{font-size:13px;color:var(--muted);margin:0 0 14px}.v2-card{border:1px solid var(--line);border-radius:17px;overflow:hidden;background:#fff}.v2-source{min-height:62px;padding:10px 12px;display:flex;align-items:center;gap:11px;border-bottom:1px solid var(--line);cursor:pointer}.v2-source:last-child{border:0}.v2-source-dot{width:38px;height:38px;border-radius:12px;background:var(--dot);color:#fff;display:grid;place-items:center;flex:none}.v2-source-name{font-size:13px;font-weight:750;color:var(--ink);flex:1}.v2-source-name small{display:block;font-size:10px;color:#94a3b8;font-weight:600;margin-top:3px}.v2-source input{display:none}.v2-switch{width:40px;height:23px;border-radius:99px;background:#cbd5e1;position:relative;transition:.2s}.v2-switch:after{content:"";position:absolute;width:17px;height:17px;top:3px;left:3px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #64748b;transition:.2s}.v2-source input:checked+.v2-switch{background:#16a34a}.v2-source input:checked+.v2-switch:after{left:20px}.v2-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.v2-actions button{border:1px solid var(--line);background:#fff;padding:10px;border-radius:12px;font-weight:700;color:#334155;cursor:pointer}
.v2-feature{display:grid;grid-template-columns:48px 1fr auto;gap:12px;align-items:center;padding:14px;margin-bottom:10px;border:1px solid var(--line);border-radius:17px}.v2-feature>span{width:46px;height:46px;border-radius:14px;background:#eff6ff;color:#2563eb;display:grid;place-items:center;font-size:19px}.v2-feature b{font-size:14px}.v2-feature small{display:block;color:var(--muted);font-size:11px;margin-top:3px;line-height:1.35}.v2-feature button,.v2-flight-hero button{border:0;background:var(--ink);color:#fff;border-radius:11px;padding:9px 12px;font-weight:800;cursor:pointer}.v2-flight-hero{text-align:center;padding:28px 18px;border-radius:19px;background:linear-gradient(145deg,#0f172a,#1e293b);color:#fff}.v2-flight-hero>i{font-size:32px}.v2-flight-hero h3{margin:12px 0 6px}.v2-flight-hero p{font-size:12px;line-height:1.5;color:#cbd5e1}.v2-flight-hero button{background:#fff;color:#0f172a;margin-top:8px}.v2-tip{display:flex;gap:9px;align-items:center;padding:13px;margin-top:10px;border-radius:14px;background:#f8fafc;color:#64748b;font-size:11px}.v2-settings button{width:100%;border:0;background:#fff;padding:14px;display:grid;grid-template-columns:30px 1fr 15px;text-align:left;align-items:center;border-bottom:1px solid var(--line);cursor:pointer;color:var(--ink)}.v2-settings button:last-child{border:0}.v2-settings small{display:block;color:var(--muted);margin-top:2px}
.v2-quick{position:fixed;z-index:6500;right:18px;bottom:20px;display:flex;flex-direction:column;gap:9px}.v2-quick button{width:52px;height:52px;border:0;border-radius:17px;background:#fff;color:var(--ink);box-shadow:0 10px 28px rgba(15,23,42,.18);font-size:18px;cursor:pointer}.v2-quick button:nth-child(2){background:#2563eb;color:#fff}.v2-quick button:nth-child(3){background:var(--ink);color:#fff}
/* Hide legacy UI that V2 replaces */.fab-wrap{display:none!important}.leaflet-control-layers{margin-top:90px!important}.leaflet-draw{margin-top:90px!important}.fullscreen-overlay{background:#fff!important}.fullscreen-overlay .header{height:54px!important;background:#0b1220!important;border:0!important;padding:0 20px!important}.fullscreen-overlay .popup-title{height:44px!important;background:#fff!important;border-bottom:1px solid #e5e7eb!important}.radar-bar{bottom:20px!important}.radar-badge{bottom:24px!important}
@media(max-width:700px){.v2-topbar{top:10px;width:calc(100vw - 20px);grid-template-columns:48px 1fr 44px;height:60px}.v2-brand{font-size:0}.v2-brand>span:last-child{display:none}.v2-logo{width:40px;height:40px}.v2-tabs button span{display:none}.v2-tabs button{font-size:17px}.v2-panel{top:auto;left:8px;right:8px;bottom:8px;width:auto;max-height:68vh;border-radius:24px;transform:translateY(calc(100% + 20px))}.v2-panel.open{transform:none}.v2-quick{right:12px;bottom:14px}.v2-quick button{width:48px;height:48px;border-radius:15px}.leaflet-control-layers,.leaflet-draw{margin-top:76px!important}.radar-bar{left:8px!important;right:70px!important;bottom:10px!important}.radar-legend-img{max-width:40vw!important}}
/* ICEWEBCAMS V3 OVERRIDES */
.leaflet-control-layers{display:none!important}
.v3-topbar{grid-template-columns:190px 1fr!important}
.v3-topbar .v2-tabs{grid-template-columns:repeat(4,1fr)}
.v3-logo{font-size:12px;font-weight:900;letter-spacing:-.04em}
.v3-flight-live{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}.v3-flight-live>div{padding:12px 8px;border:1px solid var(--line);border-radius:14px;text-align:center;background:#fff}.v3-flight-live small{display:block;font-size:9px;color:#94a3b8;font-weight:900;letter-spacing:.06em}.v3-flight-live b{display:block;margin-top:4px;font-size:15px;color:var(--ink)}
.v3-flight-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.v3-flight-actions button{border:1px solid var(--line);background:#fff;color:var(--ink);padding:11px;border-radius:12px;font-weight:800}.v3-flight-actions .primary{background:#0b1220;color:#fff;grid-column:2}.v3-flight-actions button:last-child{grid-column:1/-1;color:#be123c}.v3-flight-actions button:disabled{opacity:.4}
.v3-map-choice{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:12px}.v3-map-choice button{border:1px solid var(--line);background:#fff;border-radius:15px;padding:15px 8px;display:flex;flex-direction:column;gap:7px;align-items:center;font-weight:800;color:#64748b}.v3-map-choice button.active{background:#0b1220;color:#fff;border-color:#0b1220}.v3-map-choice i{font-size:20px}
.flight-path{cursor:grab}.flight-path:active{cursor:grabbing}
@media(max-width:700px){.v3-topbar{grid-template-columns:46px 1fr!important;padding:6px!important;gap:5px;top:max(10px,env(safe-area-inset-top))!important}.v3-topbar .v2-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:2px}.v3-topbar .v2-tabs button{min-width:0;padding:0;font-size:16px}.v3-topbar .v2-tabs button span{display:none!important}.v3-brand{min-width:0;padding:0}.v3-logo{width:38px!important;height:38px!important;border-radius:12px!important}.leaflet-draw{margin-top:76px!important}.v3-flight-live{gap:5px}.v3-flight-live b{font-size:13px}}

/* ================= V4 FLIGHT UX ================= */
.v4-flight-compact{display:flex;flex-direction:column;gap:10px}.v4-flight-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.v4-flight-summary b{font-size:15px;color:var(--ink)}.v4-flight-summary span{font-size:12px;font-weight:800;color:#64748b;background:#f1f5f9;padding:6px 9px;border-radius:999px}.v4-flight-actions{display:grid;grid-template-columns:1fr 1.25fr 42px;gap:7px}.v4-flight-actions button{height:42px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-weight:800}.v4-flight-actions .primary,.v4-result-actions .primary{background:#0b1220;color:#fff;border-color:#0b1220}.v4-flight-actions .icon-danger{color:#be123c;padding:0}.v4-result-total{display:grid;grid-template-columns:1fr 1fr;gap:8px}.v4-result-total>div{padding:14px;border:1px solid var(--line);border-radius:16px;background:#fff}.v4-result-total small{display:block;font-size:9px;letter-spacing:.08em;font-weight:900;color:#94a3b8}.v4-result-total b{display:block;margin-top:5px;font-size:21px;color:var(--ink)}.v4-speed{margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;display:flex;align-items:center;justify-content:space-between}.v4-speed>span{font-weight:800;color:#475569}.v4-speed>div{display:flex;align-items:center;gap:10px}.v4-speed button{width:34px;height:34px;border:0;border-radius:10px;background:#f1f5f9;font-size:20px;font-weight:800}.v4-edit-help{display:flex;gap:10px;align-items:flex-start;margin-top:10px;padding:11px 12px;border-radius:14px;background:#fff7ed;color:#7c2d12;font-size:12px;line-height:1.35}.v4-edit-help i{margin-top:2px}.v4-edit-help b{display:block}.v4-legs{margin-top:10px;border:1px solid var(--line);border-radius:14px;overflow:hidden}.v4-leg{display:grid;grid-template-columns:1fr auto auto;gap:12px;padding:9px 11px;border-bottom:1px solid var(--line);font-size:12px;align-items:center}.v4-leg:last-child{border:0}.v4-leg span{color:#64748b}.v4-leg b{color:var(--ink)}.v4-leg em{font-style:normal;color:#64748b;font-weight:700}.v4-result-actions{display:grid;grid-template-columns:1.4fr 1fr;gap:8px;margin-top:10px}.v4-result-actions button{height:42px;border:1px solid var(--line);border-radius:12px;background:#fff;font-weight:800;color:var(--ink)}.v4-result-actions button:last-child{color:#be123c}.v4-drag-handle{width:28px;height:28px;border-radius:50%;background:#fff;border:3px solid #ff00ff;box-shadow:0 3px 12px rgba(0,0,0,.3);display:grid;place-items:center;color:#a21caf;font-size:10px}.v4-drag-handle-wrap{background:transparent!important;border:0!important}.v4-flight-edit-path{filter:drop-shadow(0 0 4px rgba(255,255,255,.95)) drop-shadow(0 0 5px rgba(255,0,255,.65));stroke-dasharray:10 5}
@media(max-width:700px){.v2-panel:has(.v4-flight-compact){max-height:none;padding:14px 16px 16px}.v2-panel:has(.v4-flight-compact) .v2-panel-head{margin-bottom:8px}.v2-panel:has(.v4-flight-compact) .v2-panel-head small{display:none}.v2-panel:has(.v4-flight-compact) .v2-panel-head h2{font-size:18px}.v4-flight-summary{gap:6px}.v4-flight-summary span{font-size:11px;padding:5px 7px}.v4-flight-actions button span{display:inline}.v4-result-total b{font-size:18px}.v4-leg{grid-template-columns:1fr auto auto}.v4-edit-help{font-size:11px}}

/* V5 — live route shaping while drawing */
.v5-flight-editable-path {
  stroke: #ff00d4 !important;
  stroke-width: 6px !important;
  filter: drop-shadow(0 0 5px rgba(255,255,255,.95)) drop-shadow(0 0 7px rgba(255,0,212,.65));
  transition: stroke .15s ease, stroke-width .15s ease, filter .15s ease;
}
.v5-flight-editable-path.v5-route-hot,
.v5-flight-editable-path.v5-route-dragging {
  stroke: #00d9ff !important;
  stroke-width: 8px !important;
  filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 9px rgba(0,217,255,.95));
}
.v5-drag-handle-wrap { background:transparent!important; border:0!important; }
.v5-drag-handle {
  width:34px;height:34px;border-radius:50%;display:grid;place-items:center;
  cursor:grab;touch-action:none;
}
.v5-drag-handle:active { cursor:grabbing; }
.v5-drag-handle span {
  width:14px;height:14px;border-radius:50%;background:#fff;
  border:3px solid #ff00d4;box-shadow:0 2px 8px rgba(0,0,0,.28),0 0 0 4px rgba(255,255,255,.38);
}
.v5-drag-handle:hover span { border-color:#00d9ff; transform:scale(1.18); }
@media (max-width:767px){
  .v5-drag-handle { width:38px;height:38px; }
  .v5-drag-handle span { width:16px;height:16px;border-width:3px; }
}

/* ================= V6 ROUTE EDITOR ================= */
.v6-flight-editable-path{
  stroke:#ff00d4!important;stroke-width:6px!important;
  filter:drop-shadow(0 0 4px rgba(255,255,255,.9));
}
.v6-active-leg{
  stroke:#00d9ff!important;stroke-width:9px!important;
  filter:drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px rgba(0,217,255,.9));
  pointer-events:none;
}
.v6-handle-wrap,.v6-waypoint-wrap{background:transparent!important;border:0!important}
.v6-drag-handle,.v6-waypoint{width:38px;height:38px;display:grid;place-items:center;cursor:grab;touch-action:none}
.v6-drag-handle:active,.v6-waypoint:active{cursor:grabbing}
.v6-drag-handle span{width:14px;height:14px;border-radius:50%;background:#fff;border:3px solid #ff00d4;box-shadow:0 2px 8px rgba(0,0,0,.28),0 0 0 4px rgba(255,255,255,.38)}
.v6-waypoint span{width:18px;height:18px;border-radius:50%;background:#ff00d4;border:3px solid #fff;box-shadow:0 2px 9px rgba(0,0,0,.35),0 0 0 2px #ff00d4}
.v6-drag-handle:hover span,.v6-waypoint:hover span{transform:scale(1.18)}
@media(max-width:767px){.v6-drag-handle,.v6-waypoint{width:44px;height:44px}.v6-drag-handle span{width:16px;height:16px}.v6-waypoint span{width:20px;height:20px}}

/* V8 mobile map-control spacing: keep Leaflet controls clear of the top app bar. */
@media (max-width:700px){
  .leaflet-top.leaflet-left{
    top:82px !important;
  }
  .leaflet-top.leaflet-left .leaflet-control{
    margin-left:10px !important;
  }
  .leaflet-top.leaflet-left .leaflet-control-zoom{
    margin-top:10px !important;
  }
  .leaflet-top.leaflet-left .leaflet-draw{
    margin-top:10px !important;
  }
  .radar-bar{
    left:14px !important;
    right:14px !important;
    width:auto !important;
    bottom:calc(14px + env(safe-area-inset-bottom)) !important;
  }
  .radar-badge{
    bottom:calc(18px + env(safe-area-inset-bottom)) !important;
  }
}


/* V9: four-item top bar without the IW brand block. */
.v3-topbar{
  grid-template-columns:1fr !important;
  width:min(620px,calc(100vw - 32px)) !important;
}
.v3-topbar .v2-tabs{width:100%;}

/* V9: make native Leaflet controls visually match the app controls. */
.leaflet-control-zoom,
.leaflet-draw-toolbar{
  border:0 !important;
  border-radius:16px !important;
  overflow:hidden;
  box-shadow:0 10px 28px rgba(15,23,42,.16) !important;
  background:rgba(255,255,255,.96) !important;
}
.leaflet-control-zoom a,
.leaflet-draw-toolbar a{
  width:44px !important;
  height:44px !important;
  line-height:44px !important;
  border:0 !important;
  border-bottom:1px solid #e5e7eb !important;
  background-color:rgba(255,255,255,.96) !important;
  color:#0f172a !important;
}
.leaflet-control-zoom a:last-child,
.leaflet-draw-toolbar a:last-child{border-bottom:0 !important;}
.leaflet-control-zoom a:hover,
.leaflet-draw-toolbar a:hover{background-color:#f1f5f9 !important;}
.leaflet-draw-section{margin-bottom:10px;}
.leaflet-draw-section:last-child{margin-bottom:0;}

@media(max-width:700px){
  .v3-topbar{
    grid-template-columns:1fr !important;
    width:calc(100vw - 28px) !important;
    left:14px !important;
    right:14px !important;
    transform:none !important;
  }
  .v3-topbar .v2-tabs button{font-size:18px !important;}
  .leaflet-control-zoom,
  .leaflet-draw-toolbar{border-radius:14px !important;}
  .leaflet-control-zoom a,
  .leaflet-draw-toolbar a{
    width:46px !important;
    height:46px !important;
    line-height:46px !important;
  }
}

/* ================= V10 LEAFLET DRAW CONTROL FIX =================
   Leaflet.Draw floats toolbar anchors by default. With the larger V9 touch
   targets that allowed the next icon to peek out on the right. Force every
   draw tool into one vertical, rounded column. */
.leaflet-draw-toolbar {
  width:44px !important;
  min-width:44px !important;
  max-width:44px !important;
  overflow:hidden !important;
}
.leaflet-draw-toolbar a {
  display:block !important;
  float:none !important;
  clear:both !important;
  margin:0 !important;
  box-sizing:border-box !important;
}
.leaflet-draw-section {
  width:44px !important;
  margin-right:0 !important;
}
.leaflet-draw-section .leaflet-draw-toolbar {
  margin:0 !important;
}

@media(max-width:700px){
  .leaflet-draw-toolbar,
  .leaflet-draw-section{
    width:46px !important;
    min-width:46px !important;
    max-width:46px !important;
  }
  .leaflet-draw-toolbar a{
    display:block !important;
    float:none !important;
    clear:both !important;
  }

  /* Keep the left-side tools compact and deliberately aligned. */
  .leaflet-top.leaflet-left .leaflet-control-zoom{
    margin-bottom:8px !important;
  }
  .leaflet-top.leaflet-left .leaflet-draw{
    margin-top:0 !important;
  }
  .leaflet-draw-section{
    margin-bottom:8px !important;
  }
}

/* ================= V11 CUSTOM MAP DRAW TOOLS =================
   Leaflet.Draw's sprite toolbar is hidden/replaced with our own stable icons. */
.leaflet-draw{display:none !important;}
.iwc-draw-control.leaflet-bar{
  display:flex;
  flex-direction:column;
  gap:0;
  padding:0;
  border:0 !important;
  border-radius:16px !important;
  overflow:hidden;
  background:rgba(255,255,255,.96);
  box-shadow:0 10px 28px rgba(15,23,42,.16) !important;
}
.iwc-draw-control .iwc-map-tool{
  appearance:none;
  -webkit-appearance:none;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  margin:0;
  padding:0;
  border:0;
  border-bottom:1px solid #e5e7eb;
  border-radius:0;
  background:rgba(255,255,255,.96);
  color:#0f172a;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}
.iwc-draw-control .iwc-map-tool:last-child{border-bottom:0;}
.iwc-draw-control .iwc-map-tool:hover,
.iwc-draw-control .iwc-map-tool:focus-visible{background:#f1f5f9;outline:none;}
.iwc-draw-control .iwc-map-tool.is-active{background:#0f172a;color:#fff;}
.iwc-draw-control .iwc-map-tool-danger{color:#b91c1c;}
.iwc-draw-control .iwc-map-tool i{pointer-events:none;}

@media(max-width:700px){
  .iwc-draw-control.leaflet-bar{border-radius:14px !important;}
  .iwc-draw-control .iwc-map-tool{width:46px;height:46px;font-size:19px;}
  /* Custom control follows zoom naturally in the same Leaflet stack. */
  .leaflet-top.leaflet-left .iwc-draw-control{margin-top:8px !important;}
}

/* ================= V12 ISAVIA IWS LIVE WEATHER ================= */
.iws-card{background:#0f172a;color:#fff;border-radius:18px;padding:14px;margin-bottom:12px;box-shadow:0 12px 30px rgba(15,23,42,.18)}
.iws-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.iws-head>div{display:flex;flex-direction:column;gap:2px}.iws-head small{font-size:10px;letter-spacing:.09em;color:#94a3b8}.iws-head b{font-size:15px}.iws-live{font-size:10px;font-weight:800;letter-spacing:.08em;color:#bbf7d0;display:flex;align-items:center;gap:5px}.iws-live i{width:7px;height:7px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.13)}
.iws-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}.iws-grid>div{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.07);border-radius:12px;padding:9px 10px;min-height:53px}.iws-grid small{display:block;color:#94a3b8;font-size:10px;text-transform:uppercase;letter-spacing:.06em;margin-bottom:3px}.iws-grid b{font-size:18px}.iws-grid b.iws-small{font-size:12px;line-height:1.25;display:block}.iws-grid em{font-size:11px;font-style:normal;color:#cbd5e1;margin-left:2px}
.iws-rwys{border-top:1px solid rgba(255,255,255,.1);border-bottom:1px solid rgba(255,255,255,.1)}.iws-rwy{display:flex;justify-content:space-between;align-items:center;padding:8px 1px;border-bottom:1px solid rgba(255,255,255,.07);gap:10px}.iws-rwy:last-child{border-bottom:0}.iws-rwy>div{display:flex;flex-direction:column}.iws-rwy b{font-size:12px}.iws-rwy small{font-size:10px;color:#94a3b8}.iws-rwy>span{text-align:right;font-size:12px;font-weight:800}.iws-rwy>span small{display:block;font-weight:500}
.iws-foot{display:flex;align-items:center;justify-content:space-between;padding-top:10px;color:#94a3b8;font-size:10px}.iws-foot button,.iws-error button{border:0;border-radius:9px;background:rgba(255,255,255,.1);color:#fff;padding:7px 9px;font-size:10px;font-weight:700}.iws-loading,.iws-error{min-height:90px;display:flex;align-items:center;justify-content:center;gap:8px;text-align:center;color:#cbd5e1;font-size:12px}.iws-error{flex-direction:column}.iws-error small{color:#94a3b8}
@media(max-width:700px){.iws-card{border-radius:16px;padding:12px}.iws-grid{gap:6px}.iws-grid>div{padding:8px}.iws-rwy{padding:7px 1px}}

/* ================= V14 MULTI-AIRPORT IWS ================= */
.iws-picker{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-2px 0 12px;padding-bottom:11px;border-bottom:1px solid rgba(255,255,255,.1)}
.iws-picker label{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#94a3b8;white-space:nowrap}
.iws-picker select{min-width:0;max-width:68%;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:#1e293b;color:#fff;padding:8px 30px 8px 10px;font-size:11px;font-weight:700;outline:none}
.iws-picker select:focus{border-color:#60a5fa;box-shadow:0 0 0 3px rgba(96,165,250,.15)}
.iws-no-rwy{padding:12px 2px;color:#94a3b8;font-size:11px;text-align:center}
@media(max-width:700px){.iws-picker{align-items:stretch;flex-direction:column;gap:6px}.iws-picker select{max-width:none;width:100%;font-size:12px}}
.iws-clouds{grid-column:span 2}.iws-clouds>small{display:block;margin-bottom:5px}.iws-cloud-row{display:grid;grid-template-columns:28px 46px 1fr;gap:7px;align-items:center;font-size:12px;margin:2px 0}.iws-cloud-row span{opacity:.65}.iws-cloud-row b{font-size:12px}.iws-cloud-row strong{font-size:12px;font-weight:700}.iws-cloud-empty{font-weight:700}


/* V15.1 — Weather panel can use the full screen and sit above the floating top menu. */
.v2-panel.weather-expanded{
  z-index:7000;
  top:8px;
  bottom:8px;
  left:8px;
  width:min(520px,calc(100vw - 16px));
  max-height:none;
  height:calc(100dvh - 16px);
  border-radius:24px;
  padding:20px;
}
@media(max-width:700px){
  .v2-panel.weather-expanded{
    top:max(6px,env(safe-area-inset-top));
    right:6px;
    bottom:max(6px,env(safe-area-inset-bottom));
    left:6px;
    width:auto;
    height:auto;
    max-height:none;
    border-radius:22px;
    padding:16px;
    transform:translateY(calc(100% + 20px));
  }
  .v2-panel.weather-expanded.open{transform:none;}
  .v2-panel.weather-expanded .v2-panel-head{
    position:sticky;
    top:-16px;
    z-index:2;
    margin:-16px -16px 14px;
    padding:16px 16px 10px;
    background:rgba(255,255,255,.97);
    backdrop-filter:blur(16px);
  }
}

/* V15.2 — true weather fullscreen layer, sticky close header, source link */
.v3-shell.weather-open .v3-topbar{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.v2-panel.weather-expanded{
  z-index:9000 !important;
  overflow-y:auto;
  overscroll-behavior:contain;
}
.v2-panel.weather-expanded .v2-panel-head{
  position:sticky;
  top:-20px;
  z-index:20;
  margin:-20px -20px 14px;
  padding:20px 20px 12px;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid rgba(226,232,240,.9);
  backdrop-filter:blur(18px);
}
.v2-panel.weather-expanded .v2-close{
  position:relative;
  z-index:21;
  flex:0 0 auto;
}
.iws-source-link{
  margin-top:10px;
  min-height:40px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  color:#e2e8f0;
  background:rgba(255,255,255,.08);
  text-decoration:none;
  font-size:11px;
  font-weight:800;
}
.iws-source-link:hover{background:rgba(255,255,255,.13);color:#fff;}
@media(max-width:700px){
  .v2-panel.weather-expanded .v2-panel-head{
    top:-16px;
    margin:-16px -16px 12px;
    padding:16px 16px 11px;
  }
  .v2-panel.weather-expanded .v2-close{
    position:sticky;
    top:0;
  }
}

/* V15.3 — Weather landing menu + true fullscreen mobile weather sheet */
.weather-menu{display:grid;gap:12px}
.weather-menu-card{width:100%;border:1px solid var(--line);cursor:pointer;text-align:left;margin:0}
.weather-menu-card>div{flex:1}
.weather-chevron{color:#94a3b8;font-size:14px;margin-left:auto}
.weather-back{display:inline-flex;align-items:center;gap:8px;border:0;background:#eef2f7;color:#0f172a;border-radius:12px;padding:10px 13px;margin:0 0 12px;font-size:12px;font-weight:800;cursor:pointer}
.weather-back:hover{background:#e2e8f0}
/* External source now reads visually as a secondary app button, never a browser-blue link. */
.iws-source-link,.iws-source-link:link,.iws-source-link:visited{color:#fff!important;background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.16);text-decoration:none!important}
.iws-source-link:hover,.iws-source-link:active{color:#fff!important;background:rgba(255,255,255,.16)}
@media(max-width:700px){
  .v2-panel.weather-expanded{
    position:fixed!important;
    inset:env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0!important;
    width:100vw!important;
    height:auto!important;
    max-height:none!important;
    border-radius:0!important;
    padding:0 16px 18px!important;
    overflow-y:auto!important;
    z-index:12000!important;
  }
  .v2-panel.weather-expanded .v2-panel-head{
    position:sticky!important;
    top:0!important;
    z-index:12010!important;
    margin:0 -16px 14px!important;
    padding:14px 16px 12px!important;
    min-height:66px;
    align-items:center;
    background:rgba(255,255,255,.985)!important;
    box-shadow:0 1px 0 rgba(226,232,240,.95);
  }
  .v2-panel.weather-expanded .v2-close{
    position:relative!important;
    top:auto!important;
    width:42px;height:42px;border-radius:13px;
  }
  .v3-shell.weather-open .v3-topbar{display:none!important}
  .weather-menu{padding-top:2px}
}

/* ================= V15.4 WEATHER SHEET POSITION =================
   Keep the floating navigation visible. On phones the weather sheet starts
   below the navigation instead of trying to cover it. The sheet itself scrolls,
   while its header/close button remains pinned to the top of the sheet. */
.v3-shell.weather-open .v3-topbar{
  display:grid!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
}

@media(max-width:700px){
  .v2-panel.weather-expanded{
    /* top bar: 10px top + 60px height; 10px breathing room below */
    inset:80px 8px max(8px,env(safe-area-inset-bottom)) 8px!important;
    width:auto!important;
    height:auto!important;
    max-height:none!important;
    border-radius:24px!important;
    padding:0 16px 18px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    z-index:6550!important; /* below the floating top bar (6600) */
  }
  .v2-panel.weather-expanded .v2-panel-head{
    position:sticky!important;
    top:0!important;
    z-index:20!important;
    margin:0 -16px 14px!important;
    padding:14px 16px 12px!important;
    min-height:66px;
    align-items:center;
    border-radius:24px 24px 0 0;
    background:rgba(255,255,255,.985)!important;
    box-shadow:0 1px 0 rgba(226,232,240,.95);
    backdrop-filter:blur(18px);
  }
  .v2-panel.weather-expanded .v2-close{
    position:relative!important;
    top:auto!important;
    z-index:21!important;
  }
}


/* ================= V15.6 WEATHER POPUP =================
   Weather should feel like a floating card, not a full-screen sheet.
   The top navigation stays visible. The card sizes to its content, with a
   viewport cap for airport weather; only the card body scrolls when needed. */
@media(max-width:700px){
  .v2-panel.weather-expanded{
    top:82px!important;
    right:12px!important;
    bottom:auto!important;
    left:12px!important;
    inset:auto 12px auto 12px!important;
    top:82px!important;
    width:auto!important;
    height:auto!important;
    max-height:calc(100dvh - 100px)!important;
    border-radius:24px!important;
    padding:0 16px 18px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    z-index:6550!important;
    box-shadow:0 22px 60px rgba(15,23,42,.28)!important;
  }
  .v2-panel.weather-expanded .v2-panel-head{
    position:sticky!important;
    top:0!important;
    z-index:20!important;
    margin:0 -16px 14px!important;
    padding:14px 16px 12px!important;
    min-height:62px;
    border-radius:24px 24px 0 0!important;
    background:rgba(255,255,255,.985)!important;
    box-shadow:0 1px 0 rgba(226,232,240,.95);
    backdrop-filter:blur(18px);
  }
  .v2-panel.weather-expanded .v2-close{
    position:relative!important;
    top:auto!important;
    z-index:21!important;
    flex:0 0 auto;
  }
  .v3-shell.weather-open .v3-topbar{
    display:grid!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
}

/* ================= V15.6 DESKTOP WEATHER LAYOUT =================
   Keep the compact floating-card treatment on phones, but use the extra
   space available on laptops/desktops. The weather panel remains a popup,
   with visible rounded corners and map around it. */
@media(min-width:701px){
  .v2-panel.weather-expanded{
    top:96px!important;
    left:max(24px,calc(50vw - 410px))!important;
    right:auto!important;
    bottom:auto!important;
    width:min(820px,calc(100vw - 48px))!important;
    height:auto!important;
    max-height:calc(100dvh - 120px)!important;
    border-radius:28px!important;
    padding:0 24px 24px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    box-shadow:0 26px 72px rgba(15,23,42,.26)!important;
  }
  .v2-panel.weather-expanded .v2-panel-head{
    position:sticky!important;
    top:0!important;
    z-index:20!important;
    margin:0 -24px 18px!important;
    padding:18px 24px 14px!important;
    min-height:72px;
    align-items:center;
    border-radius:28px 28px 0 0!important;
    background:rgba(255,255,255,.985)!important;
    box-shadow:0 1px 0 rgba(226,232,240,.95);
    backdrop-filter:blur(18px);
  }
  .v2-panel.weather-expanded .v2-close{
    position:relative!important;
    top:auto!important;
    width:42px;
    height:42px;
    border-radius:13px;
  }
  .weather-menu{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
  }
  .weather-menu-card{
    min-height:96px;
    border-radius:18px;
  }
  .iws-card{
    padding:18px;
    border-radius:20px;
  }
  .iws-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
  }
  .iws-clouds{grid-column:span 2}
  .iws-picker{
    align-items:center;
  }
}

@media(min-width:1200px){
  .v2-panel.weather-expanded{
    left:max(28px,calc(50vw - 450px))!important;
    width:min(900px,calc(100vw - 56px))!important;
  }
}
/* V15.11 — official METAR / TAF from Veðurstofa Íslands */
.aviation-loading{margin-top:14px;padding:14px;border-radius:14px;background:rgba(255,255,255,.055);font-size:13px;color:rgba(255,255,255,.72)}
.aviation-text{display:grid;gap:10px;margin-top:14px}.aviation-msg{padding:13px 14px;border:1px solid rgba(255,255,255,.09);border-radius:14px;background:rgba(255,255,255,.045)}
.aviation-msg>div{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.aviation-msg b{font-size:12px;letter-spacing:.08em}.aviation-msg small{font-size:10px;opacity:.55}
.aviation-msg code{display:block;white-space:normal;overflow-wrap:anywhere;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;line-height:1.55;color:inherit;background:none;padding:0}
.aviation-empty{padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.04);font-size:12px;opacity:.68}

/* V15.11 — restrained aviation metric icons */
.metric-label{display:flex!important;align-items:center;gap:7px}
.metric-label i{width:14px;text-align:center;font-size:12px;opacity:.58}
.rwy-icon{font-size:11px;opacity:.52;margin-right:5px}

/* V15.11 — clearer, professional aviation accent icons */
.metric-label i,.rwy-icon,.aviation-title-icon{color:#39c6a3!important;opacity:1!important}
.metric-label i{font-size:13px;filter:drop-shadow(0 0 7px rgba(57,198,163,.16))}
.rwy-icon{font-size:12px}
.aviation-title-icon{width:15px;text-align:center;margin-right:7px;font-size:12px}
.aviation-msg>div b{display:flex;align-items:center}

/* ================= V15.11 DESKTOP CENTERED PANELS =================
   On laptop/desktop every main app panel opens centered horizontally.
   Mobile keeps the compact bottom-sheet behavior. */
@media (min-width:701px){
  .v2-panel{
    left:50%!important;
    right:auto!important;
    transform:translate(-50%,0)!important;
    width:min(520px,calc(100vw - 48px));
  }
  .v2-panel:not(.open){
    transform:translate(-50%,-10px)!important;
    pointer-events:none;
  }
  .v2-panel.open{transform:translate(-50%,0)!important;}
  .v2-panel.weather-expanded{
    left:50%!important;
    transform:translateX(-50%)!important;
  }
}

/* V15.11 — Brunnur forecast embedded inside the Weather popup */
.brunn-frame-wrap{
  width:100%;
  height:min(68vh,720px);
  min-height:420px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}
.brunn-frame{display:block;width:100%;height:100%;border:0;background:#fff}
@media(max-width:700px){
  .brunn-frame-wrap{height:56vh;min-height:360px;border-radius:16px}
}

/* V15.12 */


/* ================= V15.13 MOBILE PANEL ALIGNMENT =================
   All primary panels open directly below the floating navigation on phones,
   matching the Weather panel position. */
@media (max-width:700px){
  .v2-panel,
  .v2-panel.weather-expanded{
    top:82px!important;
    left:10px!important;
    right:10px!important;
    bottom:auto!important;
    width:auto!important;
    max-height:calc(100dvh - 94px)!important;
    border-radius:24px!important;
    transform:translateY(-10px)!important;
    opacity:0;
    overflow:auto;
  }
  .v2-panel.open,
  .v2-panel.weather-expanded.open{
    transform:none!important;
    opacity:1;
  }
}

/* ================= V15.14 iPHONE PANEL POSITION FIX =================
   Force every main V2 panel to use the same top-anchored mobile geometry as
   Weather. This deliberately comes last in the stylesheet so the old bottom
   sheet rules cannot win in Safari. */
@media screen and (max-width:700px) {
  body .v2-panel,
  body .v2-panel.weather-expanded {
    position: fixed !important;
    top: calc(82px + env(safe-area-inset-top, 0px)) !important;
    left: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: calc(100dvh - 96px - env(safe-area-inset-top, 0px)) !important;
    margin: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(0,-8px,0) !important;
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
  }
  body .v2-panel.open,
  body .v2-panel.weather-expanded.open {
    top: calc(82px + env(safe-area-inset-top, 0px)) !important;
    bottom: auto !important;
    transform: translate3d(0,0,0) !important;
    opacity: 1 !important;
    visibility: visible;
    pointer-events: auto;
  }
}

/* ================= V15.15 COMPACT FLIGHT TOOL =================
   Flight is an on-map working tool, not a content popup. Keep it compact and
   away from the top navigation so the route remains visible while editing. */
@media (min-width:701px){
  body .v2-panel.flight-panel{
    top:128px!important;
    left:auto!important;
    right:24px!important;
    bottom:auto!important;
    width:min(390px,calc(100vw - 48px))!important;
    max-height:calc(100vh - 160px)!important;
    transform:translate3d(0,-8px,0)!important;
    border-radius:22px!important;
  }
  body .v2-panel.flight-panel.open{transform:translate3d(0,0,0)!important;}
  body .v2-panel.flight-panel .v2-panel-head{margin-bottom:8px;}
  body .v2-panel.flight-panel .v2-intro{margin-bottom:10px;}
}
@media screen and (max-width:700px){
  body .v2-panel.flight-panel,
  body .v2-panel.flight-panel.open{
    position:fixed!important;
    top:auto!important;
    left:10px!important;
    right:10px!important;
    bottom:calc(14px + env(safe-area-inset-bottom,0px))!important;
    width:auto!important;
    height:auto!important;
    max-height:min(46dvh,430px)!important;
    margin:0!important;
    border-radius:22px!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  body .v2-panel.flight-panel{transform:translate3d(0,12px,0)!important;}
  body .v2-panel.flight-panel.open{transform:translate3d(0,0,0)!important;}
  body .v2-panel.flight-panel .v2-panel-head{margin-bottom:6px;}
  body .v2-panel.flight-panel .v2-panel-head small{display:none;}
  body .v2-panel.flight-panel .v2-panel-head h2{font-size:18px;}
  body .v2-panel.flight-panel .v2-flight-hero{padding-top:4px;padding-bottom:4px;}
  body .v2-panel.flight-panel .v2-flight-hero>i{font-size:25px;margin-bottom:5px;}
  body .v2-panel.flight-panel .v2-flight-hero h3{margin:3px 0 5px;}
  body .v2-panel.flight-panel .v2-flight-hero p{margin:0 0 10px;font-size:12px;line-height:1.4;}
}


/* ================= V15.16 FLIGHT PANEL POSITION FIX =================
   Flight is intentionally kept low on the map on both desktop and iPhone.
   These rules are last so older generic panel positioning cannot override it. */
@media screen and (min-width:701px){
  html body .v3-shell #v3Panel.v2-panel.flight-panel,
  html body .v3-shell #v3Panel.v2-panel.flight-panel.open{
    position:fixed!important;
    top:auto!important;
    left:auto!important;
    right:24px!important;
    bottom:24px!important;
    width:min(390px,calc(100vw - 48px))!important;
    max-height:calc(100dvh - 130px)!important;
    margin:0!important;
  }
  html body .v3-shell #v3Panel.v2-panel.flight-panel{
    transform:translate3d(0,10px,0)!important;
  }
  html body .v3-shell #v3Panel.v2-panel.flight-panel.open{
    transform:translate3d(0,0,0)!important;
  }
}
@media screen and (max-width:700px){
  html body .v3-shell #v3Panel.v2-panel.flight-panel,
  html body .v3-shell #v3Panel.v2-panel.flight-panel.open{
    position:fixed!important;
    top:auto!important;
    left:10px!important;
    right:10px!important;
    bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
    width:auto!important;
    height:auto!important;
    max-height:44dvh!important;
    margin:0!important;
    border-radius:22px!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  html body .v3-shell #v3Panel.v2-panel.flight-panel{
    transform:translate3d(0,12px,0)!important;
  }
  html body .v3-shell #v3Panel.v2-panel.flight-panel.open{
    transform:translate3d(0,0,0)!important;
  }
}

/* ================= V15.17 FLIGHT PANEL: BOTTOM CENTER =================
   Desktop/Mac: keep the compact Flight tool low on the map, centered horizontally.
   Mobile/iPhone remains a bottom panel with safe-area spacing. */
@media screen and (min-width:701px){
  html body .v3-shell #v3Panel.v2-panel.flight-panel,
  html body .v3-shell #v3Panel.v2-panel.flight-panel.open{
    position:fixed!important;
    top:auto!important;
    left:50%!important;
    right:auto!important;
    bottom:24px!important;
    width:min(390px,calc(100vw - 48px))!important;
    max-height:calc(100dvh - 130px)!important;
    margin:0!important;
  }
  html body .v3-shell #v3Panel.v2-panel.flight-panel{
    transform:translate3d(-50%,10px,0)!important;
  }
  html body .v3-shell #v3Panel.v2-panel.flight-panel.open{
    transform:translate3d(-50%,0,0)!important;
  }
}

/* ================= V15.19 iPHONE FLIGHT: FORCE BOTTOM =================
   Final override: Flight must always be a bottom sheet on phones. */
@media screen and (max-width:700px){
  html body #v3Panel.v2-panel.flight-panel,
  html body #v3Panel.v2-panel.flight-panel.open,
  html body .v3-shell #v3Panel.v2-panel.flight-panel,
  html body .v3-shell #v3Panel.v2-panel.flight-panel.open{
    position:fixed!important;
    inset:auto 10px calc(12px + env(safe-area-inset-bottom,0px)) 10px!important;
    top:auto!important;
    bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
    left:10px!important;
    right:10px!important;
    width:auto!important;
    height:auto!important;
    max-height:44dvh!important;
    margin:0!important;
    transform:translate3d(0,0,0)!important;
    border-radius:22px!important;
    overflow-y:auto!important;
    opacity:1!important;
    visibility:visible!important;
  }
}

/* V15.21: flight panel docks only while drawing/editing; JS toggles .flight-panel. */


/* V15.23 — draggable Flight panel header */
.v3-shell.flight-open #v3Panel .v2-panel-head{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;}
.v3-shell.flight-open #v3Panel.flight-dragging .v2-panel-head{cursor:grabbing;}

/* ================= V15.26 WEBCAM FLOATING POPUP =================
   Experimental: keep the map visible while a webcam is open.
   Applies to both a single camera and the multi-camera area viewer.
   =============================================================== */
#fullscreenOverlay.fullscreen-overlay,
#fullscreenAreaOverlay.fullscreen-overlay{
  top:50%!important;
  left:50%!important;
  right:auto!important;
  bottom:auto!important;
  width:min(920px,calc(100vw - 48px))!important;
  height:min(680px,calc(100vh - 150px))!important;
  transform:translate(-50%,-50%)!important;
  border-radius:24px!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid rgba(255,255,255,.85)!important;
  box-shadow:0 28px 80px rgba(15,23,42,.32)!important;
  backdrop-filter:blur(16px);
}
#fullscreenOverlay.fullscreen-overlay .header,
#fullscreenAreaOverlay.fullscreen-overlay .header{
  flex:0 0 50px!important;
  height:50px!important;
  min-height:50px!important;
  padding:0 18px!important;
  background:#0b1220!important;
  cursor:pointer;
}
#fullscreenOverlay.fullscreen-overlay .header .close-icon,
#fullscreenAreaOverlay.fullscreen-overlay .header .close-icon{
  margin:0!important;
  font-size:12px!important;
  font-weight:800;
}
#fullscreenOverlay.fullscreen-overlay .popup-title,
#fullscreenAreaOverlay.fullscreen-overlay .popup-title{
  flex:0 0 46px!important;
  height:46px!important;
  min-height:46px!important;
  padding:0 18px!important;
  font-size:14px!important;
  color:#0b1220!important;
  background:#fff!important;
  border-bottom:1px solid #e7ebf1!important;
}
#fullscreenOverlay.fullscreen-overlay .iframe-container,
#fullscreenAreaOverlay.fullscreen-overlay .iframe-container{
  min-height:0!important;
  background:#f8fafc;
}
#fullscreenOverlay.fullscreen-overlay iframe,
#fullscreenAreaOverlay.fullscreen-overlay iframe{
  display:block;
  width:100%!important;
  height:100%!important;
  background:#fff;
}
#fullscreenAreaOverlay .container-menu{
  flex:0 0 46px;
  min-height:46px;
  background:#fff;
  border-bottom:1px solid #e7ebf1;
}

@media(max-width:700px){
  #fullscreenOverlay.fullscreen-overlay,
  #fullscreenAreaOverlay.fullscreen-overlay{
    top:max(82px,calc(env(safe-area-inset-top) + 72px))!important;
    left:8px!important;
    right:8px!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    height:auto!important;
    transform:none!important;
    border-radius:22px!important;
    box-shadow:0 22px 60px rgba(15,23,42,.28)!important;
  }
  #fullscreenOverlay.fullscreen-overlay .header,
  #fullscreenAreaOverlay.fullscreen-overlay .header{
    flex-basis:46px!important;
    height:46px!important;
    min-height:46px!important;
    padding:0 14px!important;
  }
  #fullscreenOverlay.fullscreen-overlay .popup-title,
  #fullscreenAreaOverlay.fullscreen-overlay .popup-title{
    flex-basis:42px!important;
    height:42px!important;
    min-height:42px!important;
    font-size:13px!important;
  }
}

/* ================= V15.26 CAMERA MODAL =================
   Compact webcam modal: one header, close button, bounded viewport.
   The webcam page scrolls inside the modal when its own content is taller.
   ======================================================= */
#fullscreenOverlay.camera-modal,
#fullscreenAreaOverlay.camera-modal{
  top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;
  width:min(960px,calc(100vw - 64px))!important;
  height:min(720px,78vh)!important;
  max-height:calc(100vh - 150px)!important;
  transform:translate(-50%,-50%)!important;
  display:none;flex-direction:column!important;
  background:#0b1220!important;border:1px solid rgba(255,255,255,.75)!important;
  border-radius:22px!important;overflow:hidden!important;
  box-shadow:0 28px 80px rgba(15,23,42,.34)!important;
}
#fullscreenOverlay.camera-modal[style*="display: flex"],
#fullscreenAreaOverlay.camera-modal[style*="display: flex"]{display:flex!important;}
.camera-modal .camera-modal-head{
  position:relative;z-index:2;display:flex;align-items:center;justify-content:center;gap:8px;
  flex:0 0 58px;min-height:58px;padding:0 64px 0 20px;background:#0b1220;
  border-bottom:1px solid rgba(255,255,255,.1);color:#fff;
}
.camera-modal .camera-modal-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-size:16px;font-weight:800;letter-spacing:-.01em;}
.camera-modal .camera-modal-close{position:absolute;right:14px;top:50%;transform:translateY(-50%);width:36px;height:36px;border:0;border-radius:11px;background:rgba(255,255,255,.1);color:#fff;font-size:17px;display:grid;place-items:center;cursor:pointer;}
.camera-modal .camera-modal-close:hover{background:rgba(255,255,255,.17)}
.camera-modal .iframe-container{flex:1 1 auto!important;min-height:0!important;height:auto!important;background:#fff!important;overflow:hidden!important;}
.camera-modal .iframe-container iframe{display:block;width:100%!important;height:100%!important;border:0!important;background:#fff!important;}
.camera-modal-head-area{padding-left:56px!important;padding-right:104px!important;}
.camera-modal-head-area .camera-nav{width:34px;height:34px;flex:0 0 34px;border:0;border-radius:10px;background:rgba(255,255,255,.1);color:#fff;display:grid;place-items:center;cursor:pointer;}
.camera-modal-head-area .camera-modal-title{flex:1 1 auto;}

@media(max-width:700px){
  #fullscreenOverlay.camera-modal,
  #fullscreenAreaOverlay.camera-modal{
    top:max(92px,calc(env(safe-area-inset-top) + 78px))!important;
    left:10px!important;right:10px!important;bottom:auto!important;
    width:auto!important;height:min(72vh,680px)!important;
    max-height:calc(100dvh - max(92px,calc(env(safe-area-inset-top) + 78px)) - max(18px,env(safe-area-inset-bottom)))!important;
    transform:none!important;border-radius:20px!important;
  }
  .camera-modal .camera-modal-head{flex-basis:54px;min-height:54px;padding-left:16px;padding-right:58px;}
  .camera-modal .camera-modal-title{font-size:15px;}
  .camera-modal .camera-modal-close{right:10px;width:34px;height:34px;}
  .camera-modal-head-area{padding-left:10px!important;padding-right:54px!important;gap:6px!important;}
  .camera-modal-head-area .camera-nav{width:32px;height:32px;flex-basis:32px;}
}

/* ================= V15.26 LARGER CAMERA VIEW =================
   Keep the floating modal, but give the webcam itself substantially
   more room on desktop without returning to the near-fullscreen V15.24 size.
   ============================================================= */
@media(min-width:701px){
  #fullscreenOverlay.camera-modal,
  #fullscreenAreaOverlay.camera-modal{
    width:min(1120px,calc(100vw - 56px))!important;
    height:min(820px,84vh)!important;
    max-height:calc(100vh - 120px)!important;
  }
  .camera-modal .camera-modal-head{
    flex-basis:56px;min-height:56px;
  }
  .camera-modal .iframe-container{
    padding:0!important;
  }
}

@media(max-width:700px){
  /* Preserve almost the full phone width for the actual camera image. */
  #fullscreenOverlay.camera-modal,
  #fullscreenAreaOverlay.camera-modal{
    left:8px!important;right:8px!important;
  }
}

/* V15.30 adjustable flight-camera corridor */
.v4-corridor{margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 10px;background:#fff}.v4-corridor>span{font-weight:800;color:#475569}.v4-corridor>div{display:flex;align-items:center;gap:10px}.v4-corridor button{width:34px;height:34px;border:0;border-radius:10px;background:#f1f5f9;font-size:20px;font-weight:800;color:var(--ink)}.v4-corridor b{min-width:52px;text-align:center;color:var(--ink)}.v4-corridor small{grid-column:1/-1;color:#94a3b8;font-size:10px;font-weight:800;letter-spacing:.02em}.v4-routecam-actions{grid-template-columns:1fr}.v4-result-actions .routecams{display:flex;align-items:center;justify-content:center;gap:8px;color:#fff}.v4-result-actions .routecams i{color:#39c6a3}.v4-result-actions .routecams b{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:rgba(255,255,255,.12);color:#fff;font-size:12px}.v4-result-actions .routecams span{color:#fff}

/* ================= V15.32 CAMERA / APP PANEL STACKING =================
   iPhone: camera modal starts at exactly the same vertical anchor as the
   normal app panels. The top menu remains above both layers.
   JS changes the stacking order so tapping Weather/Flight/etc can bring the
   app panel in front of an already-open camera, without closing the camera. */
.v3-topbar{z-index:7000!important;}
@media screen and (max-width:700px){
  html body #fullscreenOverlay.camera-modal,
  html body #fullscreenAreaOverlay.camera-modal{
    top:calc(82px + env(safe-area-inset-top, 0px))!important;
    max-height:calc(100dvh - 96px - env(safe-area-inset-top, 0px))!important;
  }
}


/* ================= V15.34 CAMERA CLEARANCE + NIGHT THEME ================= */
@media (min-width:701px){
  html body #fullscreenOverlay.camera-modal,
  html body #fullscreenAreaOverlay.camera-modal{
    top:var(--camera-desktop-top,110px)!important;
    bottom:auto!important;
    transform:translateX(-50%)!important;
    height:min(820px,var(--camera-desktop-height,calc(100dvh - 130px)))!important;
    max-height:var(--camera-desktop-height,calc(100dvh - 130px))!important;
  }
}
.theme-switch{justify-self:end;width:42px;height:24px;border-radius:999px;background:#cbd5e1;position:relative;transition:.2s}
.theme-switch i{position:absolute;width:18px;height:18px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(15,23,42,.25);transition:.2s}
.theme-switch.on{background:#39c6a3}.theme-switch.on i{left:21px}.v2-settings .theme-toggle-row{grid-template-columns:30px 1fr 44px}

body.dark-theme{--ink:#f8fafc;--muted:#9aa9bc;--panel:#08111f;--line:#263449;background:#050b14;color:#e5edf7}
body.dark-theme .v2-topbar{background:rgba(7,15,27,.96)!important;border-color:#263449!important;box-shadow:0 18px 55px rgba(0,0,0,.55)!important}
body.dark-theme .v2-tabs{background:#0d1929!important}
body.dark-theme .v2-tabs button{color:#91a2b8!important}
body.dark-theme .v2-tabs button.active{background:#1b293c!important;color:#fff!important;box-shadow:0 2px 10px rgba(0,0,0,.35)!important}
body.dark-theme .v2-panel{background:rgba(7,15,27,.985)!important;border-color:#263449!important;box-shadow:0 22px 70px rgba(0,0,0,.58)!important;color:#e5edf7!important}
body.dark-theme .v2-panel-head h2,body.dark-theme .v2-panel b,body.dark-theme .v2-panel strong{color:#f8fafc!important}
body.dark-theme .v2-panel-head small,body.dark-theme .v2-intro,body.dark-theme .v2-panel small{color:#94a3b8!important}
body.dark-theme .v2-close{background:#162235!important;color:#fff!important}
body.dark-theme .v2-card,body.dark-theme .v2-source,body.dark-theme .v2-actions button,body.dark-theme .v2-settings button,
body.dark-theme .v3-map-choice button,body.dark-theme .v3-flight-live>div,body.dark-theme .v4-flight-actions button,
body.dark-theme .v4-result-total>div,body.dark-theme .v4-result-actions button,body.dark-theme .v4-corridor,
body.dark-theme .v4-legs,body.dark-theme .v4-leg,body.dark-theme .v4-speed{
  background:#0e1a2b!important;border-color:#263449!important;color:#e5edf7!important;
}
body.dark-theme .v2-source-name,body.dark-theme .v2-actions button,body.dark-theme .v2-settings button,
body.dark-theme .v4-leg b,body.dark-theme .v4-speed b,body.dark-theme .v4-corridor b{color:#f8fafc!important}
body.dark-theme .v3-map-choice button.active,body.dark-theme .v4-flight-actions .primary,body.dark-theme .v4-result-actions .primary{background:#1d2d42!important;color:#fff!important;border-color:#33465f!important}
body.dark-theme .v2-feature{background:#0e1a2b!important;border-color:#263449!important;color:#e5edf7!important}
body.dark-theme .v2-feature>span{background:#13283b!important;color:#39c6a3!important}
body.dark-theme .v2-tip{background:#0e1a2b!important;color:#9aa9bc!important}
body.dark-theme .v4-speed button,body.dark-theme .v4-corridor button,body.dark-theme .v4-flight-summary span{background:#17263a!important;color:#f8fafc!important}
body.dark-theme .v4-leg span,body.dark-theme .v4-leg em,body.dark-theme .v4-speed>span,body.dark-theme .v4-corridor>span{color:#a8b5c7!important}
body.dark-theme .weather-back{background:#17263a!important;color:#e5edf7!important;border-color:#263449!important}
body.dark-theme input,body.dark-theme select{background:#101d2e!important;color:#f8fafc!important;border-color:#304158!important}
body.dark-theme .leaflet-control-zoom a,body.dark-theme .leaflet-draw-toolbar a{background:#101c2d!important;color:#e5edf7!important;border-color:#263449!important}
body.dark-theme .leaflet-control-attribution{background:rgba(5,11,20,.82)!important;color:#94a3b8!important}
body.dark-theme .leaflet-control-attribution a{color:#cbd5e1!important}


/* V15.43 webcam modal follows the application theme. */
body:not(.dark-theme) #fullscreenOverlay.camera-modal,
body:not(.dark-theme) #fullscreenAreaOverlay.camera-modal{
  background:#f8fafc!important;
  border-color:#dbe3ec!important;
  box-shadow:0 28px 80px rgba(15,23,42,.20)!important;
}
body:not(.dark-theme) .camera-modal .camera-modal-head{
  background:#fff!important;
  color:#0f172a!important;
  border-bottom-color:#e2e8f0!important;
}
body:not(.dark-theme) .camera-modal .camera-modal-close,
body:not(.dark-theme) .camera-modal-head-area .camera-nav{
  background:#f1f5f9!important;
  color:#0f172a!important;
}
body:not(.dark-theme) .camera-modal .camera-modal-close:hover,
body:not(.dark-theme) .camera-modal-head-area .camera-nav:hover{
  background:#e2e8f0!important;
}
body.dark-theme #fullscreenOverlay.camera-modal,
body.dark-theme #fullscreenAreaOverlay.camera-modal{
  background:#07101d!important;
  border-color:#263449!important;
}
body.dark-theme .camera-modal .iframe-container,
body.dark-theme .camera-modal .iframe-container iframe{background:#07101d!important;}

/* V15.43 — three independent basemap choices + night-mode weather header */
.v3-map-choice{grid-template-columns:repeat(3,minmax(0,1fr))!important}
@media(max-width:420px){
  .v3-map-choice button{padding:13px 4px!important;font-size:11px!important}
  .v3-map-choice i{font-size:18px!important}
}
body.dark-theme .v2-panel.weather-expanded .v2-panel-head,
body.dark-theme .weather-expanded .v2-panel-head{
  background:#08111f!important;
  color:#f8fafc!important;
  border-bottom-color:#263449!important;
}
body.dark-theme .v2-panel.weather-expanded .v2-panel-head h2,
body.dark-theme .weather-expanded .v2-panel-head h2{color:#f8fafc!important}
body.dark-theme .v2-panel.weather-expanded .v2-panel-head small,
body.dark-theme .weather-expanded .v2-panel-head small{color:#94a3b8!important}


/* ================= V15.44 LIGHT / NIGHT WEATHER ================= */
/* Airport weather follows the app theme instead of being permanently dark. */
body:not(.dark-theme) .iws-card{background:#fff;color:#172033;border:1px solid #e2e8f0;box-shadow:0 12px 30px rgba(15,23,42,.10)}
body:not(.dark-theme) .iws-picker{border-bottom-color:#e2e8f0}
body:not(.dark-theme) .iws-picker label,body:not(.dark-theme) .iws-head small,body:not(.dark-theme) .iws-grid small,body:not(.dark-theme) .iws-rwy small,body:not(.dark-theme) .iws-foot,body:not(.dark-theme) .iws-no-rwy{color:#64748b!important}
body:not(.dark-theme) .iws-picker select{background:#f8fafc;color:#172033;border-color:#d7e0ea}
body:not(.dark-theme) .iws-grid>div{background:#f8fafc;border-color:#e2e8f0}
body:not(.dark-theme) .iws-grid b,body:not(.dark-theme) .iws-rwy b,body:not(.dark-theme) .iws-rwy>span{color:#172033!important}
body:not(.dark-theme) .iws-grid em{color:#64748b}
body:not(.dark-theme) .iws-rwys{border-color:#e2e8f0}
body:not(.dark-theme) .iws-rwy{border-bottom-color:#edf2f7}
body:not(.dark-theme) .iws-foot button,body:not(.dark-theme) .iws-error button{background:#eef2f7;color:#172033;border:1px solid #dbe3ec}
body:not(.dark-theme) .iws-loading,body:not(.dark-theme) .iws-error{color:#475569}
body:not(.dark-theme) .aviation-loading,body:not(.dark-theme) .aviation-empty{background:#f8fafc;color:#475569;border:1px solid #e2e8f0}
body:not(.dark-theme) .aviation-msg{background:#f8fafc;border-color:#e2e8f0;color:#172033}
body:not(.dark-theme) .iws-source-link,body:not(.dark-theme) .iws-source-link:link,body:not(.dark-theme) .iws-source-link:visited{background:#eef2f7!important;color:#172033!important;border-color:#dbe3ec!important}
body:not(.dark-theme) .iws-source-link:hover{background:#e2e8f0!important;color:#0f172a!important}
/* Explicit night values keep the aviation panel aligned with the rest of Night mode. */
body.dark-theme .iws-card{background:#0f172a;color:#fff;border:1px solid rgba(255,255,255,.08)}
