/* ==========================================================================
   zNet CCTV — halaman publik. Gaya mengikuti referensi layout "control room
   publik": header gelap melengkung, bilah menu putih penuh lebar, hero, kartu
   statistik, daftar jelajahi, feed kamera, keamanan, tentang.
   ========================================================================== */
:root {
  --brand: #2F5BFF;
  --brand-dark: #101A40;
  --brand-soft: #E8EDFF;
  --brand-soft-2: #DBEAFE;
  --page: #F3F5FB;
  --card: #FFFFFF;
  --line: #E6E9F2;
  --ink: #111827;
  --ink-2: #5B6478;
  --muted: #9AA2B6;
  --muted-2: #75809B;
  --ok: #159049;
  --warn: #A06510;
  --bad: #DC2626;
  --feed-bg: #0C1220;
  --radius: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(15, 25, 60, 0.05);
  --shadow-lg: 0 18px 40px rgba(15, 25, 60, 0.12);
  --grad: radial-gradient(120% 160% at 85% 0%, #2547C9 0%, rgba(37, 71, 201, 0) 55%),
          linear-gradient(135deg, #0D1533 0%, #17275E 55%, #2F5BFF 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

/* ================================================================== HEADER */
.topbar {
  background: var(--grad);
  color: #fff;
  border-radius: 0 0 48px 48px;
  padding: 24px 20px 22px;
}
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.brand-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-right { display: flex; align-items: center; gap: 8px; }
.brand-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.brand-lens {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4C7BFF 0%, #1B2A6B 70%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.9);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong {
  font-size: 16px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-text small { font-size: 12px; color: #C3CCEC; }

/* baris statistik di dalam header (penonton, jam, status sistem) */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.stat-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
  min-width: 0;
}
.stat-icon {
  position: relative; width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: rgba(255, 255, 255, 0.12); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon.ok { background: rgba(34, 197, 94, 0.24); }
.stat-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ping-dot {
  position: absolute; right: -2px; top: -2px; width: 9px; height: 9px; border-radius: 50%;
  background: #22C55E; border: 1.5px solid #16265E;
}
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-body b {
  font-size: 14px; font-weight: 800; line-height: 1.35; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.stat-body small { font-size: 11px; font-weight: 600; color: #A9B4DE; }

.account-btn {
  padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: #fff; color: var(--brand-dark); border: 1px solid transparent; white-space: nowrap;
}
.account-btn:hover { text-decoration: none; background: #EDF1FF; }
.account-btn.ghost { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.24); }

/* ------------------------------------------------------- bilah menu (nav) */
.top-nav {
  position: sticky; top: 0; z-index: 30;
  background: #fff; border-radius: 0;
}
.top-nav-inner { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; }
.top-nav-inner::-webkit-scrollbar { display: none; }
.top-nav-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 700; color: var(--muted-2); white-space: nowrap;
}
.top-nav-item svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.top-nav-item:hover { background: #F5F7FE; color: var(--ink); text-decoration: none; }
.top-nav-item.is-active { background: var(--brand-soft); color: var(--brand); }
.tab-badge {
  min-width: 20px; padding: 1px 6px; border-radius: 999px;
  background: rgba(47, 91, 255, 0.12); color: var(--brand);
  font-size: 11px; font-weight: 800; text-align: center;
}
.tab-badge[hidden] { display: none; }

/* ==================================================================== MAIN */
.main { padding-bottom: 8px; }
.page-section { display: none; }
.page-section.is-active { display: block; }

/* ------------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  margin: 18px; padding: 26px 20px;
  border-radius: var(--radius);
  color: #fff; background: var(--grad);
}
.hero-glow {
  position: absolute; right: -80px; top: -110px; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 65%);
}
.hero-eyebrow {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11.5px; font-weight: 700; line-height: 1.2;
}
.hero-eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: #4ADE80; }
.hero h1 {
  position: relative;
  margin-top: 14px; max-width: 340px;
  font-size: 22px; font-weight: 800; line-height: 1.3;
}
.hero p {
  position: relative;
  margin-top: 10px; max-width: 360px;
  font-size: 13.5px; line-height: 1.6; color: #C3CCEC;
}
.hero-actions { position: relative; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer;
  border: 1px solid transparent;
}
.hero-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hero-btn.primary { background: #fff; color: var(--brand-dark); }
.hero-btn.primary:hover { background: #EDF1FF; }
.hero-btn.ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.hero-btn.ghost:hover { background: rgba(255, 255, 255, 0.16); }

/* -------------------------------------------------------------- statistik */
.home-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; padding: 18px 18px 4px;
}
.home-stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px 12px; text-align: center;
}
.home-stat-card .num { font-size: 20px; font-weight: 800; color: var(--brand); line-height: 1.35; }
.home-stat-card .lbl { font-size: 11px; font-weight: 600; color: var(--ink-2); }

/* ------------------------------------------------- blok & daftar jelajahi */
.home-block { padding: 20px 18px 4px; }
.home-block-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800; color: var(--ink);
}
.home-block-title svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.block-text { margin-top: 6px; font-size: 12.5px; line-height: 1.65; color: #374151; }
.quick-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.quick-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 14px; border-radius: var(--radius-md);
  background: var(--card); border: 1px solid var(--line);
  font-family: inherit; cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease;
}
.quick-item:hover { border-color: #CFD8F5; transform: translateY(-1px); }
.qi-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.qi-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.qi-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.qi-body strong { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.qi-body small { font-size: 12px; color: var(--ink-2); }
.qi-arrow { font-size: 17px; color: var(--muted); flex: none; }

/* ------------------------------------------------------------ section head */
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 22px 18px 12px; flex-wrap: wrap;
}
.section-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.section-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(150deg, #2F5BFF, #6E8BFF);
  display: flex; align-items: center; justify-content: center;
}
.section-icon svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.section-title { font-size: 16.5px; font-weight: 800; }
.section-sub { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.view-toggle { display: flex; gap: 6px; }
.view-btn {
  width: 38px; height: 38px; padding: 0; border-radius: var(--radius-sm); cursor: pointer;
  background: #fff; border: 1px solid var(--line); color: var(--muted-2);
  display: flex; align-items: center; justify-content: center;
}
.view-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.view-btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ------------------------------------------------------------ kotak cari */
.search-wrap { padding: 0 18px 18px; }
.search-box { position: relative; display: flex; align-items: center; height: 48px; }
.search-box > svg {
  position: absolute; left: 16px; width: 17px; height: 17px; color: var(--muted);
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; pointer-events: none;
}
.search-box input {
  width: 100%; height: 48px; padding: 0 16px 0 44px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  color: var(--ink); font-family: inherit; font-size: 15px;
}
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 91, 255, 0.12); }

/* -------------------------------------------------------------- feed kamera */
.feed-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 440px));
  justify-content: center; gap: 20px; padding: 0 14px 8px;
}
.feed-empty {
  grid-column: 1 / -1; padding: 44px 20px; text-align: center; color: var(--muted-2);
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
}
.cam-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.cam-card.is-live { border-color: rgba(47, 91, 255, 0.35); }

.cam-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; }
.cam-head-left { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.cam-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--brand-soft-2); color: #2563EB;
  display: flex; align-items: center; justify-content: center;
}
.cam-avatar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cam-avatar.off { background: #F1F5F9; color: #94A3B8; }
.cam-title-wrap { display: flex; flex-direction: column; min-width: 0; }
.cam-name {
  font-size: 15px; font-weight: 800; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cam-desc { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-actions { display: flex; gap: 8px; flex: none; }
.cam-actions .icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm); cursor: pointer;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
}
.cam-actions .icon-btn:hover { color: var(--brand); border-color: #C7D2FE; background: #F8FAFF; }
.cam-actions .icon-btn.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cam-actions .icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.cam-feed { position: relative; aspect-ratio: 8 / 5; background: var(--feed-bg); }
.cam-feed video { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--feed-bg); }
.feed-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 9px;
  color: #8B96B8; font-size: 12.5px; text-align: center; padding: 16px;
  background: radial-gradient(120% 120% at 50% 0%, rgba(47, 91, 255, 0.12), rgba(12, 18, 32, 0));
}
.feed-placeholder .feed-note {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
}
.feed-placeholder .sp {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(139, 150, 184, 0.35); border-top-color: #8B96B8;
  animation: pp-spin 0.9s linear infinite;
}
.feed-snap { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
.feed-overlay-top {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  pointer-events: none;
}
.feed-live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em;
}
.feed-live-badge.live { background: rgba(220, 38, 38, 0.92); }
.feed-live-badge .feed-viewers {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.55); color: #E7ECFF;
  font-size: 10.5px; font-weight: 700;
}
.mute-btn {
  position: absolute; right: 10px; bottom: 10px;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: rgba(0, 0, 0, 0.55); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
}
.mute-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mute-btn:hover { background: rgba(0, 0, 0, 0.75); }

.cam-foot { display: flex; align-items: center; gap: 10px; padding: 12px 14px 14px; }
.cam-foot-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.foot-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px;
  background: var(--page); border: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700; line-height: 1.3; color: var(--ink-2); white-space: nowrap;
}
.foot-chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 6px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; line-height: 1.3; letter-spacing: 0.02em; white-space: nowrap;
  background: rgba(148, 163, 184, 0.16); color: #64748B;
}
.status-chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-chip.live { background: rgba(34, 197, 94, 0.12); color: var(--ok); }
.status-chip.connecting { background: rgba(245, 165, 36, 0.14); color: var(--warn); }
.status-chip.offline { background: rgba(220, 38, 38, 0.1); color: var(--bad); }

/* tampilan daftar (list) */
.feed-list.is-list { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px 14px 8px; }
.feed-list.is-list .cam-card { flex-direction: row; align-items: stretch; padding: 12px; gap: 14px; }
.feed-list.is-list .cam-head { padding: 0; flex: 1; align-items: center; }
.feed-list.is-list .cam-feed { width: 190px; flex: none; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 8 / 5; }
.feed-list.is-list .cam-foot { padding: 0; flex: none; }

/* --------------------------------------------------------------- peta box */
.map-box { margin: 0 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
#map { height: clamp(380px, 62vh, 640px); border-radius: var(--radius-md); overflow: hidden; }
.map-pop { display: flex; flex-direction: column; gap: 8px; min-width: 200px; }
.map-pop strong { font-size: 14.5px; font-weight: 800; }
.map-pop small { color: var(--ink-2); font-size: 12px; }
.map-pop img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; background: var(--feed-bg); }
.map-pop .btn-soft { align-self: flex-start; }
.pin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(15, 25, 60, 0.35); background: var(--muted-2); }
.pin.online { background: var(--ok); }
.pin.offline { background: var(--bad); }
.pin.live { background: var(--brand); animation: pp-blink 1.6s infinite; }

/* --------------------------------------------------------------- keamanan */
.info-hero {
  display: flex; align-items: center; gap: 14px;
  margin: 0 18px; padding: 18px; border-radius: var(--radius);
  color: #fff; background: var(--grad);
}
.ih-icon {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center;
}
.ih-icon svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ih-body h2 { font-size: 15px; font-weight: 800; }
.ih-body p { margin-top: 3px; font-size: 12.5px; line-height: 1.6; color: #C3CCEC; }

.emergency-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; padding: 4px 18px 18px;
}
.emergency-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px;
}
.emergency-card .ec-num { font-size: 17px; font-weight: 800; color: var(--bad); line-height: 1.3; }
.emergency-card .ec-lbl { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.emergency-card .ec-note { font-size: 11px; color: var(--muted-2); margin-top: 2px; }

.step-list { display: flex; flex-direction: column; margin-top: 14px; }
.step-item { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800;
}
.step-item strong { font-size: 13.5px; font-weight: 700; }
.step-item p { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }

/* ------------------------------------------------------------------ faq */
.faq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.faq-item summary { cursor: pointer; font-size: 13.5px; font-weight: 700; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "›"; float: right; color: var(--muted); transform: rotate(90deg); }
.faq-item[open] summary::after { transform: rotate(-90deg); }
.faq-item p { margin-top: 8px; font-size: 12.5px; line-height: 1.65; color: #374151; }

/* --------------------------------------------------------------- footnote */
.footnote {
  padding: 10px 24px 28px; font-size: 11.5px; color: var(--muted-2); text-align: center;
}

/* ---------------------------------------------------------------- tombol */
.btn-soft {
  padding: 9px 14px; border-radius: var(--radius-sm); cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); border: 1px solid rgba(47, 91, 255, 0.16);
}
.btn-soft:hover { background: #DCE4FF; }

/* ------------------------------------------------------------ modal besar */
.modal-pub { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; }
.mp-backdrop { position: absolute; inset: 0; background: rgba(10, 16, 32, 0.74); backdrop-filter: blur(4px); }
.mp-body {
  position: relative; width: min(1100px, 100%); max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.mp-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.mp-head strong { font-size: 16px; font-weight: 800; display: block; }
.mp-head small { font-size: 12.5px; color: var(--ink-2); }
.mp-actions { display: flex; gap: 8px; }
.mp-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: var(--feed-bg); }
.mp-video video { width: 100%; height: 100%; object-fit: contain; display: block; }
.mp-state {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 20px;
  background: rgba(12, 18, 32, 0.78); color: #E7ECFF; font-size: 13px; text-align: center;
}
.mp-state.hide { display: none; }

/* ------------------------------------------------------------------ toast */
.toast-pub { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast-pub .toast {
  min-width: 240px; max-width: 360px; padding: 12px 15px; border-radius: var(--radius-md);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  font-size: 13px; color: var(--ink);
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 1400px) {
  .feed-list { grid-template-columns: repeat(2, minmax(0, 440px)); }
}
@media (max-width: 900px) {
  .topbar { border-radius: 0 0 28px 28px; padding: 18px 16px 0; }
  .topbar-right { margin-left: 0; width: 100%; }
  .top-nav { margin-top: 14px; border-radius: 16px 16px 0 0; }
  .hero { margin: 14px; padding: 22px 18px; }
  .hero h1 { max-width: none; }
  .hero p { max-width: none; }
  .feed-list { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 14px; }
  .home-stats { padding: 14px 14px 4px; }
  .home-block, .section-head { padding-left: 14px; padding-right: 14px; }
  .search-wrap { padding: 0 14px; }
  .info-hero, .map-box { margin: 0 14px; }
  .emergency-grid { grid-template-columns: 1fr; padding: 4px 14px 14px; }
  .feed-list.is-list .cam-card { flex-direction: column; }
  .feed-list.is-list .cam-feed { width: 100%; }
  .feed-list.is-list .cam-head { order: -1; }
  .feed-list.is-list .cam-foot { justify-content: space-between; width: 100%; }
}
@media (max-width: 560px) {
  .brand-text strong { font-size: 15px; }
  .home-stats { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-chip { padding: 9px 11px; }
}
