/* ============================================================================
   SismoTracker · Enhancement Styles
   Complements style.css with styles for the new modules.
   ============================================================================ */

/* ── Hidden attribute compatibility ───────────────────────────────────────── */
[hidden] { display: none !important; }

/* ── HTML structural fixes ────────────────────────────────────────────────── */
#map-container { position: relative; }
#map, #globe-container {
    width: 100%; height: 100%;
    position: absolute; top: 0; left: 0;
}

/* Audio row structural cleanup (replaces inline style) */
.audio-row {
    display: flex; align-items: center;
    justify-content: space-between; width: 100%;
}
.audio-row label { margin: 0; }
.audio-row input[type="range"] {
    width: 70px; accent-color: #38bdf8; cursor: pointer;
}

/* UTC clock (replaces inline style) */
#utc-clock {
    font-size: 12px;
    color: #38bdf8;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}

/* Globe tour button (replaces inline style) */
#globe-tour-btn {
    position: absolute;
    bottom: 30px; left: 20px;
    z-index: 1100;
    background: rgba(15, 17, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.2s;
}

/* Control row helper */
.control-row {
    display: flex; flex-direction: column; gap: 4px; width: 100%;
}

/* ============================================================================
   Source Panel (pill + popover)
   ============================================================================ */
#sources-pill-mount { position: relative; margin-bottom: 10px; width: 100%; }

.src-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    width: 100%;
    justify-content: flex-start;
}
.src-pill:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(148, 163, 184, 0.4);
}
.src-pill[aria-expanded="true"] {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
}
.src-pill small {
    color: #64748b;
    font-size: 10px;
    margin-right: auto;
}
.src-pill #src-count {
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.src-caret {
    color: #64748b;
    font-size: 9px;
    transition: transform 0.2s;
}
.src-pill[aria-expanded="true"] .src-caret { transform: rotate(180deg); }

.src-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    transition: all 0.4s;
    display: inline-block;
    flex-shrink: 0;
}
.src-dot[data-state="pending"] { background: #475569; }
.src-dot[data-state="ok"]      { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.6); }
.src-dot[data-state="empty"]   { background: #64748b; }
.src-dot[data-state="warn"]    { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,0.6); }
.src-dot[data-state="error"]   { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.6); }

.src-aggregate { width: 10px; height: 10px; }

.src-panel {
    position: absolute;
    left: 0; top: calc(100% + 6px);
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    padding: 6px;
    min-width: 280px;
    width: 320px;
    z-index: 1200;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    max-height: 60vh;
    overflow-y: auto;
}
.src-panel-head {
    display: grid;
    grid-template-columns: 8px 1fr 90px 32px 38px;
    gap: 8px;
    padding: 6px 10px 4px;
    font-size: 9px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    margin-bottom: 4px;
}
.src-row {
    display: grid;
    grid-template-columns: 8px 1fr 90px 32px 38px;
    gap: 8px;
    align-items: center;
    padding: 7px 10px;
    font-size: 11px;
    color: #cbd5e1;
    border-radius: 6px;
    transition: background 0.15s;
}
.src-row:hover { background: rgba(51, 65, 85, 0.4); }
.src-row-name b { font-weight: 600; color: #fff; }
.src-row-region { color: #94a3b8; font-size: 10px; }
.src-row-count { color: #38bdf8; font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.src-row-time { color: #64748b; font-size: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.src-panel-foot {
    padding: 8px 10px 4px;
    font-size: 10px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    margin-top: 4px;
}

/* ============================================================================
   Felt Badge
   ============================================================================ */
#felt-badge-mount { margin-top: 14px; }

.felt-badge {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.7));
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-left: 3px solid var(--mmi-color, #475569);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.4s;
}
.felt-badge[data-risk="high"]     { border-left-color: #f97316; box-shadow: 0 0 12px rgba(249, 115, 22, 0.2); }
.felt-badge[data-risk="critical"] { border-left-color: #ef4444; box-shadow: 0 0 16px rgba(239, 68, 68, 0.3); animation: felt-pulse 2s ease-in-out infinite; }

@keyframes felt-pulse {
    0%,100% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 22px rgba(239, 68, 68, 0.5); }
}

.felt-label {
    font-size: 9px;
    letter-spacing: 1.4px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}
.felt-row {
    display: flex; align-items: baseline;
    gap: 10px;
    margin-top: 6px;
}
.felt-mmi { display: flex; align-items: baseline; gap: 8px; }
.felt-mmi-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--mmi-color, #cbd5e1);
    line-height: 1;
}
.felt-mmi-num {
    font-size: 10px;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}
.felt-cat {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-left: auto;
}
.felt-meta {
    margin-top: 8px;
    font-size: 11px;
    color: #cbd5e1;
    display: flex;
    gap: 8px;
    align-items: center;
}
.felt-mag {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 10px;
}
.felt-dist {
    color: #64748b;
    font-variant-numeric: tabular-nums;
    font-size: 10px;
}
.felt-place {
    color: #cbd5e1;
    font-size: 11px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.felt-quiet {
    border-left-color: #475569;
}
.felt-quiet-msg {
    color: #64748b;
    font-style: italic;
    font-size: 12px;
    margin-top: 4px;
}

/* ============================================================================
   Event Drawer
   ============================================================================ */
.event-drawer {
    position: fixed;
    right: -440px; top: 0;
    width: 420px; max-width: 90vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(148, 163, 184, 0.2);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 60px 24px 24px;
    overflow-y: auto;
    z-index: 1500;
    font-family: 'Inter', sans-serif;
    color: #e2e8f0;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
}
.event-drawer.open { right: 0; }

.dr-close {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}
.dr-close:hover {
    background: rgba(51, 65, 85, 0.8);
    color: #fff;
}

.dr-header {
    display: flex; gap: 14px; align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    margin-bottom: 18px;
}
.dr-mag {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #0f172a; font-weight: 800; font-size: 17px;
    flex-shrink: 0;
}
.dr-place-block { flex: 1; min-width: 0; }
.dr-place {
    font-size: 14px; font-weight: 700;
    line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis;
}
.dr-time {
    font-size: 11px; color: #94a3b8; margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
.dr-source {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    font-size: 10px;
    text-transform: uppercase;
}

.dr-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.dr-grid > div {
    background: rgba(30, 41, 59, 0.5);
    padding: 8px 10px;
    border-radius: 6px;
}
.dr-grid span {
    font-size: 9px;
    color: #94a3b8;
    letter-spacing: 1.2px;
    display: block;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.dr-grid b {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.dr-section { margin-top: 22px; }
.dr-section h4 {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #94a3b8;
    margin: 0 0 10px;
    font-weight: 500;
    text-transform: uppercase;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.dr-section h4 small {
    color: #64748b;
    text-transform: none;
    letter-spacing: 0.5px;
    font-size: 9px;
}

.dr-section-user .dr-user-row {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(30, 41, 59, 0.4));
    border-left: 3px solid var(--c, #475569);
    border-radius: 8px;
    padding: 12px 14px;
}
.dr-user-mmi { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.dr-user-mmi-val { font-size: 20px; font-weight: 800; color: var(--c, #cbd5e1); }
.dr-user-mmi-cat { font-size: 13px; font-weight: 600; color: #fff; }
.dr-user-times {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 6px; padding-top: 8px; border-top: 1px solid rgba(148, 163, 184, 0.1);
}
.dr-user-times > div {
    text-align: center;
}
.dr-user-times span {
    font-size: 9px;
    color: #94a3b8;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.dr-user-times b {
    font-size: 14px;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.dr-energy {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
}
.dr-energy > div {
    background: rgba(30, 41, 59, 0.5);
    padding: 8px;
    border-radius: 6px;
    text-align: center;
}
.dr-energy span {
    font-size: 9px;
    color: #94a3b8;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.dr-energy b {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.dr-energy sup { font-size: 8px; }

.dr-tsunami {
    border: 1px solid var(--tsu, #475569);
    border-radius: 8px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.5);
}
.dr-tsunami h4 { color: var(--tsu); margin-bottom: 12px; }
.dr-tsu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dr-tsu-row > div { background: rgba(0, 0, 0, 0.3); padding: 8px; border-radius: 6px; }
.dr-tsu-row span {
    font-size: 9px;
    color: #94a3b8;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.dr-tsu-row b { font-size: 14px; color: var(--tsu); font-weight: 700; }
.dr-disclaimer {
    font-size: 10px;
    color: #64748b;
    margin-top: 10px;
    line-height: 1.5;
}

.dr-external {
    display: block;
    margin-top: 22px;
    padding: 10px 14px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}
.dr-external:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
}

/* "Full Analysis" button injected into Leaflet popups */
.analysis-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border: none;
    color: #0f172a;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.analysis-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

/* ============================================================================
   Magnitude-aware Cluster
   ============================================================================ */
.mag-cluster-wrap { background: transparent !important; border: none !important; }
.mag-cluster {
    border-radius: 50%;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
    font-weight: 700;
    position: relative;
    transition: all 0.2s;
}
.mag-cluster:hover { transform: scale(1.08); }
.mag-cluster-count {
    font-size: 13px;
    line-height: 1;
}
.mag-cluster-mag {
    position: absolute;
    bottom: -6px; right: -6px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid currentColor;
    color: inherit;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.2;
}

/* ============================================================================
   Stats Footer (sidebar bottom)
   ============================================================================ */
#stats-footer-mount {
    border-top: 1px solid var(--panel-border);
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}
.stats-footer { font-family: 'Inter', sans-serif; }
.sf-row {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
    margin-bottom: 10px;
}
.sf-cell {
    text-align: center;
    background: rgba(30, 41, 59, 0.4);
    padding: 6px 4px;
    border-radius: 6px;
    cursor: help;
}
.sf-label {
    display: block;
    font-size: 8px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}
.sf-val {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.sf-spark-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}
.sf-spark-row .sf-label { margin: 0; }
#sf-spark { background: rgba(0, 0, 0, 0.2); border-radius: 4px; }

/* ============================================================================
   Mobile responsive
   ============================================================================ */
@media (max-width: 768px) {
    .src-panel { width: 280px; right: 0; left: auto; }
    .event-drawer {
        width: 100%;
        max-width: 100vw;
        right: -100%;
    }
    #stats-footer-mount { padding: 8px 12px; }
    .sf-val { font-size: 12px; }
}

/* ════════════════════════════════════════════════════════════════════════
   v3.1 — Coulomb / Analogs / EEW / Push styles
   ════════════════════════════════════════════════════════════════════════ */

/* ── Coulomb overlay legend ─────────────────────────────────────────────── */
.coulomb-legend {
    background: rgba(15, 23, 42, 0.92);
    color: #e2e8f0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    font-size: 11px;
    line-height: 1.5;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    max-width: 200px;
}
.coulomb-legend-title {
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.coulomb-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 3px 0;
}
.coulomb-legend-row .sw {
    width: 14px; height: 14px;
    border-radius: 3px;
    flex: 0 0 auto;
}
.coulomb-legend-meta {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 10px;
    color: #94a3b8;
}

.dr-coulomb { border-left: 3px solid #dc2626; }
.dr-coulomb-desc {
    font-size: 11px;
    color: #94a3b8;
    margin: 4px 0 8px;
    line-height: 1.5;
}
.dr-coulomb-status {
    font-size: 11px;
    color: #fbbf24;
    margin-top: 6px;
    min-height: 16px;
    font-family: 'JetBrains Mono', monospace;
}
.dr-btn {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.4);
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: all 0.15s;
}
.dr-btn:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.25);
    border-color: rgba(220, 38, 38, 0.7);
}
.dr-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.dr-btn.active {
    background: rgba(220, 38, 38, 0.35);
    border-color: #dc2626;
    color: #fff;
}

/* ── Analogs panel ──────────────────────────────────────────────────────── */
.dr-analogs { border-left: 3px solid #8b5cf6; }
.analogs-loading, .analogs-error, .analogs-empty {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}
.analogs-loading .spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.analogs-narrative {
    background: rgba(139, 92, 246, 0.12);
    border-left: 3px solid #8b5cf6;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.55;
    color: #cbd5e1;
    margin-bottom: 12px;
}
.analogs-narrative strong { color: #c4b5fd; }

.analogs-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.analog-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    transition: border-color 0.15s, transform 0.15s;
}
.analog-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
}
.analog-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}
.analog-title { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.analog-mag {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #fbbf24;
    font-size: 13px;
    flex: 0 0 auto;
}
.analog-name {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analog-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #94a3b8;
    flex: 0 0 auto;
}

.analog-similarity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}
.analog-similarity .bar-track {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 3px;
    height: 6px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
}
.analog-similarity .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    transition: width 0.5s ease-out;
}
.analog-similarity .bar-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #a78bfa;
    flex: 0 0 70px;
    text-align: right;
}

.analog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0;
}
.analog-meta .badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.25);
    letter-spacing: 0.02em;
}
.badge-tsunami { background: rgba(14, 165, 233, 0.18); color: #7dd3fc; border-color: rgba(14, 165, 233, 0.4); }
.badge-deaths  { background: rgba(220, 38, 38, 0.18); color: #fca5a5; border-color: rgba(220, 38, 38, 0.4); }
.badge-dist    { background: rgba(34, 197, 94, 0.15); color: #86efac; border-color: rgba(34, 197, 94, 0.3); }
.regime-subduction  { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border-color: rgba(245, 158, 11, 0.3); }
.regime-continental { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; border-color: rgba(168, 85, 247, 0.3); }
.regime-rift        { background: rgba(236, 72, 153, 0.15); color: #f9a8d4; border-color: rgba(236, 72, 153, 0.3); }
.regime-oceanic     { background: rgba(20, 184, 166, 0.15); color: #5eead4; border-color: rgba(20, 184, 166, 0.3); }

.analog-summary {
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 4px 0 0;
}

.analogs-footer {
    text-align: center;
    font-size: 10px;
    color: #64748b;
    margin-top: 10px;
    font-style: italic;
}

/* ── EEW banner ─────────────────────────────────────────────────────────── */
.eew-banner {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: min(560px, 92vw);
    background: rgba(15, 23, 42, 0.96);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}
.eew-banner--hidden {
    transform: translateX(-50%) translateY(-150%);
    opacity: 0;
    pointer-events: none;
}
.eew-banner--alert {
    border: 2px solid #dc2626;
    background: linear-gradient(135deg,
        rgba(127, 29, 29, 0.96) 0%,
        rgba(15, 23, 42, 0.96) 100%);
    animation: eew-pulse 1.5s ease-in-out infinite;
}
@keyframes eew-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
    50%      { box-shadow: 0 0 0 16px rgba(220, 38, 38, 0); }
}
.eew-banner--past {
    animation: none;
    border-color: rgba(245, 158, 11, 0.6);
}
.eew-banner-inner {
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    align-items: flex-start;
    position: relative;
}
.eew-icon {
    font-size: 28px;
    flex: 0 0 auto;
    margin-top: 2px;
}
.eew-banner--alert .eew-icon { color: #fca5a5; }
.eew-main { flex: 1; min-width: 0; }
.eew-title {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}
.eew-banner--alert .eew-title { color: #fca5a5; }
.eew-place {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.eew-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.eew-stat {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 6px 8px;
    border-radius: 6px;
    text-align: center;
}
.eew-stat--primary {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.4);
}
.eew-stat-label {
    font-size: 9px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}
.eew-stat-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #e2e8f0;
}
.eew-stat--primary .eew-stat-val { color: #fca5a5; }
.eew-instruction {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    padding: 6px;
    background: rgba(220, 38, 38, 0.25);
    border-radius: 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.eew-banner--info .eew-instruction { display: none; }
.eew-close {
    position: absolute;
    top: 6px; right: 8px;
    background: transparent;
    border: 0;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.eew-close:hover { color: #fff; }

/* ── EEW status indicator (small dot near the controls) ─────────────────── */
.rta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #cbd5e1;
}
.rta-label {
    font-weight: 600;
    letter-spacing: 0.02em;
}
.eew-status-indicator {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: #64748b;
    transition: background 0.3s, box-shadow 0.3s;
}
.eew-status-indicator[data-status="connecting"] {
    background: #fbbf24;
    animation: eew-blink 1s ease-in-out infinite;
}
.eew-status-indicator[data-status="connected"]  { background: #34d399; }
.eew-status-indicator[data-status="registered"] {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
}
@keyframes eew-blink { 50% { opacity: 0.3; } }

/* ── Push subscribe card ────────────────────────────────────────────────── */
.push-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 6px 0;
    font-size: 11.5px;
}
.push-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.push-icon { font-size: 14px; }
.push-title {
    font-weight: 700;
    color: #e2e8f0;
    flex: 1;
    letter-spacing: 0.02em;
}
.push-status {
    font-size: 10px;
    color: #94a3b8;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.25);
}
.push-status--ok {
    color: #86efac;
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.4);
}
.push-desc {
    color: #94a3b8;
    line-height: 1.5;
    margin: 4px 0 8px;
    font-size: 11px;
}
.push-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
    flex-wrap: wrap;
    color: #cbd5e1;
}
.push-row input[type="number"] {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
    padding: 3px 6px;
    border-radius: 4px;
    width: 60px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}
.push-row input[type="number"]:disabled {
    opacity: 0.4;
}
.push-row--check { gap: 4px; }
.push-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.push-btn {
    flex: 1;
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.15s;
}
.push-btn:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(34, 197, 94, 0.6);
}
.push-btn--primary {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}
.push-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.push-error {
    color: #fca5a5;
    font-size: 10px;
    margin-top: 6px;
    min-height: 14px;
}
.push-unsupported {
    color: #94a3b8;
    font-size: 11px;
    padding: 8px;
    text-align: center;
}
