/* ============================================
   ANTARCTICA COMMAND — Precision Instrument UI
   Steel/ice aesthetic. Sharp. Cold. Live.
   ============================================ */

/* CSS custom property for animated border rotation */
@property --ant-border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ── Page-Level Variables ── */
.antarctica-command {
    --ant-bg-panel: #0a1020;
    --ant-bg-deep: #060a12;
    --ant-border: #1a2540;
    --ant-border-bright: #243050;
    --ant-ice: #6b9ab8;
    --ant-seismic: #b05a50;
    --ant-berg: #7a9ab0;
    --ant-weather: #6a9a7a;
    --ant-text: #e2e8f0;
    --ant-text-dim: #64748b;
    --ant-mono: var(--font-mono, 'JetBrains Mono', 'Fira Code', monospace);
    background: var(--ant-bg-deep);
    overflow: hidden !important;
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.antarctica-command > #unified-nav {
    flex: 0 0 auto;
}

/* ── Instruments area must fit in 30vh max ── */
.ant-instruments {
    max-height: 30vh;
    overflow: hidden;
}

/* ── Subtle Scanline Overlay (entire page) ── */
.antarctica-command::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(255,255,255,0.012) 2px,
        rgba(255,255,255,0.012) 4px
    );
    pointer-events: none;
    z-index: 99;
}

/* ════════════════════════════════════════════
   VIEWPORT LOCK — NO SCROLL
   ════════════════════════════════════════════ */
.ant-viewport {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.ant-instruments {
    flex: 0 0 auto;
}

.ant-map-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
}

.ant-map-wrap .em-map-container {
    height: 100% !important;
    position: absolute;
    inset: 0;
}

/* Leaflet map must sit below floating controls */
#antarctica-map {
    position: relative;
    z-index: 1;
}

/* ════════════════════════════════════════════
   COMMAND HEADER — inline within gauge strip
   ════════════════════════════════════════════ */
.ant-cmd-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 0 0 auto;
    min-width: 52px;
    padding: 0 4px;
}

.ant-cmd-title {
    font-family: var(--ant-mono);
    font-size: 0.42rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(100,160,200,0.85);
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
}

.ant-cmd-time {
    font-family: var(--ant-mono);
    font-size: 0.32rem;
    color: var(--ant-text-dim);
    white-space: nowrap;
    line-height: 1;
}

.ant-cmd-share {
    flex: 0 0 auto;
    background: none;
    border: 1px solid rgba(100,160,200,0.2);
    color: rgba(100,160,200,0.6);
    font-size: 0.55rem;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
    margin-left: 2px;
}

.ant-cmd-share:hover {
    border-color: rgba(100,160,200,0.5);
    color: rgba(100,160,200,0.9);
}

/* ── Compact Trust Strip (inline key:value with dot separators) ── */
.ant-instruments .em-trust-strip {
    padding: 3px 10px;
    border-bottom-color: var(--ant-border);
    background: var(--ant-bg-deep);
}

.ant-instruments .em-trust-strip .em-trust-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    grid-template-columns: none;
}

.ant-instruments .em-trust-strip .em-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-right: none;
    padding-right: 0;
    white-space: nowrap;
}

.ant-instruments .em-trust-strip .em-trust-item::after {
    content: '\00B7';
    color: var(--ant-text-dim);
    margin: 0 6px;
    font-size: 0.6rem;
    opacity: 0.5;
}

.ant-instruments .em-trust-strip .em-trust-item:last-child::after {
    display: none;
}

.ant-instruments .em-trust-strip .em-trust-label {
    font-size: 0.38rem;
    margin-bottom: 0;
    color: var(--ant-text-dim);
    opacity: 0.7;
}

.ant-instruments .em-trust-strip .em-trust-value {
    font-size: 0.44rem;
    font-weight: 500;
}

.ant-instruments .em-trust-strip .em-trust-note {
    display: none;
}

.ant-instruments .em-trust-strip .em-status-badge {
    font-size: 0.35rem;
    padding: 1px 5px;
}

/* ════════════════════════════════════════════
   LIVE INDICATOR DOT
   ════════════════════════════════════════════ */
.ant-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34,197,94,0.6);
    animation: ant-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.ant-live-dot--amber {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245,158,11,0.6);
    animation: none;
}

.ant-live-dot--red {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239,68,68,0.6);
    animation: none;
}

.ant-live-dot--dim {
    background: #475569;
    box-shadow: none;
    animation: none;
}

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

/* ════════════════════════════════════════════
   METRIC GRID — 6 clickable cells
   ════════════════════════════════════════════ */
.ant-metric-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--ant-border);
    border-bottom: 1px solid var(--ant-border);
}

.ant-metric-cell {
    background: var(--ant-bg-panel);
    padding: 6px 8px;
    text-align: center;
    cursor: pointer;
    border-top: 2px solid var(--cell-color, var(--ant-ice));
    transition: background 0.15s;
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.ant-metric-cell:hover {
    background: rgba(255,255,255,0.04);
}

.ant-metric-value {
    font-family: var(--ant-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cell-color);
    line-height: 1;
}

.ant-metric-unit {
    font-family: var(--ant-mono);
    font-size: 0.42rem;
    color: var(--ant-text-dim);
    margin-top: 1px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ant-metric-label {
    font-family: var(--ant-mono);
    font-size: 0.38rem;
    color: rgba(100,116,139,0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ant-metric-expand {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.45rem;
    color: rgba(100,116,139,0.3);
}

/* ════════════════════════════════════════════
   COMPACT WEATHER BAR
   ════════════════════════════════════════════ */
.ant-wx-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 3px 12px;
    font-family: var(--ant-mono);
    font-size: 0.44rem;
    color: var(--ant-text-dim);
    cursor: pointer;
    flex-wrap: wrap;
    position: relative;

    /* Crystalline lattice — finer grid for thin bar */
    background:
        repeating-linear-gradient(0deg, transparent, transparent 11px, rgba(100,170,210,0.02) 11px, rgba(100,170,210,0.02) 12px),
        repeating-linear-gradient(60deg, transparent, transparent 11px, rgba(100,170,210,0.02) 11px, rgba(100,170,210,0.02) 12px),
        repeating-linear-gradient(120deg, transparent, transparent 11px, rgba(100,170,210,0.02) 11px, rgba(100,170,210,0.02) 12px),
        rgba(4,8,16,0.96);
    border-top: 1px solid rgba(100,170,210,0.08);
}

.ant-wx-bar:hover {
    background:
        repeating-linear-gradient(0deg, transparent, transparent 11px, rgba(100,170,210,0.03) 11px, rgba(100,170,210,0.03) 12px),
        repeating-linear-gradient(60deg, transparent, transparent 11px, rgba(100,170,210,0.03) 11px, rgba(100,170,210,0.03) 12px),
        repeating-linear-gradient(120deg, transparent, transparent 11px, rgba(100,170,210,0.03) 11px, rgba(100,170,210,0.03) 12px),
        rgba(8,14,24,0.96);
}

.ant-wx-station {
    white-space: nowrap;
}

.ant-wx-temp {
    font-weight: 700;
}

/* ════════════════════════════════════════════
   MODAL OVERLAY
   ════════════════════════════════════════════ */
.ant-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.ant-modal-overlay.open {
    display: flex;
}

.ant-modal {
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    background: linear-gradient(180deg, #0d1525 0%, var(--ant-bg-panel) 100%);
    border: 1px solid var(--ant-border);
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 24px;
    position: relative;
}

.ant-modal::-webkit-scrollbar {
    display: none;
}

.ant-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    background: none;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.ant-modal-close:hover {
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}

.ant-modal-title {
    font-family: var(--ant-mono);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--ant-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ant-border);
}

/* ════════════════════════════════════════════
   INSTRUMENT PANEL (base class — used in modals)
   ════════════════════════════════════════════ */
.ant-instrument {
    background: linear-gradient(180deg, #0d1525 0%, var(--ant-bg-panel) 100%);
    border: 1px solid var(--ant-border);
    border-top: 2px solid var(--inst-color, var(--ant-ice));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.03),
        0 4px 12px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
    padding: 12px 14px;
}

/* Corner tick marks */
.ant-instrument::before {
    content: '';
    position: absolute;
    top: 6px; left: 6px;
    width: 10px; height: 10px;
    border-top: 1px solid rgba(56, 189, 248, 0.15);
    border-left: 1px solid rgba(56, 189, 248, 0.15);
    pointer-events: none;
    z-index: 1;
}

.ant-instrument::after {
    content: '';
    position: absolute;
    bottom: 6px; right: 6px;
    width: 10px; height: 10px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
    border-right: 1px solid rgba(56, 189, 248, 0.15);
    pointer-events: none;
    z-index: 1;
}

.ant-inst-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ant-border);
}

.ant-inst-title {
    font-family: var(--ant-mono);
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--ant-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.ant-inst-source {
    font-family: var(--ant-mono);
    font-size: 0.45rem;
    color: rgba(100,116,139,0.6);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ant-inst-status {
    font-family: var(--ant-mono);
    font-size: 0.5rem;
    color: var(--ant-text-dim);
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--ant-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ant-inst-acquiring {
    font-family: var(--ant-mono);
    font-size: 0.6rem;
    color: var(--ant-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 20px 0;
    text-align: center;
    animation: ant-pulse 2s ease-in-out infinite;
}

/* ════════════════════════════════════════════
   SEISMIC FEED ROWS
   ════════════════════════════════════════════ */
.ant-quake-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(26,37,64,0.6);
    cursor: pointer;
    transition: background 0.15s;
}

.ant-quake-row:hover {
    background: rgba(255,255,255,0.02);
}

.ant-quake-row:last-child {
    border-bottom: none;
}

.ant-quake-mag,
.ant-quake-badge {
    font-family: var(--ant-mono);
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 38px;
    text-align: center;
    padding: 2px 4px;
    color: #fff;
}

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

.ant-quake-place {
    font-size: 0.6rem;
    color: var(--ant-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ant-quake-meta {
    font-family: var(--ant-mono);
    font-size: 0.45rem;
    color: var(--ant-text-dim);
}

/* ════════════════════════════════════════════
   ICEBERG ROWS
   ════════════════════════════════════════════ */
.ant-berg-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(26,37,64,0.6);
    cursor: pointer;
    transition: background 0.15s;
}

.ant-berg-row:hover { background: rgba(255,255,255,0.02); }
.ant-berg-row:last-child { border-bottom: none; }

.ant-berg-diamond {
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    background: var(--ant-berg);
    border: 1px solid rgba(255,255,255,0.4);
    flex-shrink: 0;
}

.ant-berg-name {
    font-family: var(--ant-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--ant-berg);
    min-width: 40px;
}

.ant-berg-info {
    flex: 1;
    font-size: 0.55rem;
    color: var(--ant-text-dim);
    font-family: var(--ant-mono);
}

.ant-berg-area {
    font-family: var(--ant-mono);
    font-size: 0.55rem;
    color: var(--ant-text);
    text-align: right;
    white-space: nowrap;
}

.ant-berg-dims {
    font-family: var(--ant-mono);
    font-size: 0.5rem;
    color: var(--ant-text-dim);
    margin-top: 1px;
}

.ant-wx-offline {
    font-family: var(--ant-mono);
    font-size: 0.5rem;
    color: var(--ant-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 0;
    text-align: center;
}

/* ════════════════════════════════════════════
   SEA ICE CHART
   ════════════════════════════════════════════ */
.ant-sea-ice-canvas {
    width: 100%;
    height: 100px;
    display: block;
}

.ant-sea-ice-value {
    font-family: var(--ant-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ant-ice);
    line-height: 1;
}

.ant-sea-ice-rank {
    font-family: var(--ant-mono);
    font-size: 0.55rem;
    color: var(--ant-text-dim);
    margin-top: 2px;
}

/* Anomaly indicator */
.ant-hero-anomaly {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ant-anomaly-badge {
    font-family: var(--ant-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
}

.ant-anomaly-badge--negative {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.ant-anomaly-badge--positive {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.ant-anomaly-label {
    font-family: var(--ant-mono);
    font-size: 0.5rem;
    color: var(--ant-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Iceberg bar chart rows */
.ant-hero-berg-list {
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(122,154,176,0.2) transparent;
}

.ant-berg-bar-row {
    display: grid;
    grid-template-columns: 80px 1fr 70px;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(26,37,64,0.5);
    cursor: pointer;
    transition: background 0.15s;
}

.ant-berg-bar-row:hover {
    background: rgba(255,255,255,0.02);
}

.ant-berg-bar-row:last-child {
    border-bottom: none;
}

.ant-berg-bar-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ant-berg-bar-track {
    height: 6px;
    background: rgba(255,255,255,0.04);
    border-radius: 3px;
    overflow: hidden;
}

.ant-berg-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(122,154,176,0.4), rgba(122,154,176,0.6));
    border-radius: 3px;
    transition: width 0.6s ease-out;
}

.ant-berg-bar-fill--large {
    background: linear-gradient(90deg, rgba(56,189,248,0.3), rgba(56,189,248,0.6));
    box-shadow: 0 0 6px rgba(56,189,248,0.2);
}

.ant-berg-bar-value {
    font-family: var(--ant-mono);
    font-size: 0.5rem;
    color: var(--ant-text-dim);
    text-align: right;
    white-space: nowrap;
}

/* Iceberg count badge */
.ant-berg-count-badge {
    font-family: var(--ant-mono);
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--ant-berg);
    background: rgba(122, 154, 176, 0.12);
    border: 1px solid rgba(122, 154, 176, 0.25);
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.06em;
}

/* ════════════════════════════════════════════
   MAP LAYER PANEL (vertical, left edge)
   ════════════════════════════════════════════ */
/* ════════════════════════════════════════════
   CRYSTALLINE LATTICE LAYER PANEL
   Faceted gem containment. Shooting pulse lines.
   ════════════════════════════════════════════ */
.ant-layer-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 10px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: calc(100% - 20px);
    overflow-y: auto;

    /* Faceted gem shape */
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);

    /* Dark crystal interior */
    background:
        /* Triangular tessellation lattice */
        repeating-linear-gradient(0deg, transparent, transparent 18px, rgba(100,170,210,0.035) 18px, rgba(100,170,210,0.035) 19px),
        repeating-linear-gradient(60deg, transparent, transparent 18px, rgba(100,170,210,0.035) 18px, rgba(100,170,210,0.035) 19px),
        repeating-linear-gradient(120deg, transparent, transparent 18px, rgba(100,170,210,0.035) 18px, rgba(100,170,210,0.035) 19px),
        /* Base */
        rgba(4,8,16,0.92);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

/* Animated energy border — outer glow frame */
.ant-layer-panel::before {
    content: '';
    position: absolute;
    inset: -1px;
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
    background: linear-gradient(
        var(--ant-border-angle, 0deg),
        transparent 0%,
        rgba(100,180,220,0.25) 25%,
        transparent 50%,
        rgba(100,180,220,0.12) 75%,
        transparent 100%
    );
    z-index: -1;
    animation: ant-crystal-border 8s linear infinite;
}

@keyframes ant-crystal-border {
    0%   { --ant-border-angle: 0deg; }
    100% { --ant-border-angle: 360deg; }
}

/* Fallback for browsers without @property — shimmer via background-position */
@supports not (background: conic-gradient(red, blue)) {
    .ant-layer-panel::before {
        background: linear-gradient(135deg, transparent 20%, rgba(100,180,220,0.2) 40%, transparent 60%, rgba(100,180,220,0.1) 80%, transparent 100%);
        background-size: 300% 300%;
        animation: ant-crystal-shimmer 8s ease-in-out infinite;
    }
}

@keyframes ant-crystal-shimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

/* Holographic refraction overlay */
.ant-layer-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(100,180,220,0.03) 45%,
        transparent 55%,
        rgba(140,200,240,0.02) 70%,
        transparent 80%
    );
    background-size: 200% 200%;
    animation: ant-holo-shift 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes ant-holo-shift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

/* ── Header with crystal axis marks ── */
.ant-layer-header {
    font-family: var(--ant-mono);
    font-size: 0.38rem;
    color: rgba(100,170,210,0.45);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding: 2px 6px 4px;
    text-align: center;
    position: relative;
}

.ant-layer-header::before,
.ant-layer-header::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 1px;
    width: 16px;
    background: linear-gradient(90deg, transparent, rgba(100,170,210,0.2), transparent);
}
.ant-layer-header::before { left: 2px; }
.ant-layer-header::after { right: 2px; }

/* ── Layer Buttons — lattice nodes ── */
.ant-layer-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--ant-mono);
    font-size: 0.48rem;
    color: rgba(100,116,139,0.45);
    transition: color 0.25s, background 0.25s;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.ant-layer-btn:hover {
    color: var(--ant-text);
    background: rgba(100,170,210,0.04);
}

.ant-layer-btn.active {
    color: rgba(200,220,235,0.9);
}

/* ── Diamond nodes (replaces round dots) ── */
.ant-layer-dot {
    width: 7px;
    height: 7px;
    border-radius: 1px;
    transform: rotate(45deg);
    border: 1px solid var(--dot-color);
    background: transparent;
    opacity: 0.3;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.ant-layer-btn.active .ant-layer-dot {
    opacity: 1;
    background: var(--dot-color);
    box-shadow: 0 0 6px var(--dot-color), 0 0 12px rgba(100,170,210,0.15);
}

/* ── SHOOTING PULSE LINES — the signature effect ── */
.ant-layer-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(100,180,220,0.15) 0%, rgba(100,180,220,0.04) 100%);
    z-index: 0;
}

/* Traveling pulse — bright point sliding along the line */
.ant-layer-btn.active::after {
    content: '';
    position: absolute;
    left: -20px;
    top: calc(50% - 1px);
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(140,200,240,0.7), transparent);
    border-radius: 2px;
    z-index: 0;
    animation: ant-pulse-shoot 5s ease-in-out infinite;
    filter: blur(0.5px);
}

@keyframes ant-pulse-shoot {
    0%, 15%  { left: -20px; opacity: 0; }
    20%      { opacity: 1; }
    60%      { left: calc(100% + 5px); opacity: 0.8; }
    65%, 100% { left: calc(100% + 5px); opacity: 0; }
}

/* Stagger the pulse timing per row */
.ant-layer-btn.active:nth-child(2)::after  { animation-delay: 0s; }
.ant-layer-btn.active:nth-child(3)::after  { animation-delay: 0.7s; }
.ant-layer-btn.active:nth-child(4)::after  { animation-delay: 1.4s; }
.ant-layer-btn.active:nth-child(5)::after  { animation-delay: 2.1s; }
.ant-layer-btn.active:nth-child(6)::after  { animation-delay: 2.8s; }
.ant-layer-btn.active:nth-child(7)::after  { animation-delay: 3.5s; }
.ant-layer-btn.active:nth-child(8)::after  { animation-delay: 4.2s; }
.ant-layer-btn.active:nth-child(10)::after { animation-delay: 0.35s; }

/* Inactive rows — no lines, ghost state */
.ant-layer-btn:not(.active)::before,
.ant-layer-btn:not(.active)::after {
    display: none;
}

/* ── Separator — thin crystal fracture line ── */
.ant-layer-sep {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100,170,210,0.12) 30%, rgba(100,170,210,0.12) 70%, transparent);
    margin: 3px 0;
}

/* ════════════════════════════════════════════
   EARTHQUAKE MAP MARKERS (pulsing sonar)
   ════════════════════════════════════════════ */
.ant-quake-icon { background: none !important; border: none !important; }

.ant-quake-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ant-quake-core {
    width: var(--qsize, 10px);
    height: var(--qsize, 10px);
    border-radius: 50%;
    background: var(--qcolor, #ef4444);
    opacity: 0.9;
    box-shadow: 0 0 8px var(--qcolor, #ef4444);
    position: relative;
    z-index: 2;
}

.ant-quake-ring {
    position: absolute;
    width: var(--qsize, 10px);
    height: var(--qsize, 10px);
    border-radius: 50%;
    border: 1.5px solid var(--qcolor, #ef4444);
    animation: ant-quake-expand 3s ease-out infinite;
}

@keyframes ant-quake-expand {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(3.5); opacity: 0; }
}

/* ════════════════════════════════════════════
   ICEBERG MAP MARKERS (amber diamonds)
   ════════════════════════════════════════════ */
/* SVG marker icon resets — no Leaflet default backgrounds */
.ant-station-icon,
.ant-lake-icon,
.ant-feature-icon,
.ant-quake-icon,
.ant-berg-icon { background: none !important; border: none !important; }

.antarctic-label { background: none !important; border: none !important; pointer-events: none; overflow: visible; }

.ant-station-icon svg,
.ant-lake-icon svg,
.ant-feature-icon svg,
.ant-quake-icon svg,
.ant-berg-icon svg { display: block; }

.ant-berg-map-marker {
    transform: rotate(45deg);
    background: rgba(140,170,195,0.25);
    border: 1.5px solid rgba(160,190,210,0.6);
    box-shadow: 0 0 4px rgba(120,160,190,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ant-berg-map-marker:hover {
    transform: rotate(45deg) scale(1.3);
    background: rgba(140,170,195,0.4);
    box-shadow: 0 0 10px rgba(120,160,190,0.3);
}

.ant-berg-map-marker.ant-berg-large {
    animation: ant-berg-glow 6s ease-in-out infinite;
}

@keyframes ant-berg-glow {
    0%, 100% { box-shadow: 0 0 4px rgba(120,160,190,0.15); }
    50% { box-shadow: 0 0 10px rgba(120,160,190,0.3); }
}

.ant-berg-label {
    font-family: var(--ant-mono);
    font-size: 8px;
    font-weight: 600;
    color: #8aacbe;
    text-shadow: 0 0 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6);
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.04em;
}

/* ════════════════════════════════════════════
   SECTION HEADERS (for existing content below)
   ════════════════════════════════════════════ */
.ant-section-divider {
    font-family: var(--ant-mono);
    font-size: 0.5rem;
    color: var(--ant-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 20px 16px 8px;
    border-bottom: 1px solid var(--ant-border);
    margin-bottom: 12px;
}

/* Temperature color coding */
.ant-temp-hot { color: #d4c4b0; }
.ant-temp-cool { color: #c8d0d8; }
.ant-temp-cold { color: #a0b8c8; }
.ant-temp-extreme { color: #8a9ab0; }

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */

/* ── Large desktop 1440px+ ── */
@media (min-width: 1440px) {
    .ant-metric-value { font-size: 1.2rem; }
    .ant-metric-cell { padding: 8px 10px; }
}

@media (max-width: 1024px) {
    .ant-cmd-bar .me-subnav-inline {
        flex-basis: 100%;
        max-width: none;
        margin-left: 0;
    }

    .ant-metric-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .ant-cmd-bar {
        padding: 3px 8px;
        gap: 4px;
    }

    .ant-cmd-title {
        font-size: 0.5rem;
    }

    .ant-cmd-time {
        display: none;
    }

    .ant-cmd-left .em-earth-brand-label {
        display: none;
    }

    .ant-metric-grid { grid-template-columns: repeat(3, 1fr); }
    .ant-metric-value { font-size: 0.95rem; }
    .ant-metric-cell { padding: 5px 6px; }
    .ant-metric-unit { font-size: 0.38rem; }
    .ant-metric-label { font-size: 0.34rem; }

    .ant-wx-bar { font-size: 0.4rem; gap: 6px; padding: 2px 8px; }

    .ant-modal { padding: 16px; max-width: 95%; }

    .ant-layer-panel {
        top: auto;
        bottom: 10px;
        left: 10px;
        max-height: 220px;
    }

    /* Disable pulse animations on mobile for perf */
    .ant-quake-ring {
        animation: none;
        display: none;
    }

    .ant-berg-map-marker.ant-berg-large {
        animation: none;
    }

    .ant-sea-ice-canvas {
        height: 100px;
    }

    .ant-berg-bar-row {
        grid-template-columns: 65px 1fr 60px;
        gap: 6px;
    }

    /* Compact trust strip even further on tablet */
    .ant-instruments .em-trust-strip {
        padding: 2px 8px;
    }
    .ant-instruments .em-trust-strip .em-trust-label {
        display: none;
    }
    .ant-instruments .em-trust-strip .em-trust-value {
        font-size: 0.4rem;
    }
}

@media (max-width: 480px) {
    .ant-metric-grid { grid-template-columns: repeat(3, 1fr); }
    .ant-metric-value { font-size: 0.85rem; }
    .ant-metric-cell { padding: 4px 4px; }
    .ant-metric-unit { font-size: 0.35rem; }
    .ant-metric-label { font-size: 0.32rem; margin-top: 1px; }

    .ant-cmd-right .em-btn {
        padding: 4px 8px;
        font-size: 0.55rem;
    }

    .ant-wx-bar {
        font-size: 0.36rem;
        gap: 4px;
        padding: 2px 6px;
    }

    /* Hide some weather stations on very small screens */
    .ant-wx-station:nth-child(n+5) {
        display: none;
    }

    .ant-instruments .em-trust-strip .em-trust-item:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 600px) {
    .ant-cmd-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 4px 6px;
    }

    .ant-cmd-left {
        grid-column: 1;
        width: auto;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .ant-cmd-title {
        white-space: nowrap;
        line-height: 1;
    }

    .ant-cmd-right {
        grid-column: 2;
        width: auto;
        justify-content: flex-end;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .ant-cmd-right .em-btn {
        padding: 3px 6px;
        font-size: 0.48rem;
    }

    .ant-wx-bar {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        font-size: 0.34rem;
        gap: 4px;
        padding: 2px 6px;
    }

    .ant-wx-bar::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 375px) {
    .ant-cmd-title {
        font-size: 0.44rem;
        letter-spacing: 0.1em;
    }

    .ant-cmd-right .em-btn:not(:first-child) {
        display: none;
    }

    .ant-metric-grid { grid-template-columns: repeat(3, 1fr); }
    .ant-metric-value { font-size: 0.8rem; }

    .ant-wx-station:nth-child(n+4) {
        display: none;
    }
}

/* ════════════════════════════════════════════
   INSTRUMENT GAUGE STRIP (replaces metric grid)
   ════════════════════════════════════════════ */
.ant-gauge-strip {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    overflow: hidden;
    position: relative;

    /* Crystalline lattice background */
    background:
        repeating-linear-gradient(0deg, transparent, transparent 24px, rgba(100,170,210,0.025) 24px, rgba(100,170,210,0.025) 25px),
        repeating-linear-gradient(60deg, transparent, transparent 24px, rgba(100,170,210,0.025) 24px, rgba(100,170,210,0.025) 25px),
        repeating-linear-gradient(120deg, transparent, transparent 24px, rgba(100,170,210,0.025) 24px, rgba(100,170,210,0.025) 25px),
        linear-gradient(180deg, rgba(6,12,24,0.95) 0%, rgba(4,8,16,0.98) 100%);
    border-bottom: 1px solid rgba(100,170,210,0.1);
}

/* Gauge strip energy border — bottom edge pulse */
.ant-gauge-strip::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(100,180,220,0.3) 20%,
        rgba(100,180,220,0.08) 50%,
        rgba(100,180,220,0.3) 80%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: ant-strip-pulse 6s ease-in-out infinite;
}

@keyframes ant-strip-pulse {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

.ant-gauge-cell {
    flex: 1 1 0;
    min-width: 0;
    max-width: 140px;
}

.ant-gauge-cell svg,
.ant-gauge-cell .cf-gauge-svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 4px rgba(100,180,220,0.08));
}

/* Mobile: horizontally scrollable gauge strip with larger touch targets */
@media (max-width: 768px) {
    .ant-gauge-strip {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px;
        padding: 4px 6px;
        padding-bottom: 4px;
    }
    .ant-gauge-strip::-webkit-scrollbar { display: none; }
    .ant-gauge-cell {
        min-width: 64px;
        min-height: 64px;
        flex-shrink: 0;
    }
    .ant-cmd-inline {
        min-width: 44px;
        padding: 0 2px;
        flex-shrink: 0;
    }
    .ant-cmd-inline .ant-cmd-time {
        display: none;
    }
}

@media (max-width: 480px) {
    .ant-gauge-strip {
        gap: 3px;
        padding: 3px 4px;
    }
    .ant-gauge-cell {
        min-width: 56px;
        min-height: 56px;
    }
    .ant-cmd-inline {
        min-width: 40px;
    }
}

/* ════════════════════════════════════════════
   FLOATING MAP CONTROLS (top-right on map)
   ════════════════════════════════════════════ */
.ant-map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 4px;
    overflow: hidden;

    /* Crystalline lattice background */
    background:
        repeating-linear-gradient(0deg, transparent, transparent 10px, rgba(100,170,210,0.04) 10px, rgba(100,170,210,0.04) 11px),
        repeating-linear-gradient(60deg, transparent, transparent 10px, rgba(100,170,210,0.04) 10px, rgba(100,170,210,0.04) 11px),
        repeating-linear-gradient(120deg, transparent, transparent 10px, rgba(100,170,210,0.04) 10px, rgba(100,170,210,0.04) 11px),
        rgba(4,8,16,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(100,170,210,0.12);
}

.ant-map-btn {
    width: 36px;
    height: 30px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(100,170,210,0.08);
    color: rgba(200,220,240,0.6);
    font-family: var(--ant-mono);
    font-size: 0.45rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ant-map-btn:first-child { border-radius: 0; }
.ant-map-btn:last-child { border-radius: 0; border-bottom: none; }
.ant-map-btn:not(:first-child) { border-top: none; }

.ant-map-btn:hover {
    background: rgba(100,180,220,0.1);
    color: rgba(140,210,250,0.95);
}

/* Hover pulse line on map buttons */
.ant-map-btn:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100,180,220,0.5), transparent);
}

.ant-map-btn:active {
    background: rgba(100,180,220,0.15);
}

/* ════════════════════════════════════════════
   SOURCE ATTRIBUTION (bottom of map)
   ════════════════════════════════════════════ */
.ant-map-sources {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    font-family: var(--ant-mono);
    font-size: 0.35rem;
    letter-spacing: 0.08em;
    color: rgba(200,220,240,0.25);
    white-space: nowrap;
    pointer-events: none;
}

/* ════════════════════════════════════════════
   FULLSCREEN MODE
   ════════════════════════════════════════════ */
.ant-fs-close {
    display: none;
    position: absolute;
    top: 10px;
    right: 56px;
    z-index: 1001;
    width: 28px;
    height: 28px;
    background: rgba(10,16,32,0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(100,180,220,0.15);
    border-radius: 4px;
    color: rgba(200,220,240,0.7);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
}

.ant-fs-close:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.4);
    color: #ef4444;
}

.ant-viewport.ant-fullscreen .ant-instruments { display: none; }
.ant-viewport.ant-fullscreen .ant-map-wrap {
    position: fixed;
    inset: 0;
    z-index: 9998;
    height: 100vh !important;
}
.ant-viewport.ant-fullscreen .ant-fs-close { display: flex; }

/* ════════════════════════════════════════════
   LEAFLET ZOOM — instrument aesthetic
   ════════════════════════════════════════════ */
.antarctica-command .leaflet-control-zoom {
    border: none !important;
    box-shadow: none !important;
    background: none !important;
}
.antarctica-command .leaflet-control-zoom a {
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    background: rgba(10,16,32,0.88) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(100,180,220,0.15) !important;
    color: rgba(100,180,220,0.6) !important;
    font-family: var(--ant-mono) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    border-radius: 0 !important;
    transition: all 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.antarctica-command .leaflet-control-zoom a:first-child {
    border-radius: 4px 4px 0 0 !important;
    border-bottom: none !important;
}
.antarctica-command .leaflet-control-zoom a:last-child {
    border-radius: 0 0 4px 4px !important;
}
.antarctica-command .leaflet-control-zoom a:hover {
    background: rgba(100,180,220,0.1) !important;
    border-color: rgba(100,180,220,0.35) !important;
    color: #38bdf8 !important;
}
