/* ============================================================================
 * css/mdrrmo/command-center-v2.css  (additive — loads AFTER command-center.css)
 * MDRRMO Command Center redesign: categorized rail, command-modules launcher,
 * DOST & International Monitoring panel + international major-quake news, and the
 * Command Posture Guide. Uses the existing --cc-* dark "mission control" tokens.
 * ==========================================================================*/

/* ── Categorized sidebar rail (reuses .sidebar / .sb-nav / .sb-link shell) ── */
.mdrrmo-cc-body .sidebar { background: linear-gradient(180deg, #0a1730 0%, #0b1830 60%, #0a1428 100%); }
.ccx-brand { display: flex; align-items: center; gap: 11px; padding: 16px 16px 12px; border-bottom: 1px solid var(--cc-border); }
.ccx-brand .ccx-mark {
    width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--cc-cyan), #2563eb); color: #04121f; font-weight: 800; font-size: 13px; letter-spacing: .02em;
    box-shadow: 0 4px 14px rgba(56,189,248,.35);
}
.ccx-brand b { display: block; color: var(--cc-ink); font-size: 15px; font-weight: 800; line-height: 1.1; }
.ccx-brand span { display: block; color: var(--cc-muted); font-size: 11.5px; margin-top: 1px; }
.ccx-nav { padding: 8px 10px 16px; overflow-y: auto; }
.ccx-cat {
    font-size: 10.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
    color: var(--cc-muted); opacity: .85; padding: 14px 10px 5px; margin: 0;
}
.ccx-cat:first-child { padding-top: 4px; }
.ccx-link {
    display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px;
    color: var(--cc-ink-soft); text-decoration: none; font-size: 13.5px; font-weight: 600; line-height: 1.2;
    transition: background .12s ease, color .12s ease;
}
.ccx-link i { width: 18px; text-align: center; color: var(--cc-muted); font-size: 14px; transition: color .12s ease; }
.ccx-link:hover { background: rgba(56,189,248,.08); color: #fff; }
.ccx-link:hover i { color: var(--cc-cyan); }
.ccx-link.active { background: linear-gradient(90deg, rgba(56,189,248,.18), rgba(56,189,248,.04)); color: #fff; box-shadow: inset 3px 0 0 var(--cc-cyan); }
.ccx-link.active i { color: var(--cc-cyan-bright); }
.ccx-link .ccx-badge { margin-left: auto; background: var(--sev-high); color: #2a1503; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; }
.ccx-link .ccx-lock { margin-left: auto; color: var(--cc-muted); font-size: 11px; opacity: .6; }
.ccx-nav .ccx-cross { margin-top: 12px; border-top: 1px solid var(--cc-border); padding-top: 8px; }

/* ── Quick Access · Command Modules launcher grid ── */
.cc-modules-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.cc-modules-head h2 { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--cc-muted); margin: 0; }
.cc-modules-head .cc-rule { flex: 1; height: 1px; background: var(--cc-border); }
.cc-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; margin-bottom: 18px; }
.cc-mod {
    display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
    padding: 15px 10px; border-radius: var(--cc-radius-sm); text-decoration: none;
    background: linear-gradient(160deg, var(--cc-panel-2), var(--cc-panel-3));
    border: 1px solid var(--cc-border); color: var(--cc-ink-soft); position: relative;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.cc-mod:hover { transform: translateY(-2px); border-color: var(--cc-border-2); box-shadow: var(--cc-shadow); color: #fff; }
.cc-mod__ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; color: #fff; }
.cc-mod__label { font-size: 12.5px; font-weight: 700; line-height: 1.2; }
.cc-mod__badge { position: absolute; top: 8px; right: 8px; background: var(--sev-high); color: #2a1503; font-size: 10.5px; font-weight: 800; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; }
.cc-i-red   { background: linear-gradient(135deg,#b91c1c,#ef4444); }
.cc-i-blue  { background: linear-gradient(135deg,#1d4ed8,#3b82f6); }
.cc-i-cyan  { background: linear-gradient(135deg,#0e7490,#22d3ee); color:#04121f; }
.cc-i-green { background: linear-gradient(135deg,#047857,#10b981); }
.cc-i-amber { background: linear-gradient(135deg,#b45309,#f59e0b); color:#2a1503; }
.cc-i-violet{ background: linear-gradient(135deg,#6d28d9,#8b5cf6); }
.cc-i-slate { background: linear-gradient(135deg,#334155,#64748b); }

/* ── DOST & International Monitoring panel ── */
.cc-dost {
    grid-column: 1 / -1; border-radius: var(--cc-radius); border: 1px solid var(--cc-border-2);
    background:
        radial-gradient(140% 120% at 100% 0%, rgba(37,99,235,.28), transparent 55%),
        radial-gradient(120% 120% at 0% 100%, rgba(56,189,248,.14), transparent 60%),
        linear-gradient(135deg, #0b1f44, #0a1530);
    padding: 18px 20px; box-shadow: var(--cc-shadow);
}
.cc-dost__head h3 { font-size: 16px; font-weight: 800; color: var(--cc-ink); margin: 0; display: flex; align-items: center; gap: 9px; }
.cc-dost__head h3 i { color: var(--cc-cyan); }
.cc-dost__head p { margin: 3px 0 14px; font-size: 12.5px; color: var(--cc-muted); }
.cc-dost__agencies { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cc-agency {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px;
    background: rgba(255,255,255,.04); border: 1px solid var(--cc-border); text-decoration: none;
    color: var(--cc-ink-soft); transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
.cc-agency:hover { transform: translateY(-1px); border-color: var(--cc-cyan); background: rgba(56,189,248,.08); color: #fff; }
.cc-agency__ico { width: 36px; height: 36px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: 16px; color: #fff; }
.cc-agency__tx b { display: block; font-size: 13px; font-weight: 800; line-height: 1.1; }
.cc-agency__tx span { display: block; font-size: 11px; color: var(--cc-muted); margin-top: 1px; }
.cc-agency__role { margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; }
.cc-role-auth { background: rgba(52,211,153,.16); color: #6ee7b7; }
.cc-role-bench { background: rgba(230,184,92,.16); color: var(--cc-gold); }

/* International major-quake news list */
.cc-quake-news { margin-top: 14px; border-top: 1px solid var(--cc-border); padding-top: 12px; }
.cc-quake-news h4 { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cc-muted); margin: 0 0 8px; display: flex; align-items: center; gap: 7px; }
.cc-quake-news h4 .cc-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--sev-critical); box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: ccPulse 1.8s infinite; }
@keyframes ccPulse { 0%{box-shadow:0 0 0 0 rgba(239,68,68,.55)} 70%{box-shadow:0 0 0 8px rgba(239,68,68,0)} 100%{box-shadow:0 0 0 0 rgba(239,68,68,0)} }
.cc-qn-row { display: flex; align-items: center; gap: 12px; padding: 7px 4px; border-bottom: 1px solid rgba(148,170,210,.08); font-size: 13px; }
.cc-qn-row:last-child { border-bottom: 0; }
.cc-qn-mag { flex: none; width: 46px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; }
.cc-qn-m-major { background: linear-gradient(135deg,#b91c1c,#ef4444); }
.cc-qn-m-strong{ background: linear-gradient(135deg,#b45309,#f59e0b); color:#2a1503; }
.cc-qn-m-mod   { background: linear-gradient(135deg,#0e7490,#22d3ee); color:#04121f; }
.cc-qn-place { flex: 1; min-width: 0; color: var(--cc-ink-soft); }
.cc-qn-place b { color: var(--cc-ink); font-weight: 700; }
.cc-qn-place span { display: block; font-size: 11.5px; color: var(--cc-muted); }
.cc-qn-when { flex: none; font-size: 11.5px; color: var(--cc-muted); white-space: nowrap; }
.cc-qn-empty { color: var(--cc-muted); font-size: 12.5px; padding: 8px 4px; }

/* ── Command Posture Guide ── */
.cc-posture { display: flex; flex-wrap: wrap; gap: 9px; }
.cc-posture__item { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--cc-border); background: rgba(255,255,255,.03); }
.cc-posture__item.is-current { border-color: var(--cc-cyan); background: rgba(56,189,248,.1); box-shadow: 0 0 0 1px rgba(56,189,248,.25) inset; }
.cc-posture__dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.cc-posture__tx b { display: block; font-size: 12.5px; color: var(--cc-ink); font-weight: 800; }
.cc-posture__tx span { display: block; font-size: 10.5px; color: var(--cc-muted); }

@media (max-width: 640px) {
    .cc-modules { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .cc-dost { padding: 15px 14px; }
}

/* ── Command-center BACKDROP (user plate + CSS plexus/gradient fallback) ──
 * Drop the supplied plate at /assets/images/mdrrmo-cc-bg.jpg and it becomes the
 * literal backdrop; until then the gradients + dot-plexus give the same vibe. */
body.mdrrmo-cc-body {
    background:
        linear-gradient(180deg, rgba(8,14,34,.82), rgba(7,11,26,.92)),
        radial-gradient(120% 95% at 90% -5%, rgba(124,58,237,.34), transparent 56%),
        radial-gradient(95% 80% at -5% 105%, rgba(37,99,235,.24), transparent 60%),
        url('../../images/mdrrmo-cc-bg.jpg?v=2') center top / cover no-repeat fixed,
        #070d22;
    background-blend-mode: normal;
}
body.mdrrmo-cc-body .shell { position: relative; }
body.mdrrmo-cc-body .shell::before {
    content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(rgba(56,189,248,.10) 1px, transparent 1.5px);
    background-size: 26px 26px; opacity: .45;
}
body.mdrrmo-cc-body .shell > .main { background: transparent; position: relative; z-index: 1; }
body.mdrrmo-cc-body .shell > .sidebar { position: relative; z-index: 2; }

/* Sidebar seal (single official logo, also used in the masthead) */
.ccx-brand .ccx-seal { width: 40px; height: 40px; border-radius: 9px; flex: none; object-fit: cover; box-shadow: 0 4px 14px rgba(2,8,23,.5); }

/* ── EOC Activation footer row (matches the command-posture-guide mockup) ── */
.cc-eoc-footer {
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
    padding: 16px 18px; margin-bottom: 18px; border-radius: var(--cc-radius);
    border: 1px solid var(--cc-border-2);
    background: linear-gradient(135deg, rgba(19,40,78,.9), rgba(11,24,48,.9));
    box-shadow: var(--cc-shadow);
}
.cc-eoc-lead { min-width: 170px; }
.cc-eoc-lead h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--cc-ink); display: flex; align-items: center; gap: 8px; }
.cc-eoc-lead h3 i { color: var(--cc-cyan); }
.cc-eoc-cap { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cc-muted); margin-bottom: 6px; }
.cc-cur-badge { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--cc-border-2); color: var(--cc-ink); font-weight: 700; font-size: 13.5px; }
.cc-eoc-guide { flex: 1; min-width: 280px; }
.cc-eoc-declare { margin-left: auto; }
@media (max-width: 760px) { .cc-eoc-declare { margin-left: 0; width: 100%; justify-content: center; } }

/* ── Rail: brand pinned, nav scrolls internally, ALL items reachable ──────────
 * Desktop: the rail is sticky and exactly viewport-minus-topbar tall, so it never
 * runs off the page; the nav scrolls inside it with bottom padding that clears the
 * fixed 44px warning ticker — so no sidebar item is ever hidden behind the ticker. */
body.mdrrmo-cc-body .sidebar { display: flex; flex-direction: column; }
body.mdrrmo-cc-body .ccx-brand { flex: 0 0 auto; }
body.mdrrmo-cc-body .ccx-nav {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 84px;  /* clears the fixed warning ticker (44px) + breathing room */
    scrollbar-width: thin; scrollbar-color: rgba(148,170,210,.4) transparent;
}
body.mdrrmo-cc-body .ccx-nav::-webkit-scrollbar { width: 8px; }
body.mdrrmo-cc-body .ccx-nav::-webkit-scrollbar-thumb { background: rgba(148,170,210,.35); border-radius: 8px; }
/* ≥769px = grid layout: pin the rail below the 52px sticky topbar, full remaining height. */
@media (min-width: 769px) {
    body.mdrrmo-cc-body .shell > .sidebar {
        position: sticky; top: 52px; align-self: start;
        height: calc(100vh - 52px); max-height: calc(100vh - 52px);
    }
}
@media (max-width: 768px) {
    body.mdrrmo-cc-body .shell { display: block; }
    body.mdrrmo-cc-body .shell > .sidebar {
        position: fixed; top: 0; left: 0; z-index: 80;
        width: var(--sb-w); height: 100vh; max-height: 100vh;
        transform: translateX(-100%);
        transition: transform var(--m-med) var(--ease);
    }
    body.mdrrmo-cc-body .shell > .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 60px rgba(0,0,0,.6);
    }
    body.mdrrmo-cc-body .shell > .main {
        width: 100%; min-width: 0; max-width: none;
    }
    body.mdrrmo-cc-body .topbar { gap: .55rem; }
    body.mdrrmo-cc-body .tb-cluster { flex: 1 1 auto; min-width: 0; overflow: hidden; }
    body.mdrrmo-cc-body .tb-rep {
        display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    }
    body.mdrrmo-cc-body .tb-right { gap: .5rem; }
}

@media (max-width: 520px) {
    body.mdrrmo-cc-body .tb-time { display: none; }
    body.mdrrmo-cc-body .ask-ai { padding: .38rem .65rem; white-space: nowrap; }
}

body.mdrrmo-cc-body .cc-note {
    display: block;
    overflow-wrap: anywhere;
}
body.mdrrmo-cc-body .cc-note > i {
    display: inline-block;
    margin: 0 6px 0 0;
}

/* ============================================================================
 * MDRRMO WARNING / ALARM ticker (CNN-style) — rendered ONLY on /mdrrmo.
 * Self-contained; never styles or overlaps the Good Vibes shell (when shown
 * inside the music-shell iframe it lifts itself via .mwt-framed). The default
 * state is calm "MONITOR"; data-alarm="1" turns it into a pulsing red ALARM.
 * ==========================================================================*/
.mdrrmo-wt {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    display: flex; align-items: stretch; height: 44px;
    background: linear-gradient(90deg, #07101f 0%, #0c1b33 50%, #07101f 100%);
    border-top: 2px solid rgba(56,189,248,.55);
    box-shadow: 0 -8px 30px rgba(0,0,0,.45);
    overflow: hidden; font-family: inherit;
    transition: transform .35s ease, border-color .3s ease, box-shadow .3s ease;
}
.mdrrmo-wt.mwt-framed { bottom: 64px; left: 8px; right: 8px; border-radius: 10px; border: 1px solid rgba(56,189,248,.5); border-top-width: 2px; }
.mdrrmo-wt.mwt-min { transform: translateY(calc(100% + 70px)); }
/* keep page content clear of the fixed bar */
body.mdrrmo-cc-body .wrap.mdrrmo-wrap { padding-bottom: 60px; }

.mdrrmo-wt-label {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
    padding: 0 16px; min-width: 11.5rem; justify-content: center;
    background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #04121f;
    font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    white-space: nowrap;
}
.mdrrmo-wt-dot { width: 9px; height: 9px; border-radius: 50%; background: #04121f; box-shadow: 0 0 0 0 rgba(4,18,31,.5); animation: mwtHalo 2s ease-in-out infinite; }
@keyframes mwtHalo { 0%,100% { box-shadow: 0 0 0 0 rgba(4,18,31,.45); } 50% { box-shadow: 0 0 0 7px rgba(4,18,31,0); } }

.mdrrmo-wt-track { position: relative; flex: 1 1 auto; overflow: hidden; display: flex; align-items: center; }
.mdrrmo-wt-track::before, .mdrrmo-wt-track::after { content: ""; position: absolute; top: 0; bottom: 0; width: 44px; z-index: 2; pointer-events: none; }
.mdrrmo-wt-track::before { left: 0; background: linear-gradient(90deg, #07101f, transparent); }
.mdrrmo-wt-track::after  { right: 0; background: linear-gradient(270deg, #07101f, transparent); }
.mdrrmo-wt-marquee { display: flex; width: max-content; min-width: 100%; animation: mwtScroll 14s linear infinite; }
.mdrrmo-wt-marquee:hover { animation-play-state: paused; }
.mwt-run { display: inline-flex; align-items: center; }
@keyframes mwtScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mdrrmo-wt-marquee { animation: none; } .mwt-run + .mwt-run { display: none; } }

.mwt-pill { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; white-space: nowrap; color: #e6eefb; font-size: 13px; font-weight: 600; }
.mwt-ico { font-size: 12px; }
.mwt-txt { letter-spacing: .01em; }
.mwt-src { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; background: rgba(148,163,184,.18); color: #cbd5e1; border: 1px solid rgba(203,213,225,.22); }
.mwt-tsu { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 900; letter-spacing: .08em; background: rgba(34,211,238,.18); color: #67e8f9; border: 1px solid rgba(34,211,238,.45); }
.mwt-sep { width: 5px; height: 5px; border-radius: 50%; background: rgba(148,163,184,.4); flex: none; margin: 0 4px; }

/* severity accents on the icon + text */
.mwt-pill.sev-critical .mwt-ico, .mwt-pill.sev-critical .mwt-txt { color: #fca5a5; }
.mwt-pill.sev-warning  .mwt-ico, .mwt-pill.sev-warning  .mwt-txt { color: #fcd34d; }
.mwt-pill.sev-watch    .mwt-ico, .mwt-pill.sev-watch    .mwt-txt { color: #fdba74; }
.mwt-pill.sev-info     .mwt-ico { color: #7dd3fc; }
.mwt-pill.sev-critical { font-weight: 800; }
/* International quakes are benchmark/UNOFFICIAL monitoring → always YELLOW (caution),
   regardless of magnitude, so they read distinctly from local PH events. */
/* ── Quake region HIGHLIGHTS ──────────────────────────────────────────────────
 * Running TEXT is WHITE for both (high contrast on the dark bar). The HIGHLIGHT is
 * the colored chip + left edge + subtle tint band: YELLOW = international, RED = the
 * Philippines (home — most relevant). The low-opacity tint over the dark bar keeps
 * white text readable; the bright chip/edge carries the colour signal. */
.mwt-pill.kind-quake_intl, .mwt-pill.kind-typhoon_intl, .mwt-pill.kind-tsunami_intl,
.mwt-pill.kind-quake_local, .mwt-pill.kind-camera { border-radius: 7px; padding: 1px 12px; }
/* White running text on every highlight pill (quakes + intl hazards). */
.mwt-pill.kind-quake_intl .mwt-ico, .mwt-pill.kind-quake_intl .mwt-txt,
.mwt-pill.kind-typhoon_intl .mwt-ico, .mwt-pill.kind-typhoon_intl .mwt-txt,
.mwt-pill.kind-tsunami_intl .mwt-ico, .mwt-pill.kind-tsunami_intl .mwt-txt,
.mwt-pill.kind-quake_local .mwt-ico, .mwt-pill.kind-quake_local .mwt-txt { color: #ffffff; }

/* International monitoring (earthquake · typhoon · tsunami) = YELLOW highlight */
.mwt-pill.kind-quake_intl, .mwt-pill.kind-typhoon_intl, .mwt-pill.kind-tsunami_intl { background: rgba(250,204,21,.20); border: 1px solid rgba(250,204,21,.45); border-left: 3px solid #facc15; }
.mwt-pill.kind-quake_intl .mwt-src, .mwt-pill.kind-typhoon_intl .mwt-src, .mwt-pill.kind-tsunami_intl .mwt-src { background: #facc15; color: #1a1205; border-color: #facc15; }

/* Philippines = RED highlight */
.mwt-pill.kind-quake_local { background: rgba(220,38,38,.30); border: 1px solid rgba(248,113,113,.5); border-left: 3px solid #ef4444; }
.mwt-pill.kind-quake_local.sev-critical { background: rgba(220,38,38,.52); }
.mwt-pill.kind-quake_local .mwt-src { background: #dc2626; color: #ffffff; border-color: #dc2626; }

/* CCTV camera alerts = operational CYAN highlight (severity-coloured text). */
.mwt-pill.kind-camera { background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.30); border-left: 3px solid #38bdf8; }
.mwt-pill.kind-camera .mwt-src { background: #0ea5e9; color: #04121f; border-color: #0ea5e9; }

/* ── Clickable pills + detail modal ──────────────────────────────────────────── */
.mwt-pill[role="button"] { cursor: pointer; }
.mwt-pill[role="button"]:hover, .mwt-pill[role="button"]:focus-visible { filter: brightness(1.18); outline: 1px solid rgba(255,255,255,.45); outline-offset: 1px; }
.mwt-more { font-size: 10px; opacity: .5; margin-left: 1px; }
body.mwt-modal-open .mdrrmo-wt-marquee { animation-play-state: paused; }

.mwt-modal { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.mwt-modal[hidden] { display: none; }
.mwt-modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,16,.72); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.mwt-modal-card { position: relative; z-index: 1; width: min(94vw, 460px); max-height: 82vh; overflow-y: auto;
    background: linear-gradient(180deg, #0e1b33, #0a1424); border: 1px solid rgba(56,189,248,.3);
    border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.6); padding: 18px 20px; color: #e6eefb; }
.mwt-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.mwt-modal-cat { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: rgba(148,163,184,.18); color: #cbd5e1; }
.mwt-modal-cat.cat-international { background: rgba(250,204,21,.18); color: #fde047; }
.mwt-modal-cat.cat-philippines  { background: rgba(239,68,68,.22); color: #fca5a5; }
.mwt-modal-cat.cat-camera       { background: rgba(56,189,248,.18); color: #7dd3fc; }
.mwt-modal-x { background: none; border: none; color: #94a3b8; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.mwt-modal-x:hover { color: #fff; }
.mwt-modal-title { font-size: 15px; font-weight: 800; margin: 2px 0 12px; line-height: 1.35; color: #fff; }
.mwt-modal-title i { margin-right: 6px; color: #38bdf8; }
.mwt-modal-meta { margin: 0 0 12px; }
.mwt-mrow { display: grid; grid-template-columns: 136px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.mwt-mrow dt { color: #94a3b8; font-size: 12px; font-weight: 600; margin: 0; }
.mwt-mrow dd { color: #e6eefb; font-size: 13px; margin: 0; word-break: break-word; }
.mwt-modal-note { font-size: 11.5px; color: #fcd34d; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.28); border-radius: 8px; padding: 8px 10px; margin: 0 0 12px; line-height: 1.45; }
.mwt-modal-actions { display: flex; justify-content: flex-end; }
.mwt-modal-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 9px; background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; text-decoration: none; font-size: 13px; font-weight: 700; }
.mwt-modal-btn:hover { filter: brightness(1.1); }

/* ── Unacted-alert escalation banner + 14pt emergency message ──────────────── */
.cc-esc { border: 1px solid rgba(239,68,68,.55); border-left: 4px solid #ef4444; border-radius: 12px; background: linear-gradient(180deg, rgba(127,29,29,.30), rgba(40,10,14,.42)); padding: 14px 16px; margin: 0 0 14px; box-shadow: 0 6px 22px rgba(239,68,68,.18); }
.cc-esc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cc-esc-flag { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; letter-spacing: .04em; color: #fff; background: #dc2626; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; }
.cc-esc-meta { font-size: 12px; color: #fca5a5; font-weight: 700; }
.cc-esc-reason { color: #fed7aa; font-size: 13px; margin: 8px 0 6px; }
/* The emergency message — explicit 14-POINT clear text on a dark panel (high contrast). */
.cc-esc-msg { font-size: 14pt; line-height: 1.5; color: #ffffff; background: #0b1220; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 12px 14px; margin: 6px 0 10px; white-space: pre-line; font-family: 'Inter', system-ui, sans-serif; font-weight: 600; }
.cc-esc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cc-esc-note { font-size: 12.5px; font-weight: 700; }
.cc-esc-note.cc-esc-ok { color: #6ee7b7; }
.cc-esc-note.cc-esc-warn { color: #fcd34d; }
.cc-esc-tool { border: 1px solid var(--cc-border, rgba(148,170,210,.2)); border-radius: 12px; background: rgba(255,255,255,.03); padding: 13px 16px; margin: 0 0 16px; }
.cc-esc-tool-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-weight: 800; color: var(--cc-ink, #e6eefb); font-size: 14px; }
.cc-esc-gw { font-size: 12px; color: var(--cc-muted, #93a4c4); font-weight: 600; }
.cc-esc-tool-sub { font-size: 12.5px; color: var(--cc-muted, #93a4c4); margin: 6px 0 10px; line-height: 1.45; }
.cc-esc-tool-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cc-esc-sim { margin-top: 12px; border-top: 1px dashed rgba(255,255,255,.12); padding-top: 12px; }
.cc-esc-sim-load, .cc-esc-sim-err { font-size: 13px; color: var(--cc-muted, #93a4c4); }
.cc-esc-sim-err { color: #fca5a5; }
.cc-esc-sim-verdict { font-weight: 800; font-size: 13px; padding: 6px 10px; border-radius: 8px; display: inline-block; margin-bottom: 8px; }
.cc-esc-sim-verdict.go { background: rgba(239,68,68,.18); color: #fca5a5; border: 1px solid rgba(239,68,68,.4); }
.cc-esc-sim-verdict.no { background: rgba(16,185,129,.16); color: #6ee7b7; border: 1px solid rgba(16,185,129,.4); }
.cc-esc-sim-gw { font-size: 12px; color: var(--cc-muted, #93a4c4); margin-bottom: 8px; }
.cc-esc-sim-lbl { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cc-muted, #93a4c4); margin: 8px 0 4px; }
.cc-esc-sim-rec { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--cc-ink-soft, #c8d4ea); max-height: 160px; overflow-y: auto; }
.cc-esc-sim-rec li { margin: 2px 0; }
.cc-esc-sim-rec .r { color: var(--cc-muted, #93a4c4); }

/* ── SMS / Text-Blast gateway subscription page ──────────────────────────────── */
.cc-smsg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.cc-smsg-head h2 { font-size: 19px; font-weight: 800; color: var(--cc-ink, #e6eefb); display: flex; align-items: center; gap: 9px; }
.cc-smsg-head h2 i { color: var(--cc-cyan, #38bdf8); }
.cc-smsg-head p { font-size: 13.5px; color: var(--cc-muted, #93a4c4); margin-top: 5px; max-width: 660px; }
.cc-smsg-state { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 12.5px; white-space: nowrap; }
.cc-smsg-state.on { background: rgba(16,185,129,.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,.4); }
.cc-smsg-state.off { background: rgba(245,158,11,.14); color: #fcd34d; border: 1px solid rgba(245,158,11,.4); }
.cc-smsg-status h3, .cc-smsg-form h3, .cc-smsg-test h3 { font-size: 15px; font-weight: 800; color: var(--cc-ink, #e6eefb); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cc-smsg-status h3 i, .cc-smsg-form h3 i, .cc-smsg-test h3 i { color: var(--cc-cyan, #38bdf8); }
.cc-smsg-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cc-smsg-status-grid > div { background: rgba(255,255,255,.04); border: 1px solid var(--cc-border, rgba(148,170,210,.2)); border-radius: 10px; padding: 9px 12px; }
.cc-smsg-status-grid span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--cc-muted, #93a4c4); }
.cc-smsg-status-grid b { font-size: 13.5px; color: var(--cc-ink, #e6eefb); }
.cc-smsg-sec { font-size: 14px; font-weight: 800; color: var(--cc-ink, #e6eefb); margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
.cc-smsg-sec i { color: #fbbf24; }
.cc-smsg-prov { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-bottom: 18px; }
.cc-prov { position: relative; background: rgba(255,255,255,.03); border: 1px solid var(--cc-border, rgba(148,170,210,.2)); border-radius: 14px; padding: 16px; }
.cc-prov.is-rec { border-color: rgba(250,204,21,.55); box-shadow: 0 0 0 1px rgba(250,204,21,.15); }
.cc-prov-badge { position: absolute; top: -9px; right: 12px; background: linear-gradient(135deg, #facc15, #ca8a04); color: #26200a; font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.cc-prov h4 { font-size: 16px; font-weight: 800; color: var(--cc-ink, #e6eefb); }
.cc-prov-region { font-size: 12px; color: var(--cc-muted, #93a4c4); margin: 3px 0 9px; }
.cc-prov-facts { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cc-prov-facts li { font-size: 12.5px; color: var(--cc-ink-soft, #c8d4ea); }
.cc-prov-facts i { color: var(--cc-cyan, #38bdf8); width: 15px; }
.cc-prov-note { font-size: 12px; color: var(--cc-muted, #93a4c4); line-height: 1.45; margin-bottom: 11px; }
.cc-prov-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-smsg-form, .cc-smsg-test, .cc-smsg-status { margin-bottom: 16px; }
.cc-smsg-save { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.cc-smsg-priv { font-size: 12px; color: var(--cc-muted, #93a4c4); }
.cc-smsg-priv i { color: #6ee7b7; }
.cc-check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--cc-ink-soft, #c8d4ea); }
.cc-check input { width: auto; }
.cc-smsg-testrow { display: flex; gap: 10px; flex-wrap: wrap; }
.cc-smsg-testrow input { max-width: 240px; }
.cc-smsg-testnote { font-size: 12px; color: var(--cc-muted, #93a4c4); margin-top: 8px; }

.mdrrmo-wt-min { flex: 0 0 auto; width: 2.1rem; background: rgba(255,255,255,.06); border: none; border-left: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.7); cursor: pointer; font-size: 12px; transition: background .15s ease, color .15s ease; }
.mdrrmo-wt-min:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ALARM state — pulsing red, label blinks */
.mdrrmo-wt[data-alarm="1"] { border-top-color: #ef4444; background: linear-gradient(90deg, #2a0a0e 0%, #3b0d12 50%, #2a0a0e 100%); box-shadow: 0 -8px 34px rgba(239,68,68,.4); animation: mwtAlarmEdge 1.6s ease-in-out infinite; }
.mdrrmo-wt[data-alarm="1"] .mdrrmo-wt-label { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; animation: mwtBlink 1s steps(2,end) infinite; }
.mdrrmo-wt[data-alarm="1"] .mdrrmo-wt-dot { background: #fff; }
.mdrrmo-wt[data-alarm="1"] .mdrrmo-wt-track::before { background: linear-gradient(90deg, #2a0a0e, transparent); }
.mdrrmo-wt[data-alarm="1"] .mdrrmo-wt-track::after  { background: linear-gradient(270deg, #2a0a0e, transparent); }
@keyframes mwtBlink { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes mwtAlarmEdge { 0%,100% { border-top-color: #ef4444; } 50% { border-top-color: #fca5a5; } }

/* CAUTION state (yellow = international monitoring). The BODY stays DARK so yellow
   text keeps strong contrast — the yellow signal is the top edge + the label chip,
   and every yellow FILL uses near-black text. Never yellow-on-yellow. No blink. */
.mdrrmo-wt[data-alarm="caution"] { border-top-color: #facc15; background: linear-gradient(90deg, #0b1020 0%, #141008 50%, #0b1020 100%); box-shadow: 0 -8px 30px rgba(250,204,21,.30); }
.mdrrmo-wt[data-alarm="caution"] .mdrrmo-wt-label { background: linear-gradient(135deg, #facc15, #d97706); color: #1a1205; }
.mdrrmo-wt[data-alarm="caution"] .mdrrmo-wt-dot { background: #1a1205; }
.mdrrmo-wt[data-alarm="caution"] .mdrrmo-wt-track::before { background: linear-gradient(90deg, #0b1020, transparent); }
.mdrrmo-wt[data-alarm="caution"] .mdrrmo-wt-track::after  { background: linear-gradient(270deg, #0b1020, transparent); }

@media (prefers-reduced-motion: reduce) { .mdrrmo-wt[data-alarm="1"], .mdrrmo-wt[data-alarm="1"] .mdrrmo-wt-label { animation: none; } }

@media (max-width: 768px) {
    .mdrrmo-wt { height: 40px; }
    .mdrrmo-wt-label { min-width: auto; padding: 0 10px; font-size: 10.5px; }
    .mwt-pill { font-size: 12px; }
    .mdrrmo-wt.mwt-framed { bottom: 86px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   TSUNAMI PROJECTION BANNER (includes/mdrrmo_forecast.php → mdrrmo_tsunami_banner_html)
   Life-safety, decision-support. Shown on every command-center view when the live
   USGS feed (benchmark/UNOFFICIAL) projects a watch/advisory/warning. Three tones:
   .cc-fc-danger = WARNING · .cc-fc-hot = ADVISORY · .cc-fc-warn = WATCH.
   ════════════════════════════════════════════════════════════════════════════ */
.cc-tsunami-banner {
    display: flex; gap: 16px; align-items: stretch;
    margin: 0 0 16px; padding: 16px 18px;
    border-radius: 14px; border: 1px solid rgba(148,170,210,.22);
    background: rgba(8,16,34,.55);
    box-shadow: 0 10px 34px rgba(0,0,0,.34);
    position: relative; overflow: hidden;
}
.cc-tsunami-banner::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 6px;
}
.cc-fc-danger { border-color: rgba(239,68,68,.5); background: linear-gradient(100deg, rgba(60,8,12,.92), rgba(20,8,26,.78)); }
.cc-fc-danger::before { background: linear-gradient(180deg, #ef4444, #b91c1c); }
.cc-fc-hot    { border-color: rgba(251,146,60,.5); background: linear-gradient(100deg, rgba(56,26,6,.9), rgba(18,12,26,.78)); }
.cc-fc-hot::before { background: linear-gradient(180deg, #fb923c, #ea580c); }
.cc-fc-warn   { border-color: rgba(250,204,21,.5); background: linear-gradient(100deg, rgba(46,36,6,.9), rgba(16,14,26,.78)); }
.cc-fc-warn::before { background: linear-gradient(180deg, #facc15, #d97706); }

.cc-fc-flagcol {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; min-width: 92px; padding: 6px 10px 6px 8px;
    border-right: 1px solid rgba(255,255,255,.12); text-align: center;
}
.cc-fc-flagico { font-size: 30px; line-height: 1; }
.cc-fc-danger .cc-fc-flagico { color: #fca5a5; animation: ccFcPulse 1.4s ease-in-out infinite; }
.cc-fc-hot .cc-fc-flagico { color: #fdba74; }
.cc-fc-warn .cc-fc-flagico { color: #fde047; }
.cc-fc-flag {
    font: 800 11px/1.25 "Plus Jakarta Sans", system-ui, sans-serif;
    text-transform: uppercase; letter-spacing: .04em; color: #f1f5f9;
}
@keyframes ccFcPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .72; } }
@media (prefers-reduced-motion: reduce) { .cc-fc-danger .cc-fc-flagico { animation: none; } }

.cc-fc-body { flex: 1 1 auto; min-width: 0; }
.cc-fc-headline {
    margin: 0 0 6px; font: 800 16.5px/1.3 "Plus Jakarta Sans", system-ui, sans-serif;
    color: #fff; letter-spacing: .005em;
}
.cc-fc-danger .cc-fc-headline { color: #fee2e2; }
.cc-fc-sub { margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: #e2e8f0; }
.cc-fc-meta { margin: 0 0 8px; font-size: 12.5px; color: #cbd5e1; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.cc-fc-meta i { opacity: .8; }

.cc-fc-brgys { margin: 0 0 9px; font-size: 12px; color: #cbd5e1; line-height: 2.1; }
.cc-fc-brgys-lbl { font-weight: 700; color: #94a3b8; margin-right: 4px; }
.cc-fc-brgy {
    display: inline-block; padding: 2px 9px; margin: 0 3px 3px 0;
    border-radius: 999px; background: rgba(148,163,184,.16); border: 1px solid rgba(148,163,184,.28);
    font-size: 11.5px; font-weight: 600; color: #e2e8f0; white-space: nowrap;
}
.cc-fc-brgy.is-island { background: rgba(56,189,248,.18); border-color: rgba(56,189,248,.42); color: #bae6fd; }
.cc-fc-brgy i { font-size: 10px; opacity: .85; }

.cc-fc-sop {
    margin: 0 0 7px; padding: 8px 11px; border-radius: 9px;
    background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.3);
    font-size: 12.5px; color: #fee2e2; line-height: 1.45;
}
.cc-fc-warn .cc-fc-sop { background: rgba(250,204,21,.12); border-color: rgba(250,204,21,.3); color: #fef9c3; }
.cc-fc-sop i { color: #fca5a5; }
.cc-fc-warn .cc-fc-sop i { color: #fde047; }

.cc-fc-guard { margin: 0; font-size: 11.5px; color: #94a3b8; line-height: 1.5; }
.cc-fc-guard i { color: #fbbf24; }
.cc-fc-link { color: #7dd3fc; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cc-fc-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .cc-forecast-sync { flex-direction: column; align-items: stretch; }
    .cc-forecast-sync .cc-btn { width: 100%; }
    .cc-tsunami-banner { flex-direction: column; gap: 10px; padding: 14px; }
    .cc-fc-flagcol { flex-direction: row; min-width: 0; border-right: none; border-bottom: 1px solid rgba(255,255,255,.12); padding: 0 0 9px; justify-content: flex-start; }
    .cc-fc-flagico { font-size: 22px; }
    .cc-fc-headline { font-size: 15px; }
}

/* In-view tsunami forecast PANEL (pages/mdrrmo/views/tsunami.php). Calm-state aware. */
.cc-fcpanel { border-radius: 12px; border: 1px solid rgba(148,170,210,.22); background: rgba(8,16,34,.4); padding: 0; overflow: hidden; margin-bottom: 14px; }
.cc-fcpanel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 15px; border-bottom: 1px solid rgba(148,170,210,.16); }
.cc-fcpanel-head h3 { margin: 0; font: 800 14.5px/1.2 "Plus Jakarta Sans", system-ui, sans-serif; color: #e6eefb; display: flex; align-items: center; gap: 9px; }
.cc-fcpanel-body { padding: 14px 15px; }
.cc-fc-calm { display: flex; align-items: center; gap: 11px; font-size: 13px; color: #cbd5e1; }
.cc-fc-calm i { font-size: 20px; color: #6ee7b7; }
.cc-fc-scenario { margin-top: 12px; border-top: 1px dashed rgba(148,163,184,.28); padding-top: 12px; }
.cc-fc-scenario summary { cursor: pointer; font-weight: 700; font-size: 12.5px; color: #93c5fd; list-style: none; }
.cc-fc-scenario summary::-webkit-details-marker { display: none; }
.cc-fc-scenario summary::before { content: "\f0da"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 7px; font-size: 11px; }
.cc-fc-scenario[open] summary::before { content: "\f0d7"; }
.cc-fc-scenario-note { font-size: 11.5px; color: #94a3b8; margin: 8px 0 10px; }

/* ════════════════════════════════════════════════════════════════════════════
   FORECAST & EARLY-WARNING COMMAND CENTER  (pages/mdrrmo/views/forecast.php)
   Reuses the .cc-* system; adds the warning-hero, driver cards, risk matrix,
   weather outlook, advisory generator and freshness chrome. Append-only.
   ════════════════════════════════════════════════════════════════════════════ */
.cc-forecast { gap: 4px; }

.cc-forecast-sync {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid rgba(125,211,252,.24);
    border-left: 4px solid #38bdf8;
    border-radius: 10px;
    background: rgba(8,16,34,.5);
}
.cc-forecast-sync-warn { border-left-color: #facc15; background: rgba(47,34,7,.36); }
.cc-forecast-sync-danger { border-left-color: #ef4444; background: rgba(60,8,12,.42); }
.cc-forecast-sync-main { min-width: 0; display: grid; gap: 3px; }
.cc-forecast-sync-main span {
    color: #bae6fd;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.cc-forecast-sync-main b {
    color: #f8fafc;
    font-size: 12.5px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.cc-forecast-sync-main small {
    color: #9fb3cc;
    font-size: 11.5px;
    line-height: 1.35;
}
.cc-forecast-sync .cc-btn { flex: 0 0 auto; }

/* Overall warning-level hero */
.cc-fchero {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    padding: 18px 20px; margin-bottom: 14px; border-radius: 16px;
    border: 1px solid rgba(148,170,210,.22); background: rgba(8,16,34,.5);
    position: relative; overflow: hidden;
}
.cc-fchero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(120% 140% at 0% 0%, rgba(255,255,255,.05), transparent 55%); }
.cc-fchero-ok     { border-color: rgba(34,197,94,.42); }
.cc-fchero-warn   { border-color: rgba(250,204,21,.45); background: linear-gradient(100deg, rgba(46,36,6,.55), rgba(8,16,34,.5)); }
.cc-fchero-hot    { border-color: rgba(251,146,60,.5); background: linear-gradient(100deg, rgba(56,26,6,.6), rgba(8,16,34,.5)); }
.cc-fchero-danger { border-color: rgba(239,68,68,.55); background: linear-gradient(100deg, rgba(60,8,12,.7), rgba(8,16,34,.5)); }

.cc-fchero-badge { flex: 0 0 auto; width: 88px; height: 88px; border-radius: 18px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--lvl) 22%, #0b1220); border: 2px solid var(--lvl); position: relative; }
.cc-fchero-code { font: 900 26px/1 "Plus Jakarta Sans", system-ui, sans-serif; color: #fff; letter-spacing: .02em; }
.cc-fchero-dot { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--lvl); box-shadow: 0 0 0 0 var(--lvl); animation: ccFcBeat 1.8s ease-out infinite; }
@keyframes ccFcBeat { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lvl) 70%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
@media (prefers-reduced-motion: reduce) { .cc-fchero-dot { animation: none; } }
.cc-fchero-main { flex: 1 1 280px; min-width: 0; }
.cc-fchero-eyebrow { margin: 0 0 2px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; font-weight: 700; }
.cc-fchero-title { margin: 0 0 4px; font: 800 22px/1.15 "Plus Jakarta Sans", system-ui, sans-serif; color: #fff; }
.cc-fchero-sub { margin: 0; font-size: 13px; color: #cbd5e1; }

.cc-fcladder { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex: 0 0 auto; }
.cc-fcladder-step { display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: .4; transition: opacity .2s; }
.cc-fcladder-step.is-current { opacity: 1; }
.cc-fcladder-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--c); border: 2px solid color-mix(in srgb, var(--c) 50%, #0b1220); }
.cc-fcladder-step.is-current .cc-fcladder-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); }
.cc-fcladder-code { font-size: 9px; font-weight: 800; color: #cbd5e1; letter-spacing: .03em; }

/* Driver cards */
.cc-fc-drivers { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; margin-bottom: 6px; }
.cc-fc-driver { border-radius: 13px; border: 1px solid rgba(148,170,210,.2); background: rgba(8,16,34,.42); padding: 14px 15px; border-left-width: 4px; }
.cc-fc-driver-warn   { border-left-color: #facc15; }
.cc-fc-driver-hot    { border-left-color: #fb923c; }
.cc-fc-driver-danger { border-left-color: #ef4444; }
.cc-fc-driver-ok     { border-left-color: #22c55e; }
.cc-fc-driver-head { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.cc-fc-driver-ico { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(148,163,184,.16); color: #e2e8f0; font-size: 17px; }
.cc-fc-driver-head h3 { margin: 0; font: 800 15px/1.2 "Plus Jakarta Sans", system-ui, sans-serif; color: #f1f5f9; }
.cc-fc-driver-lvl { font-size: 11px; font-weight: 800; color: var(--c); text-transform: uppercase; letter-spacing: .03em; }
.cc-fc-driver-status { margin-left: auto; flex: 0 0 auto; font-size: 9.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; letter-spacing: .04em; }
.cc-fc-st-off  { background: rgba(34,197,94,.18); color: #bbf7d0; border: 1px solid rgba(34,197,94,.4); }
.cc-fc-st-proj { background: rgba(56,189,248,.16); color: #bae6fd; border: 1px solid rgba(56,189,248,.4); }
.cc-fc-st-adv  { background: rgba(250,204,21,.16); color: #fef08a; border: 1px solid rgba(250,204,21,.4); }
.cc-fc-driver-what { margin: 0 0 10px; font-size: 13.5px; font-weight: 700; color: #fff; line-height: 1.35; }
.cc-fc-driver-w5 { margin: 0 0 10px; display: grid; gap: 6px; }
.cc-fc-driver-w5 > div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: start; }
.cc-fc-driver-w5 dt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #93a4c4; margin: 0; }
.cc-fc-driver-w5 dd { margin: 0; font-size: 12.5px; color: #d8e0ee; line-height: 1.4; }
.cc-fc-driver-foot { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 9px; border-top: 1px solid rgba(148,163,184,.16); font-size: 11.5px; color: #94a3b8; }
.cc-fc-driver-foot i { opacity: .8; margin-right: 3px; }

/* Freshness chip */
.cc-fc-fresh { display: inline-flex; align-items: center; gap: 7px; margin: 2px 0 8px; font-size: 12px; font-weight: 600; }
.cc-fc-fresh.cc-st-ok { color: #86efac; } .cc-fc-fresh.cc-st-warn { color: #fde047; }
.cc-fc-fresh.cc-st-danger { color: #fca5a5; } .cc-fc-fresh.cc-st-muted { color: #94a3b8; }
.cc-fc-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* Weather outlook */
.cc-fc-wxgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.cc-fc-wxday { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 11px; background: rgba(148,163,184,.1); border: 1px solid rgba(148,163,184,.18); text-align: center; }
.cc-fc-wxlbl { font-size: 11px; font-weight: 700; color: #93a4c4; text-transform: uppercase; letter-spacing: .03em; }
.cc-fc-wxpop { font: 800 24px/1.1 "Plus Jakarta Sans", system-ui, sans-serif; padding: 0; background: none; }
.cc-fc-wxpop.cc-st-danger { color: #fca5a5; } .cc-fc-wxpop.cc-st-warn { color: #fde047; } .cc-fc-wxpop.cc-st-ok { color: #86efac; }
.cc-fc-wxsub { font-size: 11px; color: #94a3b8; }

/* Forecast horizon ladder */
.cc-horizon-ladder { margin: 12px 0 14px; }
.cc-horizon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
}
.cc-horizon-card {
    min-width: 0;
    min-height: 255px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 12px;
    border: 1px solid rgba(148,163,184,.22);
    border-left: 4px solid #38bdf8;
    border-radius: 10px;
    background: rgba(8,16,34,.58);
}
.cc-horizon-info { border-left-color: #38bdf8; }
.cc-horizon-ok { border-left-color: #34d399; }
.cc-horizon-warn { border-left-color: #facc15; }
.cc-horizon-danger { border-left-color: #f87171; background: rgba(69,10,10,.42); }
.cc-horizon-muted { border-left-color: #94a3b8; }
.cc-horizon-top { display: grid; gap: 4px; min-width: 0; }
.cc-horizon-top span {
    width: fit-content;
    padding: 3px 7px;
    border: 1px solid rgba(125,211,252,.24);
    border-radius: 7px;
    color: #bae6fd;
    background: rgba(14,165,233,.08);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}
.cc-horizon-top b {
    color: #f8fafc;
    font-size: 16px;
    line-height: 1.18;
    overflow-wrap: anywhere;
}
.cc-horizon-top small,
.cc-horizon-card p {
    color: #a8bad4;
    font-size: 12px;
    line-height: 1.35;
}
.cc-horizon-status {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.cc-horizon-status strong {
    min-width: 0;
    color: #e5f3ff;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.cc-horizon-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
.cc-horizon-metrics span {
    min-width: 0;
    min-height: 54px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 7px;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 8px;
    background: rgba(2,6,23,.22);
}
.cc-horizon-metrics small {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}
.cc-horizon-metrics b {
    color: #f8fafc;
    font-size: 13px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cc-horizon-cap {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
.cc-horizon-cap span {
    min-width: 0;
    color: #94a3b8;
    font-size: 10px;
    line-height: 1.25;
}
.cc-horizon-cap b {
    display: block;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cc-horizon-card footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 9px;
    border-top: 1px solid rgba(148,163,184,.16);
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.3;
}
.cc-horizon-card footer span { min-width: 0; overflow-wrap: anywhere; }
.cc-horizon-card footer span:last-child { flex: 0 0 auto; color: #bae6fd; font-weight: 900; }
.cc-horizon-card footer .is-official { color: #bbf7d0; }
@media (max-width: 640px) {
    .cc-horizon-grid { grid-template-columns: 1fr; }
    .cc-horizon-status { display: grid; }
}

/* Rain projection detail */
.cc-rain-projection { margin: 12px 0 14px; padding: 12px; border: 1px solid rgba(125,211,252,.22); border-radius: 11px; background: rgba(8,20,38,.44); }
.cc-rain-target { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 12px; padding: 10px 12px; border: 1px solid rgba(125,211,252,.18); border-radius: 10px; background: rgba(8,20,38,.34); }
.cc-rain-target-travel {
    position: relative;
    flex-wrap: wrap;
    border-color: rgba(34,211,238,.56);
    background:
        radial-gradient(circle at 68% 0%, rgba(34,211,238,.18), transparent 34%),
        linear-gradient(135deg, rgba(8,20,38,.72), rgba(15,23,42,.5));
    box-shadow: 0 0 0 1px rgba(34,211,238,.16), 0 0 30px rgba(34,211,238,.15);
}
.cc-rain-target-travel.is-active {
    border-color: rgba(250,204,21,.78);
    box-shadow: 0 0 0 1px rgba(250,204,21,.2), 0 0 30px rgba(250,204,21,.16);
}
.cc-rain-target-travel::before {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    border-radius: 10px;
    border: 1px solid rgba(125,211,252,.32);
}
.cc-rain-target span { display: block; color: #94a3b8; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.cc-rain-target b { display: block; margin-top: 2px; color: #f8fafc; font-size: 14px; }
.cc-rain-target-main { min-width: 210px; flex: 0 1 260px; }
.cc-rain-target-main small { display: block; margin-top: 5px; color: #8fb2d7; font-size: 11.5px; line-height: 1.35; }
.cc-rain-target-search { display: grid; gap: 6px; flex: 1 1 390px; min-width: 280px; max-width: 560px; }
.cc-rain-target-search label { display: inline-flex; align-items: center; gap: 7px; color: #a5f3fc; font-size: 11px; font-weight: 1000; text-transform: uppercase; letter-spacing: .06em; }
.cc-rain-target-search label i { color: #22d3ee; text-shadow: 0 0 12px rgba(34,211,238,.55); }
.cc-rain-search-row { display: flex; align-items: center; gap: 7px; }
.cc-rain-target-search input[type="search"] { width: 100%; min-height: 34px; border-radius: 8px; border: 1px solid rgba(125,211,252,.28); background: rgba(8,16,34,.82); color: #e5f3ff; padding: 7px 10px; font-size: 13px; font-weight: 700; }
.cc-rain-target-search input[type="search"]:focus { outline: none; border-color: rgba(250,204,21,.82); box-shadow: 0 0 0 3px rgba(250,204,21,.12), 0 0 22px rgba(34,211,238,.22); }
.cc-rain-target-search .cc-btn { min-height: 34px; white-space: nowrap; }
.cc-rain-target-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.cc-rain-target-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 6px 9px; border-radius: 8px; border: 1px solid rgba(125,211,252,.28); background: rgba(14,165,233,.1); color: #bae6fd; text-decoration: none; font-size: 12px; font-weight: 900; }
.cc-rain-target-actions a:hover, .cc-rain-target-actions a.is-active { border-color: rgba(56,189,248,.68); background: rgba(14,165,233,.22); color: #fff; }
.cc-travel-rain-prompt {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -2px 0 12px;
    padding: 9px 11px;
    border: 1px dashed rgba(34,211,238,.42);
    border-radius: 9px;
    background: rgba(14,165,233,.08);
    color: #c7e8ff;
    font-size: 12.5px;
    font-weight: 800;
}
.cc-travel-rain-prompt i { color: #22d3ee; text-shadow: 0 0 12px rgba(34,211,238,.48); }
.cc-travel-rain-card {
    display: grid;
    gap: 5px;
    margin: -2px 0 12px;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid rgba(56,189,248,.42);
    border-left: 4px solid #38bdf8;
    background: linear-gradient(135deg, rgba(8,20,38,.86), rgba(15,23,42,.62));
    color: #e5f3ff;
    text-decoration: none;
    box-shadow: 0 0 0 1px rgba(56,189,248,.1), 0 0 24px rgba(56,189,248,.13);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.cc-travel-rain-card:hover,
.cc-travel-rain-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(250,204,21,.82);
    box-shadow: 0 0 0 1px rgba(250,204,21,.18), 0 0 28px rgba(250,204,21,.17);
    outline: none;
}
.cc-travel-rain-card > span { color: #a5f3fc; font-size: 10.5px; font-weight: 1000; text-transform: uppercase; letter-spacing: .06em; }
.cc-travel-rain-card > b { color: #fff; font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.cc-travel-rain-card p { margin: 0; color: #dbeafe; font-size: 13px; line-height: 1.35; }
.cc-travel-rain-card small { color: #9fb3cc; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.cc-travel-rain-danger { border-color: rgba(248,113,113,.62); border-left-color: #ef4444; box-shadow: 0 0 0 1px rgba(248,113,113,.13), 0 0 25px rgba(239,68,68,.18); }
.cc-travel-rain-warn { border-color: rgba(250,204,21,.62); border-left-color: #facc15; box-shadow: 0 0 0 1px rgba(250,204,21,.13), 0 0 25px rgba(250,204,21,.15); }
.cc-travel-rain-ok { border-left-color: #34d399; }
.cc-travel-rain-muted { border-left-color: #94a3b8; box-shadow: none; }
.cc-rain-popup-live { cursor: pointer; }
.cc-rain-popup-live:hover,
.cc-rain-popup-live:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(250,204,21,.72);
    box-shadow: 0 16px 32px rgba(0,0,0,.52), 0 0 0 1px rgba(250,204,21,.18), 0 0 22px rgba(250,204,21,.16);
    outline: none;
}
.cc-rain-answer { display: grid; grid-template-columns: minmax(230px, .9fr) minmax(320px, 1.15fr); gap: 12px; margin: 12px 0; padding: 13px; border: 1px solid rgba(125,211,252,.25); border-left: 5px solid #38bdf8; border-radius: 11px; background: linear-gradient(135deg, rgba(8,20,38,.86), rgba(15,23,42,.72)); }
.cc-rain-answer-ok { border-left-color: #34d399; }
.cc-rain-answer-info { border-left-color: #38bdf8; }
.cc-rain-answer-warn { border-left-color: #facc15; }
.cc-rain-answer-danger { border-left-color: #f87171; }
.cc-rain-answer-muted { border-left-color: #94a3b8; }
.cc-rain-answer-kicker { display: inline-flex; align-items: center; gap: 7px; color: #bae6fd; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.cc-rain-answer h4 { margin: 6px 0 5px; color: #f8fafc; font-size: 20px; line-height: 1.15; }
.cc-rain-answer p { margin: 0; color: #dbeafe; font-size: 13px; line-height: 1.45; }
.cc-rain-answer-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.cc-rain-answer-metrics span { min-width: 0; padding: 8px; border: 1px solid rgba(148,163,184,.18); border-radius: 9px; background: rgba(2,6,23,.24); }
.cc-rain-answer-metrics small { display: block; color: #94a3b8; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.cc-rain-answer-metrics b { display: block; margin-top: 4px; color: #f8fafc; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-rain-answer-basis { grid-column: 1 / -1; display: grid; gap: 5px; padding-top: 9px; border-top: 1px solid rgba(148,163,184,.16); color: #a8bad4; font-size: 12px; line-height: 1.35; }
.cc-rain-answer-basis b { color: #e5f3ff; }
.cc-rain-answer-basis span { display: block; }
.cc-rain-command {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(340px, .96fr);
    gap: 12px;
    align-items: stretch;
    margin: 12px 0;
}
.cc-rain-command-left { display: grid; gap: 10px; min-width: 0; }
.cc-rain-live-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cc-rain-live-card {
    min-width: 0;
    min-height: 176px;
    padding: 13px;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,.24);
    border-left: 3px solid #38bdf8;
    background: linear-gradient(180deg, rgba(15,23,42,.78), rgba(8,16,34,.76));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.cc-rain-live-info { border-left-color: #38bdf8; }
.cc-rain-live-ok { border-left-color: #34d399; }
.cc-rain-live-warn { border-left-color: #facc15; }
.cc-rain-live-danger { border-left-color: #f87171; background: linear-gradient(180deg, rgba(69,10,10,.68), rgba(15,23,42,.74)); }
.cc-rain-live-muted { border-left-color: #94a3b8; }
.cc-rain-live-label {
    display: block;
    margin-bottom: 11px;
    color: #fbbf24;
    font-size: 10.5px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.cc-rain-live-main { display: flex; align-items: center; gap: 11px; margin-bottom: 8px; min-width: 0; }
.cc-rain-live-main > i { color: #93c5fd; font-size: 34px; width: 40px; text-align: center; flex: 0 0 auto; }
.cc-rain-live-main div { min-width: 0; }
.cc-rain-live-main b { display: block; color: #f8fafc; font-size: clamp(18px, 2vw, 25px); line-height: 1.08; font-weight: 900; overflow-wrap: break-word; word-break: normal; hyphens: none; }
.cc-rain-live-main strong { display: block; margin-top: 4px; color: #e2e8f0; font-size: 12.5px; line-height: 1.25; }
.cc-rain-live-line { display: block; color: #cbd5e1; font-size: 12px; line-height: 1.35; }
.cc-rain-live-card footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(148,163,184,.16);
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.3;
}
.cc-rain-live-card footer span { color: #cbd5e1; text-align: right; }
.cc-rain-source-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 9px;
    background: rgba(2,6,23,.22);
    color: #9fb3cc;
    font-size: 11.5px;
}
.cc-rain-source-row span { display: inline-flex; align-items: center; gap: 5px; }
.cc-rain-source-row i { color: #67e8f9; }
.cc-rain-source-row b { color: #e5f3ff; }
.cc-rain-action-panel {
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(125,211,252,.26);
    background: linear-gradient(140deg, rgba(8,16,34,.92), rgba(15,23,42,.82));
    box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
.cc-rain-action-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, rgba(56,189,248,0));
}
.cc-rain-action-warn {
    border-color: rgba(250,204,21,.42);
    background: linear-gradient(140deg, rgba(66,46,4,.82), rgba(15,23,42,.84));
}
.cc-rain-action-danger {
    border-color: rgba(248,113,113,.68);
    background: radial-gradient(90% 120% at 100% 0%, rgba(239,68,68,.24), transparent 48%), linear-gradient(140deg, rgba(69,10,10,.95), rgba(15,23,42,.86));
    box-shadow: 0 18px 40px rgba(0,0,0,.34), 0 0 34px rgba(239,68,68,.18);
}
.cc-rain-action-muted {
    border-color: rgba(148,163,184,.26);
    background: linear-gradient(140deg, rgba(30,41,59,.74), rgba(15,23,42,.82));
}
.cc-rain-action-warn::before { background: linear-gradient(90deg, #facc15, rgba(250,204,21,0)); }
.cc-rain-action-danger::before { background: linear-gradient(90deg, #ef4444, rgba(239,68,68,0)); }
.cc-rain-action-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.cc-rain-action-head > i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fecaca;
    background: rgba(239,68,68,.18);
    font-size: 24px;
}
.cc-rain-action-head span {
    display: block;
    color: #f8fafc;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1.2;
}
.cc-rain-action-head h4 {
    margin: 4px 0 0;
    color: #fff;
    font-size: 23px;
    line-height: 1.08;
    overflow-wrap: anywhere;
}
.cc-rain-action-head > b {
    align-self: start;
    max-width: 96px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(248,113,113,.32);
    background: rgba(239,68,68,.16);
    color: #fee2e2;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}
.cc-rain-action-strip {
    margin: 15px auto 12px;
    max-width: 86%;
    padding: 5px 10px;
    border-radius: 7px;
    background: rgba(254,202,202,.96);
    color: #2a0606;
    text-align: center;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 900;
    text-transform: uppercase;
}
.cc-rain-action-body { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; align-items: center; }
.cc-rain-action-body > i { color: #93c5fd; font-size: 50px; text-align: center; }
.cc-rain-action-body p { margin: 0; color: #f8fafc; font-size: 16px; line-height: 1.45; }
.cc-rain-impact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(248,113,113,.35);
}
.cc-rain-impact-grid span {
    min-width: 0;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 4px 8px;
    text-align: center;
    border-right: 1px solid rgba(226,232,240,.24);
}
.cc-rain-impact-grid span:last-child { border-right: 0; }
.cc-rain-impact-grid i { color: #e2e8f0; font-size: 21px; }
.cc-rain-impact-grid b { color: #f8fafc; font-size: 11px; line-height: 1.15; text-transform: uppercase; }
.cc-rain-impact-grid small { color: #cbd5e1; font-size: 10.5px; line-height: 1.15; }
.cc-rain-action-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(148,163,184,.16);
    color: #fecaca;
    font-size: 12px;
}
.cc-rain-action-foot span { min-width: 0; overflow-wrap: anywhere; }
.cc-rain-action-foot a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 8px;
    background: linear-gradient(135deg, #b91c1c, #7f1d1d);
    border: 1px solid rgba(248,113,113,.42);
    color: #fff;
    font-size: 11.5px;
    font-weight: 900;
    text-decoration: none;
}
.cc-rain-action-foot a:hover { filter: brightness(1.12); }
.cc-rain-projection-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cc-rain-projection-head h4 { margin: 0; color: #e5f3ff; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.cc-rain-projection-head p { margin: 4px 0 0; color: #9fb3cc; font-size: 12px; line-height: 1.4; }
.cc-rain-window-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cc-rain-window { min-width: 0; padding: 10px; border: 1px solid rgba(148,163,184,.2); border-radius: 9px; background: rgba(15,23,42,.6); }
.cc-rain-window.info { border-color: rgba(56,189,248,.38); background: rgba(14,165,233,.1); }
.cc-rain-window.warn { border-color: rgba(250,204,21,.42); background: rgba(250,204,21,.09); }
.cc-rain-window.danger { border-color: rgba(248,113,113,.44); background: rgba(239,68,68,.1); }
.cc-rain-window.muted { border-color: rgba(148,163,184,.2); background: rgba(100,116,139,.09); }
.cc-rain-window-label { display: flex; justify-content: space-between; gap: 7px; color: #dbeafe; font-size: 12px; font-weight: 900; }
.cc-rain-window-label .cc-st { flex: 0 0 auto; }
.cc-rain-metrics { display: grid; grid-template-columns: 1fr; gap: 5px; margin-top: 8px; color: #cbd5e1; font-size: 12px; }
.cc-rain-metrics span { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid rgba(148,163,184,.12); padding-bottom: 4px; }
.cc-rain-metrics b { color: #f8fafc; }
.cc-rain-first { margin: 8px 0 0; color: #9fb3cc; font-size: 11.5px; line-height: 1.35; }
.cc-rain-bars { margin-top: 12px; display: grid; gap: 6px; }
.cc-rain-hour { display: grid; grid-template-columns: 72px 1fr 64px 54px; gap: 8px; align-items: center; color: #cbd5e1; font-size: 12px; }
.cc-rain-time { color: #93a4c4; font-weight: 800; }
.cc-rain-bar-track { height: 9px; border-radius: 999px; background: rgba(15,23,42,.82); border: 1px solid rgba(148,163,184,.16); overflow: hidden; }
.cc-rain-bar-fill { display: block; height: 100%; width: var(--rainw, 0%); border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #60a5fa); }
.cc-rain-pop { color: #bae6fd; text-align: right; font-weight: 800; }
.cc-rain-mm { color: #f8fafc; text-align: right; font-weight: 800; }

.cc-rain-display-link { display: flex; justify-content: flex-end; margin: -2px 0 10px; }

/* Full-screen rain display mode */
.cc-rain-display {
    margin: -10px -10px 0;
    min-height: calc(100vh - 172px);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(51,65,85,.62);
    background:
        radial-gradient(70% 70% at 86% 10%, rgba(239,68,68,.16), transparent 46%),
        linear-gradient(180deg, rgba(2,6,23,.96), rgba(4,18,35,.98));
    color: #e5edf8;
}
.cc-rd-top {
    display: grid;
    grid-template-columns: minmax(210px, .9fr) minmax(300px, 1.4fr) auto auto;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(3,7,18,.62);
}
.cc-rd-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cc-rd-brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #fff; }
.cc-rd-brand b, .cc-rd-brand span { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-rd-brand b { color: #fff; font-size: 17px; font-weight: 1000; letter-spacing: .01em; }
.cc-rd-brand span, .cc-rd-time span { color: #b8c4da; font-size: 12px; }
.cc-rd-place { justify-self: center; min-width: 0; color: #fff; font-weight: 1000; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-rd-place i { color: #fb7185; margin-right: 8px; }
.cc-rd-time { text-align: right; white-space: nowrap; }
.cc-rd-time b { display: block; color: #fff; font-size: 14px; }
.cc-rd-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid rgba(56,189,248,.35);
    background: rgba(14,116,144,.2);
    color: #dff7ff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
}
.cc-rd-main {
    display: grid;
    grid-template-columns: minmax(600px, 1fr) minmax(430px, .9fr);
    gap: 12px;
    margin-top: 12px;
}
.cc-rd-left { display: grid; gap: 12px; min-width: 0; }
.cc-rd-panel, .cc-rd-small {
    min-width: 0;
    border: 1px solid rgba(59,130,246,.22);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(8,16,34,.86), rgba(3,7,18,.68));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.cc-rd-panel { padding: 14px; }
.cc-rd-panel > header, .cc-rd-small > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.cc-rd-panel h3, .cc-rd-small h3 { margin: 0; color: #f8fafc; font-size: 15px; text-transform: uppercase; letter-spacing: .02em; }
.cc-rd-panel header span, .cc-rd-small header span { color: #a8bad4; font-size: 11px; }
.cc-rd-panel h3 i { color: #f87171; margin-right: 8px; }
.cc-rd-cards { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; }
.cc-rd-cards .cc-rain-live-card { padding: 12px; }
.cc-rd-cards .cc-rain-live-main { gap: 8px; }
.cc-rd-cards .cc-rain-live-main > i { width: 32px; font-size: 29px; }
.cc-rd-cards .cc-rain-live-main b { font-size: clamp(18px, 1.45vw, 22px); line-height: 1.08; }
.cc-rd-cards .cc-rain-live-main strong { font-size: 11.5px; }
.cc-rd-refresh { margin: 10px 0 0; color: #a8bad4; font-size: 12px; }
.cc-rd-rail {
    display: grid;
    grid-template-columns: repeat(6, minmax(116px, 1fr));
    gap: 8px;
    margin: 14px 0 0;
    padding: 18px 0 0;
    list-style: none;
    border-top: 2px solid rgba(96,165,250,.46);
}
.cc-rd-node { position: relative; min-width: 0; padding: 10px; border-radius: 8px; border: 1px solid rgba(148,163,184,.18); background: rgba(8,16,34,.82); }
.cc-rd-node > span {
    position: absolute;
    top: -25px;
    left: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96,165,250,.18);
}
.cc-rd-node-danger > span { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.2); }
.cc-rd-node-warn > span, .cc-rd-node-hot > span { background: #f97316; box-shadow: 0 0 0 4px rgba(249,115,22,.18); }
.cc-rd-node time, .cc-rd-node b, .cc-rd-node small { display: block; min-width: 0; overflow-wrap: break-word; }
.cc-rd-node time { color: #fff; font-weight: 900; font-size: 12px; }
.cc-rd-node b { margin-top: 7px; color: #e5edf8; font-size: 12px; line-height: 1.25; }
.cc-rd-node small { margin-top: 7px; color: #8fb2d7; font-size: 11px; line-height: 1.35; }
.cc-rd-warning {
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: 22px;
    border: 1px solid rgba(239,68,68,.72);
    border-radius: 12px;
    background:
        radial-gradient(70% 90% at 88% 12%, rgba(239,68,68,.32), transparent 34%),
        linear-gradient(135deg, rgba(69,10,10,.96), rgba(2,6,23,.96) 58%);
    box-shadow: 0 0 35px rgba(239,68,68,.22), inset 0 1px 0 rgba(255,255,255,.06);
}
.cc-rd-warning-head {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 78px;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(239,68,68,.72);
}
.cc-rd-warning-head > i {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background: #ef4444;
    color: #fff;
    font-size: 30px;
    box-shadow: 0 0 28px rgba(239,68,68,.38);
}
.cc-rd-warning-head h1, .cc-rd-warning-head h2 { margin: 0; line-height: .98; text-transform: uppercase; letter-spacing: 0; }
.cc-rd-warning-head h1 { color: #fff; font-size: clamp(27px, 3.3vw, 46px); font-weight: 1000; }
.cc-rd-warning-head h2 { margin-top: 5px; color: #ff5b5b; font-size: clamp(22px, 2.7vw, 34px); font-weight: 1000; }
.cc-rd-warning-head > span {
    justify-self: end;
    display: grid;
    place-items: center;
    min-height: 64px;
    width: 76px;
    padding: 8px;
    border-radius: 9px;
    border: 1px solid rgba(248,113,113,.45);
    background: rgba(127,29,29,.72);
    color: #fff;
    text-align: center;
    font-size: 11px;
    font-weight: 1000;
}
.cc-rd-strip {
    margin: 16px auto 14px;
    max-width: 78%;
    padding: 7px 12px;
    border-radius: 7px;
    background: #fecaca;
    color: #2b0505;
    text-align: center;
    text-transform: uppercase;
    font-weight: 1000;
    line-height: 1.2;
}
.cc-rd-warning-body { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: center; }
.cc-rd-warning-body > i { color: #93c5fd; font-size: 58px; text-align: center; }
.cc-rd-warning-body p { margin: 0; color: #fff; font-size: clamp(17px, 1.6vw, 23px); line-height: 1.32; }
.cc-rd-warning-body b { color: #fecaca; }
.cc-rd-source { margin: 12px 0 14px; color: #ff8b8b; font-weight: 800; }
.cc-rd-impact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(239,68,68,.58); border-bottom: 1px solid rgba(239,68,68,.34); padding: 12px 0; }
.cc-rd-impact-grid span { display: grid; place-items: center; min-height: 74px; padding: 0 8px; text-align: center; border-right: 1px solid rgba(255,255,255,.3); }
.cc-rd-impact-grid span:last-child { border-right: 0; }
.cc-rd-impact-grid i { color: #e5e7eb; font-size: 26px; }
.cc-rd-impact-grid b { margin-top: 6px; color: #fff; font-size: 12px; text-transform: uppercase; }
.cc-rd-impact-grid small { color: #fecaca; font-size: 11px; }
.cc-rd-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    min-height: 48px;
    border-radius: 8px;
    background: linear-gradient(180deg, #dc2626, #991b1b);
    border: 1px solid rgba(248,113,113,.48);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 1000;
}
.cc-rd-bottom { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 1.15fr; gap: 10px; margin-top: 12px; }
.cc-rd-small { padding: 12px; min-height: 168px; }
.cc-rd-small p { margin: 7px 0; color: #cbd5e1; font-size: 12px; line-height: 1.35; }
.cc-rd-small a { color: #7dd3fc; font-weight: 900; text-decoration: none; }
.cc-rd-big { display: block; margin: 8px 0; color: #f8fafc; font-size: clamp(24px, 3vw, 34px); line-height: 1; }
.cc-rd-map { height: 150px; border-radius: 8px; overflow: hidden; background: rgba(15,23,42,.82); }
.cc-rd-bars { display: flex; align-items: end; gap: 3px; height: 46px; margin-top: 12px; }
.cc-rd-bars span { flex: 1 1 0; min-width: 3px; height: var(--h, 8%); border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #f59e0b, #38bdf8); }

@media (max-width: 1500px) {
    .cc-rain-command { grid-template-columns: 1fr; }
    .cc-rain-live-grid { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
    .cc-rd-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cc-rd-mapcard { grid-column: span 2; }
}

@media (max-width: 1240px) {
    .cc-rd-main { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .cc-rd-top { grid-template-columns: 1fr; }
    .cc-rd-place, .cc-rd-time { justify-self: start; text-align: left; }
    .cc-rd-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .cc-rd-rail { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .cc-rd-warning-head { grid-template-columns: 56px minmax(0, 1fr); }
    .cc-rd-warning-head > span { grid-column: 1 / -1; justify-self: start; width: auto; min-height: 34px; }
    .cc-rd-bottom { grid-template-columns: 1fr; }
    .cc-rd-mapcard { grid-column: auto; }
}

/* Risk matrix compaction */
.cc-fc-matrix th, .cc-fc-matrix td { text-align: center; }
.cc-fc-matrix th:first-child, .cc-fc-matrix td:first-child { text-align: left; }
.cc-fc-matrix .cc-st { min-width: 46px; }

/* Advisory generator */
.cc-fc-adv-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.cc-fc-adv-tab { flex: 1 1 auto; padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(148,163,184,.28); background: rgba(148,163,184,.1); color: #cbd5e1; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.cc-fc-adv-tab.is-active { background: rgba(56,189,248,.2); border-color: rgba(56,189,248,.5); color: #e0f2fe; }
.cc-fc-adv-text { width: 100%; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; line-height: 1.5; color: #e6eefb; background: #0b1220; border: 1px solid rgba(148,163,184,.28); border-radius: 9px; padding: 11px; resize: vertical; }
.cc-fc-adv-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* SOP reuse + disclaimer */
.cc-forecast .cc-fc-sop { margin: 0; }
.cc-fc-disclaimer { margin: 12px 0 0; padding: 11px 13px; border-radius: 9px; background: rgba(148,163,184,.1); border: 1px solid rgba(148,163,184,.2); font-size: 12px; color: #b8c4da; line-height: 1.5; }
.cc-fc-disclaimer i { color: #7dd3fc; margin-right: 5px; }

@media (max-width: 640px) {
    .cc-fchero { gap: 12px; padding: 14px; }
    .cc-fchero-badge { width: 64px; height: 64px; }
    .cc-fchero-code { font-size: 19px; }
    .cc-fcladder { order: 3; width: 100%; justify-content: space-between; }
    .cc-fc-wxgrid { grid-template-columns: 1fr; }
    .cc-rain-target { align-items: flex-start; flex-direction: column; }
    .cc-rain-target-main { width: 100%; flex: 0 1 auto; }
    .cc-rain-target-search { flex: 0 1 auto; width: 100%; min-width: 0; max-width: none; }
    .cc-rain-search-row { width: 100%; flex-direction: column; align-items: stretch; }
    .cc-rain-target-actions { justify-content: flex-start; }
    .cc-rain-command { grid-template-columns: 1fr; }
    .cc-rain-live-grid { grid-template-columns: 1fr; }
    .cc-rain-answer { grid-template-columns: 1fr; }
    .cc-rain-answer-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cc-rain-action-head { grid-template-columns: 42px minmax(0, 1fr); }
    .cc-rain-action-head > i { width: 42px; height: 42px; font-size: 20px; }
    .cc-rain-action-head > b { grid-column: 1 / -1; justify-self: start; max-width: none; }
    .cc-rain-action-strip { max-width: 100%; }
    .cc-rain-action-body { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
    .cc-rain-action-body > i { font-size: 34px; }
    .cc-rain-impact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }
    .cc-rain-impact-grid span:nth-child(2) { border-right: 0; }
    .cc-rain-action-foot { align-items: stretch; flex-direction: column; }
    .cc-rain-action-foot a { justify-content: center; }
    .cc-rain-window-grid { grid-template-columns: 1fr; }
    .cc-rain-hour { grid-template-columns: 58px 1fr 48px 44px; gap: 6px; }
    .cc-fc-driver-w5 > div { grid-template-columns: 80px 1fr; }
}

/* ============================================================================
 * Earthquake Shaking Calculator (source → guipos attenuation panel)
 * .cc-atten — rendered by mdrrmo_quake_attenuation_panel_html().
 * Tones: ok #34d399 · warn #fcd34d · hot #fb923c · danger #fca5a5.
 * ==========================================================================*/
.cc-atten { border-left: 4px solid var(--cc-cyan); margin-bottom: 16px; }
.cc-atten-ok     { border-left-color: #34d399; }
.cc-atten-warn   { border-left-color: #fcd34d; }
.cc-atten-hot    { border-left-color: #fb923c; }
.cc-atten-danger { border-left-color: #fca5a5; }

/* Magnitude ≠ distance clarifier strip */
.cc-atten-myth {
    display: flex; gap: 11px; align-items: flex-start;
    margin: 2px 0 16px; padding: 12px 14px; border-radius: 11px;
    background: linear-gradient(135deg, rgba(56,189,248,.13), rgba(37,99,235,.08));
    border: 1px solid rgba(56,189,248,.3);
}
.cc-atten-myth i { color: var(--cc-cyan-bright); font-size: 17px; margin-top: 2px; flex: none; }
.cc-atten-myth p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--cc-ink-soft); }
.cc-atten-myth b { color: var(--cc-ink); }

/* Calculation chain — source → distance → PGA → intensity */
.cc-atten-chain {
    list-style: none; margin: 0 0 18px; padding: 0;
    display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap;
}
.cc-atten-step {
    flex: 1 1 150px; min-width: 140px; display: flex; flex-direction: column; gap: 3px;
    padding: 11px 13px; border-radius: 11px;
    background: linear-gradient(160deg, var(--cc-panel-2), var(--cc-panel-3));
    border: 1px solid var(--cc-border);
}
.cc-atten-k { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cc-muted); }
.cc-atten-v { font-size: 18px; font-weight: 800; color: var(--cc-ink); line-height: 1.15; }
.cc-atten-s { font-size: 11.5px; color: var(--cc-muted); line-height: 1.35; }
.cc-atten-arrow { flex: 0 0 auto; display: flex; align-items: center; color: var(--cc-cyan); opacity: .65; }
.cc-atten-result {
    background: linear-gradient(160deg, rgba(56,189,248,.16), rgba(37,99,235,.07));
    border-color: rgba(56,189,248,.45);
}
.cc-atten-result .cc-atten-v { color: var(--cc-cyan-bright); }

/* Headline intensity (big Roman numeral) */
.cc-atten-headline { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--cc-border); border-bottom: 1px solid var(--cc-border); margin-bottom: 14px; }
.cc-atten-roman {
    flex: none; width: 92px; height: 92px; border-radius: 16px; display: grid; place-items: center;
    font-family: var(--mgs-font-head, "Plus Jakarta Sans", sans-serif);
    font-size: 38px; font-weight: 800; letter-spacing: .02em; color: #04121f;
    background: linear-gradient(135deg, #67e8f9, #38bdf8); box-shadow: 0 8px 22px rgba(56,189,248,.3);
}
.cc-atten-roman[data-tone="warn"]   { background: linear-gradient(135deg, #fde047, #fcd34d); box-shadow: 0 8px 22px rgba(250,204,21,.28); }
.cc-atten-roman[data-tone="hot"]    { background: linear-gradient(135deg, #fdba74, #fb923c); color: #2a1503; box-shadow: 0 8px 22px rgba(251,146,60,.3); }
.cc-atten-roman[data-tone="danger"] { background: linear-gradient(135deg, #fca5a5, #ef4444); color: #2a0606; box-shadow: 0 8px 22px rgba(239,68,68,.32); }
.cc-atten-meta { min-width: 0; }
.cc-atten-name { margin: 0; font-size: 17px; font-weight: 800; color: var(--cc-ink); }
.cc-atten-effect { margin: 3px 0 0; font-size: 13px; color: var(--cc-ink-soft); line-height: 1.5; }
.cc-atten-band { margin: 6px 0 0; font-size: 12px; color: var(--cc-muted); }
.cc-atten-band i { color: var(--cc-cyan); margin-right: 4px; }
.cc-atten-band b { color: var(--cc-ink-soft); }

/* Implication boxes */
.cc-atten-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cc-atten-box { padding: 11px 13px; border-radius: 11px; background: rgba(148,163,184,.07); border: 1px solid var(--cc-border); }
.cc-atten-box-h { display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--cc-cyan); margin-bottom: 5px; }
.cc-atten-box-h i { margin-right: 5px; }
.cc-atten-box p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--cc-ink-soft); }
.cc-atten-box b { color: var(--cc-ink); }

/* Coordination + method + guardrail notes */
.cc-atten-coord, .cc-atten-method, .cc-atten-guard { margin: 8px 0 0; font-size: 12px; line-height: 1.5; }
.cc-atten-coord { padding: 10px 13px; border-radius: 9px; background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.22); color: var(--cc-ink-soft); }
.cc-atten-coord i { color: var(--cc-cyan-bright); margin-right: 5px; }
.cc-atten-coord b { color: var(--cc-ink); }
.cc-atten-method { color: var(--cc-muted); }
.cc-atten-method i, .cc-atten-guard i { margin-right: 5px; }
.cc-atten-guard { padding: 10px 13px; border-radius: 9px; background: rgba(251,146,60,.1); border: 1px solid rgba(251,146,60,.28); color: #fed7aa; }
.cc-atten-guard i { color: #fb923c; }
.cc-atten-guard b { color: #ffedd5; }

@media (max-width: 640px) {
    .cc-atten-arrow { transform: rotate(90deg); width: 100%; justify-content: center; }
    .cc-atten-chain { flex-direction: column; }
    .cc-atten-step { flex-basis: auto; }
    .cc-atten-headline { gap: 12px; }
    .cc-atten-roman { width: 72px; height: 72px; font-size: 30px; }
}

/* Global location + international hazard watch */
.cc-fc-global { margin: 14px 0 18px; }
.cc-fc-global-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
    margin-bottom: 12px;
}
.cc-fc-global-head h3 {
    margin: 0 0 4px; color: var(--cc-ink); font-size: 17px; font-weight: 800;
    display: flex; align-items: center; gap: 8px;
}
.cc-fc-global-head h3 i { color: var(--cc-cyan-bright); }
.cc-fc-search { display: flex; gap: 8px; flex: 1 1 420px; justify-content: flex-end; min-width: 280px; }
.cc-fc-search input[type="search"] {
    width: min(440px, 100%); min-height: 36px; border-radius: 8px;
    border: 1px solid var(--cc-border); background: rgba(8,16,34,.82);
    color: var(--cc-ink); padding: 8px 10px; font: inherit; outline: none;
}
.cc-fc-search select {
    min-height: 36px; border-radius: 8px; border: 1px solid var(--cc-border);
    background: rgba(8,16,34,.82); color: var(--cc-ink);
    padding: 7px 30px 7px 9px; font: inherit; outline: none;
}
.cc-fc-search input[type="search"]:focus {
    border-color: rgba(56,189,248,.72); box-shadow: 0 0 0 3px rgba(56,189,248,.12);
}
.cc-fc-search select:focus {
    border-color: rgba(56,189,248,.72); box-shadow: 0 0 0 3px rgba(56,189,248,.12);
}
.cc-place-quick { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; margin: -2px 0 12px; }
.cc-place-quick > span { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; color: #9fb3cc; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.cc-place-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 10px; border-radius: 9px; border: 1px solid rgba(125,211,252,.28); background: rgba(14,165,233,.1); color: #dbeafe; text-decoration: none; }
.cc-place-chip b { font-size: 12.5px; color: #f8fafc; }
.cc-place-chip small { color: #9fb3cc; font-size: 10.5px; }
.cc-place-chip:hover, .cc-place-chip.is-active { border-color: rgba(56,189,248,.68); background: rgba(14,165,233,.22); color: #fff; }
.cc-place-chip.is-active { box-shadow: 0 0 0 3px rgba(56,189,248,.13); }
.cc-fc-global-grid {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 10px; margin: 10px 0 12px;
}
.cc-fc-location-card {
    min-width: 0; padding: 12px 13px; border-radius: 10px;
    background: rgba(148,163,184,.07); border: 1px solid var(--cc-border);
}
.cc-fc-loc-k {
    display: block; margin-bottom: 6px; color: var(--cc-muted);
    font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.cc-fc-loc-now { display: flex; align-items: center; gap: 9px; color: var(--cc-ink); }
.cc-fc-loc-now i { color: var(--cc-cyan-bright); font-size: 24px; }
.cc-fc-loc-now span { font-size: 28px; line-height: 1; font-weight: 800; }
.cc-fc-location-card p { margin: 5px 0 0; color: var(--cc-ink-soft); font-size: 13px; line-height: 1.45; }
.cc-fc-candidates { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.cc-fc-candidates a {
    display: inline-flex; align-items: center; min-height: 28px; max-width: 100%;
    padding: 5px 8px; border-radius: 999px; border: 1px solid rgba(56,189,248,.25);
    background: rgba(56,189,248,.08); color: var(--cc-cyan-bright); font-size: 12px;
    text-decoration: none; overflow-wrap: anywhere;
}
.cc-fc-candidates a:hover { border-color: rgba(56,189,248,.58); background: rgba(56,189,248,.14); }
.cc-fc-hazard-watch { padding-top: 10px; border-top: 1px solid var(--cc-border); }
.cc-fc-hazard-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cc-fc-hazard-counts span {
    display: inline-flex; align-items: center; gap: 6px; min-height: 30px;
    padding: 5px 9px; border-radius: 8px; border: 1px solid var(--cc-border);
    background: rgba(15,23,42,.62); color: var(--cc-ink-soft); font-size: 12px;
}
.cc-fc-hazard-counts i { color: var(--cc-cyan); }
.cc-fc-hazard-counts b { color: var(--cc-ink); font-size: 15px; }
.cc-fc-global-table td, .cc-fc-global-table th { vertical-align: top; }
.cc-fc-global-table .cc-st { white-space: nowrap; }

/* Forecast intelligence queue */
.cc-ai-panel, .cc-haz-timeline, .cc-map-command, .cc-sensor-panel { margin: 14px 0; }
.cc-rain-ops-summary { margin: 14px 0; }
.cc-rain-ops-summary .cc-card-head h3 i { color: #38bdf8; }
.cc-rain-ops-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(220px, .8fr) minmax(260px, .95fr);
    gap: 10px;
}
.cc-rain-ops-grid article {
    min-width: 0;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(125,211,252,.22);
    background: linear-gradient(180deg, rgba(15,23,42,.68), rgba(8,16,34,.58));
}
.cc-rain-ops-grid span {
    display: block;
    margin-bottom: 6px;
    color: #93c5fd;
    font-size: 10.5px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.cc-rain-ops-grid b {
    display: block;
    color: #fff;
    font-size: 17px;
    line-height: 1.2;
    overflow-wrap: break-word;
}
.cc-rain-ops-grid p {
    margin: 7px 0 0;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: break-word;
}
.cc-ai-head { align-items: flex-start; }
.cc-ai-head h3 { margin-bottom: 3px; }
.cc-ai-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.cc-ai-card {
    min-width: 0; padding: 12px; border-radius: 10px;
    background: rgba(8,16,34,.56); border: 1px solid rgba(148,163,184,.18);
    border-left: 4px solid #22c55e;
}
.cc-ai-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.cc-ai-level { font-size: 10.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #cbd5e1; }
.cc-ai-score {
    min-width: 42px; height: 34px; display: grid; place-items: center;
    border-radius: 8px; background: rgba(15,23,42,.82); border: 1px solid rgba(148,163,184,.22);
    color: #fff; font-weight: 900; font-size: 17px;
}
.cc-ai-card h4 { margin: 0 0 5px; color: #fff; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.cc-ai-card p { margin: 0 0 9px; color: #cbd5e1; font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; }
.cc-ai-card dl { margin: 0; display: grid; gap: 5px; }
.cc-ai-card dl div { display: grid; grid-template-columns: 58px 1fr; gap: 8px; }
.cc-ai-card dt { margin: 0; color: #94a3b8; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.cc-ai-card dd { margin: 0; color: #e2e8f0; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.cc-ai-card footer {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 8px;
    border-top: 1px solid rgba(148,163,184,.15); font-size: 11px; color: #94a3b8;
}
.cc-ai-advisory { border-left-color: #38bdf8; }
.cc-ai-watch { border-left-color: #facc15; }
.cc-ai-warning { border-left-color: #fb923c; }
.cc-ai-critical { border-left-color: #ef4444; background: linear-gradient(100deg, rgba(60,8,12,.72), rgba(8,16,34,.58)); }

/* Hazard timeline */
.cc-haz-rail {
    list-style: none; margin: 0; padding: 4px 0; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px;
}
.cc-haz-node {
    position: relative; min-width: 0; padding: 11px 12px 11px 34px;
    border-radius: 10px; background: rgba(148,163,184,.07); border: 1px solid rgba(148,163,184,.16);
}
.cc-haz-dot {
    position: absolute; left: 12px; top: 15px; width: 10px; height: 10px; border-radius: 50%;
    background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.14);
}
.cc-haz-node time { display: block; color: #94a3b8; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.cc-haz-node b { display: block; margin-top: 3px; color: #fff; font-size: 13px; line-height: 1.28; overflow-wrap: anywhere; }
.cc-haz-node small { display: block; margin-top: 4px; color: #cbd5e1; font-size: 11.5px; line-height: 1.35; overflow-wrap: anywhere; }
.cc-haz-advisory .cc-haz-dot { background: #38bdf8; box-shadow: 0 0 0 4px rgba(56,189,248,.14); }
.cc-haz-watch .cc-haz-dot { background: #facc15; box-shadow: 0 0 0 4px rgba(250,204,21,.14); }
.cc-haz-warning .cc-haz-dot { background: #fb923c; box-shadow: 0 0 0 4px rgba(251,146,60,.16); }
.cc-haz-critical .cc-haz-dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.17); }

/* Command map and sensors */
.cc-intel-map {
    height: clamp(360px, 48vh, 620px); width: 100%; border-radius: 10px;
    overflow: hidden; background: #0b1220; border: 1px solid rgba(148,163,184,.18);
}
.cc-map-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 9px; color: #cbd5e1; font-size: 12px; }
.cc-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cc-map-key { width: 11px; height: 11px; display: inline-block; border-radius: 50%; border: 2px solid rgba(255,255,255,.72); }
.cc-map-key-brgy { background: #facc15; }
.cc-map-key-evac { background: #22c55e; border-radius: 3px; }
.cc-map-key-alert { background: #ef4444; }
.cc-map-key-sensor { background: #a78bfa; border-style: dashed; }
.cc-sensor-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px;
}
.cc-sensor-card {
    min-width: 0; padding: 12px; border-radius: 10px; border: 1px dashed rgba(167,139,250,.45);
    background: rgba(88,28,135,.16);
}
.cc-sensor-type { color: #d8b4fe; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.cc-sensor-card h4 { margin: 4px 0 7px; color: #fff; font-size: 13.5px; line-height: 1.25; overflow-wrap: anywhere; }
.cc-sensor-card b { display: block; color: #fef3c7; font-size: 14px; margin-bottom: 5px; }
.cc-sensor-card p { margin: 0 0 8px; color: #dbeafe; font-size: 12px; line-height: 1.38; }
.cc-sensor-card small { color: #94a3b8; font-size: 11px; }

/* PAGASA live strip */
.cc-pagasa-strip {
    margin: 10px 0 12px; padding: 11px; border-radius: 10px;
    border: 1px solid rgba(56,189,248,.24); background: rgba(14,116,144,.12);
}
.cc-pagasa-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.cc-pagasa-head > span:first-child { color: #e0f2fe; font-weight: 800; font-size: 13px; }
.cc-pagasa-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.cc-pagasa-item {
    display: block; min-width: 0; padding: 9px; border-radius: 8px;
    border: 1px solid rgba(56,189,248,.18); background: rgba(8,16,34,.42);
    color: #e2e8f0; text-decoration: none;
}
.cc-pagasa-item b { display: block; font-size: 12.5px; line-height: 1.3; color: #fff; overflow-wrap: anywhere; }
.cc-pagasa-item span { display: block; margin-top: 4px; font-size: 11.5px; color: #93c5fd; overflow-wrap: anywhere; }

@media (max-width: 900px) {
    .cc-fc-global-head { flex-direction: column; }
    .cc-fc-search { width: 100%; justify-content: stretch; min-width: 0; flex: 0 1 auto; }
    .cc-fc-search input[type="search"] { width: 100%; }
    .cc-fc-global-grid { grid-template-columns: 1fr; }
    .cc-rain-ops-grid { grid-template-columns: 1fr; }
    .cc-rain-command { grid-template-columns: 1fr; }
    .cc-rain-live-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
    .cc-rain-action-panel { min-height: auto; }
}
@media (max-width: 520px) {
    .cc-fc-search { flex-direction: column; }
    .cc-fc-search select { width: 100%; }
    .cc-fc-search .cc-btn { width: 100%; justify-content: center; }
    .cc-rain-target-search { flex: 0 1 auto; flex-direction: column; align-items: stretch; }
    .cc-rain-target-search .cc-btn { width: 100%; justify-content: center; }
    .cc-place-quick > span { width: 100%; }
    .cc-place-chip { flex: 1 1 100%; justify-content: space-between; }
    .cc-fc-loc-now span { font-size: 24px; }
    .cc-fc-hazard-counts span { flex: 1 1 120px; }
    .cc-fc-global-table,
    .cc-fc-global-table tbody,
    .cc-fc-global-table tr,
    .cc-fc-global-table td { display: block; width: 100%; }
    .cc-fc-global-table thead { display: none; }
    .cc-fc-global-table tr {
        padding: 10px 0;
        border-bottom: 1px solid rgba(148,163,184,.16);
    }
    .cc-fc-global-table tr:last-child { border-bottom: 0; }
    .cc-fc-global-table td {
        border: 0 !important;
        padding: 4px 0 !important;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .cc-fc-global-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--cc-muted);
    }
}

/* ============================================================================
 * Responsive overflow hardening (fixes mobile horizontal-scroll on every view)
 * ROOT CAUSE: the hazard-ticker track has overflow:hidden but, as a flex item
 * with the default min-width:auto, it could not shrink below the giant marquee's
 * content width — so it widened the whole .main canvas on phones, which in turn
 * let tables/banner-chips position themselves past the viewport edge.
 * ==========================================================================*/
.mdrrmo-wt-track { min-width: 0; }            /* let the overflow:hidden track shrink & clip the marquee */
.mdrrmo-wt { max-width: 100%; }
/* Belt-and-suspenders: clip any stray horizontal overflow at the content root.
   overflow-x:clip (not hidden) so it neither creates a scroll container nor
   touches vertical scroll; inner .cc-tablewrap keeps its own overflow-x:auto. */
body.mdrrmo-cc-body .shell > .main { overflow-x: clip; }
.cc-view, .cc-dash, .cc-forecast, .cc-listwrap { max-width: 100%; min-width: 0; }
.cc-tablewrap { max-width: 100%; }
.cc-fc-brgys { overflow-wrap: anywhere; }

/* MDRRMO navigation and map fallback hardening */
#ccTsunamiBanner.cc-tsu-collapsed .cc-tsunami-banner {
    max-height: 58px;
    overflow: hidden;
    align-items: center;
    padding: 9px 13px;
    margin-bottom: 10px;
}
#ccTsunamiBanner.cc-tsu-collapsed .cc-fc-flagcol { min-width: 130px; padding-right: 10px; }
#ccTsunamiBanner.cc-tsu-collapsed .cc-fc-flagico { font-size: 18px; }
#ccTsunamiBanner.cc-tsu-collapsed .cc-fc-headline { margin: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ccTsunamiBanner.cc-tsu-collapsed .cc-fc-sub,
#ccTsunamiBanner.cc-tsu-collapsed .cc-fc-meta,
#ccTsunamiBanner.cc-tsu-collapsed .cc-fc-brgys,
#ccTsunamiBanner.cc-tsu-collapsed .cc-fc-sop,
#ccTsunamiBanner.cc-tsu-collapsed .cc-fc-guard { display: none; }
.mdrrmo-map-fallback { height:100%; min-height:280px; display:grid; place-items:stretch; padding:12px; background:linear-gradient(rgba(56,189,248,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(56,189,248,.08) 1px,transparent 1px),radial-gradient(circle at 50% 45%,rgba(56,189,248,.16),transparent 42%),#071225; background-size:28px 28px,28px 28px,auto,auto; }
.mdrrmo-map-fallback__panel { align-self:center; max-width:820px; margin:0 auto; border:1px solid rgba(125,211,252,.28); border-radius:12px; background:rgba(3,9,20,.78); padding:16px; color:#dbeafe; box-shadow:0 18px 42px rgba(0,0,0,.36); }
.mdrrmo-map-fallback__panel h4 { margin:0 0 7px; color:#fff; font-size:15px; display:flex; gap:8px; align-items:center; }
.mdrrmo-map-fallback__panel p { margin:0 0 10px; color:#b8c4da; font-size:12.5px; line-height:1.45; }
.mdrrmo-map-fallback__grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:8px; }
.mdrrmo-map-fallback__item { border:1px solid rgba(148,163,184,.18); border-radius:9px; background:rgba(15,23,42,.66); padding:8px; font-size:12px; color:#cbd5e1; }
.mdrrmo-map-fallback__item b { display:block; color:#fff; margin-bottom:2px; }
.mw-pagasa-om { position:absolute; right:14px; bottom:14px; z-index:30; width:min(360px,42%); border:1px solid rgba(125,211,252,.3); border-radius:12px; background:rgba(3,9,20,.86); box-shadow:0 14px 38px rgba(0,0,0,.42); padding:12px; color:#dbeafe; }
.mw-pagasa-om h5 { margin:0 0 8px; color:#fff; font-size:.76rem; letter-spacing:.06em; text-transform:uppercase; display:flex; gap:7px; align-items:center; }
.mw-pagasa-om .om-now { display:flex; align-items:flex-end; gap:8px; }
.mw-pagasa-om .om-temp { font-size:2.3rem; line-height:1; font-weight:950; color:#fff; }
.mw-pagasa-om .om-desc { color:#bae6fd; font-size:.78rem; font-weight:800; }
.mw-pagasa-om .om-row { margin-top:8px; display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.mw-pagasa-om .om-row span { border:1px solid rgba(148,163,184,.18); border-radius:8px; background:rgba(15,23,42,.62); padding:7px; font-size:.67rem; color:#94a3b8; }
.mw-pagasa-om .om-row b { display:block; color:#fff; font-size:.82rem; }
.mw-pagasa-om .om-source { margin-top:8px; font-size:.66rem; color:#93c5fd; line-height:1.35; }
@media(max-width:720px){.mw-pagasa-om{left:12px;right:12px;bottom:12px;width:auto}.mw-pagasa-om .om-row{grid-template-columns:1fr}}
