/* 尾货管理系统 设计图样式（草案）。仅用于静态设计图，不是可运行系统。
   设计变量与 DESIGN.md 保持一致；组件只引用变量。 */
:root {
  /* 颜色 */
  --c-shell: #1c2b36;          /* 钢架墨蓝：顶栏、主按钮 */
  --c-shell-hover: #2a3d4b;
  --c-shell-active: #12202a;
  --c-on-shell: #f2f4f5;
  --c-on-shell-muted: #b9c4cc;
  --c-ground: #eef0ec;         /* 水泥地灰：页面底色 */
  --c-rail: #e3e7e2;           /* 侧栏 */
  --c-rail-active: #ffffff;
  --c-surface: #ffffff;
  --c-surface-subdued: #f6f7f5;
  --c-surface-hover: #f1f3f0;
  --c-text: #23292e;
  --c-text-secondary: #5b646b;
  --c-text-disabled: #8b9399;
  --c-border: #dde1dc;
  --c-border-strong: #8a9399;  /* 输入框边框，对白底 3.1:1 */
  --c-link: #0a5cb8;
  --c-focus: #0a5cb8;
  --c-kraft: #f2e3c4;          /* 牛皮纸货签：批次编号 */
  --c-on-kraft: #5a3e12;
  --c-kraft-edge: #d9c08e;
  --c-success-bg: #d8f3e3; --c-success-text: #0d5232;
  --c-warning-bg: #ffe7c2; --c-warning-text: #5e4200;
  --c-critical-bg: #fde0de; --c-critical-text: #8e1022; --c-critical: #c4162a; --c-critical-hover: #a51123;
  --c-info-bg: #dcebfb;    --c-info-text: #0b4a7a;
  --c-neutral-bg: #e6e9e6; --c-neutral-text: #3b4349;
  --c-stage-1: #1c2b36; --c-stage-2: #3f6378; --c-stage-3: #7d9aab; --c-stage-4: #c3d1d9;
  --c-avatar: #3f6378;
  --c-selection: #cfe0f5;
  --c-shell-input: #273946; --c-shell-input-border: #3b4f5d;
  --c-primary: #1c2b36; --c-primary-hover: #2a3d4b; --c-primary-active: #12202a; --c-on-primary: #f2f4f5; /* 主按钮、选中态；浅色＝shell */
  --c-on-critical: #ffffff; --c-on-avatar: #ffffff;
  /* 首页仓库地图（浅色无点阵、不发光） */
  --map-art: #f6f7f5; --map-land-1: #eef0ec; --map-land-2: #e3e7e2; --map-land-3: #e6e9e6; --map-land-4: #f6f7f5;
  --map-land-wh: #c3d1d9; --map-province-line: #ffffff; --map-border: #1c2b36; --map-marker: #1c2b36;
  --i-select: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b646b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); /* 下拉箭头＝text-secondary（data URI 不能引用变量） */
  color-scheme: light;
  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-caption: 0.75rem;   /* 12px */
  --fs-body: 0.875rem;     /* 14px */
  --fs-body-lg: 1rem;      /* 16px */
  --fs-title: 1rem;        /* 16px 区块标题 */
  --fs-heading: 1.25rem;   /* 20px 页面标题 */
  --fs-otp: 1.5rem;        /* 24px 动态码 */
  --lh-body: 1.55;
  /* 间距（4px 基准） */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px;
  /* 圆角 */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-full: 999px;
  /* 阴影 */
  --shadow-panel: 0 1px 2px rgba(28, 43, 54, 0.08), 0 1px 0 rgba(28, 43, 54, 0.04);
  --shadow-raised: 0 4px 12px rgba(28, 43, 54, 0.12);
  --shadow-up: 0 -2px 8px rgba(28, 43, 54, 0.06); /* 仅用于固定在底部的操作栏、手机底部导航 */
  /* 动效 */
  --dur-fast: 150ms; --dur-base: 200ms; --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* 尺寸 */
  --control-h: 36px; --topbar-h: 56px; --rail-w: 232px;
}
@media (max-width: 767px) {
  :root { --control-h: 44px; --fs-body: 1rem; }
}
/* 深色（DESIGN colors-dark，★ 第 103 条）：Cookie theme=dark 时服务器写 data-theme="dark"；没选过或“跟随系统”时看系统设置。
   两组完全相同（tests/core/test_theme.py 查）；只在屏幕上生效，打印一律浅色。切换不做过渡。 */
@media screen {
  [data-theme="dark"] {
    --c-shell: #041026;
    --c-shell-hover: #0b2244;
    --c-shell-active: #020a18;
    --c-on-shell-muted: #8fb3d9;
    --c-shell-input: #0a1d3a;
    --c-shell-input-border: #1c3a63;
    --c-on-shell: #e3f1ff;
    --c-ground: #06142b;
    --c-rail: #071833;
    --c-rail-active: #10294d;
    --c-surface: #0b1f3d;
    --c-surface-subdued: #091a34;
    --c-surface-hover: #10294d;
    --c-text: #e3f1ff;
    --c-text-secondary: #8fb3d9;
    --c-text-disabled: #55759a;
    --c-border: #1c3a63;
    --c-border-strong: #3c6ea6;
    --c-link: #5cc8ff;
    --c-focus: #8fd3ff;
    --c-kraft: #f2e3c4;
    --c-on-kraft: #5a3e12;
    --c-kraft-edge: #d9c08e;
    --c-selection: #12345e;
    --c-stage-1: #8fd3ff;
    --c-stage-2: #5cc8ff;
    --c-stage-3: #2f6fb8;
    --c-stage-4: #12305a;
    --c-avatar: #2f8cff;
    --c-neutral-bg: #142b4d;
    --c-neutral-text: #b8cde6;
    --c-success-bg: #0f3a3a;
    --c-success-text: #5ff0c8;
    --c-warning-bg: #3a2e0e;
    --c-warning-text: #ffc85c;
    --c-critical: #ff5c70;
    --c-critical-hover: #ff7a8a;
    --c-critical-bg: #3a1420;
    --c-critical-text: #ff8a98;
    --c-info-bg: #0e2f55;
    --c-info-text: #8fd3ff;
    --c-primary: #5cc8ff;
    --c-primary-hover: #8fd3ff;
    --c-primary-active: #2f8cff;
    --c-on-primary: #04122a;
    --c-on-critical: #04122a;
    --c-on-avatar: #04122a;
    --map-art: #071a36;
    --map-land-1: #0f2b52;
    --map-land-2: #123563;
    --map-land-3: #0c2647;
    --map-land-4: #153c6c;
    --map-land-wh: #1f63b0;
    --map-province-line: #4b9be0;
    --map-border: #5cc8ff;
    --map-marker: #5cc8ff;
    --map-art-dot: rgba(92, 200, 255, .2);
    --map-glow: rgba(92, 200, 255, .8);
    --shadow-panel: 0 0 0 1px rgba(92, 200, 255, .08);
    --shadow-raised: 0 0 0 1px rgba(92, 200, 255, .3), 0 8px 24px rgba(0, 0, 0, .4);
    --shadow-up: 0 -8px 24px rgba(0, 0, 0, .4);
    --i-select: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238fb3d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-shell: #041026;
    --c-shell-hover: #0b2244;
    --c-shell-active: #020a18;
    --c-on-shell-muted: #8fb3d9;
    --c-shell-input: #0a1d3a;
    --c-shell-input-border: #1c3a63;
    --c-on-shell: #e3f1ff;
    --c-ground: #06142b;
    --c-rail: #071833;
    --c-rail-active: #10294d;
    --c-surface: #0b1f3d;
    --c-surface-subdued: #091a34;
    --c-surface-hover: #10294d;
    --c-text: #e3f1ff;
    --c-text-secondary: #8fb3d9;
    --c-text-disabled: #55759a;
    --c-border: #1c3a63;
    --c-border-strong: #3c6ea6;
    --c-link: #5cc8ff;
    --c-focus: #8fd3ff;
    --c-kraft: #f2e3c4;
    --c-on-kraft: #5a3e12;
    --c-kraft-edge: #d9c08e;
    --c-selection: #12345e;
    --c-stage-1: #8fd3ff;
    --c-stage-2: #5cc8ff;
    --c-stage-3: #2f6fb8;
    --c-stage-4: #12305a;
    --c-avatar: #2f8cff;
    --c-neutral-bg: #142b4d;
    --c-neutral-text: #b8cde6;
    --c-success-bg: #0f3a3a;
    --c-success-text: #5ff0c8;
    --c-warning-bg: #3a2e0e;
    --c-warning-text: #ffc85c;
    --c-critical: #ff5c70;
    --c-critical-hover: #ff7a8a;
    --c-critical-bg: #3a1420;
    --c-critical-text: #ff8a98;
    --c-info-bg: #0e2f55;
    --c-info-text: #8fd3ff;
    --c-primary: #5cc8ff;
    --c-primary-hover: #8fd3ff;
    --c-primary-active: #2f8cff;
    --c-on-primary: #04122a;
    --c-on-critical: #04122a;
    --c-on-avatar: #04122a;
    --map-art: #071a36;
    --map-land-1: #0f2b52;
    --map-land-2: #123563;
    --map-land-3: #0c2647;
    --map-land-4: #153c6c;
    --map-land-wh: #1f63b0;
    --map-province-line: #4b9be0;
    --map-border: #5cc8ff;
    --map-marker: #5cc8ff;
    --map-art-dot: rgba(92, 200, 255, .2);
    --map-glow: rgba(92, 200, 255, .8);
    --shadow-panel: 0 0 0 1px rgba(92, 200, 255, .08);
    --shadow-raised: 0 0 0 1px rgba(92, 200, 255, .3), 0 8px 24px rgba(0, 0, 0, .4);
    --shadow-up: 0 -8px 24px rgba(0, 0, 0, .4);
    --i-select: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238fb3d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 8px); }
/* 评审 P2-4（WCAG 2.4.11）：Tab 到的控件不被吸底的操作条、底部标签栏挡住——滚动时底部留出它们的高度 */
html:has(.form-actions) { scroll-padding-bottom: 96px; }
body {
  margin: 0; font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh-body);
  color: var(--c-text); background: var(--c-ground);
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--c-selection); color: var(--c-text); }
a { color: var(--c-link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: var(--r-xs); }
h1, h2, h3 { margin: 0; line-height: 1.3; text-wrap-style: balance; }
h1 { font-size: var(--fs-heading); font-weight: 650; }
h2 { font-size: var(--fs-title); font-weight: 650; }
h3 { font-size: var(--fs-body); font-weight: 650; }
p { margin: 0; }
.sub { display: block; font-size: var(--fs-caption); color: var(--c-text-secondary); font-weight: 400; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--c-text-secondary); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
* { scrollbar-color: var(--c-border-strong) transparent; scrollbar-width: thin; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--c-surface); padding: 8px 12px; min-height: 44px; display: inline-flex; align-items: center; z-index: 50; border-radius: var(--r-sm); }
.skip-link:focus { top: 8px; }

/* ---------- 外壳 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s-4); padding: 0 var(--s-4);
  background: var(--c-shell); color: var(--c-on-shell);
}
.brand { display: flex; align-items: center; gap: var(--s-2); font-weight: 650; font-size: var(--fs-body-lg); color: var(--c-on-shell); text-decoration: none; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--c-kraft); color: var(--c-on-kraft); display: grid; place-items: center; }
.brand-mark .icon { width: 18px; height: 18px; }
.top-search { flex: 1; max-width: 520px; margin: 0 auto; position: relative; }
.topbar .top-search input[type="search"] {
  width: 100%; height: 36px; min-height: 36px; border-radius: var(--r-md); border: 1px solid var(--c-shell-input-border); background: var(--c-shell-input);
  color: var(--c-on-shell); padding: 0 12px 0 36px; font: inherit;
}
.topbar .top-search input[type="search"]::placeholder { color: var(--c-on-shell-muted); }
.topbar .top-search input[type="search"]:focus-visible { outline-color: var(--c-on-shell); border-color: var(--c-on-shell-muted); }
.top-search .icon { position: absolute; left: 10px; top: 8px; color: var(--c-on-shell-muted); }
.top-user { display: flex; align-items: center; gap: var(--s-2); color: var(--c-on-shell); font-size: var(--fs-body); white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: var(--r-full); background: var(--c-avatar); color: var(--c-on-avatar); display: grid; place-items: center; font-weight: 600; font-size: var(--fs-caption); }
.role-tag { font-size: var(--fs-caption); color: var(--c-on-shell-muted); }
.menu-btn { display: none; }

.layout { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: calc(100vh - var(--topbar-h)); }
.rail { background: var(--c-rail); padding: var(--s-3) var(--s-2); border-right: 1px solid var(--c-border); }
.rail nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail a {
  display: flex; align-items: center; gap: var(--s-2); min-height: 36px; padding: 6px 10px; border-radius: var(--r-md);
  color: var(--c-text); text-decoration: none; font-weight: 500;
  transition: background-color var(--dur-fast) ease-out;
}
.rail a .icon { color: var(--c-text-secondary); }
.rail a:hover { background: var(--c-surface-hover); }
.rail a[aria-current="page"] { background: var(--c-rail-active); font-weight: 650; box-shadow: var(--shadow-panel); }
.rail a[aria-current="page"] .icon { color: var(--c-primary); }
.rail .rail-count { margin-left: auto; font-size: var(--fs-caption); color: var(--c-text-secondary); }
.rail-group { margin-top: var(--s-4); padding: 0 10px 4px; font-size: var(--fs-caption); color: var(--c-text-secondary); font-weight: 600; }

.main { padding: var(--s-6) var(--s-6) 96px; min-width: 0; }
.page { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
.page-narrow { max-width: 760px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.page-header .title-row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.page-header .sub { margin-top: 4px; color: var(--c-text-secondary); }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--c-text-secondary); text-decoration: none; margin-bottom: var(--s-2); min-height: 24px; }
.back-link:hover { color: var(--c-text); }
.actions { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }

/* 手机底部导航 */
.tabbar { display: none; }

/* ---------- 区块 ---------- */
.panel { background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-panel); border: 1px solid var(--c-border); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-5) 0; flex-wrap: wrap; }
.panel-head p { color: var(--c-text-secondary); }
.panel-body { padding: var(--s-4) var(--s-5) var(--s-5); }
.panel-foot { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--c-border); background: var(--c-surface-subdued); border-radius: 0 0 var(--r-lg) var(--r-lg); color: var(--c-text-secondary); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: var(--s-5); align-items: start; }
.stack { display: grid; gap: var(--s-5); min-width: 0; }
.side-note { margin: 0 var(--s-5); }
.divider { border: 0; border-top: 1px solid var(--c-border); margin: 0; }

/* 键值列表 */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--c-text-secondary); }
.kv dd { margin: 0; }
.kv dd.num { text-align: left; white-space: normal; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--control-h); padding: 0 14px; border-radius: var(--r-md);
  font: inherit; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--c-border-strong); background: var(--c-surface); color: var(--c-text);
  --spin: var(--c-text);
  transition: background-color var(--dur-fast) ease-out, transform var(--dur-fast) ease-out;
}
.btn:hover { background: var(--c-surface-hover); }
.btn:active, .btn.is-pressed { transform: translateY(1px); background: var(--c-neutral-bg); }
.btn.is-hover { background: var(--c-surface-hover); }
.btn.is-focus { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); --spin: var(--c-on-primary); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }
.btn-primary:active, .btn-primary.is-pressed { background: var(--c-primary-active); border-color: var(--c-primary-active); }
.btn-critical { background: var(--c-critical); border-color: var(--c-critical); color: var(--c-on-critical); --spin: var(--c-on-critical); }
.btn-critical:hover, .btn-critical.is-hover { background: var(--c-critical-hover); border-color: var(--c-critical-hover); }
.btn-plain { border-color: transparent; background: transparent; color: var(--c-link); padding: 0 8px; }
.btn-plain:hover { background: var(--c-surface-hover); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--c-surface-subdued); border-color: var(--c-border); color: var(--c-text-disabled); cursor: not-allowed; }
.btn[aria-busy="true"] { position: relative; color: transparent; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--spin); border-right-color: transparent; animation: spin 700ms linear infinite; }
.btn-lg { min-height: 48px; padding: 0 20px; font-size: var(--fs-body-lg); }
.btn-block { width: 100%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 徽标 ---------- */
.badge { display: inline-flex; max-width: 100%; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-full); font-size: var(--fs-caption); font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--c-neutral-bg); color: var(--c-neutral-text); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-success { background: var(--c-success-bg); color: var(--c-success-text); }
.badge-warning { background: var(--c-warning-bg); color: var(--c-warning-text); }
.badge-critical { background: var(--c-critical-bg); color: var(--c-critical-text); }
.badge-info { background: var(--c-info-bg); color: var(--c-info-text); }

/* 批次货签（标志性元素之一） */
.lot {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px 1px 6px; border-radius: var(--r-xs);
  background: var(--c-kraft); color: var(--c-on-kraft); border: 1px dashed var(--c-kraft-edge);
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; text-decoration: none;
}
.lot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c-surface); border: 1px solid var(--c-kraft-edge); }
a.lot:hover, .lot-link:hover .lot { border-style: solid; }
.lot-link { display: inline-flex; align-items: center; text-decoration: none; vertical-align: middle; }
.lot-lg { font-size: 1rem; padding: 3px 10px 3px 8px; }

/* 批次流转条（标志性动作）：五段，各段内一条进度细条表示完成比例 */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; list-style: none; margin: 0; padding: 0; border-radius: var(--r-md); overflow: hidden; }
.flow li { padding: 10px 14px 12px; background: var(--c-surface); display: grid; gap: 2px; align-content: start; }
.flow .flow-label { font-size: var(--fs-caption); color: var(--c-text-secondary); }
.flow .flow-value { font-size: var(--fs-body-lg); font-weight: 650; }
.flow .flow-note { font-size: var(--fs-caption); color: var(--c-text-secondary); }
.flow-track { order: -1; display: block; height: 6px; border-radius: var(--r-full); background: var(--c-stage-4); overflow: hidden; margin-bottom: 6px; }
.flow-track i { display: block; height: 100%; background: var(--c-stage-1); border-radius: var(--r-full); }
.flow li.part .flow-track i { background: var(--c-stage-2); }
/* 列表里的迷你流转条 */
.mini-flow { display: flex; gap: 2px; width: 120px; height: 8px; }
.mini-flow span { flex: 1; border-radius: var(--r-xs); background: var(--c-stage-4); }
.mini-flow span.done { background: var(--c-stage-1); }
.mini-flow span.part { background: var(--c-stage-3); }
.mini-flow-wrap { display: grid; gap: 4px; }
.mini-flow-wrap small { color: var(--c-text-secondary); font-size: var(--fs-caption); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
th { font-size: var(--fs-caption); font-weight: 600; color: var(--c-text-secondary); background: var(--c-surface-subdued); white-space: nowrap; }
th.num, td.num { text-align: right; }
tbody tr { transition: background-color var(--dur-fast) ease-out; }
tbody tr:hover { background: var(--c-surface-hover); }
tfoot td { font-weight: 650; border-bottom: 0; background: var(--c-surface-subdued); }
.table-group th { background: var(--c-surface); color: var(--c-text); font-size: var(--fs-body); padding-top: 14px; }
td .sub { display: block; font-size: var(--fs-caption); color: var(--c-text-secondary); }
.neg { color: var(--c-critical-text); }
.th-sort { display: inline-flex; align-items: center; gap: 2px; color: inherit; text-decoration: none; }
.panel > .table-wrap:first-child table, .panel .table-wrap.flush table { border-top: 0; }
.panel .table-wrap th:first-child, .panel .table-wrap td:first-child { padding-left: var(--s-5); }
.panel .table-wrap th:last-child, .panel .table-wrap td:last-child { padding-right: var(--s-5); }

/* ---------- 标签页、筛选 ---------- */
.tabs { display: flex; gap: var(--s-1); box-shadow: inset 0 -1px 0 var(--c-border); padding: 0 var(--s-4); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; color: var(--c-text-secondary); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--c-text); }
.tabs a[aria-current="page"] { color: var(--c-text); border-bottom-color: var(--c-primary); }
.tabs .count { font-size: var(--fs-caption); background: var(--c-neutral-bg); color: var(--c-neutral-text); border-radius: var(--r-full); padding: 0 6px; }
.filters { display: flex; gap: var(--s-2); padding: var(--s-3) var(--s-4); flex-wrap: wrap; align-items: center; }
.filters .search { flex: 1 1 240px; position: relative; }
.filters .search .icon { position: absolute; left: 10px; top: 50%; margin-top: -8px; color: var(--c-text-secondary); }
.filters .search input { padding-left: 34px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 12px; border-radius: var(--r-full); border: 1px solid var(--c-border-strong); background: var(--c-surface); font: inherit; color: var(--c-text); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--c-primary); color: var(--c-on-primary); border-color: var(--c-primary); }
.segmented { display: inline-flex; justify-self: start; width: fit-content; max-width: 100%; border: 1px solid var(--c-border-strong); border-radius: var(--r-md); overflow: hidden; }
.segmented label { display: inline-flex; align-items: center; min-height: var(--control-h); padding: 0 14px; cursor: pointer; font-weight: 600; }
.segmented label + label { border-left: 1px solid var(--c-border-strong); }
.segmented input { position: absolute; opacity: 0; }
.segmented input:checked + span { color: var(--c-on-primary); }
.segmented label:has(input:checked) { background: var(--c-primary); color: var(--c-on-primary); }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--c-focus); outline-offset: -3px; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; align-content: start; }
.field label, .field .label { font-weight: 600; }
.req { color: var(--c-critical-text); margin-left: 2px; }
.help { font-size: var(--fs-caption); color: var(--c-text-secondary); }
.error-text { font-size: var(--fs-caption); color: var(--c-critical-text); display: flex; gap: 4px; align-items: center; font-weight: 600; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], input[type="tel"], select, textarea {
  width: 100%; min-height: var(--control-h); padding: 6px 10px; border-radius: var(--r-md);
  border: 1px solid var(--c-border-strong); background: var(--c-surface); color: var(--c-text);
  font: inherit; font-variant-numeric: tabular-nums; caret-color: var(--c-primary);
  transition: border-color var(--dur-fast) ease-out, box-shadow var(--dur-fast) ease-out;
}
textarea { min-height: 72px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: var(--i-select); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
input:hover, select:hover, textarea:hover { border-color: var(--c-text-secondary); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 0; border-color: var(--c-focus); border-radius: var(--r-md); }
input::placeholder, textarea::placeholder { color: var(--c-text-secondary); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--c-critical); box-shadow: 0 0 0 1px var(--c-critical); }
input:disabled, input[readonly] { background: var(--c-surface-subdued); color: var(--c-text-secondary); }
input.num { text-align: right; }
.input-affix { display: flex; align-items: stretch; }
.input-affix input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-affix .affix { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--c-border-strong); border-left: 0; border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--c-surface-subdued); color: var(--c-text-secondary); white-space: nowrap; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--c-primary); margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; cursor: pointer; }
.input-num { width: 6.5em; text-align: right; font-variant-numeric: tabular-nums; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: var(--s-2); font-weight: 600; }
.form-actions { position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-5); background: var(--c-surface); border-top: 1px solid var(--c-border); box-shadow: var(--shadow-up); flex-wrap: wrap; }
.form-actions .total { font-size: var(--fs-body-lg); }
.form-actions .total strong { font-size: var(--fs-heading); }
.line-table input { min-height: 32px; }
.line-table td { padding: 6px 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-md); border: 0; background: transparent; color: var(--c-text-secondary); cursor: pointer; }
.icon-btn:hover { background: var(--c-surface-hover); color: var(--c-critical-text); }
.warning-text { font-size: var(--fs-caption); color: var(--c-warning-text); display: flex; gap: 4px; align-items: center; font-weight: 600; }
.error-summary { border: 1px solid var(--c-critical); background: var(--c-critical-bg); color: var(--c-critical-text); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); }
.error-summary h2 { font-size: var(--fs-body); }
.error-summary a { color: var(--c-critical-text); font-weight: 600; }

/* 数量步进 */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--c-border-strong); border-radius: var(--r-md); overflow: hidden; }
.stepper button { width: 44px; border: 0; background: var(--c-surface-subdued); font: inherit; font-size: 1.25rem; color: var(--c-text); cursor: pointer; }
.stepper button:hover { background: var(--c-surface-hover); }
.stepper input { width: 72px; border: 0; border-radius: 0; text-align: center; min-height: 44px; font-weight: 650; }

/* 拍照 */
.photos { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.photo { width: 84px; height: 84px; border-radius: var(--r-md); background: var(--c-stage-3); position: relative; overflow: hidden; display: grid; place-items: end start; padding: 4px; color: var(--c-surface); font-size: var(--fs-caption); }
.photo svg { position: absolute; inset: 0; margin: auto; width: 32px; height: 32px; stroke: var(--c-surface); }
.photo span { position: relative; background: var(--c-shell); border-radius: var(--r-xs); padding: 0 4px; }
.photo-add { width: 84px; height: 84px; border-radius: var(--r-md); border: 1px dashed var(--c-border-strong); display: grid; place-items: center; align-content: center; gap: 4px; color: var(--c-text); background: var(--c-surface); cursor: pointer; font-weight: 600; font-size: var(--fs-caption); }
.photo-add:hover { background: var(--c-surface-hover); }
.photo-add:has(input:focus-visible) { outline: 2px solid var(--c-focus); outline-offset: 2px; }

/* 提示条 */
.banner { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--c-info-bg); color: var(--c-info-text); }
.banner-warning { background: var(--c-warning-bg); color: var(--c-warning-text); }
.banner-critical { background: var(--c-critical-bg); color: var(--c-critical-text); }
.banner .icon { margin-top: 2px; }
.banner strong { display: block; }

/* 无权查看 */
.locked { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border: 1px dashed var(--c-border-strong); border-radius: var(--r-md); background: var(--c-surface-subdued); color: var(--c-text-secondary); }
.locked .icon { color: var(--c-text); margin-top: 2px; }
.locked strong { color: var(--c-text); display: block; }
.hidden-val { color: var(--c-text-secondary); display: inline-flex; align-items: center; gap: 4px; }

/* 待办列表 */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li + li { border-top: 1px solid var(--c-border); }
.todo a { display: grid; grid-template-columns: auto 1fr auto auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-5); color: var(--c-text); text-decoration: none; min-height: 56px; }
.todo a:hover { background: var(--c-surface-hover); }
.todo .todo-icon { width: 32px; height: 32px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--c-neutral-bg); }
.todo .todo-icon.warn { background: var(--c-warning-bg); color: var(--c-warning-text); }
.todo .todo-icon.crit { background: var(--c-critical-bg); color: var(--c-critical-text); }
.todo .todo-icon.info { background: var(--c-info-bg); color: var(--c-info-text); }
.todo .todo-count { font-weight: 650; font-size: var(--fs-body-lg); }

/* 比例条（报表） */
.ratio { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.ratio-bar { width: 64px; height: 6px; border-radius: var(--r-full); background: var(--c-neutral-bg); overflow: hidden; }
.ratio-bar i { display: block; height: 100%; background: var(--c-stage-2); }

/* 骨架屏 */
.skeleton { display: block; height: 12px; border-radius: var(--r-xs); background: linear-gradient(90deg, var(--c-neutral-bg) 0%, var(--c-surface-hover) 50%, var(--c-neutral-bg) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty { text-align: center; padding: var(--s-8) var(--s-5); display: grid; gap: var(--s-3); justify-items: center; }
.empty .icon { width: 40px; height: 40px; color: var(--c-text-secondary); }
.empty p { max-width: 36ch; color: var(--c-text-secondary); }

/* 登录 */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: var(--s-6) var(--s-4); background: var(--c-ground); }
.auth { width: 100%; max-width: 400px; display: grid; gap: var(--s-5); }
.auth-brand { display: flex; align-items: center; gap: var(--s-3); justify-content: center; }
.auth-brand .brand-mark { width: 40px; height: 40px; }
.auth-brand .brand-mark .icon { width: 24px; height: 24px; }
.auth-brand span { font-size: var(--fs-heading); font-weight: 650; }
.auth .panel-body { padding: var(--s-6); display: grid; gap: var(--s-4); }
.auth-foot { text-align: center; color: var(--c-text-secondary); font-size: var(--fs-caption); }
.otp input { font-family: var(--font-mono); font-size: var(--fs-otp); letter-spacing: 0.5em; text-align: center; min-height: 52px; }

/* 设计图标注（仅设计图使用） */
.spec-note { font-size: var(--fs-caption); color: var(--c-text-secondary); border-top: 1px dashed var(--c-border-strong); padding-top: var(--s-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* ---------- 平板 ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  :root { --rail-w: 72px; }
  .rail a { justify-content: center; padding: 8px; }
  .rail a .label, .rail .rail-count, .rail-group { display: none; }
  .rail a .icon { width: 22px; height: 22px; }
}

/* ---------- 手机 ---------- */
@media (max-width: 767px) {
  .topbar { padding: 0 var(--s-2) 0 var(--s-3); gap: var(--s-2); }
  .top-search, .top-user .who { display: none; }
  .brand { flex: 1; }
  .layout { display: block; }
  .rail { display: none; }
  .main { padding: var(--s-4) var(--s-3) calc(88px + env(safe-area-inset-bottom)); }
  .page { gap: var(--s-4); }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header .actions { display: flex; flex-wrap: nowrap; }
  .page-header .actions .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; white-space: normal; text-align: center; line-height: 1.25; }
  .page-header .actions .btn-icon-only { flex: 0 0 44px; padding: 0; }
  .page-header .actions .hide-mobile { display: none; }
  .page:has(.form-actions) { padding-bottom: 132px; }
  html { scroll-padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  html:has(.form-actions) { scroll-padding-bottom: calc(152px + env(safe-area-inset-bottom)); }
  .panel { border-radius: var(--r-md); }
  .panel-head { padding: var(--s-3) var(--s-4) 0; }
  .panel-body { padding: var(--s-3) var(--s-4) var(--s-4); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .flow li { padding: 8px 6px 10px; }
  .flow .flow-value { font-size: var(--fs-body); }
  .flow .flow-note { display: none; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--c-surface); border-top: 1px solid var(--c-border); padding-bottom: env(safe-area-inset-bottom);
    box-shadow: var(--shadow-up);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; min-height: 56px; color: var(--c-text-secondary); text-decoration: none; font-size: var(--fs-caption); font-weight: 600; }
  .tabbar a[aria-current="page"] { color: var(--c-primary); }
  .tabbar a[aria-current="page"] .icon { stroke-width: 2.2; }
  .menu-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--c-on-shell); border-radius: var(--r-md); }
  .avatar { width: 36px; height: 36px; }
  .btn { min-height: 44px; }
  .chip { min-height: 44px; }
  .tabs { padding: 0 var(--s-2); flex-wrap: wrap; overflow-x: visible; }
  .icon-btn { width: 44px; height: 44px; }
  .back-link { min-height: 44px; margin-bottom: 0; }
  .lot-link { min-height: 44px; }
  .tap { min-height: 44px; display: inline-flex; align-items: center; }
  .panel-head a, .panel-foot a, .banner a, .field a.help, .auth a, .spec-roles a, .locked a, .toast a, .index-table a { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; }
  .form-actions .total.hide-mobile { display: none; }

  /* 表格在手机上变为逐行列表 */
  table.stack-mobile thead { display: none; }
  table.stack-mobile, table.stack-mobile tbody, table.stack-mobile tr, table.stack-mobile td { display: block; width: 100%; }
  table.stack-mobile tr { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--c-border); display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
  table.stack-mobile td { border: 0; padding: 0; text-align: left; }
  table.stack-mobile td[data-label]::before { content: attr(data-label); display: block; font-size: var(--fs-caption); color: var(--c-text-secondary); }
  table.stack-mobile td.cell-main { grid-column: 1 / -1; }
  table.stack-mobile td.num { text-align: left; }
  table.stack-mobile tfoot { display: block; }
  table.stack-mobile tfoot tr { background: var(--c-surface-subdued); }
  .panel .table-wrap table.stack-mobile td:first-child, .panel .table-wrap table.stack-mobile td:last-child { padding: 0; }
  .form-actions { position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom)); padding: var(--s-2) var(--s-3); }
  .form-actions .btn { flex: 1; }
  .form-actions .actions { flex: 1; display: flex; gap: var(--s-2); }
  .form-actions .total { width: 100%; display: flex; justify-content: space-between; }
  .hide-mobile { display: none !important; }
  .kv { grid-template-columns: max-content 1fr; }
  .line-table input { min-height: 44px; }
  .ratio-bar { display: none; }
  .ratio { justify-content: flex-start; }
  .todo a { padding: var(--s-3) var(--s-4); }
}
@media (min-width: 768px) {
  .show-mobile { display: none !important; }
}

/* ---------- 第二轮新增 ---------- */
.mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); }
.gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }
.row { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.row-nowrap { display: flex; gap: var(--s-2); align-items: stretch; }
.ml-2 { margin-left: var(--s-2); }
.top-search-btn { display: none; place-items: center; width: 44px; height: 44px; color: var(--c-on-shell); border-radius: var(--r-md); }
.top-search-btn:hover { background: var(--c-shell-hover); }
.auth-title { display: flex; gap: var(--s-3); align-items: center; }
/* 品类分组（采购单） */
.line-group { border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); margin: 0; min-width: 0; display: grid; gap: var(--s-3); }
.line-group.is-invalid { border-color: var(--c-critical); }
.line-group legend { padding: 0 6px; font-weight: 650; }
/* 入库：逐规格点数 */
.size-list { list-style: none; margin: 0; padding: 0; }
.size-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: var(--s-3) 0; border-top: 1px solid var(--c-border); }
.size-row .warning-text, .size-row .error-text { grid-column: 1 / -1; }
.size-list .size-row:first-child { border-top: 0; }
/* 单件扫码 */
.scan-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-2); align-items: end; }
.scan-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-2); }
.scan-list li { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-md); border: 1px solid var(--c-border); background: var(--c-surface-subdued); }
.scan-list li.done { background: var(--c-success-bg); color: var(--c-success-text); border-color: transparent; font-weight: 600; }
.scan-list li .sub { margin-left: auto; }
/* 照片状态 */
.photo-tile { display: grid; gap: 4px; justify-items: start; }
.photo.is-failed { background: var(--c-critical-bg); color: var(--c-critical-text); }
.photo.is-failed svg { stroke: var(--c-critical-text); }
.photo.is-failed span { background: transparent; }
.photo.is-uploading { background: var(--c-neutral-bg); }
.photo.is-uploading svg { stroke: var(--c-text-secondary); }
.photo-actions { display: flex; gap: 2px; }
/* 附加成本、付款进度 */
.pay-list { list-style: none; margin: 0; padding: 0; display: grid; }
.pay-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: var(--s-3) 0; }
.pay-list li + li { border-top: 1px solid var(--c-border); }
.pay-list li:first-child { padding-top: 0; }
.pay-list .pay-amt { text-align: right; font-weight: 600; white-space: nowrap; }
.pay-list .badge { justify-self: start; }
.cost-rows { display: grid; gap: var(--s-3); }
.cost-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) 44px; gap: var(--s-2); align-items: end; }
@media (max-width: 767px) {
  .cost-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-bottom: var(--s-3); border-bottom: 1px solid var(--c-border); }
  .cost-row .icon-btn { justify-self: end; grid-column: 2; }
}
/* 编号预览 */
.code-preview { display: flex; flex-wrap: wrap; gap: 6px; }
/* 设计图标注（仅设计图使用，不进系统） */
.spec-q { display: inline-block; font-size: var(--fs-caption); font-weight: 400; color: var(--c-text-secondary); border: 1px dashed var(--c-border-strong); border-radius: var(--r-xs); padding: 0 4px; line-height: 1.5; white-space: nowrap; vertical-align: baseline; }
p.spec-q { display: block; white-space: normal; padding: var(--s-2) var(--s-3); }
.spec-roles { max-width: 1200px; margin: 0 auto var(--s-4); display: flex; flex-wrap: wrap; gap: 4px var(--s-3); align-items: center; padding: var(--s-2) var(--s-3); border: 1px dashed var(--c-border-strong); border-radius: var(--r-md); font-size: var(--fs-caption); color: var(--c-text-secondary); }
.spec-roles a { color: var(--c-link); font-weight: 600; }
.spec-roles a[aria-current="page"] { color: var(--c-text); text-decoration: none; }
.spec-roles .denied { color: var(--c-text-secondary); }
/* 对话框（静态展示：底下是被遮住的页面） */
.dialog-stage { position: relative; border-radius: var(--r-lg); background: color-mix(in srgb, var(--c-shell) 45%, transparent); padding: var(--s-8) var(--s-4); display: grid; place-items: center; }
.dialog { position: static; display: block; width: 100%; max-width: 480px; margin: 0; padding: 0; border: 0; border-radius: var(--r-lg); background: var(--c-surface); color: var(--c-text); box-shadow: var(--shadow-raised); }
.dialog-body { padding: var(--s-5); display: grid; gap: var(--s-4); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--c-border); background: var(--c-surface-subdued); border-radius: 0 0 var(--r-lg) var(--r-lg); flex-wrap: wrap; }
.dialog ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
/* 轻提示 */
.toast { display: inline-flex; gap: var(--s-2); align-items: center; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--c-shell); color: var(--c-on-shell); box-shadow: var(--shadow-raised); max-width: 100%; }
.toast a { color: var(--c-on-shell); font-weight: 600; }
/* 二维码示意、备用码 */
.qr { width: 168px; height: 168px; border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 8px; background: var(--c-surface); justify-self: center; }
.qr svg { width: 100%; height: 100%; display: block; }
.secret { font-family: var(--font-mono); letter-spacing: 0.08em; background: var(--c-surface-subdued); border: 1px solid var(--c-border); border-radius: var(--r-sm); padding: var(--s-2) var(--s-3); text-align: center; overflow-wrap: anywhere; }
.codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px var(--s-4); font-family: var(--font-mono); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-4); counter-reset: step; }
.steps > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s-3); counter-increment: step; }
.steps > li::before { content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--c-neutral-bg); color: var(--c-text); display: grid; place-items: center; font-weight: 650; font-size: var(--fs-caption); }
.steps > li > div { display: grid; gap: var(--s-2); min-width: 0; }
/* 无权访问 */
.denied-page { text-align: center; padding: var(--s-8) var(--s-5); display: grid; gap: var(--s-3); justify-items: center; }
.denied-page .icon { width: 40px; height: 40px; color: var(--c-text-secondary); }
.denied-page p { max-width: 40ch; color: var(--c-text-secondary); }
/* 更多（手机） */
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li + li { border-top: 1px solid var(--c-border); }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 52px; padding: var(--s-3) var(--s-4); color: var(--c-text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--c-surface-hover); }
.menu-list .icon { color: var(--c-text-secondary); }
.menu-list .menu-end { margin-left: auto; color: var(--c-text-secondary); display: inline-flex; align-items: center; gap: 4px; }
/* 列清单（导出） */
.col-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.col-list li { padding: 2px 10px; border-radius: var(--r-full); background: var(--c-neutral-bg); color: var(--c-neutral-text); font-size: var(--fs-caption); font-weight: 600; }
.choice-list { display: grid; gap: var(--s-2); }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px var(--s-3); align-items: start; padding: var(--s-3); border: 1px solid var(--c-border); border-radius: var(--r-md); cursor: pointer; min-height: 44px; }
.choice:has(input:checked) { border-color: var(--c-primary); background: var(--c-surface-subdued); }
.choice input { margin-top: 3px; }
/* 角色矩阵（目录） */
.role-matrix td, .role-matrix th { white-space: nowrap; }
.role-matrix td.denied-cell { color: var(--c-text-secondary); }
@media (max-width: 767px) {
  .top-search-btn { display: inline-grid; }
  .scan-row { grid-template-columns: minmax(0, 1fr) auto; }
  .scan-row .scan-btn { grid-column: 1 / -1; }
  .dialog-stage { padding: var(--s-4) var(--s-2); }
  .dialog-actions .btn { flex: 1 1 auto; }
  .spec-roles { margin-bottom: var(--s-3); }
}
.ratio-bar.neg i { background: var(--c-critical); }
/* 第二轮：手机端品牌链接与目录链接触控高度 */
@media (max-width: 767px) {
  .brand { min-height: 44px; }
  .index-table a, .error-summary a, .err-summary a, .toast a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* 打印：只留内容，单栏（第三轮新增，规则待 Alex 确认） */
@media print {
  .rail, .topbar, .tabbar, .spec-roles, .skip-link, .page-header .actions, .form-actions, .dialog-actions, .toast { display: none !important; }
  .layout, .main, .page, .split, .detail-cols { display: block !important; margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .panel { break-inside: avoid; box-shadow: none; border-color: #999; margin-bottom: 12px; }
  body { background: #fff; color: #000; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- 第四轮新增 ---------- */
/* 页内筛选、排序、分页用按钮，不再用 href="#" */
.tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; color: var(--c-text-secondary); font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.tabs button:hover { color: var(--c-text); }
.tabs button[aria-pressed="true"] { color: var(--c-text); border-bottom-color: var(--c-primary); }
button.th-sort { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--c-link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 767px) { .panel-foot .link-btn, .banner .link-btn, .toast .link-btn, .panel-head .link-btn, .link-btn.tap { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; } }
.toast .link-btn { color: inherit; font-weight: 650; }
.todo .todo-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: var(--s-3); align-items: center; width: 100%; padding: var(--s-3) var(--s-5); color: var(--c-text); min-height: 56px; background: none; border: 0; font: inherit; text-align: left; }
button.todo-row { cursor: pointer; }
button.todo-row:hover { background: var(--c-surface-hover); }
@media (max-width: 767px) { .todo .todo-row { padding: var(--s-3) var(--s-4); } }
/* 宽表格：左右有内容时显示阴影提示可滚动；768–1023 固定首列 */
.table-wrap.is-wide {
  background:
    linear-gradient(to right, var(--c-surface) 30%, transparent) left center / 32px 100% no-repeat local,
    linear-gradient(to left, var(--c-surface) 30%, transparent) right center / 32px 100% no-repeat local,
    linear-gradient(to right, color-mix(in srgb, var(--c-text) 9%, transparent), transparent) left center / 12px 100% no-repeat scroll,
    linear-gradient(to left, color-mix(in srgb, var(--c-text) 9%, transparent), transparent) right center / 12px 100% no-repeat scroll;
}
.table-wrap.is-wide:focus-visible { outline: 2px solid var(--c-link); outline-offset: -2px; }
@media (min-width: 768px) and (max-width: 1023px) {
  .table-wrap.is-wide th:first-child, .table-wrap.is-wide td:first-child { position: sticky; left: 0; z-index: 1; background: var(--c-surface); box-shadow: 1px 0 0 var(--c-border); }
  .table-wrap.is-wide th:first-child, .table-wrap.is-wide tfoot td:first-child { background: var(--c-surface-subdued); }
}
/* 触屏设备：所有可点控件不小于 44px */
@media (pointer: coarse) {
  .btn, .chip, select, input:not([type="radio"]):not([type="checkbox"]), textarea, .rail a, .icon-btn, .th-sort { min-height: 44px; }
  .icon-btn { min-width: 44px; }
  .link-btn { min-height: 44px; display: inline-flex; align-items: center; }
  .topbar .top-search input[type="search"] { height: 44px; min-height: 44px; }
  .brand { min-height: 44px; }
  /* 表格、面板、段落里的文字链接：触屏时点击区补到 44px 高 */
  main a:not(.btn):not(.chip), .spec-roles a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 767px) { table.stack-mobile td.cell-main strong > a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; } }
@media (min-width: 768px) and (max-width: 1023px), (min-width: 1280px) { td[data-label="采购日期"] { white-space: nowrap; } }
.nw { white-space: nowrap; }

/* 第四轮补：设计标注里的链接、触屏下的分段选择也满足 44px */
@media (max-width: 767px) { .spec-q a { display: inline-flex; align-items: center; min-height: 44px; } }
@media (pointer: coarse) { .segmented label { min-height: 44px; } .spec-q a { display: inline-flex; align-items: center; min-height: 44px; } }

/* ---------- 第五轮 ---------- */
/* 宽表格在 768–1023 固定首列时，首列至少 9 个字宽，名称不在字中间折行（DESIGN 第 26 条） */
@media (min-width: 768px) and (max-width: 1023px) {
  .table-wrap.is-wide th:first-child, .table-wrap.is-wide td:first-child { min-width: 9em; }
  .table-wrap.is-wide td:first-child > strong, .table-wrap.is-wide tfoot td:first-child, .table-wrap.is-wide th:first-child { white-space: nowrap; }
}
/* 触屏设备：两三个字的按钮、文字链接，宽度也不小于 44px（DESIGN 第 28 条改为 44×44） */
@media (pointer: coarse) {
  .btn, .chip, .link-btn, .tabs button, .th-sort, .segmented label, main a:not(.btn):not(.chip), .spec-roles a { min-width: 44px; justify-content: center; }
}
/* 必填说明写在标签里；出错示意框 */
.label-note { margin-left: 6px; font-weight: 400; color: var(--c-text-secondary); font-size: var(--fs-caption); }
.state-demo { border: 1px dashed var(--c-border-strong); border-radius: var(--r-md); padding: var(--s-4); }
.state-demo > .state-cap { margin: 0 0 var(--s-3); font-size: var(--fs-caption); color: var(--c-text-secondary); font-weight: 600; }
/* 说明文字里的页面链接，手机上点击高度 44px */
@media (max-width: 767px) { .help a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; } }
/* 触屏下 44px 最小宽度不能让并排按钮压到比文字还窄：并排按钮保持文字宽度，放不下就换行 */
@media (pointer: coarse) { .actions > .btn, .form-actions .btn, .dialog-actions .btn { min-width: max-content; } }
/* 侧栏“盘点复核”待复核角标：有待复核时才出现 */
.rail .rail-count.is-pending, .menu-list .rail-count.is-pending { min-width: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--c-warning-bg); color: var(--c-warning-text); font-weight: 600; text-align: center; }
@media (max-width: 1023px) {
  .rail a { position: relative; }
  .rail .rail-count.is-pending { display: block; position: absolute; top: 6px; right: 10px; min-width: 0; width: 8px; height: 8px; padding: 0; font-size: 0; color: transparent; background: var(--c-warning-text); }
}
/* T12 盘点单：每个仓库一行，按仓库或库区发起盘点 */
/* 盘点范围列表：不用 .menu-list（它把里面的按钮去掉边框当整行链接），这里的按钮要保持按钮样子 */
/* 手机上页头按钮多于 3 个时排成两行两列，不把按钮字挤断（库存页：盘点、报损、仓库与库位、调拨） */
@media (max-width: 767px) { .page-header .actions.actions-2x2 { flex-wrap: wrap; } .page-header .actions.actions-2x2 .btn { flex: 1 1 calc(50% - var(--s-2)); } }
.scope-list { list-style: none; margin: 0; padding: 0; }
.scope-list li + li { border-top: 1px solid var(--c-border); }
.scope-list form { margin: 0; }
.scope-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); }
.scope-row > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.scope-row .actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.scope-row .help { flex-basis: 100%; margin: 0; }
/* 手机底部栏的待复核小圆点（和平板侧栏收起时一样，数字给读屏） */
.tabbar a { position: relative; }
.tabbar .tab-dot { position: absolute; top: 8px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: var(--r-full); background: var(--c-warning-text); }
/* ===== 首页仓库地图（T27，DESIGN.md“首页仓库地图”，设计图 docs/design-previews/首页地图-第四版/：浅色 F、深色 E，去掉 #89 #94–#97 的偏离）=====
   地图是内联 SVG（core/includes/china_map.svg），颜色全由 --map-* 变量给，一张图两种模式通用。深色才有的点阵、发光
   用 var(--map-art-dot / --map-glow, transparent) 兜底：浅色没有这两个变量就什么都不画。 */
.whmap { overflow: hidden; }
.whmap-stats { display: flex; flex-wrap: wrap; align-items: center; margin: var(--s-3) 0 0; padding: var(--s-2) var(--s-5); border-block: 1px solid var(--c-border); font-variant-numeric: tabular-nums; }
.whmap-stats > div { display: flex; align-items: baseline; gap: var(--s-2); padding: var(--s-1) var(--s-4); }
.whmap-stats > div:first-child { padding-left: 0; }
.whmap-stats > div + div { border-left: 1px solid var(--c-border); }
.whmap-stats dt, .whmap-stats dd { margin: 0; color: var(--c-text-secondary); font-size: var(--fs-caption); }
.whmap-stats dd strong { color: var(--c-text); font-size: var(--fs-title); font-weight: 650; }
.whmap-stats .st-warn dd strong { color: var(--c-warning-text); }
.whmap-stats .st-share { flex: 1 1 260px; align-items: center; }
.whmap-stats .st-share dd { display: flex; align-items: center; gap: var(--s-2); flex: 1; min-width: 0; }
.share { display: flex; flex: 1; min-width: 80px; max-width: 220px; height: 6px; gap: 2px; border-radius: var(--r-xs); overflow: hidden; background: var(--c-stage-4); }
.share i, .mk-bar i, .wc-bar i, .det-bar i { display: block; width: var(--w); height: 100%; }
.share .sh0 { background: var(--map-marker); } .share .sh1 { background: var(--c-stage-2); } .share .sh2 { background: var(--c-stage-3); }
.share-t { white-space: nowrap; }
.whmap-figure { margin: 0; padding: var(--s-4) var(--s-5); }
.map-art { container-type: inline-size; position: relative; aspect-ratio: 3 / 2; border-radius: var(--r-md); overflow: hidden; background-color: var(--map-art);
  background-image: radial-gradient(circle, var(--map-art-dot, transparent) 1px, transparent 1.3px); background-size: 16px 16px; }
.map-frame { position: absolute; left: 9.11%; top: 4%; width: 81.78%; height: 92%; }   /* 4:3 地图框在 3:2 画板里居中 */
.map-base, .map-route { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-base .l1 { fill: var(--map-land-1); } .map-base .l2 { fill: var(--map-land-2); } .map-base .l3 { fill: var(--map-land-3); }
.map-base .l4 { fill: var(--map-land-4); } .map-base .lw { fill: var(--map-land-wh); }
.map-base .m-nb { stroke: var(--c-border); }
.map-base .m-prov { stroke: var(--map-province-line); }
.map-base .m-bd { stroke: var(--map-border); }
.map-base .m-isl { fill: var(--map-border); }
.map-base .m-inset { fill: var(--c-surface); stroke: var(--c-border-strong); }
.map-base .m-txt { fill: var(--c-text-secondary); }
.map-glow-f { flood-color: var(--map-glow, transparent); }
.map-route { z-index: 2; pointer-events: none; }
.rt-line { fill: none; stroke: var(--c-stage-2); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rt-arrow { fill: none; stroke: var(--c-stage-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.rt-dot { fill: var(--c-surface); stroke: var(--c-stage-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.route-tag { position: absolute; left: var(--x); top: var(--y); z-index: 3; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: var(--s-2); min-height: 24px; padding: 0 var(--s-2) 0 var(--s-1);
  border-radius: var(--r-full); background: var(--c-info-bg); color: var(--c-info-text); font-size: var(--fs-caption); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.route-tag .rt-k { padding: 0 var(--s-2); border-radius: var(--r-full); background: var(--c-surface); line-height: 18px; }
.mk { position: absolute; left: var(--x); top: var(--y); z-index: 3; width: 44px; height: 44px; transform: translate(-50%, -50%); display: grid; place-items: center; color: var(--c-text); text-decoration: none;
  --lx: var(--dlx); --ly: var(--dly); --ax: var(--dax); --len: var(--dlen); --ang: var(--dang); }
.mk:focus-visible, .route-tag:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: var(--r-full); }
.mk-dot { position: relative; z-index: 2; width: 12px; height: 12px; border-radius: var(--r-full); background: var(--map-marker); box-shadow: 0 0 0 3px var(--c-surface), 0 0 10px var(--map-glow, transparent); }
.mk-rings { position: absolute; inset: 0; display: grid; place-items: center; }
.mk-r { position: absolute; border-radius: var(--r-full); border: 1px solid var(--c-stage-2); }
.mk-r1 { width: 24px; height: 24px; } .mk-r2 { width: 34px; height: 34px; border-color: var(--c-stage-3); } .mk-r3 { width: 44px; height: 44px; border-color: var(--c-stage-4); }
.mk-empty .mk-dot { background: var(--c-surface); border: 2px solid var(--map-marker); box-sizing: border-box; }
.mk-plan .mk-dot { background: var(--c-surface); border: 2px dashed var(--map-marker); box-sizing: border-box; }
.mk-plan .mk-card { border-style: dashed; }
.mk-leader { position: absolute; left: 50%; top: 50%; z-index: 1; width: var(--len); height: 0; border-top: 1px solid var(--c-border-strong); transform-origin: 0 0; transform: rotate(var(--ang)); }
.mk-card { position: absolute; left: calc(50% + var(--lx)); top: calc(50% + var(--ly)); z-index: 3; transform: translate(var(--ax), -50%); display: grid; gap: var(--s-1); padding: var(--s-1) var(--s-2) var(--s-2);
  border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-surface); box-shadow: var(--shadow-panel); white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.mk-top { display: flex; align-items: center; gap: var(--s-2); }
.mk-name { font-size: var(--fs-body); font-weight: 650; }
.mk-qty { display: inline-grid; place-items: center; min-height: 20px; padding: 0 var(--s-2); border-radius: var(--r-full); background: var(--c-primary); color: var(--c-on-primary); font-size: var(--fs-caption); font-weight: 600; font-variant-numeric: tabular-nums; }
.mk-note { color: var(--c-text-secondary); font-size: var(--fs-caption); }
.mk-sub { display: flex; align-items: center; gap: var(--s-2); min-height: 16px; }
.mk-bar, .wc-bar, .det-bar { display: flex; gap: 2px; height: 6px; border-radius: var(--r-xs); overflow: hidden; background: var(--c-stage-4); }
.mk-bar { width: 96px; }
.ag0 { background: var(--c-stage-2); } .ag1 { background: var(--c-stage-3); } .ag2 { background: var(--c-warning-text); }
.mk-flag { padding: 0 var(--s-2); border-radius: var(--r-full); background: var(--c-warning-bg); color: var(--c-warning-text); font-size: var(--fs-caption); font-weight: 600; line-height: 18px; }
.mk:hover .mk-card, .mk.is-current .mk-card { border-color: var(--c-border-strong); box-shadow: var(--shadow-raised); }
.mk.is-selected .mk-card { border-color: var(--c-primary); box-shadow: var(--shadow-raised); }
.mk.is-selected .mk-dot { box-shadow: 0 0 0 3px var(--c-surface), 0 0 0 5px var(--c-primary), 0 0 10px var(--map-glow, transparent); }
.wh-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin: 0; padding: 0 var(--s-5); list-style: none; }
main a.wh-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); align-content: start; height: 100%; box-sizing: border-box; padding: var(--s-4); border: 1px solid var(--c-border); border-radius: var(--r-lg);
  background: var(--c-surface); color: var(--c-text); text-decoration: none; box-shadow: var(--shadow-panel); font-variant-numeric: tabular-nums;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
main a.wh-card:hover, main a.wh-card.is-current { border-color: var(--c-border-strong); transform: translateY(-2px); }
main a.wh-card:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
main a.wh-card.is-selected { border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary); }
.wc-head { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-title); }
.wc-head svg { margin-left: auto; color: var(--c-text-secondary); flex: none; }
.wc-meta, .wc-cost { color: var(--c-text-secondary); font-size: var(--fs-caption); }
.wc-qty { color: var(--c-text-secondary); font-size: var(--fs-caption); }
.wc-qty strong { color: var(--c-text); font-size: var(--fs-heading); font-weight: 650; line-height: 1.2; }
.wc-flags { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.wc-cost { padding-top: var(--s-2); border-top: 1px solid var(--c-border); }
.wh-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-3); margin: var(--s-4) var(--s-5) 0; padding: var(--s-3) var(--s-4); border: 1px solid var(--c-border); border-radius: var(--r-lg); font-variant-numeric: tabular-nums; }
.wh-total .num { text-align: left; white-space: normal; }
.wh-detail { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.4fr) minmax(0, 1.2fr); grid-template-areas: "head rows age" "big rows age" "open open open"; gap: var(--s-3) var(--s-6);
  margin: var(--s-4) var(--s-5) var(--s-5); padding: var(--s-5); border: 1px solid var(--c-border); border-radius: var(--r-lg); background: var(--c-surface); box-shadow: var(--shadow-panel); font-variant-numeric: tabular-nums; }
.det-head { grid-area: head; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }
.det-head h3 { margin: 0; font-size: var(--fs-title); }
.det-head p { flex-basis: 100%; order: 3; margin: 0; font-size: var(--fs-caption); }
.det-big { grid-area: big; margin: 0; }
.det-big strong { display: block; font-size: var(--fs-heading); font-weight: 650; line-height: 1.3; }
.det-rows { grid-area: rows; align-self: start; margin: 0; }
.det-rows > div { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--c-border); }
.det-rows > div:first-child { border-top: 0; padding-top: 0; }
.det-rows dt { color: var(--c-text-secondary); } .det-rows dd { margin: 0; text-align: right; }
.det-age { grid-area: age; align-self: start; display: grid; gap: var(--s-2); }
.det-age h4 { margin: 0; color: var(--c-text-secondary); font-size: var(--fs-caption); font-weight: 600; }
.det-age ul { display: grid; gap: var(--s-1); margin: 0; padding: 0; list-style: none; }
.det-age li { display: flex; align-items: center; gap: var(--s-2); }
.det-age li .num { margin-left: auto; }
.ag-key { width: 8px; height: 8px; border-radius: var(--r-xs); flex: none; }
main a.det-open { grid-area: open; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding-top: var(--s-2); border-top: 1px solid var(--c-border); font-weight: 600; text-decoration: none; }
.whmap .panel-foot a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 1023px) { .wh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .wh-detail { grid-template-columns: 1fr 1fr; grid-template-areas: "head head" "big big" "rows age" "open open"; }
}
@media (max-width: 767px) {
  .whmap-stats { display: grid; padding: 0; }   /* 手机：一项一行，名称在左、数在右 */
  .whmap-stats > div, .whmap-stats > div:first-child { justify-content: space-between; padding: var(--s-2) var(--s-4); }
  .whmap-stats > div + div { border-left: 0; border-top: 1px solid var(--c-border); }
  .whmap-stats dd { text-align: right; }
  .whmap-stats .st-share { flex-direction: column; align-items: stretch; gap: var(--s-1); }
  .whmap-stats .st-share dd { flex-wrap: wrap; text-align: left; }
  .share-t { white-space: normal; }
  .whmap-figure { padding: var(--s-3); }
  .map-art { aspect-ratio: 4 / 3; }
  .map-frame { left: 4%; top: 4%; width: 92%; height: 92%; }
  .mk { --lx: var(--mlx); --ly: var(--mly); --ax: var(--max); --len: var(--mlen); --ang: var(--mang); }
  .mk-r1 { width: 18px; height: 18px; } .mk-r2 { width: 26px; height: 26px; } .mk-r3 { width: 34px; height: 34px; }
  .mk-dot { width: 10px; height: 10px; }
  .mk-sub, .route-tag, .mk-empty .mk-card, .mk-empty .mk-leader { display: none; }
  .mk-card { padding: 2px var(--s-2); }
  .mk-name { font-size: var(--fs-caption); }
  .wh-cards { grid-template-columns: 1fr; gap: var(--s-3); padding: 0 var(--s-3); }
  .wh-total { margin: var(--s-3) var(--s-3) 0; }
  .wh-detail { grid-template-columns: 1fr; grid-template-areas: "head" "big" "rows" "age" "open"; margin: var(--s-3); padding: var(--s-4); }
}
@media (prefers-reduced-motion: reduce) { main a.wh-card, .mk-card { transition: none; } main a.wh-card:hover, main a.wh-card.is-current { transform: none; } }
/* 深色省界 .55 不透明（DESIGN 深色配色）；两处选择器同 design.css 顶部两组深色变量 */
@media screen { [data-theme="dark"] .map-base .m-prov { stroke-opacity: .55; } }
@media screen and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map-base .m-prov { stroke-opacity: .55; } }
