/* JOYSONS 运营台 · 设计系统
 * 色彩全部取自“染缸”：中性色 = 未染羊毛毡的灰（略偏绿，不暖不蓝）；强调 = 靛青；风险 = 茜草红；提醒 = 栀子黄；正常 = 松针绿。
 * 界面本身近乎单色，页面上唯一的彩色是毛衣的真实色票。
 * 主题结构：:root 为浅色；@media dark 且未强制浅色时、以及 [data-theme=dark] 时重定义令牌。组件只用令牌取色。
 */
:root {
  --bg: #EEEFEC; --surface: #F6F7F4; --raised: #FFFFFF; --sunken: #E5E7E3;
  --ink: #171A18; --ink-2: #474D48; --ink-3: #5F665F; --ink-4: #969C96;
  --line: rgba(23, 26, 24, .10); --line-2: rgba(23, 26, 24, .18); --hover: rgba(23, 26, 24, .05);
  --accent: #1F3A5F; --on-accent: #F3F6FA; --accent-soft: rgba(31, 58, 95, .08); --accent-line: rgba(31, 58, 95, .28);
  --critical: #A93429; --critical-soft: rgba(169, 52, 41, .09); --critical-solid: #AE372C; --on-critical: #FFFFFF;
  --warn: #8A5F0C; --warn-soft: rgba(154, 108, 16, .12); --warn-solid: #C58F1F;
  --ok: #2F6B4F; --ok-soft: rgba(47, 107, 79, .10);
  --idle: #5F665F; --idle-soft: rgba(23, 26, 24, .06);
  --heat-1: #AE372C; --heat-1-ink: #FFFFFF;
  --heat-2: color-mix(in srgb, #AE372C 42%, var(--surface));
  --heat-3: color-mix(in srgb, #C58F1F 26%, var(--surface));
  --heat-4: color-mix(in srgb, var(--ink) 5%, var(--surface));
  --heat-idle: color-mix(in srgb, #1F3A5F 12%, var(--surface));
  --seq: #1F3A5F;
  --chart: #1F3A5F; --chart-muted: #A4ABA5; --chart-grid: rgba(23, 26, 24, .08); --chart-base: rgba(23, 26, 24, .22);
  --sw-ring: rgba(23, 26, 24, .20);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 1px 2px rgba(23, 26, 24, .05), 0 8px 24px -12px rgba(23, 26, 24, .10);
  --shadow-pop: 0 16px 48px -12px rgba(23, 26, 24, .30), 0 0 0 1px var(--line);
  --scrim: rgba(23, 26, 24, .32);
  --f-text: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --f-display: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --f-num: "Bahnschrift", "DIN Alternate", "Segoe UI Variable Display", "Segoe UI", -apple-system, "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --r-xs: 5px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --rail: 72px; --top: 56px; --gutter: 40px; --page-max: 1760px;
  --fast: 120ms; --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101211; --surface: #161918; --raised: #1D211F; --sunken: #0B0D0C;
    --ink: #E7E9E5; --ink-2: #B1B6B0; --ink-3: #8A908A; --ink-4: #646A65;
    --line: rgba(231, 233, 229, .09); --line-2: rgba(231, 233, 229, .18); --hover: rgba(231, 233, 229, .06);
    --accent: #A9C0E6; --on-accent: #0D1726; --accent-soft: rgba(169, 192, 230, .11); --accent-line: rgba(169, 192, 230, .32);
    --critical: #E8877B; --critical-soft: rgba(226, 122, 110, .13); --critical-solid: #B9443A; --on-critical: #FFFFFF;
    --warn: #DDB45F; --warn-soft: rgba(217, 174, 85, .13); --warn-solid: #C9992E;
    --ok: #7FBF9F; --ok-soft: rgba(127, 191, 159, .12);
    --idle: #8A908A; --idle-soft: rgba(231, 233, 229, .07);
    --heat-1: #B9443A; --heat-1-ink: #FFFFFF;
    --heat-2: color-mix(in srgb, #C24A3F 42%, var(--surface));
    --heat-3: color-mix(in srgb, #C9992E 24%, var(--surface));
    --heat-4: color-mix(in srgb, var(--ink) 7%, var(--surface));
    --heat-idle: color-mix(in srgb, #A9C0E6 16%, var(--surface));
    --seq: #A9C0E6;
    --chart: #A9C0E6; --chart-muted: #5C625D; --chart-grid: rgba(231, 233, 229, .07); --chart-base: rgba(231, 233, 229, .24);
    --sw-ring: rgba(231, 233, 229, .28);
    --shadow-soft: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 0 0 1px var(--line);
    --shadow-pop: 0 20px 56px -8px rgba(0, 0, 0, .65), 0 0 0 1px var(--line-2);
    --scrim: rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101211; --surface: #161918; --raised: #1D211F; --sunken: #0B0D0C;
  --ink: #E7E9E5; --ink-2: #B1B6B0; --ink-3: #8A908A; --ink-4: #646A65;
  --line: rgba(231, 233, 229, .09); --line-2: rgba(231, 233, 229, .18); --hover: rgba(231, 233, 229, .06);
  --accent: #A9C0E6; --on-accent: #0D1726; --accent-soft: rgba(169, 192, 230, .11); --accent-line: rgba(169, 192, 230, .32);
  --critical: #E8877B; --critical-soft: rgba(226, 122, 110, .13); --critical-solid: #B9443A; --on-critical: #FFFFFF;
  --warn: #DDB45F; --warn-soft: rgba(217, 174, 85, .13); --warn-solid: #C9992E;
  --ok: #7FBF9F; --ok-soft: rgba(127, 191, 159, .12);
  --idle: #8A908A; --idle-soft: rgba(231, 233, 229, .07);
  --heat-1: #B9443A; --heat-1-ink: #FFFFFF;
  --heat-2: color-mix(in srgb, #C24A3F 42%, var(--surface));
  --heat-3: color-mix(in srgb, #C9992E 24%, var(--surface));
  --heat-4: color-mix(in srgb, var(--ink) 7%, var(--surface));
  --heat-idle: color-mix(in srgb, #A9C0E6 16%, var(--surface));
  --seq: #A9C0E6;
  --chart: #A9C0E6; --chart-muted: #5C625D; --chart-grid: rgba(231, 233, 229, .07); --chart-base: rgba(231, 233, 229, .24);
  --sw-ring: rgba(231, 233, 229, .28);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 0 0 1px var(--line);
  --shadow-pop: 0 20px 56px -8px rgba(0, 0, 0, .65), 0 0 0 1px var(--line-2);
  --scrim: rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ───────── 基础 ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 16px); }
html.has-ov { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 var(--f-text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .42; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
[hidden] { display: none !important; }
b, strong { font-weight: 600; }
small { font-size: 12px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num, .mono { font-family: var(--f-num); font-variant-numeric: tabular-nums lining-nums; letter-spacing: .01em; }
td.num, th.num { text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 300; padding: 10px 14px; border-radius: var(--r-sm); background: var(--ink); color: var(--bg); }
.skip:focus { top: 12px; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }

/* ───────── 外壳 ───────── */
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 12px 0 14px; border-right: 1px solid var(--line); background: var(--bg); z-index: 20; }
.mark { width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 600 17px/1 var(--f-num); margin-bottom: 20px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { position: relative; width: 56px; height: 54px; border-radius: var(--r-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); font-size: 11px; line-height: 1.2; transition: color var(--fast), background-color var(--fast); }
.nav a .ic { width: 20px; height: 20px; }
.nav a:hover { color: var(--ink); background: var(--hover); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--raised); box-shadow: var(--shadow-soft); font-weight: 600; }
.nav .pip { position: absolute; top: 8px; right: 11px; min-width: 7px; height: 7px; border-radius: 50%; background: var(--critical); box-shadow: 0 0 0 2px var(--bg); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; }

.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 15; height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.shop { display: flex; align-items: baseline; gap: 10px; min-width: 0; white-space: nowrap; }
.shop b { font-size: 14px; }
.shop span { color: var(--ink-3); font-size: 12px; }
.sample { font-size: 11px; line-height: 1; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 4px; padding: 4px 6px; white-space: nowrap; }
.top .grow { flex: 1; }
.search { display: flex; align-items: center; gap: 10px; height: 34px; width: min(340px, 30vw); padding: 0 8px 0 11px; border-radius: 9px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--ink-3); font-size: 13px; text-align: left; transition: box-shadow var(--fast), color var(--fast); }
.search:hover { box-shadow: 0 0 0 1px var(--line-2); color: var(--ink-2); }
.search span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font: 500 11px/1 var(--f-text); color: var(--ink-2); background: var(--bg); border-radius: 5px; padding: 4px 6px; box-shadow: 0 0 0 1px var(--line); white-space: nowrap; }
.asof { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3); white-space: nowrap; padding: 6px 8px; border-radius: var(--r-sm); }
.asof:hover { background: var(--hover); color: var(--ink-2); }
.asof .num { color: var(--ink-2); font-size: 13px; }
.me { display: flex; align-items: center; gap: 9px; white-space: nowrap; padding: 4px 6px 4px 4px; border-radius: 20px; }
.me:hover { background: var(--hover); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--sunken); box-shadow: 0 0 0 1px var(--line-2); display: grid; place-items: center; font: 600 13px/1 var(--f-text); }
.me small { display: block; font-size: 11px; line-height: 1.2; color: var(--ink-3); text-align: left; }
.me b { display: block; font-size: 13px; line-height: 1.25; text-align: left; }
.tabbar { display: none; }

/* 宽屏：内容区随屏幕放宽到 1760px 并居中；顶栏内容与它左右对齐，超宽屏两侧留白对称 */
.page { max-width: var(--page-max); margin-inline: auto; padding: 32px var(--gutter) 80px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 8px; }
.page-title { font: 600 22px/1.3 var(--f-display); letter-spacing: -.01em; }
.page-lede { color: var(--ink-3); font-size: 13px; margin-top: 4px; max-width: 72ch; }
.page-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 区块：压在发丝线上，不是卡片 */
.sec { margin-top: 48px; }
.sec:first-child { margin-top: 0; }
.sec-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line-2); margin-bottom: 14px; }
.sec-h h2 { font: 600 14px/1.4 var(--f-text); }
.sec-h .sec-note { color: var(--ink-3); font-size: 12px; }
.sec-h .sec-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; align-self: center; }
.cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; row-gap: 32px; }
.panel { background: var(--raised); border-radius: var(--r-md); box-shadow: var(--shadow-soft); }
.panel-pad { padding: 20px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }

/* ───────── 原子 ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 9px; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); transition: background-color var(--fast), box-shadow var(--fast), transform var(--fast); }
.btn:hover:not(:disabled) { background: var(--raised); box-shadow: 0 0 0 1px var(--ink-4); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); box-shadow: none; }
.btn-danger { background: var(--critical-solid); color: var(--on-critical); box-shadow: none; }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--critical-solid) 88%, #000); box-shadow: none; }
.btn-ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); box-shadow: none; color: var(--ink); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-lg { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--ink-2); transition: background-color var(--fast), color var(--fast); }
.icon-btn:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; border-radius: 4px; }
.link .ic { width: 14px; height: 14px; color: var(--ink-3); transition: transform var(--fast) var(--ease); }
.link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.link:hover .ic { transform: translateX(2px); color: var(--ink); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 6px; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; color: var(--ink-2); background: var(--idle-soft); }
.badge .ic { width: 13px; height: 13px; }
.badge.tone-critical { color: var(--critical); background: var(--critical-soft); }
.badge.tone-warn { color: var(--warn); background: var(--warn-soft); }
.badge.tone-ok, .badge.tone-good { color: var(--ok); background: var(--ok-soft); }
.badge.tone-info, .badge.tone-accent { color: var(--accent); background: var(--accent-soft); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); flex: none; }
.dot.tone-critical { background: var(--critical); } .dot.tone-warn { background: var(--warn-solid); } .dot.tone-ok { background: var(--ok); } .dot.tone-info { background: var(--accent); }
.dot.tone-none, .dot.tone-wait { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); }

.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px var(--sw-ring); flex: none; vertical-align: -1px; }
.swatch-lg { width: 16px; height: 16px; }
.swatch-row { display: inline-flex; align-items: center; gap: 3px; }
.swatch-more { font-size: 11px; color: var(--ink-3); margin-left: 2px; }
.garment { display: inline-grid; place-items: center; width: var(--gs); height: var(--gs); flex: none; }
.garment svg { width: 100%; height: 100%; }
.garment-body { fill: var(--sw); stroke: var(--sw-ring); stroke-width: 1; stroke-linejoin: round; }
.garment-rib, .garment-knit { fill: none; stroke: rgba(0, 0, 0, .16); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.garment.is-dark .garment-rib, .garment.is-dark .garment-knit { stroke: rgba(255, 255, 255, .22); }

.has-basis { border-bottom: 1px dotted var(--ink-4); cursor: help; border-radius: 2px; }
.nul { color: var(--ink-4); cursor: help; font-family: var(--f-num); padding: 0 2px; border-radius: 3px; }
.nul-approval, .nul-import, .nul-failed { border-bottom: 1px dotted var(--ink-4); }
.cover { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-weight: 600; }
.cover small { font: 400 11px var(--f-text); color: var(--ink-3); }
.cover.tone-critical { color: var(--critical); } .cover.tone-warn { color: var(--warn); }
.trend { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px 0 6px; border-radius: 11px; font-size: 12px; font-weight: 500; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.trend .ic { width: 13px; height: 13px; }
.trend-up { color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent); }
.trend-down { color: var(--ink-3); }
.delta { display: inline-flex; align-items: center; gap: 2px; font: 500 12px var(--f-num); color: var(--ink-3); }
.delta .ic { width: 12px; height: 12px; }
.delta-good { color: var(--ok); } .delta-bad { color: var(--critical); }
.meter { display: inline-block; width: 64px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; vertical-align: middle; }
.meter > span { display: block; height: 100%; border-radius: 2px; background: var(--ink-3); }
.meter.tone-critical > span { background: var(--critical-solid); } .meter.tone-warn > span { background: var(--warn-solid); } .meter.tone-ok > span { background: var(--ok); } .meter.tone-accent > span { background: var(--accent); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--sunken); }
.seg-item { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 12px; color: var(--ink-3); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: color var(--fast), background-color var(--fast); }
.seg-item:hover { color: var(--ink); }
.seg-item.is-on { background: var(--raised); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
.seg-sm .seg-item { height: 24px; padding: 0 9px; font-size: 11px; }
.seg-count, .tab-count { font: 500 11px var(--f-num); color: var(--ink-3); }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; padding: 10px 0 12px; font-size: 14px; color: var(--ink-3); white-space: nowrap; display: inline-flex; align-items: baseline; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); font-weight: 600; }
.tab.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); border-radius: 1px; }

.pcell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pcell-main { min-width: 0; }
.pcell-name { display: block; max-width: 100%; font-weight: 600; font-size: 13px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 3px; }
.pcell-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.pcell-sub { display: flex; gap: 8px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 24px; color: var(--ink-3); }
.empty-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--sunken); margin-bottom: 14px; }
.empty h3 { font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.empty p { font-size: 13px; max-width: 46ch; margin-bottom: 14px; }


/* ───────── 表单 ───────── */
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; height: 36px; padding: 0 11px; border: 0; border-radius: 9px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; transition: box-shadow var(--fast); }
.textarea { height: auto; min-height: 96px; padding: 9px 11px; resize: vertical; font-family: var(--f-num); }
.input:hover, .select:hover, .textarea:hover { box-shadow: inset 0 0 0 1px var(--ink-4); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--accent); border-radius: 9px; }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--critical); }
.field-hint { font-size: 12px; color: var(--ink-3); }
.field-error { font-size: 12px; color: var(--critical); }
.searchbox { display: flex; align-items: center; gap: 8px; height: 34px; min-width: 240px; padding: 0 10px; border-radius: 9px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-3); }
.searchbox:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.searchbox input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: 0; font-size: 13px; color: var(--ink); }
.searchbox .ic { width: 16px; height: 16px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line-2); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--raised); box-shadow: 0 0 0 1.5px var(--ink), 0 1px 3px rgba(0, 0, 0, .2); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-2); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--raised); box-shadow: 0 0 0 1.5px var(--ink); }
input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; vertical-align: -2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 14px; font-size: 12px; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; transition: background-color var(--fast), color var(--fast), box-shadow var(--fast); }
.chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-4); }
.chip.is-on { background: var(--ink); color: var(--bg); box-shadow: none; font-weight: 500; }
.chip .chip-n { font-family: var(--f-num); opacity: .7; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* ───────── 表格 ───────── */
.tbl-wrap { overflow-x: auto; scrollbar-width: thin; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { padding: 8px 12px; text-align: left; font-size: 12px; font-weight: 400; color: var(--ink-3); white-space: nowrap; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl td.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl tbody tr { transition: background-color var(--fast); }
.tbl tbody tr:not(.tbl-detail):hover { background: var(--hover); }
.tbl-compact td { padding: 7px 12px; }
.th-sort { display: inline-flex; align-items: center; gap: 3px; color: inherit; font-size: 12px; border-radius: 4px; }
.th-sort .ic { width: 12px; height: 12px; opacity: 0; transition: opacity var(--fast); }
.th-sort:hover { color: var(--ink); } .th-sort:hover .ic { opacity: .6; }
.th-sort.is-on { color: var(--ink); font-weight: 600; } .th-sort.is-on .ic { opacity: 1; }
th.num .th-sort { flex-direction: row-reverse; }
.tbl-x { width: 28px; padding-right: 0 !important; }
.row-x { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: var(--ink-3); }
.row-x:hover { background: var(--hover); color: var(--ink); }
.row-x .ic { width: 14px; height: 14px; transition: transform var(--fast) var(--ease); }
.row-x[aria-expanded="true"] .ic { transform: rotate(90deg); }
.tbl-detail > td { padding: 4px 0 24px 40px; background: transparent; }
tr.is-open > td { border-bottom-color: transparent; }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; font-size: 12px; color: var(--ink-3); }
.pager { display: inline-flex; align-items: center; gap: 2px; }
.pager-info { font-family: var(--f-num); margin-right: 8px; }
.pager .icon-btn { width: 28px; height: 28px; }

/* ───────── 图表 ───────── */
.chart { position: relative; min-width: 0; }
.chart svg { width: 100%; height: auto; overflow: visible; border-radius: 4px; }
.ch-grid { stroke: var(--chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
.ch-base { stroke: var(--chart-base); }
.ch-tick { font: 11px var(--f-num); fill: var(--ink-3); }
.ch-band { fill: var(--ink); opacity: .04; }
.ch-line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-line.is-muted { stroke: var(--chart-muted); stroke-width: 1.5; }
.ch-area { fill: var(--chart); opacity: .10; stroke: none; }
.ch-end { fill: var(--chart); stroke: var(--bg); stroke-width: 2; }
.ch-partial { fill: var(--bg); stroke: var(--chart); stroke-width: 1.5; }
.ch-partial-seg { stroke: var(--chart); stroke-width: 1.5; opacity: .4; }
.ch-mark { fill: none; stroke: var(--critical); stroke-width: 1.5; }
.ch-event { stroke: var(--ink-3); stroke-width: 1; }
.ch-event-dot { fill: var(--ink-3); }
.ch-cross { stroke: var(--ink-3); stroke-width: 1; }
.ch-dot { fill: var(--chart); stroke: var(--bg); stroke-width: 2; }
.ch-hit { fill: transparent; cursor: crosshair; }
.ch-tip { position: absolute; left: 0; top: 0; z-index: 3; min-width: 132px; padding: 8px 10px; border-radius: 9px; background: var(--raised); box-shadow: var(--shadow-pop); font-size: 12px; pointer-events: none; }
.ch-tip-date { font-family: var(--f-num); color: var(--ink-3); margin-bottom: 3px; }
.ch-tip-row { display: flex; align-items: baseline; gap: 7px; }
.ch-tip-row b { font: 600 15px var(--f-num); }
.ch-tip-row span { color: var(--ink-3); }
.ch-key { display: inline-block; width: 12px; height: 2px; border-radius: 1px; background: var(--chart); align-self: center; }
.ch-key.is-muted { background: var(--chart-muted); }
.ch-tip-note { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); color: var(--ink-2); max-width: 220px; }
.ch-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.ch-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ch-legend .lg-ring { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--critical); }
.ch-legend .lg-hollow { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--chart); }
.ch-legend .lg-event { width: 0; height: 0; border: 4px solid transparent; border-bottom: 6px solid var(--ink-3); border-top: 0; }
.ch-legend .lg-band { width: 12px; height: 10px; background: var(--ink); opacity: .08; border-radius: 2px; }
.spark { overflow: visible; }
.spark-line { fill: none; stroke: var(--chart); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--chart); opacity: .08; }
.spark-end { fill: var(--chart); stroke: var(--bg); stroke-width: 1.5; }
details.data-twin { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
details.data-twin > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; list-style: none; border-radius: 4px; }
details.data-twin > summary::-webkit-details-marker { display: none; }
details.data-twin > summary:hover { color: var(--ink); }
details.data-twin[open] > summary { margin-bottom: 8px; }
details.data-twin .tbl-wrap { max-height: 280px; overflow-y: auto; }

.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 84px minmax(0, 170px); align-items: center; gap: 14px; font-size: 13px; }
.funnel-label { color: var(--ink-2); }
.funnel-bar { height: 22px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.funnel-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--seq); }
.funnel-fill.f1 { opacity: .78; } .funnel-fill.f2 { opacity: .58; } .funnel-fill.f3 { opacity: .42; }
.funnel-val { font: 600 15px var(--f-num); text-align: right; }
.funnel-rate { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.funnel-rate b { font-family: var(--f-num); color: var(--ink); font-size: 13px; }

/* ───────── 颜色 × 尺码矩阵 ───────── */
.mx { display: grid; gap: 3px; font-size: 13px; }
.mx-row { display: grid; grid-template-columns: minmax(96px, 1.3fr) repeat(var(--mx-cols, 3), minmax(44px, 1fr)) minmax(52px, .8fr); gap: 3px; align-items: stretch; }
.mx-head { font-size: 11px; color: var(--ink-3); }
.mx-head .mx-size, .mx-head .mx-sum { text-align: center; padding-bottom: 3px; font-family: var(--f-num); }
.mx-head .mx-sum { text-align: right; font-family: var(--f-text); }
.mx-color { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.mx-color-name { overflow: hidden; text-overflow: ellipsis; }
.mx-flag { font-size: 10px; line-height: 1; padding: 3px 4px; border-radius: 3px; color: var(--critical); background: var(--critical-soft); }
.mx-cell { display: grid; place-items: center; height: 30px; border-radius: 4px; font: 500 13px var(--f-num); font-variant-numeric: tabular-nums; background: var(--heat-4); color: var(--ink-2); cursor: default; }
.mx-cell:focus-visible { outline-offset: 1px; border-radius: 4px; }
.mx-t-critical { background: var(--heat-1); color: var(--heat-1-ink); font-weight: 600; }
.mx-t-high { background: var(--heat-2); color: var(--ink); }
.mx-t-out { background: repeating-linear-gradient(135deg, var(--critical-soft) 0 4px, transparent 4px 8px); color: var(--critical); font: 600 11px var(--f-text); box-shadow: inset 0 0 0 1.5px var(--critical); }
.mx-t-warn { background: var(--heat-3); color: var(--ink); }
.mx-t-ok { background: var(--heat-4); }
.mx-t-idle { background: var(--heat-idle); color: var(--ink-2); }
.mx-t-none, .mx-na { background: transparent; color: var(--ink-4); box-shadow: inset 0 0 0 1px var(--line); }
.mx-seq { background: color-mix(in srgb, var(--seq) calc(var(--lv) * 62% + 5%), var(--surface)); color: var(--ink); }
.mx-seq.mx-hi { color: var(--on-accent); }
.mx-sum { display: flex; align-items: center; justify-content: flex-end; font: 500 13px var(--f-num); color: var(--ink-2); white-space: nowrap; }
.mx-compact .mx-cell { height: 26px; font-size: 12px; }
.mx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 11px; color: var(--ink-3); }
.mx-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mx-key { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.mx-legend-note { flex-basis: 100%; }
.mx-ramp i { display: inline-block; width: 56px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--seq) 5%, var(--surface)), color-mix(in srgb, var(--seq) 67%, var(--surface))); }

/* ───────── 弹层 ───────── */
dialog.ov { padding: 0; border: 0; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-pop); max-width: none; max-height: none; overflow: hidden; }
dialog.ov[open] { display: flex; flex-direction: column; }
dialog.ov::backdrop { background: var(--scrim); backdrop-filter: blur(2px); animation: fade 140ms; }
dialog.ov-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 900px); border-radius: var(--r-lg); margin: auto; animation: rise 160ms var(--ease); }
dialog.ov-dialog.ov-lg { width: min(860px, calc(100vw - 32px)); }
dialog.ov-drawer { width: min(720px, 100vw); height: 100dvh; margin: 0 0 0 auto; border-radius: var(--r-lg) 0 0 var(--r-lg); animation: slide 200ms var(--ease); }
dialog.ov-drawer.ov-lg { width: min(920px, 100vw); }
dialog.ov.is-leaving { opacity: 0; transition: opacity 130ms; }
.ov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 16px 28px; border-bottom: 1px solid var(--line); flex: none; }
.ov-titles h2 { font: 600 18px/1.35 var(--f-display); letter-spacing: -.005em; outline: none; }
.ov-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.ov-body { padding: 22px 28px 28px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; }
.ov-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 28px; border-top: 1px solid var(--line); background: var(--bg); flex: none; font-size: 12px; color: var(--ink-3); }
.ov-foot .grow { flex: 1; }

/* 命令面板 */
dialog.ov-cmd { width: min(620px, calc(100vw - 24px)); margin: 12vh auto auto; border-radius: var(--r-lg); background: var(--raised); animation: rise 140ms var(--ease); }
.cmd-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 56px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.cmd-input input { flex: 1; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); min-width: 0; }
.cmd-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmd-group { padding: 10px 10px 4px; font-size: 11px; color: var(--ink-3); }
.cmd-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; text-align: left; font-size: 14px; }
.cmd-item .ic { color: var(--ink-3); }
.cmd-item .cmd-hint { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; font-family: var(--f-num); }
.cmd-item.is-cur { background: var(--hover); }
.cmd-item.is-cur .ic { color: var(--ink); }
.cmd-foot { display: flex; gap: 14px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-3); }
.cmd-foot span { display: inline-flex; align-items: center; gap: 5px; }

/* 键值清单 / 小统计 */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; font-size: 13px; }
.kv dt { color: var(--ink-3); white-space: nowrap; }
.kv dd { text-align: right; font-family: var(--f-num); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; }
.stat { padding: 2px 20px 2px 0; border-right: 1px solid var(--line); margin-right: 20px; min-width: 0; }
.stat:last-child { border-right: 0; margin-right: 0; }
.stat-label { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.stat-value { font: 600 26px/1.25 var(--f-num); letter-spacing: -.01em; white-space: nowrap; margin-top: 2px; }
.stat-value small { font: 400 12px var(--f-text); color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.stat-sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.stat-sub b { font-family: var(--f-num); color: var(--ink-2); font-weight: 500; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; font-size: 13px; color: var(--ink-2); background: var(--hover); }
.note .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--ink-3); }
.note.tone-warn { background: var(--warn-soft); } .note.tone-warn .ic { color: var(--warn); }
.note.tone-critical { background: var(--critical-soft); } .note.tone-critical .ic { color: var(--critical); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slide { from { opacity: .4; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ───────── 响应式 ───────── */
@media (max-width: 1180px) { :root { --gutter: 28px; } .cols { column-gap: 24px; } .search { width: 220px; } .shop span { display: none; } }
@media (max-width: 860px) {
  :root { --gutter: 16px; --top: 52px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .top { gap: 8px; }
  .search { width: 34px; padding: 0; justify-content: center; background: transparent; box-shadow: none; } .search span, .search kbd { display: none; } .search .ic { width: 18px; height: 18px; color: var(--ink-2); }
  .asof span:not(.num) { display: none; } .me b, .me small { display: none; } .me { padding: 0; }
  .page { padding: 20px var(--gutter) calc(88px + env(safe-area-inset-bottom, 0px)); }
  .sec { margin-top: 36px; }
  .cols { grid-template-columns: minmax(0, 1fr); } .cols > * { grid-column: 1 / -1 !important; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(6, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; border-radius: 10px; font-size: 10px; color: var(--ink-3); position: relative; }
  .tabbar a[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--hover); }
  .tabbar .pip { position: absolute; top: 5px; left: calc(50% + 7px); width: 6px; height: 6px; border-radius: 50%; background: var(--critical); }
  .toasts { left: 12px; right: 12px; width: auto; align-items: stretch; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .toast-wrap { transform: translateY(16px) scale(.98); }
  .toast-wrap.is-leaving { transform: translateY(10px) scale(.98); }
  dialog.ov-drawer { width: 100vw; border-radius: 0; }
  .ov-head { padding: 16px 12px 12px 16px; } .ov-body { padding: 16px; } .ov-foot { padding: 12px 16px; flex-wrap: wrap; }
  .funnel-row { grid-template-columns: 56px minmax(0, 1fr) 70px; } .funnel-rate { grid-column: 2 / -1; margin-top: -6px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; } .stat:nth-child(2n) { border-right: 0; margin-right: 0; }
  .searchbox { min-width: 0; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .rail, .top, .tabbar, .toasts { display: none !important; } .app { display: block; } body { background: #fff; } }

/* ───────── 补充：时效小标 / 参考线 / 矩阵日均列 / 账号 ───────── */
.only-m { display: none; }
.fresh { display: inline-flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; }
.fresh-i { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 400; color: var(--ink-3); white-space: nowrap; border-radius: 4px; }
.fresh-i:hover span { text-decoration: underline; text-underline-offset: 3px; }
.fresh-i .dot { width: 6px; height: 6px; }
.fresh-i.tone-warn { color: var(--warn); } .fresh-i.tone-critical { color: var(--critical); }
.ch-ref { stroke: var(--ink-4); stroke-width: 1; opacity: .7; shape-rendering: crispEdges; }
.ch-ref-t { font: 11px var(--f-text); fill: var(--ink-3); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.mx[data-mode="cover"] .mx-row { grid-template-columns: minmax(96px, 1.3fr) repeat(var(--mx-cols, 3), minmax(44px, 1fr)) minmax(56px, .8fr) minmax(40px, .55fr); }
.mx-daily { display: flex; align-items: center; justify-content: flex-end; font: 12px var(--f-num); color: var(--ink-3); }
.mx-head .mx-daily { font-family: var(--f-text); font-size: 11px; cursor: help; }
.mx-legend, .ch-legend { font-size: 12px; }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv-row dt { font-weight: 500; color: var(--ink); } .kv-row dd { display: flex; align-items: center; gap: 10px; font-family: var(--f-text); font-size: 12px; }
@media (max-width: 860px) { .only-m { display: inline-grid; } }

/* 手机顶栏：店名可截断，“示例数据”始终完整可见 */
.shop { flex: 0 1 auto; }
.shop b { overflow: hidden; text-overflow: ellipsis; }
.sample { flex: none; }
@media (max-width: 520px) { .asof { display: none; } .top { gap: 6px; } }

/* ───────── 构建期反馈的共享层修正 ───────── */
.tbl th.num { text-align: right; font-family: var(--f-text); letter-spacing: 0; }
.tbl .tbl-detail > td { padding: 4px 0 24px 40px; }
.page-lede { max-width: 60em; text-wrap: pretty; }
.select { -webkit-appearance: none; appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.mx-nosum .mx-sum, .mx-nosum .mx-daily { display: none; }
.mx.mx-nosum .mx-row, .mx.mx-nosum[data-mode="cover"] .mx-row { grid-template-columns: minmax(96px, 1.3fr) repeat(var(--mx-cols, 3), minmax(44px, 1fr)); }
.mx-row.is-hl { background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); border-radius: 4px; }
.funnel-sep { color: var(--ink-4); }
.pcell-sub .swatch-row { margin-left: 2px; }

/* ───────── 一致性审查后的修整 ───────── */
.page-lede { font-size: 14px; line-height: 1.7; color: var(--ink-2); margin-top: 6px; }
.page-lede b, .page-lede strong { color: var(--ink); font-weight: 600; }
.page-lede a { text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 4px; }
.page-lede a:hover { text-decoration-color: var(--ink); }
.seg-sm .seg-item { font-size: 12px; color: var(--ink-2); padding: 0 9px; }
.seg-sm .seg-item.is-on { color: var(--ink); }
.swatch-more, .cover small { font-size: 12px; }
.ch-ref-t { font-size: 12px; }
.th-tip { border-bottom: 1px dotted var(--ink-4); }
.btn.is-off { opacity: .45; cursor: not-allowed; }
.btn.is-off:hover { background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); }
.pager-info { white-space: nowrap; }
details.data-twin.is-free .tbl-wrap { max-height: none; overflow-y: visible; }
:root { --sw-ring-dk: var(--sw-ring); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sw-ring-dk: rgba(231, 233, 229, .5); } }
:root[data-theme="dark"] { --sw-ring-dk: rgba(231, 233, 229, .5); }
.garment.is-dark .garment-body { stroke: var(--sw-ring-dk); }
.swatch.is-dark { box-shadow: inset 0 0 0 1px var(--sw-ring-dk); }
@media (max-width: 860px) { .tbl .tbl-detail > td { padding-left: 0; } }

/* p13 */
.toasts.is-in-ov { z-index: 5; }
dialog.ov:has(.ov-foot) > .toasts.is-in-ov { bottom: 84px; }
.t-ok { color: var(--ok); } .t-warn { color: var(--warn); } .t-critical { color: var(--critical); } .t-info { color: var(--accent); } .t-mute { color: var(--ink-3); }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: jx-spin .8s linear infinite; vertical-align: -2px; }
@keyframes jx-spin { to { transform: rotate(360deg); } }
.skel { display: block; border-radius: 6px; background: var(--sunken); animation: jx-skel 1.2s ease-in-out infinite alternate; }
@keyframes jx-skel { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } .skel { animation: none; } }
.field > .seg { justify-self: start; }
/* 宽表在手机上横向滚动时，展开行的内容钉在可视宽度里，不跟着表格滑走 */
@media (max-width: 760px) { .tbl-wrap .tbl-detail > td > * { position: sticky; left: 0; max-width: calc(100vw - 32px); box-sizing: border-box; } }

/* p23：表格次要列在手机上隐藏（columns[].hideOnMobile） */
@media (max-width: 860px) { .tbl .col-hm { display: none; } }

/* p25 */
.top { padding-inline: max(var(--gutter), calc((100% - var(--page-max)) / 2 + var(--gutter))); }
@media (min-width: 1680px) { :root { --gutter: 48px; } }

/* p26：提示条与悬停提示 —— 白底卡片，颜色只给图标；进、出、堆叠都有动效 */
:root { --spring: cubic-bezier(.2, .9, .25, 1.06); --shadow-toast: 0 22px 44px -20px rgba(23, 26, 24, .32), 0 3px 8px -3px rgba(23, 26, 24, .12), 0 0 0 1px var(--line-2); }
.tip { position: fixed; left: 0; top: 0; z-index: 400; max-width: 320px; padding: 8px 11px; border-radius: 10px; background: var(--raised); color: var(--ink-2); font-size: 12px; line-height: 1.55; pointer-events: none; box-shadow: 0 14px 30px -16px rgba(23, 26, 24, .34), 0 0 0 1px var(--line-2); opacity: 0; transform: translateY(4px); transition: opacity 140ms ease, transform 200ms var(--ease); }
.tip.is-below { transform: translateY(-4px); }
.tip.is-in { opacity: 1; transform: none; }
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 350; display: flex; flex-direction: column; align-items: flex-end; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast-wrap { max-width: 100%; max-height: 0; margin-top: 0; opacity: 0; transform: translateX(22px) scale(.98); transition: max-height 340ms var(--spring), margin-top 340ms var(--spring), transform 360ms var(--spring), opacity 200ms ease; }
.toast-wrap.is-in { max-height: 220px; margin-top: 10px; opacity: 1; transform: none; }
.toast-wrap.is-leaving { max-height: 0; margin-top: 0; opacity: 0; transform: translateX(16px) scale(.98); transition: max-height 280ms var(--ease) 60ms, margin-top 280ms var(--ease) 60ms, transform 240ms var(--ease), opacity 160ms ease; }
.toast { position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 11px 10px 12px 13px; border-radius: 14px; background: var(--raised); color: var(--ink); font-size: 13px; line-height: 1.5; box-shadow: var(--shadow-toast); pointer-events: auto; overflow: hidden; }
.toast-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.toast-ic .ic { width: 16px; height: 16px; }
.toast.tone-info .toast-ic { background: var(--accent-soft); color: var(--accent); }
.toast.tone-warn .toast-ic { background: var(--warn-soft); color: var(--warn); }
.toast.tone-critical .toast-ic { background: var(--critical-soft); color: var(--critical); }
.toast-msg { flex: 1 1 auto; min-width: 0; }
.toast-acts { flex: none; display: inline-flex; align-items: center; gap: 2px; margin-left: 2px; padding-left: 8px; border-left: 1px solid var(--line); }
.toast-act { padding: 5px 9px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--accent); white-space: nowrap; text-decoration: none; background: none; border: 0; cursor: pointer; transition: background var(--fast); }
.toast-act:hover, .toast-act:focus-visible { background: var(--accent-soft); }
.toast-x { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 0; background: none; color: var(--ink-3); cursor: pointer; opacity: 0; transition: opacity var(--fast), background var(--fast); }
.toast-x .ic { width: 14px; height: 14px; }
.toast:hover .toast-x, .toast:focus-within .toast-x { opacity: 1; }
.toast-x:hover { background: var(--sunken); color: var(--ink); }
.toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ok); opacity: .55; transform-origin: left center; animation: toast-bar linear forwards; }
.toast.tone-info .toast-bar { background: var(--accent); } .toast.tone-warn .toast-bar { background: var(--warn-solid); } .toast.tone-critical .toast-bar { background: var(--critical); }
.toast:hover .toast-bar, .toast:focus-within .toast-bar { animation-play-state: paused; }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.toast-pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.toast-pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0; animation: toast-ping 1.8s var(--ease) infinite; }
@keyframes toast-ping { 0% { transform: scale(.5); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
@media (hover: none) { .toast-x { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast-wrap, .toast-wrap.is-leaving, .tip { transition: opacity 120ms ease; transform: none; } .toast-bar, .toast-pulse::after { animation: none; } .toast-bar { display: none; } }

/* p26b：弹层进入动效更顺（遮罩渐入、对话框轻微放大、抽屉带回弹地滑入） */
dialog.ov::backdrop { animation: fade 220ms ease; }
dialog.ov-dialog { animation: ov-pop 260ms var(--spring); }
dialog.ov-cmd { animation: ov-pop 220ms var(--spring); }
dialog.ov-drawer { animation: ov-slide 320ms var(--spring); }
@keyframes ov-pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ov-slide { from { opacity: 0; transform: translateX(56px); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@media (max-width: 860px) { dialog.ov-drawer { animation: ov-up 300ms var(--spring); } }
@keyframes ov-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.ov-dialog, dialog.ov-cmd, dialog.ov-drawer { animation: fade 120ms ease; } }
