:root{
  --bg:#0A1220; --bg2:#0F1C2B; --brand:#00C8FF; --magenta:#FF2D72;
  --ok:#2ED47A; --warn:#FFCC00; --err:#FF5A52;
  --text:#CFE9FF; --muted:#8FB6D1; --line: rgba(0,200,255,.25);
  --panel-radius:18px; --shadow: 0 8px 24px rgba(0,0,0,.35);
  --topbar-h:56px; --pad:18px;
}
*{box-sizing:border-box;-webkit-user-select:text;user-select:text}
html,body{height:100%}
body{
  margin:0;color:var(--text);
  background:
    radial-gradient(1200px 800px at 15% -10%, #15263E 0%, #0A1220 55%),
    radial-gradient(900px 600px at 110% 30%, rgba(0,200,255,.08), transparent 60%),
    #0A1220;
  font:14px/1.6 Inter,system-ui,PingFang SC,Arial;
}
.topbar{
  height:var(--topbar-h);
  display:flex;align-items:center;justify-content:space-between;
  padding:0 var(--pad);
  border-bottom:1px solid var(--line);
  background:rgba(10,18,32,.78);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  position:sticky;top:0;z-index:10;
}
.brand .logo{display:inline-block;width:20px;height:20px;border:2px solid var(--brand);border-radius:50%;margin-right:8px;box-shadow:0 0 14px rgba(0,200,255,.5)}
.brand .title{font-weight:800;letter-spacing:.8px;margin-right:12px}
.brand .subtitle{color:var(--muted)}
.nav .nav-btn{
  background:transparent;border:1px solid transparent;color:var(--text);
  padding:8px 12px;border-radius:10px;cursor:pointer;margin-left:6px
}
.nav .nav-btn:hover{border-color:var(--line)}
.nav .nav-btn.active{background:rgba(0,200,255,.12);border-color:var(--brand);color:#fff}

.page{
  padding:var(--pad);
  height:calc(100vh - var(--topbar-h));
  overflow:hidden; /* 关键：外层不滚动 */
}
.grid-situation{
  height:100%;
  display:grid;
  grid-template-columns: 1.65fr 1fr;
  gap:16px;
}

/* 两边是“轨道”，各自内部滚动 */
.rail{height:100%;min-height:0;display:flex;flex-direction:column}
.left-rail .map-card{flex:1 1 auto;min-height:0}
.right-rail .scroll{flex:1 1 auto;min-height:0;overflow:auto;padding-right:6px;display:flex;flex-direction:column;gap:16px}

/* 卡片与视觉 */
.card{
  background:
    linear-gradient(180deg, rgba(17,30,48,.6), rgba(10,18,32,.82));
  border:1px solid var(--line);
  border-radius:var(--panel-radius);
  box-shadow:var(--shadow);
  padding:12px;
}
.card h3{margin:0 0 8px 2px;font-size:14px;color:#DFF3FF;letter-spacing:.5px}

/* 地图填满左侧 */
.map-card{position:relative}
#map{width:100%;height:100%;min-height:420px;border-radius:var(--panel-radius)}
.layer-toggle{
  position:absolute;top:12px;left:12px;
  background:rgba(0,0,0,.35);
  padding:8px 10px;border-radius:10px;border:1px solid var(--line)
}

/* KPI */
.kpis .kpi-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.kpi{
  background:rgba(0,200,255,.06);
  border:1px dashed var(--line);
  border-radius:12px;padding:10px
}
.kpi-label{color:var(--muted);font-size:12px}
.kpi-num{
  font-size:26px;font-weight:800;margin-top:2px;
  background:linear-gradient(90deg,#9FE8FF, #00C8FF 60%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.spark{height:8px;background:rgba(255,255,255,.08);border-radius:6px;margin-top:6px;overflow:hidden}
.sparkline{height:8px;width:0;background:linear-gradient(90deg, var(--brand), var(--magenta));transition:width .3s}

/* 任务卡 */
.tasks .tasks-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.task-card{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:10px}
.task-title{color:var(--muted)}
.task-num{font-size:24px;font-weight:700;margin:4px 0 6px}
.progress{height:6px;background:rgba(255,255,255,.1);border-radius:4px;overflow:hidden}
.progress .bar{height:6px;background:var(--brand);transition:width .3s}
.progress .bar.warning{background:var(--warn)}

/* 告警流列表在右侧独立滚动容器中，不再把整页拉长 */
.alerts .alert-list{display:flex;flex-direction:column;gap:8px}
.alert{
  display:flex;align-items:center;gap:10px;padding:8px;border-radius:10px;
  background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08);
  cursor:pointer
}
.dot{width:8px;height:8px;border-radius:10px;box-shadow:0 0 10px rgba(255,255,255,.25)}
.dot.ok{background:var(--ok)} .dot.warn{background:var(--warn)} .dot.err{background:var(--err)}

/* 视频缩略 */
.videos .thumbs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.thumb{background:rgba(0,0,0,.35);border:1px dashed var(--line);border-radius:12px;display:flex;align-items:center;justify-content:center;height:70px;cursor:pointer}
.thumb:hover{outline:1px solid var(--brand)}

/* 占位与抽屉 */
.placeholder{height:60vh;display:flex;align-items:center;justify-content:center;border:2px dashed rgba(255,255,255,.15);border-radius:18px;color:var(--muted)}
.drawer{position:fixed;right:0;top:0;height:100%;width:440px;background:rgba(13,22,34,.98);border-left:1px solid var(--line);box-shadow:-16px 0 40px rgba(0,0,0,.4);transform:translateX(100%);transition:transform .2s;z-index:30;-webkit-backdrop-filter: blur(6px);backdrop-filter: blur(6px)}
.drawer:not(.hidden){transform:translateX(0)}
.drawer-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line)}
.drawer-title{font-weight:800}
.drawer-body{padding:12px 14px}

/* ===== Radar mini widget ===== */
.radar-box{
  position:absolute; top:14px; right:14px; width:260px;
  background: rgba(12,22,36,.72);
  border:1px solid var(--line);
  border-radius:14px; padding:10px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  pointer-events:auto;
}
.radar-title{font-weight:700;font-size:13px;color:#DFF3FF;margin:0 0 6px 2px;letter-spacing:.5px}
#radar-canvas{display:block;width:100%;height:200px;border-radius:10px}
/* --- overlay fix for radar & layer-toggle --- */
.map-card{ position: relative; }          /* 建立定位上下文 */
#map{ position: relative; z-index: 1; }   /* 地图在底层 */
.radar-box{ z-index: 1002; }              /* 雷达小框在上面 */
.layer-toggle{ z-index: 1003; }           /* 图层开关再上面一点 */
/* ===== 科幻视觉增强 ===== */

/* 顶栏：深蓝渐变 + 流光扫过 */
.topbar{
  background:
    linear-gradient(135deg, rgba(0,35,68,.85) 0%, rgba(9,22,38,.85) 60%),
    rgba(10,18,32,.78);
  position: sticky; top: 0;
  overflow: hidden;
}
.topbar:after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(120deg, transparent 40%, rgba(0,200,255,.18) 50%, transparent 60%);
  transform: translateX(-120%);
  animation: sweep 6s linear infinite;
}
@keyframes sweep{ 0%{transform:translateX(-120%)} 100%{transform:translateX(120%)} }

/* 右列滚动条更干净 */
.right-rail .scroll{ scrollbar-width: thin; scrollbar-color: rgba(0,200,255,.35) rgba(255,255,255,.04); }
.right-rail .scroll::-webkit-scrollbar{ width:8px }
.right-rail .scroll::-webkit-scrollbar-thumb{ background:rgba(0,200,255,.35); border-radius:10px }
.right-rail .scroll::-webkit-scrollbar-track{ background:rgba(255,255,255,.04); border-radius:10px }

/* 鼠标悬停微光 */
.card:hover{ box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 0 1px rgba(0,200,255,.15) inset; }

/* KPI 进度条轻微发光 */
.sparkline{ box-shadow: 0 0 12px rgba(0,200,255,.25) inset }

/* 告警 severity 小药丸 */
.alert .pill{ padding:2px 6px;border-radius:8px;margin-left:8px;font-size:12px;opacity:.9 }
.pill.ok{ background: rgba(46,212,122,.18); color:#8FF5C2; }
.pill.warn{ background: rgba(255,204,0,.18); color:#FFE37A; }
.pill.err{ background: rgba(255,90,82,.18); color:#FF9A94; }

/* 地图科幻扫线（不加 DOM，直接伪元素覆盖） */
.map-card{ position:relative }
.map-card:after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.035), rgba(255,255,255,.035) 2px,
    transparent 2px, transparent 4px
  );
  mix-blend-mode: screen; opacity:.18;
}

/* 让雷达与图层开关浮在地图上方 */
#map{ position:relative; z-index:1; background:#0A1422 }
.radar-box{ z-index:1002 }
.layer-toggle{ z-index:1003 }

/* 全屏演示模式：隐藏顶栏、扩大画布 */
body.fullscreen .topbar{ display:none }
body.fullscreen .page{ height:100vh; padding-top:0 }
/* ===== 通用面板 & 表格 & 卡片 ===== */
.tab{ height:100%; overflow:auto; }
.panel{ background:linear-gradient(180deg, rgba(17,30,48,.6), rgba(10,18,32,.82)); border:1px solid var(--line); border-radius:var(--panel-radius); padding:12px; box-shadow:var(--shadow); }
.toolbar{ display:flex; gap:8px; margin-bottom:10px }
.toolbar select,.toolbar input{ background:rgba(0,0,0,.25); border:1px solid var(--line); color:var(--text); border-radius:8px; padding:6px 10px; outline:none }
.table .row{ display:grid; grid-template-columns: 160px 80px 90px 1fr 70px 90px 60px; gap:8px; padding:8px; border-bottom:1px solid rgba(255,255,255,.06); align-items:center }
.table .head{ color:#8FB6D1; font-weight:700 }
.badge{ padding:2px 8px; border-radius:10px; font-size:12px; border:1px solid rgba(255,255,255,.15) }
.badge.p0{ color:#fff; background:linear-gradient(90deg,#ff5a52,#ff9a52) }
.badge.p1{ color:#111; background:#FFD84A }
.badge.p2{ color:#111; background:#9FE8FF }
.pill.ok{ background: rgba(46,212,122,.18); color:#8FF5C2; padding:2px 6px;border-radius:8px }
.pill.warn{ background: rgba(255,204,0,.18); color:#FFE37A; padding:2px 6px;border-radius:8px }
.pill.err{ background: rgba(255,90,82,.18); color:#FF9A94; padding:2px 6px;border-radius:8px }
.meter{ height:8px; background:rgba(255,255,255,.08); border-radius:6px; overflow:hidden }
.meter > i{ display:block; height:8px; background:linear-gradient(90deg,var(--brand),#ff2d72); width:var(--w,0%) }

/* 编队卡 */
.cards{ display:grid; grid-template-columns: repeat(4, 1fr); gap:10px }
.asset{ background:rgba(255,255,255,.02); border:1px solid rgba(255,255,255,.08); border-radius:12px; padding:10px }
.asset .top{ display:flex; justify-content:space-between; align-items:center; margin-bottom:6px }
.asset .name{ font-weight:700 }
.asset .type{ color:#8FB6D1 }
.asset .line{ display:grid; grid-template-columns:70px 1fr 42px; gap:6px; align-items:center; font-size:12px; color:#8FB6D1 }
.asset .value{text-align:right; color:#DFF3FF}

/* 统计条 */
.stats{ display:flex; gap:12px; margin-bottom:10px }
.stat{ background:rgba(0,0,0,.25); border:1px solid var(--line); border-radius:10px; padding:8px 12px }
.stat b{ font-size:18px }

/* 覆盖页 */
.legend{ display:flex; align-items:center; gap:8px; margin-bottom:10px }
.legend i{ width:18px; height:10px; border-radius:4px; display:inline-block; background:var(--c, #2ed47a); box-shadow:0 0 10px rgba(0,0,0,.25) }

/* 生态/分析布局 */
.grid-eco{ display:grid; grid-template-columns: repeat(4, 1fr); gap:10px }
.eco{ background:rgba(255,255,255,.02); border:1px solid rgba(255,255,255,.08); border-radius:12px; padding:10px }
.eco h4{ margin:0 0 6px; color:#DFF3FF }
.kv{ display:grid; grid-template-columns: 1fr 1fr; gap:6px }
.k{ color:#8FB6D1 }
.v{ text-align:right }
.tiny{ height:6px; background:rgba(255,255,255,.1); border-radius:4px; overflow:hidden }
.tiny > i{ display:block; height:6px; width:0; background:linear-gradient(90deg,var(--brand),#ff2d72) }

.grid-rep{ display:grid; grid-template-columns: repeat(2, 1fr); gap:12px }

/* 应急 */
.emerg .res{ display:flex; gap:10px; margin-bottom:10px }
.block{ background:rgba(0,0,0,.25); border:1px solid var(--line); border-radius:10px; padding:8px 12px }
/* Tabs 显隐控制 */
.tab{ display:none; }
.tab.active{ display:block; }
.layer-toggle label{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 8px; border-radius:8px; background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08); cursor:pointer; user-select:none;
}
.layer-toggle input{ accent-color: var(--brand,#00C8FF); transform:scale(1.05); }
.layer-toggle label:hover{ background:rgba(0,200,255,.08); }
#region-box{
  position:absolute; right:12px; top:12px;
  background:rgba(10,18,32,.7); border:1px solid rgba(255,255,255,.12);
  color:#DFF3FF; border-radius:10px; padding:6px 10px; z-index:1005; backdrop-filter: blur(6px);
}
#region-box select{ background:rgba(0,0,0,.25); color:#DFF3FF; border:1px solid rgba(255,255,255,.18); border-radius:8px; padding:2px 8px; }

.drawer{ position:fixed; inset:0; background:rgba(0,0,0,.5); display:flex; align-items:center; justify-content:center; z-index:2000; }
.drawer.hidden{ display:none; }
.drawer-inner{ width:80vw; max-width:1100px; background:rgba(12,20,34,.92); border:1px solid rgba(255,255,255,.12); border-radius:14px; box-shadow:0 20px 60px rgba(0,0,0,.5); }
.drawer-hd{ display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-bottom:1px solid rgba(255,255,255,.1); }
.drawer-hd button{ background:transparent; border:1px solid rgba(255,255,255,.2); color:#DFF3FF; border-radius:8px; padding:2px 8px; cursor:pointer; }
.drawer-body{ padding:10px; }
.split2{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.split2 video{ width:100%; height:340px; background:#000; border:1px solid rgba(255,255,255,.12); border-radius:10px; }

#video-quickbar{
  position:fixed; right:14px; bottom:14px; display:flex; gap:8px; z-index:1500;
}
#video-quickbar button{
  padding:6px 10px; border-radius:10px; border:1px solid rgba(255,255,255,.18);
  background:linear-gradient(90deg,#00C8FF,#7A5CFF); color:white; font-weight:700; cursor:pointer;
}
/* 绘制航迹小工具条 */
.draw-toolbar{ position:absolute; left:12px; top:48px; display:flex; gap:6px; z-index:1006; }
.draw-toolbar button{ padding:4px 8px; background:rgba(10,18,32,.7); border:1px solid rgba(255,255,255,.18); color:#DFF3FF; border-radius:8px; cursor:pointer; }
.draw-toolbar button:hover{ background:rgba(0,200,255,.12); }

/* 视频抽屉 + 快捷栏（独立 ID，不与旧版冲突） */
#bnl-video-drawer{ position:fixed; inset:0; background:rgba(0,0,0,.5); display:flex; align-items:center; justify-content:center; z-index:2200; }
#bnl-video-drawer.hidden{ display:none; }
#bnl-video-drawer .inner{ width:80vw; max-width:1100px; background:rgba(12,20,34,.92); border:1px solid rgba(255,255,255,.12); border-radius:14px; box-shadow:0 20px 60px rgba(0,0,0,.5); }
#bnl-video-drawer .hd{ display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-bottom:1px solid rgba(255,255,255,.1); }
#bnl-video-drawer .hd button{ background:transparent; border:1px solid rgba(255,255,255,.2); color:#DFF3FF; border-radius:8px; padding:2px 8px; cursor:pointer; }
#bnl-video-drawer .bd{ padding:10px; }
#bnl-video-drawer .split2{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
#bnl-video-drawer video{ width:100%; height:340px; background:#000; border:1px solid rgba(255,255,255,.12); border-radius:10px; }

#bnl-video-bar{ position:fixed; right:14px; bottom:14px; display:flex; gap:8px; z-index:2100; }
#bnl-video-bar button{ padding:6px 10px; border-radius:10px; border:1px solid rgba(255,255,255,.18);
  background:linear-gradient(90deg,#00C8FF,#7A5CFF); color:white; font-weight:700; cursor:pointer; }
/* 轨迹美化：发光 + 退化动态虚线 */
.leaflet-overlay-pane svg .track-glow {
  filter: drop-shadow(0 0 6px rgba(39,232,194,.65))
          drop-shadow(0 0 14px rgba(39,232,194,.28));
}
.leaflet-overlay-pane svg .trk-anim {
  stroke-linecap: round;
  stroke: #27E8C2;
  stroke-width: 3px;
  stroke-dasharray: 12 8;
  animation: bnl-dash-move 2.2s linear infinite;
}
@keyframes bnl-dash-move { to { stroke-dashoffset: -220; } }

/* 绘制工具条（已有则覆盖） */
.draw-toolbar{ position:absolute; left:12px; top:48px; display:flex; gap:6px; z-index:1006; }
.draw-toolbar button{ padding:4px 8px; background:rgba(10,18,32,.7);
  border:1px solid rgba(255,255,255,.18); color:#DFF3FF; border-radius:8px; cursor:pointer; }
.draw-toolbar button:hover{ background:rgba(0,200,255,.12); }
/* 轨迹发光 + 退化动画 */
.leaflet-overlay-pane svg .track-glow{
  filter:drop-shadow(0 0 6px rgba(39,232,194,.65)) drop-shadow(0 0 14px rgba(39,232,194,.28));
}
.leaflet-overlay-pane svg .trk-anim{
  stroke:#27E8C2; stroke-width:3px; stroke-linecap:round; stroke-dasharray:12 8;
  animation:bnl-dash-move 2.2s linear infinite;
}
@keyframes bnl-dash-move{ to{ stroke-dashoffset:-220 } }

/* 走廊覆盖（网络覆盖开关控制显示） */
.leaflet-overlay-pane svg .corridor-shape{
  fill:rgba(0,200,255,.12); stroke:rgba(0,200,255,.35); stroke-dasharray:8 6;
}

/* 被航迹经过的网格高亮（网格开关控制显示） */
.leaflet-overlay-pane svg .grid-highlight{
  fill:rgba(0,224,255,.06); stroke:#00E0FF; stroke-width:2px;
  filter:drop-shadow(0 0 8px rgba(0,224,255,.45));
}

/* 绘制工具条（如果已存在会覆盖） */
.draw-toolbar{ position:absolute; left:12px; top:48px; display:flex; gap:6px; z-index:1006; }
.draw-toolbar button{ padding:4px 8px; background:rgba(10,18,32,.7);
  border:1px solid rgba(255,255,255,.18); color:#DFF3FF; border-radius:8px; cursor:pointer; }
.draw-toolbar button:hover{ background:rgba(0,200,255,.12) }
/* 顶置面板：把 layer-toggle 与 draw-toolbar 收纳在一起，自动换行 */
#ui-topdock{
  position:absolute; left:12px; top:12px; z-index:1100;
  display:flex; flex-wrap:wrap; gap:8px 8px; align-items:center;
  background:rgba(10,18,32,.72); border:1px solid rgba(255,255,255,.14);
  border-radius:12px; padding:8px 10px; backdrop-filter: blur(6px);
}

/* 移入顶置面板后，去掉两个子块的绝对定位与外框 */
#ui-topdock .layer-toggle,
#ui-topdock .draw-toolbar{
  position:static !important; background:transparent; border:none; box-shadow:none;
  padding:0; margin:0; display:flex; gap:8px; align-items:center;
}

/* 图层按钮美化（更紧凑，不挤） */
#ui-topdock .layer-toggle label{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 10px; border-radius:10px;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.12);
  color:#DFF3FF; font-size:13px;
}

/* 绘制按钮尺寸统一成“小药丸” */
#ui-topdock .draw-toolbar button{
  padding:4px 10px; border-radius:10px; font-size:13px;
  border:1px solid rgba(255,255,255,.18); color:#DFF3FF;
  background:rgba(0,200,255,.10);
}
#ui-topdock .draw-toolbar button:hover{ background:rgba(0,200,255,.18) }

/* 旧位置的样式保持，但放到顶置面板时被上面的规则覆盖 */
.draw-toolbar{ position:absolute; left:12px; top:48px; }
/* —— 防“残留”：凡是还停留在 .map-card 直系子级位置的旧条目一律隐藏 —— */
.map-card > .layer-toggle,
.map-card > .draw-toolbar,
.map-card > #planner-bar{ display:none !important; }

/* 顶置面板里的“真身”强制显示为行内 flex（盖掉上面的隐藏规则） */
#ui-topdock .layer-toggle,
#ui-topdock .draw-toolbar,
#ui-topdock #planner-bar{ display:flex !important; }
/* —— 品牌区样式 —— */
.topbar .brand{
  display:flex; align-items:center; gap:14px;
}
.topbar .brand-logo{
  height:28px; max-width:360px; object-fit:contain;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.35));
}
@media (min-width:1600px){
  .topbar .brand-logo{ height:34px }
}
.topbar .brand-cn{
  font-size:18px; font-weight:700; letter-spacing:2px;
  color:#E6F7FF;
  text-shadow: 0 0 12px rgba(0,200,255,.18), 0 0 2px rgba(0,0,0,.6);
  white-space:nowrap;
}
@media (min-width:1600px){
  .topbar .brand-cn{ font-size:20px; letter-spacing:2.5px; }
}
/* 保险：如果旧的英文标题残留，隐藏它 */
.topbar .title, .topbar .subtitle{ display:none !important; }
/* AIS 轨迹光晕 */
.leaflet-overlay-pane svg path[stroke="#27E8C2"]{
  filter: drop-shadow(0 0 6px rgba(39,232,194,.35));
}
:root{ --topbar-h:56px; }
.topbar{ position:sticky; top:0; z-index:2000; }
.topbar .nav{ height:var(--topbar-h); display:flex; align-items:center; }
.page{ padding-top:calc(var(--topbar-h) + 4px); }  /* 推开内容，不压住雷达 */
.grid-situation .right-rail .card:first-child{ margin-top:6px; } /* 雷达卡片顶部留白 */
/* 顶栏高度与内容上边距（防止压住右栏雷达卡） */
:root{ --topbar-h:56px; }
.topbar{ position:sticky; top:0; z-index:2000; }
.page{ padding-top:calc(var(--topbar-h) + 4px); }

/* 地图卡片裁剪内部绝对定位元素，防止越界到右侧雷达 */
.map-card{ position:relative; overflow:hidden; }

/* 顶置面板限制最大宽度 + 自动换行，始终留在地图内部 */
#ui-topdock{
  position:absolute; left:12px; top:12px; z-index:1100;
  display:flex; flex-wrap:wrap; gap:8px 8px; align-items:center;
  background:rgba(10,18,32,.72); border:1px solid rgba(255,255,255,.14);
  border-radius:12px; padding:8px 10px; backdrop-filter: blur(6px);
  max-width: min(640px, calc(100% - 24px));  /* 不会再伸到右侧 */
}
#ui-topdock .layer-toggle,
#ui-topdock .draw-toolbar,
#ui-topdock #planner-bar{ position:static !important; background:transparent; border:none; box-shadow:none; padding:0; margin:0; display:flex; gap:8px; align-items:center; }

/* 保险：仍在 .map-card 直系子级的“旧条目”隐藏（避免残留） */
.map-card > .layer-toggle,
.map-card > .draw-toolbar,
.map-card > #planner-bar{ display:none !important; }
/* 证据弹窗 */
#ev-modal{ position:fixed; right:18px; top:calc(var(--topbar-h) + 14px); z-index:2200;
  width:360px; background:rgba(10,18,32,.92); border:1px solid rgba(255,255,255,.15);
  border-radius:14px; padding:14px; box-shadow:0 10px 26px rgba(0,0,0,.45); display:none; }
#ev-modal.show{ display:block; }
#ev-modal h4{ margin:0 0 8px; color:#DFF3FF }
#ev-modal .row{ display:flex; gap:8px; margin-bottom:8px; }
#ev-modal input[type=text], #ev-modal textarea, #ev-modal select{
  width:100%; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.18);
  color:#E6F7FF; border-radius:8px; padding:8px; outline:none;
}
#ev-modal .actions{ display:flex; justify-content:flex-end; gap:8px; }
.btn-ghost{ padding:6px 12px; border-radius:10px; border:1px solid rgba(255,255,255,.18); color:#DFF3FF; background:rgba(0,200,255,.1); cursor:pointer; }
.toast{ position:fixed; right:20px; bottom:20px; background:rgba(0,0,0,.7); color:#fff; padding:10px 12px; border-radius:10px; z-index:2300; display:none; }
.toast.show{ display:block; }
