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

        :root {
            --pw-safe-top: env(safe-area-inset-top, 0px);
            --pw-safe-right: env(safe-area-inset-right, 0px);
            --pw-safe-bottom: env(safe-area-inset-bottom, 0px);
            --pw-safe-left: env(safe-area-inset-left, 0px);
            --pw-header-top: calc(14px + var(--pw-safe-top));
            --pw-mobile-panel-max: calc(100vh - 96px - var(--pw-safe-top) - var(--pw-safe-bottom));
        }

        @supports (height: 100dvh) {
            :root {
                --pw-mobile-panel-max: calc(100dvh - 96px - var(--pw-safe-top) - var(--pw-safe-bottom));
            }
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, sans-serif;
            background: linear-gradient(135deg, #0c1445 0%, #1a1a2e 50%, #16213e 100%);
            color: #fff;
            overflow: hidden;
            height: 100vh;
        }

        #globe-container {
            width: 100vw;
            height: 100vh;
            position: relative;
            overflow: hidden;
            z-index: 1;
        }

        #globe-container::before {
            content: '';
            position: fixed;
            left: 50%;
            top: 50%;
            width: min(46vw, 56vh, 520px);
            aspect-ratio: 1;
            transform: translate(-50%, -50%);
            border-radius: 50%;
            background:
                radial-gradient(circle at 34% 28%, rgba(255,255,255,0.24), transparent 0 16%, rgba(255,255,255,0.04) 26%, transparent 48%),
                url('/static/img/earth_mini.jpg') center / cover;
            box-shadow:
                inset -42px -18px 68px rgba(0,0,0,0.58),
                0 0 52px rgba(46, 165, 255, 0.22);
            opacity: 0.92;
            pointer-events: none;
            z-index: 2;
            transition: opacity 220ms ease;
        }

        html[data-pw-globe-painted="1"] #globe-container::before {
            opacity: 0;
        }

        body.mode-flights #globe-container::before {
            opacity: 0;
            visibility: hidden;
        }

        .header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            padding: 15px 160px 15px 15px; /* Отступ справа для языкового селектора */
            background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
            z-index: 9000 !important;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .header-logo {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            height: 45px;
            cursor: pointer;
            transition: opacity 0.2s ease;
        }
        .header-logo:hover {
            opacity: 0.8;
        }
        @media (max-width: 900px) {
            .header-logo {
                display: none;
            }
        }

        /* Home globe button */
        .home-globe-btn {
            width: 34px;
            height: 34px;
            border: none;
            border-radius: 50%;
            background: transparent;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            padding: 0;
        }
        .home-globe-btn:active {
            transform: scale(0.9);
        }
        .home-globe-sphere {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: url('/static/img/earth_mini.jpg') repeat-x center;
            background-size: auto 100%;
            box-shadow: inset -4px -2px 6px rgba(0,0,0,0.5), 0 0 8px rgba(79,195,247,0.3);
            transition: box-shadow 0.3s ease;
        }
        .home-globe-btn:hover .home-globe-sphere {
            animation: globe-spin 3s linear infinite;
            box-shadow: inset -4px -2px 6px rgba(0,0,0,0.4), 0 0 12px rgba(79,195,247,0.6);
        }
        @keyframes globe-spin {
            from { background-position-x: 0; }
            to { background-position-x: -128px; }
        }

        .app-brand-title {
            margin: 0 4px 0 0;
            color: rgba(255, 255, 255, 0.92);
            font-size: 13px;
            font-weight: 750;
            line-height: 1;
            white-space: nowrap;
        }

        .mobile-trust-links {
            display: none;
        }

        /* Mode buttons (NEWS, SPACE, MONEY) - Flat Design */
        .mode-buttons {
            display: flex;
            gap: 3px;
            background: rgba(30, 30, 40, 0.9);
            padding: 3px;
            border-radius: 6px;
        }

        .mode-btn {
            position: relative;
            padding: 6px 10px;
            border: none;
            border-radius: 4px;
            background: transparent;
            color: rgba(255, 255, 255, 0.5);
            font-size: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
            letter-spacing: 0;
        }

        .mode-btn:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.08);
        }

        .mode-btn.active {
            background: #00677a;
            color: #fff;
        }

        .mode-btn.pending::after {
            content: "";
            position: absolute;
            right: 3px;
            top: 3px;
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.95);
            animation: modePendingPulse 0.8s ease-in-out infinite alternate;
        }

        @keyframes modePendingPulse {
            from { opacity: 0.35; transform: scale(0.82); }
            to { opacity: 1; transform: scale(1); }
        }

        .mode-btn.active[data-mode="space"] {
            background: #9b59b6;
        }

        .mode-btn.active[data-mode="money"] {
            background: #27ae60;
        }

        .mode-btn.active[data-mode="flights"] {
            background: #b63124;
        }

        .mode-btn.active[data-mode="quakes"] {
            background: #e67e22;
        }

        .mode-btn.active[data-mode="radio"] {
            background: #b0004b;
        }

        .mode-btn.active[data-mode="ships"] {
            background: #005f8f;
        }

        .mode-btn.active[data-mode="weather"] {
            background: #006776;
        }

        .mode-btn.active[data-mode="events"] {
            background: #ff9800;
        }

        .mode-btn.active[data-mode="live"] {
            background: #f44336;
        }

        .mode-btn.active[data-mode="stats"] {
            background: #546e7a;
        }

        .mode-btn.active[data-mode="geography"] {
            background: #2e7d62;
        }

        .mode-btn.active[data-mode="military"] {
            background: #558b2f;
        }

        .mode-btn.active[data-mode="economy"] {
            background: #7b1fa2;
        }

        /* Stats Categories - Top Level */
        .stats-categories {
            position: fixed;
            top: 55px;
            left: 15px;
            display: none;
            gap: 6px;
            flex-wrap: wrap;
            max-width: 850px;
            z-index: 9000 !important;
            background: rgba(15, 20, 30, 0.95);
            padding: 8px 10px;
            border-radius: 12px;
            backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        }

        .stats-categories.visible {
            display: flex;
        }

        body.mode-stats .stats-categories,
        body[data-pw-mode="stats"] .stats-categories,
        body.mode-stats .stats-sub-filters,
        body[data-pw-mode="stats"] .stats-sub-filters,
        body.mode-stats .economy-filters,
        body.mode-stats .stations-filters,
        body.mode-stats .resources-filters,
        body.mode-stats .economy-sub-filters,
        body.mode-stats .infra-filters,
        body.mode-stats .culture-filters,
        body.mode-stats .population-filters,
        body[data-pw-mode="stats"] .economy-filters,
        body[data-pw-mode="stats"] .stations-filters,
        body[data-pw-mode="stats"] .resources-filters,
        body[data-pw-mode="stats"] .economy-sub-filters,
        body[data-pw-mode="stats"] .infra-filters,
        body[data-pw-mode="stats"] .culture-filters,
        body[data-pw-mode="stats"] .population-filters {
            pointer-events: none;
        }

        body.mode-stats .stats-category,
        body[data-pw-mode="stats"] .stats-category,
        body.mode-stats .stats-sub-filters > *,
        body[data-pw-mode="stats"] .stats-sub-filters > *,
        body.mode-stats .economy-filters > *,
        body.mode-stats .stations-filters > *,
        body.mode-stats .resources-filters > *,
        body.mode-stats .economy-sub-filters > *,
        body.mode-stats .infra-filters > *,
        body.mode-stats .culture-filters > *,
        body.mode-stats .population-filters > *,
        body[data-pw-mode="stats"] .economy-filters > *,
        body[data-pw-mode="stats"] .stations-filters > *,
        body[data-pw-mode="stats"] .resources-filters > *,
        body[data-pw-mode="stats"] .economy-sub-filters > *,
        body[data-pw-mode="stats"] .infra-filters > *,
        body[data-pw-mode="stats"] .culture-filters > *,
        body[data-pw-mode="stats"] .population-filters > * {
            pointer-events: auto;
        }

        .stats-category {
            padding: 6px 10px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.7);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            white-space: nowrap;
        }

        .stats-category:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .stats-category.active {
            background: #1f6fa5;
            color: #fff;
        }

        .stats-data-status {
            position: fixed;
            top: 126px;
            right: 15px;
            display: none;
            flex-direction: column;
            gap: 3px;
            width: min(340px, calc(100vw - 30px));
            padding: 8px 10px;
            border: 1px solid rgba(52, 152, 219, 0.45);
            border-radius: 9px;
            background: rgba(10, 17, 28, 0.94);
            color: rgba(255, 255, 255, 0.78);
            font-size: 10px;
            line-height: 1.35;
            z-index: 8990;
            box-sizing: border-box;
        }

        .stats-mode-status-slot:not(:empty) {
            position: fixed;
            top: 70px;
            right: 15px;
            z-index: 8995;
            width: min(340px, calc(100vw - 30px));
            pointer-events: auto;
        }

        body.mode-stats .stats-data-status.visible,
        body[data-pw-mode="stats"] .stats-data-status.visible {
            display: flex;
        }

        .stats-data-status strong {
            color: #fff;
            font-size: 11px;
        }

        .stats-data-status.status-ok {
            border-color: rgba(46, 204, 113, 0.55);
        }

        .stats-data-status.status-empty,
        .stats-data-status.status-stale {
            border-color: rgba(241, 196, 15, 0.65);
        }

        .stats-data-status.status-degraded {
            border-color: rgba(231, 76, 60, 0.7);
        }

        .stats-data-status-reason {
            color: rgba(255, 210, 160, 0.9);
        }

        /* Sub-filters common positioning */
        .stats-sub-filters {
            position: fixed;
            top: 115px;
            left: 15px;
            display: none;
            gap: 8px;
            flex-wrap: wrap;
            max-width: 550px;
            z-index: 9000 !important;
            padding: 8px 12px;
            border-radius: 10px;
            backdrop-filter: blur(10px);
        }

        .stats-sub-filters.visible {
            display: flex;
        }

        /* Economy filter buttons */
        /* Economy filters - Flat Design (Bloc sub-filters) */
        .economy-filters {
            position: fixed;
            top: 120px;
            left: 15px;
            display: none;
            gap: 6px;
            flex-wrap: wrap;
            max-width: 700px;
            z-index: 90;
            background: rgba(20, 25, 35, 0.9);
            padding: 8px 10px;
            border-radius: 10px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        .economy-filters.visible {
            display: flex;
        }

        /* Stations filters */
        .stations-filters {
            position: fixed;
            top: 120px;
            left: 15px;
            display: none;
            gap: 8px;
            flex-wrap: wrap;
            max-width: 700px;
            z-index: 90;
            background: rgba(20, 25, 35, 0.9);
            padding: 8px 12px;
            border-radius: 10px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(52, 152, 219, 0.2);
        }

        .stations-filters.visible {
            display: flex;
        }

        .station-filter {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.7);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .station-filter:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .station-filter.active {
            background: #3498db;
            color: #fff;
        }

        /* Resources filters */
        .resources-filters {
            position: fixed;
            top: 115px;
            left: 15px;
            display: none;
            gap: 5px;
            flex-wrap: wrap;
            max-width: 850px;
            z-index: 9000 !important;
            background: transparent;
            padding: 0;
        }

        .resources-filters.visible {
            display: flex;
        }

        .resource-filter {
            padding: 4px 8px;
            border: none;
            border-radius: 4px;
            background: rgba(0, 0, 0, 0.4);
            color: rgba(255, 255, 255, 0.7);
            font-size: 10px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            backdrop-filter: blur(5px);
        }

        .resource-filter:hover {
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
        }

        .resource-filter.active {
            background: rgba(52, 152, 219, 0.6);
            color: #fff;
        }

        /* Infrastructure filters */
        .infra-filters {
            position: fixed;
            top: 115px;
            left: 15px;
            display: none;
            gap: 5px;
            flex-wrap: wrap;
            max-width: 600px;
            z-index: 9000 !important;
            background: transparent;
            padding: 0;
        }

        .infra-filters.visible {
            display: flex;
        }

        .infra-filter {
            padding: 4px 8px;
            border: none;
            border-radius: 4px;
            background: rgba(0, 0, 0, 0.4);
            color: rgba(255, 255, 255, 0.7);
            font-size: 10px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            backdrop-filter: blur(5px);
        }

        .infra-filter:hover {
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
        }

        .infra-filter.active {
            background: rgba(155, 89, 182, 0.6);
            color: #fff;
        }

        /* Finance filters */
        .finance-filters {
            position: fixed;
            top: 115px;
            left: 15px;
            display: none;
            gap: 5px;
            flex-wrap: wrap;
            max-width: 600px;
            z-index: 89;
            background: transparent;
            padding: 0;
        }

        .finance-filters.visible {
            display: flex;
        }

        .finance-filter {
            padding: 4px 8px;
            border: none;
            border-radius: 4px;
            background: rgba(0, 0, 0, 0.4);
            color: rgba(255, 255, 255, 0.7);
            font-size: 10px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            backdrop-filter: blur(5px);
        }

        .finance-filter:hover {
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
        }

        .finance-filter.active {
            background: rgba(46, 204, 113, 0.6);
            color: #fff;
        }

        .culture-filters {
            position: fixed;
            top: 115px;
            left: 15px;
            display: none;
            gap: 5px;
            flex-wrap: wrap;
            max-width: 600px;
            z-index: 89;
            background: transparent;
            padding: 0;
        }

        .culture-filters.visible {
            display: flex;
        }

        .culture-filter {
            padding: 4px 8px;
            border: none;
            border-radius: 4px;
            background: rgba(0, 0, 0, 0.4);
            color: rgba(255, 255, 255, 0.7);
            font-size: 10px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            backdrop-filter: blur(5px);
        }

        .culture-filter:hover {
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
        }

        .culture-filter.active {
            background: rgba(46, 204, 113, 0.6);
            color: #fff;
        }

        /* Economy sub-filters */
        .economy-sub-filters {
            position: fixed;
            top: 115px;
            left: 15px;
            display: none;
            gap: 4px;
            flex-wrap: wrap;
            max-width: calc(100vw - 390px);
            z-index: 90;
            background: transparent;
            padding: 0;
        }

        .economy-sub-filters.visible {
            display: flex;
        }

        .economy-sub-filter {
            padding: 4px 8px;
            border: none;
            border-radius: 4px;
            background: rgba(0, 0, 0, 0.4);
            color: rgba(255, 255, 255, 0.7);
            font-size: 10px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            backdrop-filter: blur(5px);
        }

        .economy-sub-filter:hover {
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
        }

        .economy-sub-filter.active {
            background: rgba(241, 196, 15, 0.6);
            color: #fff;
        }

        .index-info-panel {
            position: fixed;
            top: 200px;
            left: 15px;
            width: 320px;
            background: rgba(10, 15, 25, 0.92);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 10px;
            padding: 14px 16px;
            padding-right: 58px;
            z-index: 89;
            backdrop-filter: blur(12px);
            display: none;
            color: #ccc;
            font-size: 12px;
            line-height: 1.5;
        }
        .index-info-panel.visible {
            display: block;
        }
        .index-info-close {
            position: absolute;
            top: 6px;
            right: 6px;
            width: 44px;
            height: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            cursor: pointer;
            font-size: 22px;
            line-height: 1;
        }
        .index-info-title {
            font-size: 14px;
            font-weight: bold;
            color: #fff;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .index-info-scale {
            margin-top: 10px;
            padding-top: 8px;
            border-top: 1px solid rgba(255,255,255,0.08);
            font-size: 11px;
            color: #999;
        }

        .population-filters {
            position: fixed;
            top: 150px;
            left: 15px;
            display: none;
            gap: 5px;
            flex-wrap: wrap;
            max-width: 300px;
            z-index: 9000 !important;
            background: transparent;
            padding: 0;
        }

        .population-filters.visible {
            display: flex;
        }

        .population-filter {
            padding: 4px 10px;
            border: none;
            border-radius: 4px;
            background: rgba(46, 204, 113, 0.3);
            color: rgba(255, 255, 255, 0.8);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            backdrop-filter: blur(5px);
        }

        .population-filter:hover {
            background: rgba(46, 204, 113, 0.5);
            color: #fff;
        }

        .population-filter.active {
            background: rgba(46, 204, 113, 0.7);
            color: #fff;
        }

        .economy-filter {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: transparent;
            color: rgba(255, 255, 255, 0.5);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .economy-filter:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .economy-filter.active {
            background: #7b1fa2;
            color: #fff;
        }

        /* Economy stats secondary filters */
        .economy-stats-filters {
            position: fixed;
            top: 105px;
            left: 15px;
            display: none;
            gap: 6px;
            flex-wrap: wrap;
            max-width: 600px;
            z-index: 89;
            background: rgba(0, 0, 0, 0.6);
            padding: 6px 10px;
            border-radius: 10px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(52, 152, 219, 0.3);
        }

        .economy-stats-filters.visible {
            display: flex;
        }

        .economy-stat {
            padding: 5px 10px;
            border: 1px solid rgba(52, 152, 219, 0.4);
            border-radius: 6px;
            background: rgba(52, 152, 219, 0.15);
            color: rgba(255, 255, 255, 0.7);
            font-size: 10px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .economy-stat:hover {
            background: rgba(52, 152, 219, 0.3);
            color: #fff;
        }

        .economy-stat.active {
            background: rgba(52, 152, 219, 0.5);
            border-color: rgba(52, 152, 219, 0.8);
            color: #fff;
        }

        /* Stat markers on globe */
        .stat-marker {
            background: rgba(0, 0, 0, 0.8);
            padding: 4px 8px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            white-space: nowrap;
        }

        /* Clickable passport-marker — hover подсветка как у других интерактивных */
        .stat-marker.stat-marker-clickable {
            transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
        }
        .stat-marker.stat-marker-clickable:hover {
            transform: translate(-50%, -50%) scale(1.1);
            border-color: rgba(46, 204, 113, 0.8);
            box-shadow: 0 0 12px rgba(46, 204, 113, 0.4);
        }

        .stat-value {
            color: #fff;
            font-size: 11px;
            font-weight: 600;
        }

        .stat-country {
            color: #aaa;
            font-size: 10px;
            margin-bottom: 2px;
        }

        /* NPP Markers */
        .npp-marker {
            width: 24px;
            height: 24px;
            padding: 0;
            border-radius: 50%;
            background: radial-gradient(circle, #2ecc71 0%, #27ae60 70%, #1e8449 100%);
            border: 2px solid #fff;
            box-shadow: 0 0 10px rgba(46, 204, 113, 0.6), 0 2px 8px rgba(0,0,0,0.3);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
        }
        .npp-marker:hover {
            transform: scale(1.3);
            box-shadow: 0 0 20px rgba(46, 204, 113, 0.9), 0 4px 12px rgba(0,0,0,0.4);
        }
        .npp-marker.standby {
            background: radial-gradient(circle, #f39c12 0%, #e67e22 70%, #d35400 100%);
            box-shadow: 0 0 10px rgba(243, 156, 18, 0.6), 0 2px 8px rgba(0,0,0,0.3);
        }
        .npp-marker.closed {
            background: radial-gradient(circle, #95a5a6 0%, #7f8c8d 70%, #5d6d7e 100%);
            box-shadow: 0 0 10px rgba(149, 165, 166, 0.6), 0 2px 8px rgba(0,0,0,0.3);
        }
        .npp-marker.construction {
            background: radial-gradient(circle, #3498db 0%, #2980b9 70%, #1a5276 100%);
            box-shadow: 0 0 10px rgba(52, 152, 219, 0.6), 0 2px 8px rgba(0,0,0,0.3);
        }
        .npp-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(20, 25, 30, 0.95);
            border: 1px solid rgba(46, 204, 113, 0.5);
            border-radius: 8px;
            padding: 8px 12px;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s;
            margin-bottom: 8px;
            z-index: 500;
        }
        .npp-marker:hover .npp-tooltip {
            opacity: 1;
        }
        .npp-tooltip-name {
            font-weight: bold;
            font-size: 12px;
            color: #2ecc71;
            margin-bottom: 4px;
        }
        .npp-tooltip-info {
            font-size: 10px;
            color: #aaa;
        }

        /* Infrastructure markers */
        .infra-marker {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: radial-gradient(circle, #9b59b6 0%, #8e44ad 70%, #7d3c98 100%);
            border: 2px solid #fff;
            box-shadow: 0 0 10px rgba(155, 89, 182, 0.6), 0 2px 8px rgba(0,0,0,0.3);
            cursor: pointer;
            pointer-events: auto !important;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            position: relative;
            z-index: 50;
        }
        .infra-marker:hover {
            transform: scale(1.3);
        }
        .infra-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(20, 25, 30, 0.95);
            border: 1px solid rgba(155, 89, 182, 0.5);
            border-radius: 8px;
            padding: 8px 12px;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s;
            margin-bottom: 8px;
            z-index: 60;
        }
        .infra-marker:hover .infra-tooltip {
            opacity: 1;
        }
        .infra-tooltip-name {
            font-weight: bold;
            font-size: 12px;
            color: #9b59b6;
            margin-bottom: 4px;
        }
        .infra-tooltip-value {
            font-size: 10px;
            color: #aaa;
        }

        /* City heatmap markers */
        .city-heatmap-marker {
            z-index: 500;
        }
        .city-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(20, 25, 30, 0.95);
            border: 1px solid rgba(231, 76, 60, 0.5);
            border-radius: 8px;
            padding: 8px 12px;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s;
            margin-bottom: 8px;
            z-index: 1000;
            font-size: 12px;
            color: #fff;
            text-align: center;
        }
        .city-heatmap-marker:hover .city-tooltip {
            opacity: 1;
        }

        /* Finance markers */
        .finance-marker {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: radial-gradient(circle, #2ecc71 0%, #27ae60 70%, #1e8449 100%);
            border: 2px solid #fff;
            box-shadow: 0 0 10px rgba(46, 204, 113, 0.6), 0 2px 8px rgba(0,0,0,0.3);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            position: relative;
        }
        .finance-marker-icon {
            pointer-events: none;
        }
        .culture-photo {
            width: 100%;
            height: 140px;
            border-radius: 8px;
            margin-bottom: 12px;
            object-fit: cover;
            background: rgba(0,0,0,0.3);
        }
        .culture-photo-placeholder {
            width: 100%;
            height: 100px;
            border-radius: 8px;
            margin-bottom: 12px;
            background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.2));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 36px;
            animation: pulse 1.5s ease-in-out infinite;
        }
        .finance-marker:hover {
            transform: scale(1.3);
        }
        .finance-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(20, 25, 30, 0.95);
            border: 1px solid rgba(46, 204, 113, 0.5);
            border-radius: 8px;
            padding: 8px 12px;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s;
            margin-bottom: 8px;
            z-index: 500;
        }
        .finance-marker:hover .finance-tooltip {
            opacity: 1;
        }
        .finance-tooltip-name {
            font-weight: bold;
            font-size: 12px;
            color: #2ecc71;
            margin-bottom: 4px;
        }
        .finance-tooltip-value {
            font-size: 10px;
            color: #aaa;
        }
        .finance-tooltip-change {
            font-size: 11px;
            font-weight: bold;
            margin-top: 2px;
        }
        .finance-marker.bullish {
            background: radial-gradient(circle, #2ecc71 0%, #27ae60 70%, #1e8449 100%);
            box-shadow: 0 0 12px rgba(46, 204, 113, 0.7), 0 0 24px rgba(46, 204, 113, 0.3), 0 2px 8px rgba(0,0,0,0.3);
            animation: pulseBullish 2s ease-in-out infinite;
        }
        .finance-marker.bearish {
            background: radial-gradient(circle, #e74c3c 0%, #c0392b 70%, #922b21 100%);
            border-color: #ffcdd2;
            box-shadow: 0 0 12px rgba(231, 76, 60, 0.7), 0 0 24px rgba(231, 76, 60, 0.3), 0 2px 8px rgba(0,0,0,0.3);
            animation: pulseBearish 2s ease-in-out infinite;
        }
        .finance-marker.bearish .finance-tooltip {
            border-color: rgba(231, 76, 60, 0.5);
        }
        .finance-marker.bearish .finance-tooltip-name {
            color: #e74c3c;
        }
        .finance-marker.neutral {
            background: radial-gradient(circle, #95a5a6 0%, #7f8c8d 70%, #616a6b 100%);
            border-color: #ccc;
            box-shadow: 0 0 8px rgba(149, 165, 166, 0.5), 0 2px 8px rgba(0,0,0,0.3);
        }
        .finance-marker.neutral .finance-tooltip {
            border-color: rgba(149, 165, 166, 0.5);
        }
        .finance-marker.neutral .finance-tooltip-name {
            color: #95a5a6;
        }
        @keyframes pulseBullish {
            0%, 100% { box-shadow: 0 0 12px rgba(46, 204, 113, 0.7), 0 0 24px rgba(46, 204, 113, 0.3), 0 2px 8px rgba(0,0,0,0.3); }
            50% { box-shadow: 0 0 18px rgba(46, 204, 113, 0.9), 0 0 36px rgba(46, 204, 113, 0.4), 0 2px 8px rgba(0,0,0,0.3); }
        }
        @keyframes pulseBearish {
            0%, 100% { box-shadow: 0 0 12px rgba(231, 76, 60, 0.7), 0 0 24px rgba(231, 76, 60, 0.3), 0 2px 8px rgba(0,0,0,0.3); }
            50% { box-shadow: 0 0 18px rgba(231, 76, 60, 0.9), 0 0 36px rgba(231, 76, 60, 0.4), 0 2px 8px rgba(0,0,0,0.3); }
        }

        /* NPP Info Panel */
        .npp-info-panel {
            position: fixed;
            left: 10px;
            top: 175px;
            width: 300px;
            max-height: calc(100vh - 200px);
            background: rgba(15, 20, 25, 0.95);
            border: 1px solid rgba(46, 204, 113, 0.4);
            border-radius: 12px;
            padding: 0;
            z-index: 1000;
            display: none;
            box-shadow: 0 8px 32px rgba(0,0,0,0.4);
            overflow: hidden;
        }
        .npp-info-panel.visible {
            display: block;
        }
        .npp-info-header {
            background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
            padding: 12px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .npp-info-title {
            font-weight: bold;
            font-size: 14px;
            color: #fff;
        }
        .npp-info-close {
            background: rgba(255,255,255,0.2);
            border: none;
            color: #fff;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 16px;
        }
        .npp-info-close:hover {
            background: rgba(255,255,255,0.3);
        }
        .npp-info-content {
            padding: 16px;
            overflow-y: auto;
            max-height: calc(100vh - 250px);
        }

        @media (min-width: 769px) {
            body.mode-stats .npp-info-panel,
            body[data-pw-mode="stats"] .npp-info-panel {
                top: 258px;
                max-height: calc(100vh - 274px);
            }

            body.mode-stats .npp-info-content,
            body[data-pw-mode="stats"] .npp-info-content {
                max-height: calc(100vh - 324px);
            }
        }

        @media (max-width: 768px) {
            body.mode-stats:has(#npp-info-panel.visible) .zoom-controls,
            body[data-pw-mode="stats"]:has(#npp-info-panel.visible) .zoom-controls {
                display: none !important;
            }
        }
        .npp-info-row {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .npp-info-row:last-child {
            border-bottom: none;
        }
        .npp-info-label {
            color: #888;
            font-size: 12px;
        }
        .npp-info-value {
            color: #fff;
            font-size: 12px;
            font-weight: 500;
        }
        .npp-status-badge {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 600;
        }
        .npp-status-badge.operating {
            background: rgba(46, 204, 113, 0.2);
            color: #2ecc71;
        }
        .npp-status-badge.standby {
            background: rgba(243, 156, 18, 0.2);
            color: #f39c12;
        }
        .npp-status-badge.closed {
            background: rgba(149, 165, 166, 0.2);
            color: #95a5a6;
        }
        .npp-status-badge.construction {
            background: rgba(52, 152, 219, 0.2);
            color: #3498db;
        }
        /* NPP Country List */
        .npp-country-summary {
            display: flex;
            gap: 16px;
            margin-bottom: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(46, 204, 113, 0.3);
        }
        .npp-summary-stat {
            flex: 1;
            text-align: center;
        }
        .npp-summary-value {
            display: block;
            font-size: 22px;
            font-weight: bold;
            color: #2ecc71;
        }
        .npp-summary-label {
            display: block;
            font-size: 10px;
            color: #888;
            margin-top: 2px;
        }
        .npp-list-header {
            font-size: 12px;
            color: #888;
            margin-bottom: 8px;
            font-weight: 500;
        }
        .npp-list-container {
            max-height: 280px;
            overflow-y: auto;
        }
        .npp-list-item {
            padding: 10px;
            background: rgba(46, 204, 113, 0.1);
            border-radius: 8px;
            margin-bottom: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .npp-list-item:hover {
            background: rgba(46, 204, 113, 0.2);
            transform: translateX(4px);
        }
        .npp-list-name {
            font-size: 13px;
            font-weight: 600;
            color: #fff;
            margin-bottom: 4px;
        }
        .npp-list-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 11px;
            color: #aaa;
        }

        /* Power Plant Markers */
        .power-plant-marker {
            width: 28px;
            height: 28px;
            padding: 0;
            border: 0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            cursor: pointer;
            transition: transform 0.2s ease, filter 0.2s ease;
            position: relative;
            box-shadow: 0 2px 8px rgba(0,0,0,0.4);
        }
        .power-plant-marker.hydro {
            background: radial-gradient(circle at 30% 30%, #3498db 0%, #2980b9 100%);
        }
        .power-plant-marker.thermal {
            background: radial-gradient(circle at 30% 30%, #e74c3c 0%, #c0392b 100%);
        }
        .power-plant-marker.solar {
            background: radial-gradient(circle at 30% 30%, #f1c40f 0%, #f39c12 100%);
        }
        .power-plant-marker.wind {
            background: radial-gradient(circle at 30% 30%, #1abc9c 0%, #16a085 100%);
        }
        .power-plant-marker:hover {
            transform: scale(1.3);
            filter: brightness(1.2);
            z-index: 500;
        }
        .power-plant-marker:hover .power-plant-tooltip {
            display: block;
            opacity: 1;
        }
        .power-plant-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.9);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            padding: 6px 10px;
            white-space: nowrap;
            display: none;
            opacity: 0;
            pointer-events: none;
            margin-bottom: 5px;
            z-index: 1000;
        }
        .power-plant-tooltip-name {
            font-size: 12px;
            font-weight: 600;
            color: #fff;
            margin-bottom: 2px;
        }
        .power-plant-tooltip-info {
            font-size: 10px;
            color: #aaa;
        }

        /* Power Plant Info Panel */
        .power-plant-info-panel {
            position: fixed;
            left: 10px;
            top: 175px;
            width: 300px;
            max-height: calc(100vh - 200px);
            background: rgba(15, 20, 25, 0.95);
            border: 1px solid rgba(52, 152, 219, 0.4);
            border-radius: 12px;
            padding: 0;
            z-index: 1000;
            display: none;
            box-shadow: 0 8px 32px rgba(0,0,0,0.4);
            overflow: hidden;
        }
        .power-plant-info-panel.visible {
            display: block;
        }
        .power-plant-info-header {
            background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
            padding: 12px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .power-plant-info-title {
            font-size: 14px;
            font-weight: 700;
            color: #fff;
        }
        .power-plant-info-close {
            background: none;
            border: none;
            color: rgba(255,255,255,0.8);
            font-size: 20px;
            cursor: pointer;
            padding: 0;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .power-plant-info-close:hover {
            color: #fff;
        }
        .power-plant-info-content {
            padding: 12px 16px;
            overflow-y: auto;
            max-height: calc(100vh - 240px);
        }
        @media (min-width: 769px) {
            body.mode-stats .power-plant-info-panel,
            body[data-pw-mode="stats"] .power-plant-info-panel {
                top: 258px;
                max-height: calc(100vh - 274px);
            }

            body.mode-stats .power-plant-info-content,
            body[data-pw-mode="stats"] .power-plant-info-content {
                max-height: calc(100vh - 324px);
            }
        }
        .power-plant-info-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .power-plant-info-row:last-child {
            border-bottom: none;
        }
        .power-plant-info-label {
            color: #888;
            font-size: 12px;
        }
        .power-plant-info-value {
            color: #fff;
            font-size: 12px;
            font-weight: 500;
        }
        /* Power Plant Country List */
        .power-plant-country-summary {
            display: flex;
            justify-content: space-around;
            padding: 12px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            background: rgba(52, 152, 219, 0.1);
        }
        .power-plant-summary-stat {
            text-align: center;
        }
        .power-plant-summary-value {
            font-size: 20px;
            font-weight: 700;
            color: #3498db;
            display: block;
        }
        .power-plant-summary-label {
            font-size: 11px;
            color: #888;
        }
        .power-plant-list-header {
            font-size: 12px;
            color: #888;
            padding: 10px 16px 5px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .power-plant-list {
            max-height: calc(100vh - 350px);
            overflow-y: auto;
        }
        .power-plant-list-item {
            padding: 10px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            cursor: pointer;
            transition: background 0.2s, transform 0.2s;
        }
        .power-plant-list-item:hover {
            background: rgba(52, 152, 219, 0.2);
            transform: translateX(4px);
        }
        .power-plant-list-name {
            font-size: 13px;
            font-weight: 600;
            color: #fff;
            margin-bottom: 4px;
        }
        .power-plant-list-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 11px;
            color: #aaa;
        }
        .power-plant-extra-info {
            color: #3498db;
            font-size: 10px;
        }

        /* Bloc Summary Panel */
        .bloc-summary-panel {
            position: fixed;
            right: 20px;
            top: 80px;
            width: 320px;
            max-height: calc(100vh - 100px);
            background: rgba(0, 0, 0, 0.95);
            border-radius: 16px;
            border: 1px solid rgba(142, 68, 173, 0.5);
            z-index: 9000 !important;
            overflow-y: auto;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            transform: translateX(400px);
            transition: transform 0.3s ease;
            visibility: hidden;
            pointer-events: none;
        }

        .bloc-summary-panel.visible {
            transform: translateX(0);
            visibility: visible;
            pointer-events: auto;
        }

        .bloc-summary-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            background: linear-gradient(135deg, rgba(142, 68, 173, 0.3), rgba(155, 89, 182, 0.2));
            border-bottom: 1px solid rgba(142, 68, 173, 0.3);
        }

        .bloc-summary-header h3 {
            margin: 0;
            font-size: 16px;
            color: #fff;
        }

        .bloc-summary-close {
            background: none;
            border: none;
            color: #fff;
            font-size: 24px;
            min-width: 44px;
            min-height: 44px;
            cursor: pointer;
            opacity: 0.7;
            transition: opacity 0.2s;
        }

        .bloc-summary-close:hover {
            opacity: 1;
        }

        .bloc-summary-content {
            padding: 15px 20px;
        }

        .bloc-stat-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .bloc-stat-row:last-child {
            border-bottom: none;
        }

        .bloc-stat-label {
            color: rgba(255, 255, 255, 0.7);
            font-size: 13px;
        }

        .bloc-stat-value {
            color: #fff;
            font-size: 15px;
            font-weight: 600;
        }

        .bloc-countries-list {
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
        }

        .bloc-countries-title {
            color: rgba(255, 255, 255, 0.5);
            font-size: 11px;
            text-transform: uppercase;
            margin-bottom: 10px;
        }

        .bloc-countries-flags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            font-size: 20px;
        }

        /* Sport filter buttons */
        /* Sport filters - Flat Design */
        .sport-filters {
            position: fixed;
            top: 110px;
            left: 15px;
            display: none;
            gap: 3px;
            flex-wrap: wrap;
            max-width: 500px;
            z-index: 90;
            background: rgba(30, 30, 40, 0.9);
            padding: 3px;
            border-radius: 6px;
        }

        .sport-filters.visible {
            display: flex;
        }

        .sport-filter {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: transparent;
            color: rgba(255, 255, 255, 0.5);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .sport-filter:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .sport-filter.active {
            background: #f1c40f;
            color: #000;
        }

        /* Stats filter buttons - Flat Design */
        .stats-filters {
            position: fixed;
            top: 60px;
            left: 15px;
            display: none;
            gap: 3px;
            flex-wrap: wrap;
            max-width: 600px;
            z-index: 90;
            background: rgba(30, 30, 40, 0.9);
            padding: 3px;
            border-radius: 6px;
        }

        .stats-filters.visible {
            display: flex;
        }

        .stats-filter {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: transparent;
            color: rgba(255, 255, 255, 0.5);
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .stats-filter:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .stats-filter.active {
            background: #546e7a;
            color: #fff;
        }

        /* Stats Panel */
        .stats-panel {
            position: fixed;
            right: -420px;
            top: 80px;
            width: 400px;
            max-height: calc(100vh - 100px);
            background: linear-gradient(135deg, rgba(25, 25, 40, 0.98) 0%, rgba(40, 35, 55, 0.98) 100%);
            border-radius: 16px;
            border: 1px solid rgba(255, 193, 7, 0.3);
            transition: right 0.3s ease;
            overflow: hidden;
            z-index: 9000 !important;
            display: flex;
            flex-direction: column;
        }

        .stats-panel.visible {
            right: 20px;
        }

        .stats-panel h3 {
            margin: 0;
            padding: 15px 20px;
            background: linear-gradient(135deg, rgba(255, 193, 7, 0.3) 0%, rgba(255, 152, 0, 0.2) 100%);
            border-bottom: 1px solid rgba(255, 193, 7, 0.2);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .stats-panel-content {
            padding: 15px;
            overflow-y: auto;
            flex: 1;
        }

        .stats-medal-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-bottom: 15px;
        }

        .stats-medal-card {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            padding: 12px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .stats-medal-card .medal-icon {
            font-size: 28px;
            margin-bottom: 5px;
        }

        .stats-medal-card .medal-count {
            font-size: 22px;
            font-weight: 700;
            color: #fff;
        }

        .stats-medal-card .medal-label {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.6);
            text-transform: uppercase;
        }

        .stats-achievements {
            margin-top: 15px;
        }

        .stats-achievements h4 {
            color: rgba(255, 193, 7, 0.9);
            margin: 15px 0 10px;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .achievement-item {
            background: rgba(255, 255, 255, 0.05);
            padding: 10px 12px;
            border-radius: 8px;
            margin-bottom: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .achievement-item .name {
            font-weight: 600;
            color: #fff;
        }

        .achievement-item .year {
            color: rgba(255, 193, 7, 0.8);
            font-size: 12px;
        }

        .achievement-item .category {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.5);
        }

        /* Economy Panel */
        .economy-panel {
            position: fixed;
            right: -420px;
            top: 80px;
            width: 400px;
            max-height: calc(100vh - 100px);
            background: rgba(0, 0, 0, 0.95);
            border-radius: 16px;
            border: 1px solid rgba(142, 68, 173, 0.5);
            padding: 20px;
            transition: right 0.4s ease;
            z-index: 9000 !important;
            overflow-y: auto;
        }

        .economy-panel.visible {
            right: 20px;
            visibility: visible;
        }

        .economy-panel:not(.visible) {
            visibility: hidden;
            pointer-events: none;
        }

        .economy-panel h3 {
            color: #bb8fce;
            font-size: 18px;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .economy-stat-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-bottom: 15px;
        }

        .economy-stat-card {
            background: rgba(142, 68, 173, 0.15);
            border: 1px solid rgba(142, 68, 173, 0.3);
            border-radius: 10px;
            padding: 12px;
            text-align: center;
        }

        .economy-stat-card .stat-icon {
            font-size: 24px;
            margin-bottom: 5px;
        }

        .economy-stat-card .stat-value {
            font-size: 20px;
            font-weight: 700;
            color: #bb8fce;
        }

        .economy-stat-card .stat-label {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.6);
            text-transform: uppercase;
        }

        .economy-industries {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            padding: 15px;
            margin-top: 15px;
        }

        .economy-industries h4 {
            color: #bb8fce;
            font-size: 14px;
            margin-bottom: 10px;
        }

        .industry-tag {
            display: inline-block;
            background: rgba(142, 68, 173, 0.3);
            border: 1px solid rgba(142, 68, 173, 0.5);
            border-radius: 15px;
            padding: 5px 12px;
            margin: 3px;
            font-size: 12px;
            color: #d4a5e8;
        }

        /* Military filter buttons */
        /* Military filters - Flat Design */
        .military-filters {
            position: fixed;
            top: 110px;
            left: 15px;
            display: none;
            gap: 3px;
            flex-wrap: wrap;
            max-width: 500px;
            z-index: 90;
            background: rgba(30, 30, 40, 0.9);
            padding: 3px;
            border-radius: 6px;
        }

        .military-filters.visible {
            display: flex;
        }

        .military-filter {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: transparent;
            color: rgba(255, 255, 255, 0.5);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .military-filter:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .military-filter.active {
            background: #558b2f;
            color: #fff;
        }

        /* Military Panel */
        .military-panel {
            position: fixed;
            right: -420px;
            top: 80px;
            width: 400px;
            max-height: calc(100vh - 100px);
            background: rgba(0, 0, 0, 0.95);
            border-radius: 16px;
            border: 1px solid rgba(74, 93, 35, 0.5);
            padding: 20px;
            transition: right 0.4s ease;
            z-index: 9000 !important;
            overflow-y: auto;
        }

        .military-panel.visible {
            right: 20px;
        }

        .military-panel h3 {
            color: #8bb44a;
            font-size: 18px;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .military-panel .country-flag {
            font-size: 28px;
        }

        .military-stat-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-bottom: 15px;
        }

        .military-stat-card {
            background: rgba(74, 93, 35, 0.15);
            border: 1px solid rgba(74, 93, 35, 0.3);
            border-radius: 10px;
            padding: 12px;
            text-align: center;
        }

        .military-stat-card .stat-icon {
            font-size: 24px;
            margin-bottom: 5px;
        }

        .military-stat-card .stat-value {
            font-size: 20px;
            font-weight: 700;
            color: #8bb44a;
        }

        .military-stat-card .stat-label {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.6);
            text-transform: uppercase;
        }

        .military-stat-card.nuclear {
            background: rgba(231, 76, 60, 0.15);
            border-color: rgba(231, 76, 60, 0.3);
        }

        .military-stat-card.nuclear .stat-value {
            color: #e74c3c;
        }

        .military-ranking {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            padding: 15px;
            margin-top: 15px;
        }

        .military-ranking h4 {
            color: #8bb44a;
            font-size: 14px;
            margin-bottom: 10px;
        }

        .military-budget {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .military-budget .budget-value {
            font-size: 24px;
            font-weight: 700;
            color: #f1c40f;
        }

        .military-budget .budget-label {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.6);
        }

        .conflict-marker {
            position: absolute;
            width: 20px;
            height: 20px;
            background: radial-gradient(circle, rgba(231,76,60,0.8) 0%, rgba(231,76,60,0) 70%);
            border-radius: 50%;
            animation: conflict-pulse 1.5s ease-in-out infinite;
            cursor: pointer;
            z-index: 10;
        }

        @keyframes conflict-pulse {
            0%, 100% { transform: scale(1); opacity: 0.8; }
            50% { transform: scale(1.5); opacity: 0.4; }
        }

        .base-marker {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 2px solid #fff;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .base-marker:hover {
            transform: scale(1.3);
        }

        .base-marker.nato {
            background: #3498db;
        }

        .base-marker.russia {
            background: #e74c3c;
        }

        .base-marker.china {
            background: #f1c40f;
        }

        .base-marker.other {
            background: #9b59b6;
        }

        /* Compare Panel - Military Comparison */
        .compare-panel {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            width: 90%;
            max-width: 900px;
            max-height: 85vh;
            background: rgba(10, 15, 20, 0.98);
            border-radius: 20px;
            border: 2px solid rgba(74, 93, 35, 0.6);
            padding: 25px;
            z-index: 400;
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s ease;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
        }

        .compare-panel.visible {
            opacity: 1;
            pointer-events: auto;
            transform: translate(-50%, -50%) scale(1);
        }

        .compare-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(74, 93, 35, 0.4);
        }

        .compare-panel-header h3 {
            color: #8bb44a;
            font-size: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .compare-countries {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .compare-country {
            flex: 1;
            min-width: 250px;
            max-width: 280px;
            background: rgba(74, 93, 35, 0.1);
            border: 1px solid rgba(74, 93, 35, 0.3);
            border-radius: 15px;
            padding: 15px;
        }

        .compare-country-header {
            text-align: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(74, 93, 35, 0.3);
        }

        .compare-country-flag {
            font-size: 40px;
            display: block;
            margin-bottom: 5px;
        }

        .compare-country-name {
            font-size: 16px;
            font-weight: 600;
            color: #fff;
        }

        .compare-country-rank {
            font-size: 12px;
            color: #8bb44a;
            margin-top: 3px;
        }

        .compare-stats {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .compare-stat-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 10px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 8px;
        }

        .compare-stat-row .stat-label {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.6);
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .compare-stat-row .stat-value {
            font-size: 14px;
            font-weight: 600;
            color: #8bb44a;
        }

        .compare-stat-row.best .stat-value {
            color: #f1c40f;
        }

        .compare-stat-row.nuclear .stat-value {
            color: #e74c3c;
        }

        .compare-clear-btn {
            display: block;
            margin: 20px auto 0;
            padding: 10px 25px;
            background: rgba(231, 76, 60, 0.3);
            border: 1px solid rgba(231, 76, 60, 0.5);
            border-radius: 8px;
            color: #fff;
            cursor: pointer;
            transition: all 0.2s;
        }

        .compare-clear-btn:hover {
            background: rgba(231, 76, 60, 0.5);
        }

        .compare-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 399;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;
        }

        .compare-overlay.visible {
            opacity: 1;
            pointer-events: auto;
        }

        /* Space filter buttons - Flat Design */
        .space-filters {
            position: fixed;
            top: 95px;
            left: 15px;
            right: auto;
            width: fit-content;
            display: none;
            gap: 3px;
            flex-wrap: nowrap;
            justify-content: flex-start;
            z-index: 90;
            background: rgba(30, 30, 40, 0.9);
            padding: 3px;
            border-radius: 6px;
        }

        .space-filters.visible {
            display: flex;
        }

        .space-filter {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: transparent;
            color: rgba(255, 255, 255, 0.5);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .space-filter:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .space-filter.active {
            background: #9b59b6;
            color: #fff;
        }

        .space-left-stack {
            display: contents;
        }

        .space-provider-status {
            position: fixed;
            top: calc(132px + var(--pw-safe-top));
            left: calc(15px + var(--pw-safe-left));
            max-width: min(330px, calc(100vw - 30px - var(--pw-safe-left) - var(--pw-safe-right)));
            display: none;
            align-items: center;
            gap: 8px;
            padding: 6px 8px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 6px;
            background: rgba(12, 14, 24, 0.82);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
            backdrop-filter: blur(12px);
            z-index: 8900;
            pointer-events: auto;
        }

        body.mode-space .space-provider-status,
        body[data-pw-mode="space"] .space-provider-status {
            display: flex;
        }

        .space-provider-status-title {
            flex: 0 0 auto;
            color: rgba(255, 255, 255, 0.62);
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }

        .space-provider-pills {
            display: flex;
            gap: 4px;
            overflow-x: auto;
            scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
        }

        .space-provider-pills::-webkit-scrollbar {
            display: none;
        }

        .space-source-pill {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            max-width: 145px;
            padding: 4px 7px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.06);
            color: rgba(255, 255, 255, 0.82);
            font-size: 10px;
            line-height: 1;
            white-space: nowrap;
        }

        .space-source-pill::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #f1c40f;
            box-shadow: 0 0 8px rgba(241, 196, 15, 0.45);
        }

        .space-source-label {
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .space-source-health {
            color: rgba(255, 255, 255, 0.52);
            font-size: 9px;
            text-transform: uppercase;
        }

        .space-source-pill.status-ready::before {
            background: #2ecc71;
            box-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
        }

        .space-source-pill.status-disabled {
            opacity: 0.58;
        }

        .space-source-pill.status-disabled::before {
            background: #7f8c8d;
            box-shadow: none;
        }

        .space-source-pill.status-degraded::before {
            background: #f39c12;
            box-shadow: 0 0 8px rgba(243, 156, 18, 0.45);
        }

        /* Space search - встроен в панель фильтров */
        .space-search-container {
            display: none;
            flex-direction: column;
            position: relative;
            margin-left: 8px;
        }
        .space-search-container.visible {
            display: flex;
        }
        .space-search-row {
            display: flex;
            align-items: center;
        }
        .space-search-input {
            padding: 6px 12px 6px 32px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            font-size: 11px;
            width: 140px;
            outline: none;
            transition: all 0.2s;
        }
        .space-search-input:focus {
            background: rgba(255, 255, 255, 0.15);
            width: 180px;
        }
        .space-search-input::placeholder {
            color: rgba(255, 255, 255, 0.4);
        }
        .space-search-icon {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 12px;
            opacity: 0.5;
            pointer-events: none;
        }
        .space-search-btn {
            display: none;
        }
        .space-search-suggestions {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: rgba(30, 30, 40, 0.98);
            border-radius: 0 0 6px 6px;
            max-height: 250px;
            overflow-y: auto;
            margin-top: 2px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            border: 1px solid rgba(155, 89, 182, 0.3);
            min-width: 220px;
        }
        .space-search-suggestions.visible {
            display: block;
        }
        .space-search-item {
            padding: 10px 12px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            font-size: 12px;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: background 0.15s;
        }
        .space-search-item:hover {
            background: rgba(155, 89, 182, 0.3);
        }
        .space-search-item:last-child {
            border-bottom: none;
        }
        .space-search-item-icon {
            font-size: 16px;
            width: 24px;
            text-align: center;
        }
        .space-search-item-name {
            font-weight: 500;
            color: #fff;
        }
        .space-search-item-type {
            color: rgba(155, 89, 182, 0.8);
            font-size: 10px;
            margin-left: auto;
            background: rgba(155, 89, 182, 0.2);
            padding: 2px 6px;
            border-radius: 3px;
        }
        .space-search-status {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            margin-top: 4px;
            padding: 6px 10px;
            background: rgba(155, 89, 182, 0.95);
            border-radius: 4px;
            font-size: 10px;
            color: #fff;
            white-space: nowrap;
            box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }
        .space-search-status.visible {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .space-search-status .clear-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: #fff;
            padding: 2px 8px;
            border-radius: 3px;
            cursor: pointer;
            font-size: 10px;
            transition: background 0.15s;
        }
        .space-search-status .clear-btn:hover {
            background: rgba(255,255,255,0.35);
        }

        /* Planet filter buttons */
        .planet-filters {
            position: fixed;
            top: 95px;
            left: 15px;
            right: auto;
            width: fit-content;
            display: none;
            gap: 3px;
            flex-wrap: nowrap;
            justify-content: flex-start;
            z-index: 90;
            background: rgba(30, 30, 40, 0.9);
            padding: 3px;
            border-radius: 6px;
        }
        .planet-filters.visible {
            display: flex;
        }
        .planet-filter {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: transparent;
            color: rgba(255, 255, 255, 0.5);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .planet-filter:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }
        .planet-filter.active {
            background: #9b59b6;
            color: #fff;
        }

        /* Planet Info Panel */
        .planet-info-panel {
            position: fixed;
            right: 20px;
            bottom: 20px;
            width: 360px;
            max-height: 70vh;
            background: rgba(15, 15, 30, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 16px;
            overflow-y: auto;
            overflow-x: hidden;
            z-index: 500;
            display: none;
            color: #fff;
            box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(155, 89, 182, 0.2);
        }
        .planet-info-panel.visible {
            display: block;
            animation: fadeSlideUp 0.3s ease;
        }
        @keyframes fadeSlideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .planet-info-close {
            position: absolute;
            top: 12px;
            right: 12px;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: #fff;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            font-size: 18px;
            cursor: pointer;
            z-index: 10;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }
        .planet-info-close:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        .planet-hero {
            text-align: center;
            padding: 20px 20px 10px;
        }
        .planet-preview-canvas {
            width: 160px;
            height: 160px;
            border-radius: 50%;
            margin: 0 auto 12px;
            display: block;
        }
        .planet-hero-name {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 4px;
        }
        .planet-hero-type {
            font-size: 13px;
            color: rgba(255, 255, 255, 0.5);
            margin-bottom: 8px;
        }
        .planet-hero-desc {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.6);
            line-height: 1.5;
            padding: 0 10px;
        }
        .planet-facts {
            padding: 12px 20px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }
        .planet-fact {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            padding: 10px 12px;
        }
        .planet-fact-label {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.4);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }
        .planet-fact-value {
            font-size: 14px;
            font-weight: 600;
            color: #fff;
            overflow-wrap: anywhere;
        }
        .planet-atmosphere {
            padding: 8px 20px 12px;
        }
        .planet-atmosphere-label {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.4);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }
        .planet-atmosphere-value {
            font-size: 13px;
            color: rgba(255, 255, 255, 0.8);
        }
        .planet-explore-btn {
            display: block;
            width: calc(100% - 40px);
            min-height: 44px;
            box-sizing: border-box;
            margin: 8px 20px 20px;
            padding: 12px;
            background: linear-gradient(135deg, #6c3483, #9b59b6);
            border: none;
            border-radius: 12px;
            color: #fff;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            text-align: center;
        }
        .planet-explore-btn:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 20px rgba(155, 89, 182, 0.4);
        }

        /* Back to Earth button */
        .back-to-earth-btn {
            position: fixed;
            top: 60px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 9100;
            padding: 10px 24px;
            background: linear-gradient(135deg, #1a5276, #2980b9);
            color: white;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            display: none;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            font-weight: 600;
            box-shadow: 0 4px 20px rgba(41, 128, 185, 0.4);
            animation: pulseGlowEarth 2s ease-in-out infinite;
        }
        .back-to-earth-btn.visible {
            display: flex;
        }
        @keyframes pulseGlowEarth {
            0%, 100% { box-shadow: 0 4px 20px rgba(41, 128, 185, 0.4); }
            50% { box-shadow: 0 4px 30px rgba(41, 128, 185, 0.7); }
        }
        .back-to-earth-btn:hover {
            background: linear-gradient(135deg, #2980b9, #3498db);
        }
        .explore-rotate-toggle {
            position: fixed;
            top: 105px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 9100;
            padding: 7px 16px;
            background: rgba(30, 50, 80, 0.85);
            color: white;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 14px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            transition: background 0.2s;
            display: none;
        }
        .explore-rotate-toggle.visible {
            display: block;
        }
        .explore-rotate-toggle:hover {
            background: rgba(41, 128, 185, 0.8);
        }

        /* Planet label on globe */
        .planet-label {
            color: #fff;
            font-size: 12px;
            font-weight: 600;
            text-shadow: 0 1px 6px rgba(0,0,0,0.9), 0 0 12px rgba(0,0,0,0.7);
            white-space: nowrap;
            text-align: center;
            letter-spacing: 0.5px;
        }

        /* Space sub-mode buttons (Satellites/Spaceports/Observatories) */
        .space-submodes {
            position: fixed;
            top: 60px;
            left: 15px;
            right: auto;
            width: fit-content;
            display: none;
            gap: 3px;
            justify-content: flex-start;
            z-index: 9000 !important;
            background: rgba(30, 30, 40, 0.9);
            padding: 3px;
            border-radius: 6px;
        }

        .space-submodes.visible {
            display: flex;
        }

        .space-submode {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.7);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .space-submode:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .space-submode.active {
            background: #9b59b6;
            color: #fff;
        }

        .space-counter {
            padding: 6px 10px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.8);
            background: rgba(0, 0, 0, 0.3);
            border-radius: 4px;
            white-space: nowrap;
        }

        /* Flights sub-mode filters */
        .flights-filters {
            position: fixed;
            top: 60px;
            left: 15px;
            right: auto;
            width: fit-content;
            display: none;
            gap: 3px;
            justify-content: flex-start;
            z-index: 90;
            background: rgba(30, 30, 40, 0.9);
            padding: 3px;
            border-radius: 6px;
        }

        .flights-filters.visible {
            display: flex;
        }

        body.flight-radar-active .flights-filters,
        body[data-pw-mode="flights"].flight-radar-active .flights-filters {
            display: none !important;
        }

        .flights-filter {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.7);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .flights-filter:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .flights-filter.active {
            background: #e74c3c;
            color: #fff;
        }

        /* Aircraft type filters */
        .aircraft-type-filters {
            display: flex;
            gap: 6px;
            margin-bottom: 8px;
        }
        .aircraft-type-btn {
            padding: 5px 10px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.7);
            font-size: 10px;
            cursor: pointer;
        }
        .aircraft-type-btn:hover {
            background: rgba(255, 255, 255, 0.15);
            color: #fff;
        }
        .aircraft-type-btn.active {
            background: #3498db;
            color: #fff;
        }

        /* Airport type filter buttons */
        .airport-type-filters {
            display: flex;
            gap: 6px;
            margin-bottom: 8px;
        }
        .airport-type-btn {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: rgba(0, 0, 0, 0.56);
            color: #fff;
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .airport-type-btn:hover {
            background: rgba(0, 0, 0, 0.68);
            color: #fff;
        }
        .airport-type-btn.active {
            background: rgba(0, 0, 0, 0.76);
            color: #fff;
        }

        .flights-counter {
            padding: 6px 10px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.8);
            background: rgba(0, 0, 0, 0.3);
            border-radius: 4px;
            white-space: nowrap;
        }

        .flights-counter.is-loading {
            border: 1px solid rgba(77, 195, 255, 0.34);
            color: #dff5ff;
        }

        /* Ships filters (like flights-filters) */
        .ships-filters {
            position: fixed;
            top: 60px;
            left: 15px;
            right: auto;
            width: fit-content;
            display: none;
            gap: 3px;
            justify-content: flex-start;
            z-index: 90;
            background: rgba(30, 30, 40, 0.9);
            padding: 3px;
            border-radius: 6px;
        }

        .ships-filters.visible {
            display: flex;
        }

        .ships-filter {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.7);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .ships-filter:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .ships-filter.active {
            background: #005f8f;
            color: #fff;
        }

        .ships-counter {
            padding: 6px 10px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.8);
            background: rgba(0, 0, 0, 0.3);
            border-radius: 4px;
            white-space: nowrap;
        }

        #ships-counter-value {
            color: #4fc3f7;
            font-weight: 700;
        }

        /* Geography filters */
        .geography-filters {
            position: fixed;
            top: 60px;
            left: 15px;
            right: auto;
            width: min(1120px, calc(100vw - 30px));
            display: none;
            gap: 6px;
            justify-content: flex-start;
            align-items: center;
            flex-wrap: wrap;
            z-index: 90;
            background: rgba(20, 24, 31, 0.86);
            padding: 6px;
            border: 1px solid rgba(142, 228, 255, 0.12);
            border-radius: 8px;
            backdrop-filter: blur(14px);
        }

        .geography-filters.visible {
            display: flex;
        }

        .geography-filter-scroll {
            display: contents;
        }

        .geography-primary-controls {
            display: contents;
        }

        .geography-filter,
        .geography-back,
        .geography-date-step {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.7);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.15s ease, color 0.15s ease;
        }

        .geography-filter:hover,
        .geography-back:hover,
        .geography-date-step:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .geography-date-step {
            width: 25px;
            height: 25px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            color: rgba(241, 251, 255, 0.9);
            font-size: 18px;
            font-weight: 900;
            line-height: 1;
        }

        .geography-filter.active {
            background: #2e7d62;
            color: #fff;
        }

        .geography-apply {
            background: rgba(80, 150, 124, 0.22);
            color: rgba(241, 251, 255, 0.9);
        }

        .geography-apply.pending {
            background: #2e7d62;
            color: #fff;
            box-shadow: 0 0 0 1px rgba(189, 248, 255, 0.22) inset;
        }

        .geography-filter:disabled,
        .geography-date-step:disabled {
            opacity: 0.42;
            cursor: default;
        }

        .geography-source-select,
        .geography-city-limit {
            height: 25px;
            min-width: 178px;
            max-width: 270px;
            padding: 0 26px 0 9px;
            border: 0;
            border-radius: 4px;
            color: rgba(255, 255, 255, 0.92);
            background: rgba(255, 255, 255, 0.08);
            font-size: 11px;
            font-weight: 700;
            color-scheme: dark;
            outline: none;
        }

        .geography-basemap-select {
            min-width: 152px;
            max-width: 230px;
        }

        .geography-local-select {
            min-width: 156px;
            max-width: 240px;
        }

        .geography-control-group,
        .geography-date-group {
            min-height: 32px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 3px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.045);
        }

        .geography-control-group > span {
            padding-left: 4px;
            color: rgba(241, 251, 255, 0.68);
            font-size: 10px;
            font-weight: 900;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .geography-opacity-control {
            height: 25px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 0 8px;
            border-radius: 4px;
            color: rgba(255, 255, 255, 0.78);
            background: rgba(255, 255, 255, 0.08);
            font-size: 10px;
            font-weight: 800;
            white-space: nowrap;
        }

        .geography-opacity-control input {
            width: 78px;
            accent-color: #78dcff;
        }

        .geography-city-limit {
            min-width: 76px;
            max-width: 92px;
            padding-right: 20px;
        }

        .geography-city-limit:disabled {
            opacity: 0.42;
            cursor: default;
        }

        @media (pointer: coarse) {
            body.geography-2d-active .geography-control-group,
            body.geography-2d-active .geography-date-group,
            body.geography-2d-active .geography-opacity-control,
            body.geography-2d-active .geography-source-select,
            body.geography-2d-active .geography-city-limit,
            body.geography-2d-active .geography-date,
            body.geography-2d-active .geography-date-step,
            body.geography-2d-active .geography-filter,
            body.geography-2d-active .geography-back {
                min-height: 44px;
            }
        }

        .geography-source-info {
            position: absolute;
            top: var(--geography-toolbar-bottom, 124px);
            left: 15px;
            z-index: 1000;
            display: flex;
            gap: 10px;
            width: min(520px, calc(100vw - 30px));
            padding: 0;
            border: 1px solid rgba(142, 228, 255, 0.2);
            border-radius: 7px;
            color: rgba(241, 251, 255, 0.94);
            background: rgba(5, 11, 16, 0.64);
            box-shadow: 0 16px 42px rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(12px);
            pointer-events: auto;
        }

        .geography-source-info.expanded {
            width: min(420px, calc(100vw - 30px));
            padding: 10px 12px;
            background: rgba(5, 11, 16, 0.78);
        }

        .geography-source-info-toggle {
            width: 100%;
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            border: 0;
            color: rgba(241, 251, 255, 0.92);
            background: transparent;
            cursor: pointer;
            text-align: left;
        }

        .geography-source-info-toggle span {
            flex: 0 0 auto;
            padding: 3px 6px;
            border-radius: 5px;
            color: #041016;
            background: #bdf8ff;
            font-size: 10px;
            font-weight: 900;
            text-transform: uppercase;
        }

        .geography-source-info-toggle strong {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: rgba(241, 251, 255, 0.82);
            font-size: 11px;
            font-weight: 850;
        }

        .geography-source-info-close {
            position: absolute;
            top: 7px;
            right: 7px;
            padding: 3px 7px;
            border: 0;
            border-radius: 5px;
            color: rgba(241, 251, 255, 0.78);
            background: rgba(255, 255, 255, 0.08);
            font-size: 10px;
            font-weight: 900;
            cursor: pointer;
        }

        .geography-imagery-progress {
            position: absolute;
            left: 15px;
            top: calc(var(--geography-toolbar-bottom, 124px) + 42px);
            z-index: 1001;
            display: none;
            max-width: min(520px, calc(100vw - 30px));
            padding: 7px 10px;
            border: 1px solid rgba(142, 228, 255, 0.24);
            border-radius: 6px;
            color: rgba(241, 251, 255, 0.92);
            background: rgba(5, 15, 22, 0.76);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
            backdrop-filter: blur(10px);
            font-size: 11px;
            font-weight: 900;
            pointer-events: none;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .geography-imagery-progress.visible {
            display: block;
        }

        .geography-source-info-icon {
            flex: 0 0 46px;
            width: 46px;
            height: 34px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 7px;
            color: #041016;
            background: linear-gradient(135deg, #bdf8ff, #76e36d);
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0;
        }

        .geography-source-info-body {
            min-width: 0;
        }

        .geography-source-info-title {
            margin-bottom: 3px;
            font-size: 12px;
            font-weight: 900;
        }

        .geography-source-info-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-bottom: 6px;
        }

        .geography-source-info-meta span {
            padding: 2px 5px;
            border-radius: 4px;
            color: rgba(241, 251, 255, 0.78);
            background: rgba(255, 255, 255, 0.08);
            font-size: 10px;
            font-weight: 800;
        }

        .geography-source-info-text,
        .geography-source-info-best {
            color: rgba(241, 251, 255, 0.78);
            font-size: 11px;
            line-height: 1.35;
        }

        .geography-source-info-best {
            margin-top: 4px;
            color: rgba(241, 251, 255, 0.9);
        }

        .geography-local-status {
            position: absolute;
            left: 15px;
            top: calc(var(--geography-toolbar-bottom, 124px) + 84px);
            z-index: 1000;
            display: none;
            max-width: min(340px, calc(100vw - 30px));
            padding: 8px 10px;
            border: 1px solid rgba(118, 227, 109, 0.3);
            border-radius: 6px;
            color: rgba(241, 251, 255, 0.94);
            background: rgba(9, 29, 22, 0.78);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
            backdrop-filter: blur(10px);
            font-size: 11px;
            font-weight: 900;
            line-height: 1.25;
            cursor: pointer;
            box-sizing: border-box;
            min-height: 44px;
            overflow: visible;
            overflow-wrap: anywhere;
            text-align: left;
            white-space: normal;
            transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
        }

        .geography-local-status.visible {
            display: block;
        }

        .geography-local-status:hover {
            transform: translateY(-1px);
            border-color: rgba(118, 227, 109, 0.52);
            background: rgba(10, 39, 28, 0.88);
        }

        .geography-local-status:disabled {
            opacity: 0.62;
            cursor: default;
            transform: none;
        }

        .geography-2d-map.fresh-overlay-hidden .geography-imagery-date {
            border-color: rgba(255, 209, 102, 0.38);
            background: rgba(36, 25, 4, 0.72);
        }

        .geography-country-exit {
            position: absolute;
            top: var(--geography-toolbar-bottom, 124px);
            right: 16px;
            z-index: 1001;
            display: none;
            min-width: 178px;
            max-width: min(320px, calc(100vw - 32px));
            padding: 10px 12px;
            border: 1px solid rgba(142, 228, 255, 0.26);
            border-radius: 7px;
            color: #f1fbff;
            background: rgba(5, 11, 16, 0.78);
            box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
            backdrop-filter: blur(12px);
            cursor: pointer;
            text-align: left;
            transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
        }

        .geography-country-exit.visible {
            display: block;
        }

        .geography-country-exit:hover {
            transform: translateY(-1px);
            background: rgba(7, 18, 26, 0.9);
            border-color: rgba(142, 228, 255, 0.45);
        }

        .geography-country-exit-main,
        .geography-country-exit-sub {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .geography-country-exit-main {
            font-size: 12px;
            font-weight: 900;
        }

        .geography-country-exit-sub {
            margin-top: 3px;
            color: rgba(241, 251, 255, 0.7);
            font-size: 11px;
            font-weight: 800;
        }

        @media (max-width: 768px) {
            .geography-source-info {
                top: var(--geography-toolbar-bottom, 140px);
                left: 10px;
                width: calc(100vw - 20px);
            }

            .geography-source-info.expanded {
                padding: 8px 9px;
            }

            .geography-source-info-icon {
                flex-basis: 40px;
                width: 40px;
                height: 28px;
                font-size: 9px;
            }

            .geography-source-info-text,
            .geography-source-info-best {
                font-size: 10px;
            }

            .geography-local-status {
                top: calc(var(--geography-toolbar-bottom, 140px) + 84px);
                left: 10px;
                box-sizing: border-box;
                max-width: calc(100vw - 20px);
                padding: 7px 9px;
                line-height: 1.25;
                white-space: normal;
                overflow-wrap: anywhere;
            }

            .geography-local-status.visible {
                display: -webkit-box;
                min-height: 44px;
                max-height: 44px;
                text-overflow: clip;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
            }

            .geography-country-exit {
                top: var(--geography-toolbar-bottom, 138px);
                right: 10px;
                min-width: 150px;
                max-width: calc(100vw - 20px);
                padding: 8px 9px;
            }
        }

        .geography-back {
            background: #2e7d62;
            color: #fff;
        }

        .geography-counter {
            flex: 1 1 340px;
            min-width: 260px;
            overflow: hidden;
            text-overflow: ellipsis;
            padding: 6px 10px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.8);
            background: rgba(0, 0, 0, 0.3);
            border-radius: 4px;
            white-space: nowrap;
        }

        .geography-date {
            height: 25px;
            padding: 0 8px;
            border: 0;
            border-radius: 4px;
            color: rgba(255, 255, 255, 0.88);
            background: rgba(255, 255, 255, 0.08);
            font-size: 11px;
            font-weight: 600;
            color-scheme: dark;
        }

        .geography-2d-map.is-loading::after {
            content: attr(data-loading);
            position: absolute;
            left: 50%;
            top: 50%;
            z-index: 1000;
            transform: translate(-50%, -50%);
            padding: 9px 13px;
            border-radius: 6px;
            color: rgba(241, 251, 255, 0.95);
            background: rgba(4, 8, 12, 0.72);
            border: 1px solid rgba(142, 228, 255, 0.22);
            font-size: 12px;
            font-weight: 800;
            pointer-events: none;
            backdrop-filter: blur(10px);
        }

        .geography-2d-map {
            position: fixed;
            inset: 0;
            display: block;
            z-index: 40;
            background: #05080c;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            contain: layout paint style;
        }

        .geography-2d-map.visible {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .geography-2d-map.leaflet-container {
            background: #05080c !important;
        }

        .geography-2d-map .geography-satellite-imagery,
        .geography-2d-map .geography-local-imagery {
            image-rendering: auto;
        }

        .geography-2d-map .leaflet-control-zoom {
            border: 0;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
        }

        .geography-2d-map .leaflet-control-zoom a {
            background: rgba(12, 18, 24, 0.88);
            color: #f1fbff;
            border: 0;
        }

        .geography-2d-map .leaflet-control-attribution {
            display: none;
        }

        body.geography-2d-active .zoom-controls,
        body.geography-2d-active .daynight-toggle {
            display: none !important;
            pointer-events: none !important;
        }

        body.geography-2d-active #currency-panel,
        body.geography-2d-active #crypto-panel,
        body.geography-2d-active #radio-panel,
        body.geography-2d-active #tv-panel,
        body.geography-2d-active #news-panel,
        body.geography-2d-active #top-news-panel,
        body.geography-2d-active #country-stats-panel,
        body.geography-2d-active #stats-panel,
        body.geography-2d-active #economy-panel,
        body.geography-2d-active #military-panel,
        body.geography-2d-active #compare-panel,
        body.geography-2d-active #satellite-list-panel {
            visibility: hidden !important;
            pointer-events: none !important;
        }

        .geography-imagery-date {
            position: absolute;
            right: 56px;
            bottom: 12px;
            z-index: 1000;
            padding: 7px 10px;
            border-radius: 6px;
            color: rgba(241, 251, 255, 0.94);
            background: rgba(4, 8, 12, 0.68);
            border: 1px solid rgba(142, 228, 255, 0.2);
            font-size: 11px;
            font-weight: 700;
            backdrop-filter: blur(10px);
            pointer-events: none;
        }

        .geography-imagery-attribution {
            position: absolute;
            left: 10px;
            bottom: 10px;
            z-index: 1000;
            max-width: min(560px, calc(100vw - 90px));
            padding: 5px 8px;
            border-radius: 5px;
            color: rgba(241, 251, 255, 0.82);
            background: rgba(4, 8, 12, 0.62);
            border: 1px solid rgba(142, 228, 255, 0.16);
            font-size: 10px;
            font-weight: 700;
            backdrop-filter: blur(8px);
            pointer-events: none;
        }

        @media (min-width: 769px) {
            body.geography-2d-active .site-footer {
                bottom: 52px;
            }

            body.geography-2d-active .geography-imagery-attribution {
                left: 50%;
                bottom: 9px;
                width: max-content;
                max-width: calc(100vw - 190px);
                transform: translateX(-50%);
                text-align: center;
            }
        }

        @media (max-width: 600px) {
            body.geography-2d-active .geography-filters {
                left: 8px !important;
                right: 8px !important;
                width: auto !important;
                min-height: 0 !important;
                height: 172px !important;
                max-height: 172px !important;
                display: flex !important;
                flex-direction: column !important;
                flex-wrap: nowrap !important;
                align-items: stretch !important;
                gap: 6px !important;
                padding: 6px !important;
                overflow-x: hidden !important;
                overflow-y: hidden !important;
                overscroll-behavior-x: contain !important;
            }

            body.geography-2d-active .geography-filter-scroll {
                display: flex !important;
                flex: 0 0 44px;
                min-width: 0;
                width: 100%;
                height: 44px;
                align-items: center;
                gap: 6px;
                overflow-x: auto;
                overflow-y: hidden;
                overscroll-behavior-x: contain;
                scrollbar-width: none;
            }

            body.geography-2d-active .geography-filter-scroll::-webkit-scrollbar {
                display: none;
            }

            body.geography-2d-active .geography-primary-controls {
                display: flex !important;
                flex: 0 0 44px;
                width: 100%;
                min-width: 0;
                height: 44px;
                align-items: stretch;
                gap: 6px;
            }

            body.geography-2d-active.geography-country-selected .geography-filters {
                height: 222px !important;
                max-height: 222px !important;
            }

            body.geography-2d-active.geography-country-selected .geography-filter-scroll {
                flex: 0 0 44px;
                width: 100%;
            }

            body.geography-2d-active .geography-control-group > span {
                display: none !important;
            }

            body.geography-2d-active .geography-control-group,
            body.geography-2d-active .geography-date-group {
                flex: 0 0 auto;
                width: auto;
                min-width: 0 !important;
                min-height: 44px !important;
                height: 44px !important;
                padding: 2px;
                gap: 4px;
                box-sizing: border-box;
            }

            body.geography-2d-active .geography-control-group {
                display: grid !important;
                grid-template-columns: minmax(0, 1fr);
                flex-basis: min(210px, calc(100vw - 24px));
            }

            body.geography-2d-active .geography-date-group {
                display: grid !important;
                grid-template-columns: 44px minmax(76px, 1fr) 44px 72px;
                flex: 1 1 auto;
                min-width: 0 !important;
            }

            body.geography-2d-active .geography-source-select,
            body.geography-2d-active .geography-basemap-select,
            body.geography-2d-active .geography-local-select {
                width: 100%;
                min-width: 0;
                max-width: none;
                min-height: 44px !important;
                height: 44px !important;
                font-size: 10px;
            }

            body.geography-2d-active .geography-city-limit {
                display: block !important;
                flex: 0 0 92px;
                width: 92px;
                min-width: 92px;
                max-width: 92px;
                min-height: 44px !important;
                height: 44px !important;
            }

            body.geography-2d-active .geography-lang-select {
                flex: 0 0 116px;
                width: 116px;
            }

            body.geography-2d-active .geography-apply {
                flex: 0 0 76px;
                width: 76px;
                padding: 0 5px;
                white-space: normal;
                line-height: 1.05;
            }

            body.geography-2d-active .geography-date {
                width: 100%;
                min-width: 0;
                min-height: 44px !important;
                height: 44px !important;
                font-size: 11px;
            }

            body.geography-2d-active .geography-date-step,
            body.geography-2d-active .geography-filter,
            body.geography-2d-active .geography-back {
                flex: 0 0 auto;
                min-width: 44px !important;
                min-height: 44px !important;
                height: 44px !important;
                padding: 0 9px;
                font-size: 10px;
            }

            body.geography-2d-active .geography-back {
                position: static;
                max-width: min(156px, calc(100vw - 24px));
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            body.geography-2d-active.geography-country-selected .geography-back {
                flex: 0 0 44px;
                width: 100%;
                max-width: none;
                text-align: left;
                font-size: 11px;
            }

            body.geography-2d-active .geography-opacity-control {
                flex: 0 0 min(190px, calc(100vw - 24px));
                width: auto;
                min-width: 0 !important;
                min-height: 44px !important;
                height: 44px !important;
                padding: 0 6px;
                font-size: 9px;
                justify-content: space-between;
            }

            body.geography-2d-active .geography-opacity-control input {
                width: min(86px, 48vw);
            }

            body.geography-2d-active .geography-counter {
                display: none !important;
            }

            body.geography-2d-active .geography-source-info {
                left: 8px;
                width: calc(100vw - 16px);
            }

            body.geography-2d-active .geography-source-info-toggle {
                min-height: 44px !important;
                padding: 6px 8px;
                gap: 6px;
            }

            body.geography-2d-active .geography-source-info-toggle span {
                padding: 2px 5px;
                font-size: 9px;
            }

            body.geography-2d-active .geography-source-info-toggle strong {
                font-size: 10px;
            }

            body.geography-2d-active .geography-imagery-progress {
                left: 8px;
                max-width: calc(100vw - 16px);
                padding: 5px 7px;
                font-size: 10px;
            }

            body.geography-2d-active .geography-imagery-date {
                right: 60px;
                bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
                left: 8px;
                display: -webkit-box !important;
                box-sizing: border-box;
                max-width: none;
                max-height: 48px;
                padding: 5px 7px;
                overflow: hidden;
                font-size: 9px;
                line-height: 1.15;
                white-space: normal;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 3;
            }

            body.geography-2d-active .geography-imagery-attribution {
                right: 60px;
                bottom: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
                left: 8px;
                display: -webkit-box !important;
                box-sizing: border-box;
                max-width: none;
                max-height: 30px;
                padding: 4px 6px;
                overflow: hidden;
                font-size: 9px;
                line-height: 1.15;
                white-space: normal;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
            }

            body.geography-2d-active .geography-country-exit.visible {
                display: none !important;
            }

            body.geography-2d-active .zoom-controls,
            body.geography-2d-active .daynight-toggle {
                display: none !important;
                pointer-events: none !important;
            }

            body.geography-2d-active .leaflet-control-zoom a {
                width: 44px !important;
                height: 44px !important;
                line-height: 44px !important;
                font-size: 26px !important;
            }
        }

        .geography-region-tooltip {
            border: 1px solid rgba(185, 245, 255, 0.26);
            border-radius: 5px;
            color: #f2fbff;
            background: rgba(6, 12, 18, 0.82);
            box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
            font-size: 11px;
            font-weight: 800;
            backdrop-filter: blur(10px);
        }

        .geography-2d-map .leaflet-geographyBoundary-pane,
        .geography-2d-map .leaflet-geographyBoundary-pane canvas {
            pointer-events: none !important;
        }

        .geography-country-hover-tooltip {
            position: fixed;
            z-index: 10002;
            pointer-events: none;
            padding: 6px 9px;
            border: 1px solid rgba(185, 245, 255, 0.28);
            border-radius: 5px;
            color: #f2fbff;
            background: rgba(6, 12, 18, 0.86);
            box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
            font-size: 11px;
            font-weight: 800;
            backdrop-filter: blur(10px);
        }

        .geography-city-label {
            border: 0;
            border-radius: 5px;
            color: #f9fdff;
            background: rgba(236, 250, 255, 0.18);
            box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
            font-size: 11px;
            font-weight: 800;
            line-height: 1.15;
            padding: 3px 7px;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.74);
            backdrop-filter: blur(8px);
        }

        .geography-city-label.city-label-xl {
            font-size: 13px;
            padding: 4px 9px;
            background: rgba(255, 222, 128, 0.28);
        }

        .geography-city-label.city-label-lg {
            font-size: 12px;
            padding: 4px 8px;
        }

        .geography-city-label.city-label-md {
            font-size: 11px;
        }

        .geography-city-label.city-label-sm {
            font-size: 10px;
            padding: 2px 6px;
            background: rgba(236, 250, 255, 0.14);
        }

        .geography-city-label.city-label-xs {
            font-size: 9px;
            padding: 2px 5px;
            color: rgba(249, 253, 255, 0.9);
            background: rgba(236, 250, 255, 0.1);
        }

        .geography-city-popup .leaflet-popup-content p {
            margin: 4px 0;
            color: rgba(232, 242, 248, 0.82);
            font-size: 12px;
            font-weight: 700;
            line-height: 1.25;
        }

        .geography-city-label.leaflet-tooltip-right::before {
            border-right-color: rgba(236, 250, 255, 0.18);
        }

        .geography-city-label.leaflet-tooltip-left::before {
            border-left-color: rgba(236, 250, 255, 0.18);
        }

        .geography-city-label.leaflet-tooltip-top::before {
            border-top-color: rgba(236, 250, 255, 0.18);
        }

        .geography-city-label.leaflet-tooltip-bottom::before {
            border-bottom-color: rgba(236, 250, 255, 0.18);
        }

        body.geography-2d-active .header {
            z-index: 10000 !important;
            background: linear-gradient(180deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.36) 70%, transparent 100%);
        }

        body.geography-2d-active .lang-selector {
            z-index: 10002 !important;
        }

        body.geography-2d-active .header-left,
        body.geography-2d-active .mode-buttons {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            position: relative;
            z-index: 10001 !important;
        }

        body.geography-2d-active .geography-filters {
            z-index: 10000 !important;
        }

        @media (max-width: 900px) {
            body.geography-2d-active .mode-buttons {
                display: none !important;
                position: fixed !important;
                visibility: visible !important;
                opacity: 1 !important;
            }

            body.geography-2d-active .mode-buttons.mobile-open {
                display: flex !important;
            }
        }

        .geography-region-popup .leaflet-popup-content-wrapper {
            color: #edf8ff;
            background: rgba(9, 17, 24, 0.94);
            border: 1px solid rgba(142, 228, 255, 0.22);
            border-radius: 8px;
            box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
            backdrop-filter: blur(14px);
        }

        .geography-region-popup .leaflet-popup-tip {
            background: rgba(9, 17, 24, 0.94);
        }

        .geography-region-popup h3 {
            margin: 0 0 5px;
            font-size: 15px;
        }

        .geography-region-popup p {
            margin: 0;
            color: rgba(237, 248, 255, 0.7);
            font-size: 12px;
        }

        .geography-info-panel {
            position: fixed;
            right: 16px;
            top: 108px;
            width: min(360px, calc(100vw - 32px));
            max-height: calc(100vh - 132px);
            overflow: auto;
            z-index: 260;
            display: none;
            padding: 14px;
            color: #edf8ff;
            background: rgba(9, 17, 24, 0.9);
            border: 1px solid rgba(142, 228, 255, 0.2);
            border-radius: 8px;
            box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
            backdrop-filter: blur(16px);
        }

        .geography-info-panel.visible {
            display: block;
        }

        .geography-info-head {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: flex-start;
            margin-bottom: 12px;
        }

        .geography-info-head p {
            margin: 0 0 4px;
            color: #78dcff;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .geography-info-head h3 {
            margin: 0;
            font-size: 18px;
            line-height: 1.15;
        }

        .geography-info-head span {
            display: block;
            margin-top: 4px;
            color: rgba(237, 248, 255, 0.62);
            font-size: 12px;
        }

        .geography-info-close {
            width: 28px;
            height: 28px;
            border: 0;
            border-radius: 6px;
            color: #dff8ff;
            background: rgba(255, 255, 255, 0.08);
            cursor: pointer;
            font-size: 20px;
            line-height: 1;
        }

        .geography-info-stat {
            display: grid;
            gap: 2px;
            padding: 10px;
            margin-bottom: 12px;
            border-radius: 7px;
            background: rgba(255, 255, 255, 0.055);
        }

        .geography-info-stat span,
        .geography-info-stat small {
            color: rgba(237, 248, 255, 0.62);
            font-size: 11px;
        }

        .geography-info-stat strong {
            font-size: 19px;
        }

        .geography-info-panel section {
            margin-top: 12px;
        }

        .geography-info-panel h4 {
            margin: 0 0 7px;
            font-size: 12px;
            color: rgba(237, 248, 255, 0.78);
        }

        .geography-info-panel ul {
            list-style: none;
            padding: 0;
            margin: 0;
            display: grid;
            gap: 6px;
        }

        .geography-info-panel li {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            padding: 7px 8px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.045);
            font-size: 12px;
        }

        .geography-info-panel li b {
            color: rgba(181, 233, 255, 0.8);
            font-weight: 600;
            white-space: nowrap;
        }

        @media (max-width: 700px) {
            .geography-info-panel {
                left: 10px;
                right: 10px;
                top: 138px;
                width: auto;
                max-height: calc(100vh - 156px);
            }
        }

        /* Ship search container */
        .ship-search-container {
            position: fixed;
            top: 110px;
            left: 15px;
            width: min(390px, calc(100vw - 30px));
            max-width: calc(100vw - 30px);
            display: none;
            z-index: 9000 !important;
            flex-direction: column;
        }
        .ship-search-container.visible {
            display: flex;
        }
        .ship-mobile-search-toggle {
            display: none;
        }
        .ship-search-row {
            display: flex;
        }
        .ship-search-input {
            padding: 8px 12px;
            border: none;
            border-radius: 4px 0 0 4px;
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
            font-size: 12px;
            width: 180px;
            outline: none;
        }
        .ship-search-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }
        .ship-search-btn {
            padding: 8px 12px;
            border: none;
            border-radius: 0 4px 4px 0;
            background: #0288d1;
            color: #fff;
            cursor: pointer;
            font-size: 12px;
        }
        .ship-search-btn:hover {
            background: #0277bd;
        }
        .ship-search-suggestions {
            display: none;
            background: rgba(20, 20, 30, 0.95);
            border-radius: 4px;
            margin-top: 4px;
            max-height: 200px;
            overflow-y: auto;
        }
        .ship-search-suggestions.visible {
            display: block;
        }
        .ship-suggestion-item {
            display: block;
            width: 100%;
            padding: 8px 12px;
            border: 0;
            background: transparent;
            color: inherit;
            text-align: left;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            font-size: 12px;
        }
        .ship-suggestion-item:hover {
            background: rgba(2, 136, 209, 0.3);
        }
        .ship-suggestion-item:last-child {
            border-bottom: none;
        }
        .ship-suggestion-name {
            color: #fff;
            font-weight: 500;
        }
        .ship-suggestion-type {
            color: rgba(255,255,255,0.5);
            font-size: 10px;
            margin-left: 8px;
        }
        .port-type-filters {
            display: flex;
            gap: 4px;
            margin-bottom: 8px;
        }
        .port-type-btn {
            padding: 5px 10px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.7);
            font-size: 10px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .port-type-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        .port-type-btn.active {
            background: rgba(255, 255, 255, 0.25);
            color: #fff;
        }

        /* Ship water type filters (Sea/River) */
        .ship-water-type-filters {
            display: flex;
            gap: 4px;
            margin-bottom: 8px;
        }
        .ship-water-btn {
            padding: 5px 10px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.7);
            font-size: 10px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .ship-water-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        .ship-water-btn.active {
            background: rgba(46, 204, 113, 0.4);
            color: #fff;
        }

        /* Ship type filters */
        .ship-type-filters {
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
            margin-bottom: 8px;
        }
        .ship-type-btn {
            padding: 5px 10px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.7);
            font-size: 10px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .ship-type-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        .ship-type-btn.active {
            background: rgba(52, 152, 219, 0.4);
            color: #fff;
        }

        /* Ship country filter */
        .ship-country-filter {
            margin-bottom: 8px;
        }
        #ship-country-select {
            width: 100%;
            padding: 8px 12px;
            border: none;
            border-radius: 4px;
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
            font-size: 12px;
            cursor: pointer;
            outline: none;
        }
        #ship-country-select:hover {
            background: rgba(0, 0, 0, 0.8);
        }
        #ship-country-select option {
            background: #1a1a2e;
            color: #fff;
            padding: 8px;
        }

        /* Piracy zone markers */
        .piracy-marker {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255, 0, 0, 0.8) 0%, rgba(139, 0, 0, 0.9) 100%);
            border: 2px solid #ff4444;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            cursor: pointer;
            transition: transform 0.2s;
            box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
            animation: piracyPulse 2s ease-in-out infinite;
            position: relative;
            pointer-events: auto !important;
        }
        .piracy-marker:hover {
            transform: scale(1.3);
            z-index: 9999 !important;
        }
        @keyframes piracyPulse {
            0%, 100% { box-shadow: 0 0 15px rgba(255, 0, 0, 0.6); }
            50% { box-shadow: 0 0 25px rgba(255, 0, 0, 0.9); }
        }
        .piracy-tooltip {
            position: absolute;
            top: 38px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(40, 0, 0, 0.97);
            color: #fff;
            padding: 12px 14px;
            border-radius: 8px;
            font-size: 12px;
            white-space: normal;
            width: 280px;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.2s;
            border: 1px solid #ff4444;
            box-shadow: 0 4px 25px rgba(0,0,0,0.6);
            z-index: 99999 !important;
        }
        .piracy-tooltip .piracy-name { font-weight: bold; font-size: 14px; margin-bottom: 8px; }
        .piracy-tooltip .piracy-risk {
            display: inline-block;
            padding: 2px 10px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: bold;
            text-transform: uppercase;
            margin-right: 8px;
        }
        .piracy-tooltip .piracy-risk.high { background: #cc0000; }
        .piracy-tooltip .piracy-risk.medium { background: #dd7700; }
        .piracy-tooltip .piracy-risk.low { background: #338833; }
        .piracy-tooltip .piracy-stats { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
        .piracy-tooltip .piracy-incidents { color: #ff8888; font-size: 11px; }
        .piracy-tooltip .piracy-coords { color: #888; font-size: 10px; margin-bottom: 8px; font-family: monospace; }
        .piracy-tooltip .piracy-desc { color: #ddd; font-size: 11px; line-height: 1.5; margin-bottom: 8px; border-left: 2px solid #ff4444; padding-left: 8px; }
        .piracy-tooltip .piracy-countries { color: #88ccff; font-size: 10px; }
        .piracy-tooltip .piracy-countries::before { content: '🌍 '; }
        .piracy-marker:hover .piracy-tooltip {
            opacity: 1;
        }

        /* SST points */
        .sst-point {
            position: relative;
            pointer-events: auto !important;
            animation: none !important;
            transition: opacity 0.15s !important;
        }

        /* Sanctioned vessels markers */
        .sanctioned-marker {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(200, 0, 0, 0.9) 0%, rgba(80, 0, 0, 0.95) 100%);
            border: 2px solid #ff0000;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            cursor: pointer;
            transition: transform 0.2s;
            box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
            animation: sanctionedPulse 1.5s ease-in-out infinite;
            position: relative;
            pointer-events: auto !important;
        }
        .sanctioned-marker:hover { transform: scale(1.3); z-index: 9999 !important; }
        @keyframes sanctionedPulse {
            0%, 100% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.8); }
            50% { box-shadow: 0 0 35px rgba(255, 0, 0, 1); }
        }
        .sanctioned-tooltip {
            position: absolute;
            top: 40px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(60, 0, 0, 0.97);
            color: #fff;
            padding: 12px;
            border-radius: 8px;
            font-size: 11px;
            width: 260px;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.2s;
            border: 1px solid #ff3333;
            z-index: 99999 !important;
        }
        .sanctioned-tooltip .sanctioned-name { font-weight: bold; font-size: 14px; margin-bottom: 6px; color: #ff6666; }
        .sanctioned-tooltip .sanctioned-info { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; color: #ccc; }
        .sanctioned-tooltip .sanctioned-programs { color: #ffaa00; font-size: 10px; margin-bottom: 4px; }
        .sanctioned-tooltip .sanctioned-status { color: #44ff44; font-size: 10px; font-weight: bold; }
        .sanctioned-marker:hover .sanctioned-tooltip { opacity: 1; }

        .sanctioned-info-panel {
            position: fixed;
            top: 120px;
            left: 20px;
            width: 320px;
            background: rgba(40, 0, 0, 0.95);
            border: 2px solid #ff3333;
            border-radius: 12px;
            padding: 16px;
            z-index: 1000;
            color: #fff;
            box-shadow: 0 8px 40px rgba(255, 0, 0, 0.4);
        }
        .sanctioned-panel-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
        .sanctioned-panel-header h3 { margin: 0; color: #ff6666; flex: 1; }
        .sanctioned-status-badge { background: #ff3333; padding: 2px 8px; border-radius: 10px; font-size: 10px; }
        .sanctioned-panel-content { font-size: 12px; }
        .sanctioned-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
        .sanctioned-sanctions { margin-top: 12px; padding: 10px; background: rgba(255,0,0,0.2); border-radius: 6px; font-size: 11px; }
        .sanctioned-live { margin-top: 10px; color: #44ff44; font-family: monospace; }
        .sanctioned-source { margin-top: 12px; font-size: 10px; color: #888; text-align: center; }

        /* Dark vessels markers (SAR) */
        .dark-vessel-marker {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(100, 0, 150, 0.9) 0%, rgba(40, 0, 60, 0.95) 100%);
            border: 2px solid #aa44ff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            cursor: pointer;
            transition: transform 0.2s;
            box-shadow: 0 0 18px rgba(170, 68, 255, 0.7);
            animation: darkVesselPulse 2s ease-in-out infinite;
            position: relative;
            pointer-events: auto !important;
        }
        .dark-vessel-marker:hover { transform: scale(1.3); z-index: 9999 !important; }
        @keyframes darkVesselPulse {
            0%, 100% { box-shadow: 0 0 18px rgba(170, 68, 255, 0.7); }
            50% { box-shadow: 0 0 30px rgba(170, 68, 255, 1); }
        }
        .dark-vessel-tooltip {
            position: absolute;
            top: 36px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(40, 0, 60, 0.97);
            color: #fff;
            padding: 10px;
            border-radius: 8px;
            font-size: 11px;
            width: 200px;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.2s;
            border: 1px solid #aa44ff;
            z-index: 99999 !important;
        }
        .dark-vessel-tooltip .dark-vessel-title { font-weight: bold; font-size: 13px; margin-bottom: 6px; color: #cc88ff; }
        .dark-vessel-tooltip .dark-vessel-info { color: #ff8888; margin-bottom: 4px; }
        .dark-vessel-tooltip .dark-vessel-coords { color: #888; font-family: monospace; font-size: 10px; margin-bottom: 4px; }
        .dark-vessel-tooltip .dark-vessel-source { color: #88aaff; font-size: 10px; }
        .dark-vessel-marker:hover .dark-vessel-tooltip { opacity: 1; }

        /* Dark vessel hover tooltip (for raycaster) */
        .dark-vessel-hover-tooltip {
            position: fixed;
            padding: 12px 16px;
            background: rgba(40, 0, 60, 0.97);
            border: 1px solid #aa44ff;
            border-radius: 10px;
            color: #fff;
            font-size: 12px;
            pointer-events: none;
            z-index: 99999;
            opacity: 0;
            transition: opacity 0.15s;
            box-shadow: 0 4px 20px rgba(140, 60, 220, 0.5);
            min-width: 180px;
        }
        .dark-vessel-hover-tooltip.visible { opacity: 1; }
        .dark-vessel-hover-tooltip .dv-title { font-weight: bold; color: #cc88ff; margin-bottom: 8px; font-size: 14px; }
        .dark-vessel-hover-tooltip .dv-row { display: flex; justify-content: space-between; margin: 4px 0; }
        .dark-vessel-hover-tooltip .dv-label { color: #aaa; }
        .dark-vessel-hover-tooltip .dv-value { color: #fff; }
        .dark-vessel-hover-tooltip .dv-action { margin-top: 8px; color: #aa88ff; font-size: 10px; text-align: center; }

        /* Infrastructure hover tooltip (for pointsData) */
        .infra-hover-tooltip {
            position: fixed;
            padding: 10px 14px;
            background: rgba(20, 20, 30, 0.95);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            color: #fff;
            font-size: 12px;
            pointer-events: none;
            z-index: 99999;
            opacity: 0;
            transition: opacity 0.15s;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
            max-width: 250px;
        }
        .infra-hover-tooltip.visible { opacity: 1; }
        .infra-hover-tooltip .infra-title { font-weight: bold; margin-bottom: 6px; font-size: 13px; }
        .infra-hover-tooltip .infra-row { display: flex; justify-content: space-between; margin: 3px 0; gap: 12px; }
        .infra-hover-tooltip .infra-label { color: #aaa; }
        .infra-hover-tooltip .infra-value { color: #fff; font-weight: 500; }
        .infra-hover-tooltip .infra-action { margin-top: 6px; color: #888; font-size: 10px; text-align: center; }
        .infra-hover-tooltip.metro { border-color: #9b59b6; }
        .infra-hover-tooltip.metro .infra-title { color: #bb77dd; }
        .infra-hover-tooltip.refineries { border-color: #7f8c8d; }
        .infra-hover-tooltip.refineries .infra-title { color: #bdc3c7; }
        .infra-hover-tooltip.lng { border-color: #f1c40f; }
        .infra-hover-tooltip.lng .infra-title { color: #f4d03f; }
        .infra-hover-tooltip.datacenters { border-color: #2ecc71; }
        .infra-hover-tooltip.datacenters .infra-title { color: #58d68d; }
        .infra-hover-tooltip.pipelines { border-color: #8b4513; }
        .infra-hover-tooltip.pipelines .infra-title { color: #cd853f; }
        .infra-hover-tooltip.pipelines.gas { border-color: #4169e1; }
        .infra-hover-tooltip.pipelines.gas .infra-title { color: #6495ed; }

        /* Dark vessel info panel */
        .dark-vessel-info-panel {
            position: fixed;
            top: 140px;
            left: 20px;
            width: 320px;
            background: rgba(30, 0, 50, 0.97);
            border: 2px solid #aa44ff;
            border-radius: 12px;
            z-index: 1000;
            box-shadow: 0 5px 30px rgba(140, 60, 220, 0.6);
            overflow: hidden;
        }
        .dark-vessel-panel-header {
            display: flex;
            align-items: center;
            padding: 16px;
            background: linear-gradient(135deg, rgba(100, 40, 150, 0.9), rgba(60, 20, 100, 0.9));
            gap: 12px;
        }
        .dark-vessel-panel-header h3 { margin: 0; color: #fff; font-size: 16px; flex: 1; }
        .dark-vessel-panel-header .close-btn { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; opacity: 0.7; }
        .dark-vessel-panel-header .close-btn:hover { opacity: 1; }
        .dark-vessel-panel-content { padding: 16px; }
        .dark-vessel-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(170, 68, 255, 0.2); }
        .dark-vessel-row:last-child { border-bottom: none; }
        .dark-vessel-row span:first-child { color: #aaa; }
        .dark-vessel-row span:last-child { color: #fff; font-weight: 500; }
        .dark-vessel-warning { margin-top: 12px; padding: 10px; background: rgba(255, 100, 100, 0.15); border: 1px solid rgba(255, 100, 100, 0.3); border-radius: 6px; color: #ff8888; font-size: 11px; }
        .dark-vessel-source { margin-top: 12px; font-size: 10px; color: #888; text-align: center; }
        .dark-vessel-source a { color: #bfa0ff; }
        .dark-vessel-subtitle { color: #c9b4ef; font-size: 12px; line-height: 1.35; }

        .dark-vessels-legend,
        .sanctioned-vessels-legend {
            position: fixed;
            top: 140px;
            right: 18px;
            width: min(310px, calc(100vw - 36px));
            padding: 12px;
            border: 1px solid rgba(158, 203, 255, 0.42);
            border-radius: 10px;
            background: rgba(10, 18, 32, 0.94);
            color: #eef7ff;
            z-index: 990;
            box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
        }
        .sanctioned-vessels-legend { border-color: rgba(255, 102, 102, 0.52); }
        .dark-vessels-legend h4,
        .sanctioned-vessels-legend h4 { margin: 0 0 7px; font-size: 14px; }
        .dark-vessels-legend p,
        .sanctioned-vessels-legend p { margin: 0 0 9px; color: rgba(238, 247, 255, 0.76); font-size: 11px; line-height: 1.45; }
        .dark-vessels-scale { display: flex; gap: 10px; margin-bottom: 9px; font-size: 11px; }
        .dark-vessels-scale span { display: inline-flex; align-items: center; gap: 4px; }
        .dark-vessels-scale i { width: 9px; height: 9px; border-radius: 50%; }
        .dark-vessels-scale .sar-low { background: #75adff; }
        .dark-vessels-scale .sar-medium { background: #c67aff; }
        .dark-vessels-scale .sar-high { background: #ffb852; }
        .dark-vessels-filter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
        .dark-vessels-filter button,
        .sanctioned-vessels-legend button {
            min-height: 44px;
            border: 1px solid rgba(158, 203, 255, 0.35);
            border-radius: 7px;
            background: rgba(158, 203, 255, 0.08);
            color: #eef7ff;
            font-weight: 800;
            cursor: pointer;
        }
        .dark-vessels-filter button.active { background: rgba(117, 173, 255, 0.28); border-color: #75adff; }
        .sanctioned-vessels-legend button { width: 100%; margin-top: 8px; border-color: rgba(255, 102, 102, 0.48); background: rgba(255, 70, 70, 0.16); }
        .dark-vessels-meta,
        .sanctioned-vessels-counts { margin-top: 8px; color: rgba(238, 247, 255, 0.58); font-size: 10px; }

        .sanctioned-list-panel {
            position: fixed;
            top: 100px;
            right: 20px;
            width: min(380px, calc(100vw - 20px));
            max-height: min(80dvh, calc(100dvh - 110px));
            overflow: hidden;
            border: 1px solid #ff4444;
            border-radius: 12px;
            background: rgba(20, 20, 30, 0.98);
            color: #fff;
            font-size: 12px;
            z-index: 10020;
        }
        .sanctioned-list-header,
        .sanctioned-list-search,
        .sanctioned-list-content { box-sizing: border-box; }
        .sanctioned-list-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 12px 15px;
            background: linear-gradient(135deg, #ff4444, #cc2222);
            font-weight: 800;
        }
        .sanctioned-list-close {
            display: grid;
            place-items: center;
            min-width: 44px;
            min-height: 44px;
            border: 0;
            background: transparent;
            color: #fff;
            font-size: 24px;
            cursor: pointer;
        }
        .sanctioned-list-search { padding: 10px 15px; border-bottom: 1px solid #333; }
        .sanctioned-list-search input {
            box-sizing: border-box;
            width: 100%;
            min-height: 44px;
            padding: 8px 12px;
            border: 1px solid #555;
            border-radius: 6px;
            background: #1a1a2e;
            color: #fff;
            font-size: 16px;
        }
        .sanctioned-list-content {
            max-height: calc(min(80dvh, 100dvh - 110px) - 116px);
            overflow-y: auto;
            padding: 10px;
        }
        .sanctioned-flag-toggle,
        .sanctioned-vessel-row {
            box-sizing: border-box;
            width: 100%;
            min-height: 44px;
            border: 0;
            color: inherit;
            text-align: left;
            cursor: pointer;
        }
        .sanctioned-flag-toggle:focus-visible,
        .sanctioned-vessel-row:focus-visible {
            outline: 2px solid #ffd0d0;
            outline-offset: -2px;
        }

        @media (max-width: 900px) {
            .sanctioned-list-panel {
                top: calc(58px + env(safe-area-inset-top));
                right: calc(10px + env(safe-area-inset-right));
                left: calc(10px + env(safe-area-inset-left));
                width: auto;
                max-height: calc(100dvh - 72px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
            }
            .sanctioned-list-content {
                max-height: calc(100dvh - 188px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
            }
            .dark-vessels-legend,
            .sanctioned-vessels-legend {
                box-sizing: border-box;
                top: auto;
                right: calc(82px + env(safe-area-inset-right));
                bottom: calc(82px + env(safe-area-inset-bottom));
                left: calc(10px + env(safe-area-inset-left));
                width: auto;
                max-height: 52vh;
                overflow-x: hidden;
                overflow-y: auto;
            }
            .dark-vessel-info-panel,
            .sanctioned-info-panel {
                top: auto;
                right: calc(10px + env(safe-area-inset-right));
                bottom: calc(82px + env(safe-area-inset-bottom));
                left: calc(10px + env(safe-area-inset-left));
                width: auto;
                max-height: 58vh;
                overflow: auto;
            }
        }

        .dark-vessels-message {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(40, 0, 60, 0.95);
            border: 2px solid #aa44ff;
            border-radius: 12px;
            padding: 24px;
            z-index: 1000;
            color: #fff;
            max-width: 400px;
            text-align: center;
        }
        .dark-vessels-message h3 { margin-top: 0; color: #cc88ff; }
        .dark-vessels-message a { color: #88aaff; }
        .dark-vessels-message ol { text-align: left; }
        .sst-point, .sst-point * {
            animation: none !important;
        }
        .sst-point .sst-tooltip {
            position: absolute;
            bottom: 18px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 40, 80, 0.95);
            color: #fff;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 12px;
            white-space: nowrap;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.15s;
            border: 1px solid #4488ff;
            z-index: 99999 !important;
        }
        .sst-point:hover {
            z-index: 9999 !important;
        }
        .sst-point:hover .sst-tooltip {
            opacity: 1;
        }
        .sst-tooltip .sst-temp {
            font-size: 16px;
            font-weight: bold;
        }
        .sst-tooltip .sst-coords {
            color: #88bbff;
            font-size: 10px;
            margin-top: 4px;
        }

        /* Piracy info panel */
        .piracy-info-panel {
            position: fixed;
            top: 175px;
            left: 10px;
            width: 300px;
            max-height: calc(100vh - 200px);
            background: rgba(40, 10, 10, 0.98);
            border-radius: 10px;
            border: 1px solid rgba(255, 68, 68, 0.4);
            z-index: 9000 !important;
            overflow: hidden;
        }
        .piracy-info-header {
            background: linear-gradient(135deg, #8b0000 0%, #b22222 100%);
            padding: 12px 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .piracy-info-header h3 {
            margin: 0;
            font-size: 14px;
            color: #fff;
        }
        .piracy-info-content {
            padding: 15px;
            color: #fff;
            font-size: 12px;
            line-height: 1.5;
            overflow-y: auto;
            max-height: 400px;
        }
        .piracy-stat-row {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .piracy-risk-badge {
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: bold;
        }
        .piracy-risk-badge.high { background: #e74c3c; }
        .piracy-risk-badge.medium { background: #f39c12; }
        .piracy-risk-badge.low { background: #27ae60; }

        /* Ocean currents legend */
        .currents-legend {
            position: fixed;
            bottom: 100px;
            left: 10px;
            background: rgba(20, 40, 60, 0.95);
            border-radius: 8px;
            padding: 12px;
            z-index: 150;
            border: 1px solid rgba(0, 150, 255, 0.3);
        }
        .currents-legend h4 {
            margin: 0 0 10px 0;
            color: #fff;
            font-size: 12px;
        }
        .currents-legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 4px 0;
            font-size: 11px;
            color: rgba(255,255,255,0.8);
        }
        .currents-legend-color {
            width: 20px;
            height: 4px;
            border-radius: 2px;
        }

        /* SST legend */
        .sst-legend {
            position: fixed;
            bottom: 100px;
            left: 10px;
            background: rgba(20, 30, 50, 0.95);
            border-radius: 8px;
            padding: 12px;
            z-index: 150;
            border: 1px solid rgba(255, 150, 0, 0.3);
        }
        .sst-legend h4 {
            margin: 0 0 10px 0;
            color: #fff;
            font-size: 12px;
        }
        .sst-gradient {
            width: 150px;
            height: 15px;
            border-radius: 4px;
            background: linear-gradient(to right, #0000ff, #00ffff, #00ff00, #ffff00, #ff8800, #ff0000);
            margin-bottom: 5px;
        }
        .sst-labels {
            display: flex;
            justify-content: space-between;
            font-size: 10px;
            color: rgba(255,255,255,0.7);
        }
        .sst-provenance {
            max-width: 210px;
            margin-top: 8px;
            color: rgba(255,255,255,0.68);
            font-size: 10px;
            line-height: 1.35;
        }
        .sst-provenance.status-stale,
        .sst-provenance.status-degraded {
            color: rgba(255, 205, 135, 0.92);
        }

        /* Disasters filters */
        .disasters-filters {
            position: fixed;
            top: 60px;
            left: 15px;
            right: auto;
            max-width: calc(100vw - 30px);
            display: none;
            flex-wrap: wrap;
            gap: 3px;
            justify-content: flex-start;
            z-index: 90;
            background: rgba(30, 30, 40, 0.9);
            padding: 3px;
            border-radius: 6px;
        }
        .disasters-filters.visible {
            display: flex;
        }
        .disaster-filter {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.84);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .disaster-filter:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }
        .disaster-filter.active {
            background: #b63124;
            color: #fff;
        }
        .disaster-mobile-list-filter {
            display: none;
        }
        body.mode-disasters .disaster-mobile-list-filter,
        body[data-pw-mode="disasters"] .disaster-mobile-list-filter {
            display: none;
        }
        .disasters-counter {
            padding: 6px 10px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.86);
            background: rgba(0, 0, 0, 0.3);
            border-radius: 4px;
            white-space: nowrap;
        }

        /* Disaster Navigator */
        .disaster-navigator {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin-left: 8px;
            background: rgba(0, 0, 0, 0.4);
            border-radius: 6px;
            padding: 2px 6px;
        }
        .disaster-mobile-detail-nav {
            display: none;
        }
        @media (min-width: 769px) {
            body.mode-disasters #disaster-info-panel.visible,
            body[data-pw-mode="disasters"] #disaster-info-panel.visible {
                display: flex;
                flex-direction: column;
                overflow: hidden;
            }
            body.mode-disasters #disaster-info-panel .disaster-content,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-content {
                flex: 1 1 auto;
                min-height: 0;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }
            body.mode-disasters #disaster-info-panel .disaster-mobile-detail-nav,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-mobile-detail-nav {
                display: grid;
                grid-template-columns: 44px minmax(0, 1fr) 44px;
                align-items: center;
                gap: 8px;
                flex: 0 0 auto;
                min-height: 52px;
                padding: 4px 12px;
                border-top: 1px solid rgba(255,255,255,0.12);
                background: rgba(8, 18, 28, 0.92);
            }
            body.mode-disasters #disaster-info-panel .disaster-mobile-detail-nav button,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-mobile-detail-nav button {
                width: 44px;
                height: 44px;
                border: 1px solid rgba(255,255,255,0.14);
                border-radius: 8px;
                background: rgba(255,255,255,0.08);
                color: #fff;
                font-size: 20px;
                cursor: pointer;
            }
            body.mode-disasters #disaster-info-panel .disaster-mobile-detail-nav span,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-mobile-detail-nav span {
                color: rgba(255,255,255,0.76);
                font-size: 12px;
                font-weight: 800;
                text-align: center;
                white-space: nowrap;
            }
        }
        .disaster-nav-btn {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: #fff;
            width: 24px;
            height: 24px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }
        .disaster-nav-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        .disaster-nav-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }
        .disaster-nav-index {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.8);
            min-width: 40px;
            text-align: center;
        }
        .disaster-list-btn {
            background: rgba(231, 76, 60, 0.8);
            border: none;
            color: #fff;
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 11px;
            margin-left: 4px;
            transition: background 0.2s;
        }
        .disaster-list-btn:hover {
            background: rgba(231, 76, 60, 1);
        }

        /* Disaster List Panel — Sidebar */
        #disaster-list-panel {
            display: none;
            position: fixed;
            top: 95px;
            left: 15px;
            bottom: 60px;
            width: 320px;
            background: rgba(20, 28, 36, 0.97);
            color: #fff;
            border-radius: 12px;
            font-size: 13px;
            z-index: 100;
            box-shadow: 4px 0 20px rgba(0,0,0,0.5);
            overflow: hidden;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }
        #disaster-list-panel.visible {
            display: flex;
            flex-direction: column;
            transform: translateX(0);
            opacity: 1;
        }
        #disaster-list-panel.collapsed {
            display: flex;
            transform: translateX(calc(-100% - 20px));
            opacity: 0;
            pointer-events: none;
        }
        /* Collapsed tab */
        #disaster-list-tab {
            display: none;
            position: fixed;
            top: 95px;
            left: 0;
            width: 28px;
            height: 48px;
            background: rgba(231, 76, 60, 0.85);
            color: #fff;
            border-radius: 0 8px 8px 0;
            cursor: pointer;
            z-index: 100;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
            transition: all 0.25s ease;
            backdrop-filter: blur(4px);
        }
        #disaster-list-tab:hover {
            width: 36px;
            background: rgba(231, 76, 60, 1);
        }
        #disaster-list-tab.visible {
            display: flex;
        }
        .disaster-list-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            background: rgba(231, 76, 60, 0.9);
            border-radius: 12px 12px 0 0;
            flex-shrink: 0;
        }
        .disaster-list-title {
            font-weight: bold;
            font-size: 14px;
        }
        .disaster-list-close {
            background: rgba(255,255,255,0.2);
            border: none;
            color: #fff;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 14px;
        }
        .disaster-list-sort {
            display: flex;
            gap: 4px;
            padding: 8px 12px;
            background: rgba(0,0,0,0.2);
            flex-shrink: 0;
        }
        .disaster-sort-btn {
            padding: 4px 10px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 12px;
            background: transparent;
            color: rgba(255,255,255,0.7);
            font-size: 11px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .disaster-sort-btn.active {
            background: rgba(231, 76, 60, 0.6);
            border-color: rgba(231, 76, 60, 0.8);
            color: #fff;
        }
        .disaster-list-content {
            flex: 1;
            overflow-y: auto;
            padding: 4px 8px;
        }
        .disaster-list-item {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 10px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s;
            background: transparent;
            color: inherit;
            font: inherit;
            text-align: left;
            appearance: none;
            -webkit-appearance: none;
            border: 0;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .disaster-list-item:hover {
            background: rgba(255,255,255,0.1);
        }
        .disaster-list-item:last-child {
            border-bottom: none;
        }
        .disaster-list-item.active {
            background: rgba(231, 76, 60, 0.3);
        }
        .disaster-list-icon {
            font-size: 20px;
            width: 28px;
            text-align: center;
            flex-shrink: 0;
        }
        .disaster-list-info {
            flex: 1;
            min-width: 0;
        }
        .disaster-list-name {
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 13px;
        }
        .disaster-list-meta {
            font-size: 11px;
            color: rgba(255,255,255,0.6);
            margin-top: 2px;
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }
        .disaster-list-badges {
            display: flex;
            gap: 4px;
            flex-shrink: 0;
            align-items: center;
        }
        .disaster-list-more-btn {
            width: 100%;
            min-height: 44px;
            margin: 6px 0 2px;
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 8px;
            background: rgba(255,255,255,0.07);
            color: rgba(255,255,255,0.86);
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
        }
        .disaster-list-more-btn:hover {
            background: rgba(255,255,255,0.12);
            color: #fff;
        }
        .pager-badge {
            display: inline-block;
            padding: 1px 6px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            line-height: 1.4;
        }
        .pager-badge.green { background: #4caf50; color: #fff; }
        .pager-badge.yellow { background: #ffeb3b; color: #333; }
        .pager-badge.orange { background: #ff9800; color: #fff; }
        .pager-badge.red { background: #f44336; color: #fff; }
        .tsunami-badge {
            display: inline-block;
            padding: 1px 6px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 700;
            background: #0288d1;
            color: #fff;
        }
        .disaster-time-ago {
            color: rgba(255,255,255,0.45);
            font-size: 10px;
        }

        /* Disaster Info Panel */
        #disaster-info-panel {
            display: none;
            position: fixed;
            top: 120px;
            left: 350px;
            background: rgba(52, 73, 94, 0.95);
            color: #fff;
            padding: 0;
            border-radius: 12px;
            font-size: 13px;
            z-index: 99999;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            width: 320px;
            max-height: calc(100vh - 140px);
            overflow-y: auto;
            backdrop-filter: blur(10px);
        }
        #disaster-info-panel.visible {
            display: block;
        }
        .disaster-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.2);
            border-radius: 12px 12px 0 0;
        }
        .disaster-header.quake { background: linear-gradient(135deg, #e74c3c, #c0392b); }
        .disaster-header.volcano { background: linear-gradient(135deg, #ff6600, #cc5200); }
        .disaster-header.storm { background: linear-gradient(135deg, #3498db, #2980b9); }
        .disaster-header.wildfire { background: linear-gradient(135deg, #f39c12, #d68910); }
        .disaster-header.epidemic { background: linear-gradient(135deg, #8bc34a, #689f38); }
        .disaster-title {
            font-weight: bold;
            font-size: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .disaster-title .icon {
            font-size: 20px;
        }
        .disaster-content {
            padding: 14px;
        }
        .disaster-info-row {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .disaster-info-row:last-child {
            border-bottom: none;
        }
        .disaster-info-label {
            color: rgba(255,255,255,0.7);
            font-size: 12px;
        }
        .disaster-info-value {
            font-weight: 500;
            text-align: right;
        }
        .disaster-magnitude {
            font-size: 32px;
            font-weight: bold;
            text-align: center;
            padding: 15px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .disaster-magnitude.low { color: #2ecc71; }
        .disaster-magnitude.medium { color: #f1c40f; }
        .disaster-magnitude.high { color: #e67e22; }
        .disaster-magnitude.extreme { color: #e74c3c; }
        .disaster-close-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: #fff;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .disaster-close-btn:hover {
            background: rgba(255,255,255,0.3);
        }
        .disaster-link {
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            min-height: 44px;
            padding: 10px;
            background: rgba(255,255,255,0.1);
            color: #fff;
            text-decoration: none;
            border-radius: 6px;
            margin-top: 10px;
            font-size: 12px;
        }
        .disaster-link:hover {
            background: rgba(255,255,255,0.2);
        }
        .disaster-source-row {
            margin-top: 6px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        .disaster-source-link {
            color: #67e8f9;
            display: inline-flex;
            font-weight: 700;
            min-height: 44px;
            align-items: center;
            text-decoration: none;
        }
        .disaster-source-link:hover,
        .disaster-source-link:focus-visible {
            color: #cffafe;
            text-decoration: underline;
        }
        /* Alert & Tsunami badges in info panel */
        .disaster-alert-row {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .disaster-felt-row {
            font-size: 12px;
            color: rgba(255,255,255,0.7);
            padding: 4px 0 8px;
        }
        /* Impact summary */
        .disaster-impact {
            padding: 10px 0;
            font-size: 13px;
            line-height: 1.5;
            color: rgba(255,255,255,0.9);
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        /* Details toggle */
        .disaster-details-toggle {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 0 4px;
            font-size: 11px;
            color: rgba(255,255,255,0.5);
            cursor: pointer;
            user-select: none;
        }
        .disaster-details-toggle:hover { color: rgba(255,255,255,0.7); }
        .disaster-details-toggle .arrow { transition: transform 0.2s; font-size: 9px; }
        .disaster-details-toggle .arrow.open { transform: rotate(90deg); }
        .disaster-details-body { display: none; }
        .disaster-details-body.open { display: block; }
        /* News section in disaster info panel */
        .disaster-news-section {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid rgba(255,255,255,0.15);
        }
        .disaster-news-title {
            font-size: 14px;
            font-weight: 700;
            margin-bottom: 10px;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .disaster-news-item {
            display: block;
            padding: 10px 12px;
            margin-bottom: 6px;
            border-radius: 8px;
            background: rgba(255,255,255,0.05);
            text-decoration: none;
            color: #fff;
            transition: background 0.2s;
        }
        .disaster-news-item:hover {
            background: rgba(255,255,255,0.12);
        }
        .disaster-news-item-title {
            font-size: 13px;
            font-weight: 500;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .disaster-news-item-meta {
            font-size: 11px;
            color: rgba(255,255,255,0.5);
            margin-top: 5px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .news-source-badge {
            display: inline-block;
            padding: 1px 6px;
            border-radius: 3px;
            background: rgba(255,255,255,0.1);
            font-size: 10px;
            font-weight: 600;
            color: rgba(255,255,255,0.7);
        }
        .news-source-badge.reliefweb { background: rgba(0,119,190,0.3); color: #64b5f6; }
        /* Skeleton loading for news */
        .disaster-news-skeleton {
            padding: 10px 12px;
            margin-bottom: 6px;
            border-radius: 8px;
            background: rgba(255,255,255,0.03);
        }
        .skeleton-line {
            height: 13px;
            background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
            border-radius: 4px;
            margin-bottom: 6px;
        }
        .skeleton-line.short { width: 50%; height: 10px; }
        .skeleton-line.medium { width: 90%; }
        .skeleton-line.long { width: 75%; }
        @keyframes shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        .disaster-news-empty {
            padding: 12px;
            color: rgba(255,255,255,0.56);
            font-size: 12px;
            line-height: 1.35;
            text-align: center;
            border-radius: 8px;
            background: rgba(255,255,255,0.04);
        }
        .disaster-map-marker {
            --marker-bg: rgba(59, 130, 246, 0.92);
            --marker-ring: rgba(191, 219, 254, 0.72);
            width: 26px !important;
            height: 26px !important;
            min-width: 0 !important;
            min-height: 0 !important;
            box-sizing: border-box;
            appearance: none;
            position: relative;
            transform: translate(-50%, -50%);
            border: 0;
            border-radius: 50%;
            background: transparent;
            color: #fff;
            box-shadow: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            cursor: pointer;
            pointer-events: none;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
            transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
        }
        .disaster-map-marker-icon {
            width: 22px;
            height: 22px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(255,255,255,0.74);
            border-radius: 50%;
            background: var(--marker-bg);
            box-shadow: 0 3px 7px rgba(0,0,0,0.30), 0 0 0 1px rgba(0,0,0,0.10);
            font-size: 12px;
            line-height: 1;
            cursor: pointer;
            pointer-events: auto;
        }
        .disaster-map-marker-icon::before {
            content: var(--disaster-marker-symbol, "");
        }
        .disaster-map-marker:hover,
        .disaster-map-marker:focus-visible {
            transform: translate(-50%, -50%) scale(1.12);
            outline: none;
        }
        .disaster-map-marker:hover .disaster-map-marker-icon,
        .disaster-map-marker:focus-visible .disaster-map-marker-icon {
            border-color: #fff;
            box-shadow: 0 6px 15px rgba(0,0,0,0.42), 0 0 0 4px var(--marker-ring);
        }
        .disaster-map-marker.selected {
            width: 32px !important;
            height: 32px !important;
        }
        .disaster-map-marker.selected .disaster-map-marker-icon {
            width: 26px;
            height: 26px;
            border-width: 2px;
            box-shadow: 0 6px 14px rgba(0,0,0,0.42), 0 0 0 4px var(--marker-ring);
            font-size: 14px;
        }
        .disaster-map-marker.type-earthquake { --marker-bg: rgba(239, 68, 68, 0.95); --marker-ring: rgba(248, 113, 113, 0.35); }
        .disaster-map-marker.type-volcano { --marker-bg: rgba(249, 115, 22, 0.95); --marker-ring: rgba(251, 146, 60, 0.35); }
        .disaster-map-marker.type-storm { --marker-bg: rgba(14, 165, 233, 0.95); --marker-ring: rgba(56, 189, 248, 0.35); }
        .disaster-map-marker.type-wildfire { --marker-bg: rgba(234, 88, 12, 0.95); --marker-ring: rgba(251, 146, 60, 0.36); }
        .disaster-map-marker.cluster .disaster-map-marker-icon {
            width: 24px;
            height: 24px;
            font-size: 12px;
            border-color: rgba(255,255,255,0.84);
            box-shadow: 0 5px 13px rgba(0,0,0,0.36), 0 0 0 3px var(--marker-ring);
        }
        .disaster-map-marker-count {
            position: absolute;
            left: 50%;
            top: calc(50% + 10px);
            transform: translateX(-50%);
            min-width: 18px;
            max-width: 34px;
            height: 14px;
            padding: 0 4px;
            border-radius: 7px;
            background: rgba(3, 7, 18, 0.84);
            border: 1px solid rgba(255,255,255,0.48);
            color: #fff;
            font-size: 9px;
            font-weight: 800;
            line-height: 12px;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            pointer-events: none;
        }
        .disaster-map-marker.type-tsunami,
        .disaster-map-marker.type-flood { --marker-bg: rgba(6, 182, 212, 0.95); --marker-ring: rgba(34, 211, 238, 0.36); }
        .disaster-map-marker.type-drought { --marker-bg: rgba(217, 119, 6, 0.95); --marker-ring: rgba(251, 191, 36, 0.34); }
        .disaster-map-marker.type-airquality { --marker-bg: rgba(124, 58, 237, 0.95); --marker-ring: rgba(167, 139, 250, 0.35); }
        .disaster-map-marker.type-spaceweather,
        .disaster-map-marker.type-asteroid { --marker-bg: rgba(168, 85, 247, 0.95); --marker-ring: rgba(216, 180, 254, 0.34); }
        .disaster-map-marker.type-epidemic { --marker-bg: rgba(22, 163, 74, 0.95); --marker-ring: rgba(74, 222, 128, 0.34); }
        .disaster-map-marker.severity-high,
        .disaster-map-marker.severity-extreme {
            box-shadow: none;
        }
        .disaster-map-marker.severity-high .disaster-map-marker-icon,
        .disaster-map-marker.severity-extreme .disaster-map-marker-icon {
            box-shadow: 0 4px 10px rgba(0,0,0,0.34), 0 0 0 2px var(--marker-ring);
        }
        .disaster-tooltip {
            position: fixed;
            background: rgba(0, 0, 0, 0.85);
            color: #fff;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 12px;
            pointer-events: none;
            z-index: 10000;
            max-width: 250px;
            display: none;
            box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }
        .disaster-tooltip.visible {
            display: block;
        }
        .disaster-tooltip-title {
            font-weight: bold;
            margin-bottom: 4px;
        }
        .disaster-tooltip-info {
            color: rgba(255,255,255,0.8);
            font-size: 11px;
        }

        .ais-coverage-banner {
            position: fixed;
            right: 84px;
            bottom: 92px;
            z-index: 85;
            width: min(320px, calc(100vw - 120px));
            pointer-events: auto;
            text-align: left;
        }

        body.mode-disasters .disasters-filters,
        body[data-pw-mode="disasters"] .disasters-filters {
            top: 74px;
            left: 16px;
            right: auto;
            width: 320px;
            max-width: min(320px, calc(100vw - 32px));
            max-height: min(360px, calc(100vh - 112px));
            overflow-y: auto;
            overflow-x: hidden;
            z-index: 100010;
            flex-wrap: nowrap;
            flex-direction: column;
            align-items: stretch;
            gap: 8px;
            padding: 9px;
            background: rgba(12, 18, 26, 0.94);
            border: 1px solid rgba(255,255,255,0.10);
            border-radius: 10px;
            backdrop-filter: blur(12px);
            scrollbar-width: thin;
        }

        body.mode-disasters .disaster-analytics-panel,
        body[data-pw-mode="disasters"] .disaster-analytics-panel {
            display: grid;
            gap: 6px;
        }

        .disaster-kpis {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 6px;
        }

        .disaster-kpi {
            min-height: 42px;
            padding: 6px 8px;
            border-radius: 8px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.08);
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 2px;
        }

        .disaster-kpi strong {
            font-size: 17px;
            line-height: 1;
            color: #fff;
        }

        .disaster-kpi-updated strong {
            font-size: 12px;
            line-height: 1.1;
            font-weight: 700;
            text-transform: none !important;
            font-variant: normal;
            letter-spacing: 0;
            white-space: nowrap;
        }

        .disaster-kpi small {
            font-size: 9px;
            line-height: 1.1;
            color: rgba(255,255,255,0.56);
            text-transform: none;
            letter-spacing: 0;
        }

        .disaster-source-health {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 5px;
            max-height: 58px;
            overflow-x: hidden;
            overflow-y: hidden;
            scrollbar-width: none;
        }

        .disaster-source-pill {
            display: inline-flex;
            align-items: center;
            min-height: 24px;
            max-width: 100%;
            min-width: 0;
            padding: 4px 7px;
            border-radius: 999px;
            font-size: 10px;
            color: rgba(255,255,255,0.72);
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.08);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .disaster-source-pill.error {
            color: #fecaca;
            border-color: rgba(239,68,68,0.45);
            background: rgba(127,29,29,0.35);
        }

        .disaster-source-pill.empty,
        .disaster-source-pill.idle {
            opacity: 0.66;
        }

        .disaster-source-pill.summary {
            justify-content: center;
            color: rgba(255,255,255,0.64);
            background: rgba(255,255,255,0.035);
        }

        .disaster-region-search {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto auto;
            gap: 6px;
            align-items: center;
        }

        .disaster-region-input {
            min-width: 0;
            min-height: 38px;
            height: 38px;
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 7px;
            background: rgba(255,255,255,0.06);
            color: #fff;
            padding: 0 10px;
            font-size: 12px;
            outline: none;
        }

        .disaster-region-input::placeholder {
            color: rgba(255,255,255,0.58);
        }

        .disaster-region-btn,
        .disaster-region-clear {
            min-height: 38px;
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 7px;
            background: rgba(14,165,233,0.22);
            color: #fff;
            padding: 0 10px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
        }

        .disaster-region-clear {
            background: rgba(255,255,255,0.06);
            color: rgba(255,255,255,0.72);
        }

        body.mode-disasters.disaster-region-active .disasters-filters,
        body[data-pw-mode="disasters"].disaster-region-active .disasters-filters {
            max-height: min(620px, calc(100vh - 112px));
        }

        body.mode-disasters.disaster-region-active #disaster-analytics-panel,
        body[data-pw-mode="disasters"].disaster-region-active #disaster-analytics-panel,
        body.mode-disasters.disaster-region-active .disaster-source-health,
        body[data-pw-mode="disasters"].disaster-region-active .disaster-source-health,
        body.mode-disasters.disaster-region-active .disaster-group-filters,
        body[data-pw-mode="disasters"].disaster-region-active .disaster-group-filters,
        body.mode-disasters.disaster-region-active .disasters-counter,
        body[data-pw-mode="disasters"].disaster-region-active .disasters-counter,
        body.mode-disasters.disaster-region-active .disaster-navigator,
        body[data-pw-mode="disasters"].disaster-region-active .disaster-navigator {
            display: none !important;
        }

        body.mode-disasters.disaster-region-active #disaster-filter-drawer,
        body[data-pw-mode="disasters"].disaster-region-active #disaster-filter-drawer {
            display: none !important;
        }

        .disaster-region-brief {
            display: none;
            gap: 7px;
            padding: 8px;
            border: 1px solid rgba(56,189,248,0.26);
            border-radius: 8px;
            background: rgba(8, 18, 28, 0.78);
            max-height: min(520px, calc(100vh - 136px));
            overflow-y: auto;
            scrollbar-width: thin;
        }

        .disaster-region-brief.visible {
            display: grid;
        }

        .disaster-region-brief-head,
        .disaster-region-brief-meta,
        .disaster-region-news-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            font-size: 12px;
            color: rgba(255,255,255,0.72);
        }

        .disaster-region-brief-head strong,
        .disaster-region-news-title {
            color: #fff;
            font-weight: 800;
        }

        .disaster-region-brief-head > div:first-child {
            min-width: 0;
            display: grid;
            gap: 2px;
        }

        .disaster-region-brief-actions {
            display: flex;
            gap: 5px;
            flex: 0 0 auto;
        }

        .disaster-region-brief-actions button {
            min-height: 32px;
            border: 1px solid rgba(56,189,248,0.28);
            border-radius: 7px;
            background: rgba(14,165,233,0.16);
            color: rgba(255,255,255,0.84);
            padding: 0 8px;
            font-size: 11px;
            font-weight: 800;
            cursor: pointer;
        }

        .disaster-region-events,
        .disaster-region-news-list {
            display: grid;
            gap: 5px;
        }

        .disaster-region-event,
        .disaster-region-news-item {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            gap: 4px 8px;
            align-items: center;
            min-height: 38px;
            padding: 6px 8px;
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 7px;
            background: rgba(255,255,255,0.05);
            color: #fff;
            text-align: left;
            text-decoration: none;
        }

        .disaster-region-news-item {
            grid-template-columns: minmax(0, 1fr);
            gap: 3px;
            min-height: 34px;
            padding: 5px 7px;
        }

        .disaster-region-event strong,
        .disaster-region-news-item strong {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 12px;
        }

        .disaster-region-news-item strong {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            white-space: normal;
            line-height: 1.12;
            font-size: 11px;
        }

        .disaster-region-event small,
        .disaster-region-news-item span {
            grid-column: 2;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: rgba(255,255,255,0.58);
            font-size: 10px;
        }

        .disaster-region-news-item span {
            grid-column: 1;
            font-size: 9px;
        }

        .disaster-group-filters {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 6px;
        }

        body.mode-disasters .disaster-filter,
        body[data-pw-mode="disasters"] .disaster-filter,
        .disaster-source-toggle {
            min-height: 38px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 7px 9px;
            border-radius: 7px;
            font-size: 12px;
            line-height: 1.1;
            text-align: center;
        }

        body.mode-disasters .disaster-mobile-list-filter,
        body[data-pw-mode="disasters"] .disaster-mobile-list-filter {
            display: none;
        }

        .disaster-filter-drawer {
            display: none;
            width: 100%;
            min-width: 0;
            grid-template-columns: minmax(0, 1fr);
            gap: 6px;
            padding-top: 2px;
            max-height: min(276px, calc(100dvh - 180px));
            overflow-x: hidden;
            overflow-y: auto;
            overscroll-behavior: contain;
        }

        .disaster-filter-drawer.visible {
            display: grid;
        }

        .disaster-filter-drawer-btn.active {
            color: #fff;
            border-color: rgba(56,189,248,0.46);
            background: rgba(14,165,233,0.22);
        }

        /* Keep every desktop radio action inside the fixed player. */
        @media (min-width: 769px) {
            body.mode-disasters .disaster-region-toggle-btn,
            body[data-pw-mode="disasters"] .disaster-region-toggle-btn {
                display: none !important;
            }
        }

        .disaster-source-toggle {
            width: 100%;
            min-width: 0;
            justify-content: space-between;
            border: 1px solid rgba(255,255,255,0.10);
            background: rgba(255,255,255,0.05);
            color: rgba(255,255,255,0.72);
            cursor: pointer;
            white-space: nowrap;
        }

        .disaster-source-toggle.active {
            color: #fff;
            border-color: rgba(56,189,248,0.42);
            background: rgba(14,165,233,0.18);
        }

        body.mode-disasters .disasters-counter,
        body[data-pw-mode="disasters"] .disasters-counter,
        body.mode-disasters .disaster-navigator,
        body[data-pw-mode="disasters"] .disaster-navigator {
            align-self: stretch;
        }

        body.mode-disasters.disaster-filter-drawer-open #disaster-analytics-panel,
        body[data-pw-mode="disasters"].disaster-filter-drawer-open #disaster-analytics-panel,
        body.mode-disasters.disaster-filter-drawer-open .disasters-counter,
        body[data-pw-mode="disasters"].disaster-filter-drawer-open .disasters-counter,
        body.mode-disasters.disaster-filter-drawer-open .disaster-navigator,
        body[data-pw-mode="disasters"].disaster-filter-drawer-open .disaster-navigator {
            display: none !important;
        }

        body.mode-disasters.disaster-filter-drawer-open .disaster-group-filters,
        body[data-pw-mode="disasters"].disaster-filter-drawer-open .disaster-group-filters {
            grid-template-columns: minmax(0, 1fr) !important;
        }

        body.mode-disasters.disaster-filter-drawer-open .disaster-group-filters .disaster-filter:not(.disaster-filter-drawer-btn),
        body[data-pw-mode="disasters"].disaster-filter-drawer-open .disaster-group-filters .disaster-filter:not(.disaster-filter-drawer-btn) {
            display: none !important;
        }

        body.mode-disasters.disaster-filter-drawer-open #disaster-filter-drawer,
        body[data-pw-mode="disasters"].disaster-filter-drawer-open #disaster-filter-drawer {
            flex: 0 0 auto;
        }

        body.mode-disasters .disaster-navigator,
        body[data-pw-mode="disasters"] .disaster-navigator {
            min-height: 44px;
            justify-content: space-between;
            margin-left: 0;
            padding: 4px;
        }

        body.mode-disasters .disaster-nav-btn,
        body[data-pw-mode="disasters"] .disaster-nav-btn,
        body.mode-disasters .disaster-list-btn,
        body[data-pw-mode="disasters"] .disaster-list-btn,
        body.mode-disasters .disaster-list-close,
        body[data-pw-mode="disasters"] .disaster-list-close,
        body.mode-disasters .disaster-sort-btn,
        body[data-pw-mode="disasters"] .disaster-sort-btn {
            min-width: 44px;
            min-height: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        body.mode-disasters #disaster-list-panel,
        body[data-pw-mode="disasters"] #disaster-list-panel {
            top: 374px !important;
            left: 16px;
            width: 320px;
            bottom: 56px;
            border-radius: 10px;
            z-index: 100010;
        }

        body.mode-disasters #disaster-list-tab,
        body[data-pw-mode="disasters"] #disaster-list-tab {
            top: 374px !important;
        }

        body.mode-disasters #disaster-info-panel,
        body[data-pw-mode="disasters"] #disaster-info-panel {
            top: 96px;
            left: 370px;
            width: 360px;
            max-height: calc(100vh - 176px);
            z-index: 100020;
        }

        @media (min-width: 769px) {
            body.mode-disasters:has(.cookie-banner.visible) .site-footer,
            body[data-pw-mode="disasters"]:has(.cookie-banner.visible) .site-footer {
                display: none;
            }

            body.mode-disasters .cookie-banner.visible,
            body[data-pw-mode="disasters"] .cookie-banner.visible {
                left: 16px;
                right: auto;
                bottom: 18px;
                width: 380px;
                max-width: min(380px, calc(100vw - 32px));
                min-width: 0;
                overflow: hidden;
                border-radius: 12px;
                background: rgba(248, 250, 252, 0.96);
                transform: none;
                z-index: 100001;
            }

            body.mode-disasters .cookie-banner-content,
            body[data-pw-mode="disasters"] .cookie-banner-content {
                display: block;
                padding: 10px 12px;
            }

            body.mode-disasters .cookie-banner-text,
            body[data-pw-mode="disasters"] .cookie-banner-text {
                min-width: 0;
            }

            body.mode-disasters .cookie-banner-title,
            body[data-pw-mode="disasters"] .cookie-banner-title {
                margin: 0;
                margin-bottom: 8px;
                overflow: hidden;
                color: #111827;
                font-size: 13px;
                line-height: 1.2;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            body.mode-disasters .cookie-banner-desc,
            body[data-pw-mode="disasters"] .cookie-banner-desc {
                display: none;
            }

            body.mode-disasters .cookie-banner-actions,
            body[data-pw-mode="disasters"] .cookie-banner-actions {
                display: grid;
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(86px, 1fr);
                gap: 8px;
            }

            body.mode-disasters .cookie-btn-primary,
            body.mode-disasters .cookie-btn-secondary,
            body.mode-disasters .cookie-btn-link,
            body[data-pw-mode="disasters"] .cookie-btn-primary,
            body[data-pw-mode="disasters"] .cookie-btn-secondary,
            body[data-pw-mode="disasters"] .cookie-btn-link {
                width: auto;
                min-height: 34px;
                padding: 7px 12px;
                border-radius: 8px;
                font-size: 12px;
                white-space: nowrap;
            }

            body.mode-disasters .cookie-btn-link,
            body[data-pw-mode="disasters"] .cookie-btn-link {
                grid-column: auto;
                padding-inline: 6px;
            }
        }

        /* Flight search */
        .flight-search-container {
            position: fixed;
            top: 110px;
            left: 15px;
            display: none;
            z-index: 9000 !important;
            flex-direction: column;
        }
        .flight-search-container.visible {
            display: flex;
        }
        .flight-search-row {
            display: flex;
        }
        .flight-search-input {
            padding: 8px 12px;
            border: none;
            border-radius: 4px 0 0 4px;
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
            font-size: 12px;
            width: 140px;
            outline: none;
        }
        .flight-search-input::placeholder {
            color: #e2e8f0;
            opacity: 1;
        }
        .flight-search-btn {
            padding: 8px 12px;
            border: none;
            border-radius: 0 4px 4px 0;
            background: #e74c3c;
            color: #fff;
            font-size: 12px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .flight-search-btn:hover {
            background: #c0392b;
        }

        .flight-radar-hub {
            position: fixed;
            left: 16px;
            right: auto;
            top: 96px;
            width: min(420px, calc(100vw - 32px));
            display: none;
            flex-direction: column;
            gap: 10px;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid rgba(77, 195, 255, 0.24);
            background: rgb(8, 13, 20);
            color: #fff;
            z-index: 8900;
            backdrop-filter: blur(18px);
            box-shadow: 0 22px 50px rgba(0, 0, 0, 0.36);
        }

        body.flight-radar-active .search-container,
        body.flight-radar-active:not(.flight-submode-airports) .flight-search-container {
            display: none !important;
        }

        /* Keep the fixed badge out of the globe when the radar hub is active.
           runtime-quality moves the same accessible shell into the hub slot. */
        body.flight-radar-active .mode-data-status:not(.mode-data-status--media-panel) {
            display: none !important;
        }

        .flight-radar-hub .flight-radar-data-status-slot:not(:empty) {
            display: block;
            padding: 0;
        }

        .flight-radar-route-filters {
            display: grid;
            gap: 6px;
        }

        .flight-radar-route-filters[hidden] {
            display: none;
        }

        .flight-radar-route-filters .flight-search-input {
            width: 100%;
            min-width: 0;
        }

        .flight-radar-hub .mode-data-status.mode-data-status--media-panel {
            position: relative;
            top: auto;
            right: auto;
            bottom: auto;
            left: auto;
            width: 100%;
            transform: none;
        }

        body.flight-radar-active.flight-submode-airports .flight-search-container.visible {
            top: 362px;
            left: 16px;
            width: min(420px, calc(100vw - 32px));
            gap: 8px;
            z-index: 8901 !important;
        }

        @media (min-width: 901px) {
            body.mode-flights.flight-radar-active.flight-submode-airports .flight-search-container.visible,
            body[data-pw-mode="flights"].flight-radar-active.flight-submode-airports .flight-search-container.visible,
            body.flight-radar-expanded.flight-submode-airports .flight-search-container.visible,
            body[data-pw-mode="flights"].flight-radar-expanded.flight-submode-airports .flight-search-container.visible {
                top: 96px;
                left: min(452px, calc(100vw - 336px));
                width: min(320px, calc(100vw - 468px));
                max-width: 320px;
                padding: 10px;
                border-radius: 8px;
                border: 1px solid rgba(77, 195, 255, 0.2);
                background: rgb(8, 13, 20);
                backdrop-filter: blur(16px);
            }
        }

        .flight-radar-hub.visible {
            display: flex;
        }

        @media (min-width: 901px) {
            .flight-radar-hub {
                box-sizing: border-box;
                max-height: calc(100dvh - 168px);
                overflow-y: auto;
                scrollbar-gutter: stable;
            }
        }

        .flight-radar-head,
        .flight-radar-status-row,
        .flight-radar-mode-row,
        .flight-radar-search-row,
        .flight-radar-summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .flight-radar-head,
        .flight-radar-head > :first-child {
            min-width: 0;
        }

        .flight-radar-mode-row {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            align-items: stretch;
            gap: 6px;
        }

        .flight-radar-search-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
        }

        .flight-radar-advanced {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .flight-radar-advanced[hidden] {
            display: none !important;
        }

        .flight-radar-status-row {
            gap: 8px;
        }

        .flight-radar-filter-toggle,
        .flight-radar-auto-status {
            min-height: 30px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 900;
        }

        .flight-radar-filter-toggle {
            border: 1px solid rgba(77, 195, 255, 0.42);
            padding: 0 10px;
            background: rgba(77, 195, 255, 0.16);
            color: #dff7ff;
            cursor: pointer;
        }

        .flight-radar-filter-toggle.active {
            background: rgba(77, 195, 255, 0.28);
            border-color: rgba(77, 195, 255, 0.72);
        }

        .flight-radar-auto-status {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            color: rgba(255, 255, 255, 0.58);
            text-align: right;
        }

        .flight-radar-mode-row button {
            width: 100%;
            min-width: 0;
            align-self: stretch;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.82);
            border-radius: 6px;
            padding: 7px 9px;
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
        }

        .flight-radar-mode-row button.active {
            background: rgba(77, 195, 255, 0.22);
            border-color: rgba(77, 195, 255, 0.72);
            color: #dff7ff;
        }

        #flight-radar-hub [data-flight-action="toggle-nofly"].active {
            background: rgba(255, 68, 68, 0.3);
            border-color: rgba(255, 110, 82, 0.88);
            color: #fff4ed;
            box-shadow: 0 0 0 1px rgba(255, 173, 96, 0.28), 0 0 14px rgba(255, 68, 68, 0.22);
        }

        .flight-radar-kicker {
            color: rgba(153, 224, 255, 0.72);
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0;
        }

        .flight-radar-head strong {
            display: block;
            margin-top: 2px;
            font-size: 18px;
            line-height: 1;
        }

        .flight-radar-health {
            min-width: 0;
            max-width: 100%;
            flex: 1 1 180px;
            padding: 6px 8px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.72);
            font-size: 11px;
            font-weight: 800;
            line-height: 1.15;
            text-align: right;
            white-space: normal;
            overflow-wrap: anywhere;
        }

        .flight-radar-health.ok {
            background: rgba(47, 204, 113, 0.18);
            color: #9ff6c2;
        }

        .flight-radar-health.warn {
            background: rgba(255, 184, 77, 0.16);
            color: #ffd18a;
        }

        .flight-radar-search-row input,
        .flight-radar-selects select {
            min-width: 0;
            height: 36px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            font-size: 13px;
            font-weight: 800;
            outline: none;
        }

        .flight-radar-search-row input {
            padding: 0 10px;
        }

        .flight-radar-search-row button {
            height: 36px;
            border: 0;
            border-radius: 6px;
            padding: 0 12px;
            background: rgba(182, 49, 36, 0.96);
            color: #fff;
            font-size: 12px;
            font-weight: 900;
            cursor: pointer;
        }

        .flight-radar-search-row button.flight-radar-refresh {
            position: relative;
            overflow: hidden;
            background: rgba(77, 195, 255, 0.18);
            border: 1px solid rgba(77, 195, 255, 0.55);
            color: #dff7ff;
            white-space: nowrap;
        }

        .flight-radar-search-row button.flight-radar-refresh:hover {
            background: rgba(77, 195, 255, 0.3);
        }

        .flight-radar-refresh-progress {
            position: absolute;
            inset: 0 auto 0 0;
            width: 48%;
            opacity: 0;
            pointer-events: none;
            background: linear-gradient(90deg, rgba(77, 195, 255, 0), rgba(77, 195, 255, 0.55), rgba(117, 255, 203, 0.35), rgba(77, 195, 255, 0));
            transform: translateX(-115%);
        }

        .flight-radar-refresh-label {
            position: relative;
            z-index: 1;
        }

        .flight-radar-refresh.is-loading {
            cursor: wait;
            color: #ffffff;
            border-color: rgba(117, 255, 203, 0.7);
        }

        .flight-radar-refresh.is-loading .flight-radar-refresh-progress {
            opacity: 1;
            animation: flightRefreshProgress 1.1s ease-in-out infinite;
        }

        @keyframes flightRefreshProgress {
            0% { transform: translateX(-115%); }
            55% { transform: translateX(55%); }
            100% { transform: translateX(225%); }
        }

        .flight-radar-selects {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
        }

        .flight-radar-selects select {
            width: 100%;
            padding: 0 8px;
        }

        .flight-radar-toggles,
        .flight-radar-source-list {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .flight-radar-toggles button {
            height: 30px;
            flex: 1 1 88px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            padding: 0 9px;
            background: rgb(28, 33, 40);
            color: #fff;
            font-size: 11px;
            font-weight: 900;
            cursor: pointer;
        }

        .flight-radar-toggles button.active {
            border-color: rgba(77, 195, 255, 0.6);
            background: rgb(23, 65, 78);
            color: #fff;
        }

        .flight-radar-cache-status {
            margin-top: 3px;
            color: rgba(255, 207, 119, 0.86);
            font-size: 10px;
            font-weight: 900;
            text-align: right;
            text-transform: uppercase;
        }

        .flight-source-chip {
            max-width: 100%;
            min-width: 0;
            padding: 5px 7px;
            border-radius: 5px;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.78);
            font-size: 10px;
            font-weight: 900;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .flight-source-chip em {
            margin-left: 4px;
            color: rgba(255, 255, 255, 0.48);
            font-style: normal;
        }

        .flight-source-chip.working {
            background: rgba(47, 204, 113, 0.18);
            color: #b8ffd4;
        }

        .flight-source-chip.degraded,
        .flight-source-chip.rate_limited {
            background: rgba(255, 184, 77, 0.16);
            color: #ffe0aa;
        }

        .flight-source-chip.offline {
            background: rgba(231, 76, 60, 0.18);
            color: #ffb2a8;
        }

        .flight-source-chip.optional {
            background: rgba(255, 255, 255, 0.055);
            color: rgba(255, 255, 255, 0.48);
        }

        .flight-radar-summary {
            min-width: 0;
            padding: 6px 8px;
            border-radius: 6px;
            background: rgba(8, 13, 20, 0.96);
            color: #f8fafc;
            font-size: 12px;
            font-weight: 800;
            flex-wrap: wrap;
            justify-content: flex-start;
            align-items: baseline;
        }

        .flight-radar-summary strong {
            color: #fff;
            font-size: 18px;
        }

        .flight-radar-summary span {
            min-width: 0;
            color: #e2e8f0;
            white-space: normal;
        }

        .flight-radar-summary .flight-progressive-status {
            flex: 1 1 100%;
            color: #9bddff;
            font-weight: 700;
        }

        @media (max-width: 900px) {
            .stats-data-status {
                top: 166px;
                left: 10px;
                right: 10px;
                width: auto;
                z-index: 194;
            }

            .flight-radar-hub {
                top: auto;
                left: 10px;
                right: 10px;
                bottom: calc(82px + env(safe-area-inset-bottom));
                width: auto;
                max-height: min(46vh, 260px);
                overflow: auto;
                scrollbar-gutter: stable;
                padding: 8px;
                gap: 6px;
            }

            .flight-radar-route-filters {
                box-sizing: border-box;
                padding-inline-end: 12px;
            }

            .flight-radar-head {
                flex-wrap: wrap;
                justify-content: flex-start;
                gap: 6px;
            }

            .flight-radar-health {
                flex: 0 0 100%;
                width: auto;
                max-width: none;
                box-sizing: border-box;
                text-align: center;
                white-space: normal;
            }

            /* The collapsed hub is a single touch-safe row. Its 62px outer height
               leaves the globe's mobile interaction band unobscured; expanding
               Filters restores the complete provider and filter controls. */
            .flight-radar-hub.visible:not(.expanded) {
                display: grid;
                grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
                align-items: stretch;
                box-sizing: border-box;
                height: 62px;
                max-height: 62px;
                overflow: hidden;
                scrollbar-gutter: auto;
            }

            .flight-radar-hub.visible:not(.expanded) .flight-radar-head,
            .flight-radar-hub.visible:not(.expanded) .flight-radar-status-row {
                display: contents;
            }

            .flight-radar-hub.visible:not(.expanded) .flight-radar-head > :first-child,
            .flight-radar-hub.visible:not(.expanded) .flight-radar-status-row > :not(.flight-radar-filter-toggle),
            .flight-radar-hub.visible:not(.expanded) .flight-radar-data-status-slot,
            .flight-radar-hub.visible:not(.expanded) .flight-radar-mode-row,
            .flight-radar-hub.visible:not(.expanded) .flight-radar-advanced,
            .flight-radar-hub.visible:not(.expanded) .flight-radar-summary {
                display: none !important;
            }

            .flight-radar-hub.visible:not(.expanded) .flight-radar-filter-toggle {
                grid-column: 1;
                grid-row: 1;
                min-height: 44px;
                height: 44px;
            }

            .flight-radar-hub.visible:not(.expanded) .flight-radar-health {
                grid-column: 2;
                grid-row: 1;
                min-height: 44px;
                max-height: 44px;
                padding: 5px 8px;
                line-height: 17px;
                overflow: hidden;
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
            }

            body.flight-radar-expanded .flight-radar-hub {
                max-height: min(44vh, 380px);
            }

            body.mode-flights.flight-radar-active.flight-submode-airports .flight-search-container.visible,
            body[data-pw-mode="flights"].flight-radar-active.flight-submode-airports .flight-search-container.visible {
                top: calc(116px + var(--pw-safe-top)) !important;
                left: calc(10px + var(--pw-safe-left)) !important;
                right: calc(10px + var(--pw-safe-right)) !important;
                bottom: auto !important;
                width: auto !important;
                max-width: none !important;
                padding: 8px !important;
                gap: 8px !important;
                border-radius: 8px;
                border: 1px solid rgba(77, 195, 255, 0.22);
                background: rgba(8, 13, 20, 0.82);
                backdrop-filter: blur(16px);
                z-index: 8901 !important;
            }

            body.mode-flights.flight-radar-active.flight-submode-airports .flight-search-container.visible .airport-type-filters,
            body[data-pw-mode="flights"].flight-radar-active.flight-submode-airports .flight-search-container.visible .airport-type-filters {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 6px;
            }

            body.mode-flights.flight-radar-active.flight-submode-airports .flight-search-container.visible .airport-type-btn,
            body[data-pw-mode="flights"].flight-radar-active.flight-submode-airports .flight-search-container.visible .airport-type-btn {
                min-height: 44px;
                padding: 8px 10px;
                border-radius: 8px;
            }

            body.mode-flights.flight-radar-active.flight-submode-airports .flight-search-container.visible .flight-search-row,
            body[data-pw-mode="flights"].flight-radar-active.flight-submode-airports .flight-search-container.visible .flight-search-row {
                width: 100%;
            }

            body.mode-flights.flight-radar-active.flight-submode-airports .flight-search-container.visible .flight-search-input,
            body[data-pw-mode="flights"].flight-radar-active.flight-submode-airports .flight-search-container.visible .flight-search-input {
                width: 100%;
                min-height: 44px;
                border-radius: 8px;
                font-size: 16px;
            }

            .flight-filter-item {
                min-height: 44px;
                box-sizing: border-box;
                display: flex;
                align-items: center;
            }

            .flight-radar-summary {
                gap: 4px 10px;
            }

            .flight-radar-summary span {
                min-width: 0;
                white-space: normal;
            }

            .flight-radar-summary span:last-child {
                flex: 1 1 100%;
            }

            .flight-radar-filter-toggle,
            .flight-radar-mode-row button,
            .flight-radar-toggles button,
            .flight-radar-search-row button,
            .flight-radar-search-row input,
            .flight-radar-selects select {
                min-height: 44px;
                height: 44px;
            }

            body.mode-flights.flight-radar-active:not(.flight-tracking-active) .zoom-controls > :not(.share-btn),
            body.mode-flights.flight-radar-active:not(.flight-tracking-active) .daynight-toggle,
            body.mode-flights.flight-radar-active:not(.flight-tracking-active) #ruler-panel,
            body.mode-flights.flight-tracking-active .zoom-controls > :not(.share-btn),
            body.mode-flights.flight-tracking-active .daynight-toggle,
            body.mode-flights.flight-tracking-active #ruler-panel {
                display: none !important;
            }

            body.mode-flights.flight-tracking-active .zoom-controls {
                display: none !important;
            }

            .flight-radar-selects {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .flight-radar-selects select:last-child {
                grid-column: 1 / -1;
            }

            .flight-radar-mode-row {
                display: grid;
                grid-template-columns: repeat(4, minmax(0, 1fr));
                overflow: visible;
            }

            .flight-radar-mode-row button {
                min-width: 0;
                padding: 0 4px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                font-size: 11px;
            }

            body.mode-flights.flight-radar-active:not(.flight-radar-expanded) .flight-radar-mode-row,
            body[data-pw-mode="flights"].flight-radar-active:not(.flight-radar-expanded) .flight-radar-mode-row {
                display: none;
            }

            body.mode-flights.flight-radar-expanded .flight-radar-mode-row,
            body[data-pw-mode="flights"].flight-radar-expanded .flight-radar-mode-row {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            body.mode-flights.flight-radar-expanded .flight-radar-mode-row button,
            body[data-pw-mode="flights"].flight-radar-expanded .flight-radar-mode-row button {
                font-size: 13px;
                padding: 0 8px;
            }

            .flight-radar-search-row {
                grid-template-columns: minmax(0, 1fr) minmax(86px, 0.35fr);
            }

            .flight-radar-search-row input,
            .flight-radar-search-row button {
                width: 100%;
            }
        }
        .flight-search-suggestions {
            display: none;
            background: rgba(0, 0, 0, 0.9);
            border-radius: 0 0 4px 4px;
            max-height: 200px;
            overflow-y: auto;
            width: 100%;
        }
        .flight-search-suggestions.visible {
            display: block;
        }
        .flight-search-item {
            padding: 8px 12px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            font-size: 11px;
            color: #fff;
        }
        .flight-search-item:hover {
            background: rgba(231, 76, 60, 0.5);
        }
        .flight-search-item:last-child {
            border-bottom: none;
        }
        .flight-search-callsign {
            font-weight: bold;
            color: #f1c40f;
        }
        .flight-search-route {
            color: rgba(255,255,255,0.6);
            font-size: 10px;
        }

        /* Flight filter inputs (origin/destination) */
        .flight-filter-input {
            width: 120px;
            font-size: 11px;
            padding: 6px 10px;
        }
        .flight-filter-btn {
            padding: 6px 10px;
            font-size: 11px;
            background: #3498db;
        }
        .flight-filter-btn:hover {
            background: #2980b9;
        }
        .flight-filter-btn.active {
            background: #27ae60;
        }
        .flight-filter-suggestions {
            display: none;
            background: rgba(0, 0, 0, 0.9);
            border-radius: 4px;
            max-height: 150px;
            overflow-y: auto;
            margin-top: 2px;
        }
        .flight-filter-suggestions.visible {
            display: block;
        }
        .flight-filter-item {
            padding: 6px 10px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            font-size: 10px;
            color: #fff;
        }
        .flight-filter-item[data-flight-action="select-airport-search"] {
            width: 100%;
            border-top: 0;
            border-right: 0;
            border-left: 0;
            background: transparent;
            font-family: inherit;
            text-align: left;
        }
        .flight-filter-item:hover {
            background: rgba(52, 152, 219, 0.5);
        }
        .flight-filter-item:last-child {
            border-bottom: none;
        }
        .flight-filter-item-code {
            font-weight: bold;
            color: #3498db;
        }
        .flight-filter-item-name {
            color: rgba(255,255,255,0.7);
            margin-left: 6px;
        }
        .flight-filter-status {
            display: none;
            margin-top: 6px;
            padding: 6px 10px;
            background: rgba(39, 174, 96, 0.9);
            border-radius: 4px;
            font-size: 10px;
            color: #fff;
        }
        .flight-filter-status.visible {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .flight-filter-status .clear-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: #fff;
            padding: 2px 8px;
            border-radius: 3px;
            cursor: pointer;
            font-size: 10px;
        }
        .flight-filter-status .clear-btn:hover {
            background: rgba(255,255,255,0.3);
        }
        .header .header-right {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .header .stats {
            font-size: 14px;
            color: #888;
            cursor: pointer;
            padding: 6px 12px;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .header .stats:hover {
            background: rgba(0, 212, 255, 0.1);
            color: #00d4ff;
        }

        /* Custom Language Selector */
        .lang-selector {
            position: fixed;
            top: 15px;
            right: 20px;
            z-index: 9999;
            user-select: none;
        }

        html[dir="rtl"] .lang-selector {
            right: auto;
            left: 20px;
        }

        html[dir="rtl"] .lang-dropdown {
            right: auto;
            left: 0;
        }

        .lang-current {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 14px;
            background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(0, 150, 200, 0.1) 100%);
            border: 1px solid rgba(0, 212, 255, 0.3);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .lang-current:hover {
            background: linear-gradient(135deg, rgba(0, 212, 255, 0.25) 0%, rgba(0, 150, 200, 0.15) 100%);
            border-color: rgba(0, 212, 255, 0.5);
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
        }

        .lang-current .lang-flag {
            font-size: 20px;
            line-height: 1;
        }

        .lang-current .lang-name {
            font-size: 13px;
            font-weight: 500;
            color: #fff;
            letter-spacing: 0.3px;
        }

        .lang-current .lang-arrow {
            font-size: 10px;
            color: #fff;
            transition: transform 0.3s ease;
            margin-left: 4px;
        }

        .lang-selector.open .lang-arrow {
            transform: rotate(180deg);
        }

        .lang-selector.open {
            z-index: 100050 !important;
        }

        .lang-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            min-width: 160px;
            max-height: 400px;
            overflow-y: auto;
            background: rgba(15, 15, 35, 0.98);
            border: 1px solid rgba(0, 212, 255, 0.3);
            border-radius: 14px;
            padding: 8px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px) scale(0.95);
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(20px);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 212, 255, 0.1);
            z-index: 1000;
        }

        .lang-selector.open .lang-dropdown {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
        }

        .lang-option {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .lang-option:hover {
            background: rgba(0, 212, 255, 0.15);
        }

        .lang-option.active {
            background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 150, 200, 0.15) 100%);
        }

        .lang-option .lang-flag {
            font-size: 22px;
            line-height: 1;
        }

        .lang-option .lang-info {
            flex: 1;
        }

        .lang-option .lang-title {
            font-size: 13px;
            font-weight: 500;
            color: #fff;
        }

        .lang-option .lang-subtitle {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.4);
            margin-top: 2px;
        }

        .lang-option .lang-check {
            font-size: 14px;
            color: #00d4ff;
            opacity: 0;
            transition: opacity 0.2s;
        }

        .lang-option.active .lang-check {
            opacity: 1;
        }

        .news-panel {
            position: fixed;
            right: 20px;
            top: 80px;
            width: 400px;
            max-height: calc(100vh - 100px);
            background: rgba(20, 20, 40, 0.95);
            border-radius: 16px;
            padding: 20px;
            z-index: 90;
            overflow-y: auto;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.1);
            transform: translateX(450px);
            transition: transform 0.3s ease;
        }

        .news-panel.visible {
            transform: translateX(0);
        }

        .news-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            position: sticky;
            top: 0;
            background: rgba(15, 15, 30, 0.98);
            margin: -20px -20px 25px -20px;
            padding: 15px 20px;
            z-index: 10;
            backdrop-filter: blur(10px);
        }

        .news-panel-header h2 {
            font-size: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #fff;
            margin: 0;
        }

        .news-panel-header .flag {
            font-size: 32px;
        }

        .close-btn {
            background: none;
            border: none;
            color: #888;
            font-size: 24px;
            cursor: pointer;
            transition: color 0.2s;
        }

        .close-btn:hover {
            color: #fff;
        }

        /* Event info header in news panel */
        .event-info-header {
            background: linear-gradient(135deg, rgba(142, 68, 173, 0.3), rgba(155, 89, 182, 0.2));
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 15px;
            border: 1px solid rgba(155, 89, 182, 0.3);
        }

        .event-title-section {
            text-align: center;
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .event-title-icon {
            font-size: 48px;
            margin-bottom: 8px;
        }

        .event-title-name {
            font-size: 20px;
            font-weight: bold;
            color: #fff;
            margin-bottom: 4px;
        }

        .event-title-subtitle {
            font-size: 13px;
            color: #b39ddb;
        }

        .event-info-row {
            display: flex;
            gap: 10px;
            margin-bottom: 8px;
            font-size: 14px;
            color: #ddd;
        }

        .event-info-row:last-child {
            margin-bottom: 0;
        }

        .event-label {
            color: #9b59b6;
            min-width: 100px;
            font-weight: 500;
        }

        .event-news-section-title {
            font-size: 14px;
            font-weight: bold;
            color: #888;
            margin-bottom: 10px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .event-news-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .event-news-list .news-item {
            padding: 12px;
            text-decoration: none;
        }

        .event-news-list .news-source {
            font-size: 11px;
            color: #00d4ff;
            text-transform: uppercase;
            margin-bottom: 5px;
            display: block;
        }

        .event-news-list .news-title {
            font-size: 14px;
            color: #fff;
            line-height: 1.4;
        }

        .no-news {
            text-align: center;
            color: #888;
            padding: 20px;
            font-style: italic;
        }

        /* News card with image */
        .news-item {
            background: rgba(255,255,255,0.05);
            border-radius: 12px;
            margin-bottom: 12px;
            transition: all 0.2s;
            cursor: pointer;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .news-item:hover {
            background: rgba(255,255,255,0.1);
            transform: translateY(-2px);
        }

        .news-item.has-image {
            flex-direction: row;
        }

        .news-item .news-image {
            width: 120px;
            min-width: 120px;
            height: 100px;
            object-fit: cover;
            background: rgba(255,255,255,0.1);
            flex-shrink: 0;
        }

        .news-item .news-image-placeholder {
            width: 120px;
            min-width: 120px;
            height: 100px;
            background: linear-gradient(135deg, rgba(0,212,255,0.2) 0%, rgba(0,153,204,0.2) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            flex-shrink: 0;
        }

        .news-item .news-content {
            padding: 12px 15px;
            display: flex;
            flex-direction: column;
            flex: 1;
            min-width: 0;
        }

        .news-item .source {
            font-size: 11px;
            color: #00d4ff;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .news-item .title {
            font-size: 14px;
            font-weight: 600;
            line-height: 1.3;
            color: #fff;
            margin-bottom: 6px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .news-item .description {
            font-size: 12px;
            line-height: 1.4;
            color: #a0a0a0;
            margin-bottom: 8px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .news-item .meta {
            display: flex;
            gap: 10px;
            font-size: 11px;
            color: #666;
            margin-top: auto;
        }

        .news-item .meta span {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        /* Share button */
        .share-btn {
            background: none;
            border: none;
            color: #888;
            cursor: pointer;
            padding: 4px 8px;
            font-size: 14px;
            border-radius: 6px;
            transition: all 0.2s;
            position: relative;
            display: flex;
            align-items: center;
        }
        .share-btn:hover {
            background: rgba(255,255,255,0.1);
            color: #00d4ff;
        }
        .share-btn svg {
            pointer-events: none;
        }
        .share-modal {
            display: none;
            position: fixed;
            right: 20px;
            width: 280px;
            z-index: 100000;
            box-sizing: border-box;
        }
        .share-modal.visible {
            display: block;
            animation: slideIn 0.2s ease-out;
        }
        @keyframes slideIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .share-modal-content {
            background: rgba(30, 30, 40, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 12px;
            padding: 12px;
            width: 100%;
            box-sizing: border-box;
            border: 1px solid rgba(255,255,255,0.1);
            box-shadow: 0 8px 32px rgba(0,0,0,0.4);
        }
        .share-modal-title {
            color: rgba(255,255,255,0.7);
            font-size: 11px;
            font-weight: 500;
            margin-bottom: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            text-align: center;
        }
        .share-options {
            display: flex;
            gap: 8px;
            width: 100%;
        }
        .share-option {
            flex: 1;
            width: 25%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 12px 0;
            color: #fff;
            font-size: 9px;
            cursor: pointer;
            border-radius: 10px;
            background: rgba(255,255,255,0.08);
            transition: all 0.2s;
            border: none;
        }
        .share-option:hover {
            transform: translateY(-2px);
        }
        .share-option.telegram { background: rgba(0, 136, 204, 0.3); }
        .share-option.telegram:hover { background: rgba(0, 136, 204, 0.5); }
        .share-option.whatsapp { background: rgba(37, 211, 102, 0.3); }
        .share-option.whatsapp:hover { background: rgba(37, 211, 102, 0.5); }
        .share-option.twitter { background: rgba(255, 255, 255, 0.1); }
        .share-option.twitter:hover { background: rgba(255, 255, 255, 0.2); }
        .share-option.copy { background: rgba(255, 255, 255, 0.1); }
        .share-option.copy:hover { background: rgba(255, 255, 255, 0.2); }
        .share-option .icon {
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .share-option .icon svg {
            width: 20px;
            height: 20px;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(5px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Station Modal */
        .station-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.7);
            z-index: 99999;
            justify-content: center;
            align-items: center;
        }
        .station-modal.visible {
            display: flex;
        }
        .station-modal-box {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border-radius: 16px;
            padding: 25px;
            min-width: 300px;
            border: 1px solid rgba(255,255,255,0.2);
            box-shadow: 0 20px 50px rgba(0,0,0,0.5);
        }
        .station-modal-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .station-flag {
            font-size: 24px;
        }
        .station-name {
            font-size: 20px;
            font-weight: 600;
            color: #fff;
            flex: 1;
        }
        .satellite-share-btn {
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 8px;
            padding: 6px 10px;
            cursor: pointer;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .satellite-share-btn:hover {
            background: rgba(255,255,255,0.2);
            border-color: rgba(255,255,255,0.3);
        }
        .station-modal-info {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .station-info-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .station-label {
            color: #888;
            font-size: 13px;
        }
        .station-value {
            color: #4fc3f7;
            font-size: 14px;
            font-weight: 500;
            font-family: monospace;
        }
        .station-news-header {
            width: 100%;
            margin-top: 15px;
            padding: 12px 0 10px 0;
            background: transparent;
            border: none;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            color: #fff;
            font-size: 14px;
            font-weight: 600;
            text-align: center;
        }
        .station-news-container {
            margin-top: 15px;
            max-height: 300px;
            overflow-y: auto;
            border-top: 1px solid rgba(255,255,255,0.1);
            padding-top: 15px;
        }
        .station-news-item {
            padding: 10px;
            margin-bottom: 10px;
            background: rgba(255,255,255,0.05);
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .station-news-item:hover {
            background: rgba(255,255,255,0.1);
        }
        .station-news-title {
            color: #fff;
            font-size: 13px;
            line-height: 1.4;
            margin-bottom: 5px;
        }
        .station-news-source {
            color: #888;
            font-size: 11px;
        }
        .station-news-loading {
            text-align: center;
            color: #888;
            padding: 20px;
        }

        /* Station Tooltip */
        .station-tooltip {
            display: none;
            position: fixed;
            background: rgba(0,0,0,0.9);
            color: #fff;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 12px;
            z-index: 10000;
            pointer-events: none;
            white-space: nowrap;
        }
        .station-tooltip.visible {
            display: block;
        }

        /* Elevation/Depth Tooltip for Stats Mode */
        .elevation-tooltip {
            display: none;
            position: fixed;
            background: rgba(0,0,0,0.9);
            color: #fff;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 13px;
            z-index: 10000;
            pointer-events: none;
            white-space: nowrap;
            border: 1px solid rgba(255,255,255,0.2);
            box-shadow: 0 4px 12px rgba(0,0,0,0.5);
            min-width: 120px;
        }
        .elevation-tooltip.visible {
            display: block;
        }
        .elevation-tooltip .elevation-value {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 4px;
        }
        .elevation-tooltip .elevation-value.positive {
            color: #4ade80;
        }
        .elevation-tooltip .elevation-value.negative {
            color: #60a5fa;
        }
        .elevation-tooltip .elevation-label {
            font-size: 11px;
            opacity: 0.8;
        }
        .elevation-tooltip .elevation-coords {
            font-size: 10px;
            opacity: 0.6;
            margin-top: 6px;
            border-top: 1px solid rgba(255,255,255,0.2);
            padding-top: 6px;
        }
        .elevation-tooltip .elevation-country {
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 6px;
            padding-bottom: 6px;
            border-bottom: 1px solid rgba(255,255,255,0.2);
        }
        .elevation-tooltip .elevation-country:empty {
            display: none;
            margin: 0;
            padding: 0;
            border: none;
        }

        /* Special Point Info Panel */
        .special-point-panel {
            position: fixed;
            left: 20px;
            bottom: 80px;
            width: 350px;
            background: rgba(20, 25, 35, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.5);
            border: 1px solid rgba(255,255,255,0.1);
            z-index: 9999;
            display: none;
            overflow: hidden;
        }
        .special-point-panel.visible {
            display: block;
            animation: slideUp 0.3s ease;
        }
        @keyframes slideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .special-point-panel .close-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(0,0,0,0.5);
            color: white;
            border: none;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            font-size: 18px;
            cursor: pointer;
            z-index: 10;
            transition: background 0.2s;
        }
        .special-point-panel .close-btn:hover {
            background: rgba(255,100,100,0.7);
        }
        .special-point-photo {
            width: 100%;
            height: 180px;
            object-fit: cover;
        }
        .special-point-info {
            padding: 15px;
        }
        .special-point-name {
            margin: 0 0 10px 0;
            font-size: 18px;
            font-weight: 600;
            color: #fff;
        }
        .special-point-stats {
            display: flex;
            gap: 15px;
            margin-bottom: 10px;
            font-size: 13px;
        }
        .special-point-stats span {
            padding: 4px 10px;
            background: rgba(255,255,255,0.1);
            border-radius: 4px;
        }
        .special-point-stats .elevation-positive {
            color: #4ade80;
        }
        .special-point-stats .elevation-negative {
            color: #60a5fa;
        }
        .special-point-desc {
            margin: 0;
            font-size: 13px;
            color: rgba(255,255,255,0.8);
            line-height: 1.5;
        }

        /* Flight 2D Markers - SVG Icons */
        .flight-marker {
            cursor: pointer;
            transform-origin: center;
            transition: transform 0.15s ease, filter 0.15s ease;
            user-select: none;
            filter: drop-shadow(0 0 2px rgba(0,0,0,0.8));
        }
        .flight-marker:hover {
            filter: drop-shadow(0 0 4px #fff) brightness(1.3);
        }
        .flight-marker svg {
            display: block;
        }

        /* Flight Tooltip */
        .flight-tooltip {
            display: none;
            position: fixed;
            background: rgba(231, 76, 60, 0.95);
            color: #fff;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 12px;
            z-index: 10000;
            pointer-events: none;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
            min-width: 180px;
        }
        .flight-tooltip.visible {
            display: block;
        }
        .flight-tooltip-header {
            font-weight: bold;
            font-size: 14px;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .flight-tooltip-row {
            display: flex;
            justify-content: space-between;
            margin: 3px 0;
            font-size: 11px;
        }
        .flight-tooltip-label {
            opacity: 0.8;
        }
        .flight-tooltip-value {
            font-weight: 500;
        }

        /* Tracked Flight Label */
        #tracked-flight-label {
            display: none;
            position: fixed;
            background: rgba(255, 102, 0, 0.95);
            color: #fff;
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: bold;
            z-index: 9999;
            pointer-events: none;
            box-shadow: 0 2px 8px rgba(0,0,0,0.4);
            border: 2px solid rgba(255, 68, 0, 1);
            white-space: nowrap;
            transform: translateX(-50%);
        }
        #tracked-flight-label.visible {
            display: block;
        }

        /* Spaceport Tooltip */
        .spaceport-tooltip {
            display: none;
            position: fixed;
            background: rgba(255, 102, 0, 0.95);
            color: #fff;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 12px;
            z-index: 10000;
            pointer-events: none;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
            min-width: 150px;
            max-width: calc(100vw - 16px);
            overflow-wrap: anywhere;
        }
        .spaceport-tooltip.visible {
            display: block;
        }
        .spaceport-tooltip .sp-flag {
            font-size: 16px;
        }
        .spaceport-tooltip .sp-org {
            opacity: 0.8;
            font-size: 11px;
        }

        /* Observatory Tooltip */
        .observatory-tooltip {
            display: none;
            position: fixed;
            background: rgba(0, 204, 255, 0.95);
            color: #fff;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 12px;
            z-index: 10000;
            pointer-events: none;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
            min-width: 150px;
            max-width: calc(100vw - 16px);
            overflow-wrap: anywhere;
        }
        .observatory-tooltip.visible {
            display: block;
        }
        .observatory-tooltip .obs-flag {
            font-size: 16px;
        }
        .observatory-tooltip .obs-info {
            opacity: 0.8;
            font-size: 11px;
        }

        /* Meteor Radiant Tooltip */
        .meteor-tooltip {
            display: none;
            position: fixed;
            background: linear-gradient(135deg, rgba(255, 180, 50, 0.98), rgba(255, 100, 0, 0.95));
            color: #fff;
            padding: 12px 16px;
            border-radius: 10px;
            font-size: 12px;
            z-index: 10000;
            pointer-events: none;
            box-shadow: 0 4px 20px rgba(255, 150, 0, 0.5);
            min-width: 180px;
            border: 1px solid rgba(255, 220, 100, 0.6);
        }
        .meteor-tooltip.visible {
            display: block;
        }
        .meteor-tooltip .meteor-name {
            font-weight: bold;
            font-size: 14px;
            margin-bottom: 4px;
        }
        .meteor-tooltip .meteor-status {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: bold;
            margin-bottom: 6px;
        }
        .meteor-tooltip .meteor-status.active {
            background: rgba(0, 255, 100, 0.3);
            color: #90FF90;
        }
        .meteor-tooltip .meteor-status.inactive {
            background: rgba(100, 100, 100, 0.3);
            color: #ccc;
        }
        .meteor-tooltip .meteor-info {
            opacity: 0.9;
            font-size: 11px;
            line-height: 1.5;
        }

        #tracked-flight-label::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            border-left: 6px solid transparent;
            border-right: 6px solid transparent;
            border-top: 8px solid rgba(255, 68, 0, 1);
        }

        /* Airport Tooltip - стиль FR24 */
        .airport-tooltip {
            display: none;
            position: fixed;
            background: #fff;
            color: #333;
            padding: 8px 12px;
            border-radius: 4px;
            font-size: 13px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            z-index: 10000;
            pointer-events: none;
            box-shadow: 0 2px 10px rgba(0,0,0,0.2);
            border: 1px solid rgba(0,0,0,0.1);
            white-space: nowrap;
        }
        .airport-tooltip .airport-name {
            font-weight: 600;
            color: #1a1a1a;
            margin-bottom: 2px;
        }
        .airport-tooltip .airport-codes {
            font-size: 12px;
            color: #666;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .airport-tooltip .airport-codes .flag {
            font-size: 14px;
        }
        .airport-tooltip.visible {
            display: block;
        }

        /* Ship Tooltip */
        .ship-tooltip {
            display: none;
            position: fixed;
            background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%);
            color: #fff;
            padding: 12px 16px;
            border-radius: 12px;
            font-size: 14px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            z-index: 100000;
            pointer-events: none;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            min-width: 200px;
        }
        .ship-tooltip .ship-name {
            font-weight: 700;
            font-size: 18px;
            color: #fff;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .ship-tooltip .ship-details {
            display: grid;
            grid-template-columns: auto auto;
            gap: 4px 12px;
            font-size: 14px;
        }
        .ship-tooltip .ship-label {
            color: rgba(255,255,255,0.7);
        }
        .ship-tooltip .ship-value {
            text-align: right;
            font-weight: 600;
        }
        .ship-tooltip .ship-action {
            margin-top: 10px;
            padding-top: 8px;
            border-top: 1px solid rgba(255,255,255,0.2);
            text-align: center;
            font-size: 13px;
            color: rgba(255,255,255,0.8);
        }
        .ship-tooltip.visible {
            display: block;
        }

        /* Port Tooltip */
        .port-tooltip {
            display: none;
            position: fixed;
            background: #fff;
            color: #333;
            padding: 8px 12px;
            border-radius: 4px;
            font-size: 13px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            z-index: 10000;
            pointer-events: none;
            box-shadow: 0 2px 10px rgba(0,0,0,0.2);
            border: 1px solid rgba(0,0,0,0.1);
            white-space: nowrap;
        }
        .port-tooltip .port-name {
            font-weight: 600;
            color: #1a1a1a;
            margin-bottom: 2px;
        }
        .port-tooltip .port-info {
            font-size: 12px;
            color: #666;
        }
        .port-tooltip.visible {
            display: block;
        }

        /* Port Info Panel */
        #port-info-panel {
            display: none;
            position: fixed;
            top: 195px;
            left: 10px;
            width: 300px;
            background: #082f52;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.4);
            z-index: 99999;
            color: #fff;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            overflow: hidden;
            max-height: calc(100vh - 220px);
            overflow-y: auto;
            overflow-anchor: none;
        }
        #port-info-panel.visible {
            display: block;
        }
        .port-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            background: rgba(0,0,0,0.2);
        }
        .port-panel-title {
            font-size: 14px;
            font-weight: 600;
            min-width: 0;
        }
        .port-panel-close {
            background: none;
            border: none;
            color: #fff;
            font-size: 18px;
            cursor: pointer;
            opacity: 0.7;
            min-width: 44px;
            min-height: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .port-panel-close:hover {
            opacity: 1;
        }
        .port-ships-open-btn,
        .port-ships-back,
        .airport-flights-open-btn,
        .airport-overview-back {
            display: none;
        }
        .port-panel-content {
            padding: 12px 14px;
        }
        .port-reference-list {
            display: grid;
            gap: 6px;
            margin: 10px 0 12px;
            font-size: 12px;
        }
        .port-reference-row {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            min-width: 0;
        }
        .port-reference-row strong {
            min-width: 0;
            overflow-wrap: anywhere;
            text-align: right;
        }
        .port-photo {
            width: 100%;
            height: 140px;
            border-radius: 8px;
            margin-bottom: 12px;
            object-fit: cover;
            background: rgba(0,0,0,0.3);
        }
        .port-photo-placeholder {
            width: 100%;
            height: 140px;
            border-radius: 8px;
            margin-bottom: 12px;
            background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.2));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 64px;
        }
        .port-name-large {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 4px;
        }
        .port-location {
            font-size: 13px;
            color: rgba(255,255,255,0.9);
            margin-bottom: 12px;
        }
        .port-size-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 12px;
        }
        .port-size-large {
            background: #8a2f12;
        }
        .port-size-medium {
            background: #805000;
        }
        .port-stats {
            display: flex;
            gap: 10px;
            margin-bottom: 12px;
        }
        .port-stat {
            flex: 1;
            text-align: center;
            background: rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 8px;
        }
        .port-stat-value {
            font-size: 14px;
            font-weight: bold;
        }
        .port-stat-label {
            font-size: 10px;
            color: rgba(255,255,255,0.9);
            text-transform: uppercase;
        }

        /* Tracking Panel (right - flight info) */
        #tracking-panel {
            display: none;
            position: fixed;
            top: 80px;
            right: 20px;
            background: rgba(231, 76, 60, 0.95);
            color: #fff;
            padding: 0;
            border-radius: 12px;
            font-size: 13px;
            z-index: 99999;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            width: 280px;
            backdrop-filter: blur(10px);
        }
        #tracking-panel.visible {
            display: block;
        }

        #flight-tracking-chip {
            display: none;
            position: fixed;
            top: 96px;
            left: 18px;
            z-index: 9500;
            align-items: center;
            gap: 8px;
            border: 1px solid rgba(92, 225, 255, 0.42);
            border-radius: 16px;
            padding: 10px 14px;
            background: rgba(7, 14, 22, 0.88);
            color: #fff;
            font-size: 14px;
            font-weight: 800;
            box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
            backdrop-filter: blur(16px);
            cursor: pointer;
        }

        #flight-tracking-chip.visible {
            display: inline-flex;
        }

        #flight-tracking-chip span {
            font-size: 18px;
        }

        #flight-tracking-chip em {
            color: rgba(255, 255, 255, 0.62);
            font-size: 12px;
            font-style: normal;
            font-weight: 800;
        }

        .flight-detail-drawer {
            display: none;
            position: fixed;
            top: 96px;
            right: clamp(86px, 5vw, 112px);
            z-index: 9500;
            width: min(390px, calc(100vw - 128px));
            max-height: calc(100vh - 126px);
            overflow: auto;
            color: #fff;
            background: rgba(10, 16, 24, 0.92);
            border: 1px solid rgba(92, 225, 255, 0.28);
            border-radius: 18px;
            box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
            backdrop-filter: blur(18px);
        }

        .flight-detail-drawer.visible {
            display: block;
        }

        .flight-detail-hero {
            display: block;
        }

        .flight-detail-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            padding: 16px 120px 16px 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.09);
        }

        .flight-detail-title {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }

        .flight-detail-emoji {
            display: grid;
            place-items: center;
            width: 46px;
            height: 46px;
            border-radius: 14px;
            background: color-mix(in srgb, var(--flight-color, #5ce1ff) 35%, rgba(255, 255, 255, 0.08));
            border: 1px solid color-mix(in srgb, var(--flight-color, #5ce1ff) 75%, transparent);
            font-size: 24px;
            flex: 0 0 auto;
        }

        .flight-detail-title strong {
            display: block;
            max-width: 250px;
            overflow: hidden;
            color: #fff;
            font-size: 22px;
            line-height: 1.1;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .flight-detail-title em {
            display: block;
            margin-top: 4px;
            color: rgba(255, 255, 255, 0.58);
            font-style: normal;
            font-weight: 800;
            font-size: 12px;
            text-transform: uppercase;
        }

        .flight-detail-close {
            width: 40px;
            height: 40px;
            border: 0;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            font-size: 26px;
            font-weight: 800;
            cursor: pointer;
        }

        .flight-detail-drawer > .flight-detail-close {
            position: absolute;
            top: 16px;
            right: 16px;
            z-index: 4;
        }

        .flight-detail-drawer > .flight-detail-casebook-share {
            position: absolute;
            top: 16px;
            right: 64px;
            z-index: 4;
        }

        .flight-detail-photo {
            position: relative;
            min-height: 158px;
            margin: 14px 16px 0;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            background:
                radial-gradient(circle at 20% 20%, rgba(92, 225, 255, 0.16), transparent 28%),
                linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
        }

        .flight-detail-photo img {
            display: block;
            width: 100%;
            height: 190px;
            object-fit: cover;
        }

        .flight-photo-credit {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 8px 10px;
            background: rgba(0, 0, 0, 0.78);
            color: rgba(255, 255, 255, 0.84);
            font-size: 11px;
            font-weight: 800;
        }

        .flight-photo-credit a {
            flex: 0 0 auto;
            color: #9ee7ff;
            text-decoration: none;
        }

        .flight-photo-loading,
        .flight-photo-fallback {
            display: grid;
            min-height: 158px;
            place-items: center;
            text-align: center;
        }

        .flight-photo-loading span,
        .flight-photo-fallback span {
            display: grid;
            place-items: center;
            width: 62px;
            height: 62px;
            border-radius: 18px;
            background: color-mix(in srgb, var(--flight-color, #ffbf2f) 34%, rgba(255, 255, 255, 0.08));
            border: 1px solid color-mix(in srgb, var(--flight-color, #ffbf2f) 70%, transparent);
            font-size: 34px;
        }

        .flight-photo-loading strong,
        .flight-photo-fallback strong,
        .flight-photo-fallback em {
            display: block;
        }

        .flight-photo-loading strong,
        .flight-photo-fallback strong {
            margin-top: 10px;
            color: #fff;
            font-size: 15px;
            font-style: normal;
            font-weight: 900;
        }

        .flight-photo-fallback em {
            margin-top: 4px;
            color: rgba(255, 255, 255, 0.55);
            font-size: 12px;
            font-style: normal;
            font-weight: 800;
        }

        .flight-detail-route {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
            align-items: center;
            gap: 8px;
            padding: 14px 16px;
        }

        .flight-detail-route button {
            min-width: 0;
            min-height: 78px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 14px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.07);
            color: #fff;
            text-align: left;
            cursor: pointer;
        }

        .flight-detail-route button:disabled {
            cursor: default;
            opacity: 0.55;
        }

        .flight-detail-route button span,
        .flight-detail-route button strong,
        .flight-detail-route button em {
            display: block;
        }

        .flight-detail-route button span {
            margin-bottom: 4px;
            font-size: 16px;
        }

        .flight-detail-route button strong {
            font-size: 20px;
            line-height: 1;
        }

        .flight-detail-route button em {
            display: -webkit-box;
            min-height: 2.5em;
            margin-top: 5px;
            overflow: hidden;
            color: rgba(255, 255, 255, 0.55);
            font-size: 11px;
            font-style: normal;
            font-weight: 800;
            line-height: 1.25;
            overflow-wrap: anywhere;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
        }

        .flight-detail-route-warning {
            margin: -2px 16px 12px;
            padding: 9px 11px;
            border: 1px solid rgba(255, 184, 77, 0.24);
            border-radius: 8px;
            background: rgba(255, 184, 77, 0.11);
            color: rgba(255, 224, 170, 0.92);
            font-size: 11px;
            font-weight: 900;
            line-height: 1.35;
        }

        .flight-detail-route-warning em {
            display: block;
            margin-top: 5px;
            color: rgba(255, 244, 220, 0.76);
            font-size: 10px;
            font-style: normal;
            font-weight: 800;
        }

        .flight-detail-route-empty {
            margin: 14px 16px;
            padding: 12px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.055);
        }

        .flight-detail-route-empty strong,
        .flight-detail-route-empty span {
            display: block;
        }

        .flight-detail-route-empty strong {
            color: #fff;
            font-size: 14px;
            font-weight: 900;
        }

        .flight-detail-route-empty span {
            margin-top: 5px;
            color: rgba(255, 255, 255, 0.62);
            font-size: 12px;
            font-weight: 800;
            line-height: 1.35;
        }

        .flight-detail-route-line {
            position: relative;
            display: grid;
            height: 24px;
            place-items: center;
        }

        .flight-detail-route-line::before {
            position: absolute;
            right: 0;
            left: 0;
            height: 2px;
            border-radius: 99px;
            background: repeating-linear-gradient(90deg, #ffb84d 0 8px, transparent 8px 14px);
            content: '';
        }

        .flight-detail-route-line span {
            position: relative;
            display: grid;
            width: 24px;
            height: 24px;
            place-items: center;
            border-radius: 50%;
            background: rgba(10, 16, 24, 0.96);
            color: #9ee7ff;
            font-size: 18px;
            line-height: 1;
        }

        .flight-detail-progress {
            margin: 0 16px 14px;
            padding: 12px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 15px;
            background: rgba(255, 255, 255, 0.06);
        }

        .flight-progress-times,
        .flight-progress-distances {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .flight-progress-times div:last-child {
            text-align: right;
        }

        .flight-progress-times span {
            display: block;
            color: rgba(255, 255, 255, 0.52);
            font-size: 11px;
            font-weight: 900;
            text-transform: uppercase;
        }

        .flight-progress-times strong {
            display: block;
            margin-top: 3px;
            color: #fff;
            font-size: 18px;
            line-height: 1;
        }

        .flight-detail-progress-bar {
            position: relative;
            height: 8px;
            margin: 16px 8px 13px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.13);
            box-shadow:
                inset 0 0 0 1px rgba(255, 255, 255, 0.08),
                0 10px 24px rgba(0, 0, 0, 0.22);
        }

        .flight-detail-progress-bar div {
            position: absolute;
            inset: 0 auto 0 0;
            border-radius: inherit;
            background: linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.42));
        }

        .flight-detail-progress-bar span {
            position: absolute;
            top: 50%;
            transform: translate(-50%, -50%);
            display: grid;
            place-items: center;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: rgba(10, 16, 24, 0.94);
            border: 2px solid rgba(255, 255, 255, 0.78);
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.38);
            font-size: 18px;
        }

        .flight-progress-distances {
            color: rgba(255, 255, 255, 0.68);
            font-size: 12px;
            font-weight: 850;
        }

        .flight-progress-distances strong {
            color: #fff;
        }

        .flight-detail-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
            padding: 0 16px 14px;
        }

        .flight-detail-grid div,
        .flight-detail-section {
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.06);
        }

        .flight-detail-grid div {
            padding: 10px;
        }

        .flight-detail-grid span,
        .flight-detail-row > span {
            display: block;
            margin-bottom: 5px;
            color: rgba(255, 255, 255, 0.54);
            font-size: 11px;
            font-weight: 900;
            text-transform: uppercase;
        }

        .flight-detail-grid strong,
        .flight-detail-row strong {
            color: #fff;
            font-size: 15px;
            line-height: 1.25;
        }

        .flight-detail-section {
            margin: 0 16px 14px;
            padding: 10px;
        }

        .flight-detail-row + .flight-detail-row {
            margin-top: 10px;
        }

        .flight-detail-route-summary-value {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
            align-items: start;
            gap: 8px;
            min-width: 0;
        }

        .flight-detail-route-summary-endpoint {
            display: flex;
            min-width: 0;
            flex-direction: column;
            align-items: flex-start;
            gap: 3px;
        }

        .flight-detail-route-summary-endpoint.is-destination {
            align-items: flex-end;
            text-align: right;
        }

        .flight-detail-route-summary-endpoint .flight-detail-airport-code,
        .flight-detail-route-summary-endpoint .flight-detail-airport-name {
            display: block;
            max-width: 100%;
            margin: 0;
        }

        .flight-detail-route-summary-endpoint .flight-detail-airport-code {
            color: #fff;
            font-size: 15px;
            font-weight: 950;
            line-height: 1.15;
            text-transform: uppercase;
        }

        .flight-detail-route-summary-endpoint .flight-detail-airport-name {
            display: -webkit-box;
            overflow: hidden;
            color: rgba(255, 255, 255, 0.6);
            font-size: 11px;
            font-weight: 800;
            line-height: 1.3;
            overflow-wrap: anywhere;
            text-transform: none;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
        }

        .flight-detail-route-summary-arrow {
            display: grid;
            min-width: 24px;
            min-height: 24px;
            place-items: center;
            align-self: center;
            color: rgba(158, 231, 255, 0.92);
            font-size: 20px;
            line-height: 1;
        }

        .flight-detail-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 0 16px 14px;
        }

        .flight-altitude-key {
            flex: 1 1 100%;
            padding: 12px;
            border-radius: 15px;
            background: rgba(255, 255, 255, 0.08);
        }

        .flight-altitude-key-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 10px;
        }

        .flight-altitude-key-head strong {
            color: rgba(255, 255, 255, 0.88);
            font-size: 12px;
            font-weight: 900;
            text-transform: uppercase;
        }

        .flight-unit-toggle {
            display: inline-flex;
            padding: 2px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 999px;
            background: rgba(10, 16, 24, 0.42);
        }

        .flight-unit-toggle button {
            min-width: 34px;
            border: 0;
            border-radius: 999px;
            padding: 5px 8px;
            background: transparent;
            color: rgba(255, 255, 255, 0.58);
            font-size: 10px;
            font-weight: 950;
            line-height: 1;
            text-transform: uppercase;
            cursor: pointer;
        }

        .flight-unit-toggle button.active {
            background: rgba(255, 255, 255, 0.9);
            color: rgba(12, 18, 26, 0.92);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
        }

        .flight-altitude-unit-label {
            display: block;
            margin-top: 5px;
            color: rgba(255, 255, 255, 0.5);
            font-size: 10px;
            font-style: normal;
            font-weight: 900;
            text-align: right;
            text-transform: uppercase;
        }

        .flight-altitude-scale {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            height: 14px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.16);
            border-radius: 999px;
            box-shadow: 0 0 18px rgba(47, 199, 255, 0.22);
        }

        .flight-altitude-scale mark {
            display: block;
            min-width: 0;
            background: #ff3b30;
        }

        .flight-altitude-scale mark + mark {
            border-left: 1px solid rgba(10, 16, 24, 0.35);
        }

        .flight-altitude-scale mark:nth-child(2) { background: #ff7a2f; }
        .flight-altitude-scale mark:nth-child(3) { background: #ffc247; }
        .flight-altitude-scale mark:nth-child(4) { background: #2fc7ff; }
        .flight-altitude-scale mark:nth-child(5) { background: #276dff; }
        .flight-altitude-scale mark:nth-child(6) { background: #7a3cff; }

        .flight-altitude-labels {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 4px;
            margin-top: 7px;
        }

        .flight-altitude-labels small {
            display: block;
            color: rgba(255, 255, 255, 0.66);
            font-size: 9px;
            font-weight: 900;
            line-height: 1;
            text-align: center;
            white-space: nowrap;
        }

        .flight-detail-legend span {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border-radius: 999px;
            padding: 7px 9px;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.82);
            font-size: 12px;
            font-weight: 800;
        }

        .flight-detail-legend i {
            width: 24px;
            height: 3px;
            border-radius: 999px;
        }

        .flight-detail-legend i.solid {
            background: #5ce1ff;
        }

        .flight-detail-legend i.altitude {
            width: 44px;
            background: linear-gradient(90deg, #ff3b30, #ffb84d, #2fc7ff, #276dff, #7a3cff);
        }

        .flight-detail-legend i.orange {
            background: repeating-linear-gradient(90deg, #ffb84d 0 6px, transparent 6px 10px);
        }

        .flight-detail-legend i.green {
            background: repeating-linear-gradient(90deg, #80ff9a 0 6px, transparent 6px 10px);
        }

        .flight-detail-legend i.telemetry-dot {
            width: 10px;
            height: 10px;
            border: 2px solid rgba(255, 255, 255, 0.92);
            background: #fff2a0;
            box-shadow: 0 0 10px rgba(255, 242, 160, 0.55);
        }

        .flight-detail-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            padding: 0 16px 16px;
        }

        .flight-detail-actions button {
            border: 1px solid rgba(92, 225, 255, 0.28);
            border-radius: 13px;
            padding: 11px 10px;
            background: rgba(92, 225, 255, 0.14);
            color: #fff;
            font-size: 13px;
            font-weight: 900;
            cursor: pointer;
        }

        body.flight-tracking-active .flight-radar-hub,
        body.flight-tracking-active .flights-filters,
        body.flight-tracking-active .flight-search-container,
        body.flight-tracking-active .live-now-panel,
        body.flight-tracking-active #aircraft-info-panel,
        body.flight-tracking-active #tracking-panel,
        body.flight-tracking-active #flight-legend {
            display: none !important;
        }

        body.airport-detail-active .flight-radar-hub,
        body.airport-detail-active .flights-filters,
        body.airport-detail-active .flight-search-container,
        body.airport-detail-active .live-now-panel,
        body.airport-detail-active #aircraft-info-panel,
        body.airport-detail-active #tracking-panel,
        body.airport-detail-active #flight-legend {
            display: none !important;
            pointer-events: none !important;
        }

        @media (max-width: 768px) {
            body.flight-tracking-active {
                --flight-mobile-drawer-height: min(33vh, 292px);
            }

            #flight-tracking-chip {
                top: auto;
                left: 12px;
                right: 12px;
                bottom: calc(var(--flight-mobile-drawer-height) + 10px);
                justify-content: center;
            }

            .flight-detail-drawer {
                top: auto;
                left: 0;
                right: 0;
                bottom: 0;
                width: auto;
                max-height: var(--flight-mobile-drawer-height);
                border-radius: 18px 18px 0 0;
                border-right: 0;
                border-bottom: 0;
                border-left: 0;
                overflow-y: auto;
                overscroll-behavior: contain;
            }

            .flight-detail-hero {
                display: grid;
                grid-template-columns: minmax(0, 1fr) 112px;
                align-items: stretch;
                gap: 8px;
                padding: 7px 12px 5px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            }

            .flight-detail-head {
                min-width: 0;
                padding: 0 108px 0 0;
                border-bottom: 0;
            }

            .flight-detail-title {
                gap: 8px;
            }

            .flight-detail-emoji {
                width: 34px;
                height: 34px;
                border-radius: 10px;
                font-size: 18px;
            }

            .flight-detail-title strong {
                max-width: min(42vw, 170px);
                font-size: 17px;
            }

            .flight-detail-title em {
                display: -webkit-box;
                margin-top: 2px;
                overflow: hidden;
                font-size: 10px;
                line-height: 1.15;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
                white-space: normal;
            }

            .flight-detail-close {
                width: 44px;
                min-width: 44px;
                height: 44px;
                min-height: 44px;
                border-radius: 10px;
                font-size: 22px;
            }

            .flight-detail-drawer > .flight-detail-close {
                top: 7px;
                right: 132px;
            }

            .flight-detail-drawer > .flight-detail-casebook-share {
                top: 7px;
                right: 184px;
            }

            .flight-detail-photo {
                display: block;
                min-height: 68px;
                height: auto;
                margin: 0;
                border-radius: 11px;
            }

            .flight-detail-photo img {
                height: 68px;
            }

            .flight-photo-loading,
            .flight-photo-fallback {
                min-height: 68px;
            }

            .flight-photo-loading span,
            .flight-photo-fallback span {
                width: 34px;
                height: 34px;
                border-radius: 10px;
                font-size: 19px;
            }

            .flight-photo-loading strong,
            .flight-photo-fallback strong,
            .flight-photo-fallback em {
                display: none;
            }

            .flight-photo-credit {
                padding: 0;
            }

            .flight-photo-credit-meta {
                display: none;
            }

            .flight-photo-credit a {
                display: flex;
                width: 100%;
                min-height: 44px;
                align-items: center;
                justify-content: center;
                padding: 4px 6px;
                text-align: center;
                font-size: 9px;
            }

            .flight-detail-route {
                grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
                gap: 6px;
                padding: 5px 12px;
            }

            .flight-detail-route button {
                min-height: 64px;
                border-radius: 10px;
                padding: 5px 7px;
            }

            .flight-detail-route button span {
                margin-bottom: 1px;
                font-size: 13px;
            }

            .flight-detail-route button strong {
                font-size: 17px;
            }

            .flight-detail-route button em {
                min-height: 2.4em;
                margin-top: 3px;
                font-size: 9px;
            }

            .flight-detail-route-line {
                height: 24px;
                width: 28px;
                justify-self: center;
            }

            .flight-detail-route-line::before {
                background: repeating-linear-gradient(90deg, #ffb84d 0 6px, transparent 6px 10px);
            }

            .flight-detail-route-line span {
                width: 20px;
                height: 20px;
                font-size: 15px;
            }

            .flight-detail-route-empty {
                margin: 6px 12px 7px;
                padding: 8px 9px;
            }

            .flight-detail-route-warning {
                margin: 0 12px 7px;
                padding: 7px 8px;
                font-size: 10px;
            }

            .flight-detail-progress {
                margin: 0 12px 6px;
                padding: 6px 8px;
                border-radius: 10px;
            }

            .flight-progress-times span {
                font-size: 9px;
            }

            .flight-progress-times strong {
                margin-top: 2px;
                font-size: 13px;
            }

            .flight-detail-progress-bar {
                height: 5px;
                margin: 6px 5px;
            }

            .flight-detail-progress-bar span {
                width: 20px;
                height: 20px;
                font-size: 12px;
            }

            .flight-progress-distances {
                font-size: 10px;
            }

            .flight-detail-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 5px;
                padding: 0 12px 7px;
            }

            .flight-detail-grid div {
                min-width: 0;
                border-radius: 10px;
                padding: 5px 6px;
            }

            .flight-detail-grid span {
                overflow: hidden;
                margin-bottom: 2px;
                font-size: 9px;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            .flight-detail-grid strong {
                display: block;
                overflow: hidden;
                font-size: 13px;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            .flight-detail-grid div:nth-child(n + 4) {
                display: none;
            }

            .flight-detail-section,
            .flight-detail-legend,
            .flight-detail-actions {
                display: none !important;
            }
        }

        /* Flight Progress Bar */
        .flight-progress-container {
            padding: 12px 14px;
            background: rgba(0,0,0,0.2);
            border-bottom: 1px solid rgba(255,255,255,0.15);
        }
        .flight-route-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }
        .flight-airport {
            text-align: center;
        }
        .flight-airport-code {
            font-size: 18px;
            font-weight: bold;
            color: #fff;
        }
        .flight-airport-city {
            font-size: 10px;
            color: rgba(255,255,255,0.7);
            max-width: 80px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .flight-route-arrow {
            font-size: 20px;
            color: #fff;
            margin: 0 8px;
        }
        .flight-progress-bar {
            position: relative;
            height: 6px;
            background: rgba(255,255,255,0.3);
            border-radius: 3px;
            margin: 10px 0;
            overflow: visible;
        }
        .flight-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #4CAF50, #8BC34A);
            border-radius: 3px;
            transition: width 0.5s ease;
        }
        .flight-progress-plane {
            position: absolute;
            top: 50%;
            transform: translate(-50%, -50%);
            font-size: 14px;
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
        }
        .flight-progress-stats {
            display: flex;
            justify-content: space-between;
            font-size: 11px;
            color: rgba(255,255,255,0.8);
        }
        .flight-progress-stat {
            text-align: center;
        }
        .flight-progress-stat-value {
            font-weight: bold;
            color: #fff;
        }
        .flight-progress-stat-label {
            font-size: 9px;
            color: rgba(255,255,255,0.6);
        }

        /* Share Flight Button */
        .share-flight-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: calc(100% - 28px);
            margin: 10px 14px 14px;
            padding: 10px 14px;
            background: rgba(255,255,255,0.15);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 8px;
            color: #fff;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .share-flight-btn:hover {
            background: rgba(255,255,255,0.25);
            border-color: rgba(255,255,255,0.5);
        }
        .share-flight-btn:active {
            transform: scale(0.98);
        }
        .share-flight-btn.copied {
            background: rgba(46, 204, 113, 0.3);
            border-color: rgba(46, 204, 113, 0.6);
        }

        .find-tickets-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: calc(100% - 28px);
            margin: 0 14px 14px;
            padding: 10px 14px;
            background: #7c2d12;
            border: none;
            border-radius: 8px;
            color: #fff;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
        }
        .find-tickets-btn:hover {
            background: #923415;
            box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
            transform: translateY(-1px);
        }
        .find-tickets-btn:active {
            transform: scale(0.98) translateY(0);
        }

        .affiliate-disclosure {
            margin: -6px 14px 12px;
            color: rgba(255, 255, 255, 0.55);
            font-size: 10px;
            line-height: 1.35;
            text-align: center;
        }

        .airport-actions {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 12px;
            padding: 0 4px;
        }

        .airport-news-section {
            margin-top: 12px;
            padding: 10px;
            background: rgba(0, 0, 0, 0.18);
            border-radius: 8px;
        }
        .airport-news-section .airport-news-title {
            font-size: 12px;
            font-weight: 600;
            opacity: 0.85;
            margin-bottom: 6px;
        }
        .airport-news-section .station-news-container {
            background: transparent;
            padding: 0;
            margin: 0;
            max-height: none;
            overflow: visible;
        }
        .airport-news-section .station-news-item {
            background: rgba(255, 255, 255, 0.06);
            margin-bottom: 6px;
            padding: 8px 10px;
            border-radius: 6px;
        }
        .airport-news-section .station-news-item:last-child {
            margin-bottom: 0;
        }
        .airport-news-section .station-news-loading {
            font-size: 12px;
            opacity: 0.7;
            padding: 6px 4px;
        }

        .wiki-info {
            margin-top: 12px;
            padding: 10px;
            background: rgba(0,0,0,0.15);
            border-radius: 8px;
            font-size: 12px;
            line-height: 1.5;
        }
        .wiki-description {
            color: rgba(255,255,255,0.9);
            margin-bottom: 8px;
        }
        .wiki-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .wiki-stat {
            background: rgba(255,255,255,0.15);
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 11px;
        }
        .wiki-stat-label {
            opacity: 0.7;
            margin-right: 4px;
        }
        .wiki-stat-value {
            font-weight: 600;
        }
        .wiki-loading {
            text-align: center;
            color: rgba(255,255,255,0.5);
            font-size: 11px;
        }

        .find-hotels-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: 100%;
            padding: 10px 14px;
            background: #075985;
            border: none;
            border-radius: 8px;
            color: #fff;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
        }
        .find-hotels-btn:hover {
            background: #0e567d;
            box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
            transform: translateY(-1px);
        }
        .find-hotels-btn:active {
            transform: scale(0.98) translateY(0);
        }

        .airport-actions .find-tickets-btn {
            width: 100%;
            margin: 0;
        }

        .airport-actions .affiliate-disclosure {
            margin: 0 4px;
        }

        /* Share Modal */
        .share-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
        }
        .share-modal-overlay.visible {
            opacity: 1;
            visibility: visible;
        }
        .share-modal-overlay .share-modal-box {
            background: linear-gradient(145deg, #1a1a2e, #16213e);
            border-radius: 16px;
            padding: 24px;
            min-width: 320px;
            max-width: 400px;
            border: 1px solid rgba(255,255,255,0.1);
            box-shadow: 0 20px 60px rgba(0,0,0,0.5);
            transform: scale(0.9);
            transition: transform 0.2s ease;
        }
        .share-modal-overlay.visible .share-modal-box {
            transform: scale(1);
        }
        .share-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
        }
        .share-modal-title {
            font-size: 18px;
            font-weight: 600;
            color: #fff;
        }
        .share-modal-close {
            background: none;
            border: none;
            color: rgba(255,255,255,0.5);
            font-size: 24px;
            cursor: pointer;
            min-width: 44px;
            min-height: 44px;
            padding: 0;
            line-height: 1;
        }
        .share-modal-close:hover {
            color: #fff;
        }
        .share-modal-flight {
            background: rgba(255,255,255,0.05);
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 20px;
            text-align: center;
        }
        .share-modal-flight-name {
            font-size: 20px;
            font-weight: 700;
            color: #f39c12;
        }
        .share-modal-flight-route {
            font-size: 13px;
            color: rgba(255,255,255,0.6);
            margin-top: 4px;
        }
        .share-social-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            margin-bottom: 16px;
        }
        .share-social-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 12px 8px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
        }
        .share-social-btn:hover {
            background: rgba(255,255,255,0.15);
            transform: translateY(-2px);
        }
        .share-social-btn .icon {
            font-size: 24px;
        }
        .share-social-btn .label {
            font-size: 10px;
            color: rgba(255,255,255,0.7);
        }
        .share-copy-link {
            display: flex;
            gap: 8px;
        }
        .share-copy-input {
            flex: 1;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 8px;
            padding: 10px 12px;
            color: #fff;
            font-size: 12px;
            outline: none;
        }
        .share-copy-btn {
            background: #3498db;
            border: none;
            border-radius: 8px;
            padding: 10px 16px;
            color: #fff;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s;
        }
        .share-copy-btn:hover {
            background: #2980b9;
        }
        .share-copy-btn.copied {
            background: #2ecc71;
        }

        /* Aircraft Info Panel (left - model specs) */
        #aircraft-info-panel {
            display: none;
            position: fixed;
            top: 290px;
            left: 15px;
            background: rgba(52, 73, 94, 0.95);
            color: #fff;
            padding: 0;
            border-radius: 12px;
            font-size: 13px;
            z-index: 99999;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            width: 320px;
            max-height: calc(100vh - 170px);
            overflow-y: auto;
            backdrop-filter: blur(10px);
        }
        #aircraft-info-panel.visible {
            display: block;
        }
        .aircraft-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.2);
            background: rgba(0,0,0,0.2);
            border-radius: 12px 12px 0 0;
        }
        .aircraft-title {
            font-weight: bold;
            font-size: 14px;
        }
        .aircraft-content {
            padding: 12px 14px;
        }
        .aircraft-model-name {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 4px;
            color: #3498db;
        }
        .aircraft-manufacturer {
            font-size: 13px;
            color: rgba(255,255,255,0.7);
            margin-bottom: 12px;
        }
        .aircraft-image {
            width: 100%;
            height: 140px;
            background: rgba(0,0,0,0.3);
            border-radius: 8px;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 48px;
            position: relative;
            overflow: hidden;
        }
        .aircraft-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .aircraft-image-loading {
            color: rgba(255,255,255,0.5);
            font-size: 14px;
        }
        .aircraft-photo-placeholder {
            display: grid;
            width: 100%;
            height: 100%;
            place-items: center;
            align-content: center;
            gap: 4px;
            color: rgba(255, 255, 255, 0.7);
            text-align: center;
        }
        .aircraft-photo-placeholder span {
            font-size: 38px;
            line-height: 1;
        }
        .aircraft-photo-placeholder small {
            font-size: 12px;
        }
        .aircraft-photo-placeholder em {
            font-size: 10px;
            font-style: normal;
            opacity: 0.7;
        }
        .aircraft-photo-credit {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.8));
            padding: 20px 8px 6px;
            font-size: 9px;
            color: rgba(255,255,255,0.7);
            text-align: right;
        }
        .aircraft-photo-credit a {
            color: #3498db;
            text-decoration: none;
        }
        .aircraft-class-badge {
            display: inline-block;
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            margin: 8px 0;
        }
        .aircraft-specs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 12px;
        }
        .aircraft-spec {
            background: rgba(0,0,0,0.2);
            padding: 10px;
            border-radius: 8px;
            display: flex;
            align-items: flex-start;
            gap: 8px;
        }
        .aircraft-spec-icon {
            font-size: 18px;
            min-width: 24px;
            text-align: center;
            flex-shrink: 0;
            margin-top: 2px;
        }
        .aircraft-spec-info {
            flex: 1;
            min-width: 0;
        }
        .aircraft-spec-label {
            font-size: 9px;
            color: rgba(255,255,255,0.5);
            text-transform: lowercase;
        }
        .aircraft-spec-value {
            font-size: 12px;
            font-weight: 600;
            word-wrap: break-word;
            line-height: 1.3;
        }
        .aircraft-description {
            margin: 10px 0;
            font-size: 12px;
            color: rgba(255,255,255,0.8);
            line-height: 1.5;
        }
        .aircraft-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px solid rgba(255,255,255,0.1);
            font-size: 11px;
            color: rgba(255,255,255,0.6);
        }
        .aircraft-age-badge {
            background: rgba(46, 204, 113, 0.2);
            color: #2ecc71;
            padding: 3px 8px;
            border-radius: 10px;
            font-size: 10px;
            font-weight: 600;
        }
        .aircraft-airline-info {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 12px;
            padding: 10px;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            font-size: 12px;
        }

        /* Ship Info Panel */
        #ship-info-panel {
            display: none;
            position: fixed;
            top: 96px;
            right: clamp(86px, 5vw, 112px);
            left: auto;
            width: min(384px, calc(100vw - 36px));
            max-height: calc(100vh - 126px);
            padding: 0;
            overflow: hidden;
            color: #f7fbff;
            background: rgba(13, 20, 28, 0.96);
            border: 1px solid rgba(125, 211, 252, 0.28);
            border-radius: 12px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            font-size: 13px;
            z-index: 99999;
        }
        #ship-info-panel.visible {
            display: flex;
            flex-direction: column;
        }
        body.mode-ships.ship-info-active .cookie-banner.visible,
        body[data-pw-mode="ships"].ship-info-active .cookie-banner.visible {
            z-index: 100001 !important;
        }
        .ship-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            min-height: 52px;
            padding: 6px 8px 6px 14px;
            border-bottom: 1px solid rgba(148, 163, 184, 0.18);
            background: rgba(4, 10, 18, 0.74);
            border-radius: 12px 12px 0 0;
        }
        .ship-panel-title {
            color: #d7f3ff;
            font-size: 14px;
            font-weight: 800;
            letter-spacing: 0;
        }
        .ship-panel-header-actions,
        .disaster-header-actions {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .entity-casebook-share {
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 44px;
            min-height: 44px;
            border: 0;
            border-radius: 8px;
            color: #fff;
            background: rgba(255, 255, 255, 0.16);
            font-size: 20px;
            line-height: 1;
            cursor: pointer;
        }
        .entity-casebook-share:hover,
        .entity-casebook-share:focus-visible {
            background: rgba(56, 189, 248, 0.34);
        }
        .ship-panel-close {
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 44px;
            min-height: 44px;
            border: 0;
            border-radius: 8px;
            color: #fff;
            background: rgba(148, 163, 184, 0.16);
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
        }
        .ship-panel-close:hover {
            background: rgba(239, 68, 68, 0.35);
        }
        .ship-panel-content {
            display: grid;
            gap: 10px;
            padding: 12px;
            overflow-y: auto;
            min-height: 0;
        }
        .ship-panel-hero {
            display: grid;
            grid-template-columns: 122px minmax(0, 1fr);
            gap: 12px;
            align-items: stretch;
        }
        .ship-panel-photo {
            position: relative;
            min-height: 92px;
            border-radius: 8px;
            overflow: hidden;
            background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(22, 78, 99, 0.72));
            border: 1px solid rgba(148, 163, 184, 0.2);
        }
        .ship-panel-photo img,
        .ship-photo-placeholder {
            width: 100%;
            height: 100%;
            min-height: 92px;
        }
        .ship-panel-photo img {
            display: block;
            object-fit: cover;
        }
        .ship-photo-credit {
            position: static;
            display: flex;
            box-sizing: border-box;
            flex: 0 0 auto;
            width: 100%;
            max-width: 100%;
            min-height: 32px;
            align-items: center;
            justify-content: flex-end;
            padding: 2px 4px;
            border-radius: 4px;
            color: #fff;
            background: rgba(2, 6, 23, 0.78);
            font-size: 8px;
            line-height: 1.2;
            text-decoration: none;
            overflow-wrap: anywhere;
            white-space: normal;
        }
        .ship-panel-photo:has(.ship-photo-credit) {
            display: flex;
            flex-direction: column;
        }
        .ship-panel-photo:has(.ship-photo-credit) img {
            flex: 1 1 auto;
            height: 68px;
            min-height: 68px;
        }
        .ships-coverage-scope {
            margin-left: 8px;
            color: rgba(226, 232, 240, 0.64);
            font-size: 11px;
            font-weight: 650;
        }
        .ship-photo-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            color: rgba(226, 232, 240, 0.74);
            text-align: center;
            padding: 8px;
        }
        .ship-photo-placeholder span {
            font-size: 30px;
            line-height: 1;
        }
        .ship-photo-placeholder small {
            max-width: 100%;
            font-size: 10px;
            line-height: 1.15;
        }
        .ship-panel-summary {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 7px;
            justify-content: center;
        }
        .ship-panel-name {
            color: #ffffff;
            font-size: 21px;
            font-weight: bold;
            line-height: 1.08;
            overflow-wrap: anywhere;
        }
        .ship-panel-meta {
            color: rgba(203, 213, 225, 0.78);
            font-size: 12px;
            line-height: 1.25;
            overflow-wrap: anywhere;
        }
        .ship-panel-freshness {
            width: fit-content;
            max-width: 100%;
            padding: 5px 8px;
            border-radius: 8px;
            font-size: 11px;
            font-weight: 800;
            color: #d1fae5;
            background: rgba(16, 185, 129, 0.16);
            border: 1px solid rgba(16, 185, 129, 0.26);
            overflow-wrap: anywhere;
        }
        .ship-panel-freshness.stale {
            color: #fed7aa;
            background: rgba(249, 115, 22, 0.16);
            border-color: rgba(249, 115, 22, 0.28);
        }
        .ship-panel-destination {
            background: rgba(15, 23, 42, 0.68);
            border: 1px solid rgba(148, 163, 184, 0.16);
            border-radius: 8px;
            padding: 10px 12px;
        }
        .ship-panel-dest-label {
            color: rgba(203, 213, 225, 0.68);
            font-size: 11px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0;
            margin-bottom: 4px;
        }
        .ship-panel-dest-value {
            font-size: 16px;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 8px;
            overflow-wrap: anywhere;
        }
        .ship-panel-eta {
            margin-top: 5px;
            color: rgba(226, 232, 240, 0.72);
            font-size: 12px;
        }
        .ship-panel-specs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }
        .ship-panel-spec {
            min-height: 58px;
            background: rgba(15, 23, 42, 0.62);
            border: 1px solid rgba(148, 163, 184, 0.16);
            padding: 10px;
            border-radius: 8px;
            display: flex;
            align-items: flex-start;
            gap: 8px;
        }
        .ship-panel-spec-icon {
            font-size: 18px;
            min-width: 24px;
            text-align: center;
        }
        .ship-panel-spec-info {
            flex: 1;
            min-width: 0;
        }
        .ship-panel-spec-label {
            color: rgba(203, 213, 225, 0.58);
            font-size: 10px;
            line-height: 1.2;
            overflow-wrap: anywhere;
        }
        .ship-panel-spec-value {
            color: #ffffff;
            font-size: 15px;
            font-weight: 850;
            line-height: 1.15;
            overflow-wrap: anywhere;
        }
        .ship-panel-status,
        .ship-panel-route-row,
        .ship-panel-coords,
        .ship-panel-mmsi {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 6px 10px;
            color: rgba(226, 232, 240, 0.82);
            font-size: 12px;
            line-height: 1.3;
        }
        .ship-panel-status {
            align-items: center;
            padding: 9px 10px;
            border-radius: 8px;
            background: rgba(2, 6, 23, 0.38);
            border: 1px solid rgba(148, 163, 184, 0.14);
        }
        .ship-panel-status span,
        .ship-panel-route-row span:first-child {
            color: rgba(203, 213, 225, 0.62);
        }
        .ship-panel-status strong {
            color: #ffffff;
            text-align: right;
        }
        .ship-panel-history {
            display: grid;
            gap: 3px;
            padding: 9px 10px;
            border-radius: 8px;
            color: rgba(226, 232, 240, 0.74);
            background: rgba(251, 191, 36, 0.1);
            border: 1px solid rgba(251, 191, 36, 0.2);
            font-size: 12px;
            line-height: 1.3;
        }
        .ship-panel-history strong {
            color: #fde68a;
        }
        .ship-history-points-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            justify-self: start;
            gap: 7px;
            min-height: 44px;
            margin-top: 5px;
            padding: 0 11px;
            border: 1px solid rgba(250, 204, 21, 0.32);
            border-radius: 6px;
            color: #fde68a;
            background: rgba(15, 23, 42, 0.72);
            font: inherit;
            font-weight: 700;
            cursor: pointer;
        }
        .ship-history-points-toggle[hidden] {
            display: none;
        }
        .ship-history-points-toggle:hover,
        .ship-history-points-toggle:focus-visible,
        .ship-history-points-toggle.active {
            color: #ffffff;
            border-color: rgba(250, 204, 21, 0.7);
            background: rgba(250, 204, 21, 0.2);
        }
        .ship-history-point-swatch {
            width: 9px;
            height: 9px;
            flex: 0 0 9px;
            border-radius: 50%;
            background: #facc15;
            box-shadow: 0 0 7px rgba(250, 204, 21, 0.8);
        }
        .ship-panel-coords {
            padding-top: 2px;
        }
        .ship-panel-mmsi {
            color: rgba(148, 163, 184, 0.9);
            font-size: 11px;
        }
        .ship-panel-actions {
            display: flex;
            justify-content: flex-end;
        }
        .ship-panel-actions button {
            min-height: 44px;
            padding: 0 14px;
            border: 1px solid rgba(56, 189, 248, 0.35);
            border-radius: 8px;
            color: #e0f2fe;
            background: rgba(14, 116, 144, 0.28);
            font-weight: 850;
            cursor: pointer;
        }
        .ship-panel-actions button:hover {
            background: rgba(14, 165, 233, 0.34);
        }
        .ship-panel-warning {
            padding: 9px 10px;
            border-radius: 8px;
            color: #fecaca;
            background: rgba(239, 68, 68, 0.14);
            border: 1px solid rgba(239, 68, 68, 0.24);
            font-size: 12px;
            line-height: 1.3;
        }

        #ship-tracking-panel {
            position: fixed;
            left: 50%;
            bottom: 22px;
            z-index: 10001;
            display: grid;
            grid-template-columns: 36px minmax(0, 1fr) 44px 44px;
            align-items: center;
            gap: 8px;
            width: min(430px, calc(100vw - 140px));
            min-height: 56px;
            padding: 6px 7px 6px 10px;
            transform: translateX(-50%);
            color: #f8fafc;
            background: rgba(8, 16, 24, 0.94);
            border: 1px solid rgba(56, 189, 248, 0.34);
            border-radius: 8px;
            box-shadow: 0 16px 42px rgba(0, 0, 0, 0.46);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
        }

        .ship-tracking-flag {
            font-size: 24px;
            line-height: 1;
            text-align: center;
        }

        .ship-tracking-copy {
            min-width: 0;
        }

        .ship-tracking-name,
        .ship-tracking-info {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .ship-tracking-name {
            color: #fff;
            font-size: 14px;
            font-weight: 850;
        }

        .ship-tracking-info {
            margin-top: 2px;
            color: rgba(226, 232, 240, 0.66);
            font-size: 11px;
            font-weight: 700;
        }

        .ship-tracking-action {
            display: grid;
            place-items: center;
            width: 44px;
            height: 44px;
            padding: 0;
            border: 1px solid rgba(148, 163, 184, 0.2);
            border-radius: 8px;
            color: #f8fafc;
            background: rgba(148, 163, 184, 0.12);
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
        }

        .ship-tracking-action:hover {
            background: rgba(56, 189, 248, 0.22);
        }

        /* Airport Info Panel (left - airport details) */
        #airport-info-panel {
            display: none;
            position: fixed;
            top: 195px;
            left: 10px;
            background: rgb(11, 58, 90);
            color: #fff;
            padding: 0;
            border-radius: 12px;
            font-size: 13px;
            z-index: 99999;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            width: 320px;
            max-height: calc(100vh - 215px);
            max-height: calc(100dvh - 215px);
            overflow-y: auto;
            backdrop-filter: blur(10px);
        }
        #airport-info-panel.visible {
            display: block;
        }
        /* Spaceport Info Panel */
        #spaceport-info-panel {
            display: none;
            position: fixed;
            top: 195px;
            left: 10px;
            background: rgba(255, 102, 0, 0.95);
            color: #fff;
            padding: 0;
            border-radius: 12px;
            font-size: 13px;
            z-index: 99999;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            width: 320px;
            max-height: calc(100vh - 215px);
            max-height: calc(100dvh - 215px);
            overflow-y: auto;
            backdrop-filter: blur(10px);
        }
        #spaceport-info-panel.visible {
            display: block;
        }
        /* Observatory Info Panel */
        #observatory-info-panel {
            display: none;
            position: fixed;
            top: 195px;
            left: 10px;
            background: rgba(0, 150, 200, 0.95);
            color: #fff;
            padding: 0;
            border-radius: 12px;
            font-size: 13px;
            z-index: 99999;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            width: 320px;
            max-height: calc(100vh - 215px);
            max-height: calc(100dvh - 215px);
            overflow-y: auto;
            backdrop-filter: blur(10px);
        }
        #observatory-info-panel.visible {
            display: block;
        }
        #spaceport-info-panel .airport-header,
        #observatory-info-panel .airport-header {
            position: sticky;
            top: 0;
            z-index: 2;
        }
        /* ISS Live Player (как TV плеер) */
        #iss-player {
            background: rgba(18, 18, 18, 0.98);
            backdrop-filter: blur(20px);
            border-radius: 12px;
            color: white;
            font-size: 14px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(59, 130, 246, 0.3);
            overflow: hidden;
        }
        #iss-player .iss-minimize-strip {
            display: none;
            align-items: center;
            min-height: 44px;
            box-sizing: border-box;
            width: 100%;
            padding: 8px 12px;
            border: 0;
            color: inherit;
            background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
            cursor: pointer;
        }
        #iss-player.minimized .iss-minimize-strip { display: flex; }
        #iss-player.minimized .iss-main-content { display: none; }
        #iss-player.minimized .iss-resize-handle { display: none; }
        #iss-player .iss-main-content { display: block; }
        #iss-player.iss-css-fullscreen {
            position: fixed !important;
            inset: 0 !important;
            z-index: 100000 !important;
            transform: none !important;
            border-radius: 0;
        }
        #iss-player.iss-css-fullscreen .iss-video-container {
            width: 100vw !important;
            height: calc(100dvh - 88px) !important;
        }
        #iss-player .iss-drag-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 10px;
            background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
            cursor: grab;
            user-select: none;
        }
        #iss-player .iss-drag-header:active { cursor: grabbing; }
        #iss-player .iss-header-info { display: flex; align-items: center; gap: 8px; }
        #iss-player .iss-live-dot {
            width: 8px; height: 8px;
            background: #ef4444;
            border-radius: 50%;
            animation: pulse 1.5s ease-in-out infinite;
        }
        #iss-player .iss-name { font-weight: 600; font-size: 13px; }
        #iss-player .iss-header-btns { display: flex; gap: 4px; }
        #iss-player .iss-hdr-btn {
            width: 24px; height: 24px;
            border-radius: 6px; border: none;
            background: rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.7);
            cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.15s;
        }
        #iss-player .iss-hdr-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }
        #iss-player .iss-close-btn:hover { background: #ef4444; }
        #iss-player .iss-video-container {
            position: relative;
            background: #000;
            width: 480px;
            height: 270px;
        }
        #iss-player .iss-video-container iframe {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            border: none;
        }
        #iss-player .iss-controls {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            background: rgba(0,0,0,0.3);
        }
        #iss-player .iss-ctrl-btn {
            width: 32px; height: 32px;
            border-radius: 6px; border: none;
            background: rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.7);
            cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.15s;
        }
        #iss-player .iss-ctrl-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }
        #iss-player .iss-resize-handle {
            position: absolute;
            right: 0; bottom: 0;
            width: 16px; height: 16px;
            cursor: se-resize;
            background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,0.3) 50%);
        }
        /* ISS playback health state (P1): only provider playback may mark LIVE. */
        #iss-player .iss-live-dot {
            background: #64748b;
            box-shadow: none;
            animation: none;
        }
        #iss-player[data-playback-state="playing"] .iss-live-dot,
        #iss-player[data-playback-state="buffering"] .iss-live-dot {
            background: #ef4444;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
            animation: pulse 1.5s ease-in-out infinite;
        }
        #iss-player .iss-playback-status {
            position: absolute;
            right: 12px;
            bottom: 12px;
            left: 12px;
            z-index: 2;
            padding: 8px 10px;
            border: 1px solid rgba(148, 163, 184, 0.32);
            border-radius: 8px;
            background: rgba(15, 23, 42, 0.9);
            color: #e2e8f0;
            font-size: 12px;
            line-height: 1.35;
            text-align: center;
            pointer-events: none;
        }
        #iss-player .iss-playback-status[hidden],
        #iss-player .iss-video-unavailable[hidden] {
            display: none;
        }
        #iss-player .iss-video-unavailable {
            position: absolute;
            inset: 0;
            z-index: 3;
            display: grid;
            box-sizing: border-box;
            place-content: center;
            gap: 14px;
            padding: 18px;
            background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
            text-align: center;
        }
        #iss-player .iss-video-unavailable strong {
            overflow-wrap: anywhere;
            font-size: 15px;
            line-height: 1.35;
        }
        #iss-player .iss-video-fallback-links {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 8px;
        }
        #iss-player .iss-video-fallback-links a {
            display: inline-flex;
            min-height: 44px;
            box-sizing: border-box;
            align-items: center;
            justify-content: center;
            padding: 8px 12px;
            border: 1px solid rgba(96, 165, 250, 0.55);
            border-radius: 8px;
            color: #bfdbfe;
            background: rgba(37, 99, 235, 0.2);
            font-size: 12px;
            font-weight: 800;
            line-height: 1.25;
            text-decoration: none;
        }
        @media (max-width: 480px) {
            #iss-player .iss-video-unavailable {
                gap: 10px;
                padding: 12px;
            }
            #iss-player .iss-video-fallback-links {
                display: grid;
            }
            #iss-player .iss-video-fallback-links a {
                width: 100%;
            }
        }
        /* Streams Panel (left) */
        #streams-panel {
            display: none;
            position: fixed;
            top: 115px;
            left: 10px;
            background: rgba(25, 25, 35, 0.98);
            color: #fff;
            padding: 0;
            border-radius: 12px;
            z-index: 99999;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            width: 280px;
            max-height: calc(100vh - 150px);
            overflow-y: auto;
            backdrop-filter: blur(10px);
        }
        #streams-panel.visible {
            display: block;
        }
        .streams-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 14px;
            background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
            border-radius: 12px 12px 0 0;
            position: sticky;
            top: 0;
            z-index: 1;
        }
        .stream-item {
            padding: 12px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            cursor: pointer;
            transition: background 0.2s;
        }
        .stream-item:hover {
            background: rgba(155, 89, 182, 0.3);
        }
        .stream-item.active {
            background: rgba(155, 89, 182, 0.5);
        }
        .stream-name {
            font-weight: bold;
            font-size: 14px;
        }
        .stream-desc {
            font-size: 11px;
            color: #aaa;
            margin-top: 4px;
        }
        /* Launches Panel */
        #launches-panel {
            display: none;
            position: fixed;
            top: 105px;
            left: 15px;
            bottom: 60px;
            width: 320px;
            background: rgba(25, 25, 35, 0.98);
            color: #fff;
            padding: 0;
            border-radius: 12px;
            z-index: 100;
            box-shadow: 4px 0 20px rgba(0,0,0,0.5);
            overflow-y: auto;
            backdrop-filter: blur(10px);
            transition: transform 0.3s ease, opacity 0.3s ease;
        }
        #launches-panel.visible {
            display: block;
            transform: translateX(0);
            opacity: 1;
        }
        #launches-panel.collapsed {
            display: block;
            transform: translateX(calc(-100% - 20px));
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }
        /* Слайд-таб для возврата свернутой панели */
        #launches-tab {
            display: none;
            position: fixed;
            top: 105px;
            left: 0;
            width: 28px;
            height: 48px;
            background: rgba(255, 107, 53, 0.85);
            color: #fff;
            border-radius: 0 8px 8px 0;
            cursor: pointer;
            z-index: 100;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
            transition: all 0.25s ease;
            backdrop-filter: blur(4px);
        }
        #launches-tab:hover { width: 36px; background: rgba(255, 107, 53, 1); }
        #launches-tab.visible { display: flex; }
        .launches-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 14px;
            background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
            border-radius: 12px 12px 0 0;
            position: sticky;
            top: 0;
            z-index: 1;
        }
        .launches-back-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            margin-right: 8px;
            flex-shrink: 0;
        }
        .launches-back-btn:hover {
            background: rgba(255,255,255,0.35);
            transform: translateX(-2px);
        }
        .launch-item {
            padding: 12px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            cursor: pointer;
            transition: all 0.25s ease;
            position: relative;
            border-left: 3px solid transparent;
        }
        .launch-item:hover {
            background: rgba(255, 107, 53, 0.15);
            border-left-color: #ff6b35;
            transform: translateX(4px);
        }
        .launch-item:active {
            transform: translateX(2px);
            background: rgba(255, 107, 53, 0.25);
        }
        .launch-item:last-child {
            border-bottom: none;
        }
        .launch-item::after {
            content: '→';
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            opacity: 0;
            transition: opacity 0.2s, right 0.2s;
            color: #ff6b35;
            font-size: 16px;
        }
        .launch-item:hover::after {
            opacity: 1;
            right: 8px;
        }
        .launch-name {
            font-weight: bold;
            font-size: 14px;
            margin-bottom: 4px;
        }
        .launch-meta {
            display: flex;
            gap: 6px;
            margin-bottom: 6px;
            flex-wrap: wrap;
        }
        .launch-type, .launch-orbit {
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 3px;
            background: rgba(255, 107, 53, 0.2);
            color: #ff6b35;
        }
        .launch-orbit {
            background: rgba(78, 205, 196, 0.2);
            color: #4ecdc4;
        }
        .launch-desc {
            font-size: 11px;
            color: #aaa;
            line-height: 1.4;
            margin-bottom: 8px;
            padding: 8px;
            background: rgba(255,255,255,0.03);
            border-radius: 4px;
            border-left: 2px solid rgba(255, 107, 53, 0.3);
        }
        .launch-rocket {
            font-size: 12px;
            color: #aaa;
            margin-bottom: 4px;
        }
        .launch-pad {
            font-size: 11px;
            color: #888;
            margin-bottom: 6px;
        }
        .launch-time {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .launch-countdown {
            font-family: 'Courier New', monospace;
            font-size: 14px;
            color: #4ecdc4;
            background: rgba(78, 205, 196, 0.15);
            padding: 4px 8px;
            border-radius: 4px;
        }
        .launch-date {
            font-size: 11px;
            color: #888;
        }
        .launch-status {
            display: inline-block;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 3px;
            margin-left: 8px;
        }
        .launch-status.go {
            background: rgba(46, 204, 113, 0.3);
            color: #2ecc71;
        }
        .launch-status.tbd {
            background: rgba(241, 196, 15, 0.3);
            color: #f1c40f;
        }
        /* Meteors Panel */
        #meteors-panel {
            display: none;
            position: fixed;
            top: 105px;
            left: 15px;
            bottom: 60px;
            width: 320px;
            background: rgba(25, 25, 45, 0.98);
            color: #fff;
            padding: 0;
            border-radius: 12px;
            z-index: 100;
            box-shadow: 4px 0 20px rgba(0,0,0,0.5);
            overflow-y: auto;
            backdrop-filter: blur(10px);
            transition: transform 0.3s ease, opacity 0.3s ease;
        }
        #meteors-panel.visible {
            display: block;
            transform: translateX(0);
            opacity: 1;
        }
        #meteors-panel.collapsed {
            display: block;
            transform: translateX(calc(-100% - 20px));
            opacity: 0;
            pointer-events: none;
        }
        #meteors-tab {
            display: none;
            position: fixed;
            top: 105px;
            left: 0;
            width: 28px;
            height: 48px;
            background: rgba(155, 89, 182, 0.85);
            color: #fff;
            border-radius: 0 8px 8px 0;
            cursor: pointer;
            z-index: 100;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
            transition: all 0.25s ease;
            backdrop-filter: blur(4px);
        }
        #meteors-tab:hover { width: 36px; background: rgba(155, 89, 182, 1); }
        #meteors-tab.visible { display: flex; }
        .meteors-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 14px;
            background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
            border-radius: 12px 12px 0 0;
            position: sticky;
            top: 0;
            z-index: 1;
        }
        .meteor-item {
            padding: 12px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            cursor: pointer;
            transition: background 0.2s;
        }
        .meteor-item:hover {
            background: rgba(255,255,255,0.05);
        }
        .meteor-item.selected {
            background: rgba(255, 166, 64, 0.18);
            box-shadow: inset 3px 0 0 #ffb347;
        }
        .meteor-item:last-child {
            border-bottom: none;
        }
        .meteor-name {
            font-weight: bold;
            font-size: 14px;
            margin-bottom: 4px;
        }
        .meteor-dates {
            font-size: 12px;
            color: #aaa;
            margin-bottom: 4px;
        }
        .meteor-peak {
            font-size: 12px;
            color: #4ecdc4;
        }
        .meteor-zhr {
            font-size: 11px;
            color: #f1c40f;
            margin-top: 4px;
        }
        .meteor-radiant {
            font-size: 10px;
            color: #888;
            margin-top: 4px;
        }
        .meteor-active {
            background: rgba(46, 204, 113, 0.1);
            border-left: 3px solid #2ecc71;
        }
        .airport-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.2);
            background: rgba(0,0,0,0.2);
            border-radius: 12px 12px 0 0;
        }
        .airport-title {
            font-weight: bold;
            font-size: 14px;
        }
        .airport-close {
            background: none;
            border: none;
            color: #fff;
            font-size: 18px;
            cursor: pointer;
            opacity: 0.7;
        }
        .airport-close:hover {
            opacity: 1;
        }
        .airport-header-buttons {
            display: flex;
            gap: 8px;
        }
        .airport-share {
            background: none;
            border: none;
            color: #fff;
            font-size: 16px;
            cursor: pointer;
            opacity: 0.7;
            padding: 0 4px;
        }
        .airport-share:hover {
            opacity: 1;
        }
        .airport-content {
            padding: 12px 14px;
        }
        .airport-photo {
            width: 100%;
            height: 140px;
            border-radius: 8px;
            margin-bottom: 12px;
            object-fit: cover;
            background: rgba(0,0,0,0.3);
        }
        .airport-photo-placeholder {
            width: 100%;
            height: 140px;
            border-radius: 8px;
            margin-bottom: 12px;
            background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.2));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 64px;
        }
        .airport-photo-loading {
            animation: pulse 1.5s ease-in-out infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 0.6; }
            50% { opacity: 1; }
        }
        @keyframes toastFade {
            0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
            15% { opacity: 1; transform: translateX(-50%) translateY(0); }
            85% { opacity: 1; transform: translateX(-50%) translateY(0); }
            100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
        }
        .airport-photo-container {
            width: 100%;
        }
        .airport-codes {
            display: flex;
            gap: 10px;
            margin-bottom: 8px;
        }
        .airport-code-badge {
            background: rgba(255,255,255,0.2);
            padding: 4px 10px;
            border-radius: 6px;
            font-weight: bold;
            font-size: 16px;
        }
        .airport-name {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 4px;
        }
        .airport-location {
            font-size: 13px;
            color: rgba(255,255,255,0.9);
            margin-bottom: 12px;
        }
        .airport-local-time {
            background: rgba(255,255,255,0.15);
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 12px;
            text-align: center;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .airport-time-icon {
            font-size: 28px;
        }
        .airport-time-value {
            font-size: 32px;
            font-weight: bold;
            font-family: 'SF Mono', 'Consolas', monospace;
        }
        .airport-time-label {
            font-size: 11px;
            color: rgba(255,255,255,0.9);
            flex: 1;
                text-align: left;
            }
        .airport-stats {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 12px;
        }
        .airport-stat {
            background: rgba(0,0,0,0.2);
            padding: 10px;
            border-radius: 8px;
            text-align: center;
        }
        .airport-stat-value {
            font-size: 18px;
            font-weight: bold;
        }
        .airport-stat-label {
            font-size: 10px;
            color: rgba(255,255,255,0.9);
            text-transform: uppercase;
        }

        .airport-operational-status {
            margin-top: 12px;
            padding: 12px;
            border-radius: 10px;
            background: rgba(5, 13, 20, 0.58);
            border: 1px solid rgba(77, 195, 255, 0.18);
        }

        .airport-ops-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            color: rgba(255, 255, 255, 0.92);
            font-size: 13px;
        }

        .airport-load-pill {
            padding: 4px 8px;
            border-radius: 999px;
            background: rgba(80, 220, 140, 0.18);
            color: #b9ffd8;
            font-size: 11px;
            font-weight: 900;
            text-transform: uppercase;
        }

        .airport-load-pill.high,
        .airport-load-pill.very_high {
            background: rgba(255, 184, 77, 0.18);
            color: #ffe0aa;
        }

        .airport-load-pill.very_high {
            background: rgba(231, 76, 60, 0.22);
            color: #ffb2a8;
        }

        .airport-ops-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .airport-ops-grid div {
            padding: 9px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.055);
        }

        .airport-ops-grid strong {
            display: block;
            color: #fff;
            font-size: 16px;
            line-height: 1.1;
        }

        .airport-ops-grid span,
        .airport-ops-note {
            display: block;
            margin-top: 4px;
            color: rgba(255, 255, 255, 0.88);
            font-size: 10px;
            line-height: 1.35;
        }

        .wiki-description {
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            padding: 10px;
            margin-top: 12px;
            font-size: 12px;
            line-height: 1.5;
            color: rgba(255,255,255,0.85);
            max-height: 120px;
            overflow-y: auto;
        }
        #airport-info-panel .wiki-description,
        #port-info-panel .wiki-description {
            max-height: none;
            overflow-y: visible;
            color: #fff;
        }
        #airport-info-panel .wiki-description {
            background: rgb(9, 47, 73);
        }
        #port-info-panel .wiki-description {
            background: rgb(6, 39, 65);
        }
        .wiki-description::-webkit-scrollbar {
            width: 4px;
        }
        .wiki-description::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.3);
            border-radius: 2px;
        }
        .wiki-description-loading {
            color: rgba(255,255,255,0.5);
            font-style: italic;
        }
        .wiki-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 8px;
        }
        .wiki-stat-badge {
            background: rgba(255,255,255,0.15);
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 11px;
        }

        /* Airport Flights Panel (right - arrivals/departures) */
        #airport-flights-panel {
            display: none;
            position: fixed;
            top: 80px;
            right: 20px;
            background: rgba(9, 61, 39, 0.98);
            color: #fff;
            padding: 0;
            border-radius: 12px;
            font-size: 13px;
            z-index: 99999;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            width: 350px;
            max-height: calc(100vh - 100px);
            overflow-y: auto;
            backdrop-filter: blur(10px);
        }
        #airport-flights-panel.visible {
            display: block;
        }

        /* Port Ships Panel (right - arrivals/departures) */
        #port-ships-panel {
            display: none;
            position: fixed;
            top: 80px;
            right: 20px;
            background: rgba(91, 37, 0, 0.98);
            color: #fff;
            padding: 0;
            border-radius: 12px;
            font-size: 13px;
            z-index: 99999;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            width: 350px;
            max-height: calc(100vh - 100px);
            overflow-y: auto;
            backdrop-filter: blur(10px);
        }
        #port-ships-panel.visible {
            display: block;
        }
        body.port-info-mobile-focused .ship-search-container.visible,
        body.port-ships-mobile-focused .ship-search-container.visible {
            display: none !important;
            pointer-events: none !important;
        }
        .port-ships-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.2);
            background: rgba(0,0,0,0.2);
            border-radius: 12px 12px 0 0;
        }
        .port-ships-tabs {
            display: flex;
            gap: 5px;
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .port-tab {
            flex: 1;
            padding: 8px;
            min-height: 44px;
            border: none;
            background: rgba(0,0,0,0.34);
            color: #fff;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
        }
        .port-tab.active {
            background: rgba(0,0,0,0.52);
        }
        .port-tab:hover {
            background: rgba(0,0,0,0.44);
        }
        .port-ships-list {
            padding: 10px 14px;
            max-height: 400px;
            overflow-y: auto;
        }
        .port-ship-item {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 10px;
            border: 0;
            background: rgba(0,0,0,0.2);
            color: inherit;
            font: inherit;
            text-align: left;
            border-radius: 8px;
            margin-bottom: 8px;
            cursor: pointer;
        }
        .port-ship-item:hover {
            background: rgba(0,0,0,0.3);
        }
        .port-ship-icon {
            font-size: 20px;
            min-width: 30px;
            text-align: center;
        }
        .port-ship-info {
            flex: 1;
        }
        .port-ship-name {
            font-weight: bold;
            font-size: 13px;
        }
        .port-ship-type {
            font-size: 11px;
            opacity: 0.8;
        }
        .port-ship-evidence {
            margin-top: 3px;
            font-size: 11px;
            opacity: 0.9;
            overflow-wrap: anywhere;
        }
        .port-ships-empty {
            padding: 20px 8px;
            color: rgba(255,255,255,0.74);
            line-height: 1.45;
            text-align: center;
            overflow-wrap: anywhere;
        }
        #port-ships-panel .airport-close {
            min-width: 44px;
            min-height: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .port-ship-status {
            font-size: 11px;
            padding: 3px 8px;
            border-radius: 4px;
            background: rgba(255,255,255,0.2);
        }
        .airport-flights-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.2);
            background: rgba(0,0,0,0.2);
            border-radius: 12px 12px 0 0;
        }
        .airport-flights-tabs {
            display: flex;
            gap: 5px;
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .airport-tab {
            flex: 1;
            min-height: 44px;
            padding: 8px;
            border: none;
            background: rgba(0,0,0,0.34);
            color: #fff;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
        }
        .airport-tab.active {
            background: rgba(0,0,0,0.52);
        }
        .airport-tab:hover {
            background: rgba(0,0,0,0.44);
        }
        #airport-flights-list > div,
        #port-ships-list > div {
            color: rgba(255,255,255,0.9) !important;
        }
        .airport-flights-list {
            padding: 10px 14px;
            max-height: 400px;
            overflow-y: auto;
        }
        .airport-board-note {
            margin: 0 0 8px;
            padding: 8px 10px;
            border-radius: 8px;
            background: rgba(241, 196, 15, 0.12);
            color: rgba(255,255,255,0.78);
            font-size: 11px;
            line-height: 1.35;
        }
        .airport-flight-item {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            box-sizing: border-box;
            padding: 10px;
            border: 0;
            background: rgba(0,0,0,0.2);
            color: rgba(255,255,255,0.9);
            border-radius: 8px;
            margin-bottom: 8px;
            cursor: pointer;
            font: inherit;
            text-align: left;
            -webkit-appearance: none;
        }
        .airport-flight-item:hover {
            background: rgba(0,0,0,0.3);
        }
        .airport-flight-time {
            font-size: 14px;
            font-weight: bold;
            min-width: 50px;
        }
        .airport-flight-info {
            flex: 1;
        }
        .airport-flight-number {
            display: block;
            font-weight: bold;
            font-size: 13px;
        }
        .airport-flight-route {
            display: block;
            font-size: 11px;
            color: rgba(255,255,255,0.7);
        }
        .airport-flight-status {
            font-size: 10px;
            padding: 3px 8px;
            border-radius: 10px;
            font-weight: 500;
        }
        .airport-flight-status.on-time {
            background: rgba(46, 204, 113, 0.3);
            color: #2ecc71;
        }
        .airport-flight-status.delayed {
            background: rgba(231, 76, 60, 0.3);
            color: #e74c3c;
        }
        .airport-flight-status.landed, .airport-flight-status.departed {
            background: rgba(52, 152, 219, 0.3);
            color: #3498db;
        }
        .airport-flight-status.estimated {
            background: rgba(241, 196, 15, 0.22);
            color: #f1c40f;
        }

        /* Легенда траектории */
        #flight-legend {
            display: none;
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(30, 30, 30, 0.9);
            backdrop-filter: blur(10px);
            padding: 8px 16px;
            border-radius: 20px;
            z-index: 9999;
            font-size: 12px;
            color: #fff;
        }
        #flight-legend.visible {
            display: flex;
            gap: 16px;
            align-items: center;
        }
        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .legend-item.legend-clickable {
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 6px;
            transition: background 0.2s;
        }
        .legend-item.legend-clickable:hover {
            background: rgba(255, 255, 255, 0.15);
        }
        .legend-line {
            width: 24px;
            height: 3px;
            border-radius: 2px;
        }
        .legend-line.solid {
            background: #3498db;
        }
        .legend-line.dashed-orange {
            background: repeating-linear-gradient(90deg, #f39c12 0, #f39c12 6px, transparent 6px, transparent 10px);
        }
        .legend-line.dashed-green {
            background: repeating-linear-gradient(90deg, #2ecc71 0, #2ecc71 6px, transparent 6px, transparent 10px);
        }
        .legend-ring {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: 2px solid;
            animation: pulse-ring 1.5s ease-out infinite;
        }
        .legend-ring.blue {
            border-color: #3498db;
            background: rgba(52, 152, 219, 0.3);
        }
        .legend-ring.green {
            border-color: #2ecc71;
            background: rgba(46, 204, 113, 0.3);
        }
        @keyframes pulse-ring {
            0% { transform: scale(0.8); opacity: 1; }
            50% { transform: scale(1.2); opacity: 0.7; }
            100% { transform: scale(0.8); opacity: 1; }
        }

        .tracking-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.2);
        }
        .tracking-title {
            font-weight: bold;
            font-size: 14px;
        }
        .tracking-close {
            background: rgba(255,255,255,0.2);
            border: none;
            color: #fff;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .tracking-close:hover {
            background: rgba(255,255,255,0.3);
        }
        .camera-follow-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: #fff;
            width: 28px;
            height: 24px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            margin-right: 8px;
            opacity: 0.5;
            transition: all 0.2s;
        }
        .camera-follow-btn.active {
            background: rgba(46, 204, 113, 0.5);
            opacity: 1;
        }
        .camera-follow-btn:hover {
            background: rgba(255,255,255,0.3);
        }
        .tracking-content {
            padding: 10px 14px;
        }
        .tracking-row {
            display: flex;
            justify-content: space-between;
            margin: 4px 0;
        }
        .tracking-label {
            opacity: 0.8;
            font-size: 12px;
        }
        .tracking-value {
            font-weight: 500;
        }
        .tracking-route {
            background: rgba(255,255,255,0.15);
            padding: 6px 10px;
            border-radius: 6px;
            margin: 8px -10px;
        }
        .tracking-route .tracking-value {
            color: #7FFFD4;
            font-weight: 600;
            letter-spacing: 1px;
        }

        /* Weather markers */
        .weather-marker {
            background: rgb(20, 30, 48);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 20px;
            padding: 4px 10px;
            color: inherit;
            font: inherit;
            appearance: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            cursor: pointer;
            pointer-events: auto;
            transform: translate(-50%, -50%);
            transition: transform 0.2s ease, background 0.2s ease;
            will-change: transform;
        }
        .weather-marker:hover {
            transform: translate(-50%, -50%) scale(1.15);
            background: rgb(30, 50, 80);
            border-color: rgba(255, 255, 255, 0.3);
        }
        .weather-icon { font-size: 24px; }
        .weather-temp { font-size: 13px; font-weight: 700; color: #fff; background-color: rgb(20, 30, 48); text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
        .weather-city { font-size: 9px; color: #fff; background-color: rgb(20, 30, 48); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
        .weather-marker:hover .weather-temp,
        .weather-marker:hover .weather-city {
            background-color: rgb(30, 50, 80);
        }
        @media (max-width: 768px) {
            .weather-marker {
                width: 46px;
                height: 46px;
                min-width: 44px;
                min-height: 44px;
                max-width: 56px;
                padding: 3px 6px;
                border-radius: 14px;
                gap: 0;
                opacity: 0.9;
                transition: none;
            }
            .weather-icon {
                font-size: 18px;
                line-height: 1;
            }
            .weather-temp {
                font-size: 11px;
                line-height: 1.1;
            }
            .weather-city {
                display: none;
            }
            .weather-marker:hover {
                transform: translate(-50%, -50%);
            }
            body.mode-weather .lightning-toggle,
            body[data-pw-mode="weather"] .lightning-toggle {
                top: calc(104px + env(safe-area-inset-top, 0px));
                right: calc(14px + env(safe-area-inset-right, 0px));
                width: 44px;
                min-width: 44px;
                height: 44px;
                min-height: 44px;
                padding: 0;
                border-radius: 50%;
                font-size: 0;
                display: inline-flex;
                align-items: center;
                justify-content: center;
            }
            body.mode-weather .lightning-toggle::before,
            body[data-pw-mode="weather"] .lightning-toggle::before {
                content: "⚡";
                font-size: 22px;
                line-height: 1;
            }
            body.mode-weather .lightning-counter,
            body[data-pw-mode="weather"] .lightning-counter {
                top: calc(154px + env(safe-area-inset-top, 0px));
                right: calc(10px + env(safe-area-inset-right, 0px));
                max-width: 120px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
        }

        /* Weather city panel */
        .weather-city-panel {
            position: fixed;
            top: 120px;
            left: 20px;
            background: rgba(20, 35, 55, 0.85);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 18px;
            min-width: 240px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.5);
            z-index: 1000;
            backdrop-filter: blur(15px);
        }
        .weather-city-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }
        .weather-city-icon { font-size: 36px; }
        .weather-city-info h3 { margin: 0; color: #fff; font-size: 18px; }
        .weather-city-desc { color: rgba(255,255,255,0.7); font-size: 12px; }
        .weather-city-close {
            position: absolute;
            top: 8px;
            right: 8px;
            background: none;
            border: none;
            color: #fff;
            font-size: 20px;
            cursor: pointer;
            opacity: 0.7;
        }
        .weather-city-close:hover { opacity: 1; }
        .weather-city-temp {
            display: flex;
            flex-direction: column;
            margin-bottom: 12px;
        }
        .weather-city-temp .temp-value { font-size: 36px; font-weight: 700; color: #fff; }
        .weather-city-temp .temp-feels { font-size: 12px; color: rgba(255,255,255,0.7); }
        .weather-city-details {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .weather-detail { color: rgba(255,255,255,0.9); font-size: 13px; display: flex; align-items: center; gap: 8px; }

        /* Event markers */
        .event-marker {
            background: rgba(255, 152, 0, 0.9);
            border-radius: 50%;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transform: translate(-50%, -50%);
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            animation: eventPulse 2s infinite;
        }
        @keyframes eventPulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.5); }
            50% { box-shadow: 0 0 0 10px rgba(255, 152, 0, 0); }
        }
        .event-icon { font-size: 18px; }

        /* Webcam markers */
        .webcam-marker {
            background: rgba(244, 67, 54, 0.9);
            border-radius: 50%;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transform: translate(-50%, -50%);
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            animation: liveBlink 1.5s infinite;
            z-index: 500;
        }
        .webcam-marker:hover {
            transform: translate(-50%, -50%) scale(1.2);
            box-shadow: 0 4px 15px rgba(244, 67, 54, 0.5);
        }
        @keyframes liveBlink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }
        .webcam-icon { font-size: 16px; pointer-events: none; }

        /* Lightning strikes styles */
        .lightning-toggle {
            position: fixed;
            top: 230px;
            right: 20px;
            background: linear-gradient(135deg, rgba(255, 193, 7, 0.9), rgba(255, 152, 0, 0.9));
            color: #000;
            border: none;
            border-radius: 25px;
            padding: 10px 18px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            z-index: 105;
            display: none;
            box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
            transition: all 0.3s ease;
        }
        .lightning-toggle:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(255, 193, 7, 0.6);
        }
        .lightning-toggle.active {
            background: linear-gradient(135deg, #4CAF50, #45a049);
            color: #000;
        }
        .lightning-counter {
            position: fixed;
            top: 275px;
            right: 20px;
            background: rgba(0,0,0,0.7);
            color: #ffc107;
            padding: 6px 12px;
            border-radius: 12px;
            font-size: 11px;
            display: none;
            z-index: 105;
        }
        @keyframes lightningFlash {
            0% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.8; transform: scale(1.5); }
            100% { opacity: 0; transform: scale(2); }
        }
        @keyframes lightningGlow {
            0%, 100% { box-shadow: 0 0 10px #fff, 0 0 20px #ffc107, 0 0 30px #ff9800; }
            50% { box-shadow: 0 0 20px #fff, 0 0 40px #ffc107, 0 0 60px #ff9800; }
        }

        /* Webcam Modal */
        .webcam-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            animation: fadeIn 0.2s ease;
        }
        .webcam-modal-content {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border-radius: 16px;
            width: 90%;
            max-width: 400px;
            overflow: hidden;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(244, 67, 54, 0.3);
        }
        .webcam-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            background: rgba(244, 67, 54, 0.2);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        .webcam-modal-header h3 {
            margin: 0;
            font-size: 16px;
            color: #fff;
        }
        .webcam-modal-close {
            background: none;
            border: none;
            color: #888;
            font-size: 24px;
            cursor: pointer;
            line-height: 1;
        }
        .webcam-modal-close:hover { color: #fff; }
        .webcam-modal-body {
            padding: 20px;
        }
        .webcam-preview {
            background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
            height: 180px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 15px;
            position: relative;
            overflow: hidden;
        }
        .webcam-preview::before {
            content: '📹';
            font-size: 48px;
            opacity: 0.3;
        }
        .webcam-live-icon {
            position: absolute;
            top: 10px;
            left: 10px;
            background: rgba(244, 67, 54, 0.9);
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: bold;
            animation: liveBlink 1.5s infinite;
        }
        .webcam-open-btn {
            display: block;
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
            color: #fff;
            text-decoration: none;
            text-align: center;
            border-radius: 10px;
            font-weight: 600;
            transition: all 0.2s;
        }
        .webcam-open-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(244, 67, 54, 0.4);
        }

        /* Airport Modal */
        .airport-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            opacity: 0;
            transition: opacity 0.2s;
        }
        .airport-modal.visible {
            opacity: 1;
        }
        .airport-modal-content {
            background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
            color: #fff;
            padding: 24px 32px;
            border-radius: 16px;
            text-align: center;
            position: relative;
            min-width: 250px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.4);
        }
        .airport-modal-close {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(255,255,255,0.2);
            border: none;
            color: #fff;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 16px;
        }
        .airport-type {
            font-size: 14px;
            opacity: 0.9;
            margin-bottom: 8px;
        }
        .airport-code {
            font-size: 36px;
            font-weight: bold;
            letter-spacing: 2px;
        }
        .airport-name {
            font-size: 16px;
            margin-top: 8px;
        }
        .airport-city {
            font-size: 13px;
            opacity: 0.8;
            margin-top: 4px;
        }

        /* Quake Tooltip */
        .quake-tooltip {
            display: none;
            position: fixed;
            background: rgba(0, 0, 0, 0.95);
            color: #fff;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 12px;
            z-index: 10000;
            pointer-events: none;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
            min-width: 200px;
            border-left: 4px solid #e74c3c;
        }
        .quake-tooltip.visible {
            display: block;
        }
        .quake-tooltip-header {
            font-weight: bold;
            font-size: 16px;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .quake-tooltip-mag {
            padding: 4px 8px;
            border-radius: 4px;
            font-weight: bold;
        }
        .quake-tooltip-mag.low { background: #2ecc71; }
        .quake-tooltip-mag.medium { background: #f1c40f; color: #000; }
        .quake-tooltip-mag.high { background: #e67e22; }
        .quake-tooltip-mag.severe { background: #e74c3c; }
        .quake-tooltip-place {
            margin: 8px 0;
            font-size: 13px;
        }
        .quake-tooltip-row {
            display: flex;
            justify-content: space-between;
            margin: 4px 0;
            font-size: 11px;
        }
        .quake-tooltip-label {
            opacity: 0.7;
        }

        .loading {
            text-align: center;
            padding: 40px;
            color: #888;
        }

        .no-news {
            text-align: center;
            padding: 40px;
            color: #666;
        }

        .tooltip {
            position: fixed;
            background: rgba(0,0,0,0.95);
            color: #fff;
            padding: 12px 16px;
            border-radius: 10px;
            font-size: 14px;
            pointer-events: none;
            z-index: 1000;
            display: none;
            border: 1px solid rgba(0,212,255,0.3);
            min-width: 180px;
            backdrop-filter: blur(10px);
        }
        .tooltip-country {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .tooltip-weather {
            display: flex;
            align-items: center;
            gap: 10px;
            padding-top: 8px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        .tooltip-weather-temp {
            font-size: 24px;
            font-weight: 700;
            color: #00d4ff;
        }
        .tooltip-weather-emoji {
            font-size: 28px;
        }
        .tooltip-weather-details {
            font-size: 11px;
            color: rgba(255,255,255,0.7);
            line-height: 1.4;
        }
        .tooltip-weather-city {
            font-size: 10px;
            color: rgba(255,255,255,0.5);
            margin-top: 4px;
        }
        .tooltip-loading {
            font-size: 11px;
            color: rgba(255,255,255,0.5);
            padding-top: 6px;
        }

        /* Weather Forecast Panel — Apple Weather style */
        .weather-forecast-panel {
            position: fixed;
            left: 20px;
            right: auto;
            top: 80px;
            width: 360px;
            max-height: calc(100vh - 100px);
            background: rgba(20, 20, 35, 0.85);
            backdrop-filter: blur(40px) saturate(1.8);
            -webkit-backdrop-filter: blur(40px) saturate(1.8);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            z-index: 9000 !important;
            overflow-y: auto;
            overflow-x: hidden;
            box-shadow: 0 10px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.08);
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,0.15) transparent;
        }
        .weather-forecast-panel::-webkit-scrollbar { width: 4px; }
        .weather-forecast-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

        .weather-forecast-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px 8px;
            position: sticky;
            top: 0;
            z-index: 2;
            background: rgba(20, 20, 35, 0.9);
            backdrop-filter: blur(20px);
        }
        .weather-forecast-header h3 {
            margin: 0;
            font-size: 15px;
            font-weight: 600;
            color: rgba(255,255,255,0.85);
            letter-spacing: 0.3px;
        }
        .weather-forecast-close {
            background: rgba(255,255,255,0.1);
            border: none;
            color: rgba(255,255,255,0.6);
            width: 28px; height: 28px;
            border-radius: 50%;
            font-size: 16px;
            cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.2s;
        }
        .weather-forecast-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

        .weather-forecast-content { padding: 0 20px 20px; }

        /* Current weather hero */
        .wf-current {
            text-align: center;
            padding: 8px 0 20px;
        }
        .wf-city-name { font-size: 28px; font-weight: 500; color: #fff; margin-bottom: 2px; }
        .wf-current-temp { font-size: 72px; font-weight: 200; color: #fff; line-height: 1; margin: -4px 0 2px; }
        .wf-current-desc { font-size: 16px; color: rgba(255,255,255,0.7); margin-bottom: 4px; text-transform: capitalize; }
        .wf-current-hl { font-size: 16px; color: rgba(255,255,255,0.7); }
        .wf-current-hl span { margin: 0 4px; }
        .wf-current-time { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 6px; }

        /* Section cards */
        .wf-section {
            background: rgba(255,255,255,0.06);
            border-radius: 14px;
            margin-bottom: 12px;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.06);
        }
        .wf-section-title {
            font-size: 11px; font-weight: 600;
            color: rgba(255,255,255,0.65);
            text-transform: uppercase; letter-spacing: 1px;
            padding: 12px 16px 8px;
            display: flex; align-items: center; gap: 5px;
        }

        /* Hourly scroll */
        .wf-hourly-scroll {
            display: flex;
            overflow-x: auto;
            gap: 0;
            padding: 4px 12px 14px;
            scrollbar-width: none;
        }
        .wf-hourly-scroll::-webkit-scrollbar { display: none; }
        .wf-hour {
            display: flex; flex-direction: column; align-items: center;
            min-width: 56px; padding: 6px 4px; gap: 6px;
        }
        .wf-hour-time { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.6); }
        .wf-hour-icon { font-size: 20px; }
        .wf-hour-temp { font-size: 15px; font-weight: 500; color: #fff; }
        .wf-hour.now .wf-hour-time { color: #fff; }
        .wf-hour.now .wf-hour-temp { color: #fff; font-weight: 600; }

        /* 10-day forecast */
        .wf-daily-rows { padding: 0 4px 10px; }
        .wf-day-row {
            display: flex; align-items: center;
            padding: 8px 12px; gap: 8px;
            border-bottom: 1px solid rgba(255,255,255,0.04);
        }
        .wf-day-row:last-child { border-bottom: none; }
        .wf-day-name { width: 44px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.85); }
        .wf-day-icon { font-size: 20px; width: 28px; text-align: center; }
        .wf-day-min { width: 32px; text-align: right; font-size: 14px; color: rgba(255,255,255,0.65); }
        .wf-day-bar-wrap {
            flex: 1; height: 5px;
            background: rgba(255,255,255,0.08);
            border-radius: 3px; position: relative;
            margin: 0 6px;
        }
        .wf-day-bar {
            position: absolute; top: 0; height: 100%;
            border-radius: 3px;
            background: linear-gradient(90deg, #5ac8fa, #34c759, #ffd60a, #ff9f0a, #ff453a);
            background-size: 200% 100%;
        }
        .wf-day-bar-dot {
            position: absolute; top: 50%; width: 7px; height: 7px;
            background: #fff; border-radius: 50%;
            transform: translate(-50%, -50%);
            box-shadow: 0 0 4px rgba(0,0,0,0.3);
            display: none;
        }
        .wf-day-row.today-row .wf-day-bar-dot { display: block; }
        .wf-day-max { width: 32px; font-size: 14px; font-weight: 500; color: #fff; }

        /* Details grid */
        .wf-details-grid {
            display: grid; grid-template-columns: 1fr 1fr;
            gap: 10px; padding: 10px 12px;
        }
        .wf-detail-card {
            background: rgba(255,255,255,0.04);
            border-radius: 10px; padding: 12px;
        }
        .wf-detail-label {
            font-size: 11px; font-weight: 500;
            color: rgba(255,255,255,0.35);
            text-transform: uppercase; letter-spacing: 0.5px;
            margin-bottom: 6px; display: flex; align-items: center; gap: 4px;
        }
        .wf-detail-value { font-size: 22px; font-weight: 400; color: #fff; }
        .wf-detail-extra { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 2px; }

        /* Precipitation probability in hourly */
        .wf-hour-precip { font-size: 10px; color: #5ac8fa; min-height: 14px; }

        /* Mobile: bottom sheet */
        @media (max-width: 768px) {
            body.weather-forecast-open .lightning-toggle,
            body.weather-forecast-open .zoom-controls {
                visibility: hidden !important;
                pointer-events: none !important;
            }
            .weather-forecast-panel {
                left: 0 !important; right: 0 !important; top: auto !important;
                bottom: 0; width: 100%; max-width: 100%;
                max-height: 85vh;
                border-radius: 20px 20px 0 0;
                border-bottom: none;
            }
            .weather-forecast-header {
                padding: 10px 12px 6px;
                gap: 10px;
            }
            .weather-forecast-header h3 {
                min-width: 0;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            .weather-forecast-panel .weather-forecast-content {
                padding-top: 0;
            }
            .weather-forecast-close {
                width: 44px;
                height: 44px;
                flex: 0 0 44px;
                font-size: 22px;
            }
            .wf-current-temp { font-size: 60px; }
            .wf-city-name { font-size: 24px; }
        }

        /* Currency Panel */
        .currency-panel {
            position: fixed;
            right: -420px;
            top: 80px;
            width: 380px;
            max-height: calc(100vh - 120px);
            background: rgba(0, 0, 0, 0.95);
            border-radius: 16px;
            border: 1px solid rgba(46, 204, 113, 0.3);
            padding: 20px;
            z-index: 150;
            transition: right 0.3s ease;
            overflow-y: auto;
            overflow-x: hidden;
            visibility: hidden;
            pointer-events: none;
        }

        .currency-panel.open {
            right: 20px;
        }

        .currency-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(46, 204, 113, 0.2);
        }

        .currency-panel-title {
            font-size: 18px;
            font-weight: 600;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .currency-flag {
            font-size: 28px;
        }

        .currency-code {
            color: #2ecc71;
            font-weight: 700;
        }

        .currency-rates {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .currency-rate-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: rgba(46, 204, 113, 0.08);
            border-radius: 12px;
            border: 1px solid rgba(46, 204, 113, 0.15);
        }

        .currency-rate-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .currency-rate-symbol {
            font-size: 24px;
            width: 40px;
            text-align: center;
        }

        .currency-rate-name {
            font-size: 14px;
            color: #aaa;
        }

        .currency-rate-code {
            font-size: 16px;
            font-weight: 600;
            color: #fff;
        }

        .currency-rate-value {
            font-size: 20px;
            font-weight: 700;
            color: #2ecc71;
            font-family: monospace;
        }

        .currency-loading {
            text-align: center;
            padding: 40px;
            color: #888;
        }

        /* Currency Converter */
        .currency-converter {
            background: rgba(46, 204, 113, 0.1);
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 20px;
            border: 1px solid rgba(46, 204, 113, 0.2);
        }
        .converter-row {
            display: flex;
            gap: 10px;
        }
        .converter-row input {
            flex: 1;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 12px 15px;
            color: #fff;
            font-size: 18px;
            font-weight: 600;
            outline: none;
        }
        .converter-row input:focus {
            border-color: #2ecc71;
        }
        .converter-row input[readonly] {
            background: rgba(46, 204, 113, 0.15);
            color: #2ecc71;
        }
        .converter-row select {
            width: 90px;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            padding: 12px 10px;
            color: #fff;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            outline: none;
        }
        .converter-row select:focus {
            border-color: #2ecc71;
        }
        .converter-swap {
            text-align: center;
            padding: 8px;
            font-size: 20px;
            color: #2ecc71;
            cursor: pointer;
            transition: transform 0.2s;
        }
        .converter-swap:hover {
            transform: rotate(180deg);
        }

        .currency-base-info {
            text-align: center;
            font-size: 16px;
            font-weight: 600;
            color: #2ecc71;
            margin-bottom: 15px;
            padding: 10px;
            background: rgba(46, 204, 113, 0.1);
            border-radius: 8px;
        }

        /* Money Filters (CRYPTO, STOCKS, ТОВАРЫ) - Flat Design */
        .money-filters {
            position: fixed;
            top: 60px;
            left: 15px;
            display: none;
            gap: 3px;
            background: rgba(30, 30, 40, 0.9);
            padding: 3px;
            border-radius: 6px;
            z-index: 95;
        }

        .money-filters.visible {
            display: flex;
        }

        .money-filter {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.5);
            padding: 8px 16px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .money-filter:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .money-filter.active {
            background: #27ae60;
            color: white;
        }

        /* Crypto Panel */
        .crypto-panel {
            position: fixed;
            right: -420px;
            top: 80px;
            width: 400px;
            max-height: calc(100vh - 100px);
            background: rgba(0, 0, 0, 0.95);
            border-radius: 16px;
            border: 1px solid rgba(241, 196, 15, 0.4);
            padding: 20px;
            z-index: 150;
            transition: right 0.3s ease;
            overflow-y: auto;
            visibility: hidden;
            pointer-events: none;
        }

        .crypto-panel.open {
            right: 20px;
        }

        /* Stocks Panel */
        .stocks-panel {
            position: fixed;
            right: -420px;
            top: 80px;
            width: 400px;
            max-height: calc(100vh - 100px);
            background: rgba(0, 0, 0, 0.95);
            border-radius: 16px;
            border: 1px solid rgba(52, 152, 219, 0.4);
            padding: 20px;
            z-index: 150;
            transition: right 0.3s ease;
            overflow-y: auto;
            visibility: hidden;
            pointer-events: none;
        }

        .stocks-panel.open {
            right: 20px;
        }

        /* Commodities Panel */
        .commodities-panel {
            position: fixed;
            right: -420px;
            top: 80px;
            width: 400px;
            max-height: calc(100vh - 100px);
            background: rgba(0, 0, 0, 0.95);
            border-radius: 16px;
            border: 1px solid rgba(230, 126, 34, 0.4);
            padding: 20px;
            z-index: 150;
            transition: right 0.3s ease;
            overflow-y: auto;
            visibility: hidden;
            pointer-events: none;
        }

        .commodities-panel.open {
            right: 20px;
        }

        .currency-panel.open,
        .currency-panel.visible,
        .crypto-panel.open,
        .crypto-panel.visible,
        .stocks-panel.open,
        .stocks-panel.visible,
        .commodities-panel.open,
        .commodities-panel.visible {
            visibility: visible;
            pointer-events: auto;
        }

        .crypto-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(241, 196, 15, 0.3);
        }

        .crypto-panel-title {
            font-size: 20px;
            font-weight: 700;
            color: #f1c40f;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .crypto-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .crypto-item {
            display: flex;
            align-items: center;
            padding: 12px 15px;
            background: rgba(241, 196, 15, 0.08);
            border-radius: 12px;
            border: 1px solid rgba(241, 196, 15, 0.15);
            transition: all 0.2s ease;
        }

        .crypto-item:hover {
            background: rgba(241, 196, 15, 0.15);
            transform: translateX(5px);
        }

        .crypto-rank {
            width: 28px;
            height: 28px;
            background: rgba(241, 196, 15, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 700;
            color: #f1c40f;
            margin-right: 12px;
        }

        .crypto-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            margin-right: 12px;
        }

        .crypto-info {
            flex: 1;
        }

        .crypto-name {
            font-size: 14px;
            font-weight: 600;
            color: #fff;
        }

        .crypto-symbol {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.6);
        }

        .crypto-price-info {
            text-align: right;
        }

        .crypto-price {
            font-size: 15px;
            font-weight: 700;
            color: #f1c40f;
        }

        .crypto-change {
            font-size: 12px;
            font-weight: 600;
        }

        .crypto-change.positive {
            color: #2ecc71;
        }

        .crypto-change.negative {
            color: #e74c3c;
        }

        .crypto-loading {
            text-align: center;
            padding: 40px;
            color: #888;
        }

        .crypto-market-cap {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.5);
            margin-top: 2px;
        }

        /* Crypto Chart Modal */
        .crypto-chart-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.85);
            z-index: 9000 !important;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .crypto-chart-modal.visible {
            display: flex;
        }

        .crypto-chart-container {
            background: rgba(20, 20, 30, 0.98);
            border-radius: 20px;
            border: 1px solid rgba(241, 196, 15, 0.4);
            padding: 25px;
            width: 100%;
            max-width: 700px;
            max-height: 90vh;
            overflow-y: auto;
        }

        .crypto-chart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .crypto-chart-title {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .crypto-chart-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
        }

        .crypto-chart-name {
            font-size: 22px;
            font-weight: 700;
            color: #fff;
        }

        .crypto-chart-symbol {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.6);
        }

        .crypto-chart-price-info {
            text-align: right;
        }

        .crypto-chart-current-price {
            font-size: 28px;
            font-weight: 700;
            color: #f1c40f;
        }

        .crypto-chart-change {
            font-size: 16px;
            font-weight: 600;
        }

        .crypto-chart-period-selector {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
        }

        .crypto-period-btn {
            background: rgba(241, 196, 15, 0.15);
            border: 1px solid rgba(241, 196, 15, 0.3);
            color: #f1c40f;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .crypto-period-btn:hover {
            background: rgba(241, 196, 15, 0.25);
        }

        .crypto-period-btn.active {
            background: #f1c40f;
            color: #000;
        }

        .crypto-chart-canvas-container {
            position: relative;
            height: 300px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 15px;
        }

        .crypto-chart-canvas {
            width: 100%;
            height: 100%;
        }

        .crypto-chart-stats {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
        }

        .crypto-stat-item {
            background: rgba(241, 196, 15, 0.08);
            border-radius: 10px;
            padding: 12px;
            text-align: center;
        }

        .crypto-stat-label {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.5);
            margin-bottom: 4px;
        }

        .crypto-stat-value {
            font-size: 14px;
            font-weight: 600;
            color: #fff;
        }

        .crypto-chart-loading {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 300px;
            color: #888;
        }

        @media (max-width: 768px) {
            .crypto-chart-container {
                padding: 15px;
                border-radius: 15px;
            }

            .crypto-chart-stats {
                grid-template-columns: repeat(2, 1fr);
            }

            .crypto-chart-current-price {
                font-size: 22px;
            }

            .crypto-chart-name {
                font-size: 18px;
            }
        }

        /* Satellite List Panel */
        .satellite-list-panel {
            position: fixed;
            left: -420px;
            top: 160px;
            width: 380px;
            max-height: calc(100vh - 180px);
            background: rgba(0, 0, 0, 0.95);
            border-radius: 16px;
            border: 1px solid rgba(155, 89, 182, 0.4);
            padding: 20px;
            z-index: 150;
            transition: left 0.3s ease;
            overflow-y: auto;
        }

        .satellite-list-panel.open {
            left: 15px;
        }

        .satellite-list-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(155, 89, 182, 0.3);
        }

        .satellite-list-title {
            font-size: 18px;
            font-weight: 600;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .satellite-list-title .icon {
            font-size: 22px;
        }

        .satellite-list-content {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .satellite-list-item {
            background: rgba(155, 89, 182, 0.1);
            border: 1px solid rgba(155, 89, 182, 0.2);
            border-radius: 12px;
            padding: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .satellite-list-item:hover {
            background: rgba(155, 89, 182, 0.2);
            border-color: rgba(155, 89, 182, 0.4);
            transform: translateX(5px);
        }

        .satellite-list-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .satellite-list-item-name {
            font-size: 15px;
            font-weight: 600;
            color: #fff;
        }

        .satellite-list-item-country {
            font-size: 18px;
        }

        .satellite-list-item-params {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 6px;
            font-size: 12px;
            color: rgba(255, 255, 255, 0.7);
        }

        .satellite-list-item-param {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .satellite-list-item-param .label {
            color: rgba(155, 89, 182, 0.8);
        }

        .satellite-list-item-param .value {
            color: #fff;
            font-weight: 500;
        }

        /* Radio Panel - Modern Dark Theme */
        .radio-panel {
            position: fixed;
            left: -420px;
            top: 180px;
            width: 380px;
            max-height: calc(100vh - 200px);
            background: rgba(18, 18, 18, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 8px 32px rgba(0,0,0,0.4);
            padding: 20px;
            z-index: 150;
            transition: left 0.3s ease;
            overflow-y: auto;
        }

        .radio-panel.open {
            left: 20px;
        }

        /* Back button — only visible on mobile (styled in @media block) */
        .mobile-panel-back {
            display: none;
        }

        .radio-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .radio-panel-title {
            font-size: 18px;
            font-weight: 600;
            color: #fff;
        }

        .radio-panel-close {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.7);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .radio-panel-close:hover {
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
        }

        .radio-station {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 12px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .radio-station:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(29, 185, 84, 0.3);
        }

        .radio-station.playing {
            background: rgba(29, 185, 84, 0.15);
            border-color: rgba(29, 185, 84, 0.4);
        }

        .radio-station-icon {
            font-size: 20px;
            width: 44px;
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(29, 185, 84, 0.2);
            border-radius: 50%;
            color: #1db954;
        }

        .radio-station-info {
            flex: 1;
            min-width: 0;
            overflow: hidden;
        }

        .radio-station-name {
            font-size: 14px;
            font-weight: 600;
            color: #fff;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .radio-station-tags {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.6);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        /* Radio Garden Mode - Station Tooltip */
        .radio-station-tooltip {
            position: fixed;
            background: rgba(0, 0, 0, 0.95);
            border: 1px solid rgba(29, 185, 84, 0.4);
            border-radius: 12px;
            padding: 12px 16px;
            z-index: 2000;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.2s ease;
            max-width: 280px;
            backdrop-filter: blur(10px);
        }

        .radio-station-tooltip.visible {
            opacity: 1;
        }

        .radio-tooltip-name {
            font-size: 14px;
            font-weight: 600;
            color: #fff;
            margin-bottom: 4px;
        }

        .radio-tooltip-country {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 4px;
        }

        .radio-tooltip-tags {
            font-size: 11px;
            color: #1db954;
            margin-bottom: 4px;
        }

        .radio-tooltip-bitrate {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.5);
            margin-bottom: 6px;
        }

        .radio-tooltip-hint {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.4);
            text-transform: uppercase;
        }

        /* Radio Mini Player */
        .radio-mini-player {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: rgba(0, 0, 0, 0.95);
            border: 1px solid rgba(29, 185, 84, 0.4);
            border-radius: 50px;
            padding: 8px 16px 8px 12px;
            z-index: 300;
            display: flex;
            align-items: center;
            gap: 12px;
            backdrop-filter: blur(10px);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
            transition: transform 0.3s ease;
        }

        .radio-mini-player.visible {
            transform: translateX(-50%) translateY(0);
        }

        .radio-mini-info {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .radio-mini-icon {
            font-size: 24px;
        }

        .radio-mini-details {
            max-width: 200px;
        }

        .radio-mini-name {
            font-size: 13px;
            font-weight: 600;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .radio-mini-tags {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.5);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .radio-mini-controls {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .radio-mini-btn {
            width: 36px;
            height: 36px;
            border: none;
            border-radius: 50%;
            background: rgba(29, 185, 84, 0.2);
            color: #1db954;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .radio-mini-btn:hover {
            background: rgba(29, 185, 84, 0.4);
            color: #fff;
        }

        /* Radio Filters in Radio Mode */
        .radio-filters {
            position: fixed;
            top: 55px;
            left: 20px;
            display: flex;
            gap: 8px;
            z-index: 120;
            flex-wrap: wrap;
            max-width: calc(100vw - 40px);
        }

        .radio-genre-btn {
            background: rgba(29, 185, 84, 0.15);
            border: 1px solid rgba(29, 185, 84, 0.3);
            border-radius: 20px;
            padding: 6px 14px;
            color: rgba(255, 255, 255, 0.8);
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .radio-genre-btn:hover {
            background: rgba(29, 185, 84, 0.3);
            border-color: rgba(29, 185, 84, 0.5);
        }

        .radio-genre-btn.active {
            background: #1db954;
            color: #fff;
            border-color: #1db954;
        }

        .radio-stations-counter {
            position: fixed;
            top: 95px;
            left: 20px;
            font-size: 13px;
            color: rgba(255, 255, 255, 0.7);
            z-index: 120;
        }

        .radio-country-badge {
            position: fixed;
            top: 180px;
            right: 20px;
            background: rgba(29, 185, 84, 0.9);
            color: white;
            padding: 8px 12px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            z-index: 120;
            display: flex;
            align-items: center;
            gap: 8px;
            backdrop-filter: blur(10px);
        }

        .radio-country-clear {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            color: white;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }

        .radio-country-clear:hover {
            background: rgba(255, 255, 255, 0.4);
        }

        /* Radio Hub v2 */
        .radio-panel {
            left: -430px;
            top: 60px;
            width: 390px;
            height: calc(100vh - 80px);
            max-height: none;
            padding: 0;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            background: rgba(7, 14, 12, 0.96);
            border: 1px solid rgba(29, 185, 84, 0.22);
            border-left: none;
            border-radius: 0 16px 16px 0;
            box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
        }

        .radio-panel.open {
            left: 0;
        }

        /* Mode exit is synchronous: an outgoing media drawer must not slide
           across the next mode or keep intercepting its footer/controls. */
        body:not(.mode-radio):not([data-pw-mode="radio"]) #radio-panel,
        body:not(.mode-tv):not([data-pw-mode="tv"]) #tv-panel {
            transform: translateX(-110vw) !important;
            visibility: hidden !important;
            pointer-events: none !important;
            transition: none !important;
        }

        body.mode-radio .search-container,
        body[data-pw-mode="radio"] .search-container,
        body.mode-tv .search-container,
        body[data-pw-mode="tv"] .search-container {
            display: none !important;
        }

        .radio-panel-header {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 14px;
            margin: 0;
            border-bottom: 1px solid rgba(29, 185, 84, 0.16);
            background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
        }

        .radio-panel-header-row,
        .radio-panel-title,
        .radio-panel-actions {
            display: flex;
            align-items: center;
        }

        .radio-panel-header-row {
            justify-content: space-between;
            gap: 12px;
        }

        .radio-panel-title {
            gap: 8px;
            min-width: 0;
            color: #f4fff9;
            font-size: 16px;
            font-weight: 800;
        }

        .radio-panel-title span:nth-child(3) {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .radio-panel-count {
            flex: 0 0 auto;
            margin-left: 4px;
            color: rgba(219, 255, 235, 0.6);
            font-size: 12px;
            font-weight: 700;
        }

        .radio-panel-actions {
            gap: 8px;
            flex: 0 0 auto;
        }

        .radio-panel-icon-btn,
        .radio-panel-close {
            width: 34px;
            height: 34px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.78);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .radio-panel-icon-btn:hover,
        .radio-panel-close:hover {
            background: rgba(29, 185, 84, 0.18);
            color: #fff;
        }

        .radio-hub-controls {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .radio-hub-controls label {
            display: flex;
            flex-direction: column;
            gap: 5px;
            min-width: 0;
            color: rgba(219, 255, 235, 0.58);
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .radio-hub-controls select,
        .radio-search-wrap input {
            width: 100%;
            height: 38px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            background: rgb(27, 35, 34);
            color: #fff;
            font-size: 13px;
            font-weight: 700;
            outline: none;
            padding: 0 10px;
        }

        .radio-hub-controls select:disabled {
            opacity: 0.55;
        }

        .radio-search-wrap input::placeholder {
            color: rgba(255, 255, 255, 0.65);
        }

        .radio-quick-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
            overflow: visible;
            padding-bottom: 0;
        }

        .radio-quick-row button,
        .radio-load-more {
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.82);
            border-radius: 10px;
            padding: 9px 11px;
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
            white-space: nowrap;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .radio-quick-row button.active,
        .radio-quick-row button:hover,
        .radio-load-more:hover {
            background: rgba(29, 185, 84, 0.28);
            border-color: rgba(29, 185, 84, 0.42);
            color: #fff;
        }

        .radio-status-strip {
            display: none;
            border-radius: 10px;
            border: 1px solid rgba(29, 185, 84, 0.2);
            background: rgba(29, 185, 84, 0.1);
            color: #dfffee;
            padding: 9px 10px;
            font-size: 12px;
            font-weight: 700;
        }

        .radio-status-strip.visible {
            display: block;
        }

        .radio-status-strip[data-type="error"] {
            border-color: rgba(239, 68, 68, 0.35);
            background: rgba(239, 68, 68, 0.13);
            color: #ffe4e4;
        }

        .radio-panel-content {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 12px;
            contain: layout paint style;
        }

        .radio-station-card {
            width: 100%;
            display: grid;
            grid-template-columns: 48px minmax(0, 1fr) auto;
            gap: 11px;
            align-items: center;
            margin: 0 0 9px;
            padding: 11px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            background: rgb(18, 27, 25);
            color: #fff;
            text-align: left;
            cursor: pointer;
            transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
            contain: layout paint;
            content-visibility: auto;
            contain-intrinsic-size: 72px;
        }

        .radio-station-card:hover {
            transform: translateX(2px);
            border-color: rgba(29, 185, 84, 0.36);
            background: rgba(29, 185, 84, 0.1);
        }

        .radio-station-card.active {
            border-color: rgba(29, 185, 84, 0.72);
            background: rgba(29, 185, 84, 0.17);
        }

        .radio-station-card.failed {
            opacity: 0.56;
        }

        .radio-station-logo {
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border-radius: 10px;
            background: rgba(29, 185, 84, 0.14);
        }

        .radio-station-logo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .radio-logo-fallback {
            color: #9cffc2;
            font-size: 13px;
            font-weight: 900;
        }

        .radio-station-main {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .radio-station-name {
            color: #fff;
            font-size: 14px;
            font-weight: 900;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .radio-station-meta {
            color: rgba(235, 255, 244, 0.62);
            font-size: 12px;
            font-weight: 650;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .radio-station-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
        }

        .radio-station-tags span {
            max-width: 86px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            padding: 3px 6px;
            border-radius: 7px;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(235, 255, 244, 0.68);
            font-size: 10px;
            font-weight: 800;
        }

        .radio-station-side {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 5px;
        }

        .radio-status-pill {
            padding: 4px 6px;
            border-radius: 999px;
            font-size: 10px;
            font-weight: 900;
            text-transform: uppercase;
            color: #fff;
            background: rgba(255,255,255,0.12);
        }

        .radio-status-pill.is-working {
            color: #10351e;
            background: #8ef1ae;
        }

        .radio-status-pill.is-broken {
            color: #fff;
            background: rgba(239, 68, 68, 0.72);
        }

        .radio-station-votes,
        .radio-card-fav {
            color: rgba(235, 255, 244, 0.55);
            font-size: 11px;
            font-weight: 800;
        }

        .radio-card-fav {
            font-size: 15px;
            line-height: 1;
        }

        .radio-card-fav.active {
            color: #8ef1ae;
        }

        .radio-empty-state {
            padding: 26px 14px;
            color: rgba(235, 255, 244, 0.7);
            text-align: center;
            font-size: 14px;
            font-weight: 800;
        }

        .radio-load-more {
            width: 100%;
            margin: 4px 0 12px;
        }

        .radio-player-pro {
            position: fixed;
            right: 18px;
            bottom: 18px;
            width: min(520px, calc(100vw - 36px));
            background: rgba(7, 11, 14, 0.97);
            border: 1px solid rgba(29, 185, 84, 0.35);
            border-radius: 18px;
            color: #fff;
            z-index: 450;
            overflow: hidden;
            box-shadow: 0 22px 80px rgba(0,0,0,0.55);
            backdrop-filter: blur(18px);
            display: none;
        }

        .radio-player-pro.visible {
            display: block;
        }

        .radio-player-pro.minimized .radio-player-status,
        .radio-player-pro.minimized .radio-player-controls {
            display: none;
        }

        .radio-player-header {
            cursor: move;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            background: rgba(255,255,255,0.045);
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }

        .radio-player-now {
            min-width: 0;
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            gap: 2px 8px;
            align-items: center;
        }

        .radio-live-dot {
            width: 10px;
            height: 10px;
            border-radius: 999px;
            background: #ef4444;
            grid-row: 1 / span 3;
        }

        .radio-live-dot.is-live {
            background: #1db954;
            box-shadow: 0 0 0 5px rgba(29,185,84,0.12);
        }

        .radio-player-title {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 16px;
            font-weight: 900;
        }

        .radio-player-meta {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: rgba(255,255,255,0.62);
            font-size: 12px;
            font-weight: 700;
        }

        .radio-player-source {
            grid-column: 2;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: rgba(255,255,255,0.56);
            font-size: 11px;
            font-weight: 700;
        }

        .radio-player-source a {
            color: #9cffc2;
            text-decoration: none;
        }

        .radio-player-source a:hover,
        .radio-player-source a:focus-visible {
            text-decoration: underline;
        }

        /* Provider attribution is a real action, so keep its mobile hit area
           full-sized instead of exposing only the short provider label. */
        @media (max-width: 768px), (pointer: coarse) {
            .radio-player-source a {
                box-sizing: border-box;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 44px;
                min-height: 44px;
            }
        }

        .radio-player-actions,
        .radio-player-controls {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .radio-player-actions button,
        .radio-player-controls button {
            min-width: 46px;
            width: 46px;
            height: 46px;
            border: 0;
            border-radius: 11px;
            background: rgba(255,255,255,0.09);
            color: #fff;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .radio-player-actions button svg,
        .radio-player-controls button svg {
            width: 21px;
            height: 21px;
            fill: currentColor;
            pointer-events: none;
        }

        .radio-play-main svg {
            width: 24px;
            height: 24px;
        }

        .radio-player-actions button:hover,
        .radio-player-controls button:hover,
        .radio-player-controls button.active {
            background: rgba(29,185,84,0.28);
        }

        .radio-player-status {
            min-height: 32px;
            padding: 9px 14px;
            color: rgba(235,255,244,0.74);
            font-size: 13px;
            font-weight: 800;
        }

        .radio-player-controls {
            padding: 10px 12px 14px;
            overflow-x: auto;
        }

        .radio-player-controls input[type="range"] {
            width: 126px;
            accent-color: #1db954;
        }

        @media (min-width: 769px) {
            .radio-player-controls {
                gap: 6px;
            }

            .radio-player-controls button {
                min-width: 44px;
                width: 44px;
                height: 44px;
            }

            .radio-player-controls input[type="range"] {
                width: 104px;
            }
        }

        #radio-station-highlight {
            position: fixed;
            border: 2px solid #fff;
            border-radius: 50%;
            pointer-events: none;
            z-index: 500;
            box-sizing: border-box;
            box-shadow: 0 0 8px #1db954, 0 0 12px #1db954;
            display: none;
        }

        /* TV Panel - Similar to Radio Panel */
        /* TV Panel - Right-side sidebar (famelack style) */
        .tv-panel {
            position: fixed;
            left: -400px;
            top: 60px;
            width: 360px;
            height: calc(100vh - 80px);
            background: rgba(6, 8, 12, 0.96);
            backdrop-filter: blur(16px);
            border-radius: 0 16px 16px 0;
            border: 1px solid rgba(147, 51, 234, 0.2);
            border-left: none;
            padding: 0;
            z-index: 150;
            transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            visibility: hidden;
            pointer-events: none;
        }
        .tv-panel.open {
            left: 0;
            visibility: visible;
            pointer-events: auto;
        }
        .tv-panel.tv-panel-transitioning {
            visibility: hidden !important;
            pointer-events: none !important;
        }
        .tv-panel.tv-panel-no-transition {
            transition: none !important;
        }

        .tv-panel-header {
            padding: 16px 16px 12px;
            border-bottom: 1px solid rgba(147, 51, 234, 0.15);
            flex-shrink: 0;
        }
        .tv-panel-header-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        .tv-panel-title {
            font-size: 16px;
            font-weight: 600;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .tv-panel-count {
            font-size: 12px;
            color: rgba(255,255,255,0.65);
            margin-left: 6px;
        }
        .tv-panel-actions {
            display: flex;
            gap: 6px;
            align-items: center;
        }
        .tv-panel-close {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.6);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
        }
        .tv-panel-close:hover {
            background: rgba(255, 255, 255, 0.15);
            color: #fff;
        }
        .tv-random-btn {
            height: 30px;
            padding: 0 12px;
            border-radius: 15px;
            border: 1px solid rgba(147, 51, 234, 0.4);
            background: rgba(147, 51, 234, 0.15);
            color: #c084fc;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.15s;
        }
        .tv-random-btn:hover {
            background: rgba(147, 51, 234, 0.3);
            border-color: rgba(147, 51, 234, 0.6);
            color: #fff;
        }

        /* Search bar */
        .tv-search-wrap {
            position: relative;
            margin-bottom: 8px;
        }
        .tv-search-input {
            width: 100%;
            height: 36px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 18px;
            padding: 0 36px 0 14px;
            color: #fff;
            font-size: 13px;
            outline: none;
            transition: border-color 0.15s;
            box-sizing: border-box;
        }
        .tv-search-input::placeholder { color: rgba(255,255,255,0.65); }
        .tv-search-input:focus { border-color: rgba(147, 51, 234, 0.5); }
        .tv-search-icon {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            opacity: 0.35;
            pointer-events: none;
        }

        /* Category tabs */
        .tv-category-tabs {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 4px;
            overflow: visible;
            padding-bottom: 4px;
        }
        .tv-cat-tab {
            min-width: 0;
            width: 100%;
            padding: 4px 5px;
            border-radius: 12px;
            border: none;
            background: rgba(255,255,255,0.06);
            color: rgba(255,255,255,0.5);
            font-size: 11px;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.15s;
        }
        .tv-cat-tab:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
        .tv-cat-tab.active {
            background: rgba(147, 51, 234, 0.3);
            color: #c084fc;
        }

        /* Channel list */
        .tv-panel-content {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 8px 12px;
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,0.15) transparent;
            contain: layout paint style;
        }
        .tv-panel-content::-webkit-scrollbar { width: 5px; }
        .tv-panel-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

        .tv-channel-row {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 2px;
        }
        .tv-channel-item {
            display: flex;
            flex: 1;
            align-items: center;
            gap: 10px;
            width: 100%;
            min-width: 0;
            padding: 8px 10px;
            background: rgb(13, 17, 24);
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.15s;
            border: 1px solid transparent;
            min-height: 48px;
            color: inherit;
            font: inherit;
            text-align: left;
            -webkit-appearance: none;
            contain: layout paint;
            content-visibility: auto;
            contain-intrinsic-size: 58px;
        }
        .tv-channel-item:hover { background: rgba(255,255,255,0.06); }
        .tv-channel-item.playing {
            background: rgba(147, 51, 234, 0.2);
            border-color: rgba(147, 51, 234, 0.4);
        }
        .tv-channel-item.failed { opacity: 0.4; }
        .tv-channel-item.failed::after {
            content: '';
            display: none;
        }

        .tv-channel-logo {
            width: 40px;
            height: 30px;
            border-radius: 4px;
            background: rgba(255,255,255,0.04);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            overflow: hidden;
        }
        .tv-channel-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
        .tv-channel-logo svg { width: 20px; height: 20px; fill: rgba(147, 51, 234, 0.5); }
        .tv-logo-fallback {
            color: rgba(216, 180, 254, 0.95);
            font-size: 11px;
            font-weight: 900;
            letter-spacing: 0.02em;
        }

        .tv-channel-info { display: block; flex: 1; min-width: 0; }
        .tv-channel-name {
            font-size: 13px;
            font-weight: 500;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .tv-channel-category {
            display: block;
            font-size: 10px;
            color: rgba(255, 255, 255, 0.65);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .tv-hub-controls {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin: 0 0 10px;
        }
        .tv-hub-controls label {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
            color: rgba(255,255,255,0.65);
            font-size: 9px;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }
        .tv-hub-controls select {
            width: 100%;
            min-width: 0;
            height: 34px;
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            background: rgb(28, 27, 38);
            color: #fff;
            padding: 0 8px;
            font-size: 12px;
            outline: none;
        }
        .tv-quick-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 6px;
            overflow: visible;
            padding-bottom: 6px;
            margin-top: -2px;
        }
        .tv-quick-btn {
            min-width: 0;
            width: 100%;
            height: 28px;
            padding: 0 6px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.06);
            color: rgba(255,255,255,0.68);
            font-size: 11px;
            font-weight: 700;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            cursor: pointer;
        }
        .tv-quick-btn.active,
        .tv-quick-btn:hover {
            background: rgba(147, 51, 234, 0.28);
            border-color: rgba(147, 51, 234, 0.45);
            color: #fff;
        }
        .tv-status-strip {
            min-height: 18px;
            margin-top: 6px;
            padding: 5px 8px;
            border-radius: 7px;
            background: rgba(255,255,255,0.04);
            color: rgba(255,255,255,0.48);
            font-size: 11px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .tv-loading-list,
        .tv-empty {
            padding: 42px 12px;
            text-align: center;
            color: rgba(255,255,255,0.42);
            font-size: 13px;
        }
        .tv-channel-name-row {
            display: flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
        }
        .tv-channel-meta {
            display: flex;
            align-items: center;
            gap: 5px;
            flex-wrap: wrap;
            margin-top: 4px;
            font-size: 9px;
            color: rgba(255,255,255,0.65);
        }
        .tv-channel-meta > span {
            padding: 2px 5px;
            border-radius: 5px;
            background: rgba(255,255,255,0.06);
        }
        .tv-status-pill {
            color: rgba(255,255,255,0.78) !important;
        }
        .tv-status-working { background: rgba(34,197,94,0.22) !important; }
        .tv-status-geo_blocked { background: rgba(245,158,11,0.22) !important; }
        .tv-status-broken,
        .tv-status-unsupported { background: rgba(239,68,68,0.24) !important; }
        .tv-status-reported,
        .tv-status-unchecked { background: rgba(148,163,184,0.18) !important; }
        .tv-channel-more {
            width: 30px;
            height: 30px;
            border: 0;
            border-radius: 8px;
            background: rgba(255,255,255,0.06);
            color: rgba(255,255,255,0.55);
            cursor: pointer;
            flex-shrink: 0;
        }
        .tv-channel-more:hover {
            color: #facc15;
            background: rgba(250,204,21,0.12);
        }
        /* Shared TV/Radio station-card interaction contract (P1 parity). */
        .media-station-row {
            display: flex;
            align-items: center;
            gap: 7px;
            margin: 0 0 8px;
        }
        .media-station-card {
            display: grid;
            flex: 1 1 auto;
            min-width: 0;
            min-height: 72px;
            margin: 0;
            padding: 10px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            background: rgb(15, 22, 24);
            color: #fff;
            font: inherit;
            text-align: left;
            cursor: pointer;
            transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
        }
        .radio-station-card.media-station-card {
            grid-template-columns: 48px minmax(0, 1fr) auto;
        }
        .tv-channel-item.media-station-card {
            grid-template-columns: 48px minmax(0, 1fr);
        }
        .media-station-card:hover {
            transform: translateX(2px);
            border-color: rgba(255, 255, 255, 0.24);
        }
        .media-station-card:focus-visible,
        .media-station-favorite:focus-visible {
            outline: 2px solid rgba(125, 211, 252, 0.95);
            outline-offset: 2px;
        }
        .media-station-card.is-failed {
            opacity: 0.5;
        }
        .media-station-logo {
            display: flex;
            width: 48px;
            height: 48px;
            flex: 0 0 48px;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border-radius: 10px;
        }
        .media-station-content {
            min-width: 0;
        }
        .media-station-name {
            overflow: hidden;
            color: #fff;
            font-size: 14px;
            font-weight: 900;
            line-height: 1.25;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .media-station-favorite {
            display: inline-flex;
            width: 40px;
            min-width: 40px;
            height: 40px;
            align-items: center;
            justify-content: center;
            border: 0;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.07);
            color: rgba(255, 255, 255, 0.55);
            font-size: 17px;
            cursor: pointer;
        }
        .media-station-favorite:hover,
        .media-station-favorite.active,
        .media-station-favorite[aria-pressed="true"] {
            color: #facc15;
            background: rgba(250, 204, 21, 0.14);
        }
        @media (max-width: 768px), (pointer: coarse) {
            .media-station-favorite {
                width: 44px;
                min-width: 44px;
                height: 44px;
            }
        }
        .tv-load-more {
            width: 100%;
            margin: 10px 0 18px;
            height: 38px;
            border-radius: 9px;
            border: 1px solid rgba(147,51,234,0.35);
            background: rgba(147,51,234,0.16);
            color: #fff;
            font-weight: 800;
            cursor: pointer;
        }
        .tv-player-pro {
            position: fixed;
            left: 50%;
            bottom: 96px;
            transform: translateX(-50%);
            width: 520px;
            max-width: calc(100vw - 24px);
            background: rgba(9, 12, 18, 0.97);
            color: #fff;
            border: 1px solid rgba(147,51,234,0.35);
            border-radius: 12px;
            box-shadow: 0 14px 46px rgba(0,0,0,0.55);
            z-index: 9000;
            overflow: hidden;
        }
        .tv-player-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            height: 38px;
            padding: 0 10px;
            background: rgba(255,255,255,0.06);
            cursor: grab;
            user-select: none;
        }
        .tv-player-title {
            display: flex;
            align-items: center;
            gap: 7px;
            min-width: 0;
            font-size: 12px;
            font-weight: 800;
        }
        .tv-player-title .tv-name {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .tv-live-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #ef4444;
            box-shadow: 0 0 12px rgba(239,68,68,0.65);
            flex-shrink: 0;
        }
        .tv-player-status {
            color: rgba(255,255,255,0.45);
            font-size: 11px;
            white-space: nowrap;
        }
        .tv-player-source {
            color: rgba(255,255,255,0.56);
            font-size: 11px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .tv-player-source a {
            color: #c4b5fd;
            text-decoration: none;
        }
        .tv-player-source a:hover,
        .tv-player-source a:focus-visible {
            text-decoration: underline;
        }
        .tv-player-actions {
            display: flex;
            gap: 5px;
        }
        .tv-player-actions button,
        .tv-ctrl-btn {
            width: 30px;
            height: 30px;
            border: 0;
            border-radius: 7px;
            background: rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.82);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .tv-player-actions button:hover,
        .tv-ctrl-btn:hover {
            background: rgba(147,51,234,0.32);
            color: #fff;
        }
        .tv-video-container {
            position: relative;
            height: 292px;
            background: #000;
        }
        .tv-video-container video {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #000;
        }
        .tv-embed-frame {
            display: none;
            width: 100%;
            height: 100%;
            border: 0;
            background: #000;
        }
        .tv-loading,
        .tv-error {
            position: absolute;
            inset: 0;
            display: none;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 12px;
            background: rgba(0,0,0,0.72);
            color: #fff;
            text-align: center;
            padding: 18px;
        }
        .tv-error button {
            height: 34px;
            padding: 0 14px;
            border: 0;
            border-radius: 8px;
            background: #9333ea;
            color: #fff;
            font-weight: 800;
            cursor: pointer;
        }
        .tv-spinner {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            border: 3px solid rgba(147,51,234,0.25);
            border-top-color: #c084fc;
            animation: spin 1s linear infinite;
        }
        .tv-big-play {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 58px;
            height: 58px;
            border: 0;
            border-radius: 50%;
            background: rgba(147,51,234,0.86);
            color: #fff;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.15s;
            cursor: pointer;
        }
        .tv-video-container:hover .tv-big-play {
            opacity: 1;
            pointer-events: auto;
        }
        .tv-error[data-error-code="autoplay_blocked"] + .tv-big-play {
            opacity: 1;
            pointer-events: auto;
        }
        .tv-big-play svg,
        .tv-ctrl-btn svg {
            width: 20px;
            height: 20px;
            fill: currentColor;
        }
        .tv-controls {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px;
            background: rgba(255,255,255,0.04);
        }
        .tv-controls.hidden {
            display: none;
        }
        .tv-volume {
            width: 82px;
        }
        .tv-quality-select {
            min-width: 86px;
            height: 30px;
            border: 0;
            border-radius: 7px;
            background: rgba(255,255,255,0.08);
            color: #fff;
            font-size: 11px;
            padding: 0 6px;
        }
        .tv-minimize-strip {
            display: none;
            height: 100%;
            align-items: center;
            justify-content: center;
            font-weight: 900;
            cursor: pointer;
        }
        .tv-player-pro.minimized {
            width: 62px !important;
            height: 62px !important;
            border-radius: 50%;
        }
        .tv-player-pro.minimized .tv-player-header,
        .tv-player-pro.minimized .tv-video-container,
        .tv-player-pro.minimized .tv-controls,
        .tv-player-pro.minimized .tv-resize-handle {
            display: none;
        }
        .tv-player-pro.minimized .tv-minimize-strip {
            display: flex;
        }
        .tv-resize-handle {
            position: absolute;
            right: 0;
            bottom: 0;
            width: 18px;
            height: 18px;
            cursor: nwse-resize;
            background: linear-gradient(135deg, transparent 45%, rgba(147,51,234,0.9) 45%);
            -webkit-clip-path: polygon(100% 0, 100% 100%, 0 100%);
            clip-path: polygon(100% 0, 100% 100%, 0 100%);
        }

        @media (max-width: 600px) {
            .tv-panel {
                width: 100%;
                left: -100%;
                top: 0;
                height: 100vh;
                border-radius: 0;
            }
            .tv-panel.open { left: 0; }
            .tv-panel-header {
                padding: 10px 10px 8px;
            }
            .tv-hub-controls {
                display: flex;
                gap: 8px;
                overflow-x: auto;
                overflow-y: hidden;
                overscroll-behavior-inline: contain;
                scrollbar-width: none;
                padding-bottom: 2px;
            }
            .tv-hub-controls::-webkit-scrollbar,
            .tv-quick-row::-webkit-scrollbar,
            .tv-category-tabs::-webkit-scrollbar {
                display: none;
            }
            .tv-hub-controls label {
                flex: 0 0 148px;
            }
            .tv-quick-row,
            .tv-category-tabs {
                display: flex;
                flex-wrap: nowrap;
                gap: 6px;
                overflow-x: auto;
                overflow-y: hidden;
                overscroll-behavior-inline: contain;
                scrollbar-width: none;
            }
            .tv-quick-btn {
                flex: 0 0 112px;
            }
            .tv-cat-tab {
                flex: 0 0 104px;
            }
            .tv-player-pro {
                left: 8px !important;
                right: 8px !important;
                bottom: 78px;
                width: auto !important;
                max-width: none;
                transform: none;
            }
            .tv-video-container {
                height: auto !important;
                aspect-ratio: 16 / 9;
            }
            .tv-controls {
                overflow-x: auto;
            }
            .tv-quality-select {
                max-width: 110px;
            }
        }

        /* TV Player Styles - Compact like Radio */
        /* Styles are injected via JavaScript like radio player */

        /* Search box */
        .search-container {
            position: fixed;
            top: 85px;
            right: 20px;
            left: auto;
            z-index: 10040;
            width: 260px;
            transition: none;
        }

        /* Shift search down when filters are visible */
        .search-container.filters-active {
            top: 160px;
        }

        /* Shift search down when STATS filters are visible */
        .search-container.stats-filters-active {
            top: 130px;
        }

        .search-container.resources-filters-active {
            top: 130px !important;
        }

        .search-container.economy-filters-active {
            top: 130px !important;
        }

        @media (min-width: 769px) {
            body.mode-stats .search-container,
            body[data-pw-mode="stats"] .search-container {
                top: 204px !important;
                right: auto;
                left: 15px;
            }
        }

        /* Shift search down when radio mode is active */
        .search-container.radio-mode-active {
            top: 115px;
        }

        /* Move search to left side in radio/tv modes */
        .search-container.search-left {
            right: auto;
            left: 20px;
        }

        .search-input {
            width: 100%;
            padding: 12px 15px;
            padding-left: 40px;
            background: rgba(0, 20, 40, 0.15);
            border: 1px solid rgba(0, 212, 255, 0.3);
            border-radius: 14px;
            color: #fff;
            font-size: 14px;
            outline: none;
            transition: all 0.3s ease;
        }

        .search-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .search-input:focus {
            border-color: rgba(0, 212, 255, 0.5);
            box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
            background: rgba(0, 20, 40, 0.25);
        }

        .search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(0, 212, 255, 0.6);
            font-size: 16px;
            pointer-events: none;
        }

        .search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin-top: 5px;
            background: rgba(20, 20, 40, 0.95);
            border: 1px solid rgba(0, 212, 255, 0.3);
            border-radius: 12px;
            max-height: 300px;
            overflow-y: auto;
            display: none;
            backdrop-filter: blur(10px);
        }

        .search-results.visible {
            display: block;
        }

        .search-result-item {
            padding: 12px 15px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            transition: all 0.2s;
        }

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

        .search-result-item:hover {
            background: rgba(0, 212, 255, 0.15);
        }

        .search-result-item .flag {
            font-size: 24px;
        }

        .search-result-item .country-info {
            flex: 1;
        }

        .search-result-item .country-name {
            font-size: 14px;
            color: #fff;
        }

        .search-result-item .country-name-alt {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.5);
            margin-top: 2px;
        }

        .search-no-results {
            padding: 20px;
            text-align: center;
            color: rgba(255, 255, 255, 0.4);
            font-size: 13px;
        }

        /* Hot News Button - in header (matching lang-selector) */
        .top-news-btn {
            padding: 8px 14px;
            background: linear-gradient(135deg, rgba(255, 80, 50, 0.15) 0%, rgba(255, 50, 80, 0.1) 100%);
            border: 1px solid rgba(255, 80, 50, 0.3);
            border-radius: 12px;
            color: #fff;
            font-size: 12px;
            margin-left: 6px;
            height: 38px;
            min-width: 90px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .top-news-btn:hover {
            background: linear-gradient(135deg, rgba(255, 80, 50, 0.5) 0%, rgba(255, 50, 80, 0.4) 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(255, 80, 50, 0.3);
        }

        .top-news-btn.hidden {
            display: none;
        }

        /* Top News Panel */
        .top-news-panel {
            position: fixed;
            right: -400px;
            top: 80px;
            width: 350px;
            max-height: calc(100vh - 100px);
            background: rgba(15, 15, 30, 0.95);
            border-radius: 16px;
            padding: 15px;
            z-index: 90;
            overflow-y: auto;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.1);
            transition: right 0.3s ease;
        }

        .top-news-panel.visible {
            right: 20px;
        }

        .top-news-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .top-news-panel h3 {
            font-size: 14px;
            color: #00d4ff;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .top-news-close {
            background: none;
            border: none;
            color: #888;
            font-size: 20px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
            transition: color 0.2s;
        }

        .top-news-close:hover {
            color: #fff;
        }

        .top-news-item {
            margin-bottom: 10px;
            background: rgba(255,255,255,0.03);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
            border-left: 3px solid transparent;
            overflow: hidden;
            display: flex;
            flex-direction: row;
        }

        .top-news-item:hover {
            background: rgba(255,255,255,0.08);
            border-left-color: #00d4ff;
        }

        .top-news-item .news-thumb {
            width: 80px;
            min-width: 80px;
            height: 70px;
            object-fit: cover;
            background: rgba(255,255,255,0.05);
        }

        .top-news-item .news-thumb-placeholder {
            width: 80px;
            min-width: 80px;
            height: 70px;
            background: linear-gradient(135deg, rgba(0,212,255,0.15) 0%, rgba(0,153,204,0.15) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }

        .top-news-item .news-info {
            padding: 8px 10px;
            display: flex;
            flex-direction: column;
            flex: 1;
            min-width: 0;
        }

        .top-news-item .news-country {
            font-size: 10px;
            color: #00d4ff;
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .top-news-item .news-title {
            font-size: 12px;
            color: #e0e0e0;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .top-news-item .news-source {
            font-size: 10px;
            color: #666;
            margin-top: auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .top-news-item .share-btn {
            font-size: 12px;
            padding: 2px 6px;
        }

        /* Country Stats Panel */
        .country-stats-panel {
            position: fixed;
            left: 20px;
            top: 140px;
            width: 380px;
            max-height: calc(100vh - 100px);
            background: rgba(20, 20, 40, 0.98);
            border-radius: 16px;
            padding: 20px;
            z-index: 500;
            overflow-y: auto;
            backdrop-filter: blur(15px);
            border: 1px solid rgba(0, 212, 255, 0.2);
            transform: translateX(-450px);
            transition: transform 0.3s ease;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        }

        .country-stats-panel.visible {
            transform: translateX(0);
        }

        .country-stats-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .country-stats-header h3 {
            font-size: 16px;
            color: #00d4ff;
            margin: 0;
        }

        .country-stats-close {
            background: none;
            border: none;
            color: #888;
            font-size: 22px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
            transition: color 0.2s;
        }

        .country-stats-close:hover {
            color: #fff;
        }

        .country-stats-search {
            width: 100%;
            padding: 10px 12px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            color: #fff;
            font-size: 14px;
            margin-bottom: 15px;
            outline: none;
            transition: border-color 0.2s;
        }

        .country-stats-search:focus {
            border-color: rgba(0, 212, 255, 0.5);
        }

        .country-stats-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .country-stat-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            background: rgba(255,255,255,0.03);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .country-stat-item:hover {
            background: rgba(0, 212, 255, 0.1);
        }

        .country-stat-item.no-news {
            opacity: 0.5;
        }

        .country-stat-item .flag {
            font-size: 24px;
        }

        .country-stat-item .info {
            flex: 1;
            min-width: 0;
        }

        .country-stat-item .name {
            font-size: 13px;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .country-stat-item .rss-info {
            font-size: 11px;
            color: #888;
            margin-top: 2px;
        }

        .country-stat-item .rss-info .working {
            color: #4caf50;
        }

        .country-stat-item .rss-info .broken {
            color: #f44336;
        }

        .country-stat-item .news-count {
            font-size: 14px;
            font-weight: 600;
            color: #00d4ff;
            min-width: 30px;
            text-align: right;
        }

        .country-stat-item .news-count.zero {
            color: #666;
        }

        .country-stat-item .arrow {
            color: #666;
            font-size: 12px;
            margin-left: 8px;
            transition: transform 0.2s;
        }

        .country-stat-item.expanded .arrow {
            transform: rotate(90deg);
        }

        .source-list {
            display: none;
            padding: 0 12px 10px 48px;
            margin-bottom: 8px;
        }

        .source-list.visible {
            display: block;
        }

        .source-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 0;
            font-size: 12px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }

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

        .source-item .status {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .source-item .status.healthy {
            background: #4caf50;
        }

        .source-item .status.unhealthy {
            background: #f44336;
        }

        .source-item .source-name {
            color: #aaa;
            font-size: 11px;
        }

        .source-list .view-news-btn {
            display: inline-block;
            margin-top: 8px;
            padding: 6px 12px;
            background: rgba(0, 212, 255, 0.15);
            border: 1px solid rgba(0, 212, 255, 0.3);
            border-radius: 6px;
            color: #00d4ff;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .source-list .view-news-btn:hover {
            background: rgba(0, 212, 255, 0.25);
        }

        /* Tablet */
        @media (max-width: 1200px) {
            .top-news-panel {
                width: 280px;
            }
        }

        /* Mobile hamburger menu toggle — hidden on desktop */
        .mobile-menu-toggle {
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 5px;
            width: 44px;
            height: 44px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 8px;
            flex-shrink: 0;
            z-index: 10;
        }
        .mobile-menu-toggle span {
            display: block;
            width: 22px;
            height: 2px;
            background: #fff;
            border-radius: 2px;
            transition: all 0.3s ease;
        }
        .mobile-menu-toggle.active span:nth-child(1) {
            transform: rotate(45deg) translate(5px, 5px);
        }
        .mobile-menu-toggle.active span:nth-child(2) {
            opacity: 0;
        }
        .mobile-menu-toggle.active span:nth-child(3) {
            transform: rotate(-45deg) translate(5px, -5px);
        }
        .mobile-active-mode {
            display: none;
            color: #66e8ff;
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            white-space: nowrap;
        }

        /* Body scroll lock for fullscreen panels */
        body.panel-open {
            overflow: hidden;
            position: fixed;
            width: 100%;
        }

        /* Mobile and tablet layouts, including wide phones in landscape. */
        @media (max-width: 900px) {
            /* === 1. HAMBURGER HEADER (48px compact) === */
            .header {
                padding: 0 10px !important;
                flex-direction: row !important;
                gap: 0 !important;
                align-items: center !important;
                min-height: 48px !important;
                max-height: 48px !important;
                overflow: hidden;
            }

            .header-left {
                flex-direction: row !important;
                flex-wrap: nowrap !important;
                gap: 8px !important;
                width: calc(100% - 104px) !important;
                max-width: calc(100% - 104px);
                min-width: 0;
                align-items: center !important;
                min-height: 48px;
            }

            body.mode-radio .header-left,
            body[data-pw-mode="radio"] .header-left,
            body.mode-tv .header-left,
            body[data-pw-mode="tv"] .header-left {
                width: calc(100% - 146px) !important;
                max-width: calc(100% - 146px);
            }

            .mobile-menu-toggle {
                display: flex !important;
            }

            .mobile-active-mode {
                display: inline-block !important;
                flex: 1 1 auto;
                min-width: 0;
                overflow: hidden;
                line-height: 1.15;
                text-overflow: ellipsis;
            }

            .home-globe-btn {
                width: 44px;
                height: 44px;
                order: -1;
            }

            .mode-buttons {
                display: none !important;
                position: fixed !important;
                top: 48px !important;
                left: 0 !important;
                right: 0 !important;
                flex-direction: column !important;
                background: rgba(10, 10, 25, 0.97) !important;
                backdrop-filter: blur(20px);
                padding: 8px !important;
                gap: 4px !important;
                z-index: 9500 !important;
                border-bottom: 1px solid rgba(0, 212, 255, 0.2);
                box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
                width: 100% !important;
                border-radius: 0 !important;
                max-height: calc(100dvh - 48px) !important;
                overflow-x: hidden !important;
                overflow-y: auto !important;
                overscroll-behavior: contain;
                -webkit-overflow-scrolling: touch;
            }

            .mode-buttons.mobile-open {
                display: flex !important;
            }

            body.mobile-menu-open .header {
                z-index: 11060 !important;
            }

            body.mobile-menu-open .mode-buttons.mobile-open {
                z-index: 11050 !important;
            }

            .mode-btn {
                padding: 12px 16px;
                font-size: 14px;
                flex: 0 0 auto;
                width: 100%;
                text-align: left;
                min-height: 44px;
                border-radius: 8px;
            }

            .mode-btn.active {
                background: rgba(0, 212, 255, 0.15);
                border-left: 3px solid #00d4ff;
            }

            .app-brand-title {
                display: none;
            }

            .mobile-trust-links {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 4px;
                padding: 8px 4px 2px;
                border-top: 1px solid rgba(255, 255, 255, 0.1);
            }

            .mobile-trust-links a,
            .mobile-trust-links button {
                display: flex;
                align-items: center;
                justify-content: center;
                min-height: 44px;
                border: 0;
                border-radius: 4px;
                background: rgba(255, 255, 255, 0.06);
                color: rgba(255, 255, 255, 0.8);
                font: inherit;
                font-size: 12px;
                text-decoration: none;
            }

            /* === 2. SCROLLABLE FILTER CHIPS === */
            .space-submodes,
            .space-filters,
            .planet-filters,
            .flights-filters,
            .ships-filters,
            .geography-filters,
            .disasters-filters,
            .radio-filters,
            .money-filters,
            .military-filters,
            .stats-categories,
            .economy-filters,
            .stations-filters,
            .resources-filters,
            .economy-sub-filters,
            .infra-filters,
            .culture-filters,
            .sport-filters,
            .population-filters {
                position: fixed !important;
                top: 86px !important;
                left: 0 !important;
                right: 0 !important;
                bottom: auto !important;
                max-width: 100% !important;
                flex-wrap: nowrap !important;
                overflow-x: auto !important;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                padding: 6px 10px !important;
                gap: 6px !important;
                z-index: 200 !important;
                background: rgba(10, 10, 25, 0.95) !important;
                backdrop-filter: blur(15px);
                border-bottom: 1px solid rgba(255, 255, 255, 0.08);
                margin: 0 !important;
            }

            .space-submodes::-webkit-scrollbar,
            .space-filters::-webkit-scrollbar,
            .planet-filters::-webkit-scrollbar,
            .flights-filters::-webkit-scrollbar,
            .ships-filters::-webkit-scrollbar,
            .geography-filters::-webkit-scrollbar,
            .disasters-filters::-webkit-scrollbar,
            .radio-filters::-webkit-scrollbar,
            .money-filters::-webkit-scrollbar,
            .military-filters::-webkit-scrollbar,
            .stats-categories::-webkit-scrollbar,
            .economy-filters::-webkit-scrollbar,
            .stations-filters::-webkit-scrollbar,
            .resources-filters::-webkit-scrollbar,
            .economy-sub-filters::-webkit-scrollbar,
            .infra-filters::-webkit-scrollbar,
            .culture-filters::-webkit-scrollbar,
            .sport-filters::-webkit-scrollbar,
            .population-filters::-webkit-scrollbar {
                display: none;
            }

            /* When search is hidden, move filters up to right below header */
            body.mob-no-search .space-submodes,
            body.mob-no-search .space-filters,
            body.mob-no-search .planet-filters,
            body.mob-no-search .flights-filters,
            body.mob-no-search .ships-filters,
            body.mob-no-search .geography-filters,
            body.mob-no-search .disasters-filters,
            body.mob-no-search .radio-filters,
            body.mob-no-search .money-filters,
            body.mob-no-search .military-filters,
            body.mob-no-search .stats-categories,
            body.mob-no-search .economy-filters,
            body.mob-no-search .stations-filters,
            body.mob-no-search .resources-filters,
            body.mob-no-search .economy-sub-filters,
            body.mob-no-search .infra-filters,
            body.mob-no-search .culture-filters,
            body.mob-no-search .sport-filters,
            body.mob-no-search .population-filters {
                top: 50px !important;
            }

            /* Secondary filter rows (sub-filters under categories) — below primary (86px + ~40px row) */
            .economy-filters.visible,
            .stations-filters.visible,
            .resources-filters.visible,
            .economy-sub-filters.visible,
            .infra-filters.visible,
            .culture-filters.visible,
            .sport-filters.visible,
            .population-filters[style*="block"],
            .space-filters.visible {
                top: 142px !important;
            }

            .space-provider-status {
                top: calc(174px + var(--pw-safe-top)) !important;
                left: calc(10px + var(--pw-safe-left)) !important;
                right: calc(10px + var(--pw-safe-right)) !important;
                max-width: none !important;
                padding: 5px 7px !important;
                z-index: 195 !important;
            }

            .space-provider-status-title {
                font-size: 9px;
            }

            .space-source-pill {
                max-width: 116px;
                padding: 4px 6px;
            }

            body.mode-space .space-submodes,
            body[data-pw-mode="space"] .space-submodes {
                top: 50px !important;
                min-height: 38px !important;
                padding: 5px 8px !important;
            }

            body.mode-space .space-filters.visible,
            body[data-pw-mode="space"] .space-filters.visible {
                top: 96px !important;
                min-height: 38px !important;
                padding: 5px 8px !important;
            }

            body.mode-space .space-provider-status,
            body[data-pw-mode="space"] .space-provider-status {
                top: calc(142px + var(--pw-safe-top)) !important;
                min-height: 34px !important;
                align-items: center !important;
            }

            body.mode-space .space-submode,
            body.mode-space .space-filter,
            body[data-pw-mode="space"] .space-submode,
            body[data-pw-mode="space"] .space-filter {
                min-height: 44px !important;
                padding: 6px 10px !important;
                font-size: 12px !important;
                line-height: 1.1 !important;
            }

            #ship-country-select {
                min-height: 44px;
            }

            body.mode-flights .flights-filters,
            body[data-pw-mode="flights"] .flights-filters {
                left: 8px !important;
                right: 8px !important;
                width: auto !important;
                max-width: none !important;
                flex-wrap: wrap !important;
                overflow-x: hidden !important;
                overflow-y: visible !important;
                align-content: flex-start;
                justify-content: flex-start;
                scroll-snap-type: none;
            }

            body.mode-flights .flights-filter,
            body[data-pw-mode="flights"] .flights-filter {
                flex: 1 1 calc(50% - 6px);
                min-width: 0;
                min-height: 44px !important;
                justify-content: center;
                padding: 8px 10px !important;
                overflow: hidden;
                text-align: center;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            body.mode-flights.flight-radar-active .flights-filters,
            body[data-pw-mode="flights"].flight-radar-active .flights-filters {
                display: none !important;
            }

            body.mob-no-search .economy-filters.visible,
            body.mob-no-search .stations-filters.visible,
            body.mob-no-search .resources-filters.visible,
            body.mob-no-search .economy-sub-filters.visible,
            body.mob-no-search .infra-filters.visible,
            body.mob-no-search .culture-filters.visible,
            body.mob-no-search .sport-filters.visible,
            body.mob-no-search .population-filters[style*="block"],
            body.mob-no-search .space-filters.visible {
                top: 106px !important;
            }

            body.mob-no-search .space-provider-status {
                top: calc(132px + var(--pw-safe-top)) !important;
            }

            body.mob-no-search.mode-space .space-filters.visible,
            body.mob-no-search[data-pw-mode="space"] .space-filters.visible {
                top: 96px !important;
            }

            body.mob-no-search.mode-space .space-provider-status,
            body.mob-no-search[data-pw-mode="space"] .space-provider-status {
                top: calc(142px + var(--pw-safe-top)) !important;
            }

            .space-submode,
            .space-filter,
            .flights-filter,
            .ships-filter,
            .geography-filter,
            .geography-back,
            .geography-date-step,
            .geography-control-group,
            .geography-date-group,
            .geography-source-select,
            .geography-basemap-select,
            .geography-local-select,
            .geography-city-limit,
            .geography-opacity-control,
            .disaster-filter,
            .radio-genre-btn,
            .money-filter,
            .military-filter,
            .stats-category,
            .economy-filter,
            .station-filter,
            .resource-filter,
            .economy-sub-filter,
            .infra-filter,
            .culture-filter,
            .sport-filter,
            .population-filter {
                white-space: nowrap;
                flex-shrink: 0;
                padding: 8px 14px;
                font-size: 12px;
                min-height: 36px;
            }

            .stats-category,
            .economy-filter,
            .station-filter,
            .resource-filter,
            .economy-sub-filter,
            .infra-filter,
            .culture-filter,
            .sport-filter,
            .population-filter {
                min-height: 44px !important;
                height: 44px !important;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                line-height: 1.1;
            }

            body.mode-stats .stats-categories,
            body.mode-stats .economy-filters.visible,
            body.mode-stats .stations-filters.visible,
            body.mode-stats .resources-filters.visible,
            body.mode-stats .economy-sub-filters.visible,
            body.mode-stats .infra-filters.visible,
            body.mode-stats .culture-filters.visible,
            body.mode-stats .sport-filters.visible,
            body[data-pw-mode="stats"] .stats-categories,
            body[data-pw-mode="stats"] .economy-filters.visible,
            body[data-pw-mode="stats"] .stations-filters.visible,
            body[data-pw-mode="stats"] .resources-filters.visible,
            body[data-pw-mode="stats"] .economy-sub-filters.visible,
            body[data-pw-mode="stats"] .infra-filters.visible,
            body[data-pw-mode="stats"] .culture-filters.visible,
            body[data-pw-mode="stats"] .sport-filters.visible {
                background: rgba(7, 8, 16, 0.98) !important;
                backdrop-filter: none !important;
                -webkit-backdrop-filter: none !important;
            }

            .stat-marker {
                max-width: 132px;
                padding: 3px 6px;
                border-radius: 5px;
                opacity: 0.88;
            }

            .stat-marker.stat-marker-passport {
                min-width: 44px;
                min-height: 44px;
                box-sizing: border-box;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
            }

            .stat-country {
                max-width: 116px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                font-size: 8px;
                line-height: 1.1;
            }

            .stat-value {
                font-size: 9px;
                line-height: 1.12;
            }

            .geography-control-group,
            .geography-date-group {
                padding: 4px 6px;
                gap: 6px;
            }

            .geography-source-select {
                min-width: 220px;
                max-width: 76vw;
            }

            .geography-basemap-select {
                min-width: 190px;
            }

            .geography-local-select {
                min-width: 196px;
            }

            .geography-opacity-control input {
                width: 96px;
            }

            .geography-city-limit {
                min-width: 96px;
                max-width: 120px;
            }

            .header .header-right {
                display: none;
            }

            .header .stats {
                position: fixed;
                bottom: 10px;
                left: 10px;
                right: 10px;
                background: rgba(15, 15, 30, 0.95);
                padding: 8px 12px;
                border-radius: 10px;
                font-size: 11px;
                text-align: center;
                backdrop-filter: blur(10px);
                border: 1px solid rgba(255,255,255,0.1);
                z-index: 80;
            }

            /* === 4. SEARCH BELOW HEADER === */
            .search-container {
                position: fixed !important;
                top: 50px !important;
                left: 10px !important;
                right: 10px !important;
                width: auto !important;
                z-index: 10040 !important;
            }

            /* Override all desktop top-shifting classes */
            .search-container.filters-active,
            .search-container.stats-filters-active,
            .search-container.resources-filters-active,
            .search-container.economy-filters-active,
            .search-container.radio-mode-active,
            .search-container.search-left {
                top: 50px !important;
                left: 10px !important;
                right: 10px !important;
            }

            /* In radio/tv modes, keep search full-width */
            .search-container.search-left {
                right: 10px !important;
            }

            .search-input {
                height: 36px;
                font-size: 16px; /* Prevents zoom on iOS */
                padding: 8px 12px;
                padding-left: 35px;
                background: rgba(0, 20, 40, 0.86);
                color: #fff;
            }

            .search-input::placeholder {
                color: rgba(255, 255, 255, 0.9);
            }

            /* Language selector — inside header, lower z-index than filters */
            .lang-selector {
                top: 4px !important;
                right: 10px !important;
                z-index: 9000 !important;
            }

            html[dir="rtl"] .lang-selector {
                right: auto !important;
                left: 10px !important;
            }

            .lang-current {
                padding: 8px 10px;
                min-height: 44px;
                background: rgba(0, 0, 0, 0.8);
                border-radius: 10px;
                border: 1px solid rgba(255,255,255,0.2);
            }

            .lang-current .lang-name {
                display: none;
            }

            .lang-current .lang-flag {
                font-size: 20px;
            }

            .lang-dropdown {
                right: 0;
                min-width: 140px;
            }

            .top-news-btn {
                position: fixed !important;
                top: 56px !important;
                z-index: 95;
                padding: 8px 10px !important;
                font-size: 10px !important;
                left: 10px !important;
                right: auto !important;
            }

            /* === SKELETON LOADING === */
            @keyframes skeletonShimmer {
                0% { background-position: -200px 0; }
                100% { background-position: 200px 0; }
            }
            .skeleton-item {
                display: flex;
                align-items: center;
                gap: 10px;
                padding: 10px 12px;
            }
            .skeleton-circle {
                width: 40px;
                height: 40px;
                border-radius: 50%;
                background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 75%);
                background-size: 400px 100%;
                animation: skeletonShimmer 1.2s ease-in-out infinite;
                flex-shrink: 0;
            }
            .skeleton-lines {
                flex: 1;
                display: flex;
                flex-direction: column;
                gap: 6px;
            }
            .skeleton-line {
                height: 12px;
                border-radius: 6px;
                background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 75%);
                background-size: 400px 100%;
                animation: skeletonShimmer 1.2s ease-in-out infinite;
            }
            .skeleton-line:nth-child(2) { width: 60%; }
            .skeleton-line:nth-child(3) { width: 40%; }

            /* === MOBILE PANEL BACK BUTTON === */
            .mobile-panel-back {
                display: flex;
                align-items: center;
                gap: 8px;
                padding: 14px 16px;
                color: rgba(255,255,255,0.9);
                font-size: 15px;
                font-weight: 500;
                cursor: pointer;
                border-bottom: 1px solid rgba(255,255,255,0.08);
                -webkit-tap-highlight-color: transparent;
            }
            .mobile-panel-back:active {
                background: rgba(255,255,255,0.05);
            }
            .mobile-panel-back svg {
                opacity: 0.7;
            }

            /* === SAFE AREA INSETS === */
            #status-bar {
                padding-bottom: calc(5px + env(safe-area-inset-bottom)) !important;
            }
            .zoom-controls {
                bottom: calc(12px + env(safe-area-inset-bottom)) !important;
            }
            .daynight-toggle {
                bottom: calc(50px + env(safe-area-inset-bottom)) !important;
            }
            body:has(.cookie-banner.visible) .zoom-controls {
                bottom: calc(84px + env(safe-area-inset-bottom)) !important;
            }
            body:has(.cookie-banner.visible) .daynight-toggle {
                bottom: calc(122px + env(safe-area-inset-bottom)) !important;
            }
            #radio-player {
                bottom: calc(40px + env(safe-area-inset-bottom)) !important;
            }
            .tv-player-container {
                bottom: calc(10px + env(safe-area-inset-bottom)) !important;
            }

            /* === SCROLL SNAP ON FILTERS === */
            .space-submodes,
            .space-filters,
            .planet-filters,
            .flights-filters,
            .disasters-filters,
            .ships-filters,
            .geography-filters,
            .weather-filters,
            .radio-filters,
            .stats-filters,
            .economy-filters,
            .stations-filters,
            .resources-filters,
            .infra-filters,
            .culture-filters,
            .sport-filters,
            .economy-sub-filters,
            .tv-category-tabs {
                scroll-snap-type: x proximity;
                scroll-padding: 10px;
            }
            .space-submode,
            .space-filter,
            .planet-filter,
            .flights-filter,
            .disaster-filter,
            .ships-filter,
            .geography-filter,
            .geography-back,
            .geography-date-step,
            .geography-control-group,
            .geography-date-group,
            .geography-source-select,
            .geography-basemap-select,
            .geography-local-select,
            .geography-city-limit,
            .geography-opacity-control,
            .weather-filter,
            .radio-filter,
            .stats-filter,
            .economy-filter,
            .stations-filter,
            .resources-filter,
            .infra-filter,
            .culture-filter,
            .sport-filter,
            .economy-sub-filter,
            .tv-cat-tab {
                scroll-snap-align: start;
            }

            /* === PLANET INFO PANEL MOBILE === */
            .planet-info-panel {
                right: 0 !important;
                bottom: 0 !important;
                left: 0 !important;
                width: 100% !important;
                max-height: 55vh !important;
                border-radius: 20px 20px 0 0 !important;
            }
            .planet-info-panel .panel-drag-handle {
                display: block !important;
            }
            .planet-info-close {
                width: 44px !important;
                height: 44px !important;
                top: 8px !important;
                right: 8px !important;
            }
            .planet-hero-name {
                font-size: 20px !important;
            }
            .planet-preview-canvas {
                width: 120px !important;
                height: 120px !important;
            }
            .planet-facts {
                gap: 6px !important;
                padding: 10px 16px !important;
            }
            .planet-label {
                font-size: 10px !important;
            }

            /* === INFO PANEL FONT SIZES === */
            #ship-info-panel,
            #aircraft-info-panel,
            #disaster-info-panel,
            #port-info-panel,
            #airport-info-panel,
            #spaceport-info-panel,
            #observatory-info-panel {
                font-size: 14px !important;
            }
            #ship-info-panel h3,
            #aircraft-info-panel h3,
            #disaster-info-panel h3,
            #port-info-panel h3,
            #airport-info-panel h3 {
                font-size: 16px !important;
            }

            /* === 3. FULL-SCREEN PANELS === */
            .currency-panel,
            .crypto-panel,
            .stocks-panel,
            .commodities-panel,
            .military-panel,
            .economy-panel,
            .stats-panel,
            .compare-panel,
            .satellite-list-panel,
            .radio-panel,
            .tv-panel,
            .news-panel,
            .top-news-panel,
            .country-stats-panel {
                width: 100vw !important;
                height: 100vh !important;
                max-height: 100vh !important;
                top: 0 !important;
                left: 0 !important;
                right: 0 !important;
                bottom: 0 !important;
                border-radius: 0 !important;
                z-index: 9500 !important;
                transform: translateX(-110vw);
                transition: transform 0.3s ease;
                overflow-y: auto;
                visibility: hidden;
                pointer-events: none;
            }

            .currency-panel.open,
            .currency-panel.visible,
            .crypto-panel.open,
            .crypto-panel.visible,
            .stocks-panel.open,
            .stocks-panel.visible,
            .commodities-panel.open,
            .commodities-panel.visible,
            .military-panel.open,
            .military-panel.visible,
            .economy-panel.open,
            .economy-panel.visible,
            .stats-panel.open,
            .stats-panel.visible,
            .compare-panel.open,
            .compare-panel.visible,
            .satellite-list-panel.open,
            .satellite-list-panel.visible,
            .radio-panel.open,
            .radio-panel.visible,
            .tv-panel.open,
            .tv-panel.visible,
            .news-panel.open,
            .news-panel.visible,
            .top-news-panel.open,
            .top-news-panel.visible,
            .country-stats-panel.visible {
                transform: translateX(0) !important;
                visibility: visible;
                pointer-events: auto;
            }

            body:not(.mode-tv):not([data-pw-mode="tv"]) #tv-panel,
            body:not(.mode-tv):not([data-pw-mode="tv"]) .tv-panel,
            body:not(.mode-radio):not([data-pw-mode="radio"]) #radio-panel,
            body:not(.mode-radio):not([data-pw-mode="radio"]) .radio-panel {
                transform: translateX(-110vw) !important;
                visibility: hidden !important;
                pointer-events: none !important;
            }

            body:not(.mode-tv):not([data-pw-mode="tv"]) .tv-quick-btn,
            body:not(.mode-tv):not([data-pw-mode="tv"]) .tv-cat-tab,
            body:not(.mode-radio):not([data-pw-mode="radio"]) .radio-panel-icon-btn {
                visibility: hidden !important;
                pointer-events: none !important;
            }

            .tv-player-container {
                bottom: 10px;
                left: 10px;
                right: 10px;
                transform: none;
            }

            .tv-video-wrapper {
                width: 100%;
                height: auto;
                aspect-ratio: 16/9;
            }

            .news-panel-header {
                margin: -15px -15px 25px -15px;
                padding: 12px 15px;
                background: linear-gradient(135deg, rgba(0, 100, 150, 0.9) 0%, rgba(0, 50, 100, 0.95) 100%);
                border-bottom: 2px solid rgba(0, 212, 255, 0.5);
            }

            .news-panel-header h2 {
                font-size: 18px;
                font-weight: 600;
            }

            .news-panel-header .flag {
                font-size: 36px;
            }

            .news-item {
                padding: 12px;
                margin-bottom: 10px;
            }

            .news-item .title {
                font-size: 14px;
            }

            .news-item .description {
                font-size: 12px;
                display: -webkit-box;
                -webkit-line-clamp: 3;
                -webkit-box-orient: vertical;
                overflow: hidden;
            }

            /* Close buttons — 44px touch target */
            .close-btn,
            .satellite-list-close,
            .radio-panel-close,
            .tv-panel-close,
            .crypto-panel-close,
            .ship-panel-close,
            .port-panel-close,
            .disaster-close-btn,
            .airport-close,
            .disaster-list-close,
            .iss-live-close {
                min-width: 44px;
                min-height: 44px;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 22px;
            }

            .airport-share,
            .launches-back-btn {
                min-width: 44px;
                min-height: 44px;
            }

            .airport-actions button {
                min-height: 44px;
            }

            /* === 5. HIDE FOOTER ON MOBILE === */
            .site-footer {
                display: none !important;
            }

            /* === 6. TOUCH TARGET ENFORCEMENT === */
            button, .btn, select {
                min-height: 36px;
            }

            .zoom-btn {
                width: 44px;
                height: 44px;
                font-size: 20px;
            }

            .ruler-btn {
                width: 44px;
                height: 44px;
            }

            .zoom-controls {
                bottom: 12px !important;
                right: 10px !important;
            }

            body.mode-ships.ship-info-active .zoom-controls,
            body[data-pw-mode="ships"].ship-info-active .zoom-controls {
                display: none !important;
            }

            #status-bar {
                bottom: 8px !important;
                font-size: 10px !important;
                gap: 6px !important;
                padding: 5px 12px !important;
                white-space: nowrap !important;
                overflow: hidden !important;
                max-width: calc(100vw - 80px) !important;
            }
            .status-update, .status-help { display: none !important; }

            .random-world-btn { top: 6px !important; right: 110px !important; width: 36px !important; height: 36px !important; z-index: 9001 !important; }
            .radio-country-badge { top: 90px !important; right: 10px !important; left: auto !important; z-index: 196 !important; font-size: 12px !important; justify-content: center !important; }

            /* Ship/Flight search containers — hide on mobile */
            .ship-search-container,
            body:not(.mode-flights) .flight-search-container,
            body.mode-flights:not(.flight-submode-airports) .flight-search-container {
                display: none !important;
            }

            body.mode-ships:not(.ships-submode-ports) .ship-search-container.visible,
            body[data-pw-mode="ships"]:not(.ships-submode-ports) .ship-search-container.visible,
            body.mode-ships.ships-submode-ports .ship-search-container.visible,
            body[data-pw-mode="ships"].ships-submode-ports .ship-search-container.visible {
                display: flex !important;
                top: calc(150px + var(--pw-safe-top)) !important;
                left: calc(10px + var(--pw-safe-left)) !important;
                right: calc(10px + var(--pw-safe-right)) !important;
                width: auto !important;
                max-width: none !important;
                max-height: min(52vh, 420px);
                overflow-y: auto;
                box-sizing: border-box;
                padding: 8px !important;
                border: 1px solid rgba(77, 195, 255, 0.22);
                border-radius: 8px;
                background: rgb(8, 13, 20);
                backdrop-filter: blur(16px);
                z-index: 8901 !important;
            }

            body.mode-ships.port-info-mobile-focused .ship-search-container.visible,
            body.mode-ships.port-ships-mobile-focused .ship-search-container.visible,
            body[data-pw-mode="ships"].port-info-mobile-focused .ship-search-container.visible,
            body[data-pw-mode="ships"].port-ships-mobile-focused .ship-search-container.visible {
                display: none !important;
                pointer-events: none !important;
            }

            .ship-mobile-search-toggle {
                display: flex;
                min-width: 44px;
                min-height: 44px;
                align-items: center;
                justify-content: space-between;
                gap: 8px;
                width: 100%;
                padding: 8px 12px;
                border: 1px solid rgba(77, 195, 255, 0.32);
                border-radius: 7px;
                background: rgb(16, 31, 44);
                color: #f2fbff;
                font: inherit;
                font-weight: 700;
            }

            .ship-mobile-search-chevron {
                transition: transform 0.16s ease;
            }

            .ship-search-container.mobile-collapsed {
                right: auto !important;
                width: min(180px, calc(100vw - 20px)) !important;
                max-height: 60px;
                overflow: hidden;
            }

            .ship-search-container.mobile-collapsed #ships-search-fields,
            .ship-search-container.mobile-collapsed #ports-search-fields {
                display: none !important;
            }

            .ship-search-container.mobile-collapsed .ship-mobile-search-chevron {
                transform: rotate(180deg);
            }

            #npp-info-panel.visible {
                top: calc(250px + var(--pw-safe-top, 0px));
                right: calc(10px + var(--pw-safe-right, 0px));
                left: calc(10px + var(--pw-safe-left, 0px));
                width: auto;
                max-height: calc(100vh - 262px - var(--pw-safe-top, 0px) - var(--pw-safe-bottom, 0px));
                z-index: 10036;
            }

            #npp-info-panel .npp-info-header {
                position: sticky;
                top: 0;
                z-index: 1;
            }

            #npp-info-panel .npp-info-close {
                min-width: 44px;
                min-height: 44px;
            }

            body.mode-ships.ships-submode-ports .header,
            body[data-pw-mode="ships"].ships-submode-ports .header {
                z-index: 10040 !important;
            }

            body.mode-ships.ships-submode-ports .ship-search-container.visible,
            body[data-pw-mode="ships"].ships-submode-ports .ship-search-container.visible,
            body.mode-ships.ships-submode-ports .ship-search-container.visible:has(#port-search-suggestions.visible),
            body[data-pw-mode="ships"].ships-submode-ports .ship-search-container.visible:has(#port-search-suggestions.visible) {
                z-index: 10041 !important;
            }

            body.mode-ships:not(.ships-submode-ports) #ships-search-fields,
            body[data-pw-mode="ships"]:not(.ships-submode-ports) #ships-search-fields,
            body.mode-ships.ships-submode-ports #ports-search-fields,
            body[data-pw-mode="ships"].ships-submode-ports #ports-search-fields,
            body.mode-ships.ships-submode-ports #port-search-input,
            body[data-pw-mode="ships"].ships-submode-ports #port-search-input {
                width: 100%;
            }

            body.mode-ships:not(.ships-submode-ports) .ship-water-type-filters,
            body[data-pw-mode="ships"]:not(.ships-submode-ports) .ship-water-type-filters,
            body.mode-ships:not(.ships-submode-ports) .ship-type-filters,
            body[data-pw-mode="ships"]:not(.ships-submode-ports) .ship-type-filters {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 6px;
                margin-bottom: 6px;
            }

            body.mode-ships.ships-submode-ports .port-type-filters,
            body[data-pw-mode="ships"].ships-submode-ports .port-type-filters {
                display: grid;
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 6px;
                margin-bottom: 6px;
            }

            body.mode-ships:not(.ships-submode-ports) .ship-search-row,
            body[data-pw-mode="ships"]:not(.ships-submode-ports) .ship-search-row {
                width: 100%;
            }

            body.mode-ships:not(.ships-submode-ports) #ship-search-input,
            body[data-pw-mode="ships"]:not(.ships-submode-ports) #ship-search-input {
                flex: 1 1 auto;
                width: 100%;
                min-width: 0;
                min-height: 44px;
                border-radius: 8px 0 0 8px;
                background: rgb(16, 24, 32);
                font-size: 16px;
            }

            body.mode-ships:not(.ships-submode-ports) .ship-search-btn,
            body[data-pw-mode="ships"]:not(.ships-submode-ports) .ship-search-btn {
                min-width: 44px;
                min-height: 44px;
            }

            .ship-suggestion-item[data-ship-action="select-ship-suggestion"] {
                min-height: 44px;
                box-sizing: border-box;
                display: flex;
                align-items: center;
            }

            body.mode-ships.ships-submode-ports #port-search-input,
            body[data-pw-mode="ships"].ships-submode-ports #port-search-input {
                min-height: 44px;
                border-radius: 8px;
                background: rgb(16, 24, 32);
                font-size: 16px;
            }

            body.mode-ships.ships-submode-ports #port-search-input::placeholder,
            body[data-pw-mode="ships"].ships-submode-ports #port-search-input::placeholder {
                color: #e2e8f0;
                opacity: 1;
            }

            /* === INFO PANELS — full-width on mobile === */
            #tracking-panel,
            #aircraft-info-panel,
            #ship-info-panel,
            #disaster-info-panel,
            #port-info-panel,
            #airport-info-panel,
            #spaceport-info-panel,
            #observatory-info-panel,
            #airport-flights-panel {
                left: 0 !important;
                right: 0 !important;
                top: auto !important;
                bottom: 0 !important;
                width: 100vw !important;
                max-width: 100vw !important;
                max-height: 40vh !important;
                border-radius: 16px 16px 0 0 !important;
                z-index: 10000 !important;
                overflow-y: auto !important;
            }

            #ship-info-panel {
                bottom: var(--ship-consent-inset, 0px) !important;
                max-height: min(52vh, 430px) !important;
                overflow: hidden !important;
                background: rgba(13, 20, 28, 0.97) !important;
                border: 1px solid rgba(125, 211, 252, 0.24) !important;
                box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.42) !important;
            }

            #ship-info-panel.visible {
                display: flex !important;
            }

            #ship-info-panel .ship-panel-header {
                position: relative;
                z-index: 2;
                flex: 0 0 auto;
            }

            #ship-info-panel .ship-panel-close {
                position: relative;
                z-index: 1;
            }

            #ship-info-panel .ship-panel-content {
                gap: 8px;
                padding: 10px;
                min-height: 0;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }

            #ship-info-panel .ship-photo-credit {
                min-height: 44px;
            }

            #ship-info-panel .ship-panel-route-row a {
                display: inline-flex;
                min-width: 44px;
                min-height: 44px;
                align-items: center;
                justify-content: center;
                padding: 0 6px;
            }

            #ship-info-panel.history-inspection {
                max-height: 190px !important;
            }

            #ship-info-panel.history-inspection .ship-panel-content {
                overflow: hidden;
            }

            #ship-info-panel.history-inspection .ship-panel-content > :not(.ship-panel-history) {
                display: none !important;
            }

            body.ship-history-inspection-active #ship-search-container.visible {
                display: none !important;
            }

            #ship-info-panel .ship-panel-hero {
                grid-template-columns: 104px minmax(0, 1fr);
                gap: 10px;
            }

            #ship-info-panel .ship-panel-photo,
            #ship-info-panel .ship-panel-photo img,
            #ship-info-panel .ship-photo-placeholder {
                min-height: 82px;
            }

            #ship-info-panel .ship-panel-name {
                font-size: 18px;
            }

            #ship-info-panel .ship-panel-specs {
                grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: 6px;
            }

            #ship-info-panel .ship-panel-spec {
                min-height: 54px;
                padding: 8px 6px;
                display: grid;
                gap: 2px;
            }

            #ship-info-panel .ship-panel-spec-icon {
                font-size: 15px;
                min-width: 0;
                text-align: left;
            }

            #ship-info-panel .ship-panel-spec-value {
                font-size: 13px;
            }

            #disaster-info-panel {
                background: #34495e !important;
            }

            body.mode-disasters #disaster-info-panel,
            body[data-pw-mode="disasters"] #disaster-info-panel {
                flex-direction: column;
                overflow: hidden !important;
                box-shadow: none !important;
                backdrop-filter: none !important;
                -webkit-backdrop-filter: none !important;
            }

            body.mode-disasters #disaster-info-panel.visible,
            body[data-pw-mode="disasters"] #disaster-info-panel.visible {
                display: flex !important;
            }

            body.mode-disasters #disaster-info-panel .disaster-mobile-detail-nav,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-mobile-detail-nav {
                display: grid;
                grid-template-columns: 44px minmax(0, 1fr) 44px;
                align-items: center;
                gap: 8px;
                flex: 0 0 auto;
                min-height: calc(52px + env(safe-area-inset-bottom, 0px));
                padding: 4px 12px calc(4px + env(safe-area-inset-bottom, 0px));
                border-top: 1px solid rgba(255,255,255,0.12);
                background: rgba(8, 18, 28, 0.88);
            }

            body.mode-disasters #disaster-info-panel .disaster-mobile-detail-nav button,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-mobile-detail-nav button {
                width: 44px;
                height: 44px;
                border: 1px solid rgba(255,255,255,0.14);
                border-radius: 8px;
                background: rgba(255,255,255,0.08);
                color: #fff;
                font-size: 20px;
                cursor: pointer;
            }

            body.mode-disasters #disaster-info-panel .disaster-mobile-detail-nav span,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-mobile-detail-nav span {
                min-width: 0;
                color: rgba(255,255,255,0.76);
                font-size: 12px;
                font-weight: 800;
                text-align: center;
                white-space: nowrap;
            }

            body.mode-disasters #disaster-info-panel .panel-drag-handle,
            body[data-pw-mode="disasters"] #disaster-info-panel .panel-drag-handle,
            body.mode-disasters #disaster-info-panel .disaster-header,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-header {
                flex: 0 0 auto;
            }

            body.mode-disasters #disaster-info-panel .disaster-header,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-header {
                min-height: 52px;
                padding: 4px 12px;
            }

            body.mode-disasters #disaster-info-panel .disaster-title,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-title {
                min-width: 0;
                font-size: 16px;
                line-height: 1.12;
            }

            body.mode-disasters #disaster-info-panel .disaster-title .icon,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-title .icon {
                font-size: 18px;
            }

            body.mode-disasters #disaster-info-panel .disaster-content,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-content {
                display: flex;
                flex-direction: column;
                flex: 1 1 auto;
                min-height: 0;
                overflow-y: auto;
                overscroll-behavior: contain;
                -webkit-overflow-scrolling: touch;
                padding: 8px 12px calc(18px + env(safe-area-inset-bottom, 0px));
            }

            body.mode-disasters #disaster-info-panel .disaster-magnitude,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-magnitude {
                order: 1;
                flex: 0 0 auto;
                padding: 5px 0;
                font-size: 24px;
                line-height: 1.1;
            }

            body.mode-disasters #disaster-info-panel .disaster-alert-row,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-alert-row {
                order: 2;
                flex: 0 0 auto;
                gap: 5px;
                padding: 5px 0;
            }

            body.mode-disasters #disaster-info-panel .disaster-impact,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-impact {
                order: 3;
                flex: 0 0 auto;
                display: block;
                overflow: visible;
                padding: 7px 0;
                font-size: 12px;
                line-height: 1.38;
            }

            body.mode-disasters #disaster-info-panel .disaster-news-section,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-news-section {
                order: 4;
                flex: 0 0 auto;
                margin-top: 6px;
                padding-top: 6px;
            }

            body.mode-disasters #disaster-info-panel .disaster-info-row,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-info-row,
            body.mode-disasters #disaster-info-panel .disaster-link,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-link,
            body.mode-disasters #disaster-info-panel .disaster-details-toggle,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-details-toggle,
            body.mode-disasters #disaster-info-panel .disaster-details-body,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-details-body {
                order: 5;
            }

            body.mode-disasters #disaster-info-panel .disaster-info-row,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-info-row {
                padding: 6px 0;
            }

            body.mode-disasters #disaster-info-panel .disaster-news-title,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-news-title {
                margin-bottom: 6px;
                font-size: 13px;
            }

            body.mode-disasters #disaster-info-panel .disaster-news-item,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-news-item {
                padding: 8px 10px;
                margin-bottom: 5px;
            }

            body.mode-disasters #disaster-info-panel .disaster-details-toggle,
            body[data-pw-mode="disasters"] #disaster-info-panel .disaster-details-toggle {
                min-height: 44px;
                padding: 0;
                align-items: center;
            }

            #aircraft-info-panel {
                background: #1f2937 !important;
            }

            #airport-info-panel {
                background: #0b3a5a !important;
            }

            body.airport-info-mobile-focused #airport-info-panel.visible {
                display: block !important;
                max-height: 52vh !important;
                z-index: 10020 !important;
            }

            body.airport-info-mobile-focused #airport-flights-panel.visible {
                display: none !important;
                pointer-events: none !important;
            }

            .airport-flights-open-btn {
                display: flex;
                width: 100%;
                min-height: 44px;
                align-items: center;
                justify-content: center;
                gap: 8px;
                border: 1px solid rgba(255, 255, 255, 0.28);
                border-radius: 10px;
                background: rgba(0, 0, 0, 0.22);
                color: #fff;
                font: inherit;
                font-weight: 800;
            }

            .airport-overview-back {
                display: flex;
                min-width: 44px;
                min-height: 44px;
                align-items: center;
                justify-content: center;
                border: 0;
                border-radius: 8px;
                background: rgba(0, 0, 0, 0.18);
                color: #fff;
                font-size: 22px;
            }

            body.airport-flights-mobile-focused #airport-info-panel {
                display: none !important;
            }

            body.airport-flights-mobile-focused #airport-flights-panel.visible {
                display: block !important;
                max-height: 52vh !important;
                z-index: 10020 !important;
            }

            #port-ships-panel.visible {
                left: 10px !important;
                right: 10px !important;
                top: auto !important;
                bottom: calc(40vh + 12px + env(safe-area-inset-bottom)) !important;
                width: auto !important;
                max-width: calc(100vw - 20px) !important;
                height: min(180px, 26vh) !important;
                max-height: min(180px, 26vh) !important;
                border-radius: 16px !important;
                z-index: 9999 !important;
                overflow: hidden !important;
                background: #5b2500 !important;
            }

            body.port-info-mobile-focused #port-ships-panel.visible {
                display: none !important;
                pointer-events: none !important;
            }

            body.port-info-mobile-focused #port-info-panel.visible {
                z-index: 8998 !important;
            }

            body.port-info-mobile-focused .zoom-controls,
            body.port-ships-mobile-focused .zoom-controls {
                display: none !important;
                pointer-events: none !important;
            }

            .port-ships-open-btn {
                display: flex;
                width: 100%;
                min-height: 44px;
                align-items: center;
                justify-content: center;
                gap: 8px;
                border: 1px solid rgba(255, 255, 255, 0.28);
                border-radius: 10px;
                background: #6a2b00;
                color: #fff;
                font: inherit;
                font-weight: 800;
            }

            .port-ships-back {
                display: flex;
                min-width: 44px;
                min-height: 44px;
                align-items: center;
                justify-content: center;
                border: 0;
                border-radius: 8px;
                background: rgba(0, 0, 0, 0.18);
                color: #fff;
                font-size: 22px;
            }

            body.port-ships-mobile-focused #port-info-panel.visible {
                display: none !important;
            }

            body.port-ships-mobile-focused #port-ships-panel.visible {
                display: flex !important;
                flex-direction: column;
                bottom: env(safe-area-inset-bottom) !important;
                height: min(52vh, 430px) !important;
                max-height: min(52vh, 430px) !important;
                z-index: 10000 !important;
            }

            #port-ships-panel .port-ships-header {
                min-height: 56px;
                padding: 8px 14px;
                border-radius: 16px 16px 0 0 !important;
            }

            #port-ships-panel .port-ships-header > span {
                min-width: 0;
                flex: 1;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            #port-ships-panel .port-ships-tabs {
                padding: 8px 10px;
                gap: 8px;
            }

            #port-ships-panel .port-tab,
            .disaster-sort-btn {
                min-height: 44px;
            }

            #port-ships-panel .port-tab {
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 13px;
            }

            #port-ships-panel .port-ships-list {
                max-height: 64px;
                overflow-y: auto;
            }

            body.port-ships-mobile-focused #port-ships-panel .port-ships-list {
                flex: 1 1 auto;
                min-height: 0;
                max-height: none;
            }

            /* Disaster sidebar → bottom sheet on mobile */
            body.mode-disasters #disaster-list-panel,
            body[data-pw-mode="disasters"] #disaster-list-panel {
                left: 10px !important;
                right: 10px !important;
                top: auto !important;
                bottom: 0 !important;
                width: auto !important;
                max-width: calc(100vw - 20px) !important;
                height: min(320px, 42dvh) !important;
                max-height: min(320px, 42dvh) !important;
                border-radius: 16px 16px 0 0 !important;
                z-index: 100020 !important;
                overflow: hidden !important;
            }

            body.mode-disasters.disaster-list-open .mode-data-status,
            body[data-pw-mode="disasters"].disaster-list-open .mode-data-status {
                display: none !important;
            }

            body.mode-disasters.disaster-list-open .daynight-toggle,
            body[data-pw-mode="disasters"].disaster-list-open .daynight-toggle,
            body.mode-disasters.disaster-list-open .zoom-controls,
            body[data-pw-mode="disasters"].disaster-list-open .zoom-controls {
                display: none !important;
                pointer-events: none !important;
            }

            body.meteors-panel-open .daynight-toggle,
            body.meteors-panel-open .zoom-controls {
                display: none !important;
                pointer-events: none !important;
            }

            body.mode-disasters.disaster-list-open .disasters-filters,
            body[data-pw-mode="disasters"].disaster-list-open .disasters-filters {
                display: none !important;
                visibility: hidden !important;
                pointer-events: none !important;
            }
            #launches-panel,
            #meteors-panel {
                left: 0 !important;
                right: 0 !important;
                top: auto !important;
                bottom: 0 !important;
                width: 100vw !important;
                max-width: 100vw !important;
                max-height: 45vh !important;
                border-radius: 16px 16px 0 0 !important;
                z-index: 10000 !important;
            }
            #disaster-list-panel.collapsed,
            #launches-panel.collapsed,
            #meteors-panel.collapsed {
                transform: translateY(100%) !important;
            }
            #disaster-list-panel .disaster-list-header,
            #launches-panel .launches-header,
            #meteors-panel .meteors-header {
                border-radius: 16px 16px 0 0 !important;
            }
            /* Collapsed tab → bottom pill on mobile */
            #disaster-list-tab,
            #launches-tab,
            #meteors-tab {
                top: auto !important;
                bottom: 8px !important;
                left: 50% !important;
                transform: translateX(-50%) !important;
                width: 48px !important;
                height: 44px !important;
                border-radius: 22px !important;
                font-size: 14px !important;
                z-index: 9999 !important;
            }
            #disaster-list-tab:hover,
            #launches-tab:hover,
            #meteors-tab:hover {
                width: 48px !important;
            }

            /* Tracking panel at top on mobile */
            #tracking-panel {
                top: 48px !important;
                bottom: auto !important;
                max-height: calc(50vh - 48px) !important;
                border-radius: 0 !important;
                overflow-y: auto !important;
            }

            /* Tooltips constrained to viewport */
            .quake-tooltip,
            .disaster-tooltip,
            .flight-tooltip {
                max-width: calc(100vw - 20px) !important;
                left: 10px !important;
                right: 10px !important;
                top: auto !important;
                bottom: 60px !important;
            }

            /* Index info panel mobile */
            .index-info-panel {
                left: 10px !important;
                right: 10px !important;
                width: auto !important;
                max-width: none !important;
                padding-right: 58px !important;
            }

            /* Country stats panel above filters */
            .country-stats-panel.visible {
                z-index: 9600 !important;
            }

            .tooltip {
                display: none !important;
            }

            /* Drag handle for swipe-to-dismiss */
            .panel-drag-handle {
                display: block;
                width: 36px;
                height: 4px;
                background: rgba(255,255,255,0.3);
                border-radius: 2px;
                margin: 8px auto 4px;
            }

            /* Flight legend compact on mobile */
            #flight-legend.visible {
                flex-wrap: wrap;
                gap: 6px 12px;
                padding: 6px 12px;
                font-size: 11px;
                max-width: calc(100vw - 20px);
                justify-content: center;
                bottom: 70px;
            }
            #flight-legend .legend-item span {
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                max-width: 120px;
            }
        }

        /* Drag handle hidden on desktop */
        .panel-drag-handle {
            display: none;
        }

        @media (max-width: 900px) {
            .panel-drag-handle {
                display: block;
            }

            #ship-tracking-panel {
                right: 62px;
                bottom: calc(10px + env(safe-area-inset-bottom));
                left: 10px;
                grid-template-columns: 30px minmax(0, 1fr) 44px 44px;
                width: auto;
                min-height: 56px;
                transform: none;
            }

            body.ship-tracking-active .zoom-controls {
                display: none !important;
            }
        }

        /* Landscape mode on mobile */
        @media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
            .header {
                min-height: 40px !important;
                max-height: 40px !important;
            }
            .search-container {
                top: 42px !important;
            }
            .search-container.filters-active,
            .search-container.stats-filters-active,
            .search-container.resources-filters-active,
            .search-container.economy-filters-active,
            .search-container.radio-mode-active,
            .search-container.search-left {
                top: 42px !important;
            }
            .search-input {
                height: 30px;
            }
            /* Filters row — right below header */
            .space-submodes,
            .space-filters,
            .planet-filters,
            .flights-filters,
            .disasters-filters,
            .ships-filters,
            .geography-filters,
            .weather-filters,
            .radio-filters,
            .stats-filters {
                top: 74px !important;
                padding: 4px 10px !important;
            }
            /* Secondary filters */
            .economy-filters.visible,
            .stations-filters.visible,
            .resources-filters.visible,
            .economy-sub-filters.visible,
            .infra-filters.visible,
            .culture-filters.visible,
            .sport-filters.visible {
                top: 134px !important;
            }
            /* Panels — 50% width in landscape instead of full-screen */
            .tv-panel,
            .radio-panel {
                width: 50vw !important;
                height: 100vh !important;
            }
            /* Info panels — shorter in landscape */
            #tracking-panel,
            #aircraft-info-panel,
            #ship-info-panel,
            #disaster-info-panel,
            #port-info-panel,
            #airport-info-panel {
                max-height: 40vh !important;
            }
            /* Hide back button label in landscape to save space */
            .mobile-panel-back span {
                display: none;
            }
            .mobile-panel-back {
                padding: 10px 16px;
            }
            .zoom-controls {
                bottom: 8px !important;
            }
            body.mode-flights.flight-tracking-active:has(.cookie-banner.visible) .flight-detail-drawer,
            body[data-pw-mode="flights"].flight-tracking-active:has(.cookie-banner.visible) .flight-detail-drawer {
                top: calc(128px + env(safe-area-inset-top, 0px)) !important;
                max-height: calc(100vh - 136px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
            }
            #status-bar {
                bottom: 4px !important;
                font-size: 9px !important;
            }

            .site-footer {
                display: none !important;
            }

            .mode-data-status:not(.mode-data-status--media-panel) {
                top: auto !important;
                bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
                left: calc(50% + 8px) !important;
                right: calc(70px + env(safe-area-inset-right, 0px)) !important;
                width: auto !important;
                max-width: none !important;
                transform: none !important;
            }

            body.mode-space .mode-data-status:not(.mode-data-status--media-panel),
            body[data-pw-mode="space"] .mode-data-status:not(.mode-data-status--media-panel) {
                bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
            }
        }

        /* Small phones */
        @media (max-width: 480px) {
            .search-icon {
                left: 10px;
                font-size: 14px;
            }

            .search-results {
                max-height: 250px;
            }

            .search-result-item {
                padding: 10px 12px;
            }

            .search-result-item .flag {
                font-size: 20px;
            }

            .news-item {
                margin-bottom: 8px;
            }

            .news-item .news-image,
            .news-item .news-image-placeholder {
                width: 90px;
                min-width: 90px;
                height: 80px;
            }

            .news-item .news-content {
                padding: 8px 10px;
            }

            @media (max-width: 360px) {
                .app-brand-title {
                    display: none;
                }
            }

            .news-item .source {
                font-size: 10px;
            }

            .news-item .title {
                font-size: 12px;
                -webkit-line-clamp: 2;
            }

            .news-item .description {
                display: none;
            }

            .news-item .meta {
                font-size: 10px;
                gap: 8px;
            }

            .top-news-item .news-thumb,
            .top-news-item .news-thumb-placeholder {
                width: 60px;
                min-width: 60px;
                height: 55px;
            }

            .top-news-item .news-info {
                padding: 6px 8px;
            }

            .top-news-item .news-title {
                font-size: 11px;
            }
        }

        /* Landscape mobile */
        @media (max-height: 500px) and (orientation: landscape) {
            .news-item .description {
                display: none;
            }
        }

        /* Timeline slider for stats */
        .timeline-container {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            width: 80%;
            max-width: 600px;
            background: rgba(15, 15, 30, 0.95);
            border-radius: 16px;
            padding: 15px 25px;
            backdrop-filter: blur(15px);
            border: 1px solid rgba(100, 120, 150, 0.3);
            z-index: 500;
            display: none;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        }

        .timeline-container.visible {
            display: block;
        }

        .timeline-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .timeline-title {
            color: #00d4ff;
            font-size: 13px;
            font-weight: 600;
        }

        .timeline-year {
            color: #fff;
            font-size: 24px;
            font-weight: 700;
        }

        .timeline-slider {
            width: 100%;
            height: 8px;
            -webkit-appearance: none;
            appearance: none;
            background: linear-gradient(90deg, rgba(100, 100, 100, 0.3) 0%, rgba(100, 100, 100, 0.3) 100%);
            border-radius: 4px;
            outline: none;
            cursor: pointer;
        }

        .timeline-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
            cursor: pointer;
            box-shadow: 0 2px 10px rgba(0, 212, 255, 0.5);
            transition: transform 0.2s;
        }

        .timeline-slider::-webkit-slider-thumb:hover {
            transform: scale(1.2);
        }

        .timeline-slider::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 10px rgba(0, 212, 255, 0.5);
        }

        .timeline-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 8px;
            font-size: 10px;
            color: #888;
        }

        .timeline-info {
            text-align: center;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: #ccc;
            font-size: 12px;
        }

        .timeline-info .highlight {
            color: #00d4ff;
            font-weight: 600;
        }

        @media (max-width: 768px) {
            .timeline-container {
                width: 95%;
                bottom: 70px;
                padding: 12px 15px;
            }

            .timeline-year {
                font-size: 20px;
            }
        }


        /* Mini-bars for dismissed tracking/aircraft panels (mobile only) */
        .tracking-mini-bar, .aircraft-mini-bar {
            display: none;
            position: fixed;
            left: 0; right: 0;
            height: 36px;
            background: rgba(231, 76, 60, 0.9);
            backdrop-filter: blur(10px);
            color: #fff;
            font-size: 12px;
            z-index: 199;
            align-items: center;
            justify-content: center;
            gap: 8px;
            cursor: pointer;
        }
        .tracking-mini-bar {
            top: 122px;
        }
        .aircraft-mini-bar {
            bottom: 0;
            background: rgba(52, 73, 94, 0.9);
            border-radius: 12px 12px 0 0;
        }
        @media (max-width: 768px) {
            .tracking-mini-bar.visible { display: flex; }
            .aircraft-mini-bar.visible { display: flex; }
        }


/* ========== Footer, Modals & Settings CSS ========== */

        .feedback-modal {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.7);
            z-index: 12000;
            align-items: center;
            justify-content: center;
        }
        .feedback-modal.visible { display: flex; }
        .feedback-modal-content {
            background: rgba(18, 18, 18, 0.98);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 16px;
            border: 1px solid rgba(255,255,255,0.1);
            padding: 24px;
            max-width: 420px;
            width: 90%;
            color: white;
            box-shadow: 0 8px 32px rgba(0,0,0,0.5);
        }
        .feedback-modal-content h3 {
            margin: 0 0 8px 0;
            font-size: 18px;
        }
        .feedback-modal-close {
            position: absolute;
            top: 12px; right: 16px;
            background: none;
            border: none;
            color: rgba(255,255,255,0.5);
            font-size: 22px;
            cursor: pointer;
        }
        .feedback-modal-content { position: relative; }

        /* Unified responsive footer */
        .site-footer {
            position: fixed;
            bottom: 12px;
            left: 50%;
            transform: translateX(-50%);
            width: max-content;
            max-width: calc(100vw - 180px);
            box-sizing: border-box;
            background: rgba(0, 0, 0, 0.5);
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.6);
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 8px;
            z-index: 50;
            backdrop-filter: blur(5px);
        }
        .site-footer-actions,
        .site-footer-links {
            position: static;
            inset: auto;
            transform: none;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 8px;
            min-width: 0;
            padding: 0;
            background: transparent;
            border-radius: 0;
            backdrop-filter: none;
            color: inherit;
            font: inherit;
        }
        .site-footer-actions {
            flex: 0 0 auto;
            flex-wrap: nowrap;
            white-space: nowrap;
        }
        .site-footer-links {
            flex: 1 1 680px;
        }
        #status-bar:empty,
        #status-bar:empty + .site-footer-section-divider {
            display: none;
        }
        body:has(.cookie-banner.visible) .site-footer {
            display: none;
        }
        .site-footer a,
        .site-footer button {
            color: rgba(0, 230, 255, 0.8);
            text-decoration: none;
            white-space: nowrap;
        }
        .site-footer button {
            border: 0;
            background: transparent;
            padding: 0;
            font: inherit;
            cursor: pointer;
        }
        .site-footer a:hover,
        .site-footer button:hover {
            color: #00e6ff;
        }
        .status-item {
            display: flex;
            align-items: center;
            gap: 5px;
            min-height: 0;
            padding: 0;
            border: 0;
            background: transparent;
            color: inherit;
            font: inherit;
            cursor: pointer;
        }
        .status-item:hover { color: #fff; }
        .status-item:focus-visible {
            outline: 2px solid rgba(92, 225, 255, 0.9);
            outline-offset: 3px;
            border-radius: 3px;
        }
        .status-about {
            color: rgba(0, 230, 255, 0.86);
        }
        .status-donate {
            color: #f39c12;
        }
        .status-divider {
            color: rgba(255, 255, 255, 0.28);
            font-size: 10px;
        }
        body.flight-tracking-active .site-footer,
        body.ship-tracking-active .site-footer,
        body:has(#tracking-panel.visible) .site-footer,
        body:has(#aircraft-info-panel.visible) .site-footer,
        body:has(#ship-info-panel.visible) .site-footer,
        body:has(#airport-info-panel.visible) .site-footer,
        body:has(#port-info-panel.visible) .site-footer,
        body:has(#disaster-info-panel.visible) .site-footer,
        body.weather-forecast-open .site-footer,
        body:has(.weather-city-panel) .site-footer,
        body:has(.weather-forecast-panel) .site-footer,
        body:has(#spaceport-info-panel.visible) .site-footer,
        body:has(#observatory-info-panel.visible) .site-footer,
        body:has(#satellite-list-panel.open) .site-footer,
        body.has-catalog-panel .site-footer,
        body.has-catalog-legend .site-footer,
        body:has(#catalog-selected-panel[style*="display: block"]) .site-footer,
        body:has(#iss-player.visible) .site-footer,
        body:has(#radio-panel.open) .site-footer,
        body:has(#radio-player.visible) .site-footer,
        body:has(#tv-panel.open) .site-footer,
        body:has(#tv-player.visible) .site-footer {
            display: none;
        }
        .footer-divider {
            opacity: 0.4;
        }
        .footer-data {
            opacity: 0.5;
            font-size: 10px;
        }
        @media (max-width: 768px) {
            .site-footer {
                display: none !important;
            }
        }

        /* Disclaimer Modal */
        .disclaimer-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 10000;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(5px);
        }
        .disclaimer-modal.visible {
            display: flex;
        }
        .disclaimer-content {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border: 1px solid rgba(0, 230, 255, 0.3);
            border-radius: 16px;
            padding: 24px;
            max-width: 600px;
            max-height: 80vh;
            overflow-y: auto;
            position: relative;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        }
        .disclaimer-content h3 {
            margin: 0 0 16px 0;
            color: #00e6ff;
            font-size: 18px;
        }
        .disclaimer-text {
            color: rgba(255, 255, 255, 0.85);
            font-size: 13px;
            line-height: 1.6;
        }
        .disclaimer-text p {
            margin: 0 0 12px 0;
        }
        .disclaimer-sources {
            margin-top: 16px;
            padding-top: 12px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.5);
            font-size: 11px;
        }
        .disclaimer-close {
            position: absolute;
            top: 12px;
            right: 12px;
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.6);
            font-size: 20px;
            cursor: pointer;
            padding: 4px 8px;
        }
        .disclaimer-close:hover {
            color: #ff4444;
        }

        /* Donate Modal */
        .donate-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 100003;
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .donate-modal.visible {
            display: flex;
            opacity: 1;
        }
        .donate-content {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            border-radius: 16px;
            padding: 28px;
            max-width: 480px;
            width: 95%;
            max-height: 90vh;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            position: relative;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }
        .donate-content h3 {
            margin: 0 0 8px 0;
            color: #fff;
            font-size: 22px;
            text-align: center;
        }
        .donate-subtitle {
            color: rgba(255, 255, 255, 0.6);
            text-align: center;
            margin: 0 0 24px 0;
            font-size: 14px;
        }
        .donate-close {
            position: absolute;
            top: 12px;
            right: 12px;
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.5);
            font-size: 28px;
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s;
        }
        .donate-close:hover {
            color: #ff4444;
            background: rgba(255, 68, 68, 0.1);
        }
        .donate-crypto-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }
        @media (max-width: 500px) {
            .donate-crypto-grid {
                grid-template-columns: 1fr;
            }
        }
        .crypto-qr-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .crypto-qr-item:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }
        .crypto-qr-item:active {
            transform: scale(0.98);
        }
        .crypto-qr-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
            padding: 6px 12px;
            border-radius: 8px;
            width: 100%;
            justify-content: center;
        }
        .crypto-qr-header.btc {
            background: linear-gradient(135deg, #f7931a 0%, #e2820a 100%);
        }
        .crypto-qr-header.eth {
            background: linear-gradient(135deg, #627eea 0%, #4a65d1 100%);
        }
        .crypto-qr-header.usdt {
            background: linear-gradient(135deg, #26a17b 0%, #1a8f6a 100%);
        }
        .crypto-qr-header.ton {
            background: linear-gradient(135deg, #0098EA 0%, #0077CC 100%);
        }
        .crypto-qr-icon {
            font-weight: bold;
            font-size: 12px;
            color: #fff;
        }
        .crypto-qr-name {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.9);
        }
        .crypto-qr-code {
            width: 120px;
            height: 120px;
            border-radius: 8px;
            background: #1a1a2e;
        }
        .crypto-qr-address {
            color: rgba(255, 255, 255, 0.5);
            font-size: 10px;
            font-family: monospace;
            margin-top: 8px;
        }
        .crypto-qr-copy {
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.8);
            padding: 6px 16px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 500;
            margin-top: 8px;
            transition: all 0.2s;
        }
        .crypto-qr-item:hover .crypto-qr-copy {
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
        }
        .crypto-qr-copy.copied {
            background: #26a17b;
            color: #fff;
        }
        .donate-thanks {
            text-align: center;
            color: rgba(255, 255, 255, 0.4);
            font-size: 13px;
            margin: 20px 0 0 0;
        }
        .donate-link {
            background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #9b59b6, #ff6b6b);
            background-size: 300% 300%;
            animation: donateGradient 4s ease infinite;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 10px;
            position: relative;
        }
        .donate-link::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #9b59b6, #ff6b6b);
            background-size: 300% 300%;
            animation: donateGradient 4s ease infinite;
            border-radius: 10px;
            opacity: 0.15;
            z-index: -1;
        }
        .donate-link:hover {
            animation: donateGradient 1.5s ease infinite;
            transform: scale(1.05);
        }
        .donate-link:hover::before {
            opacity: 0.3;
            animation: donateGradient 1.5s ease infinite;
        }
        @keyframes donateGradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        /* About Modal */
        .about-modal {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 100003;
            align-items: center;
            justify-content: center;
            padding: 18px;
            background: rgba(0, 0, 0, 0.78);
            opacity: 0;
            transition: opacity 0.25s ease;
        }

        .about-modal.visible {
            display: flex;
            opacity: 1;
        }

        .about-content {
            position: relative;
            width: min(760px, 96vw);
            max-height: min(86vh, 760px);
            overflow-y: auto;
            padding: 24px;
            border: 1px solid rgba(92, 225, 255, 0.18);
            border-radius: 16px;
            background: linear-gradient(135deg, rgba(11, 18, 30, 0.98), rgba(20, 30, 54, 0.98));
            color: #fff;
            box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
            -webkit-overflow-scrolling: touch;
        }

        .about-content h3 {
            margin: 0 36px 6px 0;
            font-size: 24px;
            line-height: 1.15;
        }

        .about-subtitle {
            margin: 0 0 18px;
            color: rgba(255, 255, 255, 0.62);
            font-size: 14px;
            line-height: 1.45;
        }

        .about-close {
            position: absolute;
            top: 12px;
            right: 12px;
            display: grid;
            place-items: center;
            width: 36px;
            height: 36px;
            border: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.82);
            font-size: 26px;
            cursor: pointer;
        }

        .about-close:hover {
            background: rgba(255, 255, 255, 0.14);
            color: #fff;
        }

        .about-section {
            padding: 16px 0;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
        }

        .about-section h4 {
            margin: 0 0 10px;
            color: rgba(255, 255, 255, 0.92);
            font-size: 13px;
            font-weight: 950;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .about-section p {
            margin: 0;
            color: rgba(255, 255, 255, 0.78);
            font-size: 14px;
            line-height: 1.55;
        }

        .about-story {
            display: grid;
            gap: 18px;
            max-width: 70ch;
        }

        .about-story-block h5 {
            margin: 0 0 6px;
            color: #8ce8ff;
            font-size: 15px;
            font-weight: 800;
            line-height: 1.3;
        }

        .about-story-block p {
            text-indent: 0;
            line-height: 1.68;
            text-wrap: pretty;
        }

        .about-mode-counts {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
        }

        .about-mode-count {
            min-width: 0;
            padding: 9px 10px;
            border: 1px solid rgba(140, 232, 255, 0.16);
            border-radius: 9px;
            background: rgba(7, 23, 38, 0.72);
        }

        .about-mode-count strong,
        .about-mode-count span {
            display: block;
        }

        .about-mode-count strong {
            color: #fff;
            font-size: 13px;
        }

        .about-mode-count span {
            margin-top: 2px;
            color: rgba(255, 255, 255, 0.68);
            font-size: 11px;
        }

        @media (max-width: 620px) {
            .about-mode-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        }

        .about-link-grid,
        .about-mentions-list {
            display: grid;
            gap: 9px;
        }

        .about-link-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .about-link-grid a,
        .about-mentions-list a {
            display: block;
            min-width: 0;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            padding: 10px 11px;
            background: rgba(255, 255, 255, 0.055);
            color: #fff;
            text-decoration: none;
            transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
        }

        .about-link-grid a:hover,
        .about-mentions-list a:hover {
            transform: translateY(-1px);
            border-color: rgba(92, 225, 255, 0.28);
            background: rgba(92, 225, 255, 0.1);
        }

        .about-link-grid strong,
        .about-mentions-list strong,
        .about-link-grid span,
        .about-mentions-list span {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .about-link-grid strong,
        .about-mentions-list strong {
            font-size: 13px;
            line-height: 1.25;
        }

        .about-link-grid span,
        .about-mentions-list span {
            margin-top: 4px;
            color: rgba(255, 255, 255, 0.56);
            font-size: 12px;
            line-height: 1.3;
        }

        .about-mentions-list a {
            padding: 11px 12px;
        }

        @media (max-width: 768px) {
            .about-content {
                width: min(440px, calc(100vw - 20px));
                max-height: min(82vh, 720px);
                padding: 20px 14px 16px;
                border-radius: 14px;
            }

            .about-content h3 {
                font-size: 21px;
            }

            .about-story {
                gap: 15px;
            }

            .about-story-block h5 {
                font-size: 14px;
            }

            .about-story-block p {
                font-size: 13.5px;
                line-height: 1.62;
                text-indent: 1.2em;
            }

            .about-link-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Donate Banner */
        .donate-banner {
            position: fixed;
            bottom: 60px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: rgba(20, 20, 40, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 16px 20px;
            z-index: 10000;
            display: flex;
            align-items: center;
            gap: 14px;
            max-width: 420px;
            width: calc(100% - 32px);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
            opacity: 0;
            transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
        }
        .donate-banner.visible {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }
        .donate-banner-icon {
            font-size: 28px;
            flex-shrink: 0;
        }
        .donate-banner-text {
            flex: 1;
            color: rgba(255, 255, 255, 0.85);
            font-size: 13px;
            line-height: 1.5;
        }
        .donate-banner-text strong {
            color: #fff;
        }
        .donate-banner-btn {
            flex-shrink: 0;
            background: linear-gradient(135deg, #f39c12, #e67e22);
            color: #fff;
            border: none;
            border-radius: 10px;
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            white-space: nowrap;
        }
        .donate-banner-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
        }
        .donate-banner-close {
            position: absolute;
            top: 6px;
            right: 10px;
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.3);
            font-size: 16px;
            cursor: pointer;
            padding: 2px 6px;
            line-height: 1;
        }
        .donate-banner-close:hover {
            color: rgba(255, 255, 255, 0.7);
        }
        @media (max-width: 480px) {
            .donate-banner {
                bottom: 70px;
                flex-wrap: wrap;
                gap: 10px;
                padding: 14px 16px;
            }
            .donate-banner-btn {
                width: 100%;
                text-align: center;
            }
        }

        /* Toast Notifications */
        #toast-container {
            position: fixed;
            top: 80px;
            right: 20px;
            z-index: 10001;
            display: flex;
            flex-direction: column;
            gap: 10px;
            pointer-events: none;
        }
        .toast {
            background: rgba(30, 30, 50, 0.95);
            padding: 12px 20px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            gap: 10px;
            transform: translateX(120%);
            transition: transform 0.3s ease;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
            border-left: 4px solid #00d4ff;
        }
        .toast.show { transform: translateX(0); }
        .toast-info { border-left-color: #00d4ff; }
        .toast-success { border-left-color: #2ecc71; }
        .toast-warning { border-left-color: #f39c12; }
        .toast-error { border-left-color: #e74c3c; }
        .toast-icon { font-size: 18px; }
        .toast-message { color: #fff; font-size: 13px; }
        .pwa-update-banner {
            position: fixed;
            top: max(12px, calc(var(--pw-safe-top) + 12px));
            left: 50%;
            z-index: 10000;
            display: flex;
            width: min(680px, calc(100vw - var(--pw-safe-left) - var(--pw-safe-right) - 24px));
            min-width: 0;
            padding: 12px;
            border: 1px solid rgba(0, 212, 255, 0.38);
            border-radius: 14px;
            background: rgba(13, 23, 39, 0.97);
            box-shadow: 0 12px 42px rgba(0, 0, 0, 0.48);
            color: #fff;
            transform: translateX(-50%);
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
            gap: 14px;
            align-items: center;
        }
        .pwa-update-copy {
            display: grid;
            min-width: 0;
            flex: 1 1 auto;
            gap: 3px;
        }
        .pwa-update-title {
            font-size: 14px;
            line-height: 1.3;
        }
        .pwa-update-description {
            color: rgba(255, 255, 255, 0.7);
            font-size: 11px;
            line-height: 1.4;
            overflow-wrap: anywhere;
        }
        .pwa-update-actions {
            display: flex;
            flex: 0 0 auto;
            gap: 7px;
        }
        .pwa-update-action {
            min-width: 76px;
            min-height: 44px;
            padding: 8px 12px;
            border: 1px solid rgba(0, 212, 255, 0.28);
            border-radius: 9px;
            background: rgba(0, 212, 255, 0.08);
            color: #dffaff;
            font: inherit;
            font-size: 12px;
            font-weight: 650;
            cursor: pointer;
            touch-action: manipulation;
        }
        .pwa-update-action.is-primary {
            border-color: rgba(0, 212, 255, 0.62);
            background: rgba(0, 212, 255, 0.22);
            color: #fff;
        }
        .pwa-update-action:disabled {
            cursor: wait;
            opacity: 0.58;
        }
        .pwa-update-action:focus-visible {
            outline: 2px solid #fff;
            outline-offset: 2px;
        }
        @media (max-width: 600px) {
            .pwa-update-banner {
                top: max(8px, calc(var(--pw-safe-top) + 8px));
                width: calc(100vw - var(--pw-safe-left) - var(--pw-safe-right) - 16px);
                align-items: stretch;
                flex-direction: column;
                gap: 9px;
            }
            .pwa-update-actions {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .pwa-update-action {
                width: 100%;
            }
        }

        @media (max-width: 768px) {
            #status-bar { display: none !important; }
        }
        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #00d4ff;
        }
        .status-dot.space { background: #9b59b6; }
        .status-dot.money { background: #2ecc71; }
        .status-dot.flights { background: #e74c3c; }
        .status-dot.quakes { background: #f39c12; }
        .status-dot.radio { background: #e91e63; }
        .status-dot.geography { background: #2e7d62; }
        .status-network.offline { color: #e74c3c; }

        /* Keyboard Help Modal */
        .keyboard-help-modal {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10002;
        }
        .keyboard-help-content {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            padding: 25px;
            border-radius: 16px;
            max-width: 400px;
        }
        .keyboard-help-content h3 {
            margin: 0 0 20px;
            text-align: center;
        }
        .keyboard-help-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
        .kb-item {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 13px;
        }
        .kb-item kbd {
            background: rgba(255,255,255,0.1);
            padding: 4px 10px;
            border-radius: 6px;
            font-family: monospace;
            min-width: 30px;
            text-align: center;
        }
        .keyboard-help-close {
            width: 100%;
            margin-top: 20px;
            padding: 12px;
            background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
            border: none;
            border-radius: 8px;
            color: #fff;
            font-weight: 600;
            cursor: pointer;
        }

        /* Visited Countries Modal */
        .visited-modal {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10002;
        }
        .visited-modal-content {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            padding: 25px;
            border-radius: 16px;
            max-width: 450px;
            width: 90%;
        }
        .visited-modal-content h3 { margin: 0 0 20px; text-align: center; }
        .visited-progress {
            background: rgba(255,255,255,0.1);
            border-radius: 10px;
            height: 30px;
            position: relative;
            margin-bottom: 15px;
            overflow: hidden;
        }
        .visited-progress-bar {
            height: 100%;
            background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
            border-radius: 10px;
            transition: width 0.5s;
        }
        .visited-progress span {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 12px;
            font-weight: 600;
        }
        .visited-flags {
            font-size: 20px;
            line-height: 1.8;
            text-align: center;
            margin-bottom: 15px;
            max-height: 200px;
            overflow-y: auto;
        }
        .visited-modal-content button {
            width: 100%;
            padding: 12px;
            background: rgba(255,255,255,0.1);
            border: none;
            border-radius: 8px;
            color: #fff;
            cursor: pointer;
        }

        /* Achievement Popup */
        .achievement-popup {
            position: fixed;
            top: 100px;
            left: 50%;
            transform: translateX(-50%) translateY(-20px);
            background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
            padding: 15px 25px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            gap: 15px;
            z-index: 10003;
            opacity: 0;
            transition: all 0.5s ease;
            box-shadow: 0 10px 30px rgba(243, 156, 18, 0.4);
        }
        .achievement-popup.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
        .achievement-icon { font-size: 32px; }
        .achievement-title { font-weight: 700; font-size: 16px; }
        .achievement-desc { font-size: 12px; opacity: 0.9; }

        /* Confetti */
        .confetti {
            position: fixed;
            top: -10px;
            width: 10px;
            height: 10px;
            z-index: 10004;
            animation: confettiFall linear forwards;
        }
        @keyframes confettiFall {
            to { transform: translateY(110vh) rotate(720deg); }
        }

        /* Ripple Effect */
        .mode-btn, .space-filter, .money-filter {
            position: relative;
            overflow: hidden;
        }
        .ripple {
            position: absolute;
            border-radius: 50%;
            background: rgba(255,255,255,0.4);
            transform: scale(0);
            animation: rippleAnim 0.6s linear;
            pointer-events: none;
        }
        @keyframes rippleAnim {
            to { transform: scale(4); opacity: 0; }
        }

        /* Zoom Controls */
        .zoom-controls {
            position: fixed;
            bottom: 100px;
            right: 20px;
            display: flex;
            flex-direction: column;
            gap: 5px;
            z-index: 90;
        }
        .share-btn svg { width: 16px; height: 16px; }
        /* Share App Popup */
        .share-app-popup {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 100001;
            align-items: center;
            justify-content: center;
            padding:
                calc(8px + var(--pw-safe-top))
                calc(8px + var(--pw-safe-right))
                calc(8px + var(--pw-safe-bottom))
                calc(8px + var(--pw-safe-left));
        }
        .share-app-popup.visible { display: flex; }
        .sap-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
        .sap-card {
            position: relative;
            background: rgba(22, 24, 36, 0.97);
            backdrop-filter: blur(24px);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 16px;
            padding: 20px;
            width: min(380px, 100%);
            max-width: 100%;
            max-height: calc(100vh - var(--pw-safe-top) - var(--pw-safe-bottom) - 16px);
            overflow-y: auto;
            overscroll-behavior: contain;
            box-shadow: 0 12px 48px rgba(0,0,0,0.6);
            animation: sapIn 0.2s ease-out;
        }
        @supports (height: 100dvh) {
            .sap-card {
                max-height: calc(100dvh - var(--pw-safe-top) - var(--pw-safe-bottom) - 16px);
            }
        }
        @keyframes sapIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
        .sap-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
        .sap-title { color: #fff; font-size: 16px; font-weight: 600; }
        .sap-close { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; background: none; border: none; color: rgba(255,255,255,0.5); font-size: 22px; cursor: pointer; padding: 0; line-height: 1; }
        .sap-close:hover { color: #fff; }
        .sap-close:focus-visible,
        .sap-copy-btn:focus-visible,
        .sap-icon-btn:focus-visible,
        .sap-pwa-install-btn:focus-visible {
            outline: 2px solid #00d4ff;
            outline-offset: 2px;
        }
        .sap-copy-btn {
            display: flex; align-items: center; justify-content: center; gap: 8px;
            width: 100%; padding: 12px; margin-bottom: 16px;
            background: rgba(0, 200, 255, 0.12); border: 1px solid rgba(0, 200, 255, 0.3);
            border-radius: 10px; color: #00d4ff; font-size: 14px; font-weight: 500;
            cursor: pointer; transition: all 0.2s;
        }
        .sap-copy-btn:hover { background: rgba(0, 200, 255, 0.22); border-color: rgba(0, 200, 255, 0.5); }
        .sap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
        .sap-icon-btn {
            display: flex; flex-direction: column; align-items: center; gap: 6px;
            padding: 14px 6px; border-radius: 12px; color: #fff; text-decoration: none;
            font-size: 11px; cursor: pointer; transition: all 0.2s; border: none;
            background: rgba(255,255,255,0.06);
        }
        .sap-icon-btn:hover { transform: translateY(-2px); }
        .sap-ic { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
        .sap-ic svg { width: 24px; height: 24px; }
        .sap-tg { background: rgba(0, 136, 204, 0.2); }
        .sap-tg:hover { background: rgba(0, 136, 204, 0.4); }
        .sap-wa { background: rgba(37, 211, 102, 0.2); }
        .sap-wa:hover { background: rgba(37, 211, 102, 0.4); }
        .sap-x { background: rgba(255, 255, 255, 0.08); }
        .sap-x:hover { background: rgba(255, 255, 255, 0.18); }
        .sap-vk { background: rgba(70, 128, 194, 0.2); }
        .sap-vk:hover { background: rgba(70, 128, 194, 0.4); }
        .sap-reddit { background: rgba(255, 69, 0, 0.2); }
        .sap-reddit:hover { background: rgba(255, 69, 0, 0.4); }
        .sap-fb { background: rgba(24, 119, 242, 0.2); }
        .sap-fb:hover { background: rgba(24, 119, 242, 0.4); }
        .sap-export {
            margin-top: 16px;
            padding-top: 14px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        .sap-export-title {
            margin-bottom: 9px;
            color: rgba(255,255,255,0.72);
            font-size: 12px;
            font-weight: 600;
        }
        .sap-export-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 7px;
        }
        .sap-export-btn {
            min-height: 44px;
            padding: 7px 5px;
            border: 1px solid rgba(0, 212, 255, 0.24);
            border-radius: 9px;
            background: rgba(0, 212, 255, 0.08);
            color: #dffaff;
            font: inherit;
            font-size: 10px;
            line-height: 1.25;
            overflow-wrap: anywhere;
            cursor: pointer;
        }
        .sap-export-btn:hover { background: rgba(0, 212, 255, 0.17); }
        .sap-export-btn:focus-visible { outline: 2px solid #00d4ff; outline-offset: 2px; }
        .sap-export-btn:disabled { cursor: wait; opacity: 0.5; }
        .sap-export-btn[data-rights-blocked="true"]:disabled { cursor: not-allowed; }
        .sap-export-status {
            min-height: 15px;
            margin-top: 8px;
            color: rgba(255,255,255,0.65);
            font-size: 10px;
            line-height: 1.4;
        }
        .sap-share-view[hidden],
        .sap-pwa-install[hidden],
        .sap-casebook-manager[hidden] {
            display: none;
        }
        .sap-pwa-install {
            margin-top: 16px;
            padding: 14px;
            border: 1px solid rgba(0, 212, 255, 0.24);
            border-radius: 11px;
            background: rgba(0, 212, 255, 0.07);
        }
        .sap-pwa-title {
            margin: 0 0 5px;
            color: #fff;
            font-size: 14px;
            line-height: 1.3;
        }
        .sap-pwa-description {
            margin: 0;
            color: rgba(255, 255, 255, 0.7);
            font-size: 11px;
            line-height: 1.45;
            overflow-wrap: anywhere;
        }
        .sap-pwa-install-btn {
            width: 100%;
            min-height: 44px;
            margin-top: 10px;
            padding: 9px 12px;
            border: 1px solid rgba(0, 212, 255, 0.6);
            border-radius: 9px;
            background: rgba(0, 212, 255, 0.2);
            color: #fff;
            font: inherit;
            font-size: 12px;
            font-weight: 650;
            cursor: pointer;
            touch-action: manipulation;
        }
        .sap-pwa-install-btn:disabled {
            cursor: wait;
            opacity: 0.58;
        }
        .sap-pwa-status {
            min-height: 0;
            margin-top: 7px;
            color: rgba(255, 255, 255, 0.72);
            font-size: 11px;
            line-height: 1.4;
        }
        .sap-pwa-status:empty {
            display: none;
        }
        .sap-casebook {
            margin-top: 16px;
            padding-top: 14px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        .sap-casebook-title {
            margin: 0 0 5px;
            color: #fff;
            font-size: 15px;
            line-height: 1.3;
        }
        .sap-casebook-description {
            margin: 0 0 12px;
            color: rgba(255,255,255,0.66);
            font-size: 11px;
            line-height: 1.45;
            overflow-wrap: anywhere;
        }
        .sap-casebook-form {
            display: grid;
            gap: 7px;
        }
        .sap-casebook-form label {
            color: rgba(255,255,255,0.82);
            font-size: 11px;
            font-weight: 600;
        }
        .sap-casebook-form input,
        .sap-casebook-form textarea {
            width: 100%;
            min-height: 44px;
            padding: 10px 11px;
            border: 1px solid rgba(0,212,255,0.25);
            border-radius: 9px;
            background: rgba(255,255,255,0.06);
            color: #fff;
            font: inherit;
            font-size: 16px;
            line-height: 1.35;
        }
        .sap-casebook-form textarea {
            min-height: 76px;
            max-height: 160px;
            resize: vertical;
        }
        .sap-casebook-form input::placeholder,
        .sap-casebook-form textarea::placeholder {
            color: rgba(255,255,255,0.42);
        }
        .sap-casebook-primary-actions,
        .sap-casebook-manager-actions,
        .sap-casebook-entry-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 7px;
        }
        .sap-casebook-primary-actions {
            margin-top: 3px;
        }
        .sap-casebook-manager-actions {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            margin-bottom: 7px;
        }
        .sap-casebook-btn,
        .sap-casebook-back,
        .sap-casebook-entry-action {
            min-width: 0;
            min-height: 44px;
            padding: 8px 9px;
            border: 1px solid rgba(0,212,255,0.26);
            border-radius: 9px;
            background: rgba(0,212,255,0.08);
            color: #dffaff;
            font: inherit;
            font-size: 11px;
            font-weight: 600;
            line-height: 1.3;
            overflow-wrap: anywhere;
            cursor: pointer;
            touch-action: manipulation;
        }
        .sap-casebook > .sap-casebook-btn {
            width: 100%;
        }
        .sap-casebook-btn:hover,
        .sap-casebook-back:hover,
        .sap-casebook-entry-action:hover {
            background: rgba(0,212,255,0.17);
        }
        .sap-casebook-btn.is-primary {
            border-color: rgba(0,212,255,0.58);
            background: rgba(0,212,255,0.2);
            color: #fff;
        }
        .sap-casebook-btn.is-destructive,
        .sap-casebook-entry-action.is-destructive {
            border-color: rgba(255,101,124,0.38);
            background: rgba(255,101,124,0.09);
            color: #ffc0ca;
        }
        .sap-casebook-btn:disabled,
        .sap-casebook-entry-action:disabled {
            cursor: wait;
            opacity: 0.52;
        }
        .sap-casebook-form input:focus-visible,
        .sap-casebook-form textarea:focus-visible,
        .sap-casebook-btn:focus-visible,
        .sap-casebook-back:focus-visible,
        .sap-casebook-entry-action:focus-visible {
            outline: 2px solid #00d4ff;
            outline-offset: 2px;
        }
        .sap-casebook-status {
            min-height: 17px;
            margin-top: 5px;
            color: rgba(255,255,255,0.68);
            font-size: 11px;
            line-height: 1.4;
            overflow-wrap: anywhere;
        }
        .sap-casebook-status[data-state="success"] {
            color: #8ff0bb;
        }
        .sap-casebook-status[data-state="error"] {
            color: #ffb1bd;
        }
        .sap-casebook-status[data-state="warning"] {
            color: #ffd37a;
        }
        .sap-casebook-manager {
            min-width: 0;
        }
        .sap-casebook-back {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 10px;
            padding-inline: 12px;
        }
        .sap-casebook-manager-status {
            margin-bottom: 5px;
        }
        .sap-casebook-compare {
            min-width: 0;
            margin: 7px 0 9px;
            padding: 0 11px;
            border: 1px solid rgba(0,212,255,0.18);
            border-radius: 11px;
            background: rgba(0,212,255,0.045);
            overflow: hidden;
        }
        .sap-casebook-compare > summary {
            display: flex;
            min-height: 44px;
            align-items: center;
            color: #dffaff;
            font-size: 12px;
            font-weight: 650;
            line-height: 1.35;
            overflow-wrap: anywhere;
            cursor: pointer;
            touch-action: manipulation;
        }
        .sap-casebook-compare > summary:focus-visible {
            outline: 2px solid #00d4ff;
            outline-offset: 2px;
        }
        .sap-casebook-compare-description {
            margin: 0 0 10px;
            color: rgba(255,255,255,0.64);
            font-size: 12px;
            line-height: 1.45;
            overflow-wrap: anywhere;
        }
        .sap-casebook-compare-selectors {
            display: grid;
            min-width: 0;
            grid-template-areas:
                "left-label"
                "left-select"
                "right-label"
                "right-select";
            grid-template-columns: minmax(0, 1fr);
            gap: 5px 7px;
        }
        .sap-casebook-compare-selectors label {
            min-width: 0;
            color: rgba(255,255,255,0.82);
            font-size: 11px;
            font-weight: 600;
            line-height: 1.35;
            overflow-wrap: anywhere;
        }
        .sap-casebook-compare-selectors label[for="sap-casebook-compare-left"] {
            grid-area: left-label;
        }
        .sap-casebook-compare-selectors label[for="sap-casebook-compare-right"] {
            grid-area: right-label;
        }
        #sap-casebook-compare-left {
            grid-area: left-select;
        }
        #sap-casebook-compare-right {
            grid-area: right-select;
        }
        .sap-casebook-compare-select {
            box-sizing: border-box;
            width: 100%;
            min-width: 0;
            max-width: 100%;
            height: 44px;
            min-height: 44px;
            padding: 8px 30px 8px 9px;
            border: 1px solid rgba(0,212,255,0.26);
            border-radius: 9px;
            background: #102631;
            color: #fff;
            font: inherit;
            font-size: 16px;
            line-height: 1.3;
            text-overflow: ellipsis;
        }
        .sap-casebook-compare-select:disabled {
            cursor: not-allowed;
            opacity: 0.52;
        }
        .sap-casebook-compare-select:focus-visible {
            outline: 2px solid #00d4ff;
            outline-offset: 2px;
        }
        .sap-casebook-compare-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 7px;
            margin-top: 9px;
        }
        .sap-casebook-compare-result[hidden] {
            display: none;
        }
        .sap-casebook-compare-result {
            min-width: 0;
            margin: 8px 0 11px;
            padding: 10px;
            border: 1px solid rgba(255,255,255,0.11);
            border-radius: 9px;
            background: rgba(0,0,0,0.18);
            overflow-wrap: anywhere;
        }
        .sap-casebook-compare-line {
            margin: 0 0 6px;
            color: rgba(255,255,255,0.75);
            font-size: 12px;
            line-height: 1.45;
            overflow-wrap: anywhere;
        }
        .sap-casebook-compare-line strong {
            color: rgba(255,255,255,0.9);
        }
        .sap-casebook-compare-line[data-state="same"] .sap-casebook-compare-value {
            color: #8ff0bb;
        }
        .sap-casebook-compare-line[data-state="different"] .sap-casebook-compare-value {
            color: #ffd37a;
        }
        .sap-casebook-compare-pair {
            min-width: 0;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid rgba(255,255,255,0.08);
        }
        .sap-casebook-compare-limitations-grid {
            display: grid;
            min-width: 0;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 7px;
            margin-top: 7px;
        }
        .sap-casebook-compare-limitations {
            min-width: 0;
            color: #ffd37a;
            font-size: 12px;
            line-height: 1.4;
        }
        .sap-casebook-compare-limitations summary {
            display: flex;
            min-height: 44px;
            align-items: center;
            overflow-wrap: anywhere;
            cursor: pointer;
            touch-action: manipulation;
        }
        .sap-casebook-compare-limitations summary:focus-visible {
            outline: 2px solid #00d4ff;
            outline-offset: 2px;
        }
        .sap-casebook-compare-limitations ul {
            margin: 0 0 6px;
            padding-inline-start: 18px;
        }
        .sap-casebook-compare-limitations li {
            margin: 3px 0;
            overflow-wrap: anywhere;
        }
        .sap-casebook-compare-limitations p {
            margin: 0 0 6px;
            color: rgba(255,255,255,0.58);
        }
        .sap-casebook-compare-assurance,
        .sap-casebook-compare-foreign {
            margin: 8px 0 0;
            font-size: 12px;
            line-height: 1.45;
            overflow-wrap: anywhere;
        }
        .sap-casebook-compare-assurance {
            color: rgba(255,255,255,0.56);
        }
        .sap-casebook-compare-foreign {
            color: #ffd37a;
        }
        .sap-casebook-list {
            display: grid;
            gap: 9px;
            max-height: min(48dvh, 360px);
            overflow-y: auto;
            overscroll-behavior: contain;
            scrollbar-gutter: stable;
        }
        .sap-casebook-empty {
            padding: 18px 10px;
            color: rgba(255,255,255,0.62);
            font-size: 12px;
            line-height: 1.45;
            text-align: center;
        }
        .sap-casebook-entry {
            min-width: 0;
            padding: 12px;
            border: 1px solid rgba(255,255,255,0.11);
            border-radius: 11px;
            background: rgba(255,255,255,0.045);
        }
        .sap-casebook-entry-title {
            margin: 0 0 7px;
            color: #fff;
            font-size: 13px;
            line-height: 1.35;
            overflow-wrap: anywhere;
        }
        .sap-casebook-entry-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 5px 8px;
            color: rgba(255,255,255,0.58);
            font-size: 10px;
            line-height: 1.35;
        }
        .sap-casebook-completeness.is-complete {
            color: #8ff0bb;
        }
        .sap-casebook-completeness.is-incomplete {
            color: #ffd37a;
        }
        .sap-casebook-trust {
            display: inline-flex;
            width: fit-content;
            max-width: 100%;
            margin: 7px 0 0;
            padding: 3px 7px;
            border: 1px solid currentColor;
            border-radius: 999px;
            font-size: 10px;
            font-weight: 600;
            line-height: 1.35;
            overflow-wrap: anywhere;
        }
        .sap-casebook-trust.is-local {
            color: #8ff0bb;
            background: rgba(79,203,135,0.08);
        }
        .sap-casebook-trust.is-foreign {
            color: #ffd37a;
            background: rgba(255,211,122,0.08);
        }
        .sap-casebook-trust.is-invalid,
        .sap-casebook-trust.is-unavailable {
            color: #ffb1bd;
            background: rgba(255,101,124,0.08);
        }
        .sap-casebook-entry-note,
        .sap-casebook-assurance,
        .sap-casebook-key {
            margin: 8px 0 0;
            font-size: 11px;
            line-height: 1.45;
            overflow-wrap: anywhere;
            white-space: pre-wrap;
        }
        .sap-casebook-entry-note {
            color: rgba(255,255,255,0.82);
        }
        .sap-casebook-assurance {
            color: rgba(255,255,255,0.52);
            font-size: 10px;
        }
        .sap-casebook-key {
            margin-top: 4px;
            color: rgba(255,255,255,0.62);
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            font-size: 10px;
        }
        .sap-casebook-limitations {
            margin-top: 8px;
            color: #ffd37a;
            font-size: 10px;
            line-height: 1.4;
        }
        .sap-casebook-limitations summary {
            min-height: 44px;
            display: flex;
            align-items: center;
            cursor: pointer;
            touch-action: manipulation;
        }
        .sap-casebook-limitations ul {
            margin: 0 0 6px;
            padding-inline-start: 19px;
        }
        .sap-casebook-limitations li {
            margin: 3px 0;
            overflow-wrap: anywhere;
        }
        .sap-casebook-entry-actions {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            margin-top: 10px;
        }
        .sap-casebook-entry-status {
            margin-bottom: -3px;
        }
        @media (max-width: 480px), (max-height: 700px) {
            .sap-card {
                max-height: calc(100dvh - 24px);
                max-height: calc(100dvh - var(--pw-safe-top) - var(--pw-safe-bottom) - 16px);
                padding: 14px;
            }
        }
        @media (max-width: 340px) {
            .share-app-popup {
                padding:
                    calc(4px + var(--pw-safe-top))
                    calc(4px + var(--pw-safe-right))
                    calc(4px + var(--pw-safe-bottom))
                    calc(4px + var(--pw-safe-left));
            }
            .sap-card {
                max-height: calc(100vh - var(--pw-safe-top) - var(--pw-safe-bottom) - 8px);
                padding: 12px;
                border-radius: 13px;
            }
            .sap-casebook-manager-actions,
            .sap-casebook-entry-actions {
                grid-template-columns: 1fr;
            }
        }
        @media (max-width: 340px) {
            .sap-casebook-compare-selectors {
                grid-template-areas:
                    "left-label"
                    "left-select"
                    "right-label"
                    "right-select";
                grid-template-columns: minmax(0, 1fr);
            }
            .sap-casebook-compare-actions,
            .sap-casebook-compare-limitations-grid {
                grid-template-columns: minmax(0, 1fr);
            }
        }
        @supports (height: 100dvh) {
            @media (max-width: 340px) {
                .sap-card {
                    max-height: calc(100dvh - var(--pw-safe-top) - var(--pw-safe-bottom) - 8px);
                }
            }
        }

        .zoom-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(0,0,0,0.6);
            border: 1px solid rgba(255,255,255,0.2);
            color: #fff;
            font-size: 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        .zoom-btn:hover {
            background: rgba(0,212,255,0.3);
            border-color: rgba(0,212,255,0.5);
        }

        /* Ruler / Distance Measure */
        .ruler-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(0,0,0,0.6);
            border: 1px solid rgba(255,255,255,0.2);
            color: #fff;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            margin-top: 5px;
        }
        .ruler-btn:hover {
            background: rgba(0,212,255,0.3);
            border-color: rgba(0,212,255,0.5);
        }
        .ruler-btn.active {
            background: rgba(0,212,255,0.5);
            border-color: rgba(0,212,255,0.8);
            box-shadow: 0 0 10px rgba(0,212,255,0.5);
        }
        .ruler-panel {
            position: fixed;
            bottom: 200px;
            right: 20px;
            background: rgba(20, 30, 40, 0.95);
            border: 1px solid rgba(0,212,255,0.3);
            border-radius: 12px;
            padding: 12px 16px;
            color: #fff;
            font-size: 13px;
            z-index: 100;
            min-width: 180px;
            display: none;
        }
        .ruler-panel.visible {
            display: block;
        }
        .ruler-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .ruler-panel-title {
            font-weight: bold;
            font-size: 14px;
            color: #00d4ff;
        }
        .ruler-panel-close {
            background: none;
            border: none;
            color: rgba(255,255,255,0.6);
            font-size: 18px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }
        .ruler-panel-close:hover {
            color: #fff;
        }
        .ruler-distance {
            font-size: 24px;
            font-weight: bold;
            text-align: center;
            margin: 10px 0;
            color: #00d4ff;
        }
        .ruler-points {
            font-size: 11px;
            color: rgba(255,255,255,0.7);
        }
        .ruler-point {
            display: flex;
            align-items: center;
            gap: 6px;
            margin: 4px 0;
        }
        .ruler-point-marker {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }
        .ruler-point-marker.start {
            background: #00ff88;
        }
        .ruler-point-marker.end {
            background: #ff4444;
        }
        .ruler-hint {
            font-size: 11px;
            color: rgba(255,255,255,0.5);
            text-align: center;
            margin-top: 8px;
        }
        .ruler-clear-btn {
            width: 100%;
            margin-top: 10px;
            padding: 6px 12px;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            color: #fff;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .ruler-clear-btn:hover {
            background: rgba(255,68,68,0.3);
            border-color: rgba(255,68,68,0.5);
        }

        /* Day/Night Toggle */
        .daynight-toggle {
            position: fixed;
            top: 180px;
            right: 20px;
            display: flex;
            flex-direction: column;
            gap: 5px;
            z-index: 115;
        }
        /* Catalog panels own the right-side control column. */
        body.has-catalog-panel .daynight-toggle,
        body.has-catalog-legend .daynight-toggle {
            display: none !important;
        }

        /* Random World TV Button */
        .random-world-btn {
            position: fixed;
            top: 130px;
            right: 20px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(0,0,0,0.6);
            border: 1px solid;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 90;
            animation: diceColorCycle 3s linear infinite;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .random-world-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 0 14px rgba(255,255,255,0.25);
        }
        .random-world-btn:active {
            transform: scale(0.9) rotate(180deg);
        }
        @keyframes diceColorCycle {
            0%   { border-color: #e74c3c; color: #e74c3c; }
            16%  { border-color: #f39c12; color: #f39c12; }
            33%  { border-color: #2ecc71; color: #2ecc71; }
            50%  { border-color: #3498db; color: #3498db; }
            66%  { border-color: #9b59b6; color: #9b59b6; }
            83%  { border-color: #e91e63; color: #e91e63; }
            100% { border-color: #e74c3c; color: #eee; }
        }
        .daynight-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(0,0,0,0.6);
            border: 1px solid rgba(255,255,255,0.2);
            color: #888;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        .daynight-btn:hover {
            background: rgba(255,200,0,0.2);
            border-color: rgba(255,200,0,0.4);
        }
        .daynight-btn.active {
            background: linear-gradient(135deg, rgba(255,200,0,0.5) 0%, rgba(100,100,200,0.5) 100%);
            border-color: rgba(255,200,0,0.8);
            color: #fff;
        }
        .daynight-btn .moon-icon { display: none; }
        .daynight-btn.active .sun-icon { display: none; }
        .daynight-btn.active .moon-icon { display: block; }

        @media (max-width: 768px) {
            .daynight-toggle {
                top: auto !important;
                bottom: 50px !important;
                left: 10px !important;
                right: auto !important;
            }
        }

/* ========== Cookie Banner CSS ========== */

        .cookie-banner {
            position: fixed;
            bottom: 20px;
            left: 20px;
            right: 20px;
            max-width: 480px;
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
            z-index: 100001;
            display: none;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }
        .cookie-banner.visible { display: block; animation: slideUp 0.3s ease; }
        @keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
        .cookie-banner-content { padding: 16px; }
        .cookie-banner-icon { display: none; }
        .cookie-banner-title { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: #1a1a2e; }
        .cookie-banner-desc { margin: 0 0 12px; font-size: 13px; line-height: 1.4; color: #666; }
        .cookie-banner-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
        .cookie-btn-primary {
            width: 100%; min-height: 42px; padding: 10px 14px; border: none; border-radius: 8px;
            background: #3b82f6; color: #fff; font-size: 14px; font-weight: 600;
            cursor: pointer; transition: background 0.2s;
        }
        .cookie-btn-primary:hover { background: #2563eb; }
        .cookie-btn-secondary {
            width: 100%; min-height: 42px; padding: 10px 14px; border: 1px solid #e5e5e5; border-radius: 8px;
            background: #fff; color: #333; font-size: 14px; font-weight: 500;
            cursor: pointer; transition: all 0.2s;
        }
        .cookie-btn-secondary:hover { background: #f5f5f5; border-color: #ccc; }
        .cookie-btn-link {
            grid-column: 1 / -1;
            background: none; border: none; color: #3b82f6; font-size: 13px;
            cursor: pointer; text-decoration: underline; padding: 4px;
        }
        .cookie-btn-link:hover { color: #2563eb; }
        .cookie-privacy-link {
            grid-column: 1 / -1;
            color: #526173;
            font-size: 12px;
            text-align: center;
        }

        /* Settings Modal */
        .cookie-settings-modal {
            position: fixed; inset: 0; background: rgba(0,0,0,0.5);
            z-index: 100002; display: none; align-items: center; justify-content: center;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }
        .cookie-settings-modal.visible { display: flex; }
        .cookie-settings-box {
            background: #fff; border-radius: 16px; width: 90%; max-width: 500px;
            max-height: 80vh; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }
        .cookie-settings-header {
            display: flex; justify-content: space-between; align-items: center;
            padding: 20px 24px; border-bottom: 1px solid #eee;
        }
        .cookie-settings-header h3 { margin: 0; font-size: 18px; color: #1a1a2e; }
        .cookie-settings-close {
            background: none; border: none; font-size: 24px; cursor: pointer;
            color: #999; line-height: 1;
        }
        .cookie-settings-close:hover { color: #333; }
        .cookie-settings-body { padding: 20px 24px; overflow-y: auto; max-height: 50vh; }
        .cookie-category { padding: 16px 0; border-bottom: 1px solid #eee; }
        .cookie-category:last-child { border-bottom: none; }
        .cookie-category-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
        .cookie-category strong { font-size: 14px; color: #1a1a2e; }
        .cookie-category-desc { margin: 4px 0 0; font-size: 13px; color: #666; }
        .cookie-toggle { position: relative; width: 48px; height: 26px; flex-shrink: 0; }
        .cookie-toggle input { opacity: 0; width: 0; height: 0; }
        .cookie-toggle-slider {
            position: absolute; inset: 0; background: #ccc; border-radius: 26px;
            cursor: pointer; transition: 0.3s;
        }
        .cookie-toggle-slider:before {
            content: ''; position: absolute; height: 20px; width: 20px;
            left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s;
        }
        .cookie-toggle input:checked + .cookie-toggle-slider { background: #3b82f6; }
        .cookie-toggle input:checked + .cookie-toggle-slider:before { transform: translateX(22px); }
        .cookie-toggle.disabled .cookie-toggle-slider { background: #3b82f6; opacity: 0.6; cursor: not-allowed; }
        .cookie-settings-footer {
            display: flex; gap: 12px; padding: 20px 24px; border-top: 1px solid #eee;
        }
        .cookie-settings-footer .cookie-btn-secondary,
        .cookie-settings-footer .cookie-btn-primary { flex: 1; }

        @media (max-width: 500px) {
            .cookie-banner {
                left: 12px;
                right: 12px;
                bottom: calc(12px + env(safe-area-inset-bottom, 0px));
                max-height: none;
                overflow: visible;
                border-radius: 12px;
            }
            .cookie-banner-content { padding: 10px; }
            .cookie-banner-title { font-size: 14px; margin-bottom: 4px; }
            .cookie-banner-desc {
                display: none;
            }
            .cookie-banner-actions { gap: 6px; }
            .cookie-btn-primary,
            .cookie-btn-secondary {
                min-height: 44px;
                padding: 7px 10px;
                font-size: 13px;
            }
            .cookie-btn-link { min-height: 44px; padding: 8px; font-size: 13px; }
        }

        @media (max-width: 900px) {
            .cookie-privacy-link { display: none; }
            .cookie-banner.visible {
                bottom: calc(12px + env(safe-area-inset-bottom, 0px));
                top: auto;
                left: 12px;
                right: 12px;
                z-index: 8800;
                max-height: 56px;
                overflow: hidden;
                border-radius: 12px;
                animation: cookieFadeIn 0.2s ease;
            }

            .cookie-banner-content {
                display: grid;
                gap: 6px;
                padding: 6px;
            }

            .cookie-banner-text {
                display: none;
                min-width: 0;
            }

            .cookie-banner-title {
                margin: 0;
                font-size: 13px;
                line-height: 1.2;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .cookie-banner-desc {
                display: none;
            }

            .cookie-banner-actions {
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(86px, 1fr);
                align-items: center;
                gap: 6px;
            }

            .cookie-btn-primary,
            .cookie-btn-secondary,
            .cookie-btn-link {
                min-height: 44px;
                padding: 6px 8px;
                font-size: 12px;
            }

            .cookie-btn-link {
                grid-column: auto;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            body.mode-flights.flight-radar-active:not(.flight-tracking-active) .cookie-banner.visible {
                top: auto;
                bottom: calc(12px + env(safe-area-inset-bottom, 0px));
                left: 12px;
                right: 12px;
                z-index: 8800;
                max-height: 56px;
                overflow: hidden;
                border-radius: 12px;
            }

            body.mode-flights.flight-tracking-active .cookie-banner.visible {
                top: calc(64px + env(safe-area-inset-top, 0px));
                bottom: auto;
                left: 12px;
                right: 12px;
                z-index: 8800;
                max-height: 56px;
                overflow: hidden;
                border-radius: 12px;
            }

            body.mode-space .cookie-banner.visible,
            body[data-pw-mode="space"] .cookie-banner.visible,
            body.mode-tv .cookie-banner.visible,
            body[data-pw-mode="tv"] .cookie-banner.visible,
            body.mode-radio .cookie-banner.visible,
            body[data-pw-mode="radio"] .cookie-banner.visible {
                top: auto;
                bottom: calc(12px + env(safe-area-inset-bottom, 0px));
                left: 12px;
                right: 12px;
                z-index: 8800;
                max-height: 56px;
                overflow: hidden;
                border-radius: 12px;
            }

            body.mode-space .cookie-banner.visible,
            body[data-pw-mode="space"] .cookie-banner.visible {
                top: auto;
                bottom: calc(12px + env(safe-area-inset-bottom, 0px));
            }

            body.mode-tv .cookie-banner.visible,
            body[data-pw-mode="tv"] .cookie-banner.visible,
            body.mode-radio .cookie-banner.visible,
            body[data-pw-mode="radio"] .cookie-banner.visible {
                z-index: 9700;
            }

            body.mode-flights.flight-radar-active .cookie-banner-content,
            body.mode-flights.flight-tracking-active .cookie-banner-content,
            body.mode-space .cookie-banner-content,
            body[data-pw-mode="space"] .cookie-banner-content,
            body.mode-tv .cookie-banner-content,
            body[data-pw-mode="tv"] .cookie-banner-content,
            body.mode-radio .cookie-banner-content,
            body[data-pw-mode="radio"] .cookie-banner-content {
                display: grid;
                gap: 6px;
                padding: 6px;
            }

            body.mode-flights.flight-radar-active .cookie-banner-text,
            body.mode-flights.flight-tracking-active .cookie-banner-text,
            body.mode-space .cookie-banner-text,
            body[data-pw-mode="space"] .cookie-banner-text,
            body.mode-tv .cookie-banner-text,
            body[data-pw-mode="tv"] .cookie-banner-text,
            body.mode-radio .cookie-banner-text,
            body[data-pw-mode="radio"] .cookie-banner-text {
                display: none;
            }

            body.mode-flights.flight-radar-active .cookie-banner-actions,
            body.mode-flights.flight-tracking-active .cookie-banner-actions,
            body.mode-space .cookie-banner-actions,
            body[data-pw-mode="space"] .cookie-banner-actions,
            body.mode-tv .cookie-banner-actions,
            body[data-pw-mode="tv"] .cookie-banner-actions,
            body.mode-radio .cookie-banner-actions,
            body[data-pw-mode="radio"] .cookie-banner-actions {
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(86px, 1fr);
                align-items: center;
                gap: 6px;
            }

            body.mode-flights.flight-radar-active .cookie-btn-primary,
            body.mode-flights.flight-radar-active .cookie-btn-secondary,
            body.mode-flights.flight-radar-active .cookie-btn-link,
            body.mode-flights.flight-tracking-active .cookie-btn-primary,
            body.mode-flights.flight-tracking-active .cookie-btn-secondary,
            body.mode-flights.flight-tracking-active .cookie-btn-link,
            body.mode-space .cookie-btn-primary,
            body.mode-space .cookie-btn-secondary,
            body.mode-space .cookie-btn-link,
            body[data-pw-mode="space"] .cookie-btn-primary,
            body[data-pw-mode="space"] .cookie-btn-secondary,
            body[data-pw-mode="space"] .cookie-btn-link,
            body.mode-tv .cookie-btn-primary,
            body.mode-tv .cookie-btn-secondary,
            body.mode-tv .cookie-btn-link,
            body[data-pw-mode="tv"] .cookie-btn-primary,
            body[data-pw-mode="tv"] .cookie-btn-secondary,
            body[data-pw-mode="tv"] .cookie-btn-link,
            body.mode-radio .cookie-btn-primary,
            body.mode-radio .cookie-btn-secondary,
            body.mode-radio .cookie-btn-link,
            body[data-pw-mode="radio"] .cookie-btn-primary,
            body[data-pw-mode="radio"] .cookie-btn-secondary,
            body[data-pw-mode="radio"] .cookie-btn-link {
                min-height: 44px;
                padding: 6px 8px;
                font-size: 12px;
            }

            body.mode-flights.flight-radar-active .cookie-btn-link,
            body.mode-flights.flight-tracking-active .cookie-btn-link,
            body.mode-space .cookie-btn-link,
            body[data-pw-mode="space"] .cookie-btn-link,
            body.mode-tv .cookie-btn-link,
            body[data-pw-mode="tv"] .cookie-btn-link,
            body.mode-radio .cookie-btn-link,
            body[data-pw-mode="radio"] .cookie-btn-link {
                grid-column: auto;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            body.mode-space.has-catalog-panel .cookie-banner.visible,
            body.mode-space.has-catalog-legend .cookie-banner.visible,
            body[data-pw-mode="space"].has-catalog-panel .cookie-banner.visible,
            body[data-pw-mode="space"].has-catalog-legend .cookie-banner.visible {
                max-height: 56px;
                overflow: hidden;
            }

            body.mode-tv:has(#tv-panel.open) .cookie-banner.visible,
            body[data-pw-mode="tv"]:has(#tv-panel.open) .cookie-banner.visible,
            body.mode-radio:has(#radio-panel.open) .cookie-banner.visible,
            body[data-pw-mode="radio"]:has(#radio-panel.open) .cookie-banner.visible,
            body.mode-disasters.disaster-list-open .cookie-banner.visible,
            body[data-pw-mode="disasters"].disaster-list-open .cookie-banner.visible {
                display: none !important;
                pointer-events: none !important;
            }

            body.geography-2d-active:has(.cookie-banner.visible) #geography-2d-map .leaflet-bottom.leaflet-left,
            body.geography-2d-active:has(.cookie-banner.visible) #geography-2d-map .leaflet-bottom.leaflet-right {
                bottom: 68px !important;
            }

            body.geography-2d-active:has(.cookie-banner.visible) .geography-imagery-date {
                bottom: calc(146px + env(safe-area-inset-bottom, 0px)) !important;
            }

            body.geography-2d-active:has(.cookie-banner.visible) .geography-imagery-attribution {
                bottom: calc(112px + env(safe-area-inset-bottom, 0px)) !important;
            }

            body.mode-space.has-catalog-panel .cookie-banner-text,
            body.mode-space.has-catalog-legend .cookie-banner-text,
            body[data-pw-mode="space"].has-catalog-panel .cookie-banner-text,
            body[data-pw-mode="space"].has-catalog-legend .cookie-banner-text {
                display: none;
            }

            body.mode-space.has-catalog-panel .cookie-banner-actions,
            body.mode-space.has-catalog-legend .cookie-banner-actions,
            body[data-pw-mode="space"].has-catalog-panel .cookie-banner-actions,
            body[data-pw-mode="space"].has-catalog-legend .cookie-banner-actions {
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(94px, 1fr);
            }

            body.mode-space.has-catalog-panel .cookie-btn-link,
            body.mode-space.has-catalog-legend .cookie-btn-link,
            body[data-pw-mode="space"].has-catalog-panel .cookie-btn-link,
            body[data-pw-mode="space"].has-catalog-legend .cookie-btn-link {
                grid-column: auto;
            }
        }

        @keyframes cookieFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @media (min-width: 769px) {
            body.mode-tv .cookie-banner.visible,
            body[data-pw-mode="tv"] .cookie-banner.visible,
            body.mode-radio .cookie-banner.visible,
            body[data-pw-mode="radio"] .cookie-banner.visible {
                left: auto;
                right: 20px;
                max-width: min(420px, calc(100vw - 40px));
            }
        }

        /* SEO City Marker — pulsing ring for cities from SEO pages */
        .seo-city-marker {
            position: absolute;
            pointer-events: none;
            z-index: 100;
            transform: translate(-50%, -50%);
        }
        .seo-city-ring {
            position: absolute;
            top: 50%; left: 50%;
            width: 60px; height: 60px;
            transform: translate(-50%, -50%);
            border: 2px solid rgba(0, 212, 255, 0.8);
            border-radius: 50%;
            animation: seoCityPulse 2s ease-out infinite;
        }
        .seo-city-ring-2 {
            animation-delay: 0.8s;
        }
        .seo-city-dot {
            position: absolute;
            top: 50%; left: 50%;
            width: 10px; height: 10px;
            transform: translate(-50%, -50%);
            background: #00d4ff;
            border-radius: 50%;
            box-shadow: 0 0 12px 4px rgba(0, 212, 255, 0.6);
        }
        .seo-city-label {
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, 24px);
            white-space: nowrap;
            font-size: 13px;
            font-weight: 600;
            color: #fff;
            text-shadow: 0 1px 6px rgba(0,0,0,0.8), 0 0 12px rgba(0, 212, 255, 0.5);
            letter-spacing: 0.5px;
        }
        @keyframes seoCityPulse {
            0% { width: 10px; height: 10px; opacity: 1; border-width: 3px; }
            100% { width: 80px; height: 80px; opacity: 0; border-width: 1px; }
        }

        /* Online counter badge */
        .status-online-count {
            color: #2ecc71;
        }

        /* ═══════════════════════════════════════════════════════════
           NO-FLY ZONES
           ═══════════════════════════════════════════════════════════ */
        .nofly-marker {
            position: absolute;
            transform: translate(-50%, -50%);
            pointer-events: auto;
            cursor: pointer;
            z-index: 800;
            text-align: center;
            transition: transform 0.15s;
            min-width: 44px;
            min-height: 44px;
            padding: 6px;
            border: 0;
            background: transparent;
            color: inherit;
            font: inherit;
        }
        .nofly-marker:hover {
            transform: translate(-50%, -50%) scale(1.2);
        }
        .nofly-marker:focus-visible {
            outline: 3px solid #fff;
            outline-offset: 2px;
            border-radius: 8px;
        }
        .nofly-marker-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            border: 2px solid rgba(255, 68, 68, 0.7);
            box-shadow: 0 0 12px rgba(255, 68, 68, 0.5);
            animation: noflyPulse 2s ease-in-out infinite;
        }
        .nofly-marker-icon.risk-high {
            background: rgba(200, 30, 30, 0.85);
        }
        .nofly-marker-icon.risk-medium {
            background: rgba(200, 120, 30, 0.85);
        }
        .nofly-marker-icon.risk-low {
            background: rgba(180, 180, 30, 0.85);
        }
        .nofly-marker-label {
            font-size: 9px;
            color: #fff;
            text-shadow: 0 1px 3px rgba(0,0,0,0.9);
            white-space: nowrap;
            margin-top: 2px;
            max-width: 80px;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        @keyframes noflyPulse {
            0%, 100% { box-shadow: 0 0 8px rgba(255, 68, 68, 0.4); }
            50% { box-shadow: 0 0 20px rgba(255, 68, 68, 0.8); }
        }

        .nofly-info-panel {
            position: fixed;
            top: 175px;
            left: 10px;
            width: 310px;
            max-height: calc(100vh - 200px);
            background: rgba(40, 10, 10, 0.97);
            border-radius: 12px;
            border: 1px solid rgba(255, 68, 68, 0.4);
            z-index: 9000;
            overflow-y: auto;
            box-shadow: 0 4px 24px rgba(0,0,0,0.5);
            backdrop-filter: blur(10px);
            color: #fff;
            font-size: 13px;
        }
        .nofly-info-panel .nofly-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 14px;
            border-bottom: 1px solid rgba(255, 68, 68, 0.3);
        }
        .nofly-info-panel .nofly-header h3 {
            margin: 0;
            font-size: 15px;
        }
        .nofly-info-panel .nofly-close {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 44px;
            min-width: 44px;
            min-height: 44px;
            background: none;
            border: none;
            color: #ff6666;
            font-size: 22px;
            cursor: pointer;
            padding: 0;
        }
        .nofly-info-panel .nofly-body {
            padding: 12px 14px;
        }
        .nofly-info-panel .nofly-body p {
            margin: 0 0 8px 0;
            line-height: 1.5;
        }
        .nofly-risk-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
        }
        .nofly-risk-badge.high { background: #c0392b; }
        .nofly-risk-badge.medium { background: #e67e22; }
        .nofly-risk-badge.low { background: #f1c40f; color: #333; }
        .nofly-filter-btn.active {
            background: rgba(255, 68, 68, 0.3) !important;
            border-color: rgba(255, 68, 68, 0.6) !important;
        }

        @media (max-width: 768px) {
            .nofly-info-panel {
                left: 5px;
                right: 5px;
                width: auto;
                top: auto;
                bottom: 70px;
                max-height: 50vh;
            }
        }

/* ═══════════════════════════════════════════════════════════
   LIVE NOTAMs (orange theme)
   ═══════════════════════════════════════════════════════════ */
.notam-live-marker {
    position: absolute;
}
.notam-layer-status {
    position: absolute;
    top: max(92px, calc(env(safe-area-inset-top, 0px) + 72px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 820;
    max-width: min(420px, calc(100vw - 32px));
    padding: 10px 14px;
    border: 1px solid rgba(255, 152, 0, 0.65);
    border-radius: 9px;
    background: rgba(40, 25, 5, 0.94);
    color: #fff2d6;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    overflow-wrap: anywhere;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
    pointer-events: none;
}
.notam-live-marker .nofly-marker-icon.notam-marker-icon {
    background: rgba(255, 152, 0, 0.85);
    border-color: rgba(255, 152, 0, 0.7);
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.5);
    animation: notamPulse 2s ease-in-out infinite;
}
.notam-live-badge {
    position: absolute;
    top: -4px;
    right: -10px;
    background: #e65100;
    color: #fff;
    font-size: 7px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    line-height: 1.3;
    pointer-events: none;
    z-index: 1;
}
.notam-status-active,
.notam-status-permanent {
    background: #e65100;
    color: #fff;
}
.notam-status-scheduled {
    background: #1565c0;
    color: #fff;
}
.notam-status-unknown {
    background: #616161;
    color: #fff;
}
.notam-marker-scheduled .nofly-marker-icon.notam-marker-icon {
    background: rgba(21, 101, 192, 0.88);
    border-color: rgba(66, 165, 245, 0.75);
    box-shadow: 0 0 10px rgba(66, 165, 245, 0.4);
    animation: none;
}
.notam-marker-unknown .nofly-marker-icon.notam-marker-icon {
    background: rgba(97, 97, 97, 0.9);
    border-color: rgba(189, 189, 189, 0.7);
    box-shadow: none;
    animation: none;
}
.notam-info-panel {
    background: rgba(40, 25, 5, 0.97) !important;
    border-color: rgba(255, 152, 0, 0.4) !important;
}
.notam-info-panel .notam-header {
    border-bottom-color: rgba(255, 152, 0, 0.3) !important;
}
.notam-info-panel .nofly-close {
    color: #ff9800 !important;
}
.notam-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #e65100;
    color: #fff;
}
.notam-status-indicator {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}
@keyframes notamPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 152, 0, 0.4); }
    50% { box-shadow: 0 0 20px rgba(255, 152, 0, 0.8); }
}
@media (max-width: 768px) {
    .notam-info-panel {
        left: 5px;
        right: 5px;
        width: auto;
        top: auto;
        bottom: 70px;
        max-height: 50vh;
    }
}

/* Shared all-mode loading, freshness and provenance status. */
.mode-data-status {
    position: fixed;
    top: calc(62px + var(--pw-safe-top, 0px));
    left: 50%;
    z-index: 10035;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    width: min(560px, calc(100vw - 32px));
    min-height: 42px;
    padding: 6px 8px 6px 10px;
    border: 1px solid rgba(103, 232, 249, 0.46);
    border-radius: 12px;
    background: rgb(4, 15, 28);
    color: #e6f7ff;
    box-shadow: 0 9px 30px rgba(0, 0, 0, 0.45);
    transform: translateX(-50%);
    backdrop-filter: blur(12px);
}

.mode-data-status-slot {
    display: none;
}

.mode-data-status-slot:not(:empty) {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    padding: 0;
    box-sizing: border-box;
}

.mode-data-status.mode-data-status--embedded {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transform: none;
}

@media (min-width: 901px) {
    body.mode-stats .stats-mode-status-slot:not(:empty),
    body[data-pw-mode="stats"] .stats-mode-status-slot:not(:empty) {
        position: fixed;
        top: 70px;
        right: 15px;
        left: auto;
        z-index: 8995;
        flex: none;
        width: min(340px, calc(100vw - 30px));
        pointer-events: none;
    }

    body.mode-stats .stats-mode-status-slot > .mode-data-status,
    body[data-pw-mode="stats"] .stats-mode-status-slot > .mode-data-status {
        pointer-events: auto;
    }
}

.space-provider-status:has([data-mode-status-slot="space"]:not(:empty)) {
    flex-wrap: wrap;
}

@media (min-width: 1200px) {
    .mode-data-status {
        top: calc(132px + var(--pw-safe-top, 0px));
        right: 15px;
        left: auto;
        width: min(520px, calc(100vw - 32px));
        transform: none;
    }

    body.flight-tracking-active .mode-data-status:not(.mode-data-status--embedded),
    body.ship-info-active .mode-data-status:not(.mode-data-status--embedded),
    body.ship-tracking-active .mode-data-status:not(.mode-data-status--embedded),
    body.has-catalog-panel .mode-data-status:not(.mode-data-status--embedded) {
        right: calc(clamp(86px, 5vw, 112px) + 410px);
    }

    /* Keep the shared data status inside the free center column while the
       satellite catalog legend occupies the right rail. */
    body.mode-space:not(.has-catalog-panel) .mode-data-status:not(.mode-data-status--embedded),
    body[data-pw-mode="space"]:not(.has-catalog-panel) .mode-data-status:not(.mode-data-status--embedded) {
        right: calc(300px + var(--pw-safe-right, 0px));
        width: min(520px, calc(100vw - 660px));
    }

    body.port-info-mobile-focused .mode-data-status:not(.mode-data-status--embedded),
    body.port-ships-mobile-focused .mode-data-status:not(.mode-data-status--embedded) {
        right: 390px;
    }

    body.mode-stats .mode-data-status:not(.mode-data-status--embedded),
    body[data-pw-mode="stats"] .mode-data-status:not(.mode-data-status--embedded) {
        top: calc(198px + var(--pw-safe-top, 0px));
    }

    body.mode-geography .mode-data-status:not(.mode-data-status--embedded),
    body[data-pw-mode="geography"] .mode-data-status:not(.mode-data-status--embedded) {
        top: calc(184px + var(--pw-safe-top, 0px));
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .mode-data-status {
        top: auto;
        bottom: calc(140px + env(safe-area-inset-bottom, 0px));
    }

    body.port-info-mobile-focused .mode-data-status,
    body.port-ships-mobile-focused .mode-data-status {
        display: none !important;
    }
}

@media (min-width: 769px) {
    body.port-info-mobile-focused .zoom-controls,
    body.port-ships-mobile-focused .zoom-controls {
        right: 390px;
    }
}

.mode-data-status-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.16);
}

.mode-data-status[data-state="loading"] .mode-data-status-indicator {
    animation: mode-data-status-pulse 1.2s ease-in-out infinite;
}

.mode-data-status[data-state="fresh"] {
    border-color: rgba(52, 211, 153, 0.44);
}

.mode-data-status[data-state="fresh"] .mode-data-status-indicator {
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

.mode-data-status[data-state="stale"] .mode-data-status-indicator,
.mode-data-status[data-state="degraded"] .mode-data-status-indicator {
    background: #fbbf24;
}

.mode-data-status[data-state="error"] {
    border-color: rgba(248, 113, 113, 0.58);
}

.mode-data-status[data-state="error"] .mode-data-status-indicator {
    background: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.16);
}

.mode-data-status-copy {
    display: grid;
    min-width: 0;
    line-height: 1.15;
}

#mode-data-status-label {
    overflow: hidden;
    color: #f8fdff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mode-data-status-detail {
    overflow: hidden;
    margin-top: 2px;
    color: #b9cedb;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mode-data-status-retry,
#mode-data-status-sources {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid rgba(103, 232, 249, 0.4);
    border-radius: 8px;
    background: rgb(15, 46, 65);
    color: #d8f8ff;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

#mode-data-status-retry[hidden] {
    display: none !important;
}

#mode-data-status-retry:hover,
#mode-data-status-sources:hover,
#mode-data-status-retry:focus-visible,
#mode-data-status-sources:focus-visible {
    border-color: #a5f3fc;
    background: #16455e;
    outline: 2px solid transparent;
}

@keyframes mode-data-status-pulse {
    0%, 100% { opacity: 0.55; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .mode-data-status[data-state="loading"] .mode-data-status-indicator {
        animation: none;
    }

    .random-world-btn,
    .cookie-banner.visible {
        animation: none !important;
    }

    .search-container {
        transition: none;
    }
}

@media (max-width: 768px) {
    .mode-data-status {
        top: calc(190px + var(--pw-safe-top, 0px));
        gap: 6px;
        width: calc(100vw - 16px);
        min-height: 48px;
        padding: 5px 6px 5px 9px;
        border-radius: 11px;
    }

    body.mode-geography .mode-data-status:not(.mode-data-status--media-panel),
    body[data-pw-mode="geography"] .mode-data-status:not(.mode-data-status--media-panel) {
        top: calc(var(--geography-toolbar-bottom, 190px) + 52px);
    }

    body.geography-2d-active .lang-selector {
        z-index: 10002 !important;
    }

    body.mode-ships.ships-submode-ports .mode-data-status:not(.mode-data-status--media-panel),
    body[data-pw-mode="ships"].ships-submode-ports .mode-data-status:not(.mode-data-status--media-panel) {
        top: calc(248px + var(--pw-safe-top, 0px));
    }

    #mode-data-status-label {
        font-size: 10px;
    }

    #mode-data-status-detail {
        max-width: 48vw;
        font-size: 9px;
    }

    #mode-data-status-retry,
    #mode-data-status-sources {
        min-width: 44px;
        min-height: 44px;
        padding: 0 7px;
        font-size: 9px;
    }

    body.mobile-menu-open .mode-data-status {
        visibility: hidden;
    }

    .mode-data-status-slot:not(:empty) {
        display: block;
        flex: 0 0 auto;
        padding: 0;
    }

    .mode-data-status.mode-data-status--media-panel {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        transform: none;
    }
}

/* Growth Sprint: compact first-run live navigator */
.live-now-panel {
    position: fixed;
    top: clamp(150px, 18vh, 190px);
    right: 18px;
    left: auto;
    width: min(360px, calc(100vw - 36px));
    z-index: 70;
    color: #fff;
    background: rgba(9, 17, 24, 0.78);
    border: 1px solid rgba(83, 207, 157, 0.28);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(16px);
    overflow: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.live-now-panel.collapsed {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.live-now-loading {
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 700;
}

.live-now-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.live-now-head strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.live-now-head span {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
    font-weight: 700;
}

.live-now-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.live-now-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.live-now-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
}

.live-now-item {
    min-height: 68px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.065);
    color: #fff;
    text-align: left;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.live-now-item:hover {
    transform: translateY(-1px);
    border-color: rgba(83, 207, 157, 0.58);
    background: rgba(83, 207, 157, 0.14);
}

.live-now-count {
    display: block;
    font-size: 18px;
    line-height: 1.15;
    font-weight: 900;
}

.live-now-label {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 768px) {
    .live-now-panel {
        top: auto;
        right: 10px;
        left: 10px;
        bottom: calc(82px + env(safe-area-inset-bottom));
        width: calc(100vw - 20px);
        max-height: 36vh;
    }

    .live-now-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.pw-panel-visible {
    box-sizing: border-box;
    max-width: min(92vw, 760px);
}

/* Desktop media player must clear the fixed globe control rail. */
@media (min-width: 901px) {
    .radio-player-pro {
        right: 76px;
        bottom: 96px;
    }

    body:has(.cookie-banner.visible) .radio-player-pro,
    body:has(.cookie-banner.visible) .tv-player-pro {
        bottom: 176px;
    }
}

@media (max-width: 900px) {
    body.mode-tv .zoom-controls,
    body.mode-radio .zoom-controls {
        display: none !important;
    }

    body.mode-disasters.disaster-detail-open .zoom-controls,
    body[data-pw-mode="disasters"].disaster-detail-open .zoom-controls {
        display: none !important;
    }

    body.pw-has-panel .zoom-controls {
        right: calc(10px + var(--pw-safe-right));
        z-index: 900;
    }

    .pw-panel-visible,
    .radio-panel.open,
    .radio-panel.visible,
    .tv-panel.open,
    .tv-panel.visible,
    #disaster-list-panel.visible,
    .satellite-list-panel.open,
    .satellite-list-panel.visible {
        max-height: var(--pw-mobile-panel-max) !important;
        overflow: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .mode-buttons.mobile-open {
        max-height: calc(100dvh - var(--pw-safe-top) - 24px);
        overflow: auto;
        overscroll-behavior: contain;
    }
}

.tv-channel-card,
.tv-channel-item,
.radio-station-card,
.satellite-list-item,
.disaster-list-item,
.ship-list-item,
.flight-list-item {
    contain: layout paint style;
}

@supports (content-visibility: auto) {
    .tv-channel-card,
    .tv-channel-item,
    .radio-station-card,
    .satellite-list-item,
    .disaster-list-item,
    .ship-list-item,
    .flight-list-item {
        content-visibility: auto;
        contain-intrinsic-size: 72px;
    }
}

/* The media lists render only a bounded page. Keeping their interactive cards
   in a skipped intrinsic-size state can freeze a long station at 72px and
   clip its metadata/tags even after the card becomes reachable. */
.radio-station-card.media-station-card,
.tv-channel-item.media-station-card {
    content-visibility: visible;
    contain-intrinsic-size: none;
}

.tv-controls .tv-mobile-list-btn,
.radio-player-controls .radio-mobile-list-btn {
    display: none;
}

.tv-player-actions .tv-cross-mode-expand,
.radio-player-actions .radio-cross-mode-expand {
    display: none;
}

.tv-player-pro.cross-mode-compact .tv-cross-mode-expand,
.radio-player-pro.cross-mode-compact .radio-cross-mode-expand {
    display: inline-flex;
}

.tv-mobile-now-playing,
.radio-mobile-now-playing {
    display: none;
}

.tv-player-pro.cross-mode-hidden,
.radio-player-pro.cross-mode-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .zoom-btn,
    .ruler-btn,
    .daynight-btn,
    #daynight-btn,
    .zoom-btn.share-btn,
    .close-btn {
        min-width: 44px !important;
        width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
    }

    .geography-source-select {
        height: 44px !important;
    }

    .close-btn {
        min-width: 49px !important;
        width: 49px !important;
        min-height: 49px !important;
        height: 49px !important;
    }

    .compare-clear-btn {
        min-height: 49px !important;
    }

    .flights-filter,
    .ships-filter,
    .disaster-filter,
    .weather-filter,
    #lightning-toggle,
    .lightning-toggle {
        min-height: 44px !important;
        height: 44px !important;
    }

    #disaster-prev-btn,
    #disaster-next-btn,
    .disaster-list-btn {
        min-width: 44px !important;
        width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
    }

    body.geography-2d-active .geography-opacity-control input,
    #geography-overlay-opacity {
        min-height: 44px !important;
        height: 44px !important;
    }

    .space-submode,
    .space-filter,
    body.mode-space .space-submode,
    body.mode-space .space-filter,
    body[data-pw-mode="space"] .space-submode,
    body[data-pw-mode="space"] .space-filter,
    #country-search,
    .search-input,
    #random-world-btn,
    .random-world-btn,
    .tv-cat-tab,
    .radio-panel-icon-btn {
        min-width: 48px !important;
        min-height: 48px !important;
        height: 48px !important;
    }

    .radio-panel-close {
        min-width: 48px !important;
        min-height: 48px !important;
        height: 48px !important;
    }

    body.mode-disasters .disasters-filters,
    body[data-pw-mode="disasters"] .disasters-filters {
        top: 50px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 136px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        align-items: stretch !important;
        padding: 3px 7px !important;
        gap: 4px !important;
        border-radius: 0 !important;
        background: rgba(7, 10, 18, 0.97) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    body.mode-disasters .disasters-filters > .mode-data-status-slot,
    body[data-pw-mode="disasters"] .disasters-filters > .mode-data-status-slot {
        margin-top: 16px;
    }

    body.mode-disasters.disaster-filter-drawer-open .disasters-filters,
    body[data-pw-mode="disasters"].disaster-filter-drawer-open .disasters-filters {
        max-height: min(208px, calc(100dvh - 72px)) !important;
    }

    body.mode-disasters.disaster-region-search-open .disasters-filters,
    body[data-pw-mode="disasters"].disaster-region-search-open .disasters-filters {
        max-height: min(216px, calc(100dvh - 72px)) !important;
    }

    body.mode-disasters.disaster-region-active .disasters-filters,
    body[data-pw-mode="disasters"].disaster-region-active .disasters-filters {
        max-height: min(248px, calc(100dvh - 84px)) !important;
    }

    body.mode-disasters.disaster-region-active .mode-data-status,
    body[data-pw-mode="disasters"].disaster-region-active .mode-data-status {
        z-index: 199 !important;
    }

    body.mode-disasters.disaster-region-active.disaster-detail-open .disasters-filters,
    body[data-pw-mode="disasters"].disaster-region-active.disaster-detail-open .disasters-filters {
        display: none !important;
    }

    body.mode-disasters.disaster-detail-open .daynight-toggle,
    body[data-pw-mode="disasters"].disaster-detail-open .daynight-toggle {
        display: none !important;
        pointer-events: none !important;
    }

    body.mode-disasters.disaster-detail-open .cookie-banner.visible,
    body[data-pw-mode="disasters"].disaster-detail-open .cookie-banner.visible {
        display: none !important;
        pointer-events: none !important;
    }

    body.mode-disasters.disaster-region-active .cookie-banner.visible,
    body[data-pw-mode="disasters"].disaster-region-active .cookie-banner.visible {
        display: none !important;
        pointer-events: none !important;
    }

    body.mode-disasters.disaster-region-active #disaster-analytics-panel,
    body[data-pw-mode="disasters"].disaster-region-active #disaster-analytics-panel,
    body.mode-disasters.disaster-region-active .disaster-group-filters,
    body[data-pw-mode="disasters"].disaster-region-active .disaster-group-filters,
    body.mode-disasters.disaster-region-active .disasters-counter,
    body[data-pw-mode="disasters"].disaster-region-active .disasters-counter,
    body.mode-disasters.disaster-region-active .disaster-navigator,
    body[data-pw-mode="disasters"].disaster-region-active .disaster-navigator {
        display: none !important;
    }

    body.mode-disasters.disaster-region-search-open .disaster-navigator,
    body[data-pw-mode="disasters"].disaster-region-search-open .disaster-navigator {
        display: none !important;
    }

    body.mode-disasters.disaster-filter-drawer-open #disaster-analytics-panel,
    body[data-pw-mode="disasters"].disaster-filter-drawer-open #disaster-analytics-panel,
    body.mode-disasters.disaster-filter-drawer-open .disasters-counter,
    body[data-pw-mode="disasters"].disaster-filter-drawer-open .disasters-counter,
    body.mode-disasters.disaster-filter-drawer-open .disaster-navigator,
    body[data-pw-mode="disasters"].disaster-filter-drawer-open .disaster-navigator {
        display: none !important;
    }

    body.mode-disasters.disaster-filter-drawer-open .disaster-group-filters,
    body[data-pw-mode="disasters"].disaster-filter-drawer-open .disaster-group-filters {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.mode-disasters.disaster-filter-drawer-open .disaster-group-filters .disaster-filter:not(.disaster-filter-drawer-btn),
    body[data-pw-mode="disasters"].disaster-filter-drawer-open .disaster-group-filters .disaster-filter:not(.disaster-filter-drawer-btn) {
        display: none !important;
    }

    body.mode-disasters #disaster-analytics-panel,
    body[data-pw-mode="disasters"] #disaster-analytics-panel {
        width: 100%;
        display: grid;
        gap: 4px;
    }

    body.mode-disasters .disaster-kpis,
    body[data-pw-mode="disasters"] .disaster-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
    }

    body.mode-disasters .disaster-kpi,
    body[data-pw-mode="disasters"] .disaster-kpi {
        min-height: 28px;
        padding: 2px 6px;
    }

    body.mode-disasters .disaster-kpi strong,
    body[data-pw-mode="disasters"] .disaster-kpi strong {
        font-size: 14px;
    }

    body.mode-disasters .disaster-kpi small,
    body[data-pw-mode="disasters"] .disaster-kpi small {
        font-size: 8px;
    }

    body.mode-disasters .disaster-source-health,
    body[data-pw-mode="disasters"] .disaster-source-health {
        display: none;
    }

    body.mode-disasters .disaster-region-search,
    body[data-pw-mode="disasters"] .disaster-region-search {
        display: none !important;
        width: 100%;
        grid-template-columns: minmax(0, 1fr) 66px 50px;
        gap: 5px;
    }

    body.mode-disasters .disaster-region-input,
    body[data-pw-mode="disasters"] .disaster-region-input,
    body.mode-disasters .disaster-region-btn,
    body[data-pw-mode="disasters"] .disaster-region-btn,
    body.mode-disasters .disaster-region-clear,
    body[data-pw-mode="disasters"] .disaster-region-clear {
        min-height: 44px !important;
        height: 44px !important;
        font-size: 11px;
    }

    body.mode-disasters .disaster-region-brief,
    body[data-pw-mode="disasters"] .disaster-region-brief {
        width: 100%;
        max-height: 282px;
        gap: 5px;
        padding: 6px;
        overscroll-behavior: contain;
    }

    body.mode-disasters .disaster-region-brief-head,
    body[data-pw-mode="disasters"] .disaster-region-brief-head,
    body.mode-disasters .disaster-region-brief-meta,
    body[data-pw-mode="disasters"] .disaster-region-brief-meta,
    body.mode-disasters .disaster-region-news-title,
    body[data-pw-mode="disasters"] .disaster-region-news-title {
        font-size: 10px;
        line-height: 1.12;
    }

    body.mode-disasters .disaster-region-brief-head strong,
    body[data-pw-mode="disasters"] .disaster-region-brief-head strong {
        font-size: 12px;
    }

    body.mode-disasters .disaster-region-brief-actions,
    body[data-pw-mode="disasters"] .disaster-region-brief-actions {
        gap: 4px;
    }

    body.mode-disasters .disaster-region-brief-actions button,
    body[data-pw-mode="disasters"] .disaster-region-brief-actions button {
        min-height: 44px;
        padding: 0 10px;
        font-size: 10px;
    }

    body.mode-disasters .disaster-region-events,
    body[data-pw-mode="disasters"] .disaster-region-events,
    body.mode-disasters .disaster-region-news-list,
    body[data-pw-mode="disasters"] .disaster-region-news-list {
        gap: 4px;
    }

    body.mode-disasters .disaster-region-event,
    body[data-pw-mode="disasters"] .disaster-region-event {
        min-height: 44px;
    }

    body.mode-disasters .disaster-region-news-item,
    body[data-pw-mode="disasters"] .disaster-region-news-item {
        min-height: 44px;
        padding: 5px 7px;
    }

    body.mode-disasters .disaster-region-news-item strong,
    body[data-pw-mode="disasters"] .disaster-region-news-item strong {
        -webkit-line-clamp: 1;
        font-size: 9px;
        line-height: 1.1;
    }

    body.mode-disasters .disaster-region-news-item span,
    body[data-pw-mode="disasters"] .disaster-region-news-item span {
        font-size: 8px;
    }

    body.mode-disasters .disaster-region-news-list .disaster-news-empty,
    body[data-pw-mode="disasters"] .disaster-region-news-list .disaster-news-empty {
        min-height: 0;
        padding: 6px 8px;
        font-size: 10px;
        line-height: 1.18;
        text-align: left;
    }

    body.mode-disasters .cookie-banner.visible,
    body[data-pw-mode="disasters"] .cookie-banner.visible {
        left: 8px;
        right: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        max-height: 50px;
        border-radius: 10px;
        background: rgba(248, 250, 252, 0.96);
        box-shadow: 0 12px 28px rgba(0,0,0,0.28);
    }

    .ais-coverage-banner {
        left: 10px;
        right: 10px;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        width: auto;
    }

    body.mode-disasters .cookie-banner-content,
    body[data-pw-mode="disasters"] .cookie-banner-content {
        padding: 3px;
    }

    body.mode-disasters .cookie-banner-actions,
    body[data-pw-mode="disasters"] .cookie-banner-actions {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(82px, auto);
        gap: 4px;
    }

    body.mode-disasters .cookie-btn-primary,
    body.mode-disasters .cookie-btn-secondary,
    body.mode-disasters .cookie-btn-link,
    body[data-pw-mode="disasters"] .cookie-btn-primary,
    body[data-pw-mode="disasters"] .cookie-btn-secondary,
    body[data-pw-mode="disasters"] .cookie-btn-link {
        min-height: 42px;
        padding: 4px 7px;
        border-radius: 8px;
        font-size: 11px;
    }

    body.mode-disasters .disaster-source-health,
    body[data-pw-mode="disasters"] .disaster-source-health {
        display: none !important;
    }

    body.mode-disasters.disaster-region-search-open .disaster-region-search,
    body[data-pw-mode="disasters"].disaster-region-search-open .disaster-region-search,
    body.mob-no-search.mode-disasters.disaster-region-search-open .disaster-region-search,
    body.mob-no-search[data-pw-mode="disasters"].disaster-region-search-open .disaster-region-search {
        display: grid !important;
    }

    body.mode-disasters .disaster-group-filters,
    body[data-pw-mode="disasters"] .disaster-group-filters {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        overflow-x: hidden;
        overflow-y: visible;
        padding-bottom: 1px;
        scrollbar-width: none;
    }

    body.mode-disasters .disaster-group-filters::-webkit-scrollbar,
    body[data-pw-mode="disasters"] .disaster-group-filters::-webkit-scrollbar {
        display: none;
    }

    body.mode-disasters .disaster-filter,
    body[data-pw-mode="disasters"] .disaster-filter {
        min-width: 0 !important;
        width: 100% !important;
        min-height: 44px !important;
        height: 44px !important;
        padding: 4px 7px !important;
        font-size: 10px;
        justify-content: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        touch-action: manipulation;
    }

    body.mode-disasters .disaster-filter-drawer-btn,
    body[data-pw-mode="disasters"] .disaster-filter-drawer-btn {
        position: relative;
        order: -1;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        height: 44px !important;
        z-index: 2;
        pointer-events: auto;
        overflow: visible;
        background: #1b2028;
    }

    body.mode-disasters .disaster-mobile-list-filter,
    body[data-pw-mode="disasters"] .disaster-mobile-list-filter {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 0;
        pointer-events: auto;
    }

    body.mode-disasters .disaster-region-toggle-btn,
    body[data-pw-mode="disasters"] .disaster-region-toggle-btn {
        position: relative;
        order: -2;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        height: 44px !important;
        z-index: 2;
        pointer-events: auto;
        overflow: visible;
        background: #1b2028;
    }

    body.mode-disasters .disaster-region-toggle-btn::before,
    body[data-pw-mode="disasters"] .disaster-region-toggle-btn::before,
    body.mode-disasters .disaster-filter-drawer-btn::before,
    body[data-pw-mode="disasters"] .disaster-filter-drawer-btn::before,
    body.mode-disasters #disaster-prev-btn::before,
    body[data-pw-mode="disasters"] #disaster-prev-btn::before,
    body.mode-disasters #disaster-next-btn::before,
    body[data-pw-mode="disasters"] #disaster-next-btn::before,
    body.mode-disasters .disaster-list-btn::before,
    body[data-pw-mode="disasters"] .disaster-list-btn::before {
        content: "";
        position: absolute;
        left: 50%;
        width: 100%;
        min-width: 44px;
        top: 50%;
        height: 44px;
        transform: translate(-50%, -50%);
        border-radius: inherit;
        pointer-events: auto;
        background: rgba(255,255,255,0.001);
    }

    body.mode-disasters .disaster-region-toggle-btn.active,
    body[data-pw-mode="disasters"] .disaster-region-toggle-btn.active {
        background: rgba(14,165,233,0.24);
        border-color: rgba(56,189,248,0.52);
        color: #fff;
    }

    body.mode-disasters .disaster-filter-drawer-btn.active,
    body[data-pw-mode="disasters"] .disaster-filter-drawer-btn.active {
        background: rgba(14,165,233,0.24);
        border-color: rgba(56,189,248,0.52);
        color: #fff;
    }

    body.mode-disasters .disaster-kpi-updated strong,
    body[data-pw-mode="disasters"] .disaster-kpi-updated strong {
        font-size: 9px;
        line-height: 1.1;
        font-weight: 500;
        font-variant: normal !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        white-space: nowrap;
    }

    body.mode-disasters .disaster-map-marker,
    body[data-pw-mode="disasters"] .disaster-map-marker {
        width: 46px !important;
        height: 46px !important;
        pointer-events: auto;
    }

    body.mode-disasters .disaster-map-marker-icon,
    body[data-pw-mode="disasters"] .disaster-map-marker-icon {
        width: 16px;
        height: 16px;
        font-size: 9px;
        border-width: 1px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.28), 0 0 0 1px rgba(0,0,0,0.08);
    }

    body.mode-disasters .disaster-map-marker.cluster .disaster-map-marker-icon,
    body[data-pw-mode="disasters"] .disaster-map-marker.cluster .disaster-map-marker-icon {
        width: 22px;
        height: 22px;
        font-size: 11px;
        box-shadow: 0 4px 11px rgba(0,0,0,0.34), 0 0 0 3px var(--marker-ring);
    }

    body.mode-disasters .disaster-map-marker.selected,
    body[data-pw-mode="disasters"] .disaster-map-marker.selected {
        width: 46px !important;
        height: 46px !important;
    }

    body.mode-disasters .disaster-map-marker.selected .disaster-map-marker-icon,
    body[data-pw-mode="disasters"] .disaster-map-marker.selected .disaster-map-marker-icon {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    body.mode-disasters .disaster-map-marker.severity-high .disaster-map-marker-icon,
    body.mode-disasters .disaster-map-marker.severity-extreme .disaster-map-marker-icon,
    body[data-pw-mode="disasters"] .disaster-map-marker.severity-high .disaster-map-marker-icon,
    body[data-pw-mode="disasters"] .disaster-map-marker.severity-extreme .disaster-map-marker-icon {
        box-shadow: 0 2px 7px rgba(0,0,0,0.30), 0 0 0 2px var(--marker-ring);
    }

    body.mode-disasters .disasters-counter,
    body[data-pw-mode="disasters"] .disasters-counter {
        flex: 1 1 calc(48% - 4px);
        min-height: 38px;
        display: none !important;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    body.mode-disasters .disaster-navigator,
    body[data-pw-mode="disasters"] .disaster-navigator {
        display: none !important;
        pointer-events: none;
    }

    body.mode-disasters .disaster-nav-btn,
    body[data-pw-mode="disasters"] .disaster-nav-btn,
    body.mode-disasters .disaster-nav-index,
    body[data-pw-mode="disasters"] .disaster-nav-index {
        display: none !important;
    }

    body.mode-disasters #disaster-prev-btn,
    body[data-pw-mode="disasters"] #disaster-prev-btn,
    body.mode-disasters #disaster-next-btn,
    body[data-pw-mode="disasters"] #disaster-next-btn,
    body.mode-disasters .disaster-list-btn,
    body[data-pw-mode="disasters"] .disaster-list-btn {
        position: relative;
        min-width: 44px !important;
        width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
        overflow: visible;
        pointer-events: auto;
    }

    body.mode-disasters #disaster-filter-drawer,
    body[data-pw-mode="disasters"] #disaster-filter-drawer {
        width: 100%;
        display: none;
        gap: 4px;
        max-height: 152px;
        overflow-x: hidden;
        overflow-y: auto;
        padding-bottom: 0;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    body.mode-disasters #disaster-filter-drawer::-webkit-scrollbar,
    body[data-pw-mode="disasters"] #disaster-filter-drawer::-webkit-scrollbar {
        display: none;
    }

    body.mode-disasters #disaster-filter-drawer.visible,
    body[data-pw-mode="disasters"] #disaster-filter-drawer.visible {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.mode-disasters .disaster-source-toggle,
    body[data-pw-mode="disasters"] .disaster-source-toggle {
        flex: initial;
        width: 100%;
        min-height: 44px;
        height: 44px;
        font-size: 10px;
        padding: 4px 7px;
        white-space: nowrap;
    }
}

@media (min-width: 901px) {
    body.mode-disasters #disaster-filter-drawer.visible,
    body[data-pw-mode="disasters"] #disaster-filter-drawer.visible {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.mode-disasters .disaster-source-toggle,
    body[data-pw-mode="disasters"] .disaster-source-toggle {
        max-width: 100%;
        overflow: hidden;
    }
}

@media (max-width: 600px) {
    body:has(#radio-panel.open) .header,
    body:has(#tv-panel.open) .header,
    body:has(#radio-panel.open) .lang-selector,
    body:has(#tv-panel.open) .lang-selector,
    body:has(#radio-panel.open) #lang-current,
    body:has(#tv-panel.open) #lang-current {
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body:has(#radio-panel.open) .lang-selector,
    body:has(#tv-panel.open) .lang-selector {
        display: none !important;
    }

    #radio-panel.open > .mobile-panel-back,
    #tv-panel.open > .mobile-panel-back {
        position: relative;
        inset-inline-start: 1px;
        width: calc(100% - 2px);
    }

    body.tv-mobile-playback-active #tv-panel.open,
    body.radio-mobile-playback-active #radio-panel.open {
        transform: translateX(-110vw) !important;
        left: 0 !important;
    }

    body.tv-mobile-list-active #tv-panel.open,
    body.tv-mobile-list-active .tv-panel.open,
    body.radio-mobile-list-active #radio-panel.open,
    body.radio-mobile-list-active .radio-panel.open {
        transform: none !important;
        left: 0 !important;
    }

    body.mode-tv #tv-panel.open,
    body.mode-radio #radio-panel.open,
    body.tv-mobile-list-active #tv-panel.open,
    body.radio-mobile-list-active #radio-panel.open {
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        max-height: 100dvh !important;
        background: #070a10 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    #tv-panel .tv-loading-list,
    #tv-panel .tv-empty,
    #radio-panel .radio-empty-state {
        margin: 8px 0 0 !important;
        padding: 10px 12px !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, 0.045) !important;
        color: rgba(255, 255, 255, 0.58) !important;
        text-align: left !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        line-height: 1.3 !important;
    }

    #radio-panel .radio-panel-header-row,
    #tv-panel .tv-panel-header-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 10px !important;
    }

    #radio-panel .radio-panel-title,
    #tv-panel .tv-panel-title {
        min-width: 0 !important;
        overflow: hidden !important;
    }

    #radio-panel .radio-panel-title span:nth-child(3),
    #tv-panel .tv-panel-title span:nth-child(3) {
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    #radio-panel .radio-panel-actions,
    #tv-panel .tv-panel-actions {
        min-width: 0 !important;
        justify-content: flex-end !important;
    }

    .tv-player-pro {
        z-index: 9600;
        left: 10px !important;
        right: 10px !important;
        bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
        border-radius: 14px;
    }

    .tv-player-pro.mobile-list-hidden,
    .radio-player-pro.mobile-list-hidden {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(120vh) !important;
    }

    .radio-player-pro {
        left: 10px !important;
        right: 10px !important;
        bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
        width: auto !important;
        max-width: none !important;
        z-index: 9600;
        border-radius: 14px;
    }

    .tv-player-header,
    .radio-player-header {
        min-height: 48px;
    }

    .tv-player-actions button,
    .tv-ctrl-btn,
    .radio-player-actions button,
    .radio-player-controls button {
        min-width: 44px;
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .tv-channel-more {
        min-width: 44px;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .tv-hub-controls select,
    .tv-search-input,
    .tv-quick-btn,
    .tv-cat-tab {
        min-height: 44px;
        height: 44px;
    }

    .radio-hub-controls select,
    .radio-search-wrap input,
    .radio-quick-row button {
        min-height: 44px;
        height: 44px;
    }

    @media (max-width: 340px) {
        .radio-quick-row {
            gap: 5px;
        }

        .radio-quick-row button {
            padding-inline: 5px;
            font-size: 11px;
            letter-spacing: -0.02em;
        }
    }

    .tv-controls,
    .radio-player-controls {
        gap: 8px;
        padding: 10px;
        overflow-x: visible;
        flex-wrap: wrap;
    }

    .tv-volume,
    .tv-control-secondary {
        display: none !important;
    }

    #radio-volume-slider {
        display: block !important;
        flex: 1 1 120px;
        min-width: 96px;
        height: 44px;
    }

    .radio-player-controls .radio-control-secondary {
        display: inline-flex !important;
    }

    .tv-quality-select {
        display: inline-block !important;
        flex: 0 0 auto;
        min-width: 96px;
        max-width: 120px;
        height: 44px;
    }

    .tv-controls [data-tv-action="favorite"],
    .tv-controls [data-tv-action="report"],
    .tv-controls [data-tv-action="share"] {
        display: inline-flex !important;
    }

    .tv-controls .tv-mobile-list-btn,
    .radio-player-controls .radio-mobile-list-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 116px;
        width: auto;
        height: 44px;
        padding: 0 14px;
        border: 0;
        border-radius: 12px;
        background: rgba(59, 130, 246, 0.24);
        color: #fff;
        font-size: 13px;
        font-weight: 900;
        white-space: nowrap;
    }

    .tv-mobile-now-playing,
    .radio-mobile-now-playing {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 8px;
        align-items: center;
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(8, 12, 20, 0.92);
        flex-shrink: 0;
    }

    .tv-mobile-now-playing-main,
    .radio-mobile-now-playing-main {
        min-width: 0;
        min-height: 48px;
        border: 1px solid rgba(59, 130, 246, 0.26);
        border-radius: 14px;
        background: rgba(59, 130, 246, 0.14);
        color: #fff;
        display: grid;
        grid-template-columns: 10px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        padding: 8px 12px;
        text-align: left;
    }

    .radio-mobile-now-playing-main {
        border-color: rgba(29, 185, 84, 0.3);
        background: rgba(29, 185, 84, 0.14);
    }

    .tv-mobile-now-playing-dot,
    .radio-mobile-now-playing-dot {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: #ef4444;
        box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.12);
    }

    .radio-mobile-now-playing-dot {
        background: #1db954;
        box-shadow: 0 0 0 5px rgba(29, 185, 84, 0.12);
    }

    .tv-mobile-now-playing-text,
    .radio-mobile-now-playing-text {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .tv-mobile-now-playing-text strong,
    .radio-mobile-now-playing-text strong,
    .tv-mobile-now-playing-text em,
    .radio-mobile-now-playing-text em {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-style: normal;
    }

    .tv-mobile-now-playing-text strong,
    .radio-mobile-now-playing-text strong {
        font-size: 13px;
        font-weight: 900;
    }

    .tv-mobile-now-playing-text em,
    .radio-mobile-now-playing-text em {
        color: rgba(255, 255, 255, 0.58);
        font-size: 11px;
        font-weight: 750;
    }

    .tv-mobile-now-playing-stop,
    .radio-mobile-now-playing-stop {
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        font-size: 22px;
        font-weight: 900;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .radio-mobile-now-playing-stop svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
    }

    .tv-player-pro.mobile-mode-compact,
    .radio-player-pro.mobile-mode-compact {
        display: block !important;
        box-sizing: border-box !important;
        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
        width: auto !important;
        max-width: none !important;
        min-height: 56px !important;
        height: 56px !important;
        max-height: 56px !important;
        border-radius: 14px !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        overflow: hidden !important;
        z-index: 9600 !important;
    }

    .tv-player-pro.mobile-mode-compact .tv-player-header,
    .radio-player-pro.mobile-mode-compact .radio-player-header {
        display: flex !important;
        box-sizing: border-box !important;
        min-height: 54px !important;
        height: 54px !important;
        padding: 5px 6px 5px 12px !important;
        cursor: default !important;
        border-bottom: 0 !important;
    }

    .tv-player-pro.mobile-mode-compact .tv-player-title,
    .radio-player-pro.mobile-mode-compact .radio-player-now {
        min-width: 0 !important;
        flex: 1 1 auto !important;
        overflow: hidden !important;
    }

    .tv-player-pro.mobile-mode-compact .tv-name,
    .tv-player-pro.mobile-mode-compact .tv-player-status,
    .radio-player-pro.mobile-mode-compact .radio-player-title,
    .radio-player-pro.mobile-mode-compact .radio-player-meta {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .tv-player-pro.mobile-mode-compact .tv-video-container,
    .tv-player-pro.mobile-mode-compact .tv-controls,
    .tv-player-pro.mobile-mode-compact .tv-minimize-strip,
    .tv-player-pro.mobile-mode-compact .tv-resize-handle,
    .radio-player-pro.mobile-mode-compact .radio-player-source,
    .radio-player-pro.mobile-mode-compact .radio-player-status,
    .radio-player-pro.mobile-mode-compact .radio-player-controls {
        display: none !important;
    }

    .tv-player-pro.mobile-mode-compact .tv-player-actions > :not(.tv-cross-mode-expand):not([data-tv-action="stop"]),
    .radio-player-pro.mobile-mode-compact .radio-player-actions > :not(.radio-cross-mode-expand):not([data-radio-action="close"]) {
        display: none !important;
    }

    .tv-player-pro.mobile-mode-compact .tv-cross-mode-expand,
    .radio-player-pro.mobile-mode-compact .radio-cross-mode-expand {
        display: inline-flex !important;
    }

    .tv-player-pro.mobile-mode-compact .tv-player-actions,
    .radio-player-pro.mobile-mode-compact .radio-player-actions {
        display: flex !important;
        flex: 0 0 auto !important;
        gap: 6px !important;
    }

    .tv-player-pro.mobile-mode-compact .tv-player-actions button,
    .radio-player-pro.mobile-mode-compact .radio-player-actions button {
        min-width: 44px !important;
        width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
    }

    body.mobile-media-cross-mode-active .zoom-controls {
        bottom: calc(154px + env(safe-area-inset-bottom, 0px)) !important;
    }

    body.mobile-media-cross-mode-active.mode-tv #tv-panel .tv-panel-content,
    body.mobile-media-cross-mode-active[data-pw-mode="tv"] #tv-panel .tv-panel-content,
    body.mobile-media-cross-mode-active.mode-radio #radio-panel .radio-panel-content,
    body.mobile-media-cross-mode-active[data-pw-mode="radio"] #radio-panel .radio-panel-content {
        padding-bottom: calc(162px + env(safe-area-inset-bottom, 0px)) !important;
        scroll-padding-bottom: calc(162px + env(safe-area-inset-bottom, 0px));
    }
}

/* Coarse pointers need full-size hit areas even when a tablet uses desktop layout. */
@media (pointer: coarse), (hover: none) {
    button,
    select,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    [role="button"] {
        min-width: 44px;
        min-height: 44px;
    }

    #mode-data-status-sources,
    .site-footer a,
    .site-footer .status-item {
        display: inline-flex;
        align-items: center;
        min-height: 44px !important;
    }

    /* WebKit keeps native selects at their intrinsic height unless height is
       explicit; min-height alone is ignored on iPad-sized touch layouts. */
    select {
        height: 44px !important;
        min-height: 44px !important;
        box-sizing: border-box;
    }

    .leaflet-bar a,
    .leaflet-control-zoom-in,
    .leaflet-control-zoom-out {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        line-height: 44px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    body.mode-stats .zoom-controls,
    body[data-pw-mode="stats"] .zoom-controls {
        display: none !important;
    }
}

@media (max-width: 1180px) {
    #mode-data-status-retry,
    #mode-data-status-sources,
    .close-btn,
    .compare-clear-btn,
    .disaster-filter,
    .disaster-region-btn,
    .disaster-region-clear,
    .flight-radar-filter-toggle,
    .geography-source-select,
    .status-item {
        min-height: 44px !important;
    }

    .close-btn {
        min-width: 44px !important;
        width: 44px !important;
        height: 44px !important;
    }

    .status-item {
        padding: 0 8px;
    }

    .mode-data-status-slot:not(:empty) {
        display: block;
        flex: 0 0 auto;
        padding: 0;
    }

    .mode-data-status.mode-data-status--media-panel {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        transform: none;
    }

    body.mode-space .space-filters.visible,
    body[data-pw-mode="space"] .space-filters.visible {
        top: 112px;
    }

    body.mode-space .space-provider-status,
    body[data-pw-mode="space"] .space-provider-status {
        top: calc(164px + var(--pw-safe-top, 0px));
    }
}

/* Satellite Tracker 3D dynamic panels */
#catalog-control-panel,
#catalog-legend,
#catalog-selected-panel {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
}

#catalog-selected-panel canvas {
    image-rendering: auto;
}

.catalog-telemetry-caption {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 9px;
    line-height: 1.35;
}

.catalog-telemetry-caption strong {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
}

body.has-catalog-panel .zoom-controls,
body.has-catalog-panel .ruler-btn,
body.has-catalog-panel #ruler-panel,
body.has-catalog-legend .zoom-controls > :not(.share-btn),
body.has-catalog-legend .ruler-btn,
body.has-catalog-legend #ruler-panel {
    display: none !important;
}

@media (min-width: 901px) {
    body.mode-space #catalog-legend,
    body[data-pw-mode="space"] #catalog-legend {
        top: calc(116px + var(--pw-safe-top, 0px)) !important;
        max-height: calc(100vh - 132px - var(--pw-safe-top, 0px)) !important;
    }

    #catalog-selected-panel {
        top: calc(116px + var(--pw-safe-top, 0px)) !important;
        right: calc(84px + env(safe-area-inset-right, 0px)) !important;
        max-height: calc(100vh - 132px - var(--pw-safe-top, 0px)) !important;
        overflow-y: auto !important;
        z-index: 9500 !important;
    }

    body.mode-space .space-left-stack,
    body[data-pw-mode="space"] .space-left-stack {
        position: fixed;
        top: calc(132px + var(--pw-safe-top, 0px));
        left: calc(15px + var(--pw-safe-left, 0px));
        z-index: 8900;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: min(330px, calc(100vw - 30px - var(--pw-safe-left, 0px) - var(--pw-safe-right, 0px)));
        height: calc(100dvh - 148px - var(--pw-safe-top, 0px) - var(--pw-safe-bottom, 0px));
        pointer-events: none;
    }

    body.mode-space .space-left-stack > .space-provider-status,
    body[data-pw-mode="space"] .space-left-stack > .space-provider-status {
        position: relative;
        inset: auto;
        z-index: auto;
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        max-height: min(220px, 40dvh);
        box-sizing: border-box;
        overflow-y: auto;
        pointer-events: auto;
    }

    body.mode-space .space-left-stack > #catalog-control-panel,
    body[data-pw-mode="space"] .space-left-stack > #catalog-control-panel {
        position: relative !important;
        inset: auto !important;
        flex: 0 1 auto;
        min-height: 0;
        max-height: 100% !important;
        margin: 0;
        pointer-events: auto;
    }
}

@media (min-width: 901px) and (max-width: 1199px) {
    body.mode-space:not(.has-catalog-panel) .mode-data-status:not(.mode-data-status--embedded),
    body[data-pw-mode="space"]:not(.has-catalog-panel) .mode-data-status:not(.mode-data-status--embedded) {
        right: auto;
        left: 328px;
        width: min(560px, calc(100vw - 612px));
        transform: none;
    }

    body.mode-space #catalog-legend,
    body[data-pw-mode="space"] #catalog-legend {
        top: calc(238px + var(--pw-safe-top, 0px)) !important;
        max-height: calc(100vh - 254px - var(--pw-safe-top, 0px)) !important;
    }
}

@media (min-width: 1200px) and (max-width: 1439px) {
    body.mode-space .mode-data-status:not(.mode-data-status--media-panel),
    body[data-pw-mode="space"] .mode-data-status:not(.mode-data-status--media-panel) {
        right: auto;
        left: 360px;
        width: min(560px, calc(100vw - 628px));
        transform: none;
    }
}

@media (max-width: 900px) {
    body.mode-space .space-filters.visible,
    body[data-pw-mode="space"] .space-filters.visible {
        display: none !important;
    }

    body.mode-space .space-provider-status,
    body[data-pw-mode="space"] .space-provider-status,
    body.mob-no-search.mode-space .space-provider-status,
    body.mob-no-search[data-pw-mode="space"] .space-provider-status {
        top: 108px !important;
        left: calc(10px + var(--pw-safe-left)) !important;
        right: calc(10px + var(--pw-safe-right)) !important;
        max-width: none !important;
        height: 30px !important;
        min-height: 30px !important;
        padding: 4px 6px !important;
        z-index: 8900 !important;
        background: rgba(8, 10, 14, 0.94) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        overflow: hidden !important;
    }

    body.mode-space .space-provider-status:has([data-mode-status-slot="space"]:not(:empty)),
    body[data-pw-mode="space"] .space-provider-status:has([data-mode-status-slot="space"]:not(:empty)) {
        height: auto !important;
        min-height: 0 !important;
        max-height: min(140px, calc(100dvh - 124px)) !important;
        flex-direction: column;
        align-items: stretch !important;
        overflow: auto !important;
    }

    body.mode-space .space-provider-status-title,
    body[data-pw-mode="space"] .space-provider-status-title {
        display: none !important;
    }

    body.mode-space .space-provider-pills,
    body[data-pw-mode="space"] .space-provider-pills {
        min-width: 0 !important;
        width: 100% !important;
    }

    body.mode-space .space-source-pill,
    body[data-pw-mode="space"] .space-source-pill {
        max-width: 118px !important;
        min-height: 20px !important;
        padding: 3px 6px !important;
    }

    #catalog-control-panel {
        top: auto !important;
        left: 10px !important;
        right: 10px !important;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        width: auto !important;
        height: 56px !important;
        max-height: 56px !important;
        overflow: hidden !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box !important;
        padding: 6px !important;
        font-size: 12px !important;
        border-radius: 12px !important;
        background: #080a0e !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        z-index: 8900 !important;
    }

    body:has(.cookie-banner.visible) #catalog-control-panel {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    }

    #catalog-control-panel > div {
        margin: 0 !important;
    }

    #catalog-control-panel > div:first-child > div:first-child,
    #catalog-control-panel > div:nth-of-type(2),
    #catalog-control-panel > div:nth-of-type(3) {
        display: none !important;
    }

    body.mode-space #catalog-legend,
    body[data-pw-mode="space"] #catalog-legend {
        top: 144px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-height: 52px !important;
        display: none !important;
        align-items: center !important;
        gap: 8px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 6px 8px !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
        background: rgba(8, 10, 14, 0.94) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    #catalog-legend > div {
        display: none !important;
    }

    #catalog-legend label {
        flex: 0 0 auto !important;
        margin: 0 !important;
        padding: 0 8px 0 0 !important;
        gap: 6px !important;
    }

    #catalog-legend label span:last-child {
        max-width: 128px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    #catalog-search-input,
    #catalog-filter-perigee-min,
    #catalog-filter-perigee-max,
    #catalog-filter-incl-min,
    #catalog-filter-incl-max,
    #catalog-filter-country,
    #catalog-density-mode,
    #catalog-control-panel button {
        min-height: 44px !important;
        height: 44px !important;
        box-sizing: border-box !important;
        font-size: 16px !important;
    }

    #catalog-control-panel label,
    #catalog-legend label {
        min-height: 44px !important;
        box-sizing: border-box !important;
    }

    #catalog-control-panel input[type="checkbox"],
    #catalog-legend input[type="checkbox"],
    #catalog-follow-earth {
        min-width: 44px !important;
        width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
        flex: 0 0 44px !important;
        box-sizing: border-box !important;
    }

    #catalog-restore-fab {
        min-width: 44px !important;
        width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
    }

    #catalog-selected-panel {
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: auto !important;
        max-height: 54vh !important;
        overflow-y: auto !important;
        border-radius: 14px 14px 0 0 !important;
        padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
        z-index: 9500 !important;
        background: #101114 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-sizing: border-box !important;
    }

    #catalog-selected-panel > .catalog-selected-header {
        position: sticky !important;
        top: -14px !important;
        z-index: 3 !important;
        margin: -14px -16px 8px !important;
        padding: 14px 16px 8px !important;
        background: linear-gradient(180deg, #101114 0%, #101114 82%, rgba(16, 17, 20, 0.92) 100%) !important;
    }

    #catalog-selected-panel [data-catalog-action] {
        min-height: 44px !important;
    }

    #catalog-selected-panel [data-catalog-action="deselect"] {
        min-width: 44px !important;
        width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 24px !important;
        margin: 0 !important;
    }

    #catalog-counter {
        display: none !important;
    }

    body.has-catalog-panel #catalog-control-panel,
    body.has-catalog-panel #catalog-legend {
        display: none !important;
    }

    body.has-catalog-panel .daynight-toggle,
    body.has-catalog-legend .daynight-toggle {
        display: none !important;
    }

    body.mode-space.has-catalog-legend .zoom-controls,
    body[data-pw-mode="space"].has-catalog-legend .zoom-controls {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
        z-index: 9001 !important;
    }

    body.mode-space.has-catalog-legend:has(.cookie-banner.visible) .zoom-controls,
    body[data-pw-mode="space"].has-catalog-legend:has(.cookie-banner.visible) .zoom-controls {
        bottom: calc(140px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Final consent layout: compact enough for the globe, still fully actionable. */
@media (min-width: 901px) {
    body .cookie-banner.visible {
        left: 50%;
        right: auto;
        bottom: 16px;
        width: min(760px, calc(100vw - 32px));
        max-width: 760px;
        transform: translateX(-50%);
        border-radius: 8px;
        animation: cookieBarUp 0.2s ease;
    }

    body .cookie-banner-content {
        display: grid;
        grid-template-columns: minmax(220px, 1fr) auto;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
    }

    body .cookie-banner-title {
        margin: 0 0 2px;
        font-size: 14px;
    }

    body .cookie-banner-desc {
        display: -webkit-box;
        margin: 0;
        overflow: hidden;
        font-size: 11px;
        line-height: 1.3;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    body .cookie-banner-actions {
        display: grid;
        grid-template-columns: repeat(4, minmax(88px, auto));
        gap: 6px;
    }

    body .cookie-btn-primary,
    body .cookie-btn-secondary,
    body .cookie-btn-link,
    body .cookie-privacy-link {
        grid-column: auto;
        min-height: 44px;
        box-sizing: border-box;
        padding: 7px 9px;
        font-size: 12px;
        white-space: nowrap;
    }

    body .cookie-privacy-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body:has(.cookie-banner.visible) .site-footer,
    body.geography-2d-active:has(.cookie-banner.visible) .geography-imagery-attribution {
        bottom: 88px !important;
    }
}

@media (max-width: 900px) {
    body.mode-radio .search-container,
    body[data-pw-mode="radio"] .search-container,
    body.mode-tv .search-container,
    body[data-pw-mode="tv"] .search-container {
        display: none !important;
    }

    body .cookie-banner.visible {
        width: auto;
        max-height: none !important;
        overflow: visible !important;
        transform: none;
    }

    .flights-filter,
    .ships-filter,
    .disaster-filter,
    .weather-filter,
    .space-submode,
    .space-filter,
    #lightning-toggle,
    .lightning-toggle,
    .geography-source-select,
    .radio-hub-controls select,
    .radio-search-wrap input,
    .radio-quick-row button,
    .tv-hub-controls select,
    .tv-search-input,
    .tv-quick-btn,
    .tv-cat-tab {
        min-height: 44px !important;
        height: 44px !important;
    }

    body .cookie-btn-primary,
    body .cookie-btn-secondary,
    body .cookie-btn-link {
        height: auto;
        min-height: 44px;
        box-sizing: border-box;
        line-height: 1.2;
        overflow-wrap: anywhere;
        white-space: normal;
    }
}

@keyframes cookieBarUp {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

img[data-photo-expand="true"] {
    cursor: zoom-in;
}

.catalog-satellite-photo {
    position: relative;
    min-height: 118px;
    margin: 0 0 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.catalog-satellite-photo > img {
    display: block;
    width: 100%;
    height: 138px;
    object-fit: cover;
}

.catalog-satellite-photo-placeholder {
    display: grid;
    min-height: 118px;
    place-items: center;
    align-content: center;
    gap: 7px;
    padding: 10px;
    color: rgba(255, 255, 255, 0.68);
    text-align: center;
}

.catalog-satellite-photo-placeholder span {
    font-size: 30px;
}

.catalog-satellite-photo-placeholder small {
    font-size: 10px;
    line-height: 1.25;
}

.catalog-satellite-photo-meta {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 2px;
    padding: 18px 7px 6px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
    color: rgba(255, 255, 255, 0.82);
    font-size: 8px;
    line-height: 1.2;
}

.catalog-satellite-photo-meta a {
    overflow: hidden;
    color: #8be9fd;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

img[data-photo-expand="true"]:focus-visible {
    outline: 3px solid #67e8f9;
    outline-offset: -3px;
}

body.media-image-viewer-open {
    overflow: hidden;
}

.media-image-viewer[hidden] {
    display: none;
}

.media-image-viewer {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: max(56px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(0, 3, 12, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.media-image-viewer-figure {
    display: grid;
    gap: 10px;
    max-width: min(1400px, 94vw);
    max-height: 90vh;
    margin: 0;
    place-items: center;
}

.media-image-viewer-image {
    display: block;
    max-width: 94vw;
    max-height: 84vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.72);
}

.media-image-viewer-caption {
    max-width: min(900px, 90vw);
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

.media-image-viewer-close {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 600px) {
    .media-image-viewer {
        padding-inline: 8px;
    }

    .media-image-viewer-image {
        max-width: 96vw;
        max-height: 80vh;
        border-radius: 8px;
    }
}

/* Short touch landscape: keep media data/list content inside the viewport. */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    body.mode-radio #radio-panel.open,
    body[data-pw-mode="radio"] #radio-panel.open,
    body.mode-tv #tv-panel.open,
    body[data-pw-mode="tv"] #tv-panel.open {
        display: flex !important;
        overflow: hidden !important;
    }

    #radio-panel .mobile-panel-back,
    #tv-panel .mobile-panel-back {
        display: none !important;
    }

    #radio-panel .radio-panel-header,
    #tv-panel .tv-panel-header {
        flex: 0 1 132px;
        max-height: 132px;
        padding: 8px !important;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #radio-panel .mode-data-status-slot:not(:empty),
    #tv-panel .mode-data-status-slot:not(:empty) {
        flex: 0 0 auto;
        padding: 4px 6px;
    }

    #radio-panel .radio-panel-content,
    #tv-panel .tv-panel-content {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    body.mode-disasters.disaster-list-open .mode-data-status,
    body[data-pw-mode="disasters"].disaster-list-open .mode-data-status {
        display: none !important;
    }

    body.mode-stats .zoom-controls,
    body[data-pw-mode="stats"] .zoom-controls {
        display: none !important;
    }

    body.geography-2d-active .leaflet-control-zoom-in,
    body.geography-2d-active .leaflet-control-zoom-out {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        line-height: 44px !important;
    }

    body.geography-2d-active .geography-source-info-toggle {
        min-height: 44px !important;
    }

    #status-bar .status-about {
        min-width: 44px !important;
    }
}

/* User-path T01/H04 responsive fixes. */
@media (max-width: 900px) {
    body.economy-panel-open .search-container,
    body.compare-panel-open .search-container {
        visibility: hidden !important;
        pointer-events: none !important;
    }

    #compare-overlay.opening {
        pointer-events: none !important;
    }

    .npp-marker,
    .power-plant-marker {
        min-width: 44px !important;
        width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
    }

    .economy-panel.visible .economy-panel-header {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        min-height: 44px;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        background: rgb(0, 0, 0);
    }

    .economy-panel.visible .economy-panel-header h3 {
        min-width: 0;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .economy-panel.visible .economy-panel-header .close-btn {
        flex: 0 0 44px;
        min-width: 44px !important;
        width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
    }

    .sanctioned-vessels-legend [data-ship-action="show-sanctioned-list"] {
        display: inline-flex;
        min-height: 44px !important;
        align-items: center;
        justify-content: center;
    }
}

/* Ships user paths: keep live status and detail surfaces off primary controls. */
@media (min-width: 1200px) {
    body.mode-ships.ship-tracking-active:not(.ship-info-active) .mode-data-status:not(.mode-data-status--media-panel),
    body[data-pw-mode="ships"].ship-tracking-active:not(.ship-info-active) .mode-data-status:not(.mode-data-status--media-panel) {
        right: 15px;
    }

    body.mode-ships.ship-info-active .mode-data-status:not(.mode-data-status--media-panel),
    body[data-pw-mode="ships"].ship-info-active .mode-data-status:not(.mode-data-status--media-panel) {
        top: auto;
        bottom: 64px;
    }

    body.mode-ships:has(#dark-vessels-legend) .mode-data-status:not(.mode-data-status--media-panel),
    body[data-pw-mode="ships"]:has(#dark-vessels-legend) .mode-data-status:not(.mode-data-status--media-panel),
    body.mode-ships:has(.sanctioned-vessels-legend) .mode-data-status:not(.mode-data-status--media-panel),
    body[data-pw-mode="ships"]:has(.sanctioned-vessels-legend) .mode-data-status:not(.mode-data-status--media-panel) {
        right: 340px;
    }
}

@media (max-width: 900px) {
    body.mode-ships.ship-info-active #ship-search-container.visible,
    body[data-pw-mode="ships"].ship-info-active #ship-search-container.visible {
        display: none !important;
        pointer-events: none !important;
    }

    #ships-filter-both,
    #ships-filter-sanctioned,
    #ships-filter-dark {
        position: relative;
        flex: 0 0 44px;
        min-width: 44px;
        width: 44px;
        min-height: 44px;
        padding: 0 !important;
        overflow: hidden;
        color: transparent !important;
        font-size: 0;
    }

    #ships-filter-both::before,
    #ships-filter-sanctioned::before,
    #ships-filter-dark::before {
        position: absolute;
        inset: 0;
        display: grid;
        place-items: center;
        color: #fff;
        font-size: 16px;
    }

    #ships-filter-both::before { content: "🚢⚓"; }
    #ships-filter-sanctioned::before { content: "⚠️"; }
    #ships-filter-dark::before { content: "🛰️"; }
}

@media (min-width: 769px) {
    body:has(#bloc-summary-panel.visible) .mode-data-status:not(.mode-data-status--media-panel) {
        right: 352px;
        left: auto;
        width: min(520px, calc(100vw - 384px));
        transform: none;
    }
}

/* S02 mobile catalog drawer. */
@media (max-width: 900px) {
    /* Space/Stats drawers sit above the regular mobile header. Keep the
       language control physically tappable while those drawers are open. */
    body.space-mobile-controls-open .lang-selector,
    body[data-pw-mode="space"].space-mobile-controls-open .lang-selector,
    body.stats-mobile-controls-open .lang-selector,
    body[data-pw-mode="stats"].stats-mobile-controls-open .lang-selector {
        z-index: 10030 !important;
    }

    body.mode-space.space-mobile-controls-open:not(.has-catalog-panel) .space-provider-status,
    body[data-pw-mode="space"].space-mobile-controls-open:not(.has-catalog-panel) .space-provider-status {
        display: none !important;
        pointer-events: none !important;
    }

    body.space-mobile-controls-open:not(.has-catalog-panel) #catalog-control-panel {
        display: block !important;
        bottom: calc(124px + env(safe-area-inset-bottom, 0px)) !important;
        height: auto !important;
        max-height: min(42dvh, 310px) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        z-index: 9100 !important;
    }

    body[data-pw-mode="space"].space-mobile-controls-open:not(.has-catalog-panel) #catalog-control-panel {
        display: block !important;
        bottom: calc(124px + env(safe-area-inset-bottom, 0px)) !important;
        height: auto !important;
        max-height: min(42dvh, 310px) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        z-index: 9100 !important;
    }

    body.space-mobile-controls-open:not(.has-catalog-panel) #catalog-control-panel > div:nth-of-type(2) {
        display: block !important;
    }

    body[data-pw-mode="space"].space-mobile-controls-open:not(.has-catalog-panel) #catalog-control-panel > div:nth-of-type(2) {
        display: block !important;
    }

    body.mode-space.space-mobile-controls-open:not(.has-catalog-panel) #catalog-legend {
        top: 144px !important;
        display: flex !important;
        max-height: 52px !important;
        z-index: 9100 !important;
    }

    body[data-pw-mode="space"].space-mobile-controls-open:not(.has-catalog-panel) #catalog-legend {
        top: 144px !important;
        display: flex !important;
        max-height: 52px !important;
        z-index: 9100 !important;
    }

    body.mode-space.space-mobile-controls-open:not(.has-catalog-panel) .mode-data-status:not(.mode-data-status--embedded),
    body[data-pw-mode="space"].space-mobile-controls-open:not(.has-catalog-panel) .mode-data-status:not(.mode-data-status--embedded) {
        display: none !important;
    }

    #catalog-legend label[data-catalog-type] {
        min-height: 44px !important;
    }

    body.space-mobile-controls-open:not(.has-catalog-panel) #catalog-filter-perigee-min,
    body.space-mobile-controls-open:not(.has-catalog-panel) #catalog-filter-perigee-max,
    body.space-mobile-controls-open:not(.has-catalog-panel) #catalog-filter-incl-min,
    body.space-mobile-controls-open:not(.has-catalog-panel) #catalog-filter-incl-max,
    body.space-mobile-controls-open:not(.has-catalog-panel) #catalog-filter-country,
    body.space-mobile-controls-open:not(.has-catalog-panel) [data-catalog-action="reset-filters"] {
        min-height: 44px !important;
        height: 44px !important;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    body.space-mobile-controls-open:not(.has-catalog-panel) #catalog-control-panel,
    body[data-pw-mode="space"].space-mobile-controls-open:not(.has-catalog-panel) #catalog-control-panel {
        top: 144px !important;
        right: calc(50% + 4px) !important;
        bottom: 64px !important;
        left: 8px !important;
        width: auto !important;
        max-height: none !important;
    }

    body.mode-space.space-mobile-controls-open:not(.has-catalog-panel) #catalog-legend,
    body[data-pw-mode="space"].space-mobile-controls-open:not(.has-catalog-panel) #catalog-legend {
        top: 144px !important;
        right: 8px !important;
        bottom: 64px !important;
        left: calc(50% + 4px) !important;
        width: auto !important;
        max-height: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

}

/* Launches owns the left/detail surface while its panel is open. The shared
   source card otherwise competes for the same fixed area and can cover the
   sticky launches header/actions (its embedded status has a global z-index). */
body.mode-space:has(#launches-panel.visible:not(.collapsed)) .space-provider-status,
body[data-pw-mode="space"]:has(#launches-panel.visible:not(.collapsed)) .space-provider-status,
body.mode-space:has(#launches-panel.visible:not(.collapsed)) #mode-data-status,
body[data-pw-mode="space"]:has(#launches-panel.visible:not(.collapsed)) #mode-data-status {
    display: none !important;
    pointer-events: none !important;
}

/* The meteor list uses the same left rail. Its first investigation targets
   must never sit underneath the shared provider card. */
body.mode-space:has(#meteors-panel.visible:not(.collapsed)) .space-provider-status,
body[data-pw-mode="space"]:has(#meteors-panel.visible:not(.collapsed)) .space-provider-status,
body.mode-space:has(#meteors-panel.visible:not(.collapsed)) #mode-data-status,
body[data-pw-mode="space"]:has(#meteors-panel.visible:not(.collapsed)) #mode-data-status {
    display: none !important;
    pointer-events: none !important;
}

/* A launch row is the tap target. Keep one complete row inside the short
   mobile bottom sheet so its physical target never extends past the viewport. */
@media (max-width: 900px) {
    #launches-panel .launch-item {
        padding: 8px 12px;
    }

    #launches-panel .launch-desc {
        display: none;
    }

    #launches-panel .launch-rocket,
    #launches-panel .launch-pad {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Entity detail owns the same left rail as provider status. */
body.mode-space:has(#spaceport-info-panel.visible) .space-provider-status,
body[data-pw-mode="space"]:has(#spaceport-info-panel.visible) .space-provider-status,
body.mode-space:has(#observatory-info-panel.visible) .space-provider-status,
body[data-pw-mode="space"]:has(#observatory-info-panel.visible) .space-provider-status,
body.mode-space:has(#spaceport-info-panel.visible) #mode-data-status,
body[data-pw-mode="space"]:has(#spaceport-info-panel.visible) #mode-data-status,
body.mode-space:has(#observatory-info-panel.visible) #mode-data-status,
body[data-pw-mode="space"]:has(#observatory-info-panel.visible) #mode-data-status {
    display: none !important;
    pointer-events: none !important;
}

/* Airport board owns the right rail. Keep map controls beside it instead of
   leaving them underneath its high-z-index surface. */
@media (min-width: 901px) {
    body.mode-flights.airport-detail-active .zoom-controls,
    body[data-pw-mode="flights"].airport-detail-active .zoom-controls {
        right: 390px;
    }

    body.mode-flights.airport-detail-active .daynight-toggle,
    body[data-pw-mode="flights"].airport-detail-active .daynight-toggle {
        right: 390px;
    }

    body.mode-flights.airport-detail-active #ruler-panel,
    body[data-pw-mode="flights"].airport-detail-active #ruler-panel {
        right: 450px;
    }
}

@media (max-width: 900px) {
    body.mode-flights.airport-detail-active .zoom-controls,
    body[data-pw-mode="flights"].airport-detail-active .zoom-controls {
        bottom: calc(52vh + 12px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

body:has(#airport-flights-panel.visible) .site-footer {
    display: none;
}
