/* 城市与地铁 · 界面样式（浅色 / 深色主题） */
:root {
  color-scheme: light;
  --navy: #1b365c;
  --teal: #2a9d8f;
  --grad: linear-gradient(180deg, #4a8cc6 0%, #2b649c 100%);
  --grad-soft: linear-gradient(180deg, rgba(74, 140, 198, 0.12), rgba(43, 100, 156, 0.08));
  --bg: #eaf1f7;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --surface-2: #f4f7fb;
  --surface-3: #e8eef5;
  --text: #17263d;
  --muted: #5d6c82;
  --faint: #98a6b8;
  --line: rgba(27, 54, 92, 0.08);
  --line-strong: rgba(27, 54, 92, 0.15);
  --hover: rgba(47, 111, 168, 0.07);
  --accent: #2f6fa8;
  --accent-soft: rgba(47, 111, 168, 0.1);
  --teal-soft: rgba(42, 157, 143, 0.12);
  --good: #1f9254;
  --good-soft: rgba(31, 146, 84, 0.1);
  --warn: #c98200;
  --warn-soft: rgba(214, 140, 0, 0.12);
  --bad: #d83a3a;
  --bad-soft: rgba(216, 58, 58, 0.1);
  --gold: #d99a00;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(36, 66, 104, 0.12), 0 1px 3px rgba(36, 66, 104, 0.06);
  --shadow-sm: 0 4px 14px rgba(36, 66, 104, 0.1);
  --ring: 0 0 0 3px rgba(47, 111, 168, 0.25);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --navy: #9cc0ec;
  --teal: #3fc1b0;
  --grad: linear-gradient(180deg, #4a8cc6 0%, #2b5f94 100%);
  --grad-soft: linear-gradient(180deg, rgba(74, 140, 198, 0.2), rgba(43, 100, 156, 0.12));
  --bg: #0f1724;
  --surface: rgba(22, 31, 46, 0.9);
  --surface-solid: #172131;
  --surface-2: #1c2839;
  --surface-3: #243247;
  --text: #e5ecf6;
  --muted: #9aa9be;
  --faint: #66768e;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --hover: rgba(120, 170, 230, 0.09);
  --accent: #6aa6e6;
  --accent-soft: rgba(106, 166, 230, 0.15);
  --teal-soft: rgba(63, 193, 176, 0.15);
  --good: #3cc77e;
  --good-soft: rgba(60, 199, 126, 0.14);
  --warn: #f0b33c;
  --warn-soft: rgba(240, 179, 60, 0.14);
  --bad: #ff7070;
  --bad-soft: rgba(255, 112, 112, 0.14);
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.42), 0 1px 4px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.32);
  --ring: 0 0 0 3px rgba(106, 166, 230, 0.35);
  --glass-edge: rgba(255, 255, 255, 0.06);
}* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 13px; -webkit-font-smoothing: antialiased; }
#map { position: fixed; inset: 0; display: block; touch-action: none; }
button { font-family: inherit; font-size: inherit; color: inherit; }
input, select { font-family: inherit; font-size: 13px; color: var(--text); background: var(--surface-solid); }
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; }
.hud { position: fixed; z-index: 10; transition: opacity .3s var(--ease), transform .35s var(--ease); }
.hidden { opacity: 0 !important; pointer-events: none !important; }
.glass { background: var(--surface); border: 1px solid var(--glass-edge); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: var(--surface-3); color: var(--muted); white-space: nowrap; font-weight: 500; }
.tag .ico { width: 12px; height: 12px; }
.tag.hist { background: rgba(196, 128, 64, 0.14); color: #b06a2a; }
.tag.est { background: var(--accent-soft); color: var(--accent); }
.tag.sim { background: rgba(124, 92, 214, 0.14); color: #7c5cd6; }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.info { background: var(--accent-soft); color: var(--accent); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.swatch { width: 16px; height: 6px; border-radius: 3px; display: inline-block; flex: none; }
kbd { font-family: inherit; font-size: 10px; padding: 0 5px; border-radius: 5px; background: var(--surface-3); color: var(--muted); border: 1px solid var(--line); }

/* ---------- 按钮 ---------- */
.btn { border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--text); border-radius: 10px; padding: 7px 14px; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .2s, transform .12s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; font-weight: 500; }
.btn .ico { width: 16px; height: 16px; }
.btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:focus-visible, .pill:focus-visible, .tbtn:focus-visible, .dockbtn:focus-visible, .sec-h:focus-visible, .menu-tile:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(29, 88, 209, 0.3); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); }
.btn.danger.fill { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.4); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.seg-ctl { display: inline-flex; background: var(--surface-3); border-radius: 11px; padding: 3px; gap: 2px; }
.seg-ctl button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); transition: background .18s, color .18s, box-shadow .18s; display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.seg-ctl button .ico { width: 15px; height: 15px; }
.seg-ctl button.on { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-sm); }
.iconbtn { width: 32px; height: 32px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted); flex: none; transition: background .15s, color .15s; }
.iconbtn .ico { width: 18px; height: 18px; }
.iconbtn:hover { background: var(--hover); color: var(--text); }

/* ---------- 顶部 HUD ---------- */
/* 界面大小：HUD 各部件按 --uiz 缩放，涉及视口尺寸的值除以 --uiz 抵消 */
#hudTop, #dock, #legendCard, #zoomCtl, #rightPanel, #toolbar, #buildStack, #feed { zoom: var(--uiz, 1); }
#hudTop { top: 12px; left: 12px; right: 12px; display: flex; gap: 10px; align-items: flex-start; pointer-events: none; }
#hudTop > * { pointer-events: auto; }
#hudTop.hidden { transform: translateY(-14px); }
.cluster { display: flex; align-items: center; gap: 3px; padding: 5px; flex: none; }
.cluster.metrics { flex: 0 1 auto; min-width: 0; overflow: hidden; }
#hudTop .spacer { flex: 1 1 0; pointer-events: none; }
.citybar { gap: 6px; padding-right: 7px; }
.brand { width: 44px; height: 44px; border-radius: 13px; background: var(--grad); display: grid; place-items: center; flex: none; box-shadow: 0 3px 10px rgba(43, 100, 156, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.brand img { width: 34px; height: 34px; object-fit: contain; }
/* 深色主题下深蓝 LOGO 转为浅色 */
:root[data-theme="dark"] .logo-ink { filter: brightness(0) invert(0.93); }
.pill { position: relative; flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 11px 4px 5px; border-radius: 12px; cursor: pointer; border: 0; background: transparent; text-align: left; min-width: 0; height: 44px; transition: background .15s, transform .2s var(--spring); overflow: hidden; }
.pill:hover { background: var(--hover); }
.pill:active { transform: scale(.97); }
.pill.on { background: var(--accent-soft); }
.pill.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--grad); }
.badge { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--accent); background: var(--accent-soft); }
.badge .ico { width: 18px; height: 18px; }
.b-gold { color: #b8860b; background: rgba(217, 154, 0, 0.13); }
.b-blue { color: #2f6fa8; background: rgba(47, 111, 168, 0.11); }
.b-teal { color: #1f8f82; background: rgba(42, 157, 143, 0.12); }
.b-orange { color: #cf6328; background: rgba(226, 110, 48, 0.12); }
.b-violet { color: #6652c4; background: rgba(106, 85, 200, 0.11); }
.b-green { color: #1f9254; background: rgba(31, 146, 84, 0.11); }
.b-red { color: #d83a3a; background: rgba(216, 58, 58, 0.1); }
.b-slate { color: #5d6c82; background: rgba(93, 108, 130, 0.12); }
:root[data-theme="dark"] .b-gold { color: #f0bd4a; } :root[data-theme="dark"] .b-blue { color: #7fb4ec; } :root[data-theme="dark"] .b-teal { color: #55cdbd; }
:root[data-theme="dark"] .b-orange { color: #f39a63; } :root[data-theme="dark"] .b-violet { color: #a796f0; } :root[data-theme="dark"] .b-green { color: #5ad392; }
:root[data-theme="dark"] .b-red { color: #ff8a8a; } :root[data-theme="dark"] .b-slate { color: #a6b4c8; }.pill .badge { width: 30px; height: 30px; border-radius: 9px; }
.pill .badge .ico { width: 17px; height: 17px; }
.pill .tx { display: flex; flex-direction: column; min-width: 0; }
.pill .k { font-size: 11px; color: var(--muted); white-space: nowrap; line-height: 1.2; }
.pill .v { font-size: 15px; font-weight: 700; white-space: nowrap; line-height: 1.25; display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.pill .v small { font-weight: 500; font-size: 11px; color: var(--muted); }
.pill .trend { font-size: 10px; font-weight: 700; }
.pill.flash-good { animation: flashGood 1s var(--ease); }
.pill.flash-bad { animation: flashBad 1s var(--ease); }
@keyframes flashGood { 0% { background: var(--good-soft); } 100% { background: transparent; } }
@keyframes flashBad { 0% { background: var(--bad-soft); } 100% { background: transparent; } }
.daypill { gap: 9px; }
.dayring { width: 36px; height: 36px; position: relative; flex: none; }
.dayring svg.r { position: absolute; inset: 0; transform: rotate(-90deg); }
.dayring .ico { position: absolute; inset: 9px; width: 18px; height: 18px; color: var(--gold); transition: transform .5s var(--spring); }
.dayring.night .ico { color: #8aa4ff; transform: rotate(-20deg); }
/* 速度与推进：紧凑分段按钮 */
.speed, .jumps { display: flex; background: var(--surface-3); border-radius: 12px; padding: 3px; gap: 2px; flex: none; }
.speed .sbtn, .jbtn { position: relative; overflow: hidden; height: 34px; min-width: 34px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; color: var(--muted); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; transition: background .18s, color .18s, box-shadow .2s, transform .2s var(--spring); }
.speed .sbtn .ico { width: 16px; height: 16px; }
.speed .sbtn:hover, .jbtn:hover { color: var(--text); background: var(--hover); }
.speed .sbtn:active, .jbtn:active { transform: scale(.92); }
.speed .sbtn.on { background: var(--surface-solid); color: var(--accent); box-shadow: var(--shadow-sm); }
.speed .sbtn.pz.on { color: var(--warn); }
.jbtn { font-weight: 600; font-size: 12px; }
/* 右上操作 */
.actions { gap: 2px; }
.cnt { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface-solid); animation: popIn .4s var(--spring); }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
.hbtn { position: relative; width: 40px; height: 42px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s, transform .2s var(--spring); }
.hbtn .ico { width: 20px; height: 20px; transition: transform .3s var(--spring); }
.hbtn:hover { background: var(--hover); color: var(--text); }
.hbtn:hover .ico { transform: scale(1.1); }
.hbtn:active { transform: scale(.92); }
.hbtn.on { background: var(--accent-soft); color: var(--accent); }
.hbtn[data-tip="设置"]:hover .ico { transform: rotate(60deg); }
@keyframes blink { 50% { opacity: .3; } }
/* 顶栏按「有效宽度」（窗口宽度 ÷ 界面大小）逐级收起次要指标，类名由 ui.layoutHud 设置 */
#hudTop.lt1540 .pill.opt { display: none; }
#hudTop.lt1400 .pill.opt2 { display: none; }
#hudTop.lt1260 .pill.opt3 { display: none; }
#hudTop.lt1080 .pill.opt4, #hudTop.lt1080 .daypill .k { display: none; }
#hudTop.lt960 .jumps, #hudTop.lt960 .pill .k { display: none; }
#hudTop.lt820 .pill.opt5, #hudTop .pill.squeezed { display: none; }

/* ---------- 左侧：视图与图层 ---------- */
#dock { top: 76px; left: 12px; width: 56px; padding: 7px; display: flex; flex-direction: column; gap: 3px; align-items: center; max-height: calc((100vh - 240px) / var(--uiz, 1)); overflow-y: auto; scrollbar-width: none; }
#dock.hidden { transform: translateX(-14px); }
.dock-title { font-size: 10px; color: var(--faint); font-weight: 700; letter-spacing: 1px; margin: 3px 0 1px; }
.dock-sep { width: 30px; height: 1px; background: var(--line-strong); margin: 6px 0 3px; flex: none; }
.dockbtn { position: relative; overflow: hidden; width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted); transition: background .18s, color .18s, transform .2s var(--spring), box-shadow .2s; flex: none; }
.dockbtn .ico { width: 21px; height: 21px; }
.dockbtn:hover { background: var(--hover); color: var(--text); transform: scale(1.06); }
.dockbtn:active { transform: scale(.94); }
.dockbtn.on { color: #fff; background: var(--lc, var(--accent)); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); }
.dockbtn.view.on { background: var(--grad); }
#legendCard { top: 76px; left: 78px; width: 268px; max-height: calc((100vh - 190px) / var(--uiz, 1)); display: flex; flex-direction: column; overflow: hidden; transform-origin: left top; }
#legendCard.hidden { transform: translateX(-12px) scale(.98); }
#legendCard .lc-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px 14px; }
#legendCard .lc-badge { color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); }
#legendCard .lc-body { overflow-y: auto; padding: 0 14px 14px; }
.legend .bar { height: 10px; border-radius: 5px; margin: 6px 0 3px; }
.legend .li { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 5px 0; }
/* 右下：缩放 */
#zoomCtl { left: 12px; bottom: 16px; display: flex; flex-direction: column; padding: 5px; gap: 2px; border-radius: 15px; }
#zoomCtl.hidden { transform: translateY(12px); }
#zoomCtl button { position: relative; overflow: hidden; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s, transform .2s var(--spring); }
#zoomCtl button .ico { width: 19px; height: 19px; }
#zoomCtl button:hover { background: var(--hover); color: var(--text); }
#zoomCtl button:active { transform: scale(.9); }

/* ---------- 右侧面板 ---------- */
.panel { display: flex; flex-direction: column; overflow: hidden; }
#rightPanel { top: 76px; right: 12px; width: 368px; max-height: calc((100vh - 168px) / var(--uiz, 1)); }
#rightPanel.closed { transform: translateX(calc(100% + 24px)); opacity: 0; pointer-events: none; }
.p-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 10px 12px; flex: none; min-height: 56px; border-bottom: 1px solid var(--line); }
.p-head .badge { width: 34px; height: 34px; border-radius: 11px; }
.p-title { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-body { overflow-y: auto; padding: 12px 14px 16px; flex: 1; overscroll-behavior: contain; }
.p-body::-webkit-scrollbar, #legendCard .lc-body::-webkit-scrollbar, .stats-body::-webkit-scrollbar { width: 8px; }
.p-body::-webkit-scrollbar-thumb, #legendCard .lc-body::-webkit-scrollbar-thumb, .stats-body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.page-enter { animation: pageIn .26s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* ---------- 折叠区块 ---------- */
.sec { border-top: 1px solid var(--line); }
.sec:first-child { border-top: 0; }
.sec-h { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 11px 2px; cursor: pointer; text-align: left; font-weight: 600; border-radius: 8px; }
.sec-h > .ico { width: 16px; height: 16px; color: var(--accent); }
.sec-h .chev { transition: transform .25s var(--ease); color: var(--faint); margin-left: auto; width: 14px; height: 14px; }
.sec.open > .sec-h .chev { transform: rotate(90deg); }
.sec-h .sum { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.sec-h .sum + .chev { margin-left: 6px; }
.sec-b { overflow: hidden; transition: height .28s var(--ease), opacity .22s; }
.sec-b > .inner { padding: 0 2px 12px; }
.sec:not(.open) > .sec-b { height: 0; opacity: 0; }

/* ---------- 数据展示 ---------- */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: baseline; }
.kv .k { color: var(--muted); font-size: 12px; white-space: nowrap; }
.kv .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 10px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; }
.stat .k { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.stat .k .ico { width: 13px; height: 13px; }
.stat .v { font-size: 17px; font-weight: 700; margin-top: 3px; }
.stat .d { font-size: 11px; margin-top: 2px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
table.tbl th { text-align: right; color: var(--muted); font-weight: 500; padding: 5px 4px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
table.tbl td { text-align: right; padding: 5px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl th:first-child, table.tbl td:first-child { text-align: left; }
.list-item { display: flex; gap: 8px; align-items: flex-start; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.clickable { cursor: pointer; border-radius: 9px; transition: background .15s; }
.clickable:hover { background: var(--hover); }
.note { font-size: 12px; color: var(--muted); line-height: 1.6; }
.callout { border-radius: 12px; padding: 9px 11px; font-size: 12px; line-height: 1.55; margin: 8px 0; display: flex; gap: 9px; align-items: flex-start; }
.callout > .ico { width: 17px; height: 17px; margin-top: 1px; }
.callout.bad { background: var(--bad-soft); color: var(--bad); }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.callout.good { background: var(--good-soft); color: var(--good); }
.callout.info { background: var(--grad-soft); color: var(--text); }
.callout.info > .ico { color: var(--accent); }
.callout .ct { color: var(--text); }
.progress { height: 7px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width .35s var(--ease); }
.field { display: flex; flex-direction: column; gap: 5px; margin: 9px 0; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.field input[type=text], .field input[type=number], .field select { border: 1px solid var(--line-strong); border-radius: 9px; padding: 7px 9px; }
.field input:focus, .field select:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.spark { display: block; width: 100%; height: 44px; }
.chg { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }

/* ---------- 冲突卡片 ---------- */
.cf-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.cf-card { border: 1px solid rgba(224, 49, 49, 0.28); background: var(--bad-soft); border-radius: 13px; padding: 10px 11px; cursor: pointer; transition: transform .15s, box-shadow .2s, border-color .2s; }
.cf-card:hover, .cf-card.on { border-color: var(--bad); box-shadow: 0 4px 14px rgba(224, 49, 49, 0.18); transform: translateY(-1px); }
.cf-top { display: flex; gap: 9px; align-items: flex-start; }
.cf-num { width: 22px; height: 22px; border-radius: 50%; background: var(--bad); color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; flex: none; box-shadow: 0 2px 6px rgba(224, 49, 49, 0.4); }
.cf-msg { font-weight: 600; font-size: 12.5px; line-height: 1.45; color: var(--text); }
.cf-how { margin: 6px 0 0 31px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.cf-how b { color: var(--text); }
.cf-fix { margin: 8px 0 0 31px; display: flex; flex-wrap: wrap; gap: 6px; }
.cf-fix .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.wn-card { border-radius: 11px; padding: 8px 10px; background: var(--warn-soft); font-size: 12px; display: flex; gap: 8px; align-items: flex-start; cursor: pointer; margin: 5px 0; }
.wn-card .ico { width: 15px; height: 15px; color: var(--warn); margin-top: 1px; }

/* ---------- 底部：建设工具 ---------- */
#toolbar { bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 20px; position: fixed; }
#toolbar.hidden { transform: translateX(-50%) translateY(16px); }
.tind { position: absolute; left: 0; top: 6px; height: calc(100% - 12px); border-radius: 15px; background: var(--grad); box-shadow: 0 6px 16px rgba(29, 88, 209, 0.32); opacity: 0; transition: transform .38s var(--spring), width .3s var(--ease), background .3s, opacity .2s; pointer-events: none; }
.tind.ready { opacity: 1; }
.tind.danger { background: linear-gradient(135deg, #ff7676, #d92e2e); box-shadow: 0 6px 16px rgba(224, 49, 49, 0.35); }
.tbtn { position: relative; z-index: 1; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 62px; height: 56px; border: 0; background: transparent; border-radius: 15px; cursor: pointer; color: var(--muted); transition: color .2s, transform .2s var(--spring); flex: none; }
.tbtn .ico { width: 23px; height: 23px; transition: transform .3s var(--spring); }
.tbtn .lb { font-size: 11.5px; white-space: nowrap; font-weight: 600; }
.tbtn:hover { color: var(--text); }
.tbtn:hover .ico { transform: translateY(-2px) scale(1.06); }
.tbtn:active { transform: scale(.94); }
.tbtn.on { color: #fff; }
.tbtn.on .ico { transform: scale(1.08); }
@media (max-width: 900px) { .tbtn { width: 48px; height: 48px; } .tbtn .lb { display: none; } }

#draftbar { display: flex; align-items: center; gap: 6px; padding: 6px 7px 6px 6px; white-space: nowrap; border-radius: 16px; }

#draftbar .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(19, 165, 150, 0.5); animation: pulse 1.8s infinite; }
#draftbar .cost { font-weight: 700; display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
#draftbar .cost .ico { width: 16px; height: 16px; color: var(--gold); }
.cfbadge { display: inline-flex; align-items: center; gap: 5px; border: 0; cursor: pointer; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; background: var(--bad); color: #fff; animation: wiggle 2.4s infinite; }
.cfbadge .ico { width: 14px; height: 14px; }
.cfbadge.warn { background: var(--warn-soft); color: var(--warn); animation: none; }
@keyframes wiggle { 0%, 88%, 100% { transform: none; } 91% { transform: rotate(-5deg); } 94% { transform: rotate(5deg); } 97% { transform: rotate(-3deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(19, 165, 150, 0.5); } 70% { box-shadow: 0 0 0 9px rgba(19, 165, 150, 0); } 100% { box-shadow: 0 0 0 0 rgba(19, 165, 150, 0); } }

/* ---------- 顶部中间信息流：暂停提示、横幅、消息 ---------- */
#feed { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 7px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 760px); min-width: 300px; }
#feed.hidden { opacity: 0; }
.pausechip { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); font-size: 12.5px; font-weight: 600; color: var(--warn); cursor: pointer; transition: opacity .25s, transform .3s var(--spring); }
.pausechip .ico { width: 15px; height: 15px; animation: blink 1.6s ease-in-out infinite; }
.pausechip kbd { color: var(--text); }
.pausechip .muted { font-weight: 500; }
.pausechip.overlap { display: none; }
.pausechip.hidden, #app:has(#stats:not(.hidden)) .pausechip { opacity: 0; transform: translateY(-8px) scale(.95); pointer-events: none; }
.pausechip:hover { transform: translateY(1px); }
#banner { display: flex; flex-direction: column; gap: 5px; align-items: center; }
#banner .b { pointer-events: auto; cursor: pointer; padding: 5px 13px; border-radius: 999px; font-size: 12px; font-weight: 500; box-shadow: var(--shadow-sm); display: flex; gap: 6px; align-items: center; backdrop-filter: blur(8px); animation: toastIn .35s var(--spring); }
#banner .b .ico { width: 15px; height: 15px; }
#banner .b.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid rgba(214, 136, 0, 0.3); }
#banner .b.danger { background: var(--bad-soft); color: var(--bad); border: 1px solid rgba(224, 49, 49, 0.3); }
#banner .b.info { background: var(--surface); color: var(--accent); border: 1px solid var(--line); }
#toasts { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { position: relative; overflow: hidden; pointer-events: auto; cursor: pointer; background: var(--surface-solid); color: var(--text); padding: 9px 16px 11px 9px; border-radius: 14px; font-size: 13px; box-shadow: var(--shadow); border: 1px solid var(--line); max-width: 540px; animation: toastIn .42s var(--spring); transition: opacity .3s, transform .3s; display: flex; gap: 10px; align-items: center; }
.toast .badge { width: 28px; height: 28px; border-radius: 9px; animation: popIn .45s var(--spring); }
.toast .badge .ico { width: 16px; height: 16px; }
.toast .life { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); opacity: .5; transform-origin: left; animation: life linear forwards; }
.toast.t-good .life { background: var(--good); }
.toast.t-bad .life { background: var(--bad); }
.toast.t-warn .life { background: var(--warn); }
.toast.t-money .life { background: var(--gold); }
.toast:hover .life { animation-play-state: paused; }
.toast.out { opacity: 0; transform: translateY(-8px) scale(.96); }
@keyframes life { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.92); } to { opacity: 1; transform: none; } }
/* 地图悬停提示 */
#tooltip { position: fixed; z-index: 30; pointer-events: none; background: rgba(15, 22, 34, 0.94); color: #eef3fa; border-radius: 11px; box-shadow: var(--shadow); padding: 8px 11px; font-size: 12px; max-width: 320px; opacity: 0; transition: opacity .12s; line-height: 1.5; }
#tooltip.on { opacity: 1; }
#tooltip .t { font-weight: 700; margin-bottom: 2px; }
#tooltip .m { color: #b7c3d4; }
#tooltip.bad .t { color: #ff8a8a; }
/* 界面按钮提示 */
#uitip { position: fixed; z-index: 60; pointer-events: none; display: flex; align-items: center; gap: 8px; background: rgba(17, 24, 38, 0.95); color: #f1f5fb; padding: 6px 10px; border-radius: 9px; font-size: 12px; font-weight: 500; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); opacity: 0; transform: scale(.94); transition: opacity .14s, transform .18s var(--spring); }
#uitip.on { opacity: 1; transform: none; }
#uitip.s-below { transform-origin: top center; }
#uitip.s-above { transform-origin: bottom center; }
#uitip kbd { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
:root[data-theme="dark"] #uitip { background: rgba(236, 242, 250, 0.96); color: #142033; }
:root[data-theme="dark"] #uitip kbd { background: rgba(0, 0, 0, 0.08); color: #142033; border-color: rgba(0, 0, 0, 0.12); }
/* 按压涟漪 */
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); animation: ripple .6s var(--ease) forwards; pointer-events: none; z-index: 0; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.btn, .menu-tile, .mode-card, .set-tab { position: relative; overflow: hidden; }
/* 资金飘字、庆祝横幅与彩带 */
#fxLayer { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.floater { position: absolute; transform: translateX(-50%); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; animation: floatUp 1.6s var(--ease) forwards; text-shadow: 0 1px 0 var(--surface-solid), 0 0 8px var(--surface-solid); white-space: nowrap; }
.floater.good { color: var(--good); }
.floater.bad { color: var(--bad); }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -4px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 6px) scale(1.08); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 30px) scale(1); } }
.celebrate { position: absolute; inset: 0; }
.celebrate .ribbon { position: absolute; z-index: 1; left: 50%; top: clamp(80px, 22vh, 190px); transform: translateX(-50%); display: flex; align-items: flex-start; gap: 14px; width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - clamp(80px, 22vh, 190px) - 16px); overflow-y: auto; padding: 14px 12px 16px 16px; border-radius: 20px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(10, 20, 40, 0.3), inset 0 -4px 0 var(--c); pointer-events: auto; animation: ribbonIn .7s var(--spring); }
.celebrate-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.celebrate .ribbon .t { font-size: clamp(17px, 2.8vw, 22px); font-weight: 800; letter-spacing: .5px; }
.celebrate .ribbon .s { font-size: 13px; color: var(--muted); margin-top: 3px; }
.celebrate-count { display: inline-block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.celebrate-count[hidden] { display: none; }
.celebrate-close { flex: none; align-self: flex-start; position: sticky; top: 0; background: var(--surface-solid); }
.celebrate .medal { flex: none; width: 52px; height: 52px; border-radius: 16px; background: var(--c); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); animation: medal 1.2s var(--spring); }
.celebrate .medal .ico { width: 28px; height: 28px; }
.celebrate.out .ribbon { animation: ribbonOut .35s var(--ease) forwards; pointer-events: none; }
.confetti { position: absolute; top: 18%; width: 8px; height: 13px; border-radius: 2px; opacity: 0; animation-name: confetti; animation-timing-function: cubic-bezier(.2, .6, .4, 1); animation-fill-mode: forwards; }
@keyframes ribbonIn { from { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(.8); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes ribbonOut { to { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(.95); } }
@keyframes medal { 0% { transform: scale(0) rotate(-40deg); } 60% { transform: scale(1.15) rotate(8deg); } 100% { transform: none; } }
@keyframes confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), 70vh) rotate(var(--rot)); } }

/* ---------- 全屏界面 ---------- */
#screen { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(30, 52, 84, 0.16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: opacity .35s var(--ease); }
:root[data-theme="dark"] #screen { background: rgba(4, 8, 16, 0.45); }
#screen.hidden { opacity: 0; pointer-events: none; }
#screen.start { background: linear-gradient(90deg, rgba(239, 245, 250, 0.97) 0%, rgba(239, 245, 250, 0.88) 24%, rgba(239, 245, 250, 0.4) 44%, rgba(239, 245, 250, 0) 62%); backdrop-filter: none; -webkit-backdrop-filter: none; place-items: center start; }
:root[data-theme="dark"] #screen.start { background: linear-gradient(90deg, rgba(15, 23, 36, 0.96) 0%, rgba(15, 23, 36, 0.86) 24%, rgba(15, 23, 36, 0.35) 44%, rgba(15, 23, 36, 0) 62%); }
.card { background: var(--surface-solid); border-radius: 18px; box-shadow: 0 24px 60px rgba(36, 66, 104, 0.2); padding: 24px 26px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; animation: cardIn .38s var(--spring); border: 1px solid var(--line); }
.card.wide { width: min(860px, calc(100vw - 32px)); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.card h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: 2px; }
.card h2 { font-size: 19px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; color: var(--text); }
.card h3 { font-size: 14px; margin: 16px 0 8px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head .badge { width: 40px; height: 40px; border-radius: 12px; }
.card-head .badge .ico { width: 21px; height: 21px; }
.card-head h2 { margin: 0; }
/* 开始界面 */
.start-wrap { margin-left: max(6vw, 28px); width: min(400px, calc(100vw - 56px)); }
.start-title { margin: 0; font-size: 62px; font-weight: 900; letter-spacing: 3px; line-height: 1.05; color: var(--navy); white-space: nowrap; }
.start-title .yu { font-size: .7em; margin: 0 .03em; position: relative; top: .06em; }
.title-deco { display: block; margin: 6px 0 34px; width: 100%; height: 34px; color: var(--navy); }
.start-menu { display: flex; flex-direction: column; gap: 12px; }
.start-btn { display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 18px 0 22px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.95); background: rgba(255, 255, 255, 0.9); color: var(--text); box-shadow: 0 6px 18px rgba(36, 66, 104, 0.1); cursor: pointer; font-size: 18px; font-weight: 600; letter-spacing: 1px; text-align: left; transition: transform .22s var(--spring), box-shadow .2s, background .2s; }
:root[data-theme="dark"] .start-btn:not(.primary) { background: rgba(23, 33, 49, 0.88); border-color: var(--line); }
.start-btn > .ico { width: 26px; height: 26px; color: var(--navy); }
.start-btn .lb { flex: 1; }
.start-btn .sub { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.start-btn .chev { width: 18px; height: 18px; color: var(--faint); transition: transform .2s var(--ease); }
.start-btn:hover { transform: translateX(4px); box-shadow: 0 10px 26px rgba(36, 66, 104, 0.16); }
.start-btn:hover .chev { transform: translateX(3px); }
.start-btn:active { transform: translateX(2px) scale(.99); }
.start-btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 24px rgba(43, 100, 156, 0.35); }
.start-btn.primary > .ico, .start-btn.primary .chev, .start-btn.primary .sub { color: rgba(255, 255, 255, 0.92); }
.start-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.start-foot { margin-top: 26px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.start-foot a { color: inherit; text-underline-offset: 3px; }
.start-wrap > * { animation: riseIn .6s var(--ease) both; }
.start-menu > * { animation: riseIn .5s var(--ease) both; }
.start-menu > *:nth-child(2) { animation-delay: .05s; } .start-menu > *:nth-child(3) { animation-delay: .1s; } .start-menu > *:nth-child(4) { animation-delay: .15s; } .start-menu > *:nth-child(5) { animation-delay: .2s; }.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 0; }
.mode-card { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line-strong); border-radius: 14px; padding: 16px 18px; cursor: pointer; transition: border-color .18s, box-shadow .2s, transform .2s var(--spring); text-align: left; background: var(--surface-solid); }
.mode-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 26px rgba(36, 66, 104, 0.14); }
.mode-card.on { border-color: rgba(47, 111, 168, 0.45); }
.mode-card .mc-top { display: flex; align-items: center; gap: 10px; }
.mode-card .mc-top .badge { width: 40px; height: 40px; border-radius: 12px; }
.mode-card h4 { margin: 0; font-size: 17px; flex: 1; }
.mode-card .mc-desc { font-size: 13px; color: var(--text); line-height: 1.5; }
.mode-card ul { margin: 0; padding-left: 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.mode-card .mc-go { margin-top: auto; align-self: flex-end; display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 9px; background: var(--grad); color: #fff; font-weight: 600; font-size: 13px; }
@media (max-width: 640px) { .mode-cards { grid-template-columns: 1fr; } }.slot { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); margin: 6px 0; background: var(--surface-2); }
.slot .info { flex: 1; min-width: 0; }
.slot .t { font-weight: 600; }
.game-group { margin: 14px 0; }
.game-group > .h { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 4px; }
/* 存档列表内编辑进度名称 */
.game-group > .save-name-heading { flex-wrap: wrap; }
.save-name-title { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.save-name-editor { margin: 8px 0; padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); }
.save-name-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.save-name-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.save-name-input { flex: 1 1 240px; width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 9px; padding: 7px 9px; }
.save-name-input:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.save-name-input[aria-invalid=true] { border-color: var(--bad); }
.save-name-actions { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 8px; }
.save-name-status:not(:empty) { margin-top: 6px; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 14px 0; }
.loading img { width: 64px; height: 64px; animation: spin 2.6s linear infinite; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ---------- 下拉菜单 ---------- */
.dropdown { position: fixed; z-index: 45; background: var(--surface-solid); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; min-width: 220px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; animation: cardIn .2s var(--ease); }
.dropdown button { display: flex; width: 100%; border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; cursor: pointer; text-align: left; gap: 10px; align-items: center; }
.dropdown button.dd-narrow { display: none; }
@media (max-width: 760px) { .dropdown button.dd-narrow { display: flex; } }
.dropdown button .ico { width: 17px; height: 17px; color: var(--muted); }
.dropdown button:hover { background: var(--hover); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }

/* ---------- 统计面板 ---------- */
#stats { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(8, 14, 26, 0.38); backdrop-filter: blur(6px); transition: opacity .3s var(--ease); }
#stats.hidden { opacity: 0; pointer-events: none; }
.stats-win { width: min(1180px, calc(100vw - 32px)); height: min(820px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--bg); border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); overflow: hidden; border: 1px solid var(--line); animation: cardIn .4s var(--spring); }
.stats-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px 18px; background: var(--surface-solid); border-bottom: 1px solid var(--line); }
.stats-head h2 { margin: 0; font-size: 18px; }
.stats-tabs { display: flex; gap: 4px; margin-left: 18px; }
.stats-tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; cursor: pointer; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.stats-tabs button .ico { width: 16px; height: 16px; }
.stats-tabs button:hover { background: var(--hover); color: var(--text); }
.stats-tabs button.on { background: var(--accent-soft); color: var(--accent); }
.stats-body { flex: 1; overflow-y: auto; padding: 16px 18px 22px; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 760px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface-solid); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.kpi .top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi .top .badge { width: 26px; height: 26px; border-radius: 8px; }
.kpi .top .badge .ico { width: 15px; height: 15px; }
.kpi .val { font-size: 24px; font-weight: 800; letter-spacing: .3px; }
.kpi .val small { font-size: 12px; font-weight: 500; color: var(--muted); }
.kpi .delta { font-size: 11.5px; font-weight: 600; }
.kpi .spark svg { display: block; width: 100%; height: 34px; margin-top: 2px; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.chart-card { background: var(--surface-solid); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 10px; position: relative; }
.chart-card .ch-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.chart-card .ch-title { font-weight: 700; font-size: 14px; flex: 1; }
.chart-card .ch-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.ch-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin: 2px 0 4px; }
.ch-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ch-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.ch-legend i.sq { width: 10px; height: 10px; border-radius: 3px; }
.ch-plot { position: relative; }
.ch-plot svg { display: block; width: 100%; overflow: visible; }
.ch-tip { position: absolute; pointer-events: none; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 10px; padding: 7px 9px; font-size: 11.5px; box-shadow: var(--shadow-sm); white-space: nowrap; opacity: 0; transition: opacity .1s; z-index: 2; color: var(--text); }
.ch-tip .tt { font-weight: 700; margin-bottom: 3px; }
.ch-tip .tr { display: flex; align-items: center; gap: 6px; }
.ch-tip .tr i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ch-tbl { max-height: 220px; overflow: auto; margin-top: 6px; }
.empty-chart { height: 160px; display: grid; place-items: center; color: var(--muted); font-size: 12.5px; text-align: center; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-card .ch-head .btn { margin-left: auto; }
.chart-card .ch-head .btn:not(.primary):not(.danger) { color: var(--muted); }
.chart-card .ch-head .btn .ico { width: 14px; height: 14px; }
.kpi.clickable { cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s; }
.kpi.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); background: var(--surface-solid); }
.mode-bar { display: flex; gap: 2px; height: 18px; border-radius: 6px; overflow: hidden; background: var(--surface-3); }
.mode-bar > div { height: 100%; transition: width .4s var(--ease); }
.mode-bar > div:first-child { border-radius: 6px 0 0 6px; }
.mode-bar > div:last-child { border-radius: 0 6px 6px 0; }
.hbars { display: flex; flex-direction: column; gap: 5px; padding: 4px 0 2px; }
.hbar-row { display: grid; grid-template-columns: minmax(70px, 30%) 1fr auto; align-items: center; gap: 10px; padding: 3px 4px; border-radius: 8px; cursor: default; }
.hbar-row:hover { background: var(--hover); }
.hbar-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.hbar-track { height: 12px; }
.hbar-fill { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar-val { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.stats-head .seg-ctl button { padding: 4px 10px; font-size: 12px; }
@media (max-width: 760px) {
  .stats-tabs { margin-left: 0; overflow-x: auto; }
  .stats-head { flex-wrap: wrap; }
  .chart-grid { grid-template-columns: 1fr; }
}

/* ---------- 设置 ---------- */
.card.settings { padding: 22px 24px 18px; width: min(820px, calc(100vw - 32px)); }
.set-wrap { display: grid; grid-template-columns: 168px 1fr; gap: 18px; min-height: 380px; }
.set-nav { display: flex; flex-direction: column; gap: 3px; border-right: 1px solid var(--line); padding-right: 12px; }
.set-tab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.set-tab .ico { width: 18px; height: 18px; }
.set-tab:hover { background: var(--hover); color: var(--text); }
.set-tab.on { background: var(--accent-soft); color: var(--accent); }
.set-body { min-width: 0; max-height: calc(100vh - 230px); overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
.set-group { font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: 1px; margin: 14px 0 4px; }
.set-group:first-child { margin-top: 0; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; flex: none; }
.set-ico .ico { width: 18px; height: 18px; }
.set-t { font-weight: 600; }
.set-d { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.set-row .seg-ctl { flex: none; }
.set-row .seg-ctl button { padding: 5px 11px; }
.switch { position: relative; width: 46px; height: 27px; border-radius: 999px; border: 0; background: var(--surface-3); cursor: pointer; flex: none; transition: background .25s var(--ease); box-shadow: inset 0 0 0 1px var(--line-strong); }
.switch i { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); transition: transform .3s var(--spring); }
.switch.on { background: var(--grad); box-shadow: none; }
.switch.on i { transform: translateX(19px); }
.switch:focus-visible { outline: none; box-shadow: var(--ring); }
.set-slider { display: flex; align-items: center; gap: 10px; width: 220px; flex: none; }
.set-slider input { flex: 1; accent-color: var(--accent); }
.set-val { width: 40px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12px; }
.set-preview { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 4px; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 9px; background: var(--surface-2); font-size: 12.5px; }
.key-row kbd { font-size: 11px; padding: 2px 7px; white-space: nowrap; }
.about-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.about-head img { width: 64px; height: 64px; border-radius: 18px; background: var(--grad); padding: 8px; }
.about-t { font-size: 20px; font-weight: 800; letter-spacing: 2px; }
@media (max-width: 760px) { .set-wrap { grid-template-columns: 1fr; } .set-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; } .keys { grid-template-columns: 1fr; } }

@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 菜单补充 ---------- */
.dropdown .dd-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.dropdown .dd-head img { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); padding: 4px; }
.dropdown button kbd { margin-left: auto; }
.dropdown { transform-origin: top right; animation: menuIn .22s var(--spring); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- 面板内容进入的层次动画 ---------- */
.page-enter > * { animation: riseIn .32s var(--ease) both; }
.page-enter > *:nth-child(2) { animation-delay: .03s; }
.page-enter > *:nth-child(3) { animation-delay: .06s; }
.page-enter > *:nth-child(4) { animation-delay: .09s; }
.page-enter > *:nth-child(n+5) { animation-delay: .12s; }

/* ---------- 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 1ms !important; } }
.hbtn.warn-dot::after { content: ''; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid var(--surface-solid); }
.loading img { animation: breathe 1.8s ease-in-out infinite !important; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }

/* ---------- 1.2：车站规模卡片、草案对比、拥挤诊断 ---------- */
.size-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.size-card { text-align: left; border: 1.5px solid var(--line-strong); background: var(--surface-solid); border-radius: 12px; padding: 8px 9px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, background .15s, transform .2s var(--spring); min-width: 0; }
.size-card:hover { border-color: var(--accent); }
.size-card:active { transform: scale(.97); }
.size-card.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--ring); }
.size-card .sc-h { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.size-card .sc-tag { font-size: 10px; padding: 0 5px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-weight: 500; }
.size-card .sc-v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.size-card .sc-v small { font-size: 9.5px; font-weight: 500; color: var(--muted); letter-spacing: -.2px; }
.size-card .sc-k { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.size-card .sc-cost { font-size: 11.5px; font-weight: 600; color: var(--accent); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.size-diff { margin-top: 6px; padding: 7px 10px; border-radius: 10px; font-size: 12px; line-height: 1.6; background: var(--accent-soft); }
.size-diff.down { background: var(--warn-soft); }
.draft-diff { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 7px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--warn-soft); font-size: 12px; }
.draft-diff .dd-k { font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 6px; background: var(--surface-solid); color: var(--muted); }
.draft-diff .dd-k.draft { color: var(--warn); }
.draft-diff .dd-arrow { color: var(--muted); }
.diag { margin: 8px 0; border: 1px solid var(--line-strong); border-radius: 12px; padding: 8px 10px; background: var(--surface-solid); }
.diag-h { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 4px; }
.diag-h .ico { width: 16px; height: 16px; color: var(--warn); }
.diag-item { padding: 7px 0 8px 10px; border-left: 3px solid var(--warn); margin: 6px 0 2px; }
.diag-item.lv-bad { border-left-color: var(--bad); }
.diag-item b { display: block; margin-bottom: 2px; color: var(--warn); }
.diag-item.lv-bad b { color: var(--bad); }
.btn .dot, .chip .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* 票价滑块 */
.fare-top { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 6px; }
.fare-v { font-size: 26px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.fare-slider { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.fare-slider input { flex: 1; accent-color: var(--accent); height: 22px; cursor: pointer; }

/* 收藏按钮与搜索 */
.iconbtn.fav.on { color: var(--gold); }
.search-pop { position: fixed; z-index: 46; width: 340px; max-width: calc(100vw - 16px); background: var(--surface-solid); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; animation: menuIn .22s var(--spring); transform-origin: top right; }
.srch-in { display: flex; align-items: center; gap: 8px; padding: 4px 8px 8px; border-bottom: 1px solid var(--line); }
.srch-in .ico { width: 17px; height: 17px; color: var(--muted); }
.srch-in input { flex: 1; border: 0; outline: none; background: transparent; font-size: 14px; padding: 6px 0; }
.srch-list { max-height: min(420px, 60vh); overflow-y: auto; padding-top: 4px; }
.srch-h { font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px 10px 3px; }
.srch-item { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border-radius: 10px; cursor: pointer; }
.srch-item.on { background: var(--hover); }
.srch-item.gone { opacity: .6; cursor: default; }
.srch-item .srch-name { font-weight: 600; }
.srch-item .swatch { width: 18px; height: 7px; }
.srch-item .srch-ic { width: 18px; flex: none; display: flex; justify-content: center; color: var(--muted); }
.srch-item .srch-ic .ico { width: 16px; height: 16px; }
.st-dot { width: 12px; height: 12px; border-radius: 50%; border: 3px solid; background: var(--surface-solid); flex: none; }
.srch-item .iconbtn { width: 28px; height: 28px; }

/* 多选 */
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px 2px 9px; border-radius: 999px; background: var(--accent-soft); font-size: 12px; }
.chip-x { border: 0; background: transparent; cursor: pointer; color: var(--muted); width: 18px; height: 18px; border-radius: 50%; line-height: 1; padding: 0; }
.chip-x:hover { background: var(--hover); color: var(--bad); }
.batch-pv { margin-top: 10px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-solid); }
.batch-pv > b { display: block; margin-bottom: 4px; }

/* 线路示意图 */
.nm-win { width: min(1560px, calc(100vw - 24px)); height: calc(100vh - 24px); }
#netmap { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(8, 14, 26, 0.38); backdrop-filter: blur(6px); --nm-xfer: #1b365c; }
#netmap.hidden { display: none; }
:root[data-theme="dark"] #netmap { --nm-xfer: #e5ecf6; }
#app:has(#netmap:not(.hidden)) .pausechip { opacity: 0; pointer-events: none; }
.nm-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.nm-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; }
.nm-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface-solid); border-radius: 999px; padding: 4px 11px; cursor: pointer; font-weight: 600; }
.nm-chip.on { border-color: var(--accent); box-shadow: var(--ring); }
.nm-canvas { flex: 1; min-height: 0; margin: 10px 16px 16px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--line); overflow: hidden; cursor: grab; touch-action: none; }
.nm-canvas.grabbing { cursor: grabbing; }
.nm-svg { width: 100%; height: 100%; display: block; user-select: none; }
.nm-svg path, .nm-svg .nm-badges g, .nm-svg circle, .nm-svg text { transition: opacity .2s; }
.nm-svg.focusing [data-line]:not(.on), .nm-svg.focusing [data-lines]:not(.on) { opacity: .14; }
.nm-st { fill: #fff; stroke-width: 3.2; cursor: pointer; }
.nm-st.x { stroke-width: 3; }
.nm-st:hover { stroke-width: 5; }
.nm-label { font-size: 20px; font-weight: 500; fill: var(--text); paint-order: stroke; stroke: var(--surface-solid); stroke-width: 4px; stroke-linejoin: round; cursor: pointer; }
.nm-label.x { font-weight: 700; }
.nm-badge-t { font-size: 14px; font-weight: 800; fill: #fff; }
.nm-casing { stroke: var(--surface-solid); }
.nm-heading { flex: none; }
.nm-heading .tiny { margin-top: 2px; }
.nm-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.nm-legend { display: inline-flex; align-items: center; gap: 5px; }
.nm-lg-st, .nm-lg-x { width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid var(--accent); background: var(--surface-solid); display: inline-block; }
.nm-lg-x { width: 13px; height: 13px; border-color: var(--nm-xfer); margin-left: 6px; }
@media (max-width: 760px) { .nm-legend { display: none; } }

/* ---------- 平滑切换（主题、界面大小） ---------- */
.map-snap { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; transition: opacity .55s ease; }
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after { transition: background-color .5s ease, color .5s ease, border-color .5s ease, box-shadow .5s ease, fill .5s ease, stroke .5s ease !important; }

/* ---------- 1.3：左侧视图与图层、图层列表、工具选项条、草案栏 ---------- */
#dock { gap: 4px; }
.dockbtn.layerbtn.on { color: #fff; background: var(--lc, var(--accent)); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); }
.dropdown .dd-title { font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 10px 4px; letter-spacing: .5px; }
.layer-menu { min-width: 250px; transform-origin: left top; }
.layer-menu > button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 7px 9px; border-radius: 10px; cursor: pointer; text-align: left; color: var(--text); }
.layer-menu > button:hover { background: var(--hover); }
.layer-menu > button.on { background: var(--accent-soft); }
.layer-menu .lm-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; }
.layer-menu .lm-ico .ico { width: 17px; height: 17px; }
.layer-menu .lm-tx { display: flex; flex-direction: column; gap: 1px; }
.layer-menu .lm-tx b { font-size: 13px; }
.layer-menu .lm-tx span { font-size: 11px; color: var(--muted); }
.layer-menu .lm-check { color: var(--accent); }
.layer-menu .lm-off { border-top: 1px solid var(--line) !important; border-radius: 0 0 10px 10px !important; color: var(--muted) !important; margin-top: 4px; }
.layer-menu .lm-off .ico { width: 17px; height: 17px; margin: 0 6px 0 7px; }

#buildStack { left: 50%; bottom: 90px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
#buildStack.hidden { transform: translateX(-50%) translateY(12px); }
#buildStack > * { pointer-events: auto; animation: riseIn .26s var(--ease); }
#buildStack > .hidden { display: none !important; }
#toolopts { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-radius: 16px; white-space: nowrap; max-width: calc(100vw / var(--uiz, 1) - 40px); overflow-x: auto; scrollbar-width: none; }
.to-grp { display: flex; align-items: center; gap: 6px; }
.to-k { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.to-hint { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding-right: 4px; }
.to-hint .ico { width: 16px; height: 16px; color: var(--accent); }
.to-sep { width: 1px; height: 22px; background: var(--line-strong); flex: none; }
.seg-ctl.sm { padding: 2px; border-radius: 10px; }
.seg-ctl.sm button { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.seg-ctl button .dot { width: 9px; height: 9px; }
#draftbar .db-main { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 6px 10px; border-radius: 11px; cursor: pointer; color: var(--text); font: inherit; }
#draftbar .db-main:hover { background: var(--hover); }
#draftbar .db-sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 2px; }
#draftbar .btn.ghost.danger:hover { background: var(--bad-soft); }
#draftbar .iconbtn[disabled] { opacity: .35; cursor: default; }

/* 设置：单页 */
.card.settings { width: min(520px, calc(100vw - 32px)); padding: 20px 22px 16px; }
.set-body.single { max-height: none; overflow: visible; padding: 0; margin-top: 4px; }
.set-body.single .set-row { padding: 10px 2px; }
.set-slider { width: 120px; transition: opacity .25s; }
.set-slider.off { opacity: .35; pointer-events: none; }
.set-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

.tag.xfer { background: var(--navy); color: #fff; font-weight: 700; }
:root[data-theme="dark"] .tag.xfer { background: #e5ecf6; color: #0f1724; }

/* 开始界面右上角的深浅模式按钮；设置中的音量行 */
.start-root { display: contents; }
.start-theme { position: fixed; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-solid); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .2s var(--spring), background .2s; }
.start-theme:hover { transform: translateY(-1px) rotate(-12deg); }
.start-theme .ico { width: 20px; height: 20px; }
.set-row.vol-row { transition: opacity .25s; }
.set-row.vol-row.off { opacity: .4; pointer-events: none; }
.set-row.vol-row .set-slider { width: 200px; }

/* 线路示意图 1.4：线型、换乘标示、图例 */
.nm-elev { fill: none; stroke: #fff; stroke-width: 2.2; }
.nm-surf { fill: none; stroke: rgba(255, 255, 255, 0.95); stroke-width: 3; stroke-dasharray: 2 5; stroke-linecap: butt; }
.nm-walk path, .nm-walk-p { fill: none; stroke: var(--nm-xfer); stroke-width: 3; stroke-dasharray: 2 4; stroke-linecap: round; opacity: .8; }
.nm-walk path { stroke-width: 2; opacity: .55; }
.nm-st { fill: var(--surface-solid); stroke-width: 3.2; cursor: pointer; }
.nm-st.x { stroke: var(--nm-xfer); stroke-width: 3.4; }
.nm-st.w { stroke: var(--nm-xfer); stroke-width: 2.6; stroke-dasharray: 3.2 2.2; }
/* 换乘站标志与地图一致：白底 + 深色外环 + 各线路颜色分段内环 + ⇄ */
#netmap { --nm-ring: #25334a; }
:root[data-theme="dark"] #netmap { --nm-ring: #0e1622; }
.nm-x { cursor: pointer; }
.nm-xo { fill: #fff; stroke: var(--nm-ring); stroke-width: 3.3; transition: stroke-width .15s; }
.nm-x:hover .nm-xo { stroke-width: 4.6; }
.nm-xa { fill: none; stroke-width: 2.3; }
.nm-xg { fill: none; stroke: var(--nm-ring); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nm-st { fill: #fff; }
.nm-tools { display: inline-flex; gap: 2px; padding: 2px; border-radius: 12px; background: var(--hover); }
.nm-tools .hbtn { width: 32px; height: 32px; }
.nm-tools .hbtn .ico { width: 17px; height: 17px; }
.nm-win .stats-head .btn.sm { gap: 6px; }
@media (max-width: 760px) { .nm-hint { display: none; } }
.nm-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 16px 0; flex-wrap: wrap; }
.nm-bar .nm-chips { padding: 0; flex-basis: 100%; max-height: 72px; overflow-y: auto; }
.nm-legend { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.nm-legend > span { display: inline-flex; }
.nm-lg-gap { width: 8px; }
.nm-label { font-size: 20px; }
#netmap { --nm-xfer: #1b365c; }

/* 首次打开：地图在开始界面显示后淡入 */
#map.map-intro { opacity: 0; transition: opacity .9s ease; }
#map.map-intro.map-in { opacity: 1; }

/* 窗口较矮时左侧工具坞改为紧凑尺寸，保证 4 个视图 + 6 个图层按钮都能显示 */
#dock { max-height: calc((100vh - 230px) / var(--uiz, 1)); }
@media (max-height: 860px) {
  #dock { width: 48px; padding: 5px; gap: 2px; top: 70px; }
  #dock .dockbtn { width: 38px; height: 34px; border-radius: 10px; }
  #dock .dockbtn .ico { width: 19px; height: 19px; }
  #dock .dock-sep { margin: 3px 0 2px; }
  #legendCard { left: 70px; top: 70px; }
  #zoomCtl button { width: 34px; height: 32px; }
}
/* ---------------- 地图选择 ---------------- */
.card.mapsel { width: min(940px, calc(100vw - 32px)); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 4px; }
.map-card { display: flex; flex-direction: column; padding: 0; border: 1.5px solid var(--line-strong); border-radius: 16px; overflow: hidden; background: var(--surface-solid); text-align: left; cursor: pointer; color: var(--text); transition: border-color .18s, box-shadow .2s, transform .22s var(--spring); }
.map-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(36, 66, 104, 0.14); }
.map-card.on { border-color: var(--accent); box-shadow: var(--ring), 0 12px 28px rgba(36, 66, 104, 0.14); }
.map-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--hover); overflow: hidden; }
.map-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.map-card:hover .map-thumb img { transform: scale(1.04); }
.map-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(15, 118, 110, 0.92); color: #fff; font-size: 12px; font-weight: 700; }
.map-badge .ico { width: 14px; height: 14px; }
.map-meta { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 12px; }
.map-meta b { font-size: 15.5px; }
.map-meta small { font-size: 12px; color: var(--muted); }
.map-meta small.faint { color: var(--faint); }
.map-detail { margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: var(--hover); animation: riseIn .35s var(--ease) both; }
.map-dh { display: flex; align-items: center; gap: 10px; }
.map-dh h3 { margin: 0; font-size: 19px; }
.map-desc { margin: 8px 0 10px; font-size: 13.5px; line-height: 1.65; }
.map-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.map-facts > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-solid); font-size: 12px; }
.map-facts b { font-size: 13.5px; }
.map-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.map-mode { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--text); text-align: left; cursor: pointer; transition: transform .2s var(--spring), box-shadow .2s, border-color .18s; }
.map-mode:hover:not([disabled]) { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 20px rgba(36, 66, 104, 0.12); }
.map-mode b { display: block; font-size: 14.5px; }
.map-mode small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.map-mode > .ico { width: 16px; height: 16px; color: var(--faint); flex: none; }
.map-mode .badge { width: 36px; height: 36px; border-radius: 11px; }
.map-mode.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(43, 100, 156, 0.3); }
.map-mode.primary small, .map-mode.primary > .ico { color: rgba(255, 255, 255, 0.86); }
.map-mode.primary .badge { background: rgba(255, 255, 255, 0.2); color: #fff; }
.map-mode[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 640px) { .map-actions { grid-template-columns: 1fr; } .map-facts { grid-template-columns: 1fr 1fr; } }
/* ---------------- 新手教程：引导卡片 ---------------- */
#coach { position: fixed; top: 76px; left: 78px; width: 312px; z-index: 22; padding: 12px 14px 12px; border-radius: 16px; display: flex; flex-direction: column; gap: 8px; zoom: var(--uiz, 1); animation: riseIn .35s var(--ease) both; }
#coach.mini { width: 236px; gap: 6px; padding-bottom: 10px; }
#coach .co-head { display: flex; align-items: center; gap: 8px; }
#coach .co-head .iconbtn { width: 26px; height: 26px; }
#coach .co-head .iconbtn .ico { width: 15px; height: 15px; }
#coach .co-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(15, 118, 110, 0.12); color: #0f766e; font-size: 11.5px; font-weight: 700; }
:root[data-theme="dark"] #coach .co-badge { background: rgba(45, 212, 191, 0.14); color: #5eead4; }
#coach .co-badge .ico { width: 13px; height: 13px; }
#coach .co-step { font-size: 12px; color: var(--muted); font-weight: 600; }
#coach .co-bar { height: 4px; border-radius: 3px; background: var(--line); overflow: hidden; }
#coach .co-bar i { display: block; height: 100%; background: var(--grad); border-radius: 3px; transition: width .5s var(--ease); }
#coach .co-title { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 800; }
#coach .co-check { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #16a34a; color: #fff; animation: popIn .45s var(--spring); }
#coach .co-check .ico { width: 14px; height: 14px; }
#coach .co-body { font-size: 13px; line-height: 1.65; }
#coach .co-hint { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.5; }
#coach .co-hint .ico { width: 14px; height: 14px; flex: none; margin-top: 2px; }
#coach .co-acts { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
#coach .co-done { color: #16a34a; font-weight: 800; font-size: 13px; }
#coach .co-mini { font-size: 13px; font-weight: 700; }
#coach.ok { border-color: rgba(22, 163, 74, 0.45); }
body.has-coach #feed { left: max(50%, calc(420px * var(--uiz, 1) + 160px)); }
body.has-coach #legendCard { top: calc(84px + var(--coach-h, 0px) * var(--uiz, 1)); max-height: calc((100vh - 200px) / var(--uiz, 1) - var(--coach-h, 0px)); }
.coach-target { position: relative; z-index: 2; animation: coachPulse 1.3s ease-in-out infinite; }
@keyframes coachPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.7), 0 0 0 2px rgba(20, 184, 166, 0.9); } 50% { box-shadow: 0 0 0 9px rgba(20, 184, 166, 0), 0 0 0 2px rgba(20, 184, 166, 0.9); } }
@media (max-width: 720px) { #coach { left: 70px; width: min(300px, calc(100vw - 86px)); } }

/* ---------------- 列车跟随 ---------------- */
#followCard { position: fixed; left: 0; right: 0; margin: 0 auto; bottom: 16px; z-index: 24; width: min(560px, calc(100vw - 24px)); padding: 12px 14px; border-radius: 18px; display: flex; flex-direction: column; gap: 8px; zoom: var(--uiz, 1); animation: riseIn .35s var(--ease) both; }
#followCard .fc-head { display: flex; align-items: center; gap: 10px; }
#followCard .fc-num { min-width: 30px; height: 26px; padding: 0 7px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }
#followCard .fc-line { font-weight: 800; font-size: 15px; }
#followCard .fc-dir { font-size: 13px; color: var(--muted); }
#followCard .fc-status { font-size: 14px; font-weight: 600; }
#followCard .fc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
#followCard .fc-grid > div { display: flex; flex-direction: column; gap: 1px; padding: 6px 9px; border-radius: 10px; background: var(--hover); font-size: 11.5px; color: var(--muted); }
#followCard .fc-grid b { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
#followCard .fc-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#followCard .fc-acts kbd { margin-left: 4px; }
body.following #toolbar, body.following #buildStack { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(20px); }
body.cinema #hudTop, body.cinema #dock, body.cinema #legendCard, body.cinema #zoomCtl, body.cinema #rightPanel, body.cinema #toolbar, body.cinema #buildStack, body.cinema #feed, body.cinema #coach { opacity: 0 !important; pointer-events: none !important; }
#hudTop, #dock, #legendCard, #zoomCtl, #feed, #coach { transition: opacity .35s var(--ease); }
body.cinema #followCard { width: max-content; max-width: calc(100vw - 24px); min-width: 300px; padding: 9px 16px; background: rgba(12, 20, 32, 0.55); border-color: transparent; color: #fff; backdrop-filter: blur(6px); }
body.cinema #followCard .fc-grid, body.cinema #followCard .fc-acts { display: none; }
body.cinema #followCard .fc-dir, body.cinema #followCard .fc-hint { color: rgba(255, 255, 255, 0.78); }
#followCard .fc-hint { display: none; font-size: 11.5px; }
body.cinema #followCard .fc-hint { display: block; }
@media (max-width: 640px) { #followCard .fc-grid { grid-template-columns: 1fr 1fr; } }
/* ---------------- 统计：里程碑 ---------------- */
.ms-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; background: linear-gradient(120deg, rgba(240, 167, 43, 0.16), rgba(30, 111, 217, 0.08)); border: 1px solid rgba(240, 167, 43, 0.3); }
.ms-medal { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #ffd66b, #e89a12 70%); box-shadow: 0 6px 16px rgba(232, 154, 18, 0.4), inset 0 -3px 6px rgba(0, 0, 0, 0.12); flex: none; }
.ms-count { font-size: 15px; color: var(--muted); }
.ms-count b { font-size: 30px; color: var(--text); margin-right: 2px; }
.ms-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ms-cats { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.ms-cats span, .ms-chips button { display: inline-flex; align-items: center; gap: 5px; }
.ms-cats i, .ms-chips i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ms-cats b { color: var(--text); }
.ms-sec { font-size: 13px; font-weight: 800; margin: 18px 0 8px; color: var(--text); }
.ms-next { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ms-goal { padding: 11px 13px; border-radius: 13px; background: var(--surface-solid); border: 1px solid var(--line); }
.ms-gh { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ms-gi { display: inline-grid; }
.ms-gt { font-size: 15px; font-weight: 700; margin: 4px 0 7px; font-variant-numeric: tabular-nums; }
.ms-bar { height: 7px; border-radius: 5px; background: var(--line); overflow: hidden; }
.ms-bar i { display: block; height: 100%; border-radius: 5px; transition: width .6s var(--ease); }
.ms-chips { display: flex; flex-wrap: wrap; gap: 6px; font-weight: 600; }
.ms-chips button { border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--text); border-radius: 999px; padding: 3px 11px; font-size: 12px; cursor: pointer; }
.ms-chips button.on { border-color: var(--accent); box-shadow: var(--ring); }
.ms-tl { display: flex; flex-direction: column; gap: 4px; }
.ms-year { display: flex; gap: 8px; align-items: flex-start; padding-bottom: 10px; }
.ms-items { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ms-yl { width: 58px; flex: none; font-size: 17px; font-weight: 900; color: var(--muted); padding-top: 6px; position: sticky; top: 0; }
.ms-item { display: flex; gap: 12px; align-items: flex-start; position: relative; animation: riseIn .4s var(--ease) both; }
.ms-item::before { content: ''; position: absolute; left: 15px; top: 30px; bottom: -14px; width: 2px; background: var(--line); }
.ms-year:last-child .ms-item:last-child::before { display: none; }
.ms-dot { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: var(--mc); box-shadow: 0 0 0 3px var(--surface-solid), 0 3px 8px rgba(0, 0, 0, 0.15); position: relative; z-index: 1; }
.ms-card { flex: 1; min-width: 0; padding: 9px 13px 10px; border-radius: 13px; background: var(--surface-solid); border: 1px solid var(--line); }
.ms-t { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ms-d { font-size: 12.5px; color: var(--text); opacity: .85; margin-top: 3px; line-height: 1.5; }
.ms-w { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.ms-item.big .ms-dot { width: 40px; height: 40px; margin-left: -4px; box-shadow: 0 0 0 3px var(--surface-solid), 0 0 0 7px color-mix(in srgb, var(--mc) 22%, transparent), 0 4px 12px rgba(0, 0, 0, 0.18); }
.ms-item.big .ms-card { border-color: color-mix(in srgb, var(--mc) 45%, transparent); background: linear-gradient(120deg, color-mix(in srgb, var(--mc) 10%, var(--surface-solid)), var(--surface-solid) 60%); }
.ms-item.big .ms-t { font-size: 15.5px; }
.ms-item.origin .ms-dot { background: var(--faint); }
.ms-link { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 13px; margin: 2px 0 12px; border-radius: 14px; border: 1px solid rgba(240, 167, 43, 0.35); background: linear-gradient(120deg, rgba(240, 167, 43, 0.14), transparent 70%); color: var(--text); text-align: left; cursor: pointer; transition: transform .2s var(--spring), box-shadow .2s; }
.ms-link:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(232, 154, 18, 0.18); }
.ms-link b { display: block; font-size: 14px; }
.ms-link small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ms-link > .ico { width: 16px; height: 16px; color: var(--faint); }
.ms-medal.sm { width: 36px; height: 36px; }


/* ======================================================================
   1.6：统一的设计语言与交互反馈
   - 所有可点击元素：悬停（背景或轻微上浮）、按压（缩小回弹 + 涟漪）、点击音效、键盘焦点环，一致处理
   - 窗口：圆角 20–24px、同样的标题栏；标签页统一为分段控件 + 滑动指示块；筛选统一为胶囊标签
   - 内容切换：只替换内容区并轻微淡入（swap-in），不重播窗口入场动画
   ====================================================================== */
:root {
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --paper: #fbf8f1; --paper-2: #f1ebdd; --ink: #2b3646;
}
:root[data-theme="dark"] { --paper: #1f2734; --paper-2: #182030; --ink: #d9e1ec; }
button, .clickable, [role="option"], [role="tab"] { position: relative; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rip-wrap { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 0; }
button:focus-visible, [role="option"]:focus-visible, [role="tab"]:focus-visible, .clickable:focus-visible { outline: none; box-shadow: var(--ring); }
.hidden-el { display: none !important; }
.swap-in { animation: swapIn .26s var(--ease) both; }
@keyframes swapIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#screen.noanim .card, #screen.noanim .card * { animation: none !important; }
.stats-win.static { animation: none; }
/* 统计、线路示意图等全屏窗口盖住地图上的消息提示（消息不再压在窗口标题与标签上） */
#stats, #netmap { z-index: 42; }
.card { border-radius: 20px; }
.iconbtn:active, .book-nav:active:not([disabled]), .corner-btn:active, .fchip:active, .tl-dot:active { transform: scale(.94); }
.iconbtn { transition: background .15s, color .15s, transform .2s var(--spring); }
.iconbtn.sm { width: 26px; height: 26px; border-radius: 8px; }
.iconbtn.gone { visibility: hidden; }
.clickable:active { transform: scale(.99); }
.srch-item:hover { background: var(--hover); }
.dropdown button { transition: background .15s, transform .2s var(--spring); }
.dropdown button:active { transform: scale(.98); }

/* 标签页：分段控件 + 滑动指示块（统计面板等） */
.tabs { position: relative; display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-3); margin-left: 16px; flex: none; }
.tabs > button { position: relative; z-index: 1; border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: color .2s; white-space: nowrap; }
.tabs > button .ico { width: 16px; height: 16px; }
.tabs > button:hover { color: var(--text); }
.tabs > button.on { color: var(--accent); }
.tabs-ind { position: absolute; z-index: 0; top: 3px; left: 0; height: calc(100% - 6px); border-radius: 9px; background: var(--surface-solid); box-shadow: var(--shadow-sm); opacity: 0; transition: transform .34s var(--spring), width .28s var(--ease), opacity .2s; pointer-events: none; }
.tabs-ind.ready { opacity: 1; }
.stats-head { gap: 12px; padding: 14px 16px 12px 18px; }
.stats-head h2 { font-size: 18px; }
.stats-page { min-height: 100%; }
.stats-note { margin-top: 16px; }

/* 筛选标签（胶囊）：选图筛选、城市纪事分类、线路示意图线路 */
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip, .nm-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--text); font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: border-color .18s, background .18s, color .18s, box-shadow .2s, transform .2s var(--spring); }
.fchip:hover, .nm-chip:hover { border-color: var(--accent); }
.fchip.on, .nm-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(47, 111, 168, 0.28); }
.nm-chip.on .muted { color: rgba(255, 255, 255, 0.82); }
.fchip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fchip.on i { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8); }
.fchip small { font-weight: 700; font-size: 11px; opacity: .55; }
.fchip.on small { opacity: .85; }

/* 卡片类条目的一致悬停：轻微上浮 + 阴影 */
.map-mode, .msel-item, .msel-feat, .brief-mode, .ms-link, .kpi.clickable { will-change: transform; }
.map-mode:active:not([disabled]), .msel-item:active, .ms-link:active, .start-learn:active { transform: scale(.98); }

/* ---------- 开始界面：右上角按钮组、新手教程入口 ---------- */
.start-corner { position: fixed; top: 18px; right: 18px; display: flex; gap: 8px; z-index: 2; }
.corner-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-solid); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .2s var(--spring), background .2s, box-shadow .2s; }
.corner-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.corner-btn .ico { width: 20px; height: 20px; position: relative; z-index: 1; }
.corner-btn.dot::after { content: ''; position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); border: 2px solid var(--surface-solid); animation: popIn .4s var(--spring); z-index: 2; }
.start-learn { margin-top: 14px; display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); background: rgba(255, 255, 255, 0.55); color: var(--text); cursor: pointer; font-size: 13px; text-align: left; transition: transform .22s var(--spring), border-color .2s, background .2s; }
:root[data-theme="dark"] .start-learn { background: rgba(23, 33, 49, 0.6); }
.start-learn:hover { transform: translateX(4px); border-color: var(--teal); }
.start-learn .ico { color: var(--teal); }
.start-learn span { color: var(--muted); }
.start-learn b { flex: 1; color: var(--teal); }
.start-menu + .start-learn { animation: riseIn .5s var(--ease) .2s both; }

/* ---------- 选择地图：左侧预览与选择，右侧详情 ---------- */
.card.msel { width: min(1180px, calc(100vw - 32px)); height: min(780px, calc(100vh - 40px)); padding: 0; display: grid; grid-template-columns: 372px minmax(0, 1fr); overflow: hidden; outline: none; }
.msel-left { display: flex; flex-direction: column; gap: 12px; padding: 18px 16px 14px 18px; border-right: 1px solid var(--line); background: var(--surface-2); min-height: 0; min-width: 0; }
.msel-head { display: flex; align-items: center; gap: 8px; }
.msel-head h2 { margin: 0; font-size: 19px; }
.msel-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.msel-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 12px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--line-strong); transition: border-color .18s, box-shadow .18s; flex: none; }
.msel-search:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.msel-search > .ico { color: var(--muted); }
.msel-q { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13.5px; min-width: 0; padding: 0; }
.msel-q::-webkit-search-cancel-button { display: none; }
.msel-filters { display: flex; flex-direction: column; gap: 8px; flex: none; }
.msel-frow { display: flex; align-items: flex-start; gap: 6px; }
.msel-fl { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; height: 28px; flex: none; width: 48px; }
.msel-fl .ico { color: var(--accent); }
.msel-frow .fchip { height: 28px; padding: 0 10px; font-size: 12px; }
.msel-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 0 -8px; padding: 2px 8px 6px; scrollbar-width: thin; }
.msel-item { display: flex; gap: 12px; align-items: center; padding: 8px 10px 8px 8px; border-radius: 15px; border: 1.5px solid var(--line); background: var(--surface-solid); color: var(--text); text-align: left; cursor: pointer; transition: border-color .18s, box-shadow .2s, transform .22s var(--spring); flex: none; animation: riseIn .4s var(--ease) both; }
.msel-item:nth-child(2) { animation-delay: .04s; } .msel-item:nth-child(3) { animation-delay: .08s; } .msel-item:nth-child(4) { animation-delay: .12s; } .msel-item:nth-child(n+5) { animation-delay: .16s; }
.msel-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.msel-item.on { border-color: var(--accent); box-shadow: var(--ring), var(--shadow-sm); }
.msel-thumb { position: relative; width: 104px; height: 66px; border-radius: 10px; overflow: hidden; flex: none; background: var(--hover); }
.msel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.msel-item:hover .msel-thumb img, .msel-item.on .msel-thumb img { transform: scale(1.1); }
.msel-flag { position: absolute; left: 5px; top: 5px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(15, 118, 110, 0.92); color: #fff; }
.msel-it { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; position: relative; z-index: 1; }
.msel-it b { font-size: 15px; }
.msel-it small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.msel-prog { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--faint); }
.lvl { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.lvl i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.lvl i.on { background: var(--gold); }
.lvl b { font-weight: 600; margin-left: 2px; }
.msel-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 10px; color: var(--muted); text-align: center; font-size: 12.5px; animation: riseIn .3s var(--ease) both; }
.msel-empty .ico { color: var(--faint); }
.msel-empty b { color: var(--text); font-size: 14px; }
.msel-note { font-size: 11.5px; color: var(--faint); line-height: 1.5; flex: none; }
.msel-detail { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface-solid); }
.msel-dwrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.msel-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 10px; scrollbar-width: thin; }
.msel-hero, .brief-hero { position: relative; height: 230px; border-radius: 18px; overflow: hidden; background: var(--hover); flex: none; }
.msel-hero img, .brief-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 20s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.16) translate(-2%, -2%); } }
.msel-hero::after, .brief-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 36, 0) 25%, rgba(10, 20, 36, 0.8)); }
.msel-hero-tx, .brief-hero-tx { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 1; color: #fff; }
.msel-kicker { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; opacity: .92; letter-spacing: .5px; flex-wrap: wrap; }
.msel-kicker i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .7; }
.msel-hero-tx h2, .brief-hero-tx h2 { margin: 4px 0 2px; font-size: 30px; font-weight: 900; letter-spacing: 1.5px; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25); }
.msel-tagline { font-size: 14px; opacity: .92; }
.msel-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.msel-hero .lvl { color: #fff; background: rgba(255, 255, 255, 0.16); padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.msel-hero .lvl i { background: rgba(255, 255, 255, 0.35); }
.msel-hero .lvl i.on { background: #ffd34d; }
.tag.glass-tag { background: rgba(255, 255, 255, 0.16); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.msel-intro { font-size: 14px; line-height: 1.8; margin: 16px 2px 12px; color: var(--text); }
.msel-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 8px; }
.msel-facts > div { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.msel-facts span { font-size: 11.5px; color: var(--muted); }
.msel-facts b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel-sec { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; margin: 18px 2px 9px; color: var(--text); }
.msel-sec .ico { color: var(--accent); }
.msel-feats, .brief-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.msel-feat, .brief-mode { display: flex; gap: 11px; align-items: flex-start; padding: 11px 12px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line); animation: riseIn .4s var(--ease) both; transition: transform .22s var(--spring), box-shadow .2s, border-color .18s; }
.msel-feat:hover, .brief-mode:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.msel-feat .badge, .brief-mode .badge { width: 34px; height: 34px; border-radius: 11px; }
.msel-feat b, .brief-mode b { display: block; font-size: 13.5px; }
.msel-feat small, .brief-mode small { display: block; font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 2px; }
.msel-tl { position: relative; display: flex; padding: 2px 2px 6px; overflow-x: auto; scrollbar-width: thin; }
.msel-tl::before { content: ''; position: absolute; left: 6px; right: 6px; top: 31px; height: 2px; background: var(--line-strong); border-radius: 2px; }
.msel-ev { position: relative; flex: 1 1 0; min-width: 104px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 12px; animation: riseIn .4s var(--ease) both; }
.msel-ev:nth-child(2) { animation-delay: .05s; } .msel-ev:nth-child(3) { animation-delay: .1s; } .msel-ev:nth-child(4) { animation-delay: .15s; } .msel-ev:nth-child(n+5) { animation-delay: .2s; }
.msel-ev b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; height: 18px; }
.msel-ev i { width: 13px; height: 13px; border-radius: 50%; background: var(--surface-solid); border: 3px solid var(--accent); position: relative; z-index: 1; transition: transform .2s var(--spring); }
.msel-ev:hover i { transform: scale(1.3); }
.msel-ev.start i { border-color: var(--gold); background: var(--gold); }
.msel-ev span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.msel-dwrap > .map-actions { padding: 12px 22px 18px; margin: 0; border-top: 1px solid var(--line); background: var(--surface-solid); flex: none; }
.map-mode .grow { position: relative; z-index: 1; }

/* ---------- 开局简报 ---------- */
.card.brief { width: min(760px, calc(100vw - 32px)); padding: 0; display: flex; flex-direction: column; max-height: calc(100vh - 40px); overflow: hidden; }
.brief-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 10px; scrollbar-width: thin; }
.brief-hero { height: 176px; }
.brief-inherit { position: relative; overflow: hidden; margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px 12px 20px; border-radius: 16px; background: linear-gradient(110deg, color-mix(in srgb, var(--lc) 16%, var(--surface-solid)), var(--surface-solid) 72%); border: 1px solid color-mix(in srgb, var(--lc) 45%, transparent); animation: riseIn .45s var(--ease) .05s both; }
.brief-inherit .bi-line { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--lc); }
.brief-inherit .badge { background: var(--lc); color: #fff; width: 40px; height: 40px; border-radius: 12px; }
.brief-inherit b { font-size: 16px; }
.brief-inherit small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.bi-stats { display: flex; gap: 16px; }
.bi-stats div { display: flex; flex-direction: column; align-items: center; }
.bi-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.bi-stats span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.brief-lead { font-size: 14.5px; line-height: 1.85; margin: 14px 2px 4px; }
.brief-mode:nth-child(n) { animation-delay: inherit; }
.brief-tasks { display: flex; flex-direction: column; gap: 6px; }
.brief-tasks > div { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.brief-tasks .ico { color: var(--accent); flex: none; }
.brief-tasks span { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.brief-acts { display: flex; align-items: center; gap: 8px; padding: 12px 22px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- 更新公告 ---------- */
.card.news { width: min(640px, calc(100vw - 32px)); }
.news-list { display: flex; flex-direction: column; }
.news-list .sec-h { padding: 12px 4px; gap: 10px; }
.news-v { font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 8px; background: var(--surface-3); color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.news-v.cur { background: var(--grad); color: #fff; }
.news-t { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-d { font-size: 12px; color: var(--faint); font-weight: 500; flex: none; }
.news-b { margin: 0 0 8px; padding-left: 20px; font-size: 13px; line-height: 1.8; }
.news-b li::marker { color: var(--accent); }

/* ---------- 城市纪事：书页、简笔画、时间轴 ---------- */
.ms-head2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ms-ttl { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ms-ttl .badge { width: 42px; height: 42px; border-radius: 13px; }
.ms-ttl h3 { margin: 0; font-size: 20px; font-family: var(--serif); letter-spacing: 2px; }
.ms-ttl small { font-size: 12px; color: var(--muted); }
.book-area { display: flex; align-items: center; gap: 12px; }
.book-nav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--text); display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: var(--shadow-sm); transition: transform .2s var(--spring), box-shadow .2s, opacity .2s; }
.book-nav .ico { position: relative; z-index: 1; }
.book-nav:hover:not([disabled]) { transform: scale(1.08); box-shadow: var(--shadow); }
.book-nav[disabled] { opacity: .3; cursor: default; box-shadow: none; }
.book { flex: 1; min-width: 0; perspective: 1600px; touch-action: pan-y; user-select: none; }
.spread { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 430px; border-radius: 16px; border: 1px solid var(--line); background: radial-gradient(130% 100% at 50% 0%, var(--paper) 62%, var(--paper-2)); box-shadow: 0 18px 40px rgba(36, 66, 104, 0.16), 0 3px 0 -1px var(--paper-2), 0 6px 0 -2px var(--line-strong); }
:root[data-theme="dark"] .spread { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), 0 3px 0 -1px var(--paper-2), 0 6px 0 -2px rgba(255, 255, 255, 0.08); }
.spread::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 40px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.11) 50%, rgba(0, 0, 0, 0.05) 60%, transparent); pointer-events: none; }
.book.single .spread { grid-template-columns: 1fr; min-height: 0; }
.book.single .spread::after { display: none; }
.spread.turn-next { animation: turnNext .45s var(--ease) both; transform-origin: left center; }
.spread.turn-prev { animation: turnPrev .45s var(--ease) both; transform-origin: right center; }
@keyframes turnNext { from { opacity: 0; transform: translateX(28px) rotateY(-9deg); } to { opacity: 1; transform: none; } }
@keyframes turnPrev { from { opacity: 0; transform: translateX(-28px) rotateY(9deg); } to { opacity: 1; transform: none; } }
.pg { position: relative; padding: 22px 30px 18px; display: flex; flex-direction: column; color: var(--ink); min-width: 0; }
.pg-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.pg-date { font-family: var(--serif); font-weight: 700; font-size: 13.5px; letter-spacing: 1px; color: color-mix(in srgb, var(--ink) 70%, transparent); }
.pg-cat { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--mc); }
.pg-cat i { width: 8px; height: 8px; border-radius: 50%; background: var(--mc); }
.pg-art { display: grid; place-items: center; margin: 10px 0 4px; }
.sk { width: min(100%, 290px); height: auto; aspect-ratio: 200 / 130; color: var(--ink); overflow: visible; }
.sk path, .sk circle, .sk rect, .sk ellipse { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sk .w { fill: var(--mc); fill-opacity: .2; stroke: none; }
.sk .c { stroke: var(--mc); }
.sk .wf { fill: var(--paper); }
.pg-title { align-self: flex-start; font-family: var(--serif); font-size: 21px; font-weight: 800; margin: 8px 0 6px; line-height: 1.4; letter-spacing: .5px; color: var(--ink); background: linear-gradient(transparent 64%, color-mix(in srgb, var(--mc) 24%, transparent) 64%); }
.pg.big .pg-title { font-size: 23px; }
.pg-desc { font-size: 13.5px; line-height: 1.85; margin: 0; color: color-mix(in srgb, var(--ink) 82%, transparent); }
.pg-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: color-mix(in srgb, var(--ink) 50%, transparent); }
.pg-no { font-family: var(--serif); letter-spacing: 2px; }
.pg.blank .pg-title { color: color-mix(in srgb, var(--ink) 55%, transparent); background: none; }
.pg-goals { display: grid; gap: 10px; margin-top: 14px; }
.pg-goals > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 12px; align-items: baseline; }
.pg-goals span { color: color-mix(in srgb, var(--ink) 60%, transparent); }
.pg-goals b { font-variant-numeric: tabular-nums; }
.pg-goals .ms-bar { grid-column: 1 / -1; height: 6px; }
.tl-wrap { margin-top: 18px; padding: 12px 14px 8px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--line); }
.tl-h { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; margin-bottom: 4px; }
.tl-h .ico { color: var(--accent); }
.tl-box { overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; }
.tl-track { position: relative; display: flex; width: max-content; min-width: 100%; padding: 0 8px; }
.tl-track::before { content: ''; position: absolute; left: 8px; right: 8px; top: 37px; height: 2px; background: var(--line-strong); border-radius: 2px; }
.tl-it { width: 34px; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.tl-y { height: 18px; font-size: 11.5px; font-weight: 800; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl-dot { width: 26px; height: 26px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; display: grid; place-items: center; padding: 0; transition: transform .2s var(--spring); }
.tl-dot i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-solid); border: 3px solid var(--mc); transition: transform .25s var(--spring), background .2s, box-shadow .2s; position: relative; z-index: 1; }
.tl-dot.big i { width: 15px; height: 15px; }
.tl-dot:hover i { transform: scale(1.3); }
.tl-dot.on i { background: var(--mc); transform: scale(1.35); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mc) 25%, transparent); }
.ms-link.alt { border-color: rgba(47, 111, 168, 0.3); background: linear-gradient(120deg, var(--accent-soft), transparent 70%); }
.ms-link.alt:hover { box-shadow: 0 6px 16px rgba(47, 111, 168, 0.16); }
.ms-medal.alt { background: radial-gradient(circle at 35% 30%, #8fc2f2, #2f6fa8 72%); box-shadow: 0 6px 16px rgba(47, 111, 168, 0.35), inset 0 -3px 6px rgba(0, 0, 0, 0.12); }
.ms-link > * { position: relative; z-index: 1; }

/* ======================================================================
   手机与平板：窄屏重新排布（顶栏两行、详情改为底部抽屉、窗口全屏、选图上下排列）
   ====================================================================== */
@media (max-width: 760px) {
  #hudTop { top: calc(8px + env(safe-area-inset-top)); left: 8px; right: 8px; flex-wrap: wrap; gap: 6px; }
  #hudTop .spacer { display: none; }
  .citybar { flex: 1 1 100%; min-width: 0; padding: 4px; gap: 4px; }
  .citybar .speed { margin-left: auto; }
  .brand { width: 36px; height: 36px; border-radius: 11px; }
  .brand img { width: 28px; height: 28px; }
  .pill { height: 38px; padding: 3px 8px 3px 4px; gap: 6px; }
  .pill .badge { width: 26px; height: 26px; }
  .pill .v { font-size: 13.5px; }
  .dayring { width: 30px; height: 30px; }
  .dayring .ico { inset: 7px; width: 16px; height: 16px; }
  .speed .sbtn { height: 30px; min-width: 32px; padding: 0 6px; }
  .cluster.metrics { flex: 1 1 0; padding: 3px; }
  .cluster.actions { padding: 3px; }
  .hbtn { width: 36px; height: 38px; }
  .hbtn.wide-only { display: none; }
  #dock { top: calc(104px + env(safe-area-inset-top)); left: 8px; width: 46px; padding: 4px; gap: 2px; max-height: calc(100vh - 260px); }
  #dock .dockbtn { width: 38px; height: 34px; border-radius: 10px; }
  #dock .dockbtn .ico { width: 19px; height: 19px; }
  #legendCard { top: calc(104px + env(safe-area-inset-top)); left: 60px; width: min(268px, calc(100vw - 70px)); }
  #rightPanel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 62vh; border-radius: 20px 20px 0 0; z-index: 14; padding-bottom: env(safe-area-inset-bottom); }
  #rightPanel.closed { transform: translateY(calc(100% + 24px)); }
  #rightPanel::before { content: ''; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line-strong); }
  #toolbar { bottom: calc(10px + env(safe-area-inset-bottom)); padding: 4px; border-radius: 18px; }
  .tbtn { width: 46px; height: 46px; border-radius: 14px; }
  .tind { top: 4px; height: calc(100% - 8px); border-radius: 14px; }
  #buildStack { bottom: calc(68px + env(safe-area-inset-bottom)); max-width: calc(100vw - 16px); }
  #draftbar { max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; }
  #zoomCtl { left: 8px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 3px; }
  #zoomCtl button { width: 36px; height: 34px; }
  #feed { top: calc(110px + env(safe-area-inset-top)); left: 60px; right: 8px; width: auto; max-width: none; min-width: 0; transform: none; }
  #app:has(#legendCard:not(.hidden)) .pausechip { display: none; }
  .toast { max-width: calc(100vw - 24px); font-size: 12.5px; }
  #coach { top: calc(104px + env(safe-area-inset-top)); left: 60px; right: 8px; width: auto; }
  body.has-coach #feed { left: 50%; top: auto; bottom: 140px; }
  .search-pop { left: 8px !important; right: 8px !important; width: auto; }
  .dropdown { max-width: calc(100vw - 16px); }
  #screen { place-items: center; }
  .card { width: calc(100vw - 16px); max-height: calc(100vh - 16px); padding: 18px 16px; }
  /* 开始界面 */
  #screen.start { background: linear-gradient(180deg, rgba(239, 245, 250, 0.94) 0%, rgba(239, 245, 250, 0.82) 60%, rgba(239, 245, 250, 0.55) 100%); place-items: center; }
  :root[data-theme="dark"] #screen.start { background: linear-gradient(180deg, rgba(15, 23, 36, 0.94) 0%, rgba(15, 23, 36, 0.8) 60%, rgba(15, 23, 36, 0.5) 100%); }
  .start-wrap { margin: 0 auto; width: calc(100vw - 40px); max-width: 420px; }
  .start-title { font-size: 46px; }
  .title-deco { margin-bottom: 22px; }
  .start-btn { height: 54px; font-size: 16.5px; }
  .start-corner { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
  /* 选择地图：上方横向列表，下方详情 */
  .card.msel { width: calc(100vw - 12px); height: calc(100vh - 12px); grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); padding: 0; }
  .msel-left { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 12px 10px; gap: 9px; }
  .msel-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; flex: none; margin: 0 -12px; padding: 2px 12px 6px; }
  .msel-item { width: 236px; }
  .msel-thumb { width: 72px; height: 54px; }
  .msel-note { display: none; }
  .msel-scroll, .brief-scroll { padding: 12px 12px 8px; }
  .msel-hero, .brief-hero { height: 150px; }
  .msel-hero-tx h2, .brief-hero-tx h2 { font-size: 23px; }
  .msel-feats, .brief-modes { grid-template-columns: 1fr; }
  .msel-dwrap > .map-actions { padding: 8px 10px 10px; grid-template-columns: 1fr 1fr; gap: 6px; }
  .msel-dwrap .map-mode { padding: 8px 10px; gap: 8px; }
  .msel-dwrap .map-mode small { display: none; }
  .msel-dwrap .map-mode b { font-size: 13px; }
  .msel-dwrap .map-mode .badge { width: 30px; height: 30px; border-radius: 9px; }
  .msel-dwrap .map-mode > .ico { display: none; }
  .msel-frow .fchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .msel-frow { align-items: center; }
  .brief-acts { padding: 10px 12px 12px; }
  .brief-acts > .tiny { flex-basis: 100%; }
  /* 统计、线路示意图：全屏 */
  .stats-win { width: 100vw; height: 100vh; border-radius: 0; }
  .stats-head { flex-wrap: wrap; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; gap: 8px; }
  .tabs { order: 5; margin-left: 0; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs > button { flex: 1 0 auto; justify-content: center; padding: 7px 10px; }
  .stats-body { padding: 12px 12px 18px; }
  .chart-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi .val { font-size: 20px; }
  .book-area { gap: 6px; }
  .book-nav { width: 34px; height: 34px; }
  .pg { padding: 16px 16px 14px; }
  .pg-title { font-size: 19px; }
  .ms-head2 .fchips { width: 100%; }
  .nm-win .stats-head .btn.sm { display: none; }
}
@media (max-width: 760px) and (max-height: 620px) { #dock { max-height: calc(100vh - 200px); } }
/* 触屏：没有悬停，不显示按钮提示气泡；地图缩放按钮可用双指代替，只保留「全图」 */
@media (pointer: coarse) {
  #uitip { display: none !important; }
  .pausechip kbd, .pausechip .muted { display: none; }
  .search-pop .srch-in kbd { display: none; }
  #zoomCtl button[data-tip="放大"], #zoomCtl button[data-tip="缩小"] { display: none; }
}

/* 地理线网：保留原始地形轮廓，使用淡色让线路与车站保持清晰 */
#netmap { --nm-water: #dcecf8; --nm-water-edge: #c3dcf0; --nm-green: #e6f2e2; --nm-wlabel: #6f9cc4; }
:root[data-theme="dark"] #netmap { --nm-water: #1c3249; --nm-water-edge: #24405d; --nm-green: #1c2c26; --nm-wlabel: #6f95bd; }
.nm-water { fill: var(--nm-water); stroke: none; }
.nm-river path { stroke: var(--nm-water); }
.nm-river .nm-river-area { fill: var(--nm-water); stroke: none; }
.nm-green { fill: var(--nm-green); opacity: .65; }
.nm-terrain.simple .nm-green { opacity: .4; }
.nm-wlabel { font-size: 12.5px; font-style: italic; letter-spacing: 2px; fill: var(--nm-wlabel); pointer-events: none; }
.nm-svg.focusing .nm-terrain { opacity: .6; }
.nm-tools .hbtn.on { color: var(--accent); background: var(--accent-soft); }
.nm-tools .hbtn:disabled { opacity: .35; cursor: not-allowed; background: transparent; box-shadow: none; transform: none; }
@media (max-width: 760px) { .nm-win .nm-legend { display: none; } }
@media (max-width: 760px) {
  .nm-bar .nm-chips { flex-wrap: nowrap; max-height: none; overflow-x: auto; }
  .nm-chips .nm-chip { flex: none; }
  .nm-canvas { margin: 8px; }
}

/* ---------- 财政：账本分组、债券、债务与流水 ---------- */
.fl-g { margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.fl-h { font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.fl-g.in .fl-h { color: var(--good); } .fl-g.fin .fl-h { color: #7c5cd6; } .fl-g.out .fl-h { color: var(--warn); } .fl-g.debt .fl-h { color: var(--bad); }
.tbl-wrap { overflow-x: auto; }
.tag.fin { background: rgba(124, 92, 214, 0.14); color: #7c5cd6; margin-left: 6px; }
.bond-row { padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
.bond-bar { height: 8px; border-radius: 5px; background: var(--surface-3); overflow: hidden; margin: 6px 0 4px; }
.bond-bar i { display: block; height: 100%; border-radius: 5px; background: var(--grad); transition: width .4s var(--ease); }
.debt-card { padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-solid); margin: 6px 0; }
.flow-list { display: flex; flex-direction: column; }
.flow-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px; align-items: baseline; padding: 5px 2px; border-bottom: 1px solid var(--line); font-size: 12px; }
.flow-d { color: var(--faint); font-variant-numeric: tabular-nums; }
.flow-a { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card.bond-dlg { width: min(560px, calc(100vw - 32px)); }
.bond-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.bond-kind { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px 13px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface-solid); color: var(--text); cursor: pointer; transition: border-color .18s, box-shadow .2s, transform .22s var(--spring); }
.bond-kind:hover:not([disabled]) { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.bond-kind.on { border-color: var(--accent); box-shadow: var(--ring); }
.bond-kind[disabled] { opacity: .5; cursor: not-allowed; }
.bond-kind b { font-size: 15px; } .bond-kind small { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.bk-rate { font-size: 20px; font-weight: 800; color: var(--accent); margin-top: 4px; font-variant-numeric: tabular-nums; }
.bk-rate small { font-size: 11px; font-weight: 500; }
@media (max-width: 760px) { .bond-kinds { grid-template-columns: 1fr; } .flow-row { grid-template-columns: 64px 1fr auto; } }
/* ===== 经济小知识（教程 / 操作说明） ===== */
.card.eg-card { width: min(560px, 94vw); max-height: 88vh; overflow: auto; }
.eg { display: flex; flex-direction: column; gap: 10px; }
.eg-sec { border: 1px solid var(--line, rgba(0,0,0,.08)); border-radius: 12px; padding: 10px 12px; }
.eg-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.eg-h .badge { width: 26px; height: 26px; border-radius: 8px; }
.eg ul { margin: 0; padding-left: 20px; }
.eg li { font-size: 13px; line-height: 1.65; }

/* ======================================================================
   v1.8 财政与经济面板：分页、资金卡、本月收支、经济卡、拨款依据、增长来源、事件、利率报价
   ====================================================================== */
.pill.gone { display: none !important; }
.ptabs { position: sticky; top: -12px; z-index: 3; display: flex; gap: 2px; padding: 3px; margin: -2px 0 10px; border-radius: 12px; background: var(--surface-3); box-shadow: 0 6px 10px -8px rgba(0, 0, 0, 0.18); }
.ptabs button { flex: 1 1 0; min-width: 0; border: 0; background: transparent; padding: 6px 4px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: background .18s, color .18s, box-shadow .2s; white-space: nowrap; }
.ptabs button .ico { width: 15px; height: 15px; }
.ptabs button:hover { color: var(--text); }
.ptabs button.on { background: var(--surface-solid); color: var(--accent); box-shadow: var(--shadow-sm); }
.fin-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.fin-cards .stat { padding: 8px 9px; }
.fin-cards .stat .v { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-cards .stat .d { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-free { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--teal-soft); margin-bottom: 8px; }
.fin-free b { display: block; font-size: 13.5px; }
.fin-free small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.fin-month, .fin-grant, .econ-card, .fisc-card, .quote-card { border: 1px solid var(--line); background: var(--surface-solid); border-radius: 14px; padding: 9px 11px; margin: 8px 0; }
.fm-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.fm-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.5px; border-bottom: 1px dashed var(--line); }
.fm-row:last-of-type { border-bottom: 0; }
.fm-row > .ico { width: 15px; height: 15px; color: var(--faint); }
.fm-row.in b { color: var(--good); } .fm-row.out b { color: var(--warn); } .fm-row.debt b { color: var(--bad); }
.linkbtn { border: 0; background: transparent; color: var(--accent); font-weight: 600; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; padding: 4px 0 0; }
.linkbtn .ico { width: 14px; height: 14px; }
.linkbtn:hover { text-decoration: underline; }
.econ-card.clickable, .fin-grant.clickable { cursor: pointer; transition: border-color .18s, box-shadow .2s, transform .2s var(--spring); }
.econ-card.clickable:hover, .fin-grant.clickable:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.ec-top { display: flex; align-items: center; gap: 10px; }
.ec-top > .ico { width: 14px; height: 14px; color: var(--faint); }
.ec-top small { display: block; font-size: 11.5px; color: var(--muted); }
.ec-top b.num { display: block; font-size: 19px; font-weight: 800; letter-spacing: .2px; }
.env-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--accent-soft); color: var(--accent); }
.env-chip .ico { width: 13px; height: 13px; }
.env-chip.good { background: var(--good-soft); color: var(--good); } .env-chip.warn { background: var(--warn-soft); color: var(--warn); } .env-chip.bad { background: var(--bad-soft); color: var(--bad); }
.ec-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.ec-row > div { background: var(--surface-2); border-radius: 10px; padding: 6px 8px; min-width: 0; }
.ec-row small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-row b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ec-shock { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; font-size: 11.5px; color: var(--warn); line-height: 1.5; }
.ec-shock .ico { width: 13px; height: 13px; margin-top: 2px; flex: none; }
.fg-h { display: flex; align-items: center; gap: 7px; }
.fg-h > .ico { width: 16px; height: 16px; color: var(--accent); }
.fg-h > .ico:last-child { width: 14px; height: 14px; color: var(--faint); }
.gchain { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px; margin-top: 8px; }
.gc-step { display: flex; flex-direction: column; padding: 5px 8px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.gc-step small { font-size: 10.5px; color: var(--muted); }
.gc-step b { font-size: 12.5px; }
.gc-step.up b { color: var(--good); } .gc-step.down b { color: var(--bad); }
.gchain.compact .gc-step { padding: 3px 7px; }
.econ-env { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.econ-env > div { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.econ-env small { font-size: 11px; color: var(--muted); }
.econ-env b { font-size: 14px; } .econ-env b.good { color: var(--good); } .econ-env b.bad { color: var(--bad); } .econ-env b.warn { color: var(--warn); } .econ-env b.info { color: var(--accent); }
.econ-env .tiny { line-height: 1.35; }
.econ-fc { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: 11px; border: 1px dashed var(--line-strong); margin: 4px 0 6px; line-height: 1.5; }
.tag.fc { background: rgba(214, 140, 0, 0.12); color: var(--warn); border: 1px dashed currentColor; padding: 1px 7px; }
td .tag { margin-left: 4px; padding: 0 6px; font-size: 10px; }
.dbars { display: flex; flex-direction: column; gap: 6px; }
.dbar { display: grid; grid-template-columns: 96px 1fr 62px; gap: 8px; align-items: center; font-size: 12px; }
.dl { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--muted); }
.dl .ico { width: 14px; height: 14px; }
.dt { position: relative; height: 10px; border-radius: 5px; background: var(--surface-3); }
.dt::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-strong); }
.dt i { position: absolute; top: 0; bottom: 0; border-radius: 5px; transition: width .4s var(--ease), left .4s var(--ease); }
.dt i.pos { background: var(--good); } .dt i.neg { background: var(--bad); }
.dbar b { text-align: right; }
.ev-card { padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--warn); background: var(--surface-solid); margin: 6px 0; }
.ev-card.pos { border-left-color: var(--good); }
.ev-card .row { flex-wrap: wrap; gap: 6px; }
.ev-fx { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; align-items: baseline; }
.econ-tbl td, .econ-tbl th { white-space: nowrap; }
.econ-tbl tr.fc td { color: var(--warn); background: var(--warn-soft); }
.econ-tbl td.ref { color: #b06a2a; }
:root[data-theme="dark"] .econ-tbl td.ref { color: #e3a46b; }
.quote-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; margin: 8px 0 2px; align-items: baseline; }
.quote-grid .qh { font-size: 11px; color: var(--muted); text-align: right; }
.quote-grid .qk { font-weight: 600; font-size: 13px; }
.quote-grid .qv { font-size: 16px; font-weight: 800; color: var(--accent); text-align: right; font-variant-numeric: tabular-nums; }
.quote-grid .qv.off { color: var(--faint); text-decoration: line-through; }
.quote-card .sec { margin-top: 4px; }
.qline { margin-top: 8px; padding: 7px 9px; border-radius: 10px; background: var(--surface-2); font-size: 11.5px; line-height: 1.7; }
@media (max-width: 760px) {
  .fin-cards, .ec-row, .econ-env { grid-template-columns: 1fr 1fr; }
  .dbar { grid-template-columns: 82px 1fr 56px; }
}

/* ---------- v1.8 任务面板 ---------- */
.tk-card { position: relative; padding: 11px 12px 10px; border-radius: 15px; border: 1px solid var(--line); background: var(--surface-solid); margin: 8px 0; box-shadow: 0 1px 2px rgba(36, 66, 104, 0.04); transition: border-color .2s, box-shadow .2s; }
.tk-card::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); opacity: .55; }
.tk-card.warm::before { background: var(--warn); opacity: .9; }
.tk-card.hot { border-color: rgba(216, 58, 58, 0.35); }
.tk-card.hot::before { background: var(--bad); opacity: 1; }
.tk-card.ok { border-color: rgba(31, 146, 84, 0.35); }
.tk-card.ok::before { background: var(--good); opacity: 1; }
.tk-top { display: flex; gap: 10px; align-items: center; }
.tk-top .badge { width: 34px; height: 34px; border-radius: 11px; }
.tk-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.tk-title { display: block; font-size: 13.5px; line-height: 1.4; }
.tk-ring { position: relative; width: 46px; height: 46px; flex: none; display: grid; place-items: center; }
.tk-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.tk-ring circle { fill: none; stroke-width: 4.5; }
.tk-ring .bg { stroke: var(--surface-3); }
.tk-ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); }
.tk-ring.ok .fg { stroke: var(--good); }
.tk-ring b { position: relative; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tk-ring b small { font-size: 9px; font-weight: 600; color: var(--muted); }
.tk-desc { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 7px 0 6px; }
.tk-anchors { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 6px; }
.tk-anchor { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border-radius: 999px; border: 1px dashed var(--line-strong); background: var(--surface-2); color: var(--muted); font-size: 11.5px; cursor: pointer; transition: background .15s, border-color .15s; }
.tk-anchor .ico { width: 13px; height: 13px; }
.tk-anchor:hover { border-color: var(--accent); color: var(--text); }
.tk-anchor.on { border-style: solid; border-color: rgba(31, 146, 84, 0.4); background: var(--good-soft); color: var(--good); font-weight: 600; }
.tk-goal { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; line-height: 1.5; padding: 6px 8px; border-radius: 9px; background: var(--surface-2); }
.tk-goal .ico { width: 14px; height: 14px; color: var(--accent); margin-top: 2px; flex: none; }
.tk-sustain { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 6px; }
.tk-dots { display: inline-flex; gap: 4px; }
.tk-dots i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--good); }
.tk-dots i.on { background: var(--good); }
.tk-time { margin-top: 8px; }
.tk-tbar { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.tk-tbar i { display: block; height: 100%; border-radius: 3px; background: var(--faint); }
.tk-card.warm .tk-tbar i { background: var(--warn); }
.tk-card.hot .tk-tbar i { background: var(--bad); }
.tk-tl { display: flex; align-items: center; gap: 6px; font-size: 11.5px; margin-top: 4px; flex-wrap: wrap; }
.tk-tl .ico { width: 13px; height: 13px; color: var(--muted); }
.tk-card.warm .tk-tl b { color: var(--warn); } .tk-card.hot .tk-tl b { color: var(--bad); }
.tk-stakes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tk-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.tk-chip .ico { width: 13px; height: 13px; }
.tk-chip.good { background: var(--good-soft); color: var(--good); }
.tk-chip.bad { background: var(--bad-soft); color: var(--bad); }
.tk-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.tk-row b { display: block; font-size: 13px; margin: 1px 0; }
.tk-res { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 2px; }
.tk-res .ico { width: 14px; height: 14px; }
.tk-row.ok .tk-res { background: var(--good-soft); color: var(--good); }
.tk-row.fail .tk-res { background: var(--bad-soft); color: var(--bad); }
.tk-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 26px 12px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.tk-empty .ico { color: var(--faint); }
.tk-empty b { color: var(--text); font-size: 14px; }
.tk-next { margin: 10px 0 4px; padding: 8px 10px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.tk-next .tiny { padding: 2px 0; }

/* ---------- v1.8 推进完成报告 ---------- */
.toast.has-act { padding-right: 10px; }
.toast-act { flex: none; margin-left: 4px; }
.card.jr { width: min(720px, calc(100vw - 32px)); padding: 20px 22px 16px; display: flex; flex-direction: column; overflow: hidden; }
.card.jr .card-head { margin-bottom: 10px; }
.jr-scroll { overflow-y: auto; min-height: 0; flex: 1; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.jr-tl { display: flex; align-items: flex-start; padding: 6px 4px 2px; margin-bottom: 4px; position: relative; }
.jr-tl::before { content: ''; position: absolute; left: 10px; right: 10px; top: 13px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent-soft), var(--accent)); }
.jr-m { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.jr-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-solid); border: 2px solid var(--line-strong); position: relative; z-index: 1; display: flex; gap: 1px; align-items: center; justify-content: center; overflow: hidden; }
.jr-dot.on { width: 16px; height: 16px; margin-top: -3px; border: 2px solid var(--surface-solid); box-shadow: 0 0 0 1px var(--line-strong); }
.jr-dot b { flex: 1; height: 100%; }
.jr-m.first .jr-dot, .jr-m.last .jr-dot { border-color: var(--accent); }
.jr-m span { font-size: 10.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.jr-sec { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; margin: 14px 2px 8px; }
.jr-sec > .ico { color: var(--accent); }
.jr-sec .linkbtn { margin-left: auto; padding: 0; }
.jr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.jr-tile { padding: 9px 10px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; animation: riseIn .4s var(--ease) both; }
.jr-tile:nth-child(2) { animation-delay: .03s; } .jr-tile:nth-child(3) { animation-delay: .06s; } .jr-tile:nth-child(4) { animation-delay: .09s; } .jr-tile:nth-child(n+5) { animation-delay: .12s; }
.jt-k { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.jt-k .ico { width: 15px; height: 15px; }
.jt-v { font-size: 18px; font-weight: 800; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jt-d { font-size: 11.5px; font-weight: 700; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jt-b { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-econ { padding: 9px 11px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface-solid); }
.je-row { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-size: 12.5px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.je-row:last-of-type { border-bottom: 0; }
.je-env { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.jr-fin { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.jr-fin > div { padding: 7px 9px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.jr-fin small { display: block; font-size: 11px; color: var(--muted); }
.jr-fin b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.jr-fin .jf-net { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; }
.jr-tasks { display: flex; flex-direction: column; gap: 5px; }
.jr-task { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; background: var(--surface-2); }
.jr-task span { flex: 1; min-width: 0; }
.jr-task em { font-style: normal; font-size: 11px; font-weight: 700; }
.jr-task.ok { background: var(--good-soft); } .jr-task.ok .ico, .jr-task.ok em { color: var(--good); }
.jr-task.bad { background: var(--bad-soft); } .jr-task.bad .ico, .jr-task.bad em { color: var(--bad); }
.jr-task.new .ico, .jr-task.new em { color: var(--accent); }
.jr-evs { display: flex; flex-direction: column; }
.jr-ev { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.jr-ed { width: 56px; flex: none; color: var(--faint); font-variant-numeric: tabular-nums; }
.jr-ec { flex: none; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 999px; border: 1px solid; }
@media (max-width: 760px) { .jr-grid { grid-template-columns: 1fr 1fr; } .card.jr { padding: 16px 14px 12px; } }
.jr-tl { overflow: hidden; padding-bottom: 18px; }
.jr-m span { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); }
.jr-m.first span { left: 0; transform: none; }
.jr-m.last span { left: auto; right: 0; transform: none; }
/* 统计窗口在窄屏放下五个分页：隐藏分页图标 */
@media (max-width: 480px) { .stats-head .tabs > button { padding: 7px 6px; font-size: 12.5px; } .stats-head .tabs > button .ico { display: none; } }

/* ---------- v1.8 存档状态与消息位置 ---------- */
.hbtn.saving-dot::after { content: ''; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface-solid); animation: blink 1s ease-in-out infinite; }
#feed { transition: left .32s var(--ease), max-width .32s var(--ease); }

/* ---------- v1.8 绘线起点的线路选择框 ---------- */
.line-picker { position: fixed; z-index: 45; width: 280px; padding: 9px; display: flex; flex-direction: column; gap: 4px; zoom: var(--uiz, 1); animation: riseIn .22s var(--ease) both; transition: opacity .18s, transform .18s; }
.line-picker.out { opacity: 0; transform: scale(.97); pointer-events: none; }
.lp-h { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.lp-h > .ico { color: var(--accent); }
.lp-h b { flex: 1; min-width: 0; }
.lp-h .iconbtn { width: 26px; height: 26px; }
.lp-sub { margin: -2px 0 4px 21px; }
.lp-opt { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-solid); color: var(--text); cursor: pointer; text-align: left; transition: border-color .15s, background .15s, transform .18s var(--spring); }
.lp-opt:hover { border-color: var(--accent); transform: translateX(2px); }
.lp-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.lp-opt > .ico { color: var(--accent); width: 15px; height: 15px; }
.lp-opt b { display: block; font-size: 13px; }
.lp-opt small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-opt .grow { min-width: 0; }
.lp-sw { width: 6px; height: 28px; border-radius: 3px; flex: none; }
@media (pointer: coarse) { .lp-opt kbd { display: none; } }

/* ---------- v1.8 选择地图：左侧筛选与列表、右侧分区块与操作区更易区分 ---------- */
.msel-filterbox { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(36, 66, 104, 0.05); flex: none; }
.msel-filterbox .msel-search { background: var(--surface-2); border-color: var(--line); }
.msel-lh { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--text); margin: 2px 2px -4px; flex: none; }
.msel-lh .ico { color: var(--accent); }
.msel-lh .tiny { margin-left: auto; font-weight: 500; }
.msel-detail { background: linear-gradient(180deg, var(--surface-solid) 0%, var(--surface-2) 100%); }
.msel-block { margin-top: 14px; padding: 12px 14px 14px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(36, 66, 104, 0.06); animation: riseIn .4s var(--ease) both; }
.msel-block:nth-of-type(2) { animation-delay: .05s; } .msel-block:nth-of-type(3) { animation-delay: .1s; }
.msel-bh { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13.5px; }
.msel-bh .badge { width: 26px; height: 26px; border-radius: 8px; }
.msel-bh .badge .ico { width: 15px; height: 15px; }
.msel-block .msel-intro { margin: 0 0 12px; font-size: 13.5px; }
.msel-block .msel-feat { background: var(--surface-2); }
.msel-block .msel-facts b { white-space: normal; line-height: 1.35; }
.msel-actbar { flex: none; padding: 10px 22px 16px; border-top: 1px solid var(--line-strong); background: var(--surface-solid); box-shadow: 0 -10px 24px -18px rgba(36, 66, 104, 0.35); position: relative; z-index: 1; }
:root[data-theme="dark"] .msel-actbar { box-shadow: 0 -10px 24px -14px rgba(0, 0, 0, 0.6); }
.msel-acth { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.msel-acth .tiny { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.msel-acth .tiny .ico { width: 12px; height: 12px; }
.msel-actbar .map-actions { margin: 0; gap: 8px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.msel-actbar .map-mode { min-width: 0; }
.msel-actbar .map-mode small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel-actbar .map-mode .grow { min-width: 0; }
.msel-actbar .map-mode b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel-actbar .map-mode.sub { padding: 7px 12px; gap: 10px; background: var(--surface-2); }
.msel-actbar .map-mode.sub .badge { width: 28px; height: 28px; border-radius: 9px; }
.msel-actbar .map-mode.sub .badge .ico { width: 16px; height: 16px; }
.msel-actbar .map-mode.sub b { font-size: 13px; }
.msel-actbar .map-mode.sub small { font-size: 11px; }
@media (max-width: 760px) {
  .msel-filterbox { padding: 8px; gap: 8px; }
  .msel-lh .tiny { display: none; }
  .msel-block { margin-top: 10px; padding: 10px 11px 12px; }
  .msel-actbar { padding: 8px 10px 10px; }
  .msel-acth { display: none; }
  .msel-actbar .map-actions { grid-template-columns: 1fr 1fr; gap: 6px; }
}

/* ======================== v1.9：设施、图层分组、统计口径 ======================== */
.dock-sep.thin { width: 22px; margin: 3px 0 2px; opacity: .55; }
.dot.ring { background: transparent; border: 3px solid currentColor; box-sizing: border-box; width: 12px; height: 12px; }
.legend .seg-ctl { flex-wrap: wrap; row-gap: 4px; }
.legend .seg-ctl button { flex: 1 1 auto; }
.tk-basis { display: flex; gap: 5px; align-items: center; margin-top: 5px; line-height: 1.4; }
.tk-basis .ico { width: 12px; height: 12px; flex: none; opacity: .8; }
.tag .ico { width: 13px; height: 13px; vertical-align: -2px; }
.chg .ico { width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); }
.tbl td .ico { width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--hover); }
.tbl td small { font-size: 11px; }
