/* 城市与地铁 · 界面样式（浅色 / 深色主题） */
:root {
  --view-width: 100vw;
  --view-height: 100dvh;
  --view-top: 0px;
  --view-left: 0px;
  --view-bottom: 0px;
  --view-right: 0px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  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; }
/* 色盲辅助：状态仍保留文字 / 图标，避免只靠红绿表达成功、警告和错误。 */
:root[data-color-blind="true"] { --good: #0072b2; --good-soft: rgba(0,114,178,.12); --warn: #8c5900; --warn-soft: rgba(166,106,0,.12); --bad: #84317d; --bad-soft: rgba(132,49,125,.12); }
:root[data-color-blind="true"][data-theme="dark"] { --good: #66c2ff; --good-soft: rgba(102,194,255,.14); --warn: #f4bd53; --warn-soft: rgba(244,189,83,.14); --bad: #e3a0de; --bad-soft: rgba(227,160,222,.14); }
#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; }
/* 界面毛玻璃：模糊半径越大，地图每帧变化时 GPU 重新模糊的开销越大（v2.1 由 14px 降到 9px，观感接近、移动地图更流畅） */
.glass { background: var(--surface); border: 1px solid var(--glass-edge); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(9px) saturate(1.15); -webkit-backdrop-filter: blur(9px) saturate(1.15); }
.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-ui="settings"]: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); }
.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 { filter: brightness(1.04); }
#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; }
/* 从游戏回到主菜单（v2.3）：界面层整体淡入，标题与菜单不逐个重新弹出（不闪） */
#screen.calm .start-wrap > *, #screen.calm .start-menu > *, #screen.calm .start-learn { animation: none !important; }
#busyBlock { position: fixed; inset: 0; z-index: 70; display: none; cursor: progress; }
#busyBlock.on { display: block; }
#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 { 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: scale(1.02); 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), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) { .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), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) { .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: scale(1.02); 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), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  .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; object-fit: contain; }
.about-t { font-size: 20px; font-weight: 800; letter-spacing: 2px; }
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) { .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(auto-fit, minmax(min(100%, 110px), 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; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.size-card .sc-h b, .size-card .sc-tag { white-space: nowrap; }
.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; }
.size-card .sc-v small { display: block; 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: normal; overflow-wrap: anywhere; }
.size-card .sc-cost { font-size: 11.5px; font-weight: 600; color: var(--accent); margin-top: 3px; white-space: normal; overflow-wrap: anywhere; }
.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), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) { .nm-legend { display: none; } }

/* ---------- 平滑切换（主题、界面大小） ---------- */
/* 主题切换（v2.1）：地图快照与界面颜色在同一帧开始，同样的时长与缓动 */
.map-snap { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; opacity: 1; transition: opacity .5s cubic-bezier(.45, 0, .25, 1); will-change: opacity; }
.map-snap.out { opacity: 0; }
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after { transition: background-color .5s cubic-bezier(.45, 0, .25, 1), color .5s cubic-bezier(.45, 0, .25, 1), border-color .5s cubic-bezier(.45, 0, .25, 1), box-shadow .5s cubic-bezier(.45, 0, .25, 1), fill .5s cubic-bezier(.45, 0, .25, 1), stroke .5s cubic-bezier(.45, 0, .25, 1) !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; }
@media (max-width: 1100px) { #toolopts.has-snap .to-hint span, #toolopts.has-color .to-hint span { display: 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; display: flex; flex-direction: column; overflow: hidden; }
.card.settings > .card-head, .card.settings > .set-foot { flex: none; }
.set-body.single { flex: 1; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; padding: 0 4px 0 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), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) { .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: scale(1.02); 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: scale(1.015); 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: 128px; 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)); }
/* 教程卡片与图层图例同在左侧控制组和图层面板右边的一列（v2.3 玩家反馈：以前图例排在卡片下方的最左侧，挡住「图层」按钮与图层面板） */
body.has-coach #feed { left: max(50%, calc(470px * var(--uiz, 1) + 160px)); }
body.has-coach #legendCard { top: calc(84px + var(--coach-h, 0px) * var(--uiz, 1)); left: 128px; max-height: calc((100vh - 190px) / 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 { 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, .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 { position: relative; flex: none; 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; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .2s var(--spring), background .2s, box-shadow .2s; }
.corner-btn:hover { transform: scale(1.02); box-shadow: var(--shadow); }
.corner-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.corner-btn .ico { width: 20px; height: 20px; position: relative; z-index: 1; }
.corner-btn .ico.brand-wordmark { width: 30px; }
.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-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-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: scale(1.015); 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-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; }
.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; } .brief-hero { position: relative; height: 230px; border-radius: 18px; overflow: hidden; background: var(--hover); flex: none; } .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%); } } .brief-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 36, 0) 25%, rgba(10, 20, 36, 0.8)); } .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; } .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; }
.tag.glass-tag { background: rgba(255, 255, 255, 0.16); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.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); } .brief-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .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; } .brief-mode:hover { transform: scale(1.02); box-shadow: var(--shadow-sm); border-color: var(--line-strong); } .brief-mode .badge { width: 34px; height: 34px; border-radius: 11px; } .brief-mode b { display: block; font-size: 13.5px; } .brief-mode small { display: block; font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 2px; }
.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); }
@media (max-width: 640px) {
  .news-list .sec-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 5px 8px; }
  .news-list .news-v { grid-column: 1; grid-row: 1; justify-self: start; }
  .news-list .sec-h > .tag { grid-column: 2; grid-row: 1; justify-self: start; }
  .news-list .news-d { grid-column: 3; grid-row: 1; }
  .news-list .sec-h > .chev { grid-column: 4; grid-row: 1; }
  .news-list .news-t { grid-column: 1 / -1; grid-row: 2; white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.5; }
}

/* ---------- 城市纪事：书页、简笔画、时间轴 ---------- */
.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; }
/* 翻页（v2.3）：一张书页绕书脊平滑翻过，正面旧页、背面新页，翻动时带一层渐变的阴影 */
.spread.turning { perspective: 2200px; }
.leaf { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 3; transform-style: preserve-3d; transition: transform .74s cubic-bezier(.42, .04, .2, 1); will-change: transform; }
.leaf.next { left: 50%; transform-origin: left center; }
.leaf.prev { left: 0; transform-origin: right center; }
.leaf.full { width: 100%; left: 0; }
.leaf.next.go { transform: rotateY(-180deg); }
.leaf.prev.go { transform: rotateY(180deg); }
.leaf .face { position: absolute; inset: 0; display: flex; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: radial-gradient(130% 100% at 50% 0%, var(--paper) 62%, var(--paper-2)); }
.leaf .face > .pg { flex: 1; }
.leaf .face.back { transform: rotateY(180deg); }
.leaf.next .face.front, .leaf.full.next .face.front { border-radius: 0 16px 16px 0; }
.leaf.next .face.back { border-radius: 16px 0 0 16px; }
.leaf.prev .face.front { border-radius: 16px 0 0 16px; }
.leaf.prev .face.back { border-radius: 0 16px 16px 0; }
.leaf.full .face { border-radius: 16px; }
.leaf .face::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.leaf.next .face.front::after, .leaf.prev .face.back::after { background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 55%); }
.leaf.next .face.back::after, .leaf.prev .face.front::after { background: linear-gradient(270deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 55%); }
.leaf.go .face.front::after { animation: leafShadeOut .74s ease both; }
.leaf.go .face.back::after { animation: leafShadeIn .74s ease both; }
@keyframes leafShadeOut { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 1; } }
@keyframes leafShadeIn { 0% { opacity: 1; } 50% { opacity: 1; } 100% { opacity: 0; } }
.fs-h { display: flex; align-items: center; gap: 8px; margin: 18px 2px 8px; }
.fs-h b { font-size: 15px; }
.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), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  #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; }
  .citybar .daypill { flex: 1 1 auto; min-width: 0; }
  .citybar .daypill .tx, .cluster.metrics, .cluster.metrics .tx { min-width: 0; }
  .citybar .daypill .v, .cluster.metrics .v { overflow: hidden; text-overflow: ellipsis; }
  .cluster.metrics .pill { flex: 1 1 auto; min-width: 0; }
  #hudTop.lt400 .daypill .v small { display: none; }
  #hudTop.lt360 .brand { display: none; }
  #hudTop.lt300 .dayring { display: none; }
  .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(var(--mobile-hud-bottom, 110px) / var(--uiz, 1)); left: 8px; width: 46px; padding: 4px; gap: 2px; max-height: calc((100dvh - var(--mobile-hud-bottom, 110px) - 150px) / var(--uiz, 1)); }
  #dock .dockbtn { width: 38px; height: 34px; border-radius: 10px; }
  #dock .dockbtn .ico { width: 19px; height: 19px; }
  #legendCard { top: calc(var(--mobile-hud-bottom, 110px) / var(--uiz, 1)); left: 60px; width: min(268px, calc(100vw / var(--uiz, 1) - 70px)); max-height: calc((100dvh - var(--mobile-hud-bottom, 110px) - 100px) / var(--uiz, 1)); }
  #rightPanel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: calc(62dvh / var(--uiz, 1)); 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 { left: auto; right: calc(8px / var(--uiz, 1)); transform: none; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 4px; border-radius: 18px; }
  .tbtn { width: clamp(36px, calc((100vw - 80px) / var(--uiz, 1) / 5 - 4px), 46px); height: 46px; border-radius: 14px; }
  .tind { top: 4px; height: calc(100% - 8px); border-radius: 14px; }
  #buildStack { bottom: calc((84px + env(safe-area-inset-bottom)) / var(--uiz, 1)); max-width: calc((100vw - 16px) / var(--uiz, 1)); }
  #draftbar { max-width: calc((100vw - 16px) / var(--uiz, 1)); 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(var(--mobile-hud-bottom, 110px) / var(--uiz, 1)); 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(var(--mobile-hud-bottom, 110px) / var(--uiz, 1)); left: 60px; right: 8px; width: auto; }
  body.has-coach #feed { left: 50%; top: auto; bottom: 140px; }
  .search-pop { right: auto; 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; }
  .set-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px 10px; }
  .set-row > .set-ico { grid-row: 1 / span 2; align-self: start; }
  .set-row > .grow { min-width: 0; }
  .set-row > .seg-ctl, .set-row.vol-row > .set-slider { grid-column: 2 / -1; width: 100%; min-width: 0; }
  .set-row > .seg-ctl button { flex: 1; min-width: 0; padding: 6px 8px; }
  .set-row .set-slider input { min-width: 0; }
  .set-row > .switch { grid-column: 3; grid-row: 1; }
  .set-foot { flex-wrap: wrap; }
  .set-foot > .grow { flex-basis: 100%; }
  /* 开始界面 */
  #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-item { width: 236px; } .brief-scroll { padding: 12px 12px 8px; } .brief-hero { height: 150px; } .brief-hero-tx h2 { font-size: 23px; } .brief-modes { grid-template-columns: 1fr; }
  .brief-acts { padding: 10px 12px 12px; }
  .brief-acts > .tiny { flex-basis: 100%; }
  /* 统计、线路示意图：全屏 */
  .stats-win { width: 100vw; height: 100dvh; 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: inline-flex; width: 36px; height: 34px; padding: 0; gap: 0; font-size: 0; flex: none; }
  .nm-win .stats-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
  .nm-win .stats-head > .badge, .nm-win .stats-head > .grow { display: none; }
  .nm-win .stats-head > .nm-heading { grid-column: 1 / 3; grid-row: 1; min-width: 0; }
  .nm-win .stats-head > .nm-close { grid-column: 3; grid-row: 1; }
  .nm-win .stats-head > .nm-mode { grid-column: 1; grid-row: 2; justify-self: start; }
  .nm-win .stats-head > .nm-mode button { padding: 4px 6px; font-size: 11.5px; }
  .nm-win .stats-head > .nm-tools { grid-column: 2; grid-row: 2; }
  .nm-win .stats-head .nm-tools .hbtn { width: 28px; }
  .nm-win .stats-head > .btn.sm { grid-column: 3; grid-row: 2; }
  .nm-win .stats-head > .seg-ctl:not(.nm-mode) { grid-column: 1 / -1; }
}
/* 横屏或浏览器工具栏压缩可视高度时，入口和选图仍能滚动到所有操作。 */
#screen.start { overflow-y: auto; padding-block: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-bottom)); }
/* 触屏：没有悬停，不显示按钮提示气泡；地图缩放按钮可用双指代替，只保留「全图」 */
@media (pointer: coarse) {
  #uitip { display: none !important; }
  .pausechip kbd, .pausechip .muted { display: none; }
  .search-pop .srch-in kbd { display: none; }
  #zoomCtl button[data-act="cam.zoomIn"], #zoomCtl button[data-act="cam.zoomOut"] { 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), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) { .nm-win .nm-legend { display: none; } }
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  .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: scale(1.02); 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), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) { .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); }
.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), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  .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), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) { .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); }
.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.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; }

/* 设置：左侧分页、右侧内容，固定窗口高度，内容区单独滚动 */
.card.settings.tabbed { width: min(860px, calc(100vw - 32px)); height: min(620px, calc(100vh - 48px)); padding: 20px 22px 16px; display: flex; flex-direction: column; overflow: hidden; }
.card.settings.tabbed .set-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 20px; margin-top: 4px; }
.card.settings.tabbed .set-nav { overflow-y: auto; }
.card.settings.tabbed .set-tab { font-size: 14.5px; padding: 11px 14px; }
.card.settings.tabbed .set-body { max-height: none; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 6px 8px 0; }
.card.settings.tabbed .set-group { margin: 18px 0 2px; padding: 0 2px; }
.card.settings.tabbed .set-group:first-child { margin-top: 2px; }
.card.settings.tabbed .set-row { padding: 12px 2px; }
.card.settings.tabbed .set-d a { color: var(--accent); text-underline-offset: 3px; }
.about-head { display: flex; align-items: center; gap: 16px; padding: 4px 2px 6px; }
.about-head img { width: 60px; height: 60px; object-fit: contain; flex: none; }
.about-name { font-size: 22px; font-weight: 800; letter-spacing: 2px; color: var(--navy); }
:root[data-theme="dark"] .about-name { color: var(--text); }
.about-link { color: var(--text); text-decoration: none; border-radius: 10px; transition: background .18s; }
.about-link:hover { background: var(--hover); }
.about-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.about-link .grow { min-width: 0; }
.about-link .set-d { color: var(--accent); overflow-wrap: anywhere; }
.about-link > .ico { flex: none; color: var(--muted); grid-column: 3; grid-row: 1 / span 2; }
/* 线路颜色（v2.1） */
.lc-cur { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lc-preview { width: 44px; height: 30px; border-radius: 8px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.lc-hex { width: 92px; font-family: ui-monospace, Consolas, monospace; text-transform: lowercase; }
.lc-custom { position: relative; overflow: hidden; gap: 4px; }
.lc-custom .lc-picker { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.to-color { flex: none; }
.to-color .lc-cur { flex-wrap: nowrap; gap: 6px; }
.to-color .lc-preview { width: 24px; height: 24px; border-radius: 6px; }
.lc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.lc-k { width: 28px; flex: none; }
.lc-sw { width: 24px; height: 24px; border-radius: 7px; border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.14); transition: transform .12s var(--ease), box-shadow .12s; }
.lc-sw:hover { transform: scale(1.12); }
.lc-sw.on { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--text); }
/* 设置 → 键位（v2.1） */
.set-note { margin: 2px 2px 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.card.settings .set-row.key-row { display: flex; padding: 7px 2px; }
.key-row .set-t { font-weight: 500; min-width: 0; }
.key-slots { display: flex; gap: 6px; }
.keycap { min-width: 74px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--surface-solid); color: var(--text); font: 600 12.5px var(--font); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.keycap:hover { border-color: var(--accent); }
.keycap.empty { color: var(--faint); font-weight: 500; border-style: dashed; border-bottom-width: 1px; }
.keycap.listening { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: var(--ring); animation: keycapPulse 1.1s ease-in-out infinite; }
@keyframes keycapPulse { 50% { box-shadow: 0 0 0 5px rgba(47, 111, 168, 0.12); } }
.key-row .iconbtn[disabled] { opacity: .25; }

@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  .card.settings.tabbed { height: calc(100dvh / var(--uiz, 1) - 32px); }
  .card.settings.tabbed .set-wrap { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
  .card.settings.tabbed .set-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; }
  .card.settings.tabbed .set-tab { flex: none; padding: 8px 12px; }
  .card.settings.tabbed .set-row.key-row { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 6px; }
  .card.settings.tabbed .key-row .set-t { grid-column: 1 / -1; }
  .card.settings.tabbed .key-slots { min-width: 0; }
  .card.settings.tabbed .keycap { min-width: 0; max-width: 100%; flex: 1; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; }
  .lc-sw { width: 30px; height: 30px; }
}

/* 主题切换（v2.1）：视图过渡——新主题从点击处圆形展开（整个窗口同一时刻换色，见 main.js CM.setTheme） */
html.vt-theme::view-transition-old(root) { animation: none; }
html.vt-theme::view-transition-new(root) { animation: vtThemeReveal .78s cubic-bezier(.6, 0, .2, 1) both; mix-blend-mode: normal; }
@keyframes vtThemeReveal { from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 50%)); } to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 50%)); } }
/* 展开期间新画面里的元素直接是新颜色（不再叠加各自的颜色过渡，避免圈内文字、按钮二次渐变发闪） */
html.vt-theme *, html.vt-theme *::before, html.vt-theme *::after { transition: none !important; }
/* 主题按钮的太阳 / 月亮图标旋转弹入 */
.theme-ico-in { animation: themeIcoIn .6s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes themeIcoIn { from { transform: rotate(-120deg) scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

.card.doc { width: min(760px, calc(100vw - 32px)); height: min(640px, calc(100vh - 48px)); display: flex; flex-direction: column; overflow: hidden; }
.card.doc > .card-head, .card.doc > .modal-actions { flex: none; }
.doc-text { flex: 1; min-height: 0; overflow: auto; margin: 6px 0 12px; padding: 18px 22px 22px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.doc-body { max-width: 640px; margin: 0 auto; }
.doc-title { padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.doc-title .strong { font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.doc-title .muted { font-size: 12.5px; }
.doc-body h3 { margin: 18px 0 6px; font-size: 13.5px; font-weight: 700; color: var(--text); }
.doc-body p { margin: 0 0 10px; color: var(--text-2, var(--text)); }
.doc-body a { color: var(--accent, #2f6fb6); text-decoration: none; word-break: break-all; }
.doc-body a:hover { text-decoration: underline; }
.doc-kv { display: grid; gap: 4px; margin: 0 0 12px; }
.doc-kv > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.doc-kv dt { color: var(--muted, #6b7a8c); }
.doc-kv dd { margin: 0; }

/* ======================== v2.1 按钮与交互（灵动） ======================== */
/* 统一的节奏：悬停轻抬、按下快速收缩、松开以弹性曲线回弹；图标随悬停与选中做小幅动作；
   主按钮掠过一道光，光标处有一抹柔光跟随（ui.js 写入 --mx / --my）。系统「减少动态效果」时一律关闭 */
:root { --spring2: cubic-bezier(.3, 1.55, .5, 1); --glow: rgba(47, 111, 168, 0.2); --hi: rgba(255, 255, 255, 0.65); }
:root[data-theme="dark"] { --glow: rgba(106, 166, 230, 0.26); --hi: rgba(255, 255, 255, 0.06); }
.btn { border-radius: 11px; background: linear-gradient(180deg, var(--surface-solid), var(--surface-2)); box-shadow: inset 0 1px 0 var(--hi), 0 1px 2px rgba(36, 66, 104, 0.06);
  transition: transform .45s var(--spring2), box-shadow .25s var(--ease), border-color .2s, background .2s, color .2s, filter .2s; }
.btn .ico, .start-btn > .ico, .mode-card .badge, .set-tab .ico, .seg-ctl button .ico, .tabs > button .ico { transition: transform .45s var(--spring2); }
.btn:hover:not([disabled]) { transform: scale(1.03); border-color: color-mix(in srgb, var(--accent) 38%, var(--line-strong)); box-shadow: inset 0 1px 0 var(--hi), 0 6px 16px var(--glow); }
.btn:hover:not([disabled]) .ico { transform: scale(1.12) rotate(-6deg); }
.btn:active:not([disabled]) { transform: scale(.95); transition-duration: .09s; box-shadow: inset 0 1px 0 var(--hi), 0 1px 3px rgba(36, 66, 104, 0.12); }
.btn.ghost { box-shadow: none; background: transparent; }
.btn.ghost:hover:not([disabled]) { box-shadow: none; border-color: transparent; }
.btn.primary { box-shadow: 0 4px 14px rgba(29, 88, 209, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.primary:hover:not([disabled]) { box-shadow: 0 9px 22px rgba(43, 100, 156, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.25); border-color: transparent; filter: brightness(1.05); }
/* 掠光 */
.btn.primary::before, .start-btn.primary::before, .mode-card .mc-go::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.36) 48%, transparent 66%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn.primary:hover::before, .start-btn.primary:hover::before, .mode-card:hover .mc-go::before { transform: translateX(120%); }
.mode-card .mc-go { position: relative; overflow: hidden; }
/* 掠光与柔光画在按钮背景之上、文字与图标之下 */
.btn, .start-btn, .mode-card, .mode-card .mc-go, .map-mode, .msel-item { isolation: isolate; }
.btn::before, .btn::after, .start-btn::before, .start-btn::after, .mode-card::after, .mode-card .mc-go::before, .map-mode::after, .msel-item::after { z-index: -1; }
/* 光标柔光 */
.btn::after, .start-btn::after, .mode-card::after, .map-mode::after, .msel-item::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s var(--ease);
  background: radial-gradient(140px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 65%); }
.btn.primary::after, .start-btn.primary::after { background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.22), transparent 65%); }
.btn:hover:not([disabled])::after, .start-btn:hover:not([disabled])::after, .mode-card:hover::after, .map-mode:hover::after, .msel-item:hover::after { opacity: 1; }
.map-mode, .msel-item { position: relative; overflow: hidden; }
/* 开始界面主菜单：向右轻推、图标点头，按下回弹 */
.start-btn { position: relative; overflow: hidden; transition: transform .5s var(--spring2), box-shadow .25s var(--ease), background .2s; }
.start-btn:hover:not([disabled]) { transform: scale(1.015); box-shadow: 0 12px 28px rgba(36, 66, 104, 0.18); }
.start-btn:hover:not([disabled]) > .ico { transform: scale(1.14) rotate(-8deg); }
.start-btn:hover:not([disabled]) .chev { transform: translateX(5px); }
.start-btn:active:not([disabled]) { transform: translateX(3px) scale(.97); transition-duration: .09s; }
.start-btn.primary:hover:not([disabled]) { box-shadow: 0 14px 30px rgba(43, 100, 156, 0.42); }
.start-learn:hover .ico { animation: icoNod .6s var(--spring2); }
/* 模式卡片、地图列表：上浮并带出强调色描边 */
.mode-card { transition: border-color .2s, box-shadow .25s var(--ease), transform .5s var(--spring2); }
.mode-card:hover { transform: scale(1.025); box-shadow: 0 14px 30px var(--glow); }
.mode-card:hover .badge { transform: translateY(-2px) rotate(-6deg) scale(1.06); }
.mode-card:active { transform: translateY(-1px) scale(.985); transition-duration: .09s; }
/* 底部建设工具：悬停时图标跳一下，选中时弹出 */
.tbtn { transition: color .2s, transform .45s var(--spring2); }
.tbtn:hover:not(.on) .ico { animation: icoHop .55s var(--spring2) both; }
.tbtn.on .ico { animation: icoPop .5s var(--spring2) both; }
.tbtn:active { transform: scale(.9); transition-duration: .09s; }
@keyframes icoHop { 0% { transform: none; } 45% { transform: translateY(-5px) scale(1.1); } 100% { transform: translateY(-2px) scale(1.06); } }
@keyframes icoPop { 0% { transform: scale(.65) rotate(-14deg); } 60% { transform: scale(1.2) rotate(5deg); } 100% { transform: scale(1.08); } }
@keyframes icoPop2 { 0% { transform: scale(.7); } 60% { transform: scale(1.16); } 100% { transform: none; } }
@keyframes icoNod { 0% { transform: none; } 35% { transform: rotate(-14deg) scale(1.1); } 70% { transform: rotate(6deg); } 100% { transform: none; } }
/* 左侧视图 / 图层、右上角按钮 */
.dockbtn, .hbtn, .corner-btn { transition: background .18s, color .18s, transform .45s var(--spring2), box-shadow .25s var(--ease); }
.dockbtn:hover { transform: scale(1.08); box-shadow: 0 6px 14px var(--glow); }
.dockbtn:active, .hbtn:active, .corner-btn:active { transform: scale(.88); transition-duration: .09s; }
.dockbtn.on .ico, .hbtn.on .ico, .set-tab.on .ico { animation: icoPop2 .45s var(--spring2) both; }
.hbtn:hover { transform: scale(1.06); }
/* 分段选择与页签：选中项弹入，悬停文字轻抬 */
.seg-ctl button { transition: background .2s, color .2s, box-shadow .2s, transform .4s var(--spring2); }
.seg-ctl button:hover:not(.on) { color: var(--text); }
.seg-ctl button.on { animation: segOn .4s var(--spring2); }
.seg-ctl button:active { transform: scale(.93); transition-duration: .08s; }
@keyframes segOn { 0% { transform: scale(.88); } 100% { transform: none; } }
.tabs > button { transition: color .2s, transform .4s var(--spring2); }
.tabs > button:hover:not(.on) { color: var(--text); }
.tabs > button:active { transform: scale(.94); transition-duration: .08s; }
.set-tab { transition: background .18s, color .18s, transform .45s var(--spring2); }
.set-tab:hover:not(.on) { color: var(--text); }
/* 开关：按下时滑块拉长，像被手指按住 */
.switch i { transition: transform .38s var(--spring2), width .2s var(--ease); }
.switch:active i { width: 26px; }
.switch.on:active i { transform: translateX(14px); }
/* 顶部数值胶囊、标签与小按钮 */
.pill { transition: background .15s, transform .45s var(--spring2); }
.pill:hover { transform: scale(1.02); }
.chip-x { transition: background .15s, color .15s, transform .35s var(--spring2); }
.chip-x:hover { transform: rotate(90deg); }
/* 键盘焦点环：从按钮边缘扩散出来 */
.btn:focus-visible, .tbtn:focus-visible, .dockbtn:focus-visible, .start-btn:focus-visible, .set-tab:focus-visible, .seg-ctl button:focus-visible, .tabs > button:focus-visible { animation: ringIn .35s var(--ease); }
@keyframes ringIn { from { box-shadow: 0 0 0 0 var(--glow); } to { box-shadow: var(--ring); } }
/* 涟漪：中心更实、边缘更柔 */
.ripple { background: radial-gradient(circle, currentColor 0 34%, transparent 70%); opacity: .24; animation: ripple .55s cubic-bezier(.2, .7, .2, 1) forwards; }
@media (prefers-reduced-motion: reduce) {
  .btn:hover:not([disabled]), .start-btn:hover:not([disabled]), .mode-card:hover, .dockbtn:hover, .hbtn:hover, .pill:hover, .seg-ctl button:hover:not(.on), .tabs > button:hover:not(.on), .set-tab:hover:not(.on) { transform: none; }
  .btn.primary::before, .start-btn.primary::before, .mode-card .mc-go::before { display: none; }
}

/* 文档小屏保留滚动区与返回按钮；减少动态效果时关闭新增柔光与回弹。 */
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) { .card.doc { height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); width: calc(100vw - 24px); } .doc-text { padding: 12px; } .doc-kv > div { grid-template-columns: 1fr; gap: 0; } }
@media (prefers-reduced-motion: reduce) { .btn::after, .start-btn::after, .mode-card::after, .map-mode::after, .msel-item::after { display: none; } html.vt-theme::view-transition-new(root) { animation: none; } }

/* 手机专项：以可视视口与实际控件尺寸排布，避开刘海、底部手势区和软键盘。 */
.viewport-insets { position: fixed; visibility: hidden; pointer-events: none; padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left); }
.search-pop { display: flex; flex-direction: column; overflow: hidden; }
.srch-in { flex: none; }
.srch-in input { min-width: 0; width: 0; }
.srch-list { min-height: 0; overscroll-behavior: contain; }
.line-picker { overflow-y: auto; overscroll-behavior: contain; }
.line-picker > * { flex-shrink: 0; }
#followCard .fc-restore { display: none; }
#app:has(#screen:not(.hidden), #stats:not(.hidden), #netmap:not(.hidden)) #fxLayer { visibility: hidden; }
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  #hudTop { top: calc((var(--view-top) + var(--safe-top) + 8px) / var(--uiz, 1)); left: calc((var(--view-left) + var(--safe-left) + 8px) / var(--uiz, 1)); right: calc((var(--view-right) + var(--safe-right) + 8px) / var(--uiz, 1)); }
  #hudTop .metrics .pill:not(:first-child) { display: none; }
  #hudTop .actions { flex: none; }
  #dock { left: calc((var(--view-left) + var(--safe-left) + 8px) / var(--uiz, 1)); max-height: max(0px, calc((var(--mobile-side-bottom, 100dvh) - var(--mobile-hud-bottom, 110px) - 8px) / var(--uiz, 1))); overscroll-behavior: contain; }
  #legendCard { z-index: 15; left: calc((var(--view-left) + var(--safe-left)) / var(--uiz, 1) + 60px); width: min(268px, calc((var(--view-width) - var(--safe-left) - var(--safe-right) - 8px) / var(--uiz, 1) - 60px)); }
  #legendCard, body.has-coach #legendCard { top: calc(var(--mobile-legend-top, var(--mobile-hud-bottom, 110px)) / var(--uiz, 1)); max-height: max(0px, calc((var(--mobile-side-bottom, 100dvh) - var(--mobile-legend-top, var(--mobile-hud-bottom, 110px)) - 8px) / var(--uiz, 1))); }
  #rightPanel { left: calc((var(--view-left) + var(--safe-left) + 8px) / var(--uiz, 1)); right: calc((var(--view-right) + var(--safe-right) + 8px) / var(--uiz, 1)); bottom: calc(var(--mobile-panel-bottom, 80px) / var(--uiz, 1)); max-height: max(0px, min(calc(var(--view-height) * .55 / var(--uiz, 1)), calc((var(--mobile-controls-top, 100dvh) - var(--mobile-hud-bottom, 110px) - 16px) / var(--uiz, 1)))); border-radius: 18px; padding-bottom: 0; }
  .p-body, .lc-body { min-height: 0; overscroll-behavior: contain; overflow-wrap: anywhere; }
  .p-title { min-width: 0; }
  #toolbar { right: calc((var(--view-right) + var(--safe-right) + 8px) / var(--uiz, 1)); bottom: calc((var(--view-bottom) + var(--safe-bottom) + 10px) / var(--uiz, 1)); transform: none; }
  #toolbar .lb { display: none; }
  #toolbar .tbtn { width: clamp(32px, calc((var(--view-width) - var(--safe-left) - var(--safe-right) - 80px) / var(--uiz, 1) / 5 - 4px), 46px); }
  #zoomCtl { left: calc((var(--view-left) + var(--safe-left) + 8px) / var(--uiz, 1)); bottom: calc((var(--view-bottom) + var(--safe-bottom) + 10px) / var(--uiz, 1)); }
  #buildStack { left: calc((var(--view-left) + var(--safe-left) + (var(--view-width) - var(--safe-left) - var(--safe-right)) / 2) / var(--uiz, 1)); bottom: calc((var(--view-bottom) + var(--safe-bottom) + 78px) / var(--uiz, 1)); max-width: calc((var(--view-width) - var(--safe-left) - var(--safe-right) - 16px) / var(--uiz, 1)); }
  #draftbar.hidden, #toolopts.hidden { display: none; }
  #toolopts { max-width: 100%; scrollbar-width: thin; }
  #toolopts > * { flex-shrink: 0; }
  #draftbar { width: max-content; max-width: 100%; display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); gap: 4px; overflow: visible; }
  #draftbar .db-main { grid-row: 1; grid-column: 1 / 4; min-width: 0; padding: 4px 6px; gap: 5px; font-size: 12px; }
  #draftbar .db-main .cost { overflow: hidden; text-overflow: ellipsis; }
  #draftbar .cfbadge { grid-row: 1; grid-column: 4; justify-self: end; padding: 4px 6px; font-size: 11px; }
  #draftbar .db-sep { display: none; }
  #draftbar > .iconbtn, #draftbar > .btn { grid-row: 2; min-width: 0; }
  #draftbar > .btn.primary { justify-content: center; padding: 6px 8px; }
  #feed, body.has-coach #feed { top: calc(var(--mobile-feed-top, 110px) / var(--uiz, 1)); bottom: auto; left: calc((var(--view-left) + var(--safe-left)) / var(--uiz, 1) + 60px); right: calc(var(--mobile-feed-right, 8px) / var(--uiz, 1)); max-height: calc(var(--mobile-feed-height, 140px) / var(--uiz, 1)); overflow-y: auto; overflow-x: hidden; transform: none; min-width: 0; transition: none; scrollbar-width: thin; z-index: 13; }
  #app:has(#rightPanel:not(.closed)) .pausechip { display: none; }
  #feed > * { flex-shrink: 0; max-width: 100%; }
  #feed .toast { max-width: 100%; overflow-wrap: anywhere; }
  #coach { left: calc((var(--view-left) + var(--safe-left)) / var(--uiz, 1) + 60px); right: calc((var(--view-right) + var(--safe-right) + 8px) / var(--uiz, 1)); width: auto; max-height: max(0px, calc((var(--mobile-side-bottom, 100dvh) - var(--mobile-hud-bottom, 110px) - 8px) / var(--uiz, 1))); overflow-y: auto; overscroll-behavior: contain; }
  #coach > * { flex-shrink: 0; }
  #coach .co-acts { flex-wrap: wrap; }
  #followCard { left: calc((var(--view-left) + var(--safe-left)) / var(--uiz, 1)); right: calc((var(--view-right) + var(--safe-right)) / var(--uiz, 1)); bottom: calc((var(--view-bottom) + var(--safe-bottom) + 10px) / var(--uiz, 1)); width: min(560px, calc((var(--view-width) - var(--safe-left) - var(--safe-right) - 16px) / var(--uiz, 1))); max-width: calc((var(--view-width) - var(--safe-left) - var(--safe-right) - 16px) / var(--uiz, 1)); min-width: 0; max-height: max(0px, calc((var(--view-top) + var(--view-height) - var(--safe-bottom) - var(--mobile-hud-bottom, 110px) - 8px) / var(--uiz, 1))); overflow-y: auto; overscroll-behavior: contain; }
  #followCard > * { flex-shrink: 0; }
  #followCard .fc-head { flex-wrap: wrap; gap: 5px; }
  #followCard .fc-line, #followCard .fc-dir, #followCard .fc-status { overflow-wrap: anywhere; }
  body.cinema #followCard { max-height: calc((var(--view-height) - var(--safe-top) - var(--safe-bottom) - 20px) / var(--uiz, 1)); }
  body.cinema #followCard .fc-hint { display: flex; align-items: center; gap: 8px; }
  body.cinema #followCard .fc-hint > span { display: none; }
  body.cinema #followCard .fc-restore { display: inline-flex; }
  .search-pop { right: auto !important; width: calc(var(--view-width) - var(--safe-left) - var(--safe-right) - 16px); }
  .srch-in input { font-size: 16px; }
  .srch-list { max-height: none; }
  #screen, #stats, #netmap { inset: auto; top: var(--view-top); left: var(--view-left); width: var(--view-width); height: var(--view-height); padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left); }
  #screen.start { padding-block: max(16px, var(--safe-top)) max(16px, var(--safe-bottom)); }
  #screen .card { max-width: calc(var(--view-width) - var(--safe-left) - var(--safe-right) - 16px); max-height: calc(var(--view-height) - var(--safe-top) - var(--safe-bottom) - 16px); }
  #screen .card.msel { height: calc(var(--view-height) - var(--safe-top) - var(--safe-bottom) - 16px); }
  .card.settings.tabbed, .card.doc { height: calc(var(--view-height) - var(--safe-top) - var(--safe-bottom) - 16px); }
  .card.settings.tabbed > .card-head, .card.settings.tabbed > .set-foot { flex-shrink: 0; }
  .stats-win, .nm-win { width: 100%; height: 100%; max-width: 100%; max-height: 100%; }
  .stats-head { padding-top: 10px; flex-shrink: 0; }
  .stats-body, .nm-body { min-height: 0; overscroll-behavior: contain; }
  #app:has(#screen:not(.hidden), #stats:not(.hidden), #netmap:not(.hidden)) #feed { visibility: hidden; }
}
/* 手机横屏使用侧边详情；底部仍保留完整的建设操作。 */
@media (max-width: 760px) and (orientation: landscape), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) and (orientation: landscape) {
  #rightPanel { top: calc(var(--mobile-hud-bottom, 110px) / var(--uiz, 1)); left: auto; width: min(368px, calc((var(--view-width) - var(--safe-left) - var(--safe-right) - 76px) * .58 / var(--uiz, 1))); max-height: none; }
  #rightPanel::before { display: none; }
  #legendCard, #coach { max-width: min(calc((var(--view-width) - var(--safe-left) - var(--safe-right) - 76px) * .58 / var(--uiz, 1)), calc(var(--mobile-left-width, 100vw) / var(--uiz, 1))); }
  #draftbar { display: flex; flex-wrap: wrap; justify-content: center; }
  #draftbar .db-main { flex: 1; }
  #followCard .fc-grid { grid-template-columns: repeat(4, 1fr); }
  .card.msel { grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr); grid-template-rows: minmax(0, 1fr); }
  .card.msel .msel-item { width: 100%; }
}
@media (min-width: 761px) and (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  #hudTop { flex-wrap: nowrap; }
  #hudTop .citybar { flex: 2 1 auto; }
  #hudTop .metrics { flex: 1 1 140px; }
}
/* 极矮横屏压缩重复信息，草案操作仍完整显示；收起详情后恢复全部工具选项。 */
@media (max-width: 1024px) and (max-height: 420px) and (orientation: landscape) and (pointer: coarse), (max-width: 760px) and (max-height: 420px) and (orientation: landscape) {
  .citybar { padding: 2px; }
  .citybar .brand, .citybar .dayring { display: none; }
  #hudTop .pill { height: 30px; padding: 2px 6px; }
  #hudTop .pill .v { font-size: 12px; }
  #hudTop .pill .badge { width: 22px; height: 22px; }
  #hudTop .speed .sbtn { height: 26px; min-width: 28px; }
  #hudTop .hbtn { height: 30px; width: 32px; }
  #hudTop .metrics, #hudTop .actions { padding: 2px; }
  #rightPanel .p-head { min-height: 40px; padding: 4px 8px; }
  #rightPanel .p-head .badge { width: 26px; height: 26px; }
  #rightPanel .p-body { padding: 8px; }
  #rightPanel .ptabs { position: static; }
  #app:has(#rightPanel:not(.closed)) #toolopts { display: none; }
  #app:has(#rightPanel:not(.closed)) #draftbar .db-main .cost { display: none; }
  #app:has(#rightPanel:not(.closed)) #draftbar { flex-wrap: nowrap; }
}
/* 桌面窄窗口：将资金与操作单列一行，避免操作按钮压住资金。 */
@media (min-width: 761px) and (max-width: 1100px) and (pointer: fine) {
  #hudTop { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  #hudTop .citybar { grid-column: 1 / -1; min-width: 0; }
  #hudTop .spacer { display: none; }
  #hudTop .metrics { min-width: 0; }
  #dock, #legendCard, #rightPanel { top: calc(var(--mobile-hud-bottom, 130px) / var(--uiz, 1)); max-height: calc((var(--view-height) - var(--mobile-hud-bottom, 130px) - 110px) / var(--uiz, 1)); }
}
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  .start-corner { top: calc(var(--view-top) + var(--safe-top) + 12px); right: calc(var(--view-right) + var(--safe-right) + 12px); }
  .celebrate .ribbon { left: calc(var(--view-left) + var(--safe-left) + (var(--view-width) - var(--safe-left) - var(--safe-right)) / 2); top: calc(var(--mobile-hud-bottom, 110px) + 8px); width: min(540px, calc(var(--view-width) - var(--safe-left) - var(--safe-right) - 24px)); max-height: max(0px, calc(var(--mobile-controls-top, 100dvh) - var(--mobile-hud-bottom, 110px) - 24px)); }
}
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  #screen.start { padding-top: calc(var(--safe-top) + 68px); align-items: safe center; }
  .start-btn .lb { flex: none; white-space: nowrap; }
  .start-btn .sub { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #app:has(#rightPanel:not(.closed), #legendCard:not(.hidden), #coach, #followCard) #fxLayer, body:has(.search-pop, .dropdown, .line-picker) #fxLayer { visibility: hidden; }
}
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  #rightPanel.short-body .ptabs { position: static; }
  /* 详情内输入时把可用高度交给编辑区，收起键盘或结束编辑后自动恢复。 */
  .panel-editing #hudTop, .panel-editing #dock, .panel-editing #legendCard, .panel-editing #toolbar, .panel-editing #buildStack, .panel-editing #zoomCtl, .panel-editing #feed, .panel-editing #coach { visibility: hidden; }
  .panel-editing #rightPanel { top: calc((var(--view-top) + var(--safe-top) + 8px) / var(--uiz, 1)); bottom: calc((var(--view-bottom) + var(--safe-bottom) + 8px) / var(--uiz, 1)); left: calc((var(--view-left) + var(--safe-left) + 8px) / var(--uiz, 1)); right: calc((var(--view-right) + var(--safe-right) + 8px) / var(--uiz, 1)); width: auto; max-height: calc((var(--view-height) - var(--safe-top) - var(--safe-bottom) - 16px) / var(--uiz, 1)); }
  #rightPanel input:not([type=range]):not([type=color]), #rightPanel textarea, .save-name-input, .msel-q { font-size: 16px; }
}
/* 多语言仍使用原有界面风格；英文标题与长按钮文字允许在窄屏内完整排布。 */
:root[data-language="en"] .start-title { font-size: 52px; letter-spacing: -.03em; white-space: normal; }
.start-btn .chev { margin-left: auto; }
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  :root[data-language="en"] .start-title { font-size: clamp(28px, calc((var(--view-width) - 40px) * .1), 42px); }
  .card.settings .set-row > .seg-ctl button { padding-inline: 4px; font-size: 12px; white-space: normal; overflow-wrap: anywhere; min-height: 34px; }
  :root[data-language="en"] #draftbar > .btn { white-space: normal; line-height: 1.25; }
  :root[data-language="en"] #draftbar > .btn.primary { font-size: 12px; }
  :root[data-language="en"] .start-learn { gap: 6px; }
}
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  :root[data-language="en"] .card.settings .set-row > .seg-ctl button { flex: 1 1 auto; }
}
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  :root[data-language="en"] #draftbar { grid-template-columns: 32px 32px minmax(62px, 1fr) minmax(84px, 1fr); }
  :root[data-language="en"] #draftbar .cfbadge { max-width: 100%; min-width: 0; white-space: normal; }
}

/* v2.1 网页版：时间折叠、快捷编辑、分层站台与进阶教程。 */
.speed .sbtn.time-fold, .jumps .jbtn.time-fold { display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 22px; padding: 0 5px; }
.time-fold .ico { width: 13px; height: 13px; transform: rotate(90deg); transition: transform .2s var(--ease); }
.time-fold.open .ico { transform: rotate(-90deg); }
.time-fold.open, .time-fold.has-on { color: var(--accent); background: var(--accent-soft); }
.dropdown.time-options { min-width: 128px; max-width: calc((100vw - 16px) / var(--uiz, 1)); max-height: calc((100dvh - 16px) / var(--uiz, 1)); zoom: var(--uiz, 1); }
.time-options.off { display: none; }
.dropdown.time-options button { height: auto; min-height: 34px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-radius: 9px; }
.dropdown.time-options button.on { color: var(--accent); background: var(--accent-soft); }
.dropdown.time-options button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pill.mfold { padding: 4px 9px; gap: 3px; font-weight: 700; font-size: 13px; color: var(--muted); }
.pill.mfold .ico { width: 15px; height: 15px; transform: rotate(90deg); transition: transform .2s var(--ease); }
.pill.mfold.open, .pill.mfold.has-on { background: var(--accent-soft); color: var(--accent); }
.pill.mfold.open .ico { transform: rotate(-90deg); }
.pill.mfold.off, .mmore.off { display: none; }
.dropdown.mmore { min-width: 200px; }
.dropdown.mmore .pill { height: auto; padding: 6px 10px 6px 6px; }
.dropdown.mmore .pill .tx { flex: 1 1 auto; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 14px; }
.dropdown.mmore .pill .k { font-size: 12.5px; color: var(--text); }
.dropdown.mmore .pill.on::after { display: none; }
#objBar { position: fixed; z-index: 24; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 13px; zoom: var(--uiz, 1); transition: opacity .15s; }
#objBar.hidden { opacity: 0; pointer-events: none; }
#objBar .ob-name { display: inline-flex; align-items: center; gap: 6px; max-width: 160px; height: 32px; padding: 0 10px 0 8px; border: 0; border-radius: 9px; background: var(--surface-3); color: var(--text); font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#objBar .ob-name .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
#objBar .ob-name .ico { width: 14px; height: 14px; color: var(--muted); }
#objBar .ob-btn { width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
#objBar .ob-btn:hover { background: var(--hover); color: var(--text); }
#objBar .ob-btn.danger:hover { color: var(--bad); }
.ctx-menu { min-width: 190px; }
.ctx-menu .ctx-title { padding: 6px 10px 8px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctx-menu button.danger, .qpop-row.danger { color: var(--bad); }
.qpop { position: fixed; z-index: 46; width: 280px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 12px; border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; zoom: var(--uiz, 1); animation: cardIn .18s var(--ease); }
.qpop .qpop-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.qpop .qpop-k { font-size: 11.5px; color: var(--muted); margin: 6px 0 2px; }
.qpop input[type=text] { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 9px; padding: 7px 9px; }
.qpop select { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 9px; padding: 6px 8px; background: var(--surface-solid); color: var(--text); }
.qpop-colors { display: flex; flex-wrap: wrap; gap: 5px; }
.qpop-list { display: flex; flex-direction: column; gap: 2px; }
.qpop-row { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 7px 8px; border-radius: 8px; text-align: left; cursor: pointer; font-size: 12.5px; color: var(--text); }
.qpop-row:hover { background: var(--hover); }
.qpop-row:disabled { opacity: .45; cursor: default; }
.qpop-row .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.p-title.editable { cursor: text; border-radius: 8px; padding: 2px 6px; margin-left: -6px; display: inline-flex; align-items: center; gap: 6px; }
.p-title.editable:hover { background: var(--hover); }
.p-title.editable:hover .p-title-ico { opacity: 1; }
.p-title-in { font: inherit; font-weight: 700; width: 100%; border: 1px solid var(--accent); border-radius: 8px; padding: 3px 8px; }
.plat-levels { display: flex; flex-direction: column; gap: 6px; }
.plat-row { display: flex; align-items: center; gap: 8px; }
.plat-row .plat-line { display: inline-flex; align-items: center; gap: 5px; min-width: 72px; font-size: 12.5px; font-weight: 600; }
.plat-row .plat-line .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.plat-row .seg-ctl { flex: 1; }
.branch-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.branch-row:first-of-type { border-top: 0; }
.branch-row input[type=text] { width: 110px; min-width: 0; border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 7px; font-size: 12px; }
.branch-row .swatch { width: 14px; height: 6px; border-radius: 3px; flex: none; }
.guide-steps { margin: 2px 0 0 18px; padding: 0; font-size: 13px; line-height: 1.65; }
.guide-steps li { margin: 5px 0; }
.guide-steps li::marker { color: var(--accent); font-weight: 700; }
#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; }
#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); }
#coach .co-head .iconbtn.on { background: var(--accent-soft); color: var(--accent); }
#coach .co-badge, #coach .co-step { white-space: nowrap; }
#coach .co-head { gap: 6px; }
#coach .co-auto { border: 0; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; cursor: pointer; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
#coach .co-auto.on { color: var(--accent); }
#coach .co-review { margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--muted); }
#coach .co-next { position: relative; overflow: hidden; }
#coach .co-countdown { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255, 255, 255, 0.75); transform-origin: left; animation: coCount var(--co-auto, 2.6s) linear both; }
#coach.hold .co-countdown { animation-play-state: paused; }
@keyframes coCount { from { transform: scaleX(0); } to { transform: scaleX(1); } }
#coach .co-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; margin: 0 -4px; }
#coach .co-li { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; color: var(--text); padding: 5px 6px; border-radius: 8px; font-size: 12.5px; cursor: pointer; }
#coach .co-li:hover { background: var(--hover); }
#coach .co-li.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
#coach .co-li-n { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 700; }
#coach .co-li.done .co-li-n { background: #16a34a; color: #fff; }
#coach .co-li-n .ico { width: 12px; height: 12px; }
.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); } }
#coach .co-subs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
#coach .co-subs li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 6px; border-radius: 9px; line-height: 1.4; }
#coach .co-subs li.on { background: var(--accent-soft); color: var(--text); font-weight: 700; }
#coach .co-subs li.done { opacity: .7; }
#coach .co-sub-n { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); font-size: 11px; font-weight: 700; flex: none; }
#coach .co-subs li.on .co-sub-n { background: #0f766e; color: #fff; }
#coach .co-subs li.done .co-sub-n { background: #16a34a; color: #fff; }
#coach .co-sub-n .ico { width: 12px; height: 12px; }
#coachTip { position: fixed; z-index: 60; display: flex; align-items: center; gap: 7px; max-width: 280px; padding: 8px 13px; border-radius: 12px; background: #0f766e; color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1.35; box-shadow: 0 10px 24px rgba(15, 118, 110, 0.38); pointer-events: none; animation: coTipBob 1.3s ease-in-out infinite; }
#coachTip .ico { width: 16px; height: 16px; flex: none; }
#coachTip::after { content: ''; position: absolute; width: 12px; height: 12px; background: #0f766e; transform: rotate(45deg); border-radius: 2px; }
#coachTip.above::after { left: calc(var(--ax, 50%) - 6px); bottom: -5px; }
#coachTip.below::after { left: calc(var(--ax, 50%) - 6px); top: -5px; }
#coachTip.right::after { top: calc(var(--ay, 50%) - 6px); left: -5px; }
#coachTip.right { animation-name: coTipNudge; }
#coachRing { position: fixed; z-index: 59; border-radius: 14px; border: 3px solid #14b8a6; pointer-events: none; animation: coRing 1.2s ease-out infinite; }
#coachTip.off, #coachRing.off { display: none; }
@keyframes coTipBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes coTipNudge { 0%, 100% { translate: 0 0; } 50% { translate: 5px 0; } }
@keyframes coRing { 0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.65); } 100% { box-shadow: 0 0 0 16px rgba(20, 184, 166, 0); } }

.qpop, .ctx-menu { overscroll-behavior: contain; overflow-wrap: anywhere; }
.qpop .row, .plat-row, .branch-row { flex-wrap: wrap; }
.p-title.editable { cursor: text; }
.p-title-in { min-width: 0; }
.ctx-menu { overflow-y: auto; }
.mmore { max-height: calc(var(--view-height) - 24px); overflow-y: auto; }
.mmore .pill { display: flex !important; }
#hudTop.lt960 .jumps, #hudTop .metrics .pill.mfold:not(.off) { display: flex; }
.speed .sbtn.peak.active { color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
@media (max-width: 760px) and (orientation: portrait) {
  #hudTop .citybar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  #hudTop .citybar .brand { display: none; }
  #hudTop .citybar .speed { margin-left: 0; }
  #hudTop .citybar .jumps { grid-column: 1 / -1; justify-self: end; }
}
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  #objBar { max-width: calc((var(--view-width) - 16px) / var(--uiz, 1)); overflow-x: auto; scrollbar-width: thin; }
  #objBar .ob-name { max-width: 100px; flex: none; }
  #objBar .ob-btn { flex: none; min-width: 34px; min-height: 36px; }
  .qpop { max-width: calc((var(--view-width) - var(--safe-left) - var(--safe-right) - 16px) / var(--uiz, 1)); }
  .plat-row .plat-line { flex-basis: 100%; }
  .plat-row .seg-ctl { min-width: 0; width: 100%; }
  .plat-row .seg-ctl button { min-width: 0; flex: 1; white-space: normal; }
  #coach { top: calc(var(--mobile-hud-bottom, 110px) / var(--uiz, 1)); left: 60px; right: 8px; width: auto; max-height: max(100px, calc((var(--mobile-side-bottom, 100dvh) - var(--mobile-hud-bottom, 110px) - 12px) / var(--uiz, 1))); overflow-y: auto; }
  #coachTip { max-width: calc(var(--view-width) - 24px); }
}


/* Web v2.2: development, events and progress animations. */

/* 顶栏：发展阶段标签（阶段色圆点、名称与年份，底部细条为阶段内进度） */
.pill.erachip { --ec: var(--accent); gap: 8px; padding: 4px 12px 7px 10px; }   /* 两行：上为阶段年份，下为阶段名称（与日期一致） */
.erachip .ec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ec); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ec) 22%, transparent); flex: none; }
.erachip .v { font-size: 13.5px; }
.erachip .ec-prog { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--ec) 16%, transparent); overflow: hidden; }
.erachip .ec-prog i { display: block; height: 100%; width: 0; background: var(--ec); border-radius: 2px; transition: width .6s var(--ease); }
.pill.erachip.on { background: color-mix(in srgb, var(--ec) 12%, transparent); }
.pill.erachip.on::after { display: none; }
#hudTop.lt960 .erachip .tx { display: none; }
.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; }
.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; }
@media (max-width: 760px) {
  .fin-cards, .ec-row, .econ-env { grid-template-columns: 1fr 1fr; }
  .dbar { grid-template-columns: 82px 1fr 56px; }
}
:root[lang="en"] .ec-row small { white-space: normal; overflow-wrap: anywhere; }

/* 自由建造（v2.2）：点击按钮展开一行选项——起始年份滑块、解锁全图、开始 */
.map-mode.free-toggle > .ico:last-child { transform: rotate(90deg); transition: transform .2s var(--ease); }
.map-mode.free-toggle.open { border-color: var(--accent); }
.map-mode.free-toggle.open > .ico:last-child { transform: rotate(-90deg); color: var(--accent); }
.map-free { grid-column: 1 / -1; display: none; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 8px 10px 8px 14px; border-radius: 12px; background: var(--surface-3); }
.map-free.open { display: flex; animation: riseIn .2s var(--ease) both; }
.map-free .fo-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.map-free .fo-yr { flex: 1; min-width: 200px; }
.map-free .fo-yr input { flex: 1; min-width: 80px; height: 22px; accent-color: var(--accent); cursor: pointer; }
.map-free .fo-k { color: var(--muted); white-space: nowrap; }
.map-free .fo-year { min-width: 2.6em; text-align: right; font-variant-numeric: tabular-nums; }
.map-free .fo-go { margin-left: auto; }

/* ---------- 发展阶段页面（v2.2 阶段可视化） ---------- */
.era-page { --ec: var(--accent); }
.era-tlwrap { position: relative; margin: 2px 0 12px; }
.era-tl { display: flex; gap: 3px; }
.era-seg { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.era-seg i { display: block; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--sc) 30%, transparent); }
.era-seg.past i { background: color-mix(in srgb, var(--sc) 60%, transparent); }
.era-seg.cur i { background: var(--sc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc) 25%, transparent); }
.era-seg span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.era-seg.cur span { color: var(--text); font-weight: 700; }
.era-now { position: absolute; top: -7px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--text); transform: translateX(-5px); }
.era-hero { border-radius: 14px; padding: 12px 14px 12px; color: #fff; background: linear-gradient(135deg, var(--ec), color-mix(in srgb, var(--ec) 62%, #1b2a44)); box-shadow: 0 8px 22px color-mix(in srgb, var(--ec) 30%, transparent); }
.era-hero .era-name { font-size: 19px; font-weight: 800; letter-spacing: .3px; margin-top: 2px; }
.era-hero .era-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.era-hero .era-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); margin-top: 10px; overflow: hidden; }
.era-hero .era-bar i { display: block; height: 100%; background: #fff; border-radius: 3px; }
.era-bg { margin: 10px 0 2px; display: flex; flex-direction: column; gap: 6px; }
.era-bgrow { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.55; }
.era-bgrow .tag { flex: none; margin-top: 1px; }
.era-h { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 6px; font-size: 13.5px; }
.era-h.row.between { align-items: center; }
.era-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.era-tile { display: flex; gap: 9px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-3); }
.era-tile .badge { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.era-tile small { display: block; font-size: 11px; color: var(--muted); }
.era-tile b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.era-bars { display: flex; flex-direction: column; gap: 3px; }
.era-barrow { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px 6px; border-radius: 8px; cursor: pointer; text-align: left; color: var(--text); font-size: 12px; }
.era-barrow:hover { background: var(--hover); }
.era-barrow .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.era-barrow .br { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.era-barrow .br i { display: block; height: 100%; border-radius: 4px; background: var(--ec); transition: width .5s var(--ease); }
.era-barrow .br i.neg { background: var(--bad); }
.era-barrow .vl { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 11.5px; }
.era-trend { display: flex; flex-direction: column; gap: 6px; }
.era-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.era-chips small { width: 100%; font-size: 11px; color: var(--muted); }
.era-chips .chip { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); }
.era-chips .chip.up { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); font-weight: 600; }
.era-chips .chip.down { color: var(--muted); }
.era-chips .chip.corr { background: color-mix(in srgb, var(--ec) 12%, transparent); }
.era-chips .chip.bgt { background: color-mix(in srgb, #b7791f 14%, transparent); }
.era-fx { display: flex; gap: 8px; align-items: flex-start; padding: 7px 9px; border-radius: 10px; background: var(--surface-3); margin-bottom: 4px; }
.era-fx .ico { color: var(--ec); flex: none; margin-top: 2px; }
.era-fx b { display: block; font-size: 12.5px; }
.era-fx small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.era-goal { display: flex; gap: 8px; align-items: center; padding: 6px 9px; border-radius: 10px; font-size: 12.5px; }
.era-goal .ico { color: var(--muted); flex: none; }
.era-goal .st { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); flex: none; }
.era-goal.run .st { background: var(--accent-soft); color: var(--accent); }
.era-goal.ok .st { background: var(--good-soft); color: var(--good); }
.era-goal.bad .st { background: var(--bad-soft); color: var(--bad); }
.era-past { padding: 6px 0; border-bottom: 1px solid var(--line); }
.era-past .row i { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); flex: none; }

/* ---------- 发展阶段横幅与「历史时刻」卡片（v2.2） ---------- */
#histHost { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; pointer-events: none; }
#histHost > * { pointer-events: auto; }
.phase-banner { --ec: var(--accent); position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; width: min(560px, 100%); padding: 14px 12px 16px 16px; border-radius: 18px; color: #fff;
  background: linear-gradient(120deg, var(--ec), color-mix(in srgb, var(--ec) 55%, #16233a)); box-shadow: 0 14px 34px color-mix(in srgb, var(--ec) 35%, rgba(0, 0, 0, 0.25)); animation: pbIn .55s var(--spring) both; }
.phase-banner.out { animation: pbOut .38s var(--ease) both; }
@keyframes pbIn { from { opacity: 0; transform: translateY(-18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pbOut { to { opacity: 0; transform: translateY(-12px) scale(.97); } }
.phase-banner .pb-line { position: absolute; left: 0; top: 50%; height: 2px; width: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent); transform: translateX(-100%); animation: pbLine 1.1s .15s var(--ease) both; pointer-events: none; }
@keyframes pbLine { to { transform: translateX(100%); } }
.phase-banner .pb-num { flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35); line-height: 1; }
.phase-banner .pb-num b { font-size: 24px; font-weight: 800; }
.phase-banner .pb-num small { font-size: 11px; opacity: .8; }
.phase-banner .pb-body { flex: 1; min-width: 0; }
.phase-banner .pb-kick { display: flex; align-items: center; gap: 8px; font-size: 11.5px; opacity: .9; }
.phase-banner .pb-tag { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.phase-banner .pb-title { font-size: 21px; font-weight: 800; letter-spacing: .4px; margin: 2px 0 3px; }
.phase-banner .pb-sub { font-size: 12.5px; line-height: 1.45; opacity: .95; }
.phase-banner .pb-prev { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 11.5px; padding: 4px 9px; border-radius: 9px; background: rgba(0, 0, 0, 0.16); width: fit-content; max-width: 100%; }
.phase-banner .pb-prev .ico { flex: none; opacity: .85; }
.phase-banner .pb-dots { display: flex; gap: 5px; margin-top: 8px; }
.phase-banner .pb-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); }
.phase-banner .pb-dots i.past { background: rgba(255, 255, 255, 0.65); }
.phase-banner .pb-dots i.cur { width: 20px; border-radius: 4px; background: #fff; }
.phase-banner .pb-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; align-self: flex-start; }
.phase-banner .pb-acts .iconbtn { color: #fff; }
.phase-banner .pb-acts .btn { background: rgba(255, 255, 255, 0.95); color: var(--ec); border: 0; font-weight: 700; }
.phase-banner .pb-life, .hist-card .hc-life { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: left; animation: lifeBar var(--life, 9s) linear both; animation-play-state: var(--life-play, running); }
.phase-banner .pb-life { background: rgba(255, 255, 255, 0.55); }
.hist-card { position: relative; overflow: hidden; display: flex; gap: 12px; align-items: flex-start; width: min(460px, 100%); padding: 11px 8px 13px 12px; border-radius: 15px; background: var(--surface-solid); box-shadow: var(--shadow); border: 1px solid var(--line); animation: hcIn .45s var(--spring) both; }
.hist-card.out { animation: pbOut .38s var(--ease) both; }
@keyframes hcIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.hist-card .hc-date { flex: none; width: 54px; padding: 6px 0 5px; border-radius: 11px; text-align: center; line-height: 1.05; color: #8a5a12; background: linear-gradient(160deg, #fff4dc, #f6deae); box-shadow: inset 0 0 0 1px rgba(160, 110, 30, 0.25); font-family: Georgia, 'Times New Roman', serif; }
.hist-card .hc-date b { display: block; font-size: 17px; }
.hist-card .hc-date small { display: block; font-size: 10.5px; margin-top: 2px; font-family: var(--font); }
.hist-card .hc-body { flex: 1; min-width: 0; }
.hist-card .hc-kick { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.hist-card .hc-title { font-size: 14.5px; font-weight: 750; margin: 3px 0 2px; }
.hist-card .hc-desc { font-size: 12px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hist-card .hc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.hist-card .hc-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.hist-card .hc-chip.up { background: var(--good-soft); color: var(--good); }
.hist-card .hc-chip.down { background: var(--bad-soft); color: var(--bad); }
.hist-card .hc-acts { display: flex; flex-direction: column; gap: 2px; }
.hist-card .hc-life { background: #e2a03c; opacity: .55; }
.hist-card.econ .hc-date { color: #2c5aa0; background: linear-gradient(160deg, #e8f0ff, #cfdcf6); box-shadow: inset 0 0 0 1px rgba(44, 90, 160, 0.2); }
.hist-card.econ .hc-life { background: #4f7fd0; }
.hist-card.econ.neg .hc-date { color: #a33a2c; background: linear-gradient(160deg, #ffece8, #f6d0c8); }
.hist-card.digest .hd-list { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.hist-card.digest .hd-row { display: flex; gap: 8px; font-size: 12px; }
.hist-card.digest .hd-row b { flex: none; width: 52px; color: #8a5a12; font-variant-numeric: tabular-nums; }
.hist-card.digest .hd-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="dark"] .hist-card .hc-date { color: #f3cf8a; background: linear-gradient(160deg, #4a3a1c, #3a2c12); }
:root[data-theme="dark"] .hist-card.econ .hc-date { color: #a9c4ff; background: linear-gradient(160deg, #1f2c48, #18233a); }
@media (prefers-reduced-motion: reduce) { .phase-banner, .hist-card, .phase-banner .pb-line { animation: none; } }

/* ---------- 载入动画（v2.2）：LOGO 逐笔显现与线路式进度条 ---------- */
.card.ld-card { width: min(400px, calc(100vw - 32px)); padding: 26px 26px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ld-logo { position: relative; width: 132px; height: 132px; margin-bottom: 12px; }
.ld-logo svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ld-note { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 16px; }
.ld-track { position: relative; width: 100%; height: 30px; margin: 4px 0 2px; }
.ld-track .ld-rail { position: absolute; left: 0; right: 0; top: 9px; height: 6px; border-radius: 3px; background: var(--surface-3); }
.ld-track .ld-fill { position: absolute; left: 0; right: 0; top: 9px; height: 6px; border-radius: 3px; background: var(--grad); transform-origin: left center; transform: scaleX(0); }
.ld-head { position: absolute; top: 4px; width: 22px; height: 16px; margin-left: -11px; border-radius: 6px 9px 9px 6px; background: var(--surface-solid); box-shadow: 0 0 0 2.5px #2f9fd0, 0 3px 10px rgba(47, 159, 208, 0.35); }
.ld-head::after { content: ''; position: absolute; right: 3px; top: 4px; width: 5px; height: 5px; border-radius: 2px; background: #2f9fd0; }
.ld-stop { position: absolute; top: 6px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ld-stop i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-solid); box-shadow: inset 0 0 0 2.5px var(--line-strong); transition: box-shadow .3s, transform .3s var(--spring); }
.ld-stop em { font-style: normal; font-size: 10.5px; color: var(--faint); white-space: nowrap; transition: color .3s; }
.ld-stop.on i { box-shadow: inset 0 0 0 3.5px #2f9fd0; transform: scale(1.15); }
.ld-stop.on em { color: var(--accent); font-weight: 700; }
.ld-row { display: flex; justify-content: space-between; align-items: baseline; width: 100%; margin-top: 14px; }
.ld-stage { font-size: 12px; color: var(--muted); }
.ld-pct { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }

/* ---------- 时间推进（v2.2）：月份车站与逐月翻动的日期 ---------- */
.card.jp-card { width: min(440px, calc(100vw - 32px)); padding: 20px 24px 18px; }
.jp-kick { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent); }
.jp-date { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 18px; font-variant-numeric: tabular-nums; }
.jp-y { font-size: 28px; font-weight: 800; letter-spacing: .5px; }
.jp-m { display: inline-block; font-size: 28px; font-weight: 800; color: var(--accent); }
.jp-m.flip { animation: jpFlip .42s var(--spring); }
@keyframes jpFlip { from { opacity: 0; transform: translateY(14px) rotateX(70deg); } to { opacity: 1; transform: none; } }
.jp-line { position: relative; height: 34px; margin: 0 8px 6px; }
.jp-rail, .jp-fill { position: absolute; left: 0; right: 0; top: 9px; height: 6px; border-radius: 3px; }
.jp-rail { background: var(--surface-3); }
.jp-fill { background: var(--grad); transform-origin: left center; transform: scaleX(0); }
.jp-origin { position: absolute; left: 0; top: 5px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); z-index: 1; }
.jp-stop { position: absolute; top: 5px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.jp-stop i { width: 14px; height: 14px; border-radius: 50%; background: var(--surface-solid); box-shadow: inset 0 0 0 3px var(--line-strong); transition: box-shadow .25s, transform .35s var(--spring); }
.jp-stop em { font-style: normal; font-size: 10.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.jp-stop.on i { box-shadow: inset 0 0 0 4px #2f9fd0; transform: scale(1.18); }
.jp-stop.on em { color: var(--accent); font-weight: 700; }
.jp-train { position: absolute; top: 1px; width: 30px; height: 22px; margin-left: -15px; z-index: 2; border-radius: 7px 11px 11px 7px; background: linear-gradient(180deg, #ffffff, #e9f4fb); box-shadow: 0 0 0 2.5px #2f9fd0, 0 4px 12px rgba(47, 159, 208, 0.4); animation: jpBob .5s ease-in-out infinite alternate; }
.jp-train i { position: absolute; right: 4px; top: 5px; width: 8px; height: 7px; border-radius: 2px 4px 4px 2px; background: #2f9fd0; }
.jp-train::before { content: ''; position: absolute; left: 4px; top: 6px; width: 10px; height: 5px; border-radius: 2px; background: rgba(47, 159, 208, 0.35); }
@keyframes jpBob { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
.jp-stats { display: flex; align-items: baseline; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.jp-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.jp-stats .jp-pct { margin-left: auto; font-size: 20px; font-weight: 800; color: var(--accent); }
.jp-ev { min-height: 20px; margin-top: 8px; font-size: 12px; color: #8a5a12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jp-ev.flash { animation: jpEv .6s var(--ease); }
@keyframes jpEv { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
:root[data-theme="dark"] .jp-ev { color: #f3cf8a; }
.jp-foot { margin-top: 6px; font-size: 11px; color: var(--faint); }
@media (prefers-reduced-motion: reduce) { .jp-train, .jp-m.flip, .jp-ev.flash { animation: none; } }
.erachip { max-width: 180px; cursor: pointer; }
.erachip.gone { display: none; }
#histHost { pointer-events: none; max-width: min(640px, calc(100vw - 32px)); }
#histHost > * { pointer-events: auto; }
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
  .erachip { max-width: 125px; min-width: 0; padding: 5px 7px; }
  .erachip .v { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
  #histHost { max-width: calc(100vw - 24px); }
  .phase-banner { width: 100%; }
  .phase-banner .pb-num { display: none; }
  .map-free.open { flex-wrap: wrap; }
  .fo-item.fo-yr { flex: 1 1 100%; }
  .ld-card, .jp-card { max-height: calc(100dvh - 32px); overflow: auto; }
}

.erachip .tx { display: flex !important; }
.erachip .k { font-size: 9px; }

.era-hero .era-tag { flex: none; white-space: nowrap; }

/* v2.2：与独立版统一的地图控制与指标入口，沿用浏览器可视视口适配。 */
#dock { left: 12px; bottom: 16px; padding: 5px; display: flex; flex-direction: column; gap: 2px; align-items: center; border-radius: 16px; }
#dock.hidden { transform: translateX(-14px); }
.dock-sep { width: 26px; height: 1px; background: var(--line-strong); margin: 4px 0; flex: none; }
.dockbtn { position: relative; overflow: hidden; width: 40px; height: 38px; border-radius: 11px; 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: 20px; height: 20px; }
.dockbtn .lb { display: none; }
.dockbtn.layers, .dockbtn[data-act="view.toggle"] { height: 48px; align-content: center; gap: 2px; }
.dockbtn.layers .lb, .dockbtn[data-act="view.toggle"] .lb { display: block; font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .3px; }
.dockbtn:hover { background: var(--hover); color: var(--text); transform: scale(1.05); }
.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); }
.dockbtn.layers.open:not(.on) { background: var(--accent-soft); color: var(--accent); }
#zoomCtl { display: flex; flex-direction: column; gap: 2px; }
#zoomCtl button { position: relative; overflow: hidden; width: 40px; height: 34px; 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); }
/* 图层面板：在「图层」按钮右侧竖排展开的图标（细线分组），名称与说明在悬停提示中 */
#layerPanel { position: fixed; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px; border-radius: 14px; zoom: var(--uiz, 1); animation: lpIn .16s var(--ease) both; }
#layerPanel.hidden { display: none; }
@keyframes lpIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.lp-sep { width: 22px; height: 1px; background: var(--line-strong); margin: 4px 0; flex: none; }
.lp-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--lc, var(--muted)); cursor: pointer; display: grid; place-items: center; flex: none; transition: background .15s, color .15s, transform .2s var(--spring), box-shadow .2s; }
.lp-btn .ico { width: 20px; height: 20px; }
.lp-btn:hover { background: color-mix(in srgb, var(--lc, var(--accent)) 14%, transparent); transform: translateY(-1px); }
.lp-btn:active { transform: scale(.92); }
.lp-btn.on { background: var(--lc, var(--accent)); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); }
.lp-btn.opt { --lc: var(--muted); }
.lp-btn.opt.on { --lc: var(--accent); }
/* 指标详情顶部：指标自带的地图图层开关 */
.metric-layer { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 12px; padding: 8px 10px; margin: 0 0 10px; background: var(--surface-3); color: var(--text); cursor: pointer; text-align: left; }
.metric-layer:hover { background: var(--hover); }
.metric-layer .ml-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--lc) 15%, transparent); color: var(--lc); flex: none; }
.metric-layer.on .ml-ico { background: var(--lc); color: #fff; }
.metric-layer b { display: block; font-size: 12.5px; }
.metric-layer small { display: block; font-size: 11px; color: var(--muted); }
.metric-layer .switch { pointer-events: none; flex: none; }
#dock { top: auto; bottom: 16px; width: 52px; max-height: calc((100dvh - 116px) / var(--uiz, 1)); overflow-y: auto; scrollbar-width: none; }
#dock #zoomCtl { position: static; inset: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; zoom: 1; flex: none; }
#layerPanel { max-height: calc((var(--view-height, 100dvh) - 24px) / var(--uiz, 1)); overflow-y: auto; overscroll-behavior: contain; }
#layerPanel .lp-btn { outline-offset: -2px; }
#zoomCtl .compass .needle { width: 21px; height: 21px; display: block; }
.citybar { gap: 6px; padding-right: 7px; }
.speed .time-fold.peak::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; right: 4px; top: 4px; background: var(--teal); }
.dropdown.time-options .peak { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.time-options .peak.active { box-shadow: inset 0 0 0 1px var(--teal); }
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
  #dock { top: auto; left: calc((var(--view-left) + var(--safe-left) + 8px) / var(--uiz, 1)); bottom: calc((100dvh - var(--mobile-side-bottom, 100dvh) + 8px) / var(--uiz, 1)); width: 46px; padding: 4px; gap: 2px; max-height: max(0px, calc((var(--mobile-side-bottom, 100dvh) - var(--mobile-hud-bottom, 110px) - 8px) / var(--uiz, 1))); }
  #dock .dockbtn { height: 32px; }
  #dock .dockbtn.layers, #dock .dockbtn[data-act="view.toggle"] { height: 40px; }
  #dock #zoomCtl button { height: 30px; width: 36px; }
  #layerPanel { max-height: max(60px, calc((var(--mobile-side-bottom, 100dvh) - var(--mobile-hud-bottom, 110px) - 8px) / var(--uiz, 1))); }
}
@media (max-width: 760px) and (orientation: portrait) {
  #hudTop .citybar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 4px; }
  #hudTop .citybar .daypill { grid-column: 1; grid-row: 1; }
  #hudTop .citybar .erachip { grid-column: 2; grid-row: 1; justify-self: end; }
  #hudTop .citybar .speed { grid-column: 1; grid-row: 2; justify-self: start; margin-left: 0; }
  #hudTop .citybar .jumps { grid-column: 2; grid-row: 2; justify-self: end; }
}

/* ---------- 选择地图（v2.2 重做）：与主菜单共用背景地图与左侧栏位，右侧为所选城市的舞台 ---------- */
/* 背景：与主菜单同一渐变，另加一层随界面淡入淡出的提亮（不重绘背景地图，切换时连续） */
#screen::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: rgba(239, 245, 250, 0.42); opacity: 0; transition: opacity .45s var(--ease); }
:root[data-theme="dark"] #screen::before { background: rgba(15, 23, 36, 0.5); }
#screen.msel2::before { opacity: 1; }
#screen.msel2 { place-items: stretch; 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; }
:root[data-theme="dark"] #screen.msel2 { 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%); }
.ms2 { width: 100%; height: 100%; min-height: 0; display: grid; grid-template-columns: min(400px, 34vw) minmax(0, 1fr); gap: clamp(18px, 2.2vw, 32px); padding: clamp(14px, 2.6vh, 26px) max(2.2vw, 18px) clamp(14px, 2.6vh, 26px) max(6vw, 28px); outline: none; }
/* 左栏（与主菜单同一位置与宽度） */
.ms2-rail { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; animation: msRail .45s var(--ease) both; }
.ms2-head { display: flex; align-items: center; gap: 8px; height: 46px; flex: none; }
.ms2-head h2 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: 2px; color: var(--navy); white-space: nowrap; }
.ms2-head .iconbtn { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-solid); box-shadow: var(--shadow-sm); }
.ms2-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ms2-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); box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s; flex: none; }
.ms2-search:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.ms2-search > .ico { color: var(--muted); }
.ms2-filters { display: flex; flex-direction: column; gap: 6px; flex: none; }
.ms2-frow { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ms2-fl { display: inline-flex; align-items: center; gap: 4px; flex: none; width: 46px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
:root[lang="en"] .ms2-fl { width: 64px; }
.ms2-fl .ico { color: var(--accent); }
.ms2-frow .fchips { flex: 1; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; padding: 2px; min-width: 0; cursor: grab; touch-action: pan-x; overscroll-behavior-x: contain; }
.ms2-frow .fchips::-webkit-scrollbar { height: 4px; }
.ms2-frow .fchips::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.ms2-frow .fchips .fchip { cursor: inherit; user-select: none; touch-action: pan-x; }
.ms2-frow .fchips.dragging, .ms2-frow .fchips.dragging .fchip { cursor: grabbing; }
.ms2-frow .fchips.dragging .fchip:active { transform: none; }
.ms2-frow .fchip { height: 27px; padding: 0 11px; font-size: 12px; flex: none; }
.ms2-lh { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 2px 0; font-size: 12px; font-weight: 700; color: var(--muted); flex: none; }
.ms2-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 0 -6px; padding: 3px 6px 8px; scrollbar-width: thin; }
.ms2-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 10px 7px 7px; border-radius: 14px; border: 1.5px solid transparent; background: color-mix(in srgb, var(--surface-solid) 78%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--text); text-align: left; cursor: pointer; flex: none; transition: background .2s, border-color .2s, box-shadow .2s, transform .22s var(--spring); animation: riseIn .4s var(--ease) both; }
.ms2-item:hover { background: var(--surface-solid); box-shadow: var(--shadow-sm); }
.ms2-item.on { background: var(--surface-solid); border-color: var(--accent); box-shadow: var(--ring), 0 10px 24px rgba(36, 66, 104, 0.14); }
.ms2-thumb { position: relative; width: 84px; height: 54px; border-radius: 10px; overflow: hidden; flex: none; background: var(--hover); }
.ms2-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.ms2-item:hover .ms2-thumb img, .ms2-item.on .ms2-thumb img { transform: scale(1.1); }
.ms2-flag { position: absolute; left: 4px; top: 4px; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: rgba(15, 118, 110, 0.92); color: #fff; }
.ms2-it { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ms2-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ms2-name b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms2-name em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; flex: none; }
.ms2-it small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms2-meta { display: flex; align-items: center; gap: 8px; margin-top: 1px; min-width: 0; }
.ms2-reg { font-size: 11px; color: var(--faint); white-space: nowrap; }
.ms2-prog { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--faint); }
.ms2-note { font-size: 11.5px; color: var(--faint); line-height: 1.5; flex: none; }
/* 舞台 */
.ms2-stage { min-width: 0; min-height: 0; display: flex; animation: msStage .5s var(--ease) .05s both; }
.ms2-sheet { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(36, 66, 104, 0.22); }
:root[data-theme="dark"] .ms2-sheet { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.ms2-sheet.swap-in { animation: swapIn .32s var(--ease) both; }
.ms2-poster { position: relative; flex: 0 0 clamp(190px, 38vh, 330px); overflow: hidden; background: var(--hover); }
.ms2-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 24s ease-in-out infinite alternate; }
.ms2-poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 36, 0) 22%, rgba(10, 20, 36, 0.8)); }
.ms2-ptx { position: absolute; left: 24px; right: 24px; bottom: 66px; z-index: 1; color: #fff; }
.ms2-ptx h2 { margin: 4px 0 2px; font-size: 34px; font-weight: 900; letter-spacing: 1.5px; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3); }
.ms2-tagline { font-size: 14.5px; opacity: .93; }
.ms2-ptx .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); }
.ms2-ptx .lvl i { background: rgba(255, 255, 255, 0.35); }
.ms2-ptx .lvl i.on { background: #ffd34d; }
.ms2-facts { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 1; display: flex; gap: 8px; }
.ms2-facts > div { flex: 1 1 0; min-width: 0; padding: 6px 11px; border-radius: 11px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; }
.ms2-facts span { display: block; font-size: 10.5px; opacity: .82; }
.ms2-facts b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms2-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(210px, .7fr); }
.ms2-col { min-height: 0; overflow-y: auto; padding: 14px 22px 12px; scrollbar-width: thin; }
.ms2-tlcol { border-left: 1px solid var(--line); background: var(--surface-2); padding-left: 16px; padding-right: 16px; }
.ms2-h { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .5px; }
.ms2-h .ico { color: var(--accent); }
.ms2-intro { margin: 0 0 14px; font-size: 13.5px; line-height: 1.75; color: var(--text); }
.ms2-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ms2-feat { display: flex; gap: 9px; align-items: flex-start; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); animation: riseIn .4s var(--ease) both; }
.ms2-feat .badge { width: 28px; height: 28px; border-radius: 9px; flex: none; }
.ms2-feat b { display: block; font-size: 13px; }
.ms2-feat small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 1px; }
/* 大事年表：竖排，按阶段着色 */
.ms2-tl { position: relative; display: flex; flex-direction: column; }
.ms2-tl::before { content: ''; position: absolute; left: 45px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--line-strong); }
.ms2-era { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 2px 58px; }
.ms2-era:first-child { margin-top: 0; }
.ms2-era b { font-size: 11.5px; font-weight: 800; color: var(--ec, var(--accent)); }
.ms2-era small { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.ms2-ev { position: relative; display: grid; grid-template-columns: 38px 16px minmax(0, 1fr); column-gap: 4px; align-items: start; padding: 3px 0; animation: riseIn .4s var(--ease) both; }
.ms2-ev b { font-size: 12.5px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; line-height: 18px; }
.ms2-ev i { justify-self: center; width: 11px; height: 11px; margin-top: 3.5px; border-radius: 50%; background: var(--surface-solid); border: 2.5px solid var(--ec, var(--accent)); position: relative; z-index: 1; }
.ms2-ev.start i { background: var(--ec, var(--gold)); border-color: var(--ec, var(--gold)); }
.ms2-ev span { font-size: 12px; line-height: 1.5; color: var(--text); }
/* 开始方式 */
.ms2-actbar { flex: none; padding: 10px 20px 14px; 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"] .ms2-actbar { box-shadow: 0 -10px 24px -14px rgba(0, 0, 0, 0.6); }
.ms2-acth { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ms2-acth b { font-size: 14px; }
.ms2-acth .tiny { display: inline-flex; align-items: center; gap: 4px; }
.ms2-acts { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.ms2-acts .map-free { grid-column: 1 / -1; }
.ms2-acts .map-mode { min-width: 0; padding: 10px 12px; gap: 10px; }
.ms2-acts .map-mode .grow { min-width: 0; }
.ms2-acts .map-mode b, .ms2-acts .map-mode small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms2-acts .map-mode.sub { background: var(--surface-2); }
.ms2-acts .map-mode.sub .badge { width: 30px; height: 30px; border-radius: 9px; }
/* 切换动效：旧界面向一侧滑开淡出，新界面从另一侧滑入；背景地图不动 */
@keyframes msRail { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes msStage { from { opacity: 0; transform: translateX(44px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes scrOutL { to { opacity: 0; transform: translateX(-26px); } }
@keyframes scrOutR { to { opacity: 0; transform: translateX(26px); } }
@keyframes scrFade { to { opacity: 0; } }
@keyframes slideInL { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
.scr-out { position: absolute; inset: 0; display: grid; pointer-events: none; z-index: 2; }
.scr-out.scr-fwd { animation: scrOutL .3s var(--ease) both; }
.scr-out.scr-back { animation: scrOutR .3s var(--ease) both; }
.scr-out.scr-zoom, .scr-out.scr-fade { animation: scrFade .26s var(--ease) both; }
#screen.scr-in-back .ms2-rail { animation-name: slideInL; }
#screen.scr-in-back .ms2-stage { animation: msStage .5s var(--ease) both; }
#screen.scr-in-back .start-wrap > *, #screen.scr-in-back .start-menu > * { animation-name: slideInL; }
/* 载入背景：所选城市的地图画面铺满全屏（自选择地图放大而来），载入卡片浮在其上 */
#stagebg { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease); overflow: hidden; }
#stagebg.on { opacity: 1; }
#stagebg.on.zoom { transition: none; }
#stagebg .sb-frame { position: absolute; inset: 0; transform-origin: 0 0; overflow: hidden; transition: transform .55s cubic-bezier(.2, .8, .2, 1), clip-path .55s cubic-bezier(.2, .8, .2, 1); }
#stagebg img { position: absolute; inset: -3%; width: 106%; height: 106%; object-fit: cover; filter: blur(3px) saturate(1.08); animation: kenburns 30s ease-in-out infinite alternate; }
#stagebg .sb-frame::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 46%, rgba(239, 245, 250, 0.22) 0%, rgba(239, 245, 250, 0.66) 75%); }
:root[data-theme="dark"] #stagebg .sb-frame::after { background: radial-gradient(ellipse at 50% 46%, rgba(15, 23, 36, 0.25) 0%, rgba(15, 23, 36, 0.7) 75%); }
#screen.ld-screen { background: rgba(239, 245, 250, 0.2); backdrop-filter: none; -webkit-backdrop-filter: none; }
:root[data-theme="dark"] #screen.ld-screen { background: rgba(4, 8, 16, 0.25); }
#screen.ld-screen .ld-card { background: color-mix(in srgb, var(--surface-solid) 84%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 30px 80px rgba(20, 40, 70, 0.25); }
#screen.scr-in-zoom .ld-card { animation: cardIn .45s var(--spring) .3s both; }
/* 窄屏：左栏在上（列表横向排列），舞台在下 */
@media (max-width: 900px) {
  .ms2 { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); padding: 12px; gap: 10px; }
  .ms2-rail { gap: 8px; }
  .ms2-head h2 { font-size: 21px; }
  .ms2-lh, .ms2-note { display: none; }
  .ms2-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; flex: none; padding-bottom: 6px; }
  .ms2-item { width: 230px; }
  .ms2-body { grid-template-columns: 1fr; overflow-y: auto; }
  .ms2-col { overflow: visible; }
  .ms2-tlcol { border-left: 0; border-top: 1px solid var(--line); }
  .ms2-poster { flex-basis: 170px; }
  .ms2-ptx { bottom: 58px; left: 16px; right: 16px; }
  .ms2-ptx h2 { font-size: 24px; }
  .ms2-facts > div:nth-child(n+4) { display: none; }
  .ms2-acts { grid-template-columns: 1fr 1fr; }
}
@media (max-height: 700px) and (min-width: 901px) {
  .ms2-poster { flex-basis: 30vh; }
  .ms2-ptx { bottom: 58px; }
  .ms2-ptx h2 { font-size: 28px; }
  .ms2-acts .map-mode small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ms2-rail, .ms2-stage, .ms2-item, .ms2-ev, .ms2-feat, .ms2-poster img, #stagebg img { animation: none; } #stagebg .sb-frame { transition: none; } }

/* ======================== 建设效果报告与开通效果卡（v2.3） ======================== */
.imp-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 10px; }
.imp-kpi { border: 1px solid var(--line); border-radius: 13px; padding: 9px 11px; background: var(--surface-2); min-width: 0; }
.imp-kpi .imp-k { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.imp-kpi .imp-v { display: block; font-size: 19px; font-weight: 700; margin: 3px 0 1px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.imp-kpi .imp-d { font-size: 12px; font-weight: 600; }
.imp-kpi .imp-n { font-size: 11px; color: var(--muted); margin-top: 2px; }
.imp-kpi.good { border-color: color-mix(in srgb, var(--good) 35%, transparent); background: var(--good-soft); }
.imp-kpi.good .imp-d { color: var(--good); }
.imp-kpi.bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-soft); }
.imp-kpi.bad .imp-d { color: var(--bad); }
.imp-kpi.muted .imp-d { color: var(--muted); }
.imp-why, .imp-tips { border: 1px solid var(--line); border-radius: 13px; padding: 10px 12px; margin: 8px 0; background: var(--surface-solid); }
.imp-q { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; color: var(--accent); }
.imp-verdict { font-size: 13.5px; font-weight: 600; line-height: 1.6; margin: 6px 0; }
.imp-reasons, .imp-tips ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.imp-reasons li, .imp-tips li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; font-size: 12px; line-height: 1.55; align-items: start; }
.imp-reasons li .ico, .imp-tips li .ico { margin-top: 2px; }
.imp-reasons li.lv-good .ico { color: var(--good); }
.imp-reasons li.lv-bad .ico { color: var(--bad); }
.imp-reasons li.lv-warn .ico { color: var(--warn); }
.imp-reasons li.lv-info .ico, .imp-tips li .ico { color: var(--accent); }
.imp-bars { display: grid; gap: 4px; }
.imp-bar { display: grid; grid-template-columns: minmax(64px, 30%) 30px 1fr auto; gap: 6px; align-items: center; font-size: 12px; padding: 3px 4px; border-radius: 8px; cursor: pointer; }
.imp-bar:hover { background: var(--hover); }
.imp-bn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-bt { color: var(--muted); }
.imp-bw { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.imp-bw i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transform-origin: left; animation: impGrow .8s var(--ease) both; }
.imp-bar.weak .imp-bw i { background: var(--bad); }
.imp-bar.weak .imp-bn { color: var(--bad); }
.imp-bv { font-variant-numeric: tabular-nums; }
@keyframes impGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.imp-card { width: min(600px, calc(100vw - 32px)); }
.imp-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.imp-hero h2 { margin: 2px 0 0; font-size: 21px; }
.imp-burst { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 8px 22px rgba(47, 111, 168, .35); animation: impBurst 1.2s var(--spring) both; flex: none; }
@keyframes impBurst { 0% { transform: scale(.4) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.12) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.imp-card .imp-kpi { animation: cardIn .5s var(--spring) both; }
.imp-card .imp-kpi:nth-child(2) { animation-delay: .08s; }
.imp-card .imp-kpi:nth-child(3) { animation-delay: .16s; }
.imp-card .imp-kpi:nth-child(4) { animation-delay: .24s; }
@media (max-width: 520px) { .imp-kpis { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .imp-bw i, .imp-burst, .imp-card .imp-kpi { animation: none; } }
/* ======================== 手绘简图与图文分页（v2.3） ======================== */
:root { --sk-ink: #34465f; --sk-paper: #fffdf6; --sk-water: #bcdcf2; --sk-home: #ffd9a8; --sk-work: #c9d9f6; --sk-gold: #ffd56a; --sk-road: #e3e3e3; --sk-car: #f08a5d; --sk-bad: #f2a3a0; --sk-metro: #e4002b; }
:root[data-theme="dark"] { --sk-ink: #c8d6ea; --sk-paper: #22304a; --sk-water: #23476a; --sk-home: #7a5733; --sk-work: #33507e; --sk-gold: #8a6c1c; --sk-road: #3a4658; --sk-car: #b2603c; --sk-bad: #7d3434; --sk-metro: #ff5a6e; }
.sk { width: 100%; height: auto; display: block; }
.sk path, .sk circle { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sk .sk-ink { stroke: var(--sk-ink); stroke-width: 1.6; }
.sk .sk-thin { stroke: var(--sk-ink); stroke-width: 0.9; opacity: .75; }
.sk .sk-paper { fill: var(--sk-paper); stroke: none; }
.sk .sk-water { fill: var(--sk-water); stroke: none; }
.sk .sk-wave { stroke: var(--sk-ink); stroke-width: 1; opacity: .35; }
.sk .sk-home { fill: var(--sk-home); stroke: none; }
.sk .sk-work { fill: var(--sk-work); stroke: none; }
.sk .sk-gold { fill: var(--sk-gold); stroke: none; }
.sk .sk-road { fill: var(--sk-road); stroke: none; }
.sk .sk-car { fill: var(--sk-car); stroke: none; }
.sk .sk-bad { fill: var(--sk-bad); stroke: none; }
.sk .sk-st { fill: var(--sk-paper); stroke: none; }
.sk .sk-metro-f { fill: var(--sk-metro); stroke: none; opacity: .85; }
.sk .sk-metro { stroke: var(--sk-metro); stroke-width: 5; stroke-dasharray: 2 9; animation: skDash 1.6s linear infinite; }
@keyframes skDash { to { stroke-dashoffset: -22; } }
.sk text { fill: var(--sk-ink); font-family: var(--font); font-size: 11px; }
.sk .sk-b { font-weight: 700; font-size: 12px; }
.sk .sk-small { font-size: 10px; }
.sk .sk-big { font-size: 30px; font-weight: 800; }
.sk .sk-muted { opacity: .65; }
.sk .sk-accent { fill: var(--sk-metro); font-weight: 700; }
.sk .sk-bad-t { fill: var(--bad); font-weight: 700; }
.sk .sk-white { fill: #fff; }
.sl-card { width: min(560px, calc(100vw - 32px)); }
.sl-pic { margin: 6px 0 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); padding: 8px 12px; }
.sl-pic.in-r { animation: slIn .35s var(--ease) both; }
.sl-pic.in-l { animation: slInL .35s var(--ease) both; }
@keyframes slIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
/* 往回翻：从左侧滑入（以前用 reverse 播放 slIn，结束在透明状态，第一页和往回翻的图不显示） */
@keyframes slInL { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.sl-title { margin: 10px 0 4px; font-size: 17px; }
.sl-lines { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; line-height: 1.6; }
.sl-note { margin-top: 6px; min-height: 1em; }
.sl-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.sl-dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.sl-dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: var(--line-strong); cursor: pointer; }
.sl-dots button.on { background: var(--accent); width: 20px; border-radius: 4px; }
.eg-toc { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.mission-card { width: min(620px, calc(100vw - 32px)); }
.mission-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.mission-facts div { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--surface-2); }
.mission-facts b { display: block; font-size: 17px; margin-bottom: 2px; }
.mission-facts span { font-size: 11.5px; color: var(--muted); }
.mission-goal { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-weight: 600; line-height: 1.55; }
@media (max-width: 520px) { .mission-facts { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .sk .sk-metro, .sl-pic.in-r, .sl-pic.in-l { animation: none; } }.sl-pic .sk { max-height: 240px; margin: 0 auto; }

/* ======================== 可选挑战与城市难题（v2.3） ======================== */
.tag.opt { background: var(--teal-soft); color: var(--teal); }
.tk-theme { display: flex; align-items: center; gap: 5px; margin: 4px 0 2px; font-size: 12px; color: var(--teal); }
.tk-tips { margin: 6px 0 4px; padding: 7px 10px 7px 26px; border-radius: 10px; background: var(--surface-2); font-size: 12px; line-height: 1.55; display: grid; gap: 2px; }
.tk-tips::before { content: none; }
.tk-offer { border-color: color-mix(in srgb, var(--teal) 40%, transparent); box-shadow: 0 0 0 3px var(--teal-soft); }
.tk-sech { display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; }
/* ======================== 城市纪事报：史实与经济事件剪报（v2.3） ======================== */
:root { --paper: #fbf7ec; --paper-ink: #2b2620; --paper-muted: #6f6556; --paper-rule: #2b2620; --news-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", "Noto Serif CJK SC", Georgia, "Times New Roman", serif; }
:root[data-theme="dark"] { --paper: #2a2620; --paper-ink: #ece4d2; --paper-muted: #b8ad98; --paper-rule: #ece4d2; }
#newsHost { position: fixed; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 39; display: flex; flex-direction: column-reverse; gap: 8px; align-items: flex-end; pointer-events: none; zoom: var(--uiz, 1); transition: right .3s var(--ease), opacity .35s var(--ease); }
#newsHost.hidden { opacity: 0; }
#newsHost > * { pointer-events: auto; }
body.cinema #newsHost { opacity: 0 !important; pointer-events: none !important; }
.news-card { position: relative; overflow: hidden; width: 320px; max-width: calc(100vw - 28px); padding: 8px 12px 11px; border-radius: 4px 4px 10px 4px; background: var(--paper); color: var(--paper-ink); box-shadow: 0 10px 26px rgba(40, 30, 10, 0.22), 0 1px 2px rgba(40, 30, 10, 0.18); border: 1px solid color-mix(in srgb, var(--paper-ink) 14%, transparent); animation: ncIn .45s var(--spring) both; transform-origin: bottom right; }
.news-card.out { animation: ncOut .36s var(--ease) both; }
@keyframes ncIn { from { opacity: 0; transform: translateY(14px) rotate(1.2deg) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ncOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }
.news-card .nc-mast { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; border-bottom: 3px double var(--paper-rule); font-family: var(--news-serif); }
.news-card .nc-mast b { font-size: 12.5px; letter-spacing: .12em; }
.news-card .nc-mast > span:not(.nc-acts) { font-size: 11px; color: var(--paper-muted); }
.news-card .nc-acts { margin-left: auto; display: flex; gap: 0; }
.news-card .nc-acts .iconbtn { width: 24px; height: 24px; color: var(--paper-muted); }
.news-card .nc-head { margin: 7px 0 3px; font-family: var(--news-serif); font-size: 16.5px; font-weight: 800; line-height: 1.3; padding-right: 34px; }
.news-card .nc-trend { font-size: 12px; margin-right: 5px; vertical-align: 2px; }
.news-card .nc-trend.up { color: #1f8a4c; }
.news-card .nc-trend.down { color: #b6382c; }
.news-card .nc-lead { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--paper-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; text-align: justify; }
.news-card .nc-lead::first-letter { font-weight: 700; color: var(--paper-ink); }
.news-card .nc-lead.open { -webkit-line-clamp: unset; display: block; }
.news-card .nc-foot { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; align-items: center; }
.news-card .nc-note { font-size: 11px; color: var(--paper-muted); font-family: var(--news-serif); }
.news-card .nc-stamp { position: absolute; right: 10px; top: 40px; padding: 1px 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; border: 2px solid currentColor; border-radius: 4px; transform: rotate(-8deg); opacity: .72; color: #a1442f; font-family: var(--news-serif); }
.news-card .nc-stamp.sim { color: #3866a8; }
.news-card .nc-stamp.info { color: #8a6a1c; }
.news-card .hc-life { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: left; animation: lifeBar var(--life, 9s) linear both; animation-play-state: var(--life-play, running); background: var(--paper-ink); opacity: .25; }
.news-card.econ .nc-mast { border-bottom-color: #3866a8; }
.news-card.econ.neg .nc-mast { border-bottom-color: #a1442f; }
.news-card .nc-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.news-card .nc-list li { display: flex; gap: 8px; font-size: 12.5px; font-family: var(--news-serif); padding-bottom: 3px; border-bottom: 1px dotted color-mix(in srgb, var(--paper-ink) 25%, transparent); }
.news-card .nc-list li:last-child { border-bottom: 0; }
.news-card .nc-list b { flex: none; width: 54px; font-variant-numeric: tabular-nums; color: var(--paper-muted); }
.news-card .nc-list span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-card .nc-more { margin: 5px 0 0; font-size: 11px; color: var(--paper-muted); }
/* 发展阶段横幅：「号外」版式（仍在中间偏上，约 11 秒，不暂停） */
.phase-banner { background: var(--paper); color: var(--paper-ink); border: 1px solid color-mix(in srgb, var(--paper-ink) 14%, transparent); border-top: 5px solid var(--ec); border-radius: 6px; box-shadow: 0 14px 30px rgba(40, 30, 10, 0.22); }
.phase-banner .pb-title { font-family: var(--news-serif); color: var(--paper-ink); }
.phase-banner .pb-kick, .phase-banner .pb-sub { color: var(--paper-muted); opacity: 1; }
.phase-banner .pb-num { background: var(--ec); color: #fff; box-shadow: none; }
.phase-banner .pb-tag { background: color-mix(in srgb, var(--ec) 16%, transparent); color: var(--ec); }
.phase-banner .pb-prev { background: color-mix(in srgb, var(--paper-ink) 7%, transparent); }
.phase-banner .pb-dots i { background: color-mix(in srgb, var(--paper-ink) 18%, transparent); }
.phase-banner .pb-dots i.past { background: color-mix(in srgb, var(--ec) 55%, transparent); }
.phase-banner .pb-dots i.cur { background: var(--ec); }
.phase-banner .pb-acts .iconbtn { color: var(--paper-muted); }
.phase-banner .pb-acts .btn { background: var(--ec); color: #fff; }
.phase-banner .pb-line { background: linear-gradient(90deg, transparent, var(--ec), transparent); }
.phase-banner .pb-life { background: var(--ec); opacity: .5; }
@media (max-width: 760px) { #newsHost { left: 8px; right: 8px !important; bottom: calc(76px + env(safe-area-inset-bottom)); align-items: stretch; } .news-card { width: auto; } }
@media (prefers-reduced-motion: reduce) { .news-card, .news-card.out { animation: none; } }
/* ======================== 图层信息面板精简（v2.3） ======================== */
#legendCard { width: 248px; }
#legendCard .lc-head { padding: 10px 10px 6px 12px; }
#legendCard .lc-body { padding: 0 12px 10px; }
.legend .seg-ctl.sm { margin: 0 0 6px !important; }
.legend .li { margin: 3px 0; }
/* 拥堵变化与地铁带动（v2.3）：图例里的成熟度条 */
.legend .lg-habit { display: grid; grid-template-columns: auto minmax(40px, 1fr) auto; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; }
.legend .lg-habit i { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.legend .lg-habit em { display: block; height: 100%; border-radius: 3px; background: #0f8a48; }
.legend .lg-habit b { font-variant-numeric: tabular-nums; }
.legend .lg-more { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 4px; }
.legend .lg-more summary { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); cursor: pointer; list-style: none; padding: 2px 0; user-select: none; }
.legend .lg-more summary::-webkit-details-marker { display: none; }
.legend .lg-more summary::after { content: '▾'; margin-left: auto; transition: transform .2s var(--ease); }
.legend .lg-more[open] summary::after { transform: rotate(180deg); }
.legend .lg-more .note { margin-top: 4px; }
/* ======================== 满意度入口与乘客之声（v2.3） ======================== */
.sat-dock { position: fixed; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 41; zoom: var(--uiz, 1); display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); cursor: pointer; transition: right .3s var(--ease), opacity .35s var(--ease), transform .15s var(--ease); }
.sat-dock:hover { transform: scale(1.04); }
.sat-dock.hidden { opacity: 0; pointer-events: none; }
body.cinema .sat-dock { opacity: 0 !important; pointer-events: none !important; }
.sat-dock .sd-face { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--good); }
.sat-dock.meh .sd-face { background: var(--warn); }
.sat-dock.frown .sd-face { background: var(--bad); }
.sat-dock .sd-tx { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.sat-dock .sd-tx small { font-size: 10.5px; color: var(--muted); }
.sat-dock .sd-tx b { font-size: 16px; font-variant-numeric: tabular-nums; }
.sat-dock .sd-dot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface-solid); }
#newsHost { bottom: calc(70px + env(safe-area-inset-bottom)); }
.sat-dock.vx-on { opacity: 0; pointer-events: none; }
/* 「地铁圈」App（v2.3）：从入口放大打开的社交平台窗口 —— 左栏导航、中间时间线、右栏搜索与热议 */
.vx-back { position: fixed; inset: 0; z-index: 46; background: rgba(12, 20, 34, 0.32); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.vx-app { --vx-line: var(--line); position: fixed; z-index: 47; left: 50%; top: 50%; width: min(1060px, calc(100vw - 40px)); height: min(760px, calc(100vh - 48px)); translate: -50% -50%; display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; border-radius: 22px; overflow: hidden; background: var(--surface-solid); color: var(--text); box-shadow: 0 40px 100px rgba(10, 20, 40, 0.38), 0 0 0 1px var(--line); outline: none; will-change: transform; }
.vx-rail { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; border-right: 1px solid var(--vx-line); min-height: 0; }
.vx-logo { display: flex; align-items: center; gap: 9px; padding: 4px 8px 14px; }
.vx-logo b { font-size: 19px; font-weight: 900; letter-spacing: 1px; }
.vx-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--accent), #6d4ed8); box-shadow: 0 6px 16px -6px var(--accent); }
.vx-nav, .vx-exit { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 0; border-radius: 999px; background: none; color: var(--text); font-size: 15.5px; cursor: pointer; text-align: left; transition: background .15s; }
.vx-nav:hover, .vx-exit:hover { background: var(--hover); }
.vx-nav.on { font-weight: 800; }
.vx-exit { font-size: 13.5px; color: var(--muted); border: 1px solid var(--vx-line); justify-content: center; }
.vx-tl { min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; border-right: 1px solid var(--vx-line); }
.vx-head { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--surface-solid) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--vx-line); }
.vx-ht { display: flex; align-items: baseline; gap: 10px; padding: 12px 18px 4px; }
.vx-ht b { font-size: 19px; font-weight: 800; }
.vx-ht small { font-size: 12px; color: var(--muted); }
.vx-tabs { display: flex; }
.vx-tab { flex: 1; border: 0; background: none; color: var(--muted); font-size: 14px; padding: 12px 0 0; cursor: pointer; transition: background .15s; }
.vx-tab:hover { background: var(--hover); }
.vx-tab > span { display: inline-flex; gap: 5px; align-items: baseline; padding-bottom: 11px; border-bottom: 4px solid transparent; border-radius: 2px; }
.vx-tab small { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.vx-tab.on { color: var(--text); font-weight: 800; }
.vx-tab.on > span { border-bottom-color: var(--accent); }
.vx-post { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 12px; padding: 13px 18px 9px; border-bottom: 1px solid var(--vx-line); transition: background .15s; animation: riseIn .35s var(--ease) both; }
.vx-post:hover { background: color-mix(in srgb, var(--hover) 55%, transparent); }
.vx-ava { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; }
.vx-body { min-width: 0; }
.vx-who { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 14px; }
.vx-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-hd { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.vx-kind { flex: none; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.vx-post.k-bad .vx-kind { background: var(--bad-soft); color: var(--bad); }
.vx-post.k-good .vx-kind { background: var(--good-soft); color: var(--good); }
.vx-post.k-idea .vx-kind { background: var(--accent-soft); color: var(--accent); }
.vx-text { margin: 3px 0 0; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.vx-tag { border: 0; background: none; padding: 0 3px 0 0; color: var(--accent); font: inherit; cursor: pointer; }
.vx-tag:hover { text-decoration: underline; }
.vx-media { margin-top: 10px; max-width: 460px; border: 1px solid var(--vx-line); border-radius: 16px; overflow: hidden; background: var(--surface-2); padding: 6px 10px; }
.vx-media .sk { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.sk .sk-heart { fill: #f2557a; fill-opacity: .85; stroke: var(--sk-ink); }
.vx-acts { display: flex; align-items: center; justify-content: space-between; max-width: 460px; margin: 6px 0 0 -8px; color: var(--muted); }
.vx-act { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: inherit; font-size: 12.5px; padding: 0; cursor: default; font-variant-numeric: tabular-nums; }
button.vx-act { cursor: pointer; }
.vx-ib { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; transition: background .15s, color .15s; }
.vx-i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button.vx-act.rp:hover, .vx-act.rp.on { color: #00a86b; }
button.vx-act.rp:hover .vx-ib { background: rgba(0, 168, 107, 0.12); }
button.vx-act.like:hover, .vx-act.like.on { color: #f0326e; }
button.vx-act.like:hover .vx-ib { background: rgba(240, 50, 110, 0.12); }
.vx-act.like.on .vx-i { fill: currentColor; }
.vx-act.pop .vx-ib { animation: vxPop .4s var(--spring); }
@keyframes vxPop { 40% { transform: scale(1.35); } }
.vx-loc { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--vx-line); background: none; color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.vx-loc:hover { color: var(--accent); border-color: var(--accent); }
.vx-pin { grid-column: 2; display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: -3px 0 4px; }
.vx-post.official .vx-ava { grid-row: 2; }
.vx-post.official .vx-body { grid-row: 2; grid-column: 2; }
.vx-ver { width: 18px; height: 18px; flex: none; }
.vx-ver .vb { fill: var(--accent); }
.vx-ver .ck { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.vx-vb { display: inline-flex; }
.vx-poll { margin-top: 10px; display: grid; gap: 6px; }
.vx-opt { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; border-radius: 8px; overflow: hidden; font-size: 14px; }
.vx-opt i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: var(--surface-3); }
.vx-opt.top i { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.vx-opt span, .vx-opt b { position: relative; }
.vx-opt.top span, .vx-opt.top b { font-weight: 800; }
.vx-poll small { font-size: 12.5px; color: var(--muted); }
.vx-qbar { display: flex; align-items: center; gap: 8px; padding: 10px 18px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--vx-line); }
.vx-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 24px; color: var(--muted); text-align: center; }
.vx-empty b { color: var(--text); font-size: 16px; }
.vx-end { padding: 16px 20px 26px; font-size: 12px; line-height: 1.6; color: var(--faint); }
.vx-side { min-height: 0; overflow-y: auto; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.vx-search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid transparent; color: var(--muted); flex: none; }
.vx-search:focus-within { border-color: var(--accent); background: var(--surface-solid); color: var(--accent); }
.vx-q { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font-size: 14px; }
.vx-card { border: 1px solid var(--vx-line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.vx-card h4 { margin: 0 0 2px; font-size: 17px; font-weight: 800; }
.vx-score { display: flex; align-items: baseline; gap: 8px; }
.vx-score b { font-size: 32px; font-weight: 900; font-variant-numeric: tabular-nums; }
.vx-score > span:last-child { font-size: 12px; color: var(--muted); }
.vx-face { align-self: center; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--good); }
.vx-sat.meh .vx-face { background: var(--warn); }
.vx-sat.frown .vx-face { background: var(--bad); }
.vx-fs { display: grid; gap: 5px; margin-top: 2px; }
.vx-f { display: grid; grid-template-columns: minmax(0, 1fr) 56px 36px; align-items: center; gap: 8px; font-size: 12px; }
.vx-f span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-f i { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.vx-f em { display: block; height: 100%; border-radius: 3px; background: var(--good); }
.vx-f.bad em { background: var(--bad); }
.vx-f b { text-align: right; font-variant-numeric: tabular-nums; }
.vx-f.zero span, .vx-f.zero b { color: var(--muted); }
.vx-f.good b { color: var(--good); }
.vx-f.bad b { color: var(--bad); }
.vx-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--accent); font-size: 13px; padding: 4px 0 0; cursor: pointer; }
.vx-trend { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: none; color: var(--text); text-align: left; padding: 7px 8px; margin: 0 -8px; border-radius: 10px; cursor: pointer; }
.vx-trend:hover { background: var(--hover); }
.vx-trend small { font-size: 11.5px; color: var(--muted); }
.vx-trend b { font-size: 14.5px; }
.vx-foot { font-size: 11.5px; color: var(--faint); padding: 0 4px; }
.vx-backbtn { align-self: center; width: 34px; height: 34px; margin: -4px 4px -4px -8px; border: 0; border-radius: 50%; background: none; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.vx-backbtn:hover { background: var(--hover); }
.vx-head:has(.vx-backbtn) .vx-ht { padding-bottom: 12px; }
.vx-sv-hero { display: flex; align-items: center; gap: 16px; margin: 16px 18px 6px; padding: 18px; border-radius: 18px; background: var(--good-soft); }
.vx-sv-hero.meh { background: var(--warn-soft); }
.vx-sv-hero.frown { background: var(--bad-soft); }
.vx-sv-hero .vx-face { width: 58px; height: 58px; flex: none; }
.vx-sv-hero.meh .vx-face { background: var(--warn); }
.vx-sv-hero.frown .vx-face { background: var(--bad); }
.vx-sv-num { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.vx-sv-num b { font-size: 40px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.vx-sv-num > span { color: var(--muted); font-size: 13px; }
.vx-sv-num em { font-style: normal; font-size: 13px; font-weight: 700; }
.vx-sv-num em.good { color: var(--good); }
.vx-sv-num em.bad { color: var(--bad); }
.vx-sv-hero small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.vx-sv-sec { padding: 14px 18px; border-bottom: 1px solid var(--vx-line); display: grid; gap: 7px; }
.vx-sv-sec h4 { margin: 0 0 3px; font-size: 16px; font-weight: 800; display: flex; align-items: baseline; gap: 8px; }
.vx-sv-sec h4 small { font-size: 12px; font-weight: 500; color: var(--muted); }
.vx-sv-sec .vx-f { grid-template-columns: minmax(0, 1fr) 140px 48px; font-size: 13px; }
.vx-f.base span, .vx-f.total span { color: var(--muted); }
.vx-f.total { border-top: 1px dashed var(--line-strong); padding-top: 6px; font-weight: 800; }
.vx-f.base i, .vx-f.total i { background: none; }
.vx-sv-q { display: flex; align-items: center; gap: 10px; border: 0; background: var(--surface-2); color: var(--text); text-align: left; padding: 8px 10px; border-radius: 12px; font-size: 13px; line-height: 1.5; cursor: pointer; }
.vx-sv-q:hover { background: var(--hover); }
.vx-sv-q small { flex: none; color: var(--muted); }
.vx-ava.sm { width: 28px; height: 28px; font-size: 12px; flex: none; }
.vx-sv-note { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.vx-hot.flash { animation: vxFlash 1s var(--ease); }
@keyframes vxFlash { 30% { box-shadow: 0 0 0 3px var(--accent); } }
/* X 式配色：只在地铁圈 App 内生效（浅色白底、深色纯黑），蓝色强调、粉色喜欢、绿色转发 */
.vx-app { --x-blue: #1d9bf0; --x-pink: #f91880; --x-green: #00ba7c; --x-text: #0f1419; --x-muted: #536471; --x-line: #eff3f4; --x-bg: #fff; --x-fill: #eff3f4; --x-hov: rgba(15, 20, 25, 0.035); --x-nav: rgba(15, 20, 25, 0.08);
  --vx-line: var(--x-line); --line: var(--x-line); --text: var(--x-text); --muted: var(--x-muted); --faint: color-mix(in srgb, var(--x-muted) 72%, var(--x-bg)); --accent: var(--x-blue); --accent-soft: rgba(29, 155, 240, 0.12); --surface-solid: var(--x-bg); --surface-2: var(--x-fill); --surface-3: var(--x-fill); --hover: var(--x-nav);
  background: var(--x-bg); color: var(--x-text); }
:root[data-theme="dark"] .vx-app { --x-text: #e7e9ea; --x-muted: #71767b; --x-line: #2f3336; --x-bg: #000; --x-fill: #202327; --x-hov: rgba(231, 233, 234, 0.03); --x-nav: rgba(231, 233, 234, 0.1); }
.vx-app .vx-mark { background: var(--x-text); color: var(--x-bg); box-shadow: none; }
.vx-post:hover { background: var(--x-hov); }
.vx-post.clickable { cursor: pointer; }
.vx-post.vx-reply { animation-duration: .25s; }
.vx-tab.on > span { border-bottom-color: var(--x-blue); }
button.vx-act.rep:hover { color: var(--x-blue); }
button.vx-act.rep:hover .vx-ib { background: rgba(29, 155, 240, 0.1); }
button.vx-act.rp:hover, .vx-act.rp.on { color: var(--x-green); }
button.vx-act.rp:hover .vx-ib { background: rgba(0, 186, 124, 0.1); }
button.vx-act.like:hover, .vx-act.like.on { color: var(--x-pink); }
button.vx-act.like:hover .vx-ib { background: rgba(249, 24, 128, 0.1); }
.vx-search { background: var(--x-fill); }
.vx-search:focus-within { background: var(--x-bg); border-color: var(--x-blue); color: var(--x-blue); }
.vx-card { background: none; border-color: var(--x-line); }
.vx-trend:hover, .vx-acc.clickable:hover { background: var(--x-hov); }
/* 帖子页：大号正文、时间与查看数、互动数据、回复框与回复列表 */
.vx-main { padding: 12px 18px 0; border-bottom: 1px solid var(--vx-line); animation: riseIn .3s var(--ease) both; }
.vx-who.big { gap: 10px; margin-bottom: 10px; }
.vx-who.big .vx-ava { flex: none; }
.vx-nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.vx-nm b { display: flex; align-items: center; gap: 3px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-text.big { margin-top: 0; font-size: 17px; line-height: 1.6; }
.vx-main .vx-media { max-width: none; }
.vx-time { margin-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--vx-line); font-size: 14px; color: var(--muted); }
.vx-time b { color: var(--text); }
.vx-stats { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 13px 0; border-bottom: 1px solid var(--vx-line); font-size: 14px; color: var(--muted); }
.vx-stats b { color: var(--text); font-weight: 800; margin-right: 3px; font-variant-numeric: tabular-nums; }
.vx-acts.big { max-width: none; margin: 2px 0; justify-content: space-around; }
.vx-acts.big .vx-ib { width: 38px; height: 38px; }
.vx-acts.big .vx-i { width: 21px; height: 21px; }
.vx-compose { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--vx-line); color: var(--muted); font-size: 16px; }
.vx-compose .vx-ava.sm { width: 40px; height: 40px; }
.vx-compose small { font-size: 12px; color: var(--faint); }
.vx-to { margin-top: 1px; font-size: 13.5px; color: var(--muted); }
.vx-to span { color: var(--x-blue); }
.vx-reply.official-r { background: rgba(29, 155, 240, 0.04); }
.vx-reply .vx-acts { justify-content: flex-start; gap: 56px; }
.vx-acc { display: flex; align-items: center; gap: 10px; padding: 8px; margin: 0 -8px; border-radius: 10px; }
.vx-acc.clickable { cursor: pointer; }
.vx-acc .vx-ava.sm { width: 38px; height: 38px; font-size: 14px; }
.vx-acc .vx-nm { flex: 1; }
.vx-acc .vx-nm b { font-size: 14px; }
.vx-follow { flex: none; border: 0; border-radius: 999px; padding: 6px 14px; background: var(--x-text); color: var(--x-bg); font-size: 13px; font-weight: 800; cursor: pointer; }
.vx-follow.on { background: none; color: var(--x-text); box-shadow: inset 0 0 0 1px var(--line-strong, var(--x-line)); }
/* 关注市民（v2.3）：「关注」入口角标、头像与昵称可进主页、悬停「取消关注」、关注的人有新动态时的标记 */
.vx-follow { min-width: 78px; transition: background .15s, color .15s, box-shadow .15s; }
.vx-follow .f-b { display: none; }
.vx-follow.on:hover { color: #f4212e; background: rgba(244, 33, 46, 0.08); box-shadow: inset 0 0 0 1px rgba(244, 33, 46, 0.45); }
.vx-follow.on:hover .f-a { display: none; }
.vx-follow.on:hover .f-b { display: inline; }
.vx-nav { position: relative; }
.vx-badge { position: absolute; left: 29px; top: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--x-blue); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--x-bg); }
.vx-explore { display: none; }
button.vx-ava { flex: none; border: 0; padding: 0; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; transition: filter .15s; }
button.vx-ava:hover { filter: brightness(.9); }
.vx-nick { min-width: 0; border: 0; background: none; padding: 0; color: var(--text); font: inherit; font-weight: 800; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.vx-nick:hover { text-decoration: underline; }
.vx-nm .vx-nick { font-size: 15px; }
.vx-fol { flex: none; display: inline-flex; color: var(--x-blue); }
.vx-newtag { flex: none; padding: 0 6px; border-radius: 999px; background: var(--x-blue); color: #fff; font-size: 10.5px; font-weight: 800; }
.vx-post.new { box-shadow: inset 3px 0 0 var(--x-blue); }
.vx-who.big .vx-follow { margin-left: 8px; }
.vx-acc .vx-nm small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-ht .vx-nm { line-height: 1.25; }
.vx-ht .vx-nm b { font-size: 18px; }
.vx-ht .vx-nm small { font-size: 12px; color: var(--muted); }
/* 市民主页：彩色横幅、压在横幅上的大头像、简介与获赞 */
.vx-prof { padding: 0 18px 12px; }
.vx-banner { height: 116px; margin: 0 -18px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 40%, var(--x-bg))); }
.vx-prow { display: flex; align-items: flex-end; margin: -42px 0 8px; }
.vx-ava.xl { width: 84px; height: 84px; font-size: 32px; box-shadow: 0 0 0 4px var(--x-bg); }
.vx-pn { display: block; font-size: 20px; font-weight: 800; }
.vx-bio { margin: 10px 0 8px; font-size: 15px; line-height: 1.5; }
.vx-pmeta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.vx-pmeta b { color: var(--text); margin-right: 3px; }
.vx-ptags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.vx-ptabs { border-bottom: 1px solid var(--vx-line); }
.vx-ptabs .vx-tab { cursor: default; text-align: center; }
/* 关注页：关注的市民一排头像（有新动态带蓝点），下面是他们的动态 */
.vx-fchips { display: flex; gap: 14px; overflow-x: auto; padding: 14px 18px 12px; border-bottom: 1px solid var(--vx-line); scrollbar-width: thin; }
.vx-fchip { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: none; padding: 0; color: var(--text); font-size: 12px; cursor: pointer; }
.vx-fchip > span:last-child { max-width: 64px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-fchip .vx-ava { position: relative; width: 52px; height: 52px; font-size: 19px; transition: filter .15s; }
.vx-fchip:hover .vx-ava { filter: brightness(.92); }
.vx-dot { position: absolute; right: 0; top: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--x-blue); box-shadow: 0 0 0 2px var(--x-bg); }
.vx-recs .vx-acc { margin: 0 -8px; }
@media (max-width: 1080px) { .vx-app { grid-template-columns: 68px minmax(0, 1fr) 280px; } .vx-rail { align-items: center; padding: 14px 8px; } .vx-logo b, .vx-nav > span:not(.ico), .vx-exit > span:not(.ico) { display: none; } .vx-logo { padding: 4px 0 12px; } .vx-nav, .vx-exit { padding: 11px; } }
@media (max-width: 860px) { .vx-app { grid-template-columns: 64px minmax(0, 1fr); } .vx-side { display: none; } .vx-explore { display: flex; } .vx-app.side-open { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr); } .vx-app.side-open .vx-side { display: flex; } .vx-app.side-open .vx-tl { display: none; } }
@media (max-width: 560px) { .vx-app { width: 100vw; height: 100vh; border-radius: 0; } .vx-post { padding: 11px 12px 8px; } }
/* 车站商业开发（TOD）与装修主题（v2.3） */
.tod-levels { display: grid; gap: 6px; margin-top: 8px; }
.tod-lv { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.tod-lv.on { border-color: color-mix(in srgb, var(--good) 45%, transparent); background: var(--good-soft); }
.tod-lv b { display: block; font-size: 13px; }
.tod-lv small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 760px) { .sat-dock { bottom: calc(76px + env(safe-area-inset-bottom)); } #newsHost { bottom: calc(130px + env(safe-area-inset-bottom)); } }

/* Browser viewport and touch access for the new city selection. */
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
 #screen.msel2 { overflow: hidden; overscroll-behavior: contain; }
 .ms2 { height: 100%; min-height: 0; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); padding: max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); gap: 10px; }
 .ms2-rail { max-height: none; gap: 6px; }
 .ms2-head { height: 34px; } .ms2-search { height: 34px; }
 .ms2-filters { gap: 4px; } .ms2-frow .fchip { height: 24px; }
 .ms2-list { min-height: 0; height: 68px; padding-block: 3px 5px; }
 .ms2-item { width: 230px; gap: 8px; padding: 5px 7px; }
 .ms2-thumb { width: 62px; height: 42px; }
 .ms2-name b { font-size: 14px; } .ms2-it small { font-size: 11px; }
 .ms2-meta { gap: 5px; } .ms2-reg { font-size: 10px; }
 .ms2-poster { flex-basis: 186px; }
 .ms2-ptx { bottom: 82px; }
 .ms2-facts { left: 10px; right: 10px; bottom: 10px; gap: 6px; }
 .ms2-facts > div { padding: 5px 7px; }
 .ms2-facts b { white-space: normal; overflow: visible; text-overflow: clip; font-size: 11px; line-height: 1.25; }
 .ms2-stage { min-height: 0; }
 .ms2-body { display: block; overflow-y: auto; overscroll-behavior: contain; }
 .ms2-col { padding: 12px 14px; }
 .ms2-actbar { padding: 8px 10px; }
 .ms2-acth { margin-bottom: 6px; } .ms2-acth b { font-size: 12px; }
 .ms2-acts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
 .ms2-acts .map-mode { padding: 6px; gap: 6px; min-height: 44px; }
 .ms2-acts .map-mode .badge { width: 26px; height: 26px; flex: none; }
 .ms2-acts .map-mode > .ico { display: none; }
 .ms2-acts .map-mode b { font-size: 12px; white-space: normal; }
 .ms2-acts .map-mode small { font-size: 10px; }
 .ms2-acts .map-free.open { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 8px; }
 .ms2-acts .map-free .fo-yr { grid-column: 1 / -1; min-width: 0; }
 .ms2-acts .map-free .fo-yr input { min-width: 40px; }
 .ms2-acts .map-free .fo-item { font-size: 12px; gap: 6px; }
 .ms2-acts .map-free .fo-go { margin-left: 0; justify-self: end; white-space: nowrap; }
 .ms2-actbar:has(.map-free.open) { max-height: 60%; overflow-y: auto; }
 .ms2-sheet:has(.map-free.open) .ms2-poster { flex-basis: 80px; }
 .ms2-sheet:has(.map-free.open) .ms2-ptx { bottom: 10px; }
 .ms2-sheet:has(.map-free.open) .ms2-facts,
 .ms2-sheet:has(.map-free.open) .msel-chips { display: none; }
}
@media (max-width: 760px) and (max-height: 680px) {
 .ms2-poster { flex-basis: 136px; }
 .ms2-ptx { bottom: 64px; }
 .ms2-ptx h2 { font-size: 22px; }
 .ms2-tagline { font-size: 12px; }
 .ms2-ptx .msel-chips { display: none; }
 .ms2-facts { left: 10px; right: 10px; bottom: 8px; gap: 6px; }
 .ms2-facts > div { padding: 4px 7px; }
}
@media (max-width: 1024px) and (max-height: 520px) and (orientation: landscape) and (pointer: coarse), (max-width: 760px) and (max-height: 520px) and (orientation: landscape) {
 .ms2 { grid-template-columns: minmax(180px, min(30vw,230px)) minmax(0,1fr); grid-template-rows: minmax(0,1fr); }
 .ms2-list { height: auto; flex: 1; flex-direction: column; overflow-x: hidden; overflow-y: auto; }
 .ms2-item { width: 100%; min-height: 60px; }
 .ms2-name { flex-wrap: wrap; gap: 2px 6px; }
 .ms2-name b { flex: 1 1 80px; }
 .ms2-poster { flex-basis: 136px; }
 .ms2-ptx { bottom: 64px; }
 .ms2-ptx h2 { font-size: 22px; }
 .ms2-tagline { font-size: 12px; }
 .ms2-ptx .msel-chips { display: none; }
 .ms2-facts { left: 10px; right: 10px; bottom: 8px; gap: 6px; }
 .ms2-facts > div { padding: 4px 7px; }
}
@media (prefers-reduced-motion: reduce) { .ms2 *, .scr-out, #stagebg, #stagebg .sb-frame { animation: none !important; transition: none !important; } }

/* Browser v2.3: compact app navigation and the phone construction toolbar. */
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
 .sat-dock { left: calc((var(--view-left, 0px) + var(--safe-left, 0px) + 8px) / var(--uiz, 1)); right: auto; bottom: calc((var(--view-bottom, 0px) + var(--safe-bottom, 0px) + 12px) / var(--uiz, 1)); padding: 6px; gap: 0; }
 .sat-dock .sd-tx { display: none; }
 #coach { overflow-x: hidden; }
 #coach .co-head { flex-wrap: wrap; align-items: flex-start; }
 #coach .co-step { flex: 1 1 100px; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
 #coach .co-acts { position: sticky; bottom: -8px; background: var(--surface-solid); padding: 8px 0 4px; z-index: 2; }
}
@media (max-width: 560px) {
 .vx-app { width: var(--view-width, 100vw); height: var(--view-height, 100dvh); left: var(--view-left, 0px); top: var(--view-top, 0px); translate: none; transform: none; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
 .vx-tabs { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; min-width: 0; }
 .vx-tab { flex: 0 0 auto; padding: 12px 12px 0; white-space: nowrap; }
 .vx-tab > span { white-space: nowrap; }
 .vx-acts { flex-wrap: wrap; justify-content: flex-start; gap: 2px 8px; }
}
@media (max-width: 860px) { .vx-app.side-open { grid-template-columns: 64px minmax(0, 1fr); } }

/* v2.4: grouped layers, task history and immersive view. */
#immExit { position: fixed; top: 12px; right: 12px; z-index: 40; display: none; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 17px; background: rgba(12, 20, 32, 0.38); color: #fff; font: inherit; font-size: 12.5px; cursor: pointer; opacity: .3; transition: opacity .2s, background .2s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.cinema #immExit { display: inline-flex; }
#immExit:hover, #immExit:focus-visible { opacity: 1; background: rgba(12, 20, 32, 0.62); }
#immExit span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .25s var(--ease); }
#immExit:hover span, #immExit:focus-visible span { max-width: 6em; }
@media (hover: none) { #immExit { opacity: .6; } #immExit span { max-width: 6em; } }
#immHint { position: fixed; top: 18px; left: 50%; z-index: 40; padding: 8px 16px; border-radius: 18px; background: rgba(12, 20, 32, 0.62); color: #fff; font-size: 13px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, -8px); transition: opacity .3s, transform .3s var(--ease); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#immHint.on { opacity: 1; transform: translate(-50%, 0); }
.tk-row .tk-chev { flex: none; align-self: center; color: var(--muted); transition: transform .2s var(--ease); }
.tk-row.open .tk-chev { transform: rotate(90deg); }
.tk-row.open { border-bottom-color: transparent; }
.tk-detail { margin: 0 4px 10px 38px; padding: 8px 10px 10px; border-radius: 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); display: grid; gap: 6px; animation: riseIn .25s var(--ease) both; }
.tk-detail .tk-desc { margin: 0; }

#layerPanel { align-items: stretch; gap: 0; overflow: auto; overscroll-behavior: contain; }
#layerPanel .lp-row { display: flex; gap: 3px; }
#layerPanel .lp-sep { width: 100%; margin: 5px 0; }
body.cinema #draftbar, body.cinema #toolopts, body.cinema #pauseChip, body.cinema #fxLayer { opacity: 0 !important; pointer-events: none !important; }
body.cinema #immExit { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); min-width: 44px; min-height: 44px; }
#immHint { max-width: calc(100vw - 110px); white-space: normal; text-align: center; }
@media (max-width: 700px) { .tk-detail { margin-left: 12px; } .tk-detail .tk-anchors { flex-wrap: wrap; } }
@media (max-width: 900px), (pointer: coarse) {
  body.layer-panel-open #legendCard, body.layer-panel-open #coach, body.layer-panel-open #coachTip, body.layer-panel-open #coachRing { visibility: hidden; pointer-events: none; }
  body.layer-panel-open #rightPanel { display: none; }
}
@media (prefers-reduced-motion: reduce) { #immHint, #immExit, .tk-detail { animation: none; transition: none; } }

/* Web v2.5: company contracts, fleet and operations. */
/* 列车采购与运营（v2.5，fleet.js）：运营模式、交路卡片、车型与编组、分时段投入表、购车网格 */
.fo-mode { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; }
.fo-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; margin: 8px 0; }
.fo-sum > div { padding: 7px 9px; border-radius: 10px; background: var(--surface-2); min-width: 0; }
.fo-sum small { display: block; font-size: 10.5px; color: var(--muted); }
.fo-sum b { font-size: 13px; font-variant-numeric: tabular-nums; }
.fo-sum b.bad, .fo-tbl td.bad, .fo-tbl small.bad { color: var(--bad); }
.fo-svc { margin: 8px 0; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-solid); }
.fo-svc-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.fo-svc-h .swatch { width: 14px; height: 6px; }
.fo-units { display: grid; gap: 4px; }
.fo-unit { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 10px; background: var(--surface-2); }
.fo-unit b { display: block; font-size: 12.5px; }
.fo-unit small { display: block; font-size: 11px; color: var(--muted); }
.fo-unit small.bad { color: var(--bad); }
.fo-pic { flex: none; display: block; line-height: 0; }
.fo-tbl { margin-top: 8px; }
.fo-tbl td small { font-size: 10.5px; }
.fo-step { display: inline-flex; align-items: center; gap: 4px; }
.fo-step .iconbtn { width: 24px; height: 24px; border-radius: 7px; }
.fo-step b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.fo-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 8px; max-height: 46vh; overflow: auto; padding: 2px; }
.fo-model { display: grid; gap: 3px; justify-items: start; text-align: left; padding: 9px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: var(--cur-pointer); color: var(--text); transition: border-color .15s, box-shadow .2s; }
.fo-model:hover { border-color: var(--accent); }
.fo-model.on { border-color: var(--accent); box-shadow: var(--ring); background: var(--accent-soft); }
.fo-model b { font-size: 12.5px; }
.fo-model.locked { cursor: default; border-style: dashed; background: transparent; }
.fo-model.locked:hover { border-color: var(--line); }
.fo-model.locked .fo-pic, .fo-unit.locked .fo-pic { filter: grayscale(.85); opacity: .55; }
.fo-unit.locked { background: transparent; border: 1px dashed var(--line); }
.fo-unit.locked b { color: var(--muted); }
.fo-unit .fo-st { flex: none; white-space: nowrap; }
.fo-unit small.good { color: var(--good); }
.fo-model.locked > b, .fo-model.locked > .tiny { opacity: .7; }
.fo-lock { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.fo-model.locked .fo-lock > span:last-child { padding: 0 6px; border-radius: 999px; background: var(--surface-2); }
.fo-shop-h { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); }.fo-buy { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; align-items: end; margin: 10px 0 4px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.fo-buy small { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.fo-buy b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
/* 政府合同（v2.5，corp.js）：公司概况、招标方案与现金流、履约时间线、客流对比预测 */
.pp-head { margin: 8px 0 4px; padding: 12px; border-radius: 15px; border: 1px solid var(--line); background: var(--surface-solid); display: grid; gap: 10px; }
.pp-co { display: flex; align-items: center; gap: 10px; }
.pp-co b { font-size: 14px; }
.pp-rate { display: flex; align-items: center; gap: 12px; }
.pp-grade { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #fff; background: var(--accent); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.pp-grade.gA { background: var(--good); } .pp-grade.gB { background: var(--accent); } .pp-grade.gC { background: var(--warn); } .pp-grade.gD { background: var(--bad); }
.pp-rbar { position: relative; height: 7px; border-radius: 4px; margin: 5px 0 4px; background: linear-gradient(90deg, var(--bad-soft) 0 40%, var(--warn-soft) 40% 60%, var(--accent-soft) 60% 80%, var(--good-soft) 80%); }
.pp-rbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); opacity: .85; }
.pp-rbar s { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--line-strong); }
.pp-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pp-kpis > div, .pp-facts > div, .pp-money > div { padding: 6px 8px; border-radius: 9px; background: var(--surface-2); min-width: 0; }
.pp-kpis small, .pp-facts small, .pp-money small { display: block; font-size: 10.5px; color: var(--muted); }
.pp-kpis b, .pp-facts b, .pp-money b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pp-kpis b.good, .pp-money b.good { color: var(--good); } .pp-kpis b.bad, .pp-money b.bad { color: var(--bad); }
.pp-lock { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin: 8px 0; padding: 12px; border-radius: 15px; border: 1px dashed var(--line-strong); background: var(--surface-solid); }
.pp-need { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pp-need li { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 8px; border-radius: 8px; background: var(--surface-2); }
.pp-need li .ico { color: var(--muted); } .pp-need li.ok { color: var(--good); background: var(--good-soft); } .pp-need li.ok .ico { color: var(--good); }
.pp-card::before { background: var(--navy); }
.pp-tender { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.pp-tender.bid { box-shadow: 0 0 0 3px var(--accent-soft); }
.tag.pp-line { background: var(--accent-soft); color: var(--accent); } .tag.pp-tod { background: rgba(217, 154, 0, .14); color: #a87400; } .tag.pp-upgrade { background: var(--teal-soft); color: var(--teal); }
.pp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; margin: 6px 0; }
.pp-money { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; margin-top: 8px; }
.pp-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin-top: 8px; }
.pp-opt { display: grid; gap: 5px; align-content: start; padding: 9px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.pp-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.pp-opt > .btn, .pp-opt > .tag { justify-self: start; }
.pp-wbar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.pp-wbar i { display: block; height: 100%; background: var(--accent); }
.pp-terms { display: grid; gap: 2px; line-height: 1.45; }
.pp-cfw { height: 54px; }
.pp-cf { display: block; width: 100%; height: 54px; }
.pp-cf .z { stroke: var(--line-strong); stroke-width: 1; }
.pp-cf rect.pos { fill: var(--good); opacity: .75; } .pp-cf rect.neg { fill: var(--warn); opacity: .8; }
.pp-cf .cum { fill: none; stroke: var(--navy); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pp-legend { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; margin-top: 6px; }
.pp-legend i { display: inline-block; width: 10px; height: 8px; border-radius: 2px; margin-right: -6px; }
.pp-legend i.pos { background: var(--good); } .pp-legend i.neg { background: var(--warn); } .pp-legend i.cum { height: 2px; background: var(--navy); }
.pp-tl { margin: 8px 0 4px; }
.pp-tlbar { position: relative; height: 8px; border-radius: 4px; background: var(--surface-3); }
.pp-tlbar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.pp-tlbar i.b { left: 0; background: repeating-linear-gradient(45deg, var(--warn-soft) 0 4px, color-mix(in srgb, var(--warn) 35%, transparent) 4px 8px); }
.pp-tlbar i.o { background: var(--accent-soft); }
.pp-tlbar b.now, .pp-gbar b.now { position: absolute; top: -3px; width: 4px; height: 14px; margin-left: -2px; border-radius: 2px; background: var(--navy); box-shadow: 0 0 0 2px var(--surface-solid); }
.pp-tll, .pp-gl { display: flex; justify-content: space-between; gap: 6px; margin-top: 3px; }
.pp-gauge { margin: 4px 0 2px; }
.pp-gbar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-3), var(--accent-soft)); }
.pp-gbar i { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--line-strong); }
.pp-gbar i.lo { background: var(--good); } .pp-gbar i.hi { background: var(--warn); } .pp-gbar i.mid { background: var(--navy); opacity: .5; }
.pp-gbar b.now.low { background: var(--good); } .pp-gbar b.now.high { background: var(--warn); }
:root[data-theme="dark"] .pp-cf .cum, :root[data-theme="dark"] .pp-legend i.cum, :root[data-theme="dark"] .pp-tlbar b.now, :root[data-theme="dark"] .pp-gbar b.now { stroke: #cfe0f5; background: #cfe0f5; }
:root[data-theme="dark"] .pp-cf .cum { background: none; }
.dec .field { margin-top: 8px; }
.dec .field > label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.dec-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.dec-seg button { position: relative; }
.dec-rec { position: absolute; top: -7px; right: -5px; font-style: normal; font-size: 9.5px; line-height: 14px; padding: 0 4px; border-radius: 7px; background: var(--gold); color: #fff; }
.dec-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.dec-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface-solid); box-shadow: 0 0 0 1px var(--line-strong); cursor: var(--cur-pointer); padding: 0; font-size: 11px; font-weight: 700; }
.dec-sw.line { background: conic-gradient(#e4002b, #ffd100, #00a651, #0072ce, #7d4ea8, #e4002b); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.dec-sw.on { box-shadow: 0 0 0 2px var(--accent); }
@media (max-width: 760px) { .sat-dock { bottom: calc(76px + env(safe-area-inset-bottom)); } #newsHost { bottom: calc(130px + env(safe-area-inset-bottom)); } }


/* 线路运行速度与运行交路（v2.5） */
.fo-speed { margin: 6px 0 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.fo-speed-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.fo-speed .seg-ctl button { padding: 4px 9px; font-variant-numeric: tabular-nums; }
.fo-speed .seg-ctl button:disabled { opacity: .4; cursor: var(--cur-not-allowed, not-allowed); }
.fo-svc-head { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; }
.fo-svc-kind { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; min-height: 24px; }
.fo-sv-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.fo-sv-row.top { align-items: flex-start; }
.fo-sv-row > small { flex: 0 0 52px; font-size: 11.5px; color: var(--muted); }
.fo-sv-row input, .fo-sv-row select { flex: 1; min-width: 0; }
.fo-sv-stops { display: flex; flex-wrap: wrap; gap: 5px; max-height: 188px; overflow-y: auto; }
.fo-sv-stop { border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 8px; padding: 3px 9px; font-size: 12px; cursor: var(--cur-pointer); }
.fo-sv-stop.on { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--text); }
.fo-sv-stop.xfer { font-weight: 700; }
.fo-sv-stop:disabled { cursor: default; opacity: 1; }

/* 地铁芯入口与过载提醒卡片（v2.5） */
.br-dock { position: fixed; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 41; zoom: var(--uiz, 1); display: flex; align-items: center; gap: 8px; pointer-events: none; }
.br-dock .sat-dock { position: relative; right: auto; bottom: auto; zoom: 1; z-index: auto; }
.br-dock .sat-dock:not(.hidden):not(.vx-on) { pointer-events: auto; }
.ops-dock .sd-face { background: var(--grad); }
body.cinema .ops-pop { display: none; }
@media (max-width: 1080px) { .ops-dock .sd-tx { display: none; } .ops-dock { padding-right: 6px; } }
.ops-pop { position: fixed; right: 14px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 41; zoom: var(--uiz, 1); width: 320px; max-width: calc(100vw - 28px); padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 3px; border-radius: 16px; background: var(--surface-solid); box-shadow: 0 14px 40px rgba(10, 20, 40, 0.24), 0 0 0 1px var(--line); font-size: 13px; animation: opsPop .32s var(--ease) both; }
.ops-pop-plan { color: var(--text); margin-top: 2px; }
.ops-pop-h { display: flex; align-items: center; gap: 7px; margin-bottom: 2px; color: var(--muted); font-size: 12px; }
.ops-pop-i { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--grad); }
.ops-pop-t { font-size: 14px; }
.ops-pop.bad .ops-pop-t { color: var(--bad); }
.ops-acts { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.ops-cost { margin-left: 6px; padding-left: 6px; border-left: 1px solid rgba(255, 255, 255, .35); font-style: normal; font-variant-numeric: tabular-nums; font-weight: 500; }
@keyframes opsPop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ops-pop { animation: none; } }

/* 地铁芯（v2.5）：线网管理系统。窗口尺寸、层级和开合动画与「地铁圈」一致；主色为开始菜单主按钮的蓝色，深浅主题都按令牌切换 */
.mc-back { position: fixed; inset: 0; z-index: 46; background: rgba(12, 20, 34, 0.32); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.mc-app { --mc-land: #e9eef2; --mc-water: #c6d9ea; --mc-other: #b4bfca; --mc-soil: #eef1f4; --mc-mix-a: #2b649c; --mc-mix-b: #2fa39a; --mc-mix-c: #8a6bc9; --mc-bg: #f3f6f9; --mc-card: #fff; --accent: #2b649c; --accent-soft: rgba(43, 100, 156, 0.1); --line: #e2e8ee; --line-strong: #cdd6df; --text: #17212c; --muted: #5a6a7a; --faint: #8d9aa7; --surface-solid: #fff; --surface-2: #f3f6f9; --surface-3: #e8edf2; --hover: rgba(43, 100, 156, 0.06);
  position: fixed; z-index: 47; left: 50%; top: 50%; width: min(1060px, calc(100vw - 40px)); height: min(760px, calc(100vh - 48px)); translate: -50% -50%; display: grid; grid-template-columns: 188px minmax(0, 1fr); border-radius: 22px; overflow: hidden; background: var(--mc-card); color: var(--text); box-shadow: 0 40px 100px rgba(10, 20, 40, 0.38), 0 0 0 1px var(--line); outline: none; will-change: transform; }
:root[data-theme="dark"] .mc-app { --mc-land: #1d242d; --mc-water: #172f47; --mc-other: #4a5663; --mc-soil: #1e252e; --mc-mix-a: #5b97e0; --mc-mix-b: #2ca583; --mc-mix-c: #b173c4; --mc-bg: #0e1319; --mc-card: #171d25; --accent: #6aa6e6; --accent-soft: rgba(106, 166, 230, 0.15); --line: #28313b; --line-strong: #3a4552; --text: #e6ebf0; --muted: #8e9aa7; --faint: #6b7885; --surface-solid: #171d25; --surface-2: #1e252e; --surface-3: #28313b; --hover: rgba(106, 166, 230, 0.08); }
.mc-rail { display: flex; flex-direction: column; gap: 3px; padding: 14px 10px; border-right: 1px solid var(--line); min-height: 0; }
.mc-brand { display: flex; align-items: center; gap: 9px; padding: 4px 6px 16px; }
.mc-brand b { display: block; font-size: 16px; font-weight: 800; letter-spacing: 1px; line-height: 1.25; }
.mc-brand small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; }
.mc-logo { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 6px 14px -6px rgba(43, 100, 156, 0.7); }
.mc-nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 14px; text-align: left; cursor: var(--cur-pointer); transition: background .15s, color .15s; }
.mc-nav:hover { background: var(--hover); color: var(--text); }
.mc-nav.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.mc-nav .lb { flex: 1; min-width: 0; white-space: nowrap; }
.mc-nav em { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.mc-nav em.alert { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-weight: 700; line-height: 18px; text-align: center; }
.mc-state { display: flex; align-items: center; gap: 7px; padding: 8px 10px; font-size: 12px; color: var(--muted); }
.mc-state i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.mc-state.warn i { background: var(--bad); }
.mc-exit { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: none; color: var(--muted); font-size: 13px; cursor: var(--cur-pointer); transition: background .15s, color .15s; }
.mc-exit:hover { background: var(--hover); color: var(--text); }
.mc-body { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--mc-bg); }
.mc-bar { flex: none; display: flex; align-items: center; gap: 7px; height: 54px; padding: 0 20px; background: var(--mc-card); border-bottom: 1px solid var(--line); }
.mc-backbtn { margin-left: -6px; }
.mc-crumb { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mc-crumb.link { flex: none; border: 0; background: none; padding: 0; color: var(--muted); font: inherit; font-size: 14px; cursor: var(--cur-pointer); }
.mc-crumb.link:hover { color: var(--accent); }
.mc-sep { color: var(--faint); font-size: 13px; }
.mc-when { flex: none; font-size: 12px; color: var(--muted); }
.mc-content { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.mc-content > * { flex: none; }
.mc-app:not(.quiet) .mc-content > * { animation: riseIn .25s var(--ease) both; }
.mc-card { background: var(--mc-card); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.mc-pad { padding: 12px 16px; }
.mc-card-h { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 16px; border-bottom: 1px solid var(--line); }
.mc-card-h b { font-size: 14px; font-weight: 800; white-space: nowrap; }
.mc-card-h small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.mc-kpi { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 10px 12px; background: var(--mc-card); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: inherit; text-align: left; }
button.mc-kpi { cursor: var(--cur-pointer); transition: border-color .15s, background .15s; }
button.mc-kpi:hover { border-color: var(--accent); background: var(--hover); }
.mc-kpi small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.mc-kpi b { font-size: 19px; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-kpi span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-kpi.bad b { color: var(--bad); }
.mc-kpi.warn b { color: var(--warn); }
.mc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mc-tag { flex: none; display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.mc-tag.good { background: var(--good-soft); color: var(--good); }
.mc-tag.warn { background: var(--warn-soft); color: var(--warn); }
.mc-tag.bad { background: var(--bad-soft); color: var(--bad); }
.mc-bad { color: var(--bad); }
.mc-warn { color: var(--warn); font-weight: 600; }
.mc-lb { flex: none; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.mc-lbs { display: flex; flex-wrap: wrap; gap: 3px; }
.mc-load { display: flex; align-items: center; gap: 7px; min-width: 96px; }
.mc-load i { position: relative; flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.mc-load i::after { content: ''; position: absolute; left: 66.67%; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.mc-load em { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.mc-load span { flex: none; min-width: 34px; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.mc-load.warn em { background: var(--warn); }
.mc-load.warn span { color: var(--warn); }
.mc-load.bad em { background: var(--bad); }
.mc-load.bad span { color: var(--bad); font-weight: 700; }
.mc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.mc-table th { position: sticky; top: -14px; z-index: 1; padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--mc-card); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.mc-table th:first-child { border-top-left-radius: 12px; padding-left: 16px; }
.mc-table th:last-child { border-top-right-radius: 12px; }
.mc-table th.sortable { cursor: var(--cur-pointer); }
.mc-table th.sortable:hover, .mc-table th.on { color: var(--accent); }
.mc-sort { margin-left: 3px; font-style: normal; font-size: 8px; vertical-align: 1px; }
.mc-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.mc-table td:first-child { padding-left: 16px; }
.mc-table tbody tr { cursor: var(--cur-pointer); transition: background .12s; }
.mc-table tbody tr:hover { background: var(--hover); }
.mc-table tbody tr:last-child td { border-bottom: 0; }
.mc-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mc-table .mc-dim { color: var(--muted); max-width: 170px; }
.mc-table .mc-act { width: 34px; padding: 0 8px 0 0; }
.mc-obj { display: flex; align-items: center; gap: 7px; }
.mc-trunc { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.mc-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mc-n { margin-left: 5px; font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }
.mc-search { display: flex; align-items: center; gap: 6px; width: 200px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--mc-card); color: var(--muted); }
.mc-search:focus-within { border-color: var(--accent); color: var(--accent); }
.mc-q { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font-size: 13px; }
.mc-pager { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.mc-pager:empty { display: none; }
.mc-pageno { font-variant-numeric: tabular-nums; }
.mc-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 30px 20px; color: var(--muted); text-align: center; font-size: 13px; }
.mc-empty b { color: var(--text); font-size: 14.5px; }
.mc-none { padding: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.mc-link { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 0; color: var(--accent); font-size: 12px; cursor: var(--cur-pointer); white-space: nowrap; }
.mc-swl { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.mc-swl .switch { transform: scale(.72); transform-origin: right center; margin-left: -8px; }
.mc-todo { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.mc-todo:last-child { border-bottom: 0; border-radius: 0 0 12px 12px; }
.mc-todo-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; border: 0; background: none; padding: 0; color: var(--text); font: inherit; text-align: left; cursor: var(--cur-pointer); }
.mc-todo-t:hover b { color: var(--accent); }
.mc-todo-n { display: flex; align-items: center; gap: 6px; font-size: 13.5px; min-width: 0; }
.mc-todo-n > span:last-child { white-space: nowrap; }
.mc-todo-t small { font-size: 12px; color: var(--muted); }
.mc-todo-t small:empty { display: none; }
.mc-todo-t .mc-plan { color: var(--text); }
.mc-todo .ops-acts { margin-top: 0; flex-wrap: nowrap; flex: none; }
.mc-rank { padding: 5px 0; }
.mc-rank-r { display: grid; grid-template-columns: 14px auto minmax(0, 1fr) 124px; align-items: center; gap: 7px; width: 100%; padding: 6px 16px; border: 0; background: none; color: var(--text); text-align: left; font-size: 13px; cursor: var(--cur-pointer); transition: background .12s; }
.mc-rank-r:hover { background: var(--hover); }
.mc-rank-r > small { color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.mc-rank-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; grid-column: 3; }
.mc-dh { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.mc-swatch { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 12px; font-size: 16px; font-weight: 800; cursor: var(--cur-pointer); transition: filter .15s; }
button.mc-swatch:hover { filter: brightness(.92); }
.mc-swatch.mc-st { background: var(--accent-soft); color: var(--accent); cursor: var(--cur-default); }
.mc-dh-t { flex: 1; min-width: 0; }
.mc-name { display: block; width: min(320px, 100%); margin-left: -6px; padding: 1px 6px; font: inherit; font-size: 18px; font-weight: 800; color: var(--text); background: none; border: 1px solid transparent; border-radius: 7px; outline: none; transition: border-color .15s, background .15s; }
.mc-name:hover { background: var(--hover); }
.mc-name:focus { border-color: var(--accent); background: var(--mc-card); }
.mc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 9px; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.mc-chip { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: var(--text); font-size: 12.5px; cursor: var(--cur-pointer); }
.mc-chip:hover { color: var(--accent); }
.mc-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.mc-tabs button { margin-bottom: -1px; padding: 7px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 13.5px; cursor: var(--cur-pointer); transition: color .15s, border-color .15s; }
.mc-tabs button:hover:not([disabled]) { color: var(--text); }
.mc-tabs button.on { border-bottom-color: var(--accent); color: var(--accent); font-weight: 700; }
.mc-tabs button[disabled] { opacity: .4; cursor: var(--cur-default); }
.mc-draft { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 9px 20px; border-top: 1px solid var(--line); background: var(--mc-card); font-size: 13px; }
.mc-draft.hidden { display: none; }
.mc-draft > .ico { color: var(--accent); }
.mc-draft .btn { flex: none; }
/* 车站示意图：地铁芯的车站页、装修页和商业开发页共用 */
.st-artbox { flex: 1; display: flex; align-items: center; padding: 8px 12px; min-width: 0; }
.st-art { display: block; width: 100%; height: auto; }
.st-soil { fill: var(--surface-2); }
.st-ground { stroke: var(--line-strong); stroke-width: 1.5; }
.st-pier { fill: var(--line-strong); }
.st-stair { fill: none; stroke: var(--line-strong); stroke-width: 3; }
.st-plat { fill: var(--muted); }
.st-future { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.st-shell { stroke: var(--line-strong); stroke-width: 1; }
.st-arts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 2px 0 10px; }
.st-arts.one { grid-template-columns: minmax(0, 1fr); }
.st-arts figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-solid); }
.st-arts .st-artbox { padding: 4px 8px; }
.st-arts figcaption { padding: 3px 10px 6px; font-size: 12px; color: var(--muted); }
/* 地铁芯的图表与预览 */
.mc-cols > .mc-card { display: flex; flex-direction: column; }
.mc-card-h .seg-ctl { flex: none; }
.mc-card-h .seg-ctl button { white-space: nowrap; }
.mc-chart { --c: var(--accent); display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 120px auto; column-gap: 8px; }
.mc-yax { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mc-plot { position: relative; min-width: 0; cursor: var(--cur-default); touch-action: none; }
.mc-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mc-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mc-ref { stroke: var(--bad); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.mc-mark { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.mc-area { fill: var(--c); fill-opacity: .1; }
.mc-line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mc-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--mc-card); pointer-events: none; }
.mc-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-strong); pointer-events: none; }
.mc-tip { position: absolute; z-index: 2; padding: 2px 8px; border-radius: 6px; background: var(--text); color: var(--mc-card); font-size: 11.5px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.mc-xax { grid-column: 2; display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--muted); }
.mc-reflb { color: var(--bad); }
.mc-spark svg { display: block; }
.mc-spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.mc-delta { font-style: normal; font-weight: 600; }
.mc-delta.good { color: var(--good); }
.mc-delta.bad { color: var(--bad); }
.mc-map { flex: 1; min-height: 170px; aspect-ratio: 1.6; overflow: hidden; border-radius: 0 0 11px 11px; background: var(--mc-land); }
.mc-map.act { cursor: var(--cur-pointer); }
.mc-map svg { display: block; width: 100%; height: 100%; }
.mc-other { fill: none; stroke: var(--mc-other); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.mc-halo { fill: none; stroke: var(--mc-card); stroke-width: 5.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.mc-l { fill: none; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.mc-hit { fill: none; stroke: transparent; stroke-width: 12; vector-effect: non-scaling-stroke; cursor: var(--cur-pointer); pointer-events: stroke; }
.mc-st1 { fill: var(--mc-card); stroke: var(--text); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mc-st2 { fill: var(--mc-card); stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mc-st4 { fill: #d99a00; stroke: var(--mc-card); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.mc-st3 { fill: var(--bad); stroke: var(--mc-card); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.mc-walk { fill: var(--accent); fill-opacity: .13; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.mc-mapt { fill: var(--text); stroke: var(--mc-card); paint-order: stroke; stroke-linejoin: round; font-weight: 700; pointer-events: none; }
.mc-maplg { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.mc-maplg i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.mc-maplg i.tod { margin-left: 6px; background: #d99a00; }
.mc-stack { display: flex; gap: 2px; height: 14px; }
.mc-stack i { display: block; min-width: 2px; flex-basis: 0; border-radius: 4px; }
.mc-stack .a, .mc-legend .a { background: var(--mc-mix-a); }
.mc-stack .b, .mc-legend .b { background: var(--mc-mix-b); }
.mc-stack .c, .mc-legend .c { background: var(--mc-mix-c); }
.mc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.mc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mc-legend i { width: 9px; height: 9px; border-radius: 3px; }
.mc-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.mc-fx { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; }
.mc-fx:last-child { border-bottom: 0; border-radius: 0 0 11px 11px; }
.mc-fx.link { cursor: var(--cur-pointer); transition: background .12s; }
.mc-fx.link:hover { background: var(--hover); }
.mc-fx-d { flex: none; width: 76px; font-size: 12px; color: var(--muted); }
.mc-fx-o { flex: none; display: flex; align-items: center; gap: 6px; width: 110px; font-size: 13px; }
.mc-fx-o b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-fx-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mc-fx-b > small { font-size: 12px; color: var(--muted); }
.mc-fx-ch { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.mc-ch { padding: 1px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.mc-fx-ms { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.mc-fx-m { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mc-fx-m small { font-size: 11.5px; color: var(--muted); }
/* App 打开时：颜色气泡与操作提示要在窗口之上；暂停提示、交通更新提示和历史卡片不压在窗口上 */
body.ops-open .qpop, body.ops-open .dropdown { z-index: 48; }
body.ops-open #feed { z-index: 49; }
body.ops-open #feed > :not(#toasts) { display: none; }
@media (max-width: 1080px) { .mc-app { grid-template-columns: 62px minmax(0, 1fr); } .mc-rail { align-items: center; padding: 14px 8px; } .mc-brand { padding: 4px 0 14px; } .mc-brand > div, .mc-nav .lb, .mc-state span, .mc-exit .lb { display: none; } .mc-nav { position: relative; padding: 11px; } .mc-nav em:not(.alert) { display: none !important; } .mc-nav em.alert { position: absolute; right: 0; top: 0; } .mc-exit { padding: 10px; } .mc-table .opt { display: none; } .mc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .mc-cols { grid-template-columns: minmax(0, 1fr); } .mc-todo { flex-wrap: wrap; } .mc-search { width: 150px; } .mc-table th, .mc-table td { padding-left: 6px; padding-right: 6px; } .mc-load { min-width: 76px; } .mc-trunc { max-width: 110px; } }
@media (max-width: 560px) { .mc-app { width: 100vw; height: 100vh; border-radius: 0; } .mc-content { padding: 10px 10px 16px; } .mc-bar { padding: 0 12px; } .mc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mc-dh { flex-wrap: wrap; } }
@media (max-width: 1280px) { .ms2-acts .map-mode > .ico { display: none; } .ms2-acts .map-mode:not(.primary) .badge { display: none; } .ms2-facts b { font-size: 12.5px; white-space: normal; line-height: 1.2; } }


.tk-parts { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.tk-part { display: flex; gap: 7px; align-items: flex-start; padding: 6px 8px; border-radius: 9px; background: var(--surface-2); font-size: 12px; line-height: 1.45; }
.tk-part > .ico { width: 14px; height: 14px; margin-top: 2px; color: var(--muted); flex: none; }
.tk-part.ok > .ico { color: var(--good); }
.tk-part.dead > .ico { color: var(--bad); }
.tk-part.ok .tk-px { color: var(--muted); }
.tk-pt { display: flex; align-items: center; gap: 5px; margin-bottom: 1px; }
.tk-pk { font-size: 10.5px; font-weight: 700; color: var(--accent); }
.tk-part.ops .tk-pk { color: color-mix(in srgb, #0f7fb0 75%, var(--text)); }
.tk-part.fin .tk-pk { color: color-mix(in srgb, #a8780c 75%, var(--text)); }
.tk-part.dev .tk-pk { color: color-mix(in srgb, #8a4fd3 75%, var(--text)); }
.tk-part.reach .tk-pk { color: color-mix(in srgb, #14a252 75%, var(--text)); }
.tk-core { font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 999px; color: var(--muted); background: var(--hover); }
.tk-pb { height: 3px; margin-top: 4px; border-radius: 2px; background: var(--hover); overflow: hidden; }
.tk-pb i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }

/* Web v2.5: table scrolling and touch/keyboard viewport access. */
:root { --cur-pointer: pointer; --cur-default: default; }
.mc-content { min-width: 0; overflow-x: hidden; }
.mc-content > *, .mc-tools, .mc-card-h { min-width: 0; }
.mc-card:has(> .mc-table) { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.mc-card-h { flex-wrap: wrap; }
.mc-tabs { overflow-x: auto; scrollbar-width: thin; }
.mc-tabs button { flex: none; white-space: nowrap; }
.mc-content .fo-tbl { display: block; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
@media (max-width: 760px), (max-width: 1024px) and (max-height: 520px) and (pointer: coarse) {
 .br-dock { right: calc((var(--view-right, 0px) + env(safe-area-inset-right) + 8px) / var(--uiz, 1)); bottom: calc((var(--view-bottom, 0px) + env(safe-area-inset-bottom) + 12px) / var(--uiz, 1)); }
 .br-dock .sat-dock { left: auto; bottom: auto; min-width: 44px; min-height: 44px; }
 .mc-app { width: var(--view-width, 100vw); height: var(--view-height, 100dvh); left: var(--view-left, 0px); top: var(--view-top, 0px); translate: none; border-radius: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
 .mc-rail button, .mc-bar button { min-width: 44px; min-height: 44px; }
 .mc-exit { min-width: 44px; min-height: 44px; }
 .mc-tabs button { min-height: 44px; }
 .mc-search { flex: 1 1 150px; width: auto; height: 40px; }
 .mc-tools .seg-ctl { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
 .mc-tools .seg-ctl button { flex: none; white-space: nowrap; min-height: 40px; }
 .mc-draft { max-height: 40%; overflow-y: auto; }
 .mc-content .fo-sum, .mc-content .fo-svc-head { flex-wrap: wrap; }
 .fo-step .iconbtn { width: 36px; height: 36px; }
 #screen .card:has(.fo-shop) .modal-actions { position: sticky; bottom: 0; background: var(--surface-solid); padding-block: 10px 4px; z-index: 2; }
}
@media (max-width: 400px) {
 .mc-bar { flex-wrap: wrap; height: auto; min-height: 54px; gap: 3px 6px; padding-block: 6px; }
 .mc-when { flex-basis: 100%; font-size: 10px; }
 .mc-kpi { padding: 8px; }
 .mc-kpi small { white-space: normal; }
 .mc-rank-r { grid-template-columns: 12px auto minmax(0, 1fr) 70px; gap: 4px; padding-inline: 8px; }
 .mc-rank-r .mc-load { min-width: 60px; }
 .mc-card-h, .mc-pad { padding-inline: 10px; }
 .fo-shop { grid-template-columns: minmax(0, 1fr); }
}

.mc-card-h .seg-ctl { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.mc-card-h .seg-ctl button { flex: none; }

.mc-content .tbl { display: block; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.mc-content .fo-unit { flex-wrap: wrap; min-width: 0; }
.mc-content .fo-unit .grow { min-width: 0; overflow-wrap: anywhere; }

.thumb-wait { opacity: 0; }
