/* ============================================================
   邕安系统 · 决策指挥大屏布局（index.html）
   全视口 12 列栅格，1920×1080 基准优化，流式自适应（避免 transform
   缩放导致的 Leaflet 点击偏移）。深色指挥主题。
   ============================================================ */
/* clip 连焦点触发的程序化滚动也阻止（hidden 挡不住 Leaflet 点击聚焦引发的 scrollIntoView） */
html, body { overflow: clip; }
/* 26px = .decl-bar 高度（base.css）；总高须恰好占满视口，否则聚焦滚动会顶出声明条 */
.screen { display: flex; flex-direction: column; height: calc(100vh - 26px); overflow-x: auto; }
/* 最小工作宽度：更窄时在 .screen 内出横向滚动条，而不是让顶栏/面板无限挤压折行崩坏 */
.topbar, .stage { min-width: 1150px; }

/* —— 顶栏 —— */
.topbar {
  display: flex; align-items: center; gap: 16px; flex: none; flex-wrap: nowrap;
  height: 62px; padding: 0 18px;
  background: linear-gradient(180deg, #0e1524, #0a0e17);
  border-bottom: 1px solid var(--line-strong);
}
.brand { display: flex; align-items: baseline; gap: 10px; flex: 0 1 auto; min-width: 0; }
.brand .logo { font-size: 22px; font-weight: 800; letter-spacing: 1px; white-space: nowrap;
  background: linear-gradient(90deg, #35c6e6, #4da3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .full { font-size: 13px; color: var(--ink-2);
  /* 单行省略，禁止折行撑破 62px 顶栏 */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.brand .full b { color: var(--ink-1); }

.level-banner {
  display: flex; align-items: center; gap: 10px; padding: 5px 16px;
  border-radius: 8px; border: 1px solid var(--c);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, transparent), transparent);
  /* 允许收缩+内容截断：附加信息一长（多站超警/多库红色）会撑破边框挤乱顶栏 */
  flex: 0 1 auto; min-width: 0; max-width: 460px; overflow: hidden;
}
.level-banner.lv-red { animation: pulse-red 2s infinite; }
.lb-tag { color: #0a0e17; font-weight: 800; font-size: 15px; padding: 2px 12px; border-radius: 5px;
  flex: none; white-space: nowrap; }
.lb-word { font-size: 20px; font-weight: 700; color: var(--c); letter-spacing: 2px;
  flex: none; white-space: nowrap; }
.lb-extra { font-size: 12px; color: var(--ink-2);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topbar .spacer { flex: 1; }
.clock { text-align: right; font-variant-numeric: tabular-nums; }
.clock .t { font-size: 20px; font-weight: 700; }
.clock .d { font-size: 11px; color: var(--ink-3); }

/* 情景播放控制 */
.play-ctrl { display: flex; align-items: center; gap: 8px; }
.play-ctrl select { background: var(--bg-elevated); color: var(--ink-1); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 5px 8px; font-size: 12px; max-width: 220px; }
.play-ctrl select:disabled { opacity: 0.5; }
.play-btn { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: #0a0e17; border: none; font-size: 15px; }
.play-btn:hover { filter: brightness(1.1); }
.speed-group { display: flex; gap: 3px; }
.timeline { display: flex; align-items: center; gap: 8px; min-width: 260px; }
.timeline input[type=range] { flex: 1; accent-color: var(--accent); }
.timeline .tl-time { font-size: 12px; color: var(--ink-2); min-width: 92px; font-variant-numeric: tabular-nums; }
.status-pill { font-size: 12px; color: var(--ink-2); padding: 3px 10px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--bg-elevated); white-space: nowrap; }

/* —— 主栅格 —— */
.stage {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: 3.1fr 5.8fr 3.1fr; gap: var(--gap); padding: var(--gap);
}
.col { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; min-width: 0; }
.col > .panel { flex: 1; }
.col-left > .panel:first-child { flex: 0.85; }
.center { min-width: 0; }
#map { flex: 1; border-radius: var(--radius); min-height: 0; }
.map-panel { position: relative; }
.map-offline-tag { position: absolute; left: 12px; bottom: 12px; z-index: 500;
  background: var(--lv-yellow-bg); color: var(--lv-yellow); border: 1px solid var(--lv-yellow-line);
  padding: 3px 10px; border-radius: 6px; font-size: 12px; display: none; }
.map-panel.offline .map-offline-tag { display: block; }

/* 图表容器 */
.chart { width: 100%; height: 100%; min-height: 120px; }
.split-2 { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; height: 100%; }

/* —— 水量平衡面板（补充③）—— */
.wbal-bd { display: flex; flex-direction: column; gap: 6px; }
.wbal-chart { flex: 1; min-height: 96px; }
.wbal-store { display: flex; align-items: center; gap: 12px; padding: 4px 4px 2px; }
.wbal-ball { position: relative; width: 58px; height: 58px; flex: none; border-radius: 50%;
  border: 1px solid rgba(77,163,255,0.5); overflow: hidden; background: rgba(10,18,32,0.9);
  display: grid; place-items: center; box-shadow: inset 0 0 12px rgba(58,155,255,0.25); }
.wbal-ball.warn { border-color: rgba(255,152,56,0.6); box-shadow: inset 0 0 12px rgba(255,152,56,0.28); }
.wbal-liq { position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
  background: linear-gradient(180deg, rgba(79,191,240,0.85), rgba(47,151,224,0.95)); transition: height .5s ease; }
.wbal-ball.warn .wbal-liq { background: linear-gradient(180deg, rgba(255,196,120,0.85), rgba(255,152,56,0.95)); }
.wbal-ball b { position: relative; z-index: 1; font-size: 13px; font-weight: 800; color: #eaf3ff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7); font-variant-numeric: tabular-nums; }
.wbal-rows { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wbal-total { font-size: 11px; color: var(--ink-2); }
.wbal-total b { color: var(--accent); font-variant-numeric: tabular-nums; }
.wbal-total .wbal-cap { color: var(--ink-3); }
.wbal-bar { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); }
.wbal-bar > span { width: 58px; flex: none; }
.wbal-bar .bar { flex: 1; height: 7px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.wbal-bar .bar em { display: block; height: 100%; width: 0; background: var(--lv-blue); border-radius: 4px; }
.wbal-bar.hist .bar em { background: var(--ink-3); }
.wbal-bar b { width: 42px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-1); }
.wbal-status { font-size: 11px; margin-top: 1px; }
.wbal-status.ok { color: var(--lv-blue); }
.wbal-status.warn { color: var(--lv-orange); }

/* 对比·无调蓄 小按钮（面板头，chip 尺寸再收紧一档） */
.wbal-cmp-btn { padding: 1px 8px; font-size: 11px; flex: none; }
.wbal-cmp-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* —— 海绵余量表盘（S1 状态演算，调蓄水球下方紧凑块）—— */
.sponge-box { border-top: 1px dashed var(--line); padding: 5px 4px 2px; }
.sp-main { display: flex; align-items: baseline; gap: 6px; font-size: 11px; color: var(--ink-2); }
.sp-main .sp-k { font-weight: 600; color: var(--ink-1); }
.sp-main b { font-size: 17px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.sp-main .sp-u { color: var(--ink-3); }
.sp-main .sp-wm3 { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sp-zones { display: flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.sp-zone { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--ink-2); }
.sp-zone .zn { width: 30px; flex: none; }
.sp-zone .bar { flex: 1; height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.sp-zone .bar em { display: block; height: 100%; border-radius: 3px; transition: width .4s ease; }
.sp-zone b { width: 78px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-1); flex: none; }
.sp-note { font-size: 9px; color: var(--ink-3); margin-top: 3px; letter-spacing: 0.2px; }

/* —— 决策卡面板（区内决策/市级协调/增援请求 三权限口径）—— */
.decision-list { display: flex; flex-direction: column; gap: 5px; }
.dc-card { padding: 5px 8px; border-radius: 6px; background: var(--bg-elevated);
  border: 1px solid var(--line); border-left: 3px solid var(--accent); font-size: 12px; }
.dc-card.dc-city { border-left-color: var(--lv-orange); border-color: rgba(255,152,56,0.35); }
.dc-card.dc-aid { border-left-color: var(--lv-red); border-color: rgba(255,85,102,0.4); }
.dc-hd { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dc-auth { flex: none; font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: 4px;
  background: var(--accent-dim); color: var(--accent); white-space: nowrap; }
.dc-city .dc-auth { background: rgba(255,152,56,0.18); color: var(--lv-orange); }
.dc-aid .dc-auth { background: rgba(255,85,102,0.18); color: var(--lv-red); }
.dc-act { flex: 1; min-width: 0; font-weight: 600; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-basis { font-size: 10px; color: var(--ink-3); margin-top: 2px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-items { font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.dc-items b { color: var(--lv-red); font-variant-numeric: tabular-nums; }

/* —— 韧性推演按钮 + 覆盖层 —— */
.ladder-btn, .js-ladder-open { flex: none; white-space: nowrap; cursor: pointer;
  background: var(--bg-elevated); color: var(--ink-1); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 5px 10px; font-size: 12px; }
.ladder-btn:hover, .js-ladder-open:hover { border-color: var(--accent); color: var(--accent); }
/* 窄屏顶栏减负：隐藏系统全称、压缩情景选择与时间轴，保证右侧按钮不出视口 */
@media (max-width: 1680px) {
  .brand .full { display: none; }
  .play-ctrl select { max-width: 150px; }
  .timeline { min-width: 170px; }
  .level-banner { max-width: 300px; }
}
.ladder-mask { position: fixed; inset: 0; background: var(--bg-scrim); z-index: 1200;
  display: none; align-items: center; justify-content: center; }
.ladder-mask.open { display: flex; }
.ladder-modal { width: 900px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--bg-panel); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); }
.ladder-hd { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); flex: none; }
.ladder-hd .title { font-size: 15px; font-weight: 700; }
.ladder-hd .sub { font-size: 11px; color: var(--ink-3); }
.ladder-hd .spacer { flex: 1; }
.ladder-x { cursor: pointer; color: var(--ink-3); font-size: 22px; line-height: 1; }
.ladder-x:hover { color: var(--ink-1); }
.ladder-bd { padding: 14px 16px; overflow: auto; }
.ladder-conclusion { font-size: 13px; font-weight: 600; color: var(--lv-yellow);
  background: var(--lv-yellow-bg); border: 1px solid var(--lv-yellow-line);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.ladder-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.ladder-table th, .ladder-table td { white-space: nowrap; font-size: 12px; }
.ladder-table td.tier-nm { font-weight: 600; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.ladder-table td.tier-nm .mm { color: var(--accent); font-weight: 800; margin-right: 6px; }
.ladder-table td.tier-nm .ds { color: var(--ink-3); font-weight: 400; font-size: 11px; }
.ladder-chart { height: 170px; margin-top: 12px; }
.ladder-note { font-size: 11px; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
/* ④ 当前运行情景对应档位行：底色 + 左侧竖条 */
.ladder-table tr.cur td { background: rgba(53,198,230,0.10); }
.ladder-table tr.cur td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ③ V3 发布明细弹层（复用 ladder modal 骨架） */
.pub-modal { width: 760px; }
.pub-modal .ladder-table td { font-variant-numeric: tabular-nums; }
.pub-modal tr.muted td { color: var(--ink-3); }
.pub-modal-foot { margin-top: 10px; font-size: 12px; text-align: right; }
.pub-modal-foot a { color: var(--accent); text-decoration: none; }
.pub-modal-foot a:hover { text-decoration: underline; }

/* ⑤ 决策卡面板：标题栏链接 + 资源一本账摘要行 */
.panel-hd .hd-link { font-size: 11px; color: var(--accent); text-decoration: none;
  margin-left: 8px; white-space: nowrap; flex: none; }
.panel-hd .hd-link:hover { text-decoration: underline; }
.dc-res-summary { padding: 5px 8px; border-radius: 6px; border: 1px dashed var(--line-strong);
  font-size: 11px; color: var(--ink-2); cursor: pointer; display: flex; align-items: center;
  gap: 3px; flex-wrap: wrap; }
.dc-res-summary b { color: var(--accent); font-variant-numeric: tabular-nums; }
.dc-res-summary b.warn { color: var(--lv-orange); }
.dc-res-summary .arr { margin-left: auto; color: var(--accent); }
.dc-res-summary:hover { border-color: var(--accent); }
.gauge-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; height: 100%; }
.gauge-cell { display: flex; flex-direction: column; min-height: 0; }
.gauge-cell .g { flex: 1; min-height: 90px; }
.gauge-cell .adv { font-size: 10px; color: var(--ink-3); text-align: center; line-height: 1.3;
  max-height: 2.6em; overflow: hidden; }

/* TOP10 表 */
.top10 td.rank { color: var(--ink-3); width: 22px; }
.top10 td.score { font-weight: 700; }
.top10 .nm { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 预警卡片流 */
.alert-flow { display: flex; flex-direction: column; gap: 8px; }
.alert-card { background: var(--bg-elevated); border: 1px solid var(--line); border-left: 3px solid;
  border-radius: 8px; padding: 8px 10px; }
.alert-card.acked { opacity: 0.6; }
.ac-hd { display: flex; align-items: center; gap: 8px; }
.ac-title { font-weight: 600; font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-time { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ac-body { font-size: 12px; color: var(--ink-2); margin-top: 4px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ac-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.ac-foot .btn { margin-left: auto; padding: 3px 8px; font-size: 11px; }

/* 叫应滚动 */
.callout-list { display: flex; flex-direction: column; gap: 6px; }
.callout-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
  background: var(--bg-elevated); border: 1px solid var(--line); font-size: 12px; }
.callout-item .role { color: var(--accent); font-weight: 600; white-space: nowrap; }
.callout-item .pt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.callout-item .dl { color: var(--lv-orange); white-space: nowrap; }
.callout-item .st { font-size: 10px; padding: 1px 6px; border-radius: 4px; }
.st.pending { background: rgba(255,152,56,0.16); color: var(--lv-orange); }
.st.doing { background: rgba(58,155,255,0.16); color: var(--lv-blue); }
.st.done { background: rgba(87,217,163,0.16); color: #57d9a3; }

/* —— Leaflet 主题化 —— */
.leaflet-container { background: #0d1420; font-family: var(--font); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #131a2b; color: var(--ink-1);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line-strong); }
.leaflet-popup-content { margin: 10px 12px; }
.leaflet-control-zoom a { background: #131a2b; color: var(--ink-1); border-color: var(--line); }
.leaflet-control-zoom a:hover { background: var(--bg-hover); }
.leaflet-control-attribution { background: rgba(10,14,23,0.7) !important; color: var(--ink-3) !important; }
.nn-tip, .leaflet-tooltip { background: #131a2b; color: var(--ink-1); border: 1px solid var(--line-strong); box-shadow: none; }
.leaflet-tooltip-top:before, .leaflet-tooltip-bottom:before { border-top-color: #131a2b; }
/* 行政区常显区名标签：纯文字水印样式，绝不拦截鼠标 */
.nn-district-label { background: transparent; border: none; box-shadow: none;
  color: rgba(160,180,210,0.55); font-size: 11px; letter-spacing: 3px;
  pointer-events: none !important; }
.nn-district-label:before { display: none; }

.nn-pop .pop-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.nn-pop .pop-hd b { font-size: 14px; }
.nn-pop .pop-meta { font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.nn-pop .pf-title { font-size: 11px; color: var(--ink-3); margin: 4px 0 2px; }
.nn-pop .pf-row { display: flex; align-items: center; gap: 6px; font-size: 11px; margin: 2px 0; }
.nn-pop .pf-row span:first-child { width: 60px; color: var(--ink-2); }
.nn-pop .pf-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.nn-pop .pf-bar i { display: block; height: 100%; background: var(--accent); }
.nn-pop .pf-row b { width: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.nn-pop .pop-rules { margin: 6px 0 0; padding-left: 16px; font-size: 11px; color: var(--ink-2); list-style: disc; }
.nn-pop .pop-rules li { margin: 2px 0; }
.nn-pop .pop-foot { font-size: 10px; color: var(--ink-3); margin-top: 6px; }

.mk-pg { width: 16px; height: 16px; border: 1.5px solid; border-radius: 4px; background: rgba(19,26,43,0.9);
  font-size: 9px; display: grid; place-items: center; font-weight: 700; }
.mk-res { display: flex; align-items: center; gap: 3px; padding: 1px 5px; border: 1.5px solid; border-radius: 5px;
  background: rgba(19,26,43,0.92); font-size: 10px; white-space: nowrap; }
.mk-res b { font-variant-numeric: tabular-nums; }
.mk-res-name { color: var(--ink-2); }

.nn-layerctrl { background: rgba(16,22,36,0.94); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; color: var(--ink-1); box-shadow: var(--shadow); }
.nn-layerctrl .lc-hd { font-size: 11px; color: var(--ink-3); margin-bottom: 5px; }
.nn-layerctrl .lc-row { display: flex; align-items: center; gap: 6px; margin: 3px 0; cursor: pointer; }
.nn-layerctrl .lc-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.nn-layerctrl input { accent-color: var(--accent); }

/* Toast */
.nn-toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: #131a2b; border: 1px solid var(--line-strong); color: var(--ink-1); padding: 10px 18px;
  border-radius: 8px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .25s; z-index: 9999; }
.nn-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* —— 分灾种四色胶囊（雨/涝/山洪/地灾）—— */
.hazard-caps { display: flex; gap: 6px; flex: none; }
.hz-cap { display: flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 7px;
  border: 1px solid var(--cl); background: var(--cbg); white-space: nowrap; }
.hz-cap .hzc-k { font-size: 12px; font-weight: 700; color: var(--c); }
.hz-cap .hzc-v { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.hz-cap.lv-red { animation: pulse-red 2s infinite; }

/* —— 2D/三维切换 —— */
.view-toggle { display: flex; gap: 2px; background: var(--bg-elevated); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 2px; flex: none; }
.vt-btn { padding: 4px 10px; border: none; border-radius: 6px; background: transparent; color: var(--ink-2);
  font-size: 12px; font-weight: 600; }
.vt-btn.active { background: var(--accent); color: var(--ink-invert); }

/* —— 三维地图容器 —— */
.map3d { position: absolute; inset: 40px 0 0 0; display: none; border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden; }
.map3d canvas { outline: none; }
.map3d-hint { position: absolute; left: 50%; top: 55%; transform: translateX(-50%); z-index: 600;
  background: var(--lv-yellow-bg); color: var(--lv-yellow); border: 1px solid var(--lv-yellow-line);
  padding: 8px 14px; border-radius: 8px; font-size: 13px; display: none; max-width: 70%; text-align: center; }
.map3d-hint.show { display: block; }
.maplibregl-ctrl-group { background: #131a2b !important; }
.maplibregl-ctrl-group button { background: #131a2b !important; }

/* —— 天地图深色化：对明底图瓦片做反相暗化，与深色命令中心一致（补充①）——
   仅作用于底图/注记瓦片 pane，不影响矢量/标记/色斑等叠加层。 */
.tdt-dark-map .tdt-dark { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.9) saturate(0.86); }

/* —— 内涝范围色斑（补充②）：柔性径向渐变 + 高斯模糊，screen 混合呈水体辉光 —— */
.mk-inun { border-radius: 50%; pointer-events: none; filter: blur(3px); mix-blend-mode: screen; }

/* —— 智能体定位脉冲高亮（补充：输入定位点位）—— */
.mk-locate { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid #ffe066;
  box-shadow: 0 0 14px 3px rgba(255,224,102,0.85); animation: hd-locate-pulse 1.05s ease-out infinite; }
@keyframes hd-locate-pulse {
  0% { transform: scale(0.45); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* —— 六型点位图标 —— */
.mk-pt { display: grid; place-items: center; border: 2px solid; border-radius: 50%;
  font-size: 10px; font-weight: 700; box-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.mk-metro { width: 18px; height: 18px; display: grid; place-items: center; border: 1.6px solid;
  border-radius: 4px; background: rgba(19,26,43,0.92); font-size: 10px; font-weight: 800; position: relative; }
.mk-metro .cut { position: absolute; top: -8px; right: -10px; font-size: 8px; font-style: normal;
  background: var(--lv-red); color: #fff; padding: 0 3px; border-radius: 3px; }
.mk-elder { width: 18px; height: 18px; display: grid; place-items: center; border: 1.6px solid;
  border-radius: 5px; background: rgba(19,26,43,0.92); font-size: 10px; font-weight: 800; }
.mk-elder.hi { box-shadow: 0 0 7px rgba(255,126,168,0.85); }
.mk-cam { color: #57d9a3; font-size: 13px; text-shadow: 0 0 5px rgba(0,0,0,0.6); }
.mk-geo { font-size: 11px; text-shadow: 0 0 4px rgba(0,0,0,0.6); }
.hd-street-label { background: transparent; border: none; box-shadow: none;
  color: rgba(160,180,210,0.5); font-size: 11px; letter-spacing: 2px; pointer-events: none !important; }
.hd-street-label:before { display: none; }

/* —— 点位弹窗 —— */
.hd-pop .pop-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.hd-pop .pop-hd b { font-size: 14px; }
.hd-pop .pop-meta { font-size: 12px; color: var(--ink-2); margin-bottom: 6px; line-height: 1.5; }
.hd-pop .pop-inun { font-size: 12px; color: var(--lv-blue); background: var(--lv-blue-bg);
  border: 1px solid var(--lv-blue-line); border-radius: 6px; padding: 3px 8px; margin-bottom: 6px; }
.hd-pop .pf-title { font-size: 11px; color: var(--ink-3); margin: 4px 0 2px; }
.hd-pop .pf-row { display: flex; align-items: center; gap: 6px; font-size: 11px; margin: 2px 0; }
.hd-pop .pf-row span:first-child { width: 66px; color: var(--ink-2); }
.hd-pop .pf-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.hd-pop .pf-bar i { display: block; height: 100%; background: var(--accent); }
.hd-pop .pf-row b { width: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.hd-pop .pop-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; flex-wrap: wrap; }
.hd-pop .pop-btn { padding: 3px 8px; border-radius: 6px; background: var(--accent-dim); color: var(--accent);
  border: 1px solid var(--accent); font-size: 11px; }
.hd-pop .pop-src { color: var(--ink-3); margin-left: auto; }
.pub-badge { padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.pub-issued { background: rgba(58,155,255,0.18); color: var(--lv-blue); }
.pub-updated { background: rgba(255,152,56,0.18); color: var(--lv-orange); }
.pub-cancelled { background: rgba(107,120,144,0.2); color: var(--ink-3); }

/* —— 图层控件 —— */
.hd-layerctrl { background: rgba(16,22,36,0.94); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; color: var(--ink-1); box-shadow: var(--shadow); }
.hd-layerctrl .lc-hd { font-size: 11px; color: var(--ink-3); margin-bottom: 5px; }
.hd-layerctrl .lc-row { display: flex; align-items: center; gap: 6px; margin: 3px 0; cursor: pointer; }
.hd-layerctrl .lc-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.hd-layerctrl input { accent-color: var(--accent); }

/* —— Leaflet 主题化 —— */
.leaflet-container { background: #0d1420; font-family: var(--font); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #131a2b; color: var(--ink-1);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line-strong); }
.leaflet-popup-content { margin: 10px 12px; }
.leaflet-control-zoom a { background: #131a2b; color: var(--ink-1); border-color: var(--line); }
.leaflet-control-attribution { background: rgba(10,14,23,0.7) !important; color: var(--ink-3) !important; }
.leaflet-tooltip { background: #131a2b; color: var(--ink-1); border: 1px solid var(--line-strong); box-shadow: none; }

/* —— 分灾种预警标签 —— */
.hz-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.hz-rain { background: rgba(58,155,255,0.18); color: var(--lv-blue); }
.hz-flood { background: rgba(53,198,230,0.18); color: var(--accent); }
.hz-mountain { background: rgba(255,152,56,0.18); color: var(--lv-orange); }
.hz-geo { background: rgba(155,140,255,0.18); color: var(--synthetic); }

/* —— 预警卡片流 —— */
.alert-flow { display: flex; flex-direction: column; gap: 8px; }
.alert-card { background: var(--bg-elevated); border: 1px solid var(--line); border-left: 3px solid;
  border-radius: 8px; padding: 8px 10px; }
.alert-card.acked { opacity: 0.6; }
.ac-hd { display: flex; align-items: center; gap: 6px; }
.ac-title { font-weight: 600; font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-time { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ac-body { font-size: 12px; color: var(--ink-2); margin-top: 4px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ac-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.ac-foot .btn { margin-left: auto; padding: 3px 8px; font-size: 11px; }

/* —— TOP10 —— */
.top10 td.rank { color: var(--ink-3); width: 20px; }
.top10 .nm { max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top10 td.score, .top10 td.dc { font-weight: 700; font-size: 12px; }

/* —— 山洪街镇 —— */
.mnt-list { display: flex; flex-direction: column; gap: 6px; }
.mnt-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mnt-item .mn { width: 62px; color: var(--ink-2); white-space: nowrap; }
.mnt-item .bar { flex: 1; height: 7px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.mnt-item .bar i { display: block; height: 100%; }
.mnt-item b { width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.mnt-item .lv-tag { font-size: 11px; width: 30px; }

/* —— 熔断滚动列 —— */
.cutoff-list { display: flex; flex-direction: column; gap: 5px; }
.cutoff-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px;
  background: var(--bg-elevated); border: 1px solid var(--line); border-left: 3px solid var(--lv-red); font-size: 12px; }
.cutoff-item .ct-act { color: var(--lv-red); font-weight: 700; white-space: nowrap; }
.cutoff-item .ct-nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cutoff-item .ct-ty { color: var(--ink-3); font-size: 11px; white-space: nowrap; }

/* —— 预测发布 · 导航联动（V3）面板 —— */
.p-pub .pub-note { max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-pub .sub .pc { padding: 1px 6px; border-radius: 4px; margin-left: 2px; cursor: pointer; }
.p-pub .sub .pc:hover { filter: brightness(1.25); text-decoration: underline; }
.pc-issued { background: rgba(58,155,255,0.18); color: var(--lv-blue); }
.pc-updated { background: rgba(255,152,56,0.18); color: var(--lv-orange); }
.pc-cancelled { background: rgba(107,120,144,0.2); color: var(--ink-3); }
.publish-list { display: flex; flex-direction: column; gap: 5px; }
.publish-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px;
  background: var(--bg-elevated); border: 1px solid var(--line); font-size: 12px; }
.publish-item .pi-st { font-weight: 700; white-space: nowrap; }
.publish-item.pub-issued .pi-st { color: var(--lv-blue); }
.publish-item.pub-updated .pi-st { color: var(--lv-orange); }
.publish-item.pub-cancelled { opacity: 0.6; }
.publish-item.pub-cancelled .pi-st { color: var(--ink-3); }
.publish-item .pi-nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publish-item .pi-dc { color: var(--ink-3); font-size: 11px; white-space: nowrap; }

/* 右列面板：弹性分配 + 内部滚动，避免任一面板撑破总高 */
.col-right > .p-decision { flex: 1.05; }
.col-right > .p-alerts { flex: 1.25; }
.col-right > .p-top10 { flex: 1.3; }
.col-right > .p-mnt { flex: 0.9; }
.col-right > .p-cut { flex: 1; }
.col-right > .p-pub { flex: 1; }

/* Toast */
.nn-toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: #131a2b; border: 1px solid var(--line-strong); color: var(--ink-1); padding: 10px 18px;
  border-radius: 8px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .25s; z-index: 9999; }
.nn-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* —— 窄视口分级降级（置于文件末尾：同优先级下必须晚于各基础规则才能生效）——
   先收系统全称，再收分灾种胶囊文字/倍速组与状态胶囊，保住横幅/播放/时间轴/时钟/2D三维 */
@media (max-width: 1600px) {
  .brand .full { display: none; }
  .level-banner { max-width: 300px; }
}
@media (max-width: 1440px) {
  .status-pill { display: none; }
  .play-ctrl select { max-width: 150px; }
}
@media (max-width: 1360px) {
  .speed-group { display: none; }
  .timeline { min-width: 160px; }
  .hazard-caps .hzc-k { display: none; }
}

/* —— 智能体语音（麦克风/播报）—— */
.agent-mic, .agent-spk { flex: none; cursor: pointer; font-size: 14px; padding: 5px 8px;
  background: var(--bg-elevated); border: 1px solid var(--line-strong); border-radius: 6px; }
.agent-mic.rec { background: var(--lv-red); border-color: var(--lv-red); animation: pulse-red 1.2s infinite; }
