/* ============================================================================
 * 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('/assets/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-margo { 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-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; }

/* 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; }

/* 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-fc-driver-w5 > div { grid-template-columns: 80px 1fr; }
}

/* ============================================================================
 * Earthquake Shaking Calculator (source → kulambogan 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 input[type="search"]:focus {
    border-color: rgba(56,189,248,.72); box-shadow: 0 0 0 3px rgba(56,189,248,.12);
}
.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; }

@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; }
}
@media (max-width: 520px) {
    .cc-fc-search { flex-direction: column; }
    .cc-fc-search .cc-btn { width: 100%; justify-content: center; }
    .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; }
