:root {
  --bg: #0e1318;
  --bg-panel: #161d25;
  --bg-card: #1c252f;
  --bg-hover: #232e3a;
  --border: #2a3644;
  --text: #e6edf3;
  --text-dim: #8b98a5;
  --text-faint: #5c6b7a;
  --accent: #3b9dff;
  --ok: #3fb950;
  --warn: #d29922;
  --danger: #f85149;
  --idle: #6e7681;
  --unknown: #8957e5;
  --radius: 8px;
}

* { box-sizing: border-box; }

/* hidden 属性必须赢过任何 display 规则（.modal-mask 的 display:flex 曾把它盖掉，
   导致确认框永远关不掉、遮罩一直挡住页面） */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

h1, h2, h3, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }

/* ---------- 通用控件 ---------- */
.btn {
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 6px 14px;
  transition: background .15s, border-color .15s;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover { background: #2a8ae8; }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-block { width: 100%; padding: 10px; }

.banner {
  padding: 8px 16px;
  background: #3d2b0d;
  border-bottom: 1px solid #6b4a12;
  color: #f0c674;
  font-size: 13px;
}
.banner[data-level="error"] {
  background: #3d1416;
  border-bottom-color: #7a2328;
  color: #ff9ea1;
}

/* ---------- 登录页 ---------- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-card {
  width: 340px;
  padding: 32px 28px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.login-title { font-size: 20px; font-weight: 600; }
.login-sub { color: var(--text-faint); font-size: 13px; margin-bottom: 24px; }
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.field-input {
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.field-input:focus { outline: none; border-color: var(--accent); }
.login-error {
  color: #ff9ea1;
  font-size: 13px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: #3d1416;
  border-radius: 6px;
}
.login-warn {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.6;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.topbar-left { display: flex; align-items: baseline; gap: 10px; }
.brand { font-size: 17px; font-weight: 600; }
.brand-sub { font-size: 12px; color: var(--text-faint); }
.topbar-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.meta { display: flex; flex-direction: column; }
.meta-label { font-size: 11px; color: var(--text-faint); }
.meta-value { font-size: 13px; font-variant-numeric: tabular-nums; }
.user { font-size: 13px; color: var(--text-dim); }

/* ---------- 布局 ----------
   两列：左 = 地图 / 详情，右 = 设备列表。
   具体站位在 ≥1025px 的媒体查询里定（那里还要叠加"整页不滚动"的高度约束）；
   窄屏退回单列，按 HTML 顺序自然堆叠：地图 → 列表 → 详情。 */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  padding: 16px 20px;
  align-items: start;
}
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
}

/* ---------- 状态总览（浮窗，挂在地图右上角）---------- */
.summary {
  position: absolute;
  top: 12px;              /* 原 48px 是让开 .map-head 的；标题栏收掉后改为贴顶 */
  right: 12px;
  z-index: 500;           /* 低于 Leaflet 控件(800)和弹窗(700)：弹窗不会被它挡住 */
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  min-width: 132px;
  background: rgba(22, 29, 37, .92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
}
.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: 0;
  padding: 2px 4px;
}
.stat-label { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.stat-value {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat[data-tone="ok"] .stat-value { color: var(--ok); }
.stat[data-tone="warn"] .stat-value { color: var(--warn); }
.stat[data-tone="danger"] .stat-value { color: var(--danger); }
.stat[data-tone="idle"] .stat-value { color: var(--idle); }
.stat[data-tone="unknown"] .stat-value { color: var(--unknown); }

/* ---------- 设备面板 ---------- */
.device-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.panel-title { font-size: 13px; font-weight: 600; color: var(--text-dim); letter-spacing: .5px; }
.panel-count { font-size: 12px; color: var(--text-faint); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.filter-chip {
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
}
.filter-chip:hover { background: var(--bg-hover); color: var(--text); }
.filter-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.device-list { max-height: 60vh; overflow-y: auto; }
.device-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  border-left: 3px solid transparent;
}
.device-item:hover { background: var(--bg-hover); }
.device-item[aria-selected="true"] {
  background: var(--bg-card);
  border-left-color: var(--accent);
}
.device-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.device-name { font-weight: 600; font-size: 13px; }
.device-sn { font-size: 11px; color: var(--text-faint); font-family: Consolas, monospace; }
.device-item-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-faint);
}

/* ---------- 状态标记 ---------- */
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.status-tag {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.tone-ok     { color: var(--ok); }
.tone-warn   { color: var(--warn); }
.tone-danger { color: var(--danger); }
.tone-idle   { color: var(--idle); }
.tone-unknown{ color: var(--unknown); }
.dot-ok     { background: var(--ok); }
.dot-warn   { background: var(--warn); }
.dot-danger { background: var(--danger); }
.dot-idle   { background: var(--idle); }
.dot-unknown{ background: var(--unknown); }

.tag-note {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--bg-hover);
  color: var(--text-faint);
  border: 1px solid var(--border);
}

/* ---------- 详情 ---------- */
.detail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail-head {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-name { font-size: 18px; font-weight: 600; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 20px;
  margin-top: 12px;
}
.detail-item { display: flex; flex-direction: column; }
.detail-key { font-size: 11px; color: var(--text-faint); }
.detail-val { font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- 指标 ---------- */
.metric-groups { display: flex; flex-direction: column; gap: 12px; }
.group-block {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px 16px;
}
.group-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
/* 并排只在宽屏生效 —— 窄屏一列一列堆，不然每项都挤成一条 */
@media (min-width: 1025px) {
  .group-row.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-row.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .group-row.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .group-row.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.group-title {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: .5px;
  margin-bottom: 10px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .15s;
}
.metric-card:hover { border-color: var(--accent); }
.metric-card[aria-selected="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.metric-label { font-size: 12px; color: var(--text-dim); }
.metric-value {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.metric-unit { font-size: 12px; color: var(--text-faint); margin-left: 3px; font-weight: 400; }
.metric-invalid { font-size: 13px; color: var(--warn); }

/* ---------- 图表 ---------- */
.chart-section {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px 16px;
}
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.chart-picker { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.chart-picker select {
  font: inherit;
  font-size: 13px;
  padding: 5px 8px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 180px;
}
.chart-host { width: 100%; height: 213px; }
.chart-note { margin-top: 8px; font-size: 11px; color: var(--text-faint); }

/* ---------- 地图 ---------- */
.map-section {
  grid-column: 1 / -1;
  position: relative;      /* 状态总览浮窗的定位基准 */
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
/* 2026-10-01：按用户要求收掉地图面板上下的文字条，让地图铺满面板。
   ⚠️ 副作用：底部那句「另有 N 台未标注坐标」也会一并消失 —— 当前 8 台里只有 M001 有坐标
   （data/map-points.json 按 SN 配置），地图上因此只有一个点而没有解释。
   需要这句提示时，把下面两条的 display:none 删掉即可恢复。 */
.map-head {
  display: none;
}
.map-host {
  width: 100%;
  height: 336px;
  background: var(--bg);
}
@media (max-width: 1024px) {
  .map-host { height: 256px; }
}
.map-note {
  display: none;            /* 与 .map-head 一起收掉；见上方说明 */
  padding: 8px 14px 10px;
  font-size: 11px;
  color: var(--text-faint);
}

/* Leaflet 默认是白底，套进深色面板里要压一下 */
.leaflet-container {
  background: #121820;
  font: inherit;
}
.leaflet-container a { color: var(--accent); }
.leaflet-control-attribution {
  background: rgba(14, 19, 24, .78) !important;
  color: var(--text-faint) !important;
  font-size: 10px !important;
}
.leaflet-bar a,
.leaflet-bar a:hover {
  background: var(--bg-card);
  color: var(--text);
  border-bottom-color: var(--border);
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
}
.leaflet-popup-content { margin: 10px 12px; }
.leaflet-popup-close-button { color: var(--text-faint) !important; }

/* 选中的地图点：绿色填充做呼吸式渐变闪烁（opacity 平滑过渡，不是硬切开关）。
   Leaflet 把 fill-opacity / stroke-opacity 写成 SVG 属性，而 CSS 动画的优先级高于
   SVG presentation attribute，所以这里的动画能盖住它。
   ⚠️ 这个 class 由 dashboard.js 手动 toggle —— Leaflet 的 setStyle() 不会更新 className。
   想改快慢动 1.4s，想改明暗动 50% 那两个值。 */
@keyframes marker-pulse {
  0%, 100% { fill-opacity: .95; stroke-opacity: 1; }
  50%      { fill-opacity: .28; stroke-opacity: .45; }
}
.marker-pulse { animation: marker-pulse 1.4s ease-in-out infinite; }

.map-popup { min-width: 220px; }
.mp-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.mp-name { font-size: 15px; font-weight: 600; }
.mp-sub {
  font-size: 11px;
  color: var(--text-faint);
  font-family: Consolas, monospace;
}
.mp-time { font-size: 11px; color: var(--text-dim); margin: 6px 0 8px; }
.mp-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
}
.mp-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.mp-k { color: var(--text-dim); }
.mp-v { font-variant-numeric: tabular-nums; font-weight: 600; }
.mp-v-bad { color: var(--warn); font-weight: 400; }
.mp-empty { font-size: 12px; color: var(--text-faint); }
.mp-note {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  color: var(--warn);
}

/* ---------- 满屏自适应（宽屏）----------
   宽屏下整页不滚动，只有两行：
     行1 = 地图(左) + 设备列表(右)，两者等高
     行2 = 详情（跨两列，独占下方整行，内部自己滚）
   窄屏（<=1024px）退回原来的自然高度 + 整页滚动，否则内容会被压扁。 */
@media (min-width: 1025px) {
  html, body { height: 100%; }
  body { display: flex; flex-direction: column; overflow: hidden; }

  .layout {
    flex: 1 1 auto;
    min-height: 0;
    /* 左列吃掉剩余宽度给地图，右列固定宽度给设备列表 */
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-rows: minmax(180px, 36vh) minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px;
  }

  .map-section {
    grid-row: 1;
    grid-column: 1;        /* 不再独占整行，右边要让给设备列表 */
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .map-host { flex: 1 1 auto; height: auto; min-height: 0; }
  .map-note { flex: none; }

  .device-panel {
    grid-row: 1;           /* 与地图同处第一行 */
    grid-column: 2;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .device-list { flex: 1 1 auto; max-height: none; min-height: 0; }

  .detail { grid-row: 2; grid-column: 1 / -1; min-height: 0; overflow-y: auto; }
  .disclaimer { flex: none; }
}

/* ---------- 全屏 / 大屏模式 ---------- */
/* 顶栏压扁、页脚和副标题收掉，地图抬到上半屏，数字整体放大 */
.fs-mode .topbar { padding: 6px 16px; }
.fs-mode .brand { font-size: 15px; }
.fs-mode .brand-sub,
.fs-mode .disclaimer { display: none; }
.fs-mode .topbar-right { gap: 14px; }
.fs-mode .meta-label { display: none; }

.fs-mode .layout { padding: 10px 16px; gap: 12px; }
.fs-mode .stat { padding: 8px 14px; }
.fs-mode .stat-value { font-size: 34px; }

/* 满屏布局下高度由 grid 行决定，这里改的是行比例，别再写死 map-host 高度 */
@media (min-width: 1025px) {
  .fs-mode .layout { grid-template-rows: minmax(200px, 45vh) minmax(0, 1fr); }
  .fs-mode .map-host { height: auto; }
  .fs-mode .device-list { max-height: none; }
}
/* 浮窗里数字太大撑爆角，全屏时只小幅放大 */
.fs-mode .stat-value { font-size: 22px; }
.fs-mode .detail-head { padding: 10px 14px; }
.fs-mode .metric-value { font-size: 26px; }
.fs-mode .chart-host { height: 17vh; }
.fs-mode .chart-note { font-size: 11px; }

/* ---------- 下行命令（OTA）---------- */
.cmd-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.cmd-bar-main { display: flex; align-items: baseline; gap: 10px; }
.cmd-title { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.cmd-state { font-size: 13px; color: var(--text-faint); }
.cmd-state.tone-ok { color: var(--ok); }
.cmd-state.tone-warn { color: var(--warn); }
.cmd-state.tone-danger { color: var(--danger); }
.cmd-progress {
  flex: 1 1 160px;
  min-width: 120px;
  height: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.cmd-progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .4s;
}

/* ---------- 励磁终端四路远程控制 ---------- */
.ctrl-section {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px 14px;
}
.ctrl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ctrl-state { font-size: 13px; color: var(--text-faint); }
.ctrl-state.tone-ok { color: var(--ok); }
.ctrl-state.tone-warn { color: var(--warn); }
.ctrl-state.tone-danger { color: var(--danger); }
.ctrl-channels { display: grid; gap: 8px; }
@media (min-width: 1025px) {
  .ctrl-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.ch-name { font-size: 13px; font-weight: 600; min-width: 34px; }
.ch-level {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-align: center;
  min-width: 26px;
  margin-right: auto;
}
.ctrl-btn { padding: 5px 10px; font-size: 12px; min-width: 42px; }
.ctrl-btn:disabled { opacity: .45; cursor: not-allowed; }
.ctrl-start { color: var(--ok); }
.ctrl-stop { color: var(--danger); }
.ctrl-note { margin: 10px 0 0; font-size: 11px; color: var(--text-faint); }

/* ---------- S3 振动量程设定（与四路控制共用 .ctrl-section 容器） ---------- */
.vib-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.vib-current {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-right: auto;
}
.ctrl-btn.btn-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* 轻量提示：控制类写操作的 409/429/失败回执 */
.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  max-width: 320px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
}
.toast.tone-warn { border-left-color: var(--warn); }
.toast.tone-danger { border-left-color: var(--danger); }

/* 自绘确认框（不用 window.confirm，公网写操作要写清楚后果） */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
/* OTA 确认框（2026-10-01 按整体放大一倍改）：
   宽度与固件列表高度 ×2；字号放大约 1.5 倍 —— 标题若真按 ×2 到 32px 会比页面主标题还大，太跳。
   想再大：改下面 --fw-scale 相关的值，或直接调 .modal 的 width / font-size。 */
.modal {
  width: 840px;              /* 原 420px → ×2 */
  max-width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 36px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
  /* 放大后在小屏上可能高出视口，留出自滚动，否则底部按钮会被裁掉点不到。
     40px 是 .modal-mask 的上下 padding。 */
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.modal-title { font-size: 26px; font-weight: 600; margin-bottom: 14px; }
.modal-text { font-size: 17px; color: var(--text-dim); margin-bottom: 18px; }
.modal-warn {
  margin: 0 0 20px;
  padding-left: 26px;
  list-style: disc;
  font-size: 15px;
  color: var(--text-faint);
}
.modal-warn li { margin-bottom: 8px; }
.modal-warn strong { color: var(--warn); }

/* 固件版本选择（嵌在 OTA 确认框里）
   选中态沿用 .device-item[aria-selected] 的「换背景 + 左侧蓝条」，不另起一套视觉语言。 */
.fw-picker { margin: 0 0 20px; }
.fw-picker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--text-dim);
}
.fw-picker-state { font-size: 13px; color: var(--text-faint); }
.fw-list {
  max-height: 336px;         /* 原 168px → ×2 */
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}
.fw-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  border-left: 3px solid transparent;
}
.fw-item:last-child { border-bottom: 0; }
.fw-item:hover { background: var(--bg-hover); }
.fw-item[aria-checked="true"] { background: var(--bg-card); border-left-color: var(--accent); }
.fw-name { font-size: 17px; font-family: Consolas, monospace; word-break: break-all; }
.fw-meta {
  font-size: 14px;
  color: var(--text-faint);
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.fw-empty { padding: 22px 16px; text-align: center; font-size: 15px; color: var(--text-faint); }
.fw-note { margin-top: 10px; font-size: 14px; color: var(--text-faint); }

.modal-actions { display: flex; justify-content: flex-end; gap: 16px; }
/* 弹窗里的按钮跟着放大，否则对比之下会显得很小 */
.modal-actions .btn { padding: 10px 24px; font-size: 16px; }

/* ---------- 空状态 / 页脚 ---------- */
.empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}
.disclaimer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12px;
}
.disclaimer strong { color: var(--warn); }
