:root {
    --bg-space: #040812;
    --bg-panel: rgba(8, 14, 26, 0.82);
    --bg-card: rgba(13, 20, 36, 0.78);
    --border-neon: 1.5px solid rgba(34, 211, 238, 0.85);
    --shadow-neon: 0 0 18px rgba(6, 182, 212, 0.45), inset 0 0 10px rgba(6, 182, 212, 0.2);
    --gradient-neon: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(99, 102, 241, 0.22) 50%, rgba(168, 85, 247, 0.22) 100%);
    --glint-specular: inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 0 14px rgba(6, 182, 212, 0.15);
    
    /* Tactical Palette from Specs Look & Feel (Slides 1-6) */
    --neon-cyan: #22d3ee;
    --neon-cyan-bright: #38bdf8;
    --threat-red: #f43f5e;
    --threat-coral: #fb7185;
    --alert-amber: #f59e0b;
    --alert-gold: #fbbf24;
    --citizen-magenta: #d946ef;
    --citizen-pink: #ec4899;
    --survival-emerald: #10b981;
    --text-white: #ffffff;
    --text-dim: #94a3b8;
    --text-slate: #cbd5e1;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-space);
    color: var(--text-white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

/* 3D WebGPU Background Canvas */
#renderCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    touch-action: none;
    outline: none;
    z-index: 1;
}

/* Glassmorphic Tactical UI Layer */
.geo-hud-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Atmospheric Micro-Grid & Sci-Fi Corner Crosshairs */
.geo-hud-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(circle at 18px 18px, rgba(34, 211, 238, 0.12) 1px, transparent 0),
        linear-gradient(to right, rgba(34, 211, 238, 0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(34, 211, 238, 0.025) 1px, transparent 1px);
    background-size: 100% 100%, 64px 64px, 64px 64px;
    z-index: 2;
    opacity: 0.85;
}

.interactive-panel {
    pointer-events: auto;
    position: relative;
    z-index: 12;
}

/* Glowing Neon Standard Class */
.glowing-neon {
    border: var(--border-neon) !important;
    box-shadow: var(--shadow-neon) !important;
    background: var(--gradient-neon) !important;
    color: var(--text-white) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* Tactical Command Glass - Specular Edge & Cybernetic Framing */
.tactical-glass-card {
    background: var(--bg-panel);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), var(--glint-specular);
    position: relative;
}

/* Top Navigation & Status Bar */
.geo-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: linear-gradient(180deg, rgba(6, 11, 21, 0.94) 0%, rgba(6, 11, 21, 0.75) 75%, transparent 100%);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(34, 211, 238, 0.28);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-title {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #38bdf8 0%, #22d3ee 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

.tactical-prefix {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--threat-coral);
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.4);
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: pulse 2s infinite;
}

.status-dot-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    border: var(--border-neon);
    box-shadow: var(--shadow-neon);
    flex-shrink: 0;
    cursor: default;
}

/* Floating Non-Intrusive 3D Hypocentres Overlay (Top-Left Canvas Layer) */
.hud-telemetry-overlay {
    position: absolute;
    top: 60px;
    left: 18px;
    z-index: 20;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: rgba(8, 14, 26, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.hud-telemetry-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--neon-cyan);
}

.hud-telemetry-val {
    font-size: 0.76rem;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #ffffff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* Action Toolbar (Icon-First Responsive Density) */
.geo-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.geo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.geo-btn:hover {
    border-color: rgba(34, 211, 238, 0.85);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
    background: rgba(30, 41, 59, 0.9);
}

.geo-btn.active {
    border: var(--border-neon);
    box-shadow: var(--shadow-neon);
    background: var(--gradient-neon);
}

/* Responsive Collapse: Hide text labels on narrow displays */
.basemap-group {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.basemap-group .geo-btn {
    border: 1px solid transparent;
    background: transparent;
    border-radius: 6px;
    padding: 4px 10px;
}

.basemap-group .geo-btn.active {
    border: var(--border-neon) !important;
    box-shadow: var(--shadow-neon) !important;
    background: var(--gradient-neon) !important;
}

@media (max-width: 960px) {
    .btn-text-responsive {
        display: none !important;
    }
    .geo-btn {
        padding: 6px 10px;
    }
}

/* Layers Dropdown Anchored under Layers Button */
.layers-dropdown-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.layers-dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 990;
    background: transparent;
}

.layers-dropdown-panel {
    position: absolute !important;
    top: calc(100% + 8px);
    right: 0;
    width: 310px;
    max-width: calc(100vw - 24px);
    background: rgba(10, 18, 30, 0.96) !important;
    border: var(--border-neon) !important;
    border-radius: 12px;
    padding: 14px 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), var(--shadow-neon) !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fadeInDropdown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
}

.layers-dropdown-panel.bracketed-panel,
.layers-dropdown-panel.interactive-panel {
    position: absolute !important;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.panel-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--neon-cyan);
    background: rgba(34, 211, 238, 0.15);
    border: 1px solid rgba(34, 211, 238, 0.35);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Left-Edge Slender Altitude Zoom Bar (Docked to Left Edge, Frosted Translucent, Min Width) */
.altitude-docked-strip {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 14px;
    height: 48vh;
    max-height: 380px;
    background: rgba(8, 14, 24, 0.55);
    border-right: 1.5px solid rgba(34, 211, 238, 0.4);
    border-top: 1px solid rgba(34, 211, 238, 0.25);
    border-bottom: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 0 8px 8px 0;
    padding: 8px 0;
    backdrop-filter: blur(12px);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 25;
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, box-shadow 0.25s ease;
}

.altitude-docked-strip:hover,
.altitude-docked-strip.is-dragging {
    width: 60px;
    background: rgba(8, 14, 24, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(6, 182, 212, 0.35);
    padding: 8px 6px;
}

.altitude-docked-strip .strip-tick-notch,
.altitude-docked-strip .strip-fine-tick {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.altitude-docked-strip:hover .strip-tick-notch,
.altitude-docked-strip.is-dragging .strip-tick-notch,
.altitude-docked-strip:hover .strip-fine-tick,
.altitude-docked-strip.is-dragging .strip-fine-tick {
    opacity: 1;
    pointer-events: auto;
}

.strip-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(34, 211, 238, 0.2);
    width: 100%;
}

.strip-header-icon {
    font-size: 0.85rem;
    color: var(--neon-cyan);
}

.altitude-strip-body {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 4px 0;
    touch-action: none !important;
    user-select: none;
    -webkit-user-select: none;
}

.strip-ticks-rail {
    position: relative;
    width: 100%;
    height: 100%;
    touch-action: none !important;
}

.strip-tick-notch {
    position: absolute;
    right: 0;
    transform: translateY(50%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: 100%;
    cursor: pointer;
    padding: 2px 0;
    z-index: 2;
    transition: all 0.15s ease;
}

.strip-tick-notch .tick-line {
    width: 8px;
    height: 1.5px;
    background: rgba(56, 189, 248, 0.5);
    transition: all 0.15s ease;
}

.strip-tick-notch .tick-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-dim);
    transition: all 0.15s ease;
    user-select: none;
}

.strip-tick-notch:hover .tick-label,
.strip-tick-notch.active .tick-label {
    color: #ffffff;
    text-shadow: 0 0 6px rgba(34, 211, 238, 0.8);
}

.strip-tick-notch:hover .tick-line,
.strip-tick-notch.active .tick-line {
    width: 14px;
    background: #22d3ee;
    box-shadow: 0 0 8px #22d3ee;
}

.strip-fine-tick {
    position: absolute;
    right: 0;
    height: 1px;
    pointer-events: none;
}

.fine-minor {
    width: 4px;
    background: rgba(255, 255, 255, 0.12);
}

.fine-major {
    width: 10px;
    background: rgba(34, 211, 238, 0.6);
}

.strip-active-laser {
    position: absolute;
    right: 1px;
    bottom: 0;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, #38bdf8, #818cf8);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
    pointer-events: none;
}

/* Slider Handle & Protruding Callout (User's Green-Box Drawing) */
.strip-thumb-handle {
    position: absolute;
    right: 0;
    transform: translateY(50%);
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 20;
}

.thumb-notch {
    width: 14px;
    height: 14px;
    background: #22d3ee;
    border: 2px solid #ffffff;
    border-radius: 3px;
    box-shadow: 0 0 12px #22d3ee;
    transform: rotate(45deg);
    margin-right: -7px;
}

.altitude-callout-bubble {
    position: absolute;
    left: 100%;
    margin-left: 10px;
    display: flex;
    align-items: center;
    background: rgba(8, 16, 28, 0.94);
    border: 1.5px solid #22d3ee;
    border-radius: 6px;
    padding: 3px 8px;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.55), inset 0 0 6px rgba(6, 182, 212, 0.2);
    backdrop-filter: blur(16px);
    white-space: nowrap;
    animation: pulseCallout 2.5s infinite;
}

.callout-pointer {
    position: absolute;
    right: 100%;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 6px solid #22d3ee;
}

.callout-text {
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

@keyframes pulseCallout {
    0%, 100% { box-shadow: 0 0 14px rgba(6, 182, 212, 0.5); }
    50% { box-shadow: 0 0 22px rgba(34, 211, 238, 0.8); }
}

.strip-range-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    writing-mode: vertical-lr;
    direction: rtl;
    opacity: 0;
    cursor: ns-resize;
    margin: 0;
    z-index: 15;
    touch-action: none !important;
    -webkit-appearance: slider-vertical;
}

/* Compact Nav Toggle at bottom of strip */
.strip-nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding-top: 4px;
    border-top: 1px solid rgba(34, 211, 238, 0.2);
    flex-shrink: 0;
}

.strip-nav-btn {
    padding: 4px 0;
    font-size: 0.78rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 4px;
    color: var(--text-slate);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.strip-nav-btn.active {
    color: #ffffff;
    background: var(--gradient-neon);
    border: var(--border-neon);
    box-shadow: var(--shadow-neon);
}

.clickable-event-banner {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-event-banner:hover {
    transform: translateY(-1px);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.45), var(--glint-specular);
}

/* 60 FPS Event Hover Badge */
.event-hover-tag {
    position: absolute;
    transform: translate(-50%, -100%);
    z-index: 50;
    display: none;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    pointer-events: auto;
    animation: tagPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tagPop {
    from { opacity: 0; transform: translate(-50%, -85%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}

.hover-tag-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(10, 16, 28, 0.9);
    border: 1.5px solid rgba(34, 211, 238, 0.9);
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.55), inset 0 0 8px rgba(6, 182, 212, 0.2);
    backdrop-filter: blur(12px);
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.hover-tag-badge:hover {
    border-color: #38bdf8;
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.8), inset 0 0 10px rgba(56, 189, 248, 0.35);
}

.hover-tag-mag {
    color: #f43f5e;
}

.hover-tag-divider {
    color: rgba(255, 255, 255, 0.3);
}

.hover-tag-depth {
    color: #38bdf8;
}

.hover-tag-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22d3ee;
    box-shadow: 0 0 6px #22d3ee;
    animation: pulse 1.5s infinite;
}

.hover-tag-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #22d3ee;
    margin-top: -1px;
}

/* Event Detail Telemetry Popup Modal */
.event-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    background: transparent;
}

.event-detail-popup {
    position: absolute;
    width: 320px;
    background: rgba(10, 16, 28, 0.94);
    border: var(--border-neon);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(24px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), var(--shadow-neon);
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform-origin: top left;
    animation: popupContextualExpand 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-detail-popup.placement-left {
    transform-origin: top right;
}

@keyframes popupContextualExpand {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(8px);
    }
    70% {
        transform: scale(1.02) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.event-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(34, 211, 238, 0.25);
    padding-bottom: 8px;
}

.event-popup-title-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-popup-id {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
}

.event-popup-close-btn {
    background: transparent;
    border: none;
    color: var(--text-slate);
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.event-popup-close-btn:hover {
    color: #ffffff;
    background: rgba(244, 63, 94, 0.25);
}

.event-popup-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.metric-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metric-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.metric-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
}

.metric-mag {
    color: #f43f5e;
}

.metric-regime {
    color: #22d3ee;
}

.event-popup-geo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-slate);
    padding: 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.geo-source {
    color: var(--neon-cyan);
    font-weight: 600;
}

.event-popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.event-popup-actions .geo-btn {
    flex: 1;
}

/* Cybernetic Corner Brackets (as seen in Slides 1-6) */
.bracketed-panel {
    position: relative;
}

.bracketed-panel::before {
    content: "";
    position: absolute;
    top: -2px; left: -2px;
    width: 12px; height: 12px;
    border-top: 2px solid var(--neon-cyan);
    border-left: 2px solid var(--neon-cyan);
    pointer-events: none;
    z-index: 15;
}

.bracketed-panel::after {
    content: "";
    position: absolute;
    bottom: -2px; right: -2px;
    width: 12px; height: 12px;
    border-bottom: 2px solid var(--neon-cyan);
    border-right: 2px solid var(--neon-cyan);
    pointer-events: none;
    z-index: 15;
}

.panel-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--neon-cyan);
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(34, 211, 238, 0.2);
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.layer-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.8rem;
    color: var(--text-slate);
}

.layer-toggle-row:hover {
    color: var(--text-white);
}

/* Modern Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #334155;
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #06b6d4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* Bottom HUD: Live Ticker & Attribution Disclaimer */
.geo-bottom-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(0deg, rgba(6, 11, 21, 0.96) 0%, rgba(6, 11, 21, 0.8) 65%, transparent 100%);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(34, 211, 238, 0.28);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.live-ticker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.depth-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.75rem;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.crustal-color { background-color: var(--threat-red); box-shadow: 0 0 8px var(--threat-red); }
.interface-color { background-color: var(--survival-emerald); box-shadow: 0 0 8px var(--survival-emerald); }
.intraslab-color { background-color: #3b82f6; box-shadow: 0 0 8px #3b82f6; }

/* Tactical Command Glass - Hazard Flank Banner (Slide 2) */
.hazard-banner {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding: 6px 20px;
    background: rgba(13, 20, 36, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.25), var(--glint-specular);
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.hazard-label-full {
    display: inline;
}

.hazard-label-short {
    display: none;
}

.hazard-banner::before,
.hazard-banner::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 10px;
    background: repeating-linear-gradient(45deg, rgba(244, 63, 94, 0.85), rgba(244, 63, 94, 0.85) 4px, transparent 4px, transparent 8px);
    border-radius: 2px;
}
.hazard-banner::before { margin-right: 12px; }
.hazard-banner::after { margin-left: 12px; }

.disclaimer-banner {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-align: center;
    letter-spacing: 0.3px;
}

.disclaimer-strong {
    color: var(--threat-coral);
    font-weight: 700;
}

/* Citizen "Press to Report" Button (Slide 3 Magenta/Pink Shockwave) */
.btn-citizen-report {
    background: linear-gradient(135deg, #f43f5e 0%, #d946ef 100%);
    border: 1px solid rgba(244, 114, 182, 0.7);
    box-shadow: 0 0 18px rgba(217, 70, 239, 0.5);
    color: #ffffff;
    font-weight: 800;
    padding: 7px 16px;
    border-radius: 9999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-citizen-report:hover {
    transform: scale(1.04);
    box-shadow: 0 0 28px rgba(217, 70, 239, 0.8);
}

/* Initial Fullscreen Loading View */
.geo-initial-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #07090e;
    color: #ffffff;
}

.loader-pulse-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(34, 211, 238, 0.85);
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.65), inset 0 0 16px rgba(6, 182, 212, 0.35);
    animation: loader-spin 1.4s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin-bottom: 24px;
}

@keyframes loader-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #22d3ee, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.loader-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Modal for Citizen Shaking Intensity Selector */
.intensity-modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.intensity-modal {
    width: 90%;
    max-width: 480px;
    background: #0f172a;
    border: var(--border-neon);
    box-shadow: var(--shadow-neon);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.intensity-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.intensity-card {
    padding: 12px 6px;
    border-radius: 10px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.15s ease;
}

.intensity-card:hover {
    border-color: #22d3ee;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
}

.intensity-card.selected {
    border: var(--border-neon);
    background: var(--gradient-neon);
}

.mmi-number {
    font-size: 1.3rem;
    font-weight: 800;
}

.mmi-desc {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 4px;
}

/* ==========================================================================
   Phase 2: 4D Historical Timeline Scrubber & Camera Keyframe Studio Styles
   ========================================================================== */

.timeline-scrubber-container {
    position: absolute !important;
    bottom: 84px !important;
    left: 72px;
    right: 16px;
    margin: 0;
    background: rgba(11, 19, 43, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--border-neon);
    box-shadow: var(--shadow-halo), 0 8px 30px rgba(0, 0, 0, 0.65);
    border-radius: 10px;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 85;
    pointer-events: auto;
}

.timeline-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
}

.epoch-selector-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
}

.timeline-prefix {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--neon-cyan);
    white-space: nowrap;
}

.epoch-pills {
    display: flex;
    gap: 6px;
}

.epoch-pill-btn {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.epoch-pill-btn:hover {
    border-color: var(--neon-cyan);
    color: #ffffff;
}

.epoch-pill-btn.active {
    border: var(--border-neon);
    background: var(--gradient-neon);
    color: #ffffff;
    font-weight: 700;
    box-shadow: var(--shadow-halo);
}

.timeline-meta-cluster {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.timeline-events-badge {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.timeline-events-badge strong {
    color: var(--neon-cyan);
}

.timeline-time-display {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.8);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.geo-btn-mini {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.geo-btn-mini:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.geo-btn-mini.active {
    border: var(--border-neon);
    background: var(--gradient-neon);
    box-shadow: var(--shadow-halo);
}

/* Timeline Slider */
.timeline-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.timeline-bound-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    white-space: nowrap;
    font-family: 'Courier New', monospace;
}

.timeline-track-wrapper {
    position: relative;
    flex: 1;
    height: 16px;
    display: flex;
    align-items: center;
}

.timeline-progress-bar {
    position: absolute;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, #22d3ee, #a855f7);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
    pointer-events: none;
    z-index: 1;
}

.timeline-slider-input {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.timeline-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 8px #22d3ee, inset 0 0 4px #22d3ee;
    cursor: grab;
    transition: transform 0.1s ease;
}

.timeline-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

/* Transport Controls Row */
.timeline-transport-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.transport-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.transport-btn {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.transport-btn:hover {
    border-color: var(--neon-cyan);
    color: #ffffff;
}

.transport-btn.play-pause-btn {
    width: 34px;
    height: 28px;
    background: rgba(14, 165, 233, 0.2);
    border-color: rgba(34, 211, 238, 0.5);
    color: var(--neon-cyan);
    font-size: 0.85rem;
}

.transport-btn.play-pause-btn.playing {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.speed-selector-cluster {
    display: flex;
    align-items: center;
    gap: 4px;
}

.speed-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-right: 2px;
}

.speed-pill-btn {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.speed-pill-btn:hover {
    border-color: var(--neon-cyan);
    color: #ffffff;
}

.speed-pill-btn.active {
    background: rgba(34, 211, 238, 0.25);
    border-color: var(--neon-cyan);
    color: #ffffff;
    font-weight: 700;
}

/* Keyframe Studio & Media Export Modal */
.studio-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    animation: fadeIn 0.2s ease-out;
}

.studio-modal-card {
    width: min(880px, 92vw);
    max-height: 85vh;
    background: rgba(11, 19, 43, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: var(--border-neon);
    box-shadow: var(--shadow-halo), 0 16px 40px rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.studio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.studio-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.studio-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffffff;
}

.studio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .studio-grid {
        grid-template-columns: 1fr;
    }
    .timeline-scrubber-container {
        margin-left: 56px;
        margin-right: 8px;
    }
}

.studio-keyframes-col,
.studio-controls-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
}

.keyframes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.empty-keyframes-hint {
    padding: 24px 14px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
    background: rgba(15, 23, 42, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    line-height: 1.4;
}

.keyframe-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 10px;
    transition: all 0.15s ease;
}

.keyframe-item:hover {
    border-color: rgba(34, 211, 238, 0.5);
}

.keyframe-item.selected {
    border-color: var(--neon-cyan);
    background: rgba(6, 182, 212, 0.15);
}

.kf-index {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--neon-cyan);
    font-family: 'Courier New', monospace;
    width: 24px;
}

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

.kf-label-input {
    background: transparent;
    border: 1px solid transparent;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 4px;
}

.kf-label-input:focus {
    border-color: var(--neon-cyan);
    background: rgba(0, 0, 0, 0.4);
    outline: none;
}

.kf-coords {
    font-size: 0.65rem;
    color: var(--text-dim);
    display: flex;
    gap: 6px;
}

.kf-actions {
    display: flex;
    gap: 4px;
}

.kf-action-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.kf-action-btn:hover {
    border-color: var(--neon-cyan);
    background: rgba(34, 211, 238, 0.15);
}

.studio-io-row {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.file-upload-btn {
    cursor: pointer;
}

/* Studio Section & Controls */
.studio-section {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--neon-cyan);
}

.section-desc {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.35;
}

.preview-transport-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spline-progress-text {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--neon-cyan);
}

.export-settings-row {
    display: flex;
    gap: 12px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.setting-group label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.studio-select {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #ffffff;
    font-size: 0.78rem;
    padding: 6px 10px;
    border-radius: 6px;
    outline: none;
}

.export-action-row {
    display: flex;
    gap: 10px;
}

.recording-active-btn {
    border: 1.5px solid #ef4444 !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(185, 28, 28, 0.3) 100%) !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.5) !important;
    color: #ffffff !important;
    animation: pulseGlow 1.5s infinite;
}

.export-status-banner {
    font-size: 0.72rem;
    color: var(--neon-cyan);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
}

.watermark-notice-box {
    background: rgba(0, 0, 0, 0.35);
    border-left: 3px solid #ef4444;
    padding: 8px 10px;
    border-radius: 0 6px 6px 0;
}

.notice-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: #ef4444;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
}

.notice-body {
    font-size: 0.68rem;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.3;
}

/* ==========================================================================
   Phase 3: Multi-Mode OLED Nightstand Suite & Bedside Alert Override Styles
   ========================================================================== */

.nightstand-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000 !important;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
    cursor: pointer;
}

.nightstand-overlay.dimmed {
    opacity: 0.36;
    transition: opacity 0.4s ease;
}

.nightstand-overlay.brightened {
    opacity: 0.92;
    transition: opacity 0.2s ease;
}

/* Color Palettes */
.nightstand-overlay.palette-red {
    color: #ef4444;
}

.nightstand-overlay.palette-red .clock-time,
.nightstand-overlay.palette-red .ticker-headline {
    color: #f87171;
    text-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.nightstand-overlay.palette-red .nightstand-mode-pill.active {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

.nightstand-overlay.palette-amber {
    color: #f59e0b;
}

.nightstand-overlay.palette-amber .clock-time,
.nightstand-overlay.palette-amber .ticker-headline {
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.nightstand-overlay.palette-amber .nightstand-mode-pill.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.25);
    color: #ffffff;
}

.nightstand-overlay.palette-slate {
    color: #94a3b8;
}

.nightstand-overlay.palette-slate .clock-time,
.nightstand-overlay.palette-slate .ticker-headline {
    color: #e2e8f0;
    text-shadow: 0 0 12px rgba(148, 163, 184, 0.3);
}

.nightstand-overlay.palette-slate .nightstand-mode-pill.active {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.25);
    color: #ffffff;
}

/* Lissajous Drift Container */
.nightstand-drift-container {
    width: min(720px, 94vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: transform 0.05s linear;
}

.nightstand-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.nightstand-modes-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nightstand-title {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    opacity: 0.8;
}

.nightstand-mode-pill {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.15s ease;
}

.nightstand-mode-pill:hover,
.nightstand-mode-pill.active {
    opacity: 1;
}

.nightstand-palette-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.palette-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.palette-btn.slate { background: #64748b; }
.palette-btn.red { background: #ef4444; }
.palette-btn.amber { background: #f59e0b; }

.palette-btn.active {
    border-color: #ffffff;
    transform: scale(1.2);
}

.nightstand-exit-btn {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    margin-left: 6px;
}

/* Clock Cluster */
.nightstand-clock-cluster {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.clock-time {
    font-family: 'Courier New', monospace;
    font-size: clamp(3.2rem, 10vw, 5.5rem);
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1;
}

.clock-date {
    font-size: clamp(0.85rem, 2.5vw, 1.1rem);
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.8;
}

.sensor-gate-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 4px;
}

.gate-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.gate-armed {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.gate-paused {
    background: #eab308;
}

/* Mode Views */
.nightstand-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.mode-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.minimal-subtext {
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    opacity: 0.6;
}

.mode-seismograph {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.pulse-ring-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.4;
    transition: transform 0.05s ease;
}

.pulse-ring.pulse-armed {
    opacity: 0.85;
    box-shadow: 0 0 16px currentColor;
}

.pulse-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.micro-seismogram-box {
    width: min(440px, 90vw);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid currentColor;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.seismogram-svg {
    width: 100%;
    height: 50px;
}

.seismogram-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.75;
}

.mode-ticker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ticker-card {
    border: 1px solid currentColor;
    border-radius: 8px;
    padding: 10px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ticker-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.ticker-headline {
    font-size: 1.25rem;
    font-weight: 800;
}

.ticker-sub {
    font-size: 0.75rem;
    opacity: 0.8;
}

.volcano-ticker-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.val-pill {
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid currentColor;
    padding: 3px 8px;
    border-radius: 10px;
    opacity: 0.8;
}

.globe-wireframe-art {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 1.5px dashed currentColor;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.globe-desc {
    font-size: 0.7rem;
    letter-spacing: 1px;
    opacity: 0.75;
}

.marine-grid,
.astro-dial-cluster {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: min(520px, 92vw);
}

@media (max-width: 600px) {
    .marine-grid,
    .astro-dial-cluster {
        grid-template-columns: 1fr;
    }
}

.marine-card,
.astro-card,
.moon-phase-indicator {
    border: 1px solid currentColor;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
}

.m-label, .a-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.m-val, .a-val {
    font-size: 1.05rem;
    font-weight: 800;
}

.m-sub, .a-sub, .moon-sub {
    font-size: 0.65rem;
    opacity: 0.75;
}

.moon-glyph {
    font-size: 1.8rem;
}

.moon-percent {
    font-size: 0.7rem;
    font-weight: 800;
}

/* Footer / Action Bar */
.nightstand-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.btn-nightstand-report {
    background: transparent;
    border: 1.5px solid currentColor;
    color: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 0 12px currentColor;
    transition: all 0.2s ease;
}

.btn-nightstand-report:hover {
    background: currentColor;
    color: #000000;
}

.nightstand-wake-btn {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    font-size: 0.72rem;
    padding: 6px 14px;
    border-radius: 16px;
    cursor: pointer;
    opacity: 0.75;
}

/* Bedside Alert Override Full-Screen Strobe Takeover */
.bedside-alert-takeover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: alertStrobe 0.7s infinite alternate;
}

@keyframes alertStrobe {
    0% { background: #000000; box-shadow: inset 0 0 100px rgba(239, 68, 68, 0.4); }
    100% { background: #1c0505; box-shadow: inset 0 0 180px rgba(239, 68, 68, 0.9); }
}

.alert-content-box {
    width: min(640px, 94vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    color: #ffffff;
}

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

.alert-flashing-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    border-radius: 4px;
    animation: pulseGlow 0.6s infinite alternate;
}

.alert-source {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f87171;
}

.alert-headline {
    font-size: clamp(1.4rem, 4.5vw, 2.2rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
}

.alert-instruction {
    font-size: clamp(1.0rem, 2.8vw, 1.3rem);
    font-weight: 700;
    color: #fca5a5;
    margin: 0;
    line-height: 1.35;
}

.alert-zone-pill {
    background: rgba(239, 68, 68, 0.25);
    border: 1.5px solid #ef4444;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 8px;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
}

.alert-oversized-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}

.oversized-btn {
    height: 56px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s ease;
}

.oversized-btn:active {
    transform: scale(0.98);
}

.acknowledge-btn {
    background: #1e293b;
    border: 2px solid #64748b;
    color: #ffffff;
}

.report-btn {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    border: 2px solid #22d3ee;
    color: #ffffff;
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.6);
}

/* ==========================================================================
   Phase 4: Admin Portal, Dynamic OAuth & Partner Gateway Styles
   ========================================================================== */

.admin-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.admin-modal-card {
    width: min(840px, 94vw);
    max-height: 88vh;
    background: rgba(11, 19, 43, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: var(--border-neon);
    box-shadow: var(--shadow-halo), 0 20px 50px rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.4) transparent;
}

.admin-modal-card::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.admin-modal-card::-webkit-scrollbar-track {
    background: transparent;
}

.admin-modal-card::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.35);
    border-radius: 4px;
}

.admin-modal-card::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 211, 238, 0.7);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.admin-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffffff;
}

.admin-defcon-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.defcon-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.defcon-status-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--neon-cyan);
}

.defcon-active-pill {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.defcon-active-pill.defcon-level-4 {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #10b981;
}

.defcon-active-pill.defcon-level-3 {
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid #eab308;
    color: #eab308;
}

.defcon-active-pill.defcon-level-2 {
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid #f97316;
    color: #f97316;
}

.defcon-active-pill.defcon-level-1 {
    background: rgba(239, 68, 68, 0.25);
    border: 1.5px solid #ef4444;
    color: #ef4444;
    animation: pulseGlow 1s infinite alternate;
}

.defcon-desc {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin: 0;
}

.defcon-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (max-width: 640px) {
    .defcon-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.defcon-select-btn {
    border-radius: 6px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    transition: all 0.15s ease;
}

.defcon-select-btn .btn-level {
    font-size: 0.75rem;
    font-weight: 800;
}

.defcon-select-btn .btn-sub {
    font-size: 0.62rem;
    opacity: 0.8;
}

.defcon-btn-4:hover, .defcon-btn-4.selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.defcon-btn-3:hover, .defcon-btn-3.selected {
    border-color: #eab308;
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.defcon-btn-2:hover, .defcon-btn-2.selected {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.defcon-btn-1:hover, .defcon-btn-1.selected {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.col-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-col-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
}

.admin-col-sub {
    font-size: 0.65rem;
    color: var(--text-dim);
}

.oauth-providers-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.oauth-provider-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
}

.prov-icon {
    font-size: 1.2rem;
}

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

.prov-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
}

.prov-client-id {
    font-size: 0.65rem;
    color: var(--text-dim);
    font-family: 'Courier New', monospace;
}

.partner-ingest-box {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.partner-key-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.partner-key-row label,
.test-input-group label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
}

.admin-input-mono {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    padding: 5px 8px;
    border-radius: 6px;
    outline: none;
}

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

.test-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-input-num {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #ffffff;
    font-size: 0.8rem;
    padding: 4px 6px;
    border-radius: 6px;
    outline: none;
}

.test-coord-label {
    font-size: 0.75rem;
    color: var(--neon-cyan);
    font-weight: 700;
    padding-top: 4px;
}

.admin-status-pill {
    font-size: 0.72rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid #10b981;
    border-radius: 6px;
    padding: 6px 10px;
}

/* ==========================================================================
   Phase 5: Natural Language Copilot & Statistical Studio Styles
   ========================================================================== */

.stats-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1150;
}

.stats-modal-card {
    width: min(920px, 94vw);
    max-height: 90vh;
    background: rgba(11, 19, 43, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: var(--border-neon);
    box-shadow: var(--shadow-halo), 0 24px 60px rgba(0, 0, 0, 0.85);
    border-radius: 12px;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.4) transparent;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.stats-modal-card::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.stats-modal-card::-webkit-scrollbar-track {
    background: transparent;
}

.stats-modal-card::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.35);
    border-radius: 4px;
}

.stats-modal-card::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 211, 238, 0.7);
}

.stats-modal-card.is-fullscreen {
    width: 98vw;
    height: 96vh;
    max-height: 96vh;
    border-radius: 6px;
}

.stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.stats-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stats-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.stats-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-action-btn {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.stats-action-btn:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
}

/* Copilot Input Bar */
.stats-copilot-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    padding: 6px 12px;
}

.copilot-icon {
    font-size: 1.1rem;
    color: #a855f7;
}

.copilot-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.85rem;
    outline: none;
}

.copilot-input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

/* Tab Switcher */
.stats-tabs-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.stats-tab-btn {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.stats-tab-btn:hover {
    border-color: var(--neon-cyan);
    color: #ffffff;
}

.stats-tab-btn.active {
    border: var(--border-neon);
    background: var(--gradient-neon);
    color: #ffffff;
    font-weight: 700;
}

/* Chart Canvas Body */
.stats-body {
    flex: 1;
    min-height: 320px;
    display: flex;
    position: relative;
}

.svg-canvas-container {
    width: 100%;
    height: 100%;
    min-height: 320px;
    position: relative;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px;
}

.stats-svg {
    width: 100%;
    height: 100%;
}

.svg-data-point {
    cursor: pointer;
    transition: all 0.15s ease;
}

.svg-data-point:hover {
    r: 8;
    fill: #ffffff;
    stroke: var(--neon-cyan);
    stroke-width: 2.5;
}

.axis-label-x {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.axis-label-y {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%) rotate(-90deg);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.stats-point-tooltip {
    position: absolute;
    background: rgba(11, 19, 43, 0.95);
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    padding: 6px 10px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 10;
}

.tt-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #ffffff;
}

.tt-sub {
    font-size: 0.65rem;
    color: var(--neon-cyan);
}

/* InfiniteAstro Ephemeris Dial View */
.astro-canvas-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.astro-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 14px;
}

@media (max-width: 700px) {
    .astro-hero-grid {
        grid-template-columns: 1fr;
    }
}

.astro-card-large {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.moon-glyph-large {
    font-size: 3.2rem;
}

.astro-main-stat {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1px;
}

.astro-sub-stat {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--neon-cyan);
}

.astro-desc {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.astro-metrics-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.astro-metric-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.am-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.am-val {
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
}

.am-val.status-moderate {
    color: #f59e0b;
}

.am-sub {
    font-size: 0.68rem;
    color: var(--text-dim);
}

/* Footer Explanation */
.stats-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(56, 189, 248, 0.2);
}

.stats-explanation {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.exp-title {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
}

.exp-body {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.35;
}

.b-value-badge {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #ffffff;
    white-space: nowrap;
}

/* ==========================================================================
   Phase 4/6: Earthquake Alert Settings Modal & Mobile Menu Drawer Styles
   ========================================================================== */
.settings-modal-card {
    width: min(680px, 94vw);
    max-height: 88vh;
    background: rgba(11, 19, 43, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: var(--border-neon);
    box-shadow: var(--shadow-halo), 0 24px 60px rgba(0, 0, 0, 0.85);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.4) transparent;
}

.settings-modal-card::-webkit-scrollbar {
    width: 6px;
}
.settings-modal-card::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.35);
    border-radius: 4px;
}

.settings-section {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-row-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.settings-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.settings-toggle-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.settings-toggle-desc {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.settings-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
}

.settings-threshold-badge {
    font-size: 0.8rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    color: #ffffff;
}

.settings-section-desc {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin: 0;
}

.settings-magnitude-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (max-width: 600px) {
    .settings-magnitude-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mag-threshold-btn {
    border-radius: 8px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    transition: all 0.15s ease;
}

.mag-threshold-btn .mag-num {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
}

.mag-threshold-btn .mag-label {
    font-size: 0.62rem;
    text-align: center;
    opacity: 0.85;
}

.mag-threshold-btn:hover {
    border-color: var(--neon-cyan);
    color: #ffffff;
}

.mag-threshold-btn.selected {
    border: var(--border-neon);
    background: var(--gradient-neon);
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.4);
    color: #ffffff;
}

.notification-perm-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
}

.notification-perm-badge.perm-granted {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #10b981;
}

.notification-perm-badge.perm-denied {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.notification-perm-badge.perm-default {
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid #eab308;
    color: #eab308;
}

.notification-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.settings-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(56, 189, 248, 0.2);
}

.settings-save-notice {
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* ==========================================================================
   Mobile Hamburger & Tactical Navigation Drawer Styles
   ========================================================================== */
.mobile-hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(11, 19, 43, 0.85);
    border: var(--border-neon);
    box-shadow: var(--shadow-halo);
    color: #ffffff;
    font-size: 1.25rem;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.2s ease;
    z-index: 50;
}

.mobile-hamburger-btn:hover,
.mobile-hamburger-btn.active {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.7);
    color: var(--neon-cyan);
}

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 1200;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 86vw);
    background: rgba(10, 18, 38, 0.96);
    border-left: var(--border-neon);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(24px);
    z-index: 1210;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    overflow-y: auto;
    animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(34, 211, 238, 0.2);
}

.mobile-menu-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--neon-cyan);
}

.mobile-menu-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-section-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.mobile-menu-item {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s ease;
}

.mobile-menu-item .m-icon {
    font-size: 1.1rem;
}

.mobile-menu-item .m-text {
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
    border: var(--border-neon);
    background: var(--gradient-neon);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}

.mobile-menu-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-list-btn {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mobile-menu-list-btn .m-icon {
    font-size: 1.1rem;
}

.mobile-menu-list-btn:hover,
.mobile-menu-list-btn.active {
    border: var(--border-neon);
    background: rgba(6, 182, 212, 0.18);
    color: var(--neon-cyan);
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(34, 211, 238, 0.2);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .geo-top-bar {
        padding: 8px 12px;
        max-width: 100vw;
        box-sizing: border-box;
        overflow: hidden;
    }
    .brand-section {
        gap: 8px;
        flex-shrink: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
    }
    .tactical-prefix {
        font-size: 0.62rem;
        padding: 1px 5px;
        letter-spacing: 0.5px;
    }
    .brand-title {
        font-size: 0.90rem;
        letter-spacing: 1px;
    }
    .user-loc-badge {
        display: none !important;
    }
    .hud-telemetry-overlay {
        top: 54px;
        left: 12px;
        padding: 2px 7px;
    }
    .geo-toolbar {
        display: none !important;
    }
    .mobile-hamburger-btn {
        display: flex !important;
        flex-shrink: 0;
        margin-left: 8px;
    }
    .altitude-docked-strip {
        height: 38vh;
        max-height: 280px;
    }
    .timeline-scrubber-container {
        left: 8px !important;
        right: 8px !important;
        bottom: 64px !important;
    }
    .geo-bottom-bar {
        padding: 5px 8px !important;
        gap: 0 !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .live-ticker-row {
        width: 100% !important;
        justify-content: center !important;
        gap: 0 !important;
    }
    .depth-legend {
        display: none !important;
    }
    .hazard-banner {
        padding: 4px 8px !important;
        font-size: 0.72rem !important;
        width: 100% !important;
        justify-content: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .hazard-banner::before,
    .hazard-banner::after {
        display: none !important;
    }
    .hazard-label-full {
        display: none !important;
    }
    .hazard-label-short {
        display: inline !important;
    }
    .disclaimer-banner {
        display: none !important;
    }
    .layers-dropdown-panel {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: min(330px, calc(100vw - 28px)) !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        z-index: 1300 !important;
    }
    .event-detail-popup {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: min(330px, calc(100vw - 28px)) !important;
        max-width: 90vw !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        z-index: 1300 !important;
    }
    .mobile-menu-drawer {
        width: min(320px, calc(100vw - 32px)) !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
}

@media (max-width: 480px) {
    .tactical-prefix {
        font-size: 0.56rem;
        padding: 1px 3px;
        letter-spacing: 0.3px;
    }
    .brand-title {
        font-size: 0.80rem;
        letter-spacing: 0.5px;
    }
    .status-dot-badge {
        width: 22px;
        height: 22px;
    }
    .status-dot {
        width: 6px;
        height: 6px;
    }
    .mobile-hamburger-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    .hud-telemetry-overlay {
        top: 50px;
        left: 8px;
        padding: 2px 6px;
    }
    .hud-telemetry-label {
        font-size: 0.60rem;
    }
    .hud-telemetry-val {
        font-size: 0.68rem;
    }
}




