/* =====================================================
   AeroSynth PWA — Complete UI Stylesheet
   Full glassmorphic dark-mode aviation theme
   ===================================================== */

/* ── CSS Variables ── */
:root {
    --bg: #06061a;
    --card: rgba(12, 12, 36, 0.82);
    --glass: rgba(18, 18, 48, 0.78);
    --border: rgba(108, 99, 255, 0.12);
    --text: #e8e8f0;
    --dim: #6a6a8a;
    --accent: #6C63FF;
    --eff: #00e5ff;
    --exp: #ff6b6b;
    --warn: #ffd740;
    --ts: #888;
    --radius: 14px;
    --panel-w: 320px;
    --glass-blur: 16px;
    --shadow-soft: 0 0 20px rgba(108, 99, 255, 0.3);
    --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
    --transition-panel: 0.32s var(--ease-out-expo);
}

/* ── Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Loading Overlay ── */
.lo {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.35s ease-out, visibility 0.35s;
    will-change: opacity, visibility;
}

.lo.hidden {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none !important;
}

.spin {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(108, 99, 255, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.ltxt {
    margin-top: 18px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.3px;
}

.lprog {
    margin-top: 8px;
    font-size: 11px;
    color: var(--dim);
    font-family: 'Space Mono', monospace;
}

/* ── Map & Globe Containers ── */
#map {
    position: fixed;
    inset: 0;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.38s ease, filter 0.38s ease;
    will-change: opacity, filter;
}

#map.hidden {
    opacity: 0;
    pointer-events: none;
    filter: saturate(0.95) blur(0.5px);
}

#globe-container {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: block;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
    will-change: opacity;
}

#globe-container.active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Globe Plane Overlay ── */
#globe-plane-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    display: none;
}

#globe-plane-overlay.active {
    display: block;
}

#globe-plane-sprite {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

/* ── Globe Info Popup ── */
#ginfo {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    padding: 12px 18px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 30;
}

#ginfo.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.gt {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.gr {
    font-size: 11px;
    color: var(--dim);
}

.gr span {
    color: var(--accent);
}

/* ══════════════════════════════════════════════
   PANEL — Left Sidebar
   ══════════════════════════════════════════════ */
.panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--panel-w);
    z-index: 300;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform var(--transition-panel);
    will-change: transform;
    contain: layout style;
    scrollbar-width: thin;
    scrollbar-color: rgba(108, 99, 255, 0.25) transparent;
    background: linear-gradient(180deg, rgba(6, 6, 26, 0.97) 0%, rgba(8, 8, 28, 0.95) 100%);
    border-right: 1px solid var(--border);
}

.sheet-handle {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 6px;
    position: sticky;
    top: 0;
    z-index: 5;
    background: linear-gradient(180deg, rgba(6, 6, 26, 0.98) 0%, rgba(6, 6, 26, 0.6) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sheet-grab {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.sheet-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--dim);
    text-transform: uppercase;
}

.panel.collapsed {
    transform: translate3d(calc(-1 * var(--panel-w)), 0, 0);
}

.panel::-webkit-scrollbar {
    width: 5px;
}

.panel::-webkit-scrollbar-thumb {
    background: rgba(108, 99, 255, 0.25);
    border-radius: 10px;
}

/* ── Glass Card Base ── */
.glass {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.panel .glass:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.1);
    border-color: rgba(108, 99, 255, 0.2);
}

/* ── Section Labels ── */
.lbl {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--dim);
    margin-bottom: 8px;
}

.wxcard > .lbl:first-child {
    font-size: 0;
}

.wxcard > .lbl:first-child::before {
    content: "\1F6F0  Live Weather";
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--dim);
}

.sublbl {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dim);
    margin-bottom: 5px;
}

/* ── Header ── */
.hdr {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

.logo {
    font-size: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(108, 99, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.logo::before {
    content: "\2708";
    font-size: 26px;
    line-height: 1;
}

.hdr h1 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
}

.hdr p {
    font-size: 10px;
    color: var(--dim);
    margin-top: 2px;
}

/* Status Row */
.status-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.sdot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sdot.checking {
    background: #ffd740;
    animation: pulse-dot 1.2s infinite;
}

.sdot.online {
    background: #00e676;
    box-shadow: 0 0 6px #00e67680;
}

.sdot.offline {
    background: #ef5350;
    box-shadow: 0 0 6px #ef535080;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.slbl {
    font-size: 9px;
    color: var(--dim);
    font-family: 'Space Mono', monospace;
}

.utc-clock {
    font-size: 9px;
    color: var(--accent);
    font-family: 'Space Mono', monospace;
    margin-left: auto;
}

/* ── PWA Install Banner ── */
#installBanner {
    display: none;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(108, 99, 255, 0.25);
    border-radius: 10px;
    padding: 10px 12px;
    align-items: center;
    gap: 8px;
}

#installBanner.show {
    display: flex;
}

.install-txt {
    flex: 1;
    font-size: 11px;
    line-height: 1.4;
}

.install-txt strong {
    display: block;
    font-size: 12px;
}

.install-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.install-dismiss {
    background: none;
    border: none;
    color: var(--dim);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

/* ── View Toggle ── */
.vtcard {
    padding: 10px 12px;
}

.vt {
    display: flex;
    gap: 6px;
}

.vbtn {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 8px 6px;
    color: var(--dim);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.vbtn:hover {
    background: rgba(108, 99, 255, 0.08);
}

.vbtn.active {
    background: rgba(108, 99, 255, 0.14);
    border-color: rgba(108, 99, 255, 0.35);
    color: #fff;
    box-shadow: 0 0 12px rgba(108, 99, 255, 0.15);
}

.vi {
    font-size: 0;
}

.vi::before {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
}

/* ── Options Grid (map/globe style) ── */
.ocard {
    padding: 10px 12px;
}

.ogrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.obtn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 7px 4px;
    color: var(--dim);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: all 0.2s;
}

.obtn:hover {
    background: rgba(108, 99, 255, 0.08);
}

.obtn.active {
    background: rgba(108, 99, 255, 0.14);
    border-color: rgba(108, 99, 255, 0.3);
    color: #fff;
}

.oi {
    font-size: 0;
}

.oi::before {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
}

/* ── Globe Extras ── */
.gext {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.gext.show {
    display: flex;
}

.mg {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mbtn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 7px;
    padding: 5px 8px;
    color: var(--dim);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mbtn:hover {
    background: rgba(108, 99, 255, 0.08);
}

.mbtn.active {
    background: rgba(108, 99, 255, 0.14);
    border-color: rgba(108, 99, 255, 0.3);
    color: #fff;
}

/* ── Toggle Switches ── */
.trow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.tlbl {
    font-size: 10px;
    color: var(--dim);
    font-weight: 500;
}

.tsw {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
    cursor: pointer;
}

.tsw input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ttrack {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: background 0.25s;
}

.ttrack::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
}

.tsw input:checked+.ttrack {
    background: var(--accent);
}

.tsw input:checked+.ttrack::after {
    transform: translateX(16px);
}

/* Small toggle (conflict avoid) */
.tsw-sm {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

.tsw-sm input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ttrack-sm {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: background 0.25s;
}

.ttrack-sm::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 11px;
    height: 11px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
}

.tsw-sm input:checked+.ttrack-sm {
    background: var(--accent);
}

.tsw-sm input:checked+.ttrack-sm::after {
    transform: translateX(13px);
}

/* ── Filter Buttons ── */
.fcard {
    padding: 10px 12px;
}

.fg {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.fbtn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 5px 8px;
    color: var(--dim);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.fbtn:hover {
    background: rgba(108, 99, 255, 0.06);
}

.fbtn.active {
    background: rgba(108, 99, 255, 0.12);
    border-color: rgba(108, 99, 255, 0.25);
    color: #fff;
}

.fbtn.none-btn.active {
    background: rgba(0, 230, 118, 0.12);
    border-color: rgba(0, 230, 118, 0.3);
    color: #00e676;
}

.fbtn.hide-btn.active {
    background: rgba(239, 83, 80, 0.12);
    border-color: rgba(239, 83, 80, 0.3);
    color: #ef5350;
}

.fdot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Legend ── */
.lgcard {
    padding: 10px 12px;
}

.lgw {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.lgi {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--dim);
}

.lgd {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Conflict Zones Card ── */
.czcard {
    padding: 12px 14px;
    border-top: 2px solid rgba(255, 71, 87, 0.2);
}

/* Header */
.cz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

.cz-title {
    font-size: 11px;
    font-weight: 700;
    color: #ff6b6b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Pulsing live indicator */
.cz-live-ring {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.cz-live-ring.active {
    background: #00e676;
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.5);
    animation: czPulse 1.8s ease-out infinite;
}

@keyframes czPulse {
    0%   { box-shadow: 0 0 0 0   rgba(0, 230, 118, 0.55); }
    70%  { box-shadow: 0 0 0 7px rgba(0, 230, 118, 0); }
    100% { box-shadow: 0 0 0 0   rgba(0, 230, 118, 0); }
}

/* Source badge */
.cz-src-badge {
    font-size: 8px;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    letter-spacing: 0.6px;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--dim);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cz-src-badge.live {
    background: rgba(0, 230, 118, 0.12);
    color: #00e676;
    border-color: rgba(0, 230, 118, 0.3);
}

/* Stats */
.cz-stats {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.cz-stat {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.cz-stat.nfz { border-color: rgba(255, 71, 87, 0.22);  background: rgba(255, 71, 87, 0.05); }
.cz-stat.res { border-color: rgba(255, 215, 0, 0.22);  background: rgba(255, 215, 0, 0.05); }
.cz-stat.cau { border-color: rgba(255, 140, 0, 0.22);  background: rgba(255, 140, 0, 0.05); }

.cz-num {
    font-size: 22px;
    font-weight: 800;
    font-family: 'Space Mono', monospace;
    line-height: 1;
}

.cz-num.nfz { color: #ff4757; text-shadow: 0 0 14px rgba(255, 71, 87, 0.45); }
.cz-num.res { color: #ffd700; text-shadow: 0 0 14px rgba(255, 215, 0, 0.4); }
.cz-num.cau { color: #ff8c00; text-shadow: 0 0 14px rgba(255, 140, 0, 0.4); }

.cz-slbl {
    font-size: 8px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-top: 3px;
}

/* Feed status bar */
.cz-feed-bar {
    font-size: 9px;
    color: var(--dim);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 7px;
    padding: 5px 8px;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Legacy compat */
.cz-3d-badge { display: none; }
.cz-3d-badge.show { display: block; }

/* Action buttons */
.cz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.cz-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 9px 6px;
    color: var(--dim);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: transform 0.22s var(--ease-out-expo), background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.26s ease;
    letter-spacing: 0.2px;
    will-change: transform, box-shadow;
}

.cz-btn-icon {
    font-size: 0;
    line-height: 1;
}

.cz-btn-icon::before {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
}

.cz-btn:hover {
    background: rgba(255, 71, 87, 0.1);
    border-color: rgba(255, 71, 87, 0.3);
    color: #ff8a95;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.1);
}

.cz-btn:active {
    transform: translateY(0) scale(0.985);
}

.cz-btn.active-nfz {
    background: rgba(255, 71, 87, 0.15);
    border-color: rgba(255, 71, 87, 0.4);
    color: #ff4757;
    box-shadow: 0 0 16px rgba(255, 71, 87, 0.15);
}

.cz-btn.active-notam {
    background: rgba(108, 99, 255, 0.15);
    border-color: rgba(108, 99, 255, 0.4);
    color: var(--accent);
    box-shadow: 0 0 16px rgba(108, 99, 255, 0.15);
}

/* Avoid toggle row */
.cz-avoid {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
}

.cz-avoid-info { flex: 1; min-width: 0; }

.cz-avoid-info .t {
    font-size: 10px;
    font-weight: 600;
    color: var(--text);
}

.cz-avoid-info .s {
    font-size: 9px;
    color: var(--dim);
    margin-top: 1px;
}

.cz-risk-pill {
    font-size: 8px;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--dim);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Zone list */
.cz-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 170px;
    overflow-y: auto;
}

.cz-list::-webkit-scrollbar { width: 3px; }
.cz-list::-webkit-scrollbar-track { background: transparent; }
.cz-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 2px; }

.cz-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 7px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    border: 1px solid transparent;
}

.cz-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.07);
}

.cz-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cz-dot.nfz        { background: #ff4757; box-shadow: 0 0 5px rgba(255, 71, 87, 0.6); }
.cz-dot.restricted { background: #ffd700; box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
.cz-dot.caution    { background: #ff8c00; box-shadow: 0 0 5px rgba(255, 140, 0, 0.5); }

.cz-iinfo {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cz-iname {
    font-size: 10px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.cz-sbar-track {
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1px;
    overflow: hidden;
}

.cz-sbar-fill {
    height: 100%;
    border-radius: 1px;
    transition: width 0.4s ease;
    opacity: 0.65;
}

.cz-iright {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}

.cz-itag {
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 5px;
    border-radius: 4px;
}

.cz-itag.nfz        { background: rgba(255, 71, 87, 0.15);  color: #ff4757; }
.cz-itag.restricted { background: rgba(255, 215, 0, 0.12);  color: #ffd700; }
.cz-itag.caution    { background: rgba(255, 140, 0, 0.12);  color: #ff8c00; }

.cz-evtcount {
    font-size: 7px;
    font-family: 'Space Mono', monospace;
    color: var(--dim);
}

/* ── Weather Card ── */
.wxcard {
    padding: 10px 12px;
}

.wx-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

.wx-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 7px 6px;
    color: var(--dim);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: transform 0.22s var(--ease-out-expo), background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.26s ease;
    will-change: transform, box-shadow;
}

.wx-btn:hover {
    background: rgba(0, 229, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.wx-btn:active {
    transform: translateY(0) scale(0.985);
}

.wx-btn.active-rain {
    background: rgba(30, 136, 229, 0.14);
    border-color: rgba(30, 136, 229, 0.3);
    color: #42a5f5;
}

.wx-btn.active-sat {
    background: rgba(171, 71, 188, 0.14);
    border-color: rgba(171, 71, 188, 0.3);
    color: #ce93d8;
}

.wx-btn.active-clouds {
    background: rgba(120, 144, 156, 0.14);
    border-color: rgba(120, 144, 156, 0.3);
    color: #b0bec5;
}

.wx-btn.active-wind {
    background: rgba(0, 229, 255, 0.14);
    border-color: rgba(0, 229, 255, 0.3);
    color: #00e5ff;
}

.wx-btn.active-temp {
    background: rgba(255, 183, 77, 0.14);
    border-color: rgba(255, 183, 77, 0.3);
    color: #ffb74d;
}

.wx-btn.active-snow {
    background: rgba(144, 202, 249, 0.14);
    border-color: rgba(144, 202, 249, 0.3);
    color: #90caf9;
}

.wx-btn.active-pressure {
    background: rgba(129, 199, 132, 0.14);
    border-color: rgba(129, 199, 132, 0.3);
    color: #81c784;
}

.wi {
    font-size: 0;
}

.wi::before {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
}

#btn2d .vi::before { content: "\1F5FA"; }
#btn3d .vi::before { content: "\1F30D"; }
[data-layer="light"] .oi::before,
[data-gtex="day"] .oi::before { content: "\2600"; }
[data-layer="dark"] .oi::before,
[data-gtex="night"] .oi::before { content: "\1F319"; }
[data-layer="satellite"] .oi::before { content: "\1F6F0"; }
[data-layer="terrain"] .oi::before,
[data-gtex="topo"] .oi::before { content: "\26F0"; }
[data-gtex="water"] .oi::before { content: "\1F30A"; }
#czZonesBtn .cz-btn-icon::before { content: "\1F6AB"; }
#czNOTAMBtn .cz-btn-icon::before { content: "\1F4CD"; }
#wxRadarBtn .wi::before { content: "\1F327"; }
#wxSatBtn .wi::before { content: "\1F6F0"; }
#owmClouds .wi::before { content: "\2601"; }
#owmRain .wi::before { content: "\1F326"; }
#owmWind .wi::before { content: "\1F4A8"; }
#owmTemp .wi::before { content: "\1F321"; }
#owmSnow .wi::before { content: "\2744"; }
#owmPressure .wi::before { content: "\1F300"; }

/* Radar legend */
.radar-legend {
    display: none;
    margin-top: 6px;
}

.radar-legend.show {
    display: block;
}

.radar-scale {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #00e676, #ffeb3b, #ff9800, #f44336, #9c27b0);
}

.radar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    color: var(--dim);
    margin-top: 3px;
}

/* Animation strip */
.anim-strip {
    margin-top: 6px;
}

.anim-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.anim-pbtn {
    width: 30px;
    height: 30px;
    background: rgba(108, 99, 255, 0.12);
    border: 1px solid rgba(108, 99, 255, 0.25);
    border-radius: 8px;
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.anim-pbtn.playing {
    background: rgba(239, 83, 80, 0.14);
    border-color: rgba(239, 83, 80, 0.3);
    color: #ef5350;
}

.anim-info {
    flex: 1;
    min-width: 0;
}

.anim-frames {
    font-size: 9px;
    font-family: 'Space Mono', monospace;
    color: var(--dim);
}

.anim-time {
    font-size: 8px;
    color: var(--dim);
    margin-top: 2px;
}

.anim-spd {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.anim-spd span {
    font-size: 7px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.anim-spd input[type=range] {
    width: 50px;
    accent-color: var(--accent);
}

/* OWM section */
.owm-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.owm-status {
    font-size: 9px;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 6px;
}

.owm-status.info {
    background: rgba(108, 99, 255, 0.08);
    color: var(--dim);
}

.owm-status.ok {
    background: rgba(0, 230, 118, 0.08);
    color: #00e676;
}

.owm-status.err {
    background: rgba(239, 83, 80, 0.08);
    color: #ef5350;
}

/* ── Route Planner ── */
.plcard {
    padding: 12px 14px;
}

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

.plhdr .t {
    font-size: 13px;
    font-weight: 700;
}

.badge {
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
}

.pf {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.pfx {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    width: 32px;
    flex-shrink: 0;
}

.ainput {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    color: var(--text);
    font-family: 'Space Mono', monospace;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ainput:focus {
    border-color: rgba(108, 99, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12), 0 0 12px rgba(108, 99, 255, 0.08);
}

.ainput::placeholder {
    color: var(--dim);
}

.cdot {
    width: 3px;
    height: 3px;
    background: var(--dim);
    border-radius: 50%;
    margin: 2px 0 2px 14px;
}

/* Search Results Dropdown */
.planner-sres {
    display: none;
    max-height: 160px;
    overflow-y: auto;
    background: rgba(10, 10, 30, 0.96);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 4px;
}

.planner-sres.visible {
    display: block;
}

.sri {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s;
}

.sri:hover {
    background: rgba(108, 99, 255, 0.1);
}

.scode {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    min-width: 36px;
}

.sname {
    flex: 1;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sscore {
    font-size: 9px;
    color: var(--dim);
    flex-shrink: 0;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Calc Button */
.cbtn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border: none;
    border-radius: 10px;
    min-height: 42px;
    padding: 10px 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s ease, transform 0.18s var(--ease-out-expo), box-shadow 0.28s ease, filter 0.28s ease;
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.25);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 10px;
}

.cbtn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    filter: saturate(1.05);
    box-shadow: 0 0 32px rgba(108, 99, 255, 0.45);
}

.cbtn:active {
    transform: translateY(0) scale(0.975);
}

.cbtn:disabled {
    opacity: 0.7;
    cursor: wait;
    box-shadow: 0 0 12px rgba(108, 99, 255, 0.12);
}

.flight-search-btn {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.flight-card-bg {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.12) 0%, transparent 42%),
        radial-gradient(circle at 80% 50%, rgba(170, 155, 255, 0.14) 0%, transparent 38%);
    animation: bg-pulse 2.4s ease-in-out infinite;
}

@keyframes bg-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.orbit-system {
    position: relative;
    width: 24px;
    height: 24px;
    z-index: 1;
    flex: 0 0 24px;
}

.ring-outer,
.ring-inner {
    position: absolute;
    border-radius: 50%;
}

.ring-outer {
    inset: 0;
    border: 1.5px dashed rgba(230, 227, 255, 0.48);
    animation: spin-slow 8s linear infinite;
}

.ring-inner {
    inset: 5px;
    border: 1px dashed rgba(210, 204, 255, 0.28);
    animation: spin-slow 5s linear infinite reverse;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.dot-track {
    position: absolute;
    inset: 0;
    animation: orbit var(--dur) linear infinite;
    animation-delay: var(--delay);
}

.dot-track-outer {
    inset: 0;
    --dur: 2.8s;
}

.dot-track-inner {
    inset: 5px;
    --dur: 2s;
}

.dot-track-outer-lg {
    --delay: 0s;
}

.dot-track-outer-md {
    --delay: -0.93s;
    opacity: 0.6;
}

.dot-track-outer-sm {
    --delay: -1.87s;
    opacity: 0.35;
}

.dot-track-inner-md {
    --delay: -0.5s;
    opacity: 0.5;
}

.dot-track-inner-sm {
    --delay: -1.5s;
    opacity: 0.3;
}

.dot {
    position: absolute;
    border-radius: 50%;
    background: #f4f1ff;
    top: calc(-1 * var(--size) / 2);
    left: calc(50% - var(--size) / 2);
    width: var(--size);
    height: var(--size);
}

.dot-track-outer-lg .dot {
    --size: 4px;
}

.dot-track-outer-md .dot,
.dot-track-inner-md .dot {
    --size: 3px;
}

.dot-track-outer-sm .dot,
.dot-track-inner-sm .dot {
    --size: 2px;
}

.dot-inner {
    background: #c8c2ff;
}

@keyframes orbit {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.plane-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plane-svg {
    animation: plane-float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(214, 208, 255, 0.35));
    width: 14px;
    height: 14px;
}

.plane-svg path {
    fill: #f2efff;
    stroke: #d5ceff;
}

.plane-svg line {
    stroke: #d5ceff;
}

@keyframes plane-float {
    0%, 100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-5px) rotate(2deg);
    }
}

.flight-label {
    position: relative;
    z-index: 1;
    min-height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: none;
    text-shadow: 0 1px 0 rgba(39, 29, 112, 0.22);
    line-height: 1.1;
}

.flight-label-default,
.flight-label-loading {
    display: none;
}

#calcBtn[data-state="idle"] .flight-label-default,
#calcBtn[data-state="loading"] .flight-label-loading {
    display: inline;
}

.label-dots span {
    display: inline-block;
    animation: dot-blink 1.4s infinite;
}

.label-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.label-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-blink {
    0%, 80%, 100% {
        opacity: 0.3;
    }

    40% {
        opacity: 1;
    }
}

#calcBtn[data-state="loading"] .flight-card-bg,
#calcBtn:disabled .flight-card-bg {
    animation-duration: 1.8s;
}

@media (max-width: 720px) {
    .cbtn {
        min-height: 40px;
        padding: 10px 12px;
        gap: 8px;
    }

    .orbit-system {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }
}

/* ── What-If Card ── */
.wicard {
    padding: 10px 12px;
}

.wirow {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.wilbl {
    font-size: 10px;
    color: var(--dim);
    width: 54px;
    flex-shrink: 0;
}

.wisel {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    padding: 5px 6px;
    color: var(--text);
    font-size: 10px;
    outline: none;
}

.wirow input[type=range] {
    flex: 1;
    accent-color: var(--accent);
}

.wival {
    font-size: 9px;
    color: var(--accent);
    font-family: 'Space Mono', monospace;
    min-width: 60px;
    text-align: right;
}

/* ── Error Box ── */
.err-box {
    display: none;
    border-color: rgba(239, 83, 80, 0.3) !important;
}

.err-box.show {
    display: block;
}

.err-title {
    font-size: 13px;
    font-weight: 700;
    color: #ef5350;
    margin-bottom: 4px;
}

.err-msg {
    font-size: 11px;
    color: var(--dim);
    margin-bottom: 8px;
    line-height: 1.5;
}

.err-retry {
    background: rgba(239, 83, 80, 0.12);
    border: 1px solid rgba(239, 83, 80, 0.25);
    border-radius: 8px;
    padding: 6px 14px;
    color: #ef5350;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}

/* ── Results Card ── */
.rcard {
    display: none;
}

.rcard.show {
    display: block;
    animation: card-enter 0.35s var(--ease-out-expo) both;
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(108, 99, 255, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(108, 99, 255, 0.12);
}

.wico {
    font-size: 22px;
}

.wtxt {
    font-size: 13px;
    font-weight: 700;
}

.wsub {
    font-size: 10px;
    color: var(--dim);
    margin-top: 2px;
}

.rrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rlbl {
    font-size: 11px;
}

.rval {
    font-size: 12px;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
}

.rval.win {
    color: #00e676;
}

.rval.los {
    color: var(--exp);
}

.method-badge {
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.method-badge.ml {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
}

.method-badge.heuristic {
    background: rgba(255, 215, 64, 0.12);
    color: #ffd740;
}

/* Score bar */
.score-bar-wrap {
    margin: 10px 0;
}

.score-lbl {
    font-size: 9px;
    color: var(--dim);
    margin-bottom: 4px;
}

.score-track {
    height: 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* Route legend */
.rleg {
    display: flex;
    gap: 16px;
    margin-top: 6px;
}

.rli {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    color: var(--dim);
}

.rline {
    width: 22px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Trajectory Toggle ── */
.traj-toggle {
    display: none;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.traj-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--dim);
    transition: transform 0.22s var(--ease-out-expo), background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.26s ease;
    will-change: transform, box-shadow;
}

.err-retry {
    font-size: 0;
}

.err-retry::before {
    content: "\21BB  Retry";
    font-size: 12px;
}

.traj-chip.active {
    background: rgba(108, 99, 255, 0.1);
    border-color: rgba(108, 99, 255, 0.25);
    color: #fff;
}

.traj-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.traj-chip:active {
    transform: translateY(0) scale(0.985);
}

.traj-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Alerts Card ── */
.acard {
    display: none;
}

.acard.show {
    display: block;
    animation: card-enter 0.35s var(--ease-out-expo) both 0.05s;
}

.alert-item {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.alert-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.alert-body {
    flex: 1;
}

.alert-type {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.alert-type.warn {
    color: #ef5350;
}

.alert-type.caut {
    color: #ffd740;
}

.alert-type.info {
    color: var(--accent);
}

.alert-msg {
    font-size: 10px;
    color: var(--dim);
    line-height: 1.5;
}

/* ── Stats Bar ── */
.stcard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 10px;
}

.sti {
    text-align: center;
    flex: 1;
}

.stv {
    font-size: 16px;
    font-weight: 800;
    font-family: 'Space Mono', monospace;
    display: block;
}

.stv.ac {
    color: var(--accent);
}

.stlbl {
    font-size: 8px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.std {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.06);
}

/* ── Collapse Button ── */
.colbtn {
    position: fixed;
    top: 50%;
    left: 332px;
    transform: translateY(-50%);
    z-index: 500;
    width: 28px;
    height: 48px;
    font-size: 13px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 10px 10px 0;
    transition: left var(--transition-panel), background 0.2s, box-shadow 0.2s;
}

.colbtn:hover {
    background: rgba(108, 99, 255, 0.12);
    box-shadow: 0 0 12px rgba(108, 99, 255, 0.2);
}

/* ── Zoom Badge ── */
.zbadge {
    position: fixed;
    bottom: 12px;
    right: 12px;
    z-index: 50;
    padding: 5px 10px;
    font-size: 10px;
    font-family: 'Space Mono', monospace;
    font-weight: 600;
}

/* ── Globe Hint ── */
.ghint {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    z-index: 50;
    padding: 8px 16px;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.ghint.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Airport Markers ── */
.mkt {
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s;
}

.mkt:hover {
    transform: scale(1.4);
}

/* ── Leaflet Popup Override ── */
.leaflet-popup-content-wrapper {
    background: rgba(12, 12, 36, 0.95) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    color: var(--text) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(12px);
}

.leaflet-popup-tip {
    background: rgba(12, 12, 36, 0.95) !important;
}

.leaflet-popup-close-button {
    color: var(--dim) !important;
}

.pt {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pc {
    font-size: 10px;
    color: var(--dim);
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
}

.ci {
    color: var(--accent);
    font-family: 'Space Mono', monospace;
    font-weight: 600;
    font-size: 10px;
}

.co {
    color: #8b5cf6;
    font-family: 'Space Mono', monospace;
    font-weight: 600;
    font-size: 10px;
}

.pd {
    font-size: 10px;
    color: var(--dim);
    line-height: 1.6;
}

/* Route tooltip */
.route-tip {
    background: rgba(6, 6, 20, 0.92) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
}

/* ── Cluster override ── */
.marker-cluster-small {
    background: rgba(108, 99, 255, 0.18) !important;
}

.marker-cluster-small div {
    background: rgba(108, 99, 255, 0.5) !important;
    color: #fff !important;
}

.marker-cluster-medium {
    background: rgba(224, 64, 251, 0.18) !important;
}

.marker-cluster-medium div {
    background: rgba(224, 64, 251, 0.5) !important;
    color: #fff !important;
}

.marker-cluster-large {
    background: rgba(0, 229, 255, 0.18) !important;
}

.marker-cluster-large div {
    background: rgba(0, 229, 255, 0.5) !important;
    color: #fff !important;
}

.marker-cluster div {
    font-family: 'Space Mono', monospace !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

/* ── Responsive ── */

/* Tablet */
@media (max-width: 900px) {
    :root {
        --panel-w: 300px;
        --glass-blur: 10px;
        --shadow-soft: 0 0 14px rgba(108, 99, 255, 0.25);
    }
}

/* Mobile */
@media (max-width: 600px) {
    :root {
        --glass-blur: 0px;
        --shadow-soft: 0 0 8px rgba(108, 99, 255, 0.15);
    }

    .panel {
        width: 100vw;
        --panel-w: 100vw;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        height: 85vh;
        height: 85dvh;
        border-right: none;
        border-top: 1px solid rgba(108, 99, 255, 0.18);
        border-radius: 20px 20px 0 0;
        transform: translate3d(0, 100%, 0);
        padding: 0 12px 18px;
        padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        background: rgba(6, 6, 26, 0.98);
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    }

    .panel.collapsed {
        transform: translate3d(0, 100%, 0);
    }

    .panel:not(.collapsed) {
        transform: translate3d(0, 0, 0);
    }

    .sheet-handle {
        display: flex;
        touch-action: pan-y;
        padding: 12px 14px 8px;
        cursor: grab;
    }

    .sheet-handle:active {
        cursor: grabbing;
    }

    .sheet-grab {
        width: 40px;
        height: 5px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.3);
    }

    .sheet-title {
        font-size: 12px;
        letter-spacing: 0.8px;
    }

    .colbtn {
        display: none;
    }

    /* Performance: no blur on mobile GPUs */
    .glass {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(14, 14, 38, 0.95);
    }

    /* Disable hover lift on touch devices */
    .panel .glass:hover {
        transform: none;
        box-shadow: none;
    }

    /* Larger touch targets */
    .vbtn,
    .obtn,
    .fbtn,
    .mbtn,
    .wx-btn,
    .cz-btn {
        min-height: 44px;
        padding: 10px 8px;
        font-size: 11px;
    }

    .ainput {
        padding: 11px 12px;
        font-size: 14px;
        min-height: 44px;
    }

    .cbtn {
        padding: 14px;
        font-size: 14px;
        min-height: 48px;
        border-radius: 12px;
    }

    .wisel {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 12px;
    }

    /* Better readability */
    .lbl {
        font-size: 11px;
        letter-spacing: 1px;
        margin-bottom: 10px;
    }

    .sublbl {
        font-size: 10px;
    }

    /* Cards need slightly more padding */
    .vtcard,
    .ocard,
    .fcard,
    .lgcard,
    .czcard,
    .wxcard,
    .plcard,
    .wicard {
        padding: 14px;
    }

    .panel {
        gap: 8px;
    }

    /* Bigger header on mobile */
    .hdr h1 {
        font-size: 18px;
    }

    .hdr p {
        font-size: 11px;
    }

    .logo {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    /* Stats bar — make numbers bigger on mobile */
    .stv {
        font-size: 18px;
    }

    .stlbl {
        font-size: 9px;
    }

    /* Toggle switches slightly larger */
    .tsw {
        width: 38px;
        height: 20px;
    }

    .ttrack::after {
        width: 16px;
        height: 16px;
    }

    .tsw input:checked+.ttrack::after {
        transform: translateX(18px);
    }

    /* Conflict zone stats more readable */
    .cz-num {
        font-size: 22px;
    }

    /* Globe info popup on mobile */
    #ginfo {
        bottom: 96px;
        max-width: 90vw;
    }

    /* Zoom badge repositioned to top for mobile to make space for FAB */
    .zbadge {
        bottom: auto;
        top: 20px;
        right: 12px;
    }

    /* Floating Action Button (FAB) for mobile */
    .mobile-fab {
        display: flex;
        position: fixed;
        bottom: 24px;
        bottom: calc(24px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        transform: translateX(-50%);
        z-index: 90;
        background: linear-gradient(135deg, var(--accent), #8b5cf6);
        color: #fff;
        border: none;
        border-radius: 30px;
        padding: 14px 24px;
        font-size: 14px;
        font-weight: 700;
        box-shadow: 0 4px 16px rgba(108, 99, 255, 0.4);
        align-items: center;
        gap: 8px;
        cursor: pointer;
        opacity: 1;
        transition: opacity 0.3s, transform 0.3s, box-shadow 0.2s;
    }

    .mobile-fab > span:first-child {
        font-size: 0 !important;
    }

    .mobile-fab > span:first-child::before {
        content: "\1F50D";
        font-size: 16px;
        line-height: 1;
    }

    .mobile-fab:active {
        transform: translateX(-50%) scale(0.95);
        background: linear-gradient(135deg, #5b54e8, #7a4ce0);
    }

    .mobile-fab.hidden {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%) translateY(20px);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Touch hover fix — prevent sticky hovers on touch devices */
@media (hover: none) {
    .panel .glass:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--border);
    }

    .colbtn:hover {
        background: var(--glass);
        box-shadow: none;
    }

    .cbtn:hover {
        opacity: 1;
    }
}

#animPlayBtn {
    font-size: 0;
}

#animPlayBtn::before {
    content: "\25B6";
    font-size: 12px;
}

#colbtn {
    font-size: 0;
}

#colbtn::before {
    content: "\25C0";
    font-size: 14px;
}

#ghint {
    font-size: 0;
}

#ghint::before {
    content: "\1F30D  Drag \00B7 Scroll \00B7 Click point for info";
    font-size: 11px;
}
