/* NanoEvent-PAL — v2 组件样式：柔和圆角、面代替线、深色侧栏、像素图标。类名与 app.js 渲染契约一致，未改任何 id/class。 */
:root {
  --ink: var(--ink-1); --muted: var(--ink-2); --soft: var(--ink-3);
  --line: var(--border); --line-strong: color-mix(in srgb, var(--ink-1) 22%, transparent);
  --surface: var(--surface-1); --sidebar: var(--rail-bg); --sidebar-2: var(--rail-active);
  --teal: var(--accent-600); --teal-soft: var(--accent-050); --cyan: var(--trace);
  --green: var(--pass); --green-soft: var(--pass-bg); --amber: var(--warn); --amber-soft: var(--warn-bg);
  --red: var(--fail); --red-soft: var(--fail-bg); --blue: var(--info); --violet: var(--accent-2-700);
  --shadow: var(--shadow-lg);
  --px-hero: none;
  --px-auth: none;
  --px-empty: none;
  --px-drop: none;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ground); }
body { min-width: 320px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; letter-spacing: 0; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-600); text-underline-offset: 3px; }
a:hover { color: var(--accent-700); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent-500) 30%, transparent); }
svg.pixel-icon { image-rendering: pixelated; }

/* ---------- 版式骨架 ---------- */
.app-shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); height: 100vh; overflow: hidden; }
.sidebar { position: relative; height: 100vh; display: flex; flex-direction: column; background: var(--sidebar); color: var(--ink-inv); padding: 16px 14px; }
.brand { min-height: 72px; display: flex; align-items: center; gap: 12px; padding: 10px 10px 22px; }
.brand strong { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.1; white-space: nowrap; color: var(--ink-inv); }
.brand small { display: block; margin-top: 4px; color: var(--rail-item); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-inv); background: var(--rail-active); --px-accent: var(--accent-300); }
.brand-mark svg { width: 36px; height: 36px; }
.brand-mark span { display: none; }
.auth-panel .brand-mark { color: var(--ink-1); background: var(--accent-050); --px-accent: var(--accent-500); }
.nav-list { padding: 0; display: grid; gap: 4px; }
.nav-item { position: relative; min-height: 48px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 0; border-radius: var(--r-md); color: var(--rail-item); background: transparent; text-align: left; font-size: 15px; transition: color .15s, background .15s; --px-accent: var(--accent-300); }
.nav-item:hover { color: var(--ink-inv); background: var(--rail-hover); }
.nav-item:active { background: color-mix(in srgb, var(--rail-hover) 60%, var(--rail-active)); }
.nav-item[aria-current="page"] { color: var(--ink-inv); background: var(--rail-active); font-weight: 600; }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 13px; bottom: 13px; width: 4px; border-radius: 0 3px 3px 0; background: var(--accent-500); }
.nav-item svg { width: 26px; height: 26px; flex: 0 0 26px; }
.sidebar-footer { margin-top: auto; padding: 16px 12px 6px; border-top: 1px solid var(--rail-line); }
.readonly-line { display: flex; align-items: center; gap: 8px; font-size: var(--fs-meta); color: var(--rail-item); --px-accent: var(--accent-300); }
.readonly-line svg { width: 16px; height: 16px; color: var(--rail-item); }
.dataset-version { margin-top: 8px; color: color-mix(in srgb, var(--rail-item) 70%, transparent); font: 10px/1.4 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; overflow-wrap: anywhere; }

.main-area { min-width: 0; height: 100vh; overflow: auto; }
.topbar { min-height: 88px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: var(--s-4); padding: 22px 36px 16px; background: color-mix(in srgb, var(--ground) 86%, transparent); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; }
.breadcrumb { color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.topbar h1 { margin: 0; font-size: var(--fs-h1); line-height: 1.1; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-pill { min-height: 32px; max-width: 220px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: var(--r-pill); color: var(--ink-2); background: var(--surface-1); box-shadow: var(--shadow-card); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--surface-1); color: var(--ink); box-shadow: var(--shadow-card); transition: background .15s, color .15s, transform .12s; }
.icon-button:hover { color: var(--accent-700); background: var(--accent-050); }
.icon-button:active { background: var(--accent-100); transform: scale(.96); }
.icon-button svg { width: 20px; height: 20px; }
.status-pill { min-height: 32px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px 0 12px; border: 0; border-radius: var(--r-pill); font-size: 12.5px; white-space: nowrap; box-shadow: var(--shadow-card); }
.status-pill.neutral { background: var(--surface-1); color: var(--ink-2); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-2-100); }

.view-root { padding: 8px 36px 64px; max-width: 1560px; }
.view-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 16px; margin-bottom: 20px; }
.view-heading h2 { margin: 0; font-size: 22px; }
.view-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.section-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 12px; min-height: 40px; padding: 0 0 6px; }
.section-heading h2, .section-heading h3 { margin: 0; font-size: var(--fs-h2); }
.section-heading h3 { font-size: 16px; }
.section-heading small { color: var(--muted); font-size: 12px; font-style: italic; }

/* ---------- 面板：柔和圆角卡片，无描边 ---------- */
.panel { background: var(--surface-1); border: 0; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-card); padding: 20px 24px 24px; }
.panel + .panel, .panel[style*="margin-top:14px"] { margin-top: 24px !important; }
.panel-body { padding: 10px 0 0; }
.panel > .table-wrap { margin-top: 6px; }
.stack { display: grid; gap: 24px; }

/* ---------- 统计：平实清晰的大数字 ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { min-width: 0; min-height: 138px; padding: 20px 22px 22px; background: var(--surface-1); border: 0; border-radius: var(--r-card); position: relative; overflow: hidden; box-shadow: var(--shadow-card); }
.kpi::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--accent, var(--tab-1)); }
.kpi::after { content: ""; position: absolute; right: -28px; bottom: -28px; width: 96px; height: 96px; border-radius: 50%; background: color-mix(in srgb, var(--accent, var(--tab-1)) 8%, transparent); }
.kpi-top { display: grid; grid-template-columns: minmax(0,1fr) 40px; align-items: center; gap: var(--s-2); min-height: 40px; color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.kpi-top svg { width: 32px; height: 32px; justify-self: center; color: var(--ink-1); --px-accent: var(--accent, var(--tab-1)); }
.kpi-value { margin-top: 14px; font-size: var(--fs-figure); font-weight: 600; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink-1); }
.kpi-detail { margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; position: relative; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 24px; align-items: start; margin-bottom: 24px; }
/* 工作台模块排布：统一 24px 竖向节奏，两列按内容量分配 */
.view-root > .panel[style] { margin-top: 0 !important; }
.view-root > .panel { margin-bottom: 24px; }
.view-root > .panel:last-child { margin-bottom: 0; }
.dashboard-grid:last-child { margin-bottom: 0; }
@media (min-width: 1121px) {
  .dashboard-grid:has(> .panel .branch-bars) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid:has(> .panel .table-wrap) { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); }
}
.branch-bars { display: grid; gap: 16px; }
.branch-row { display: grid; grid-template-columns: minmax(0, 190px) minmax(0,1fr) 70px; gap: 14px; align-items: center; font-size: 13px; }
.branch-track { height: 14px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.branch-fill { min-width: 6px; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent-600), var(--accent-500)); }
.branch-count { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-1); font-weight: 600; }
.gate-list { display: grid; gap: 6px; }
.gate-row { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); }
.gate-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.gate-icon svg { width: 18px; height: 18px; --px-accent: currentColor; }
.gate-icon.passed { color: var(--green); background: var(--green-soft); }
.gate-icon.warning { color: var(--amber); background: var(--amber-soft); }
.gate-icon.blocked { color: var(--red); background: var(--red-soft); }
.gate-name { font-size: 13.5px; font-weight: 600; }
.gate-evidence { margin-top: 2px; color: var(--soft); font-size: 11.5px; }
.gate-value { max-width: 220px; text-align: right; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.risk-list { display: grid; gap: 8px; }
.risk-item { display: grid; grid-template-columns: 6px minmax(0,1fr); gap: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); }
.risk-bar { width: 6px; border-radius: 3px; background: var(--risk, var(--amber)); }
.risk-title { font-size: 14px; font-weight: 600; }
.risk-detail { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.55; }

/* ---------- 如何使用 ---------- */
.guide-hero { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 32px; margin-bottom: 24px; padding: 34px 380px 34px 36px; background: linear-gradient(120deg, var(--surface-1) 45%, var(--accent-050)); border: 0; border-radius: var(--r-card); box-shadow: var(--shadow-card); position: relative; overflow: hidden; }
.guide-hero::after { content: ""; position: absolute; right: 36px; top: 50%; transform: translateY(-50%); width: 336px; height: 144px; pointer-events: none; background: var(--px-hero) center / contain no-repeat; image-rendering: pixelated; }
.guide-hero > div { max-width: 760px; position: relative; z-index: 1; }
.guide-hero h2 { margin: 10px 0 12px; font-size: 34px; line-height: 1.1; letter-spacing: -.02em; }
.guide-hero p { margin: 0; max-width: 640px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.guide-hero .button.primary { flex: 0 0 auto; min-height: 46px; padding: 0 22px; position: relative; z-index: 1; }
.guide-kicker { color: var(--accent-700); font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.guide-panel { position: relative; margin-bottom: 24px; }
.science-flow { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); align-items: stretch; gap: 14px; padding: 14px 0 0; }
.flow-step { position: relative; min-width: 0; padding: 22px 20px 54px; border: 0; border-radius: var(--r-md); background: var(--surface-2); }
.flow-step > svg { width: 48px; height: 48px; margin-top: 2px; color: var(--ink-1); }
.flow-step > svg.lucide-file-up { position: relative; }
.flow-step h3 { margin: 16px 0 8px; font-size: 17px; }
.flow-step p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.flow-number { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-inv); background: var(--accent-500); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.flow-owner { position: absolute; left: 20px; bottom: 18px; display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill); color: var(--ink-2); background: var(--surface-1); font-size: 11.5px; }
.flow-owner.state-ready { color: var(--green); background: var(--green-soft); }
.flow-owner.state-wait { color: var(--amber); background: var(--amber-soft); }
.flow-owner.state-block { color: var(--red); background: var(--red-soft); }
.flow-arrow { display: none; }
.research-flow .flow-number { background: var(--accent-2); }
.guide-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; margin-bottom: 24px; }
.guide-grid > .panel + .panel { margin-top: 0 !important; }
.role-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-guide > div { min-height: 0; padding: 14px 16px; border: 0; border-radius: var(--r-md); background: var(--surface-2); }
.role-guide strong { font-size: 14.5px; }
.role-guide p { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.daily-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guide-action { min-width: 0; min-height: 76px; display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; border: 0; border-radius: var(--r-md); color: var(--ink); background: var(--surface-2); transition: background .15s, transform .12s; }
.guide-action:hover { background: var(--accent-050); }
.guide-action:active { background: var(--accent-100); transform: scale(.99); }
.guide-action > svg { width: 48px; height: 48px; flex: 0 0 auto; color: var(--ink-1); }
.guide-action span, .guide-action strong, .guide-action small { min-width: 0; display: block; }
.guide-action strong { font-size: 14.5px; }
.guide-action small { margin-top: 4px; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.guide-warning, .review-notice { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; padding: 16px 20px; border: 0; border-radius: var(--r-md); background: var(--warn-bg); }
.guide-warning > svg, .review-notice > svg { width: 34px; height: 34px; flex: 0 0 auto; color: var(--amber); --px-accent: var(--amber); }
.guide-warning strong, .review-notice strong { font-size: 14px; }
.guide-warning p, .review-notice p { margin: 5px 0 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.6; }
.review-notice { background: var(--info-bg); }

.review-notice > svg { color: var(--accent-700); --px-accent: var(--accent-500); }
.process-checklist { display: grid; gap: 8px; }
.process-checklist > div { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 14px; align-items: start; padding: 12px 14px; border: 0; border-radius: var(--r-md); background: var(--surface-2); }
.process-checklist > div > svg { width: 30px; height: 30px; margin-top: 1px; color: var(--ink-1); }
.process-checklist > div > span { min-width: 0; display: block; color: var(--ink); }
.process-checklist strong { display: block; font-size: 14px; }
.process-checklist small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.process-checklist p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.data-safety-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px 16px; margin-top: 16px; padding: 16px 18px; border: 0; border-radius: var(--r-md); background: var(--info-bg); }
.data-safety-card > div { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 10px; align-items: start; }
.data-safety-card > div > svg { width: 30px; height: 30px; color: var(--ink-1); }
.data-safety-card strong, .data-safety-card small { display: block; }
.data-safety-card strong { font-size: 14px; }
.data-safety-card small { margin-top: 4px; color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.data-safety-card p { grid-column: 1 / -1; margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.data-safety-card .button { background: var(--surface-1); }

/* ---------- 表单与控件 ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; }
.field { display: grid; gap: 6px; }
.field label, .field > .field-label { color: var(--ink-2); font-size: 12.5px; }
.field > small { color: var(--soft); font-size: 11.5px; line-height: 1.4; }
.input, select, textarea { min-height: 40px; border: 1.5px solid transparent; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); outline: none; padding: 8px 12px; font-size: 14px; caret-color: var(--accent-500); transition: border-color .15s, background .15s; }
.panel .input, .panel select, .panel textarea, .review-form .input, .review-form select, .review-form textarea { background: var(--ground); }
.input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--ink-1) 50%, transparent); opacity: 1; }
.input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--ink-1) 18%, transparent); }
.input:focus, select:focus, textarea:focus { border-color: var(--accent-500); background: var(--surface-1); box-shadow: 0 0 0 3px var(--accent-050); }
textarea { min-height: 88px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.search-box { position: relative; min-width: 280px; }
.search-box svg { width: 18px; height: 18px; position: absolute; left: 12px; top: 11px; color: var(--soft); --px-accent: var(--soft); }
.search-box .input { width: 100%; padding-left: 36px; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 0; border-radius: var(--r-pill); color: var(--ink); background: var(--surface-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s, transform .12s; }
.panel .button:not(.primary), .review-form .button:not(.primary) { background: var(--ground); }
.button:hover { background: color-mix(in srgb, var(--ink-1) 10%, var(--surface-2)); }
.button:active { transform: scale(.98); }
.button.primary { color: var(--ink-inv); background: var(--accent-500); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent-500) 22%, transparent); }
.button.primary:hover { background: var(--accent-600); }
.button.primary:active { background: var(--accent-700); }
.button[aria-pressed="true"] { color: var(--accent-700); background: var(--accent-100) !important; }
.button.danger { color: var(--red); background: var(--red-soft); }
.button:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
.button[aria-busy="true"], form[aria-busy="true"] button[type="submit"] { cursor: progress; }
.button svg { width: 20px; height: 20px; }
.button.primary svg { --px-accent: var(--accent-100); }
.segmented { display: inline-flex; padding: 4px; gap: 2px; border: 0; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.panel .segmented { background: var(--ground); }
.segmented button { min-height: 34px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font-size: 13px; white-space: nowrap; transition: background .15s, color .15s; }
.segmented button:hover { color: var(--ink-1); background: color-mix(in srgb, var(--ink-1) 6%, transparent); }
.segmented button[aria-selected="true"], .segmented button[aria-pressed="true"] { background: var(--accent-500); color: var(--ink-inv); }

/* ---------- 表格：淡行底、无竖线 ---------- */
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
th { position: sticky; top: 0; z-index: 1; height: 40px; padding: 0 12px; text-align: left; color: var(--ink-2); background: var(--surface-1); border-bottom: 1px solid var(--border-soft); white-space: nowrap; font-size: 11px; font-weight: 600; letter-spacing: .06em; }
td { height: 50px; padding: 8px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { background: transparent; transition: background .12s; }
tbody tr:hover td { background: var(--accent-050); }
tbody tr:hover td:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
tbody tr:hover td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover .cell-main { color: var(--accent-700); }
.cell-main { display: block; max-width: 340px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.cell-sub { display: block; max-width: 340px; margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--soft); font-size: 11.5px; }
.mono { font-family: var(--font-mono); font-size: .92em; overflow-wrap: anywhere; word-break: normal; }
.num { font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; max-width: 100%; padding: 2px 11px 2px 9px; border: 0; border-radius: var(--r-pill); background: var(--neutral-bg); color: var(--ink-2); font-size: 11.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; --px-accent: currentColor; }
.badge svg { width: 14px; height: 14px; flex: 0 0 auto; }
.badge code { color: currentColor; font: 9.5px var(--font-mono); font-weight: 400; opacity: .7; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--info-bg); color: var(--info); }
.badge.violet { background: var(--accent-2-100); color: var(--accent-2-700); }
.table-footer { min-height: 44px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 0 0; color: var(--soft); font-size: 12px; }

/* ---------- 图形 ---------- */
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
.scatter-box { min-height: 360px; padding: 16px 0 4px; }
.scatter-box svg { display: block; width: 100%; height: 335px; }
.axis-line { stroke: var(--ink-3); stroke-width: 1; }
.grid-line { stroke: var(--grid); stroke-width: 1; }
.axis-text { fill: var(--ink-2); font-size: 10px; font-family: var(--font-mono); }
.scatter-point { opacity: .8; cursor: pointer; }
.scatter-point:hover { opacity: 1; stroke: var(--ink-1); stroke-width: 1.5; }
.event-side-table { max-height: 405px; overflow: auto; }

.fingerprint-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); gap: 24px; }
.fingerprint-row { display: grid; grid-template-columns: minmax(170px,1.3fr) 120px 90px 90px 110px; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.fingerprint-row:last-child { border-bottom: 0; }
.fingerprint-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.fingerprint-meta { margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.coverage-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.coverage-dot { min-width: 24px; height: 22px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--r-pill); color: var(--muted); background: var(--surface-2); font: 10px var(--font-mono); }
.mixture-form { display: grid; gap: 16px; }
.check-list { display: grid; gap: 6px; }
.check-row { min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: var(--surface-2); font-size: 13px; cursor: pointer; }
.check-row input { accent-color: var(--accent-500); width: 16px; height: 16px; }
.equation { padding: 12px 14px; border: 0; background: var(--surface-2); border-radius: var(--r-sm); font: 12px var(--font-mono); overflow-wrap: anywhere; }
.decision-box { padding: 16px 18px 16px 26px; border-radius: var(--r-md); background: color-mix(in srgb, var(--status, var(--amber)) 10%, var(--surface-1)); position: relative; }
.decision-box::before { content: ""; position: absolute; left: 10px; top: 16px; bottom: 16px; width: 4px; border-radius: 2px; background: var(--status, var(--amber)); }
.decision-box strong { font-size: 15px; }
.decision-box p { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.6; }

/* ---------- 人工复核 ---------- */
.review-layout { display: grid; grid-template-columns: 300px minmax(0,1fr) 330px; min-height: 620px; border: 0; border-radius: var(--r-card); background: var(--surface-1); box-shadow: var(--shadow-card); overflow: hidden; }
.review-queue { background: var(--surface-2); overflow: auto; max-height: 720px; padding: 10px; }
.queue-item { width: 100%; margin-bottom: 4px; padding: 12px 14px; display: block; border: 0; border-radius: var(--r-md); background: transparent; text-align: left; transition: background .12s; }
.queue-item:hover { background: color-mix(in srgb, var(--ink-1) 5%, transparent); }
.queue-item[aria-pressed="true"] { background: var(--surface-1); box-shadow: var(--shadow-card); }
.queue-item[aria-pressed="true"] strong { color: var(--accent-700); }
.queue-item strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.review-main { min-width: 0; padding: 22px 26px; }
.review-form { padding: 22px 24px; background: var(--surface-1); border-left: 1px solid var(--border-soft); }
.validity-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.validity-option { min-height: 54px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1.5px solid transparent; border-radius: var(--r-md); background: var(--ground); font-size: 13px; cursor: pointer; transition: border-color .12s, background .12s; }
.validity-option:hover { background: var(--surface-2); }
.validity-option:has(input:checked) { border-color: var(--accent-500); background: var(--accent-050); color: var(--accent-700); font-weight: 600; }
.validity-option input { accent-color: var(--accent-500); }
.waveform-shell { height: 370px; border: 0; background: var(--ground) linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% 46px, var(--ground) linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 60px 100%; background-color: var(--ground); border-radius: var(--r-md); overflow: hidden; position: relative; }
.waveform-shell svg { width: 100%; height: 100%; display: block; position: relative; }
.wave-line { fill: none; stroke: var(--trace); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.event-window { fill: var(--trace-band); opacity: var(--area-op); }
.review-shortcuts { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 16px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.submit-status { margin-top: 10px; min-height: 20px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.submit-status.success-state { padding: 10px 14px; border-radius: var(--r-md); color: var(--green); background: var(--green-soft); }
kbd { min-width: 24px; display: inline-grid; place-items: center; padding: 2px 7px; border: 0; border-radius: 6px; background: var(--surface-1); color: var(--ink); box-shadow: 0 1px 0 var(--surface-3), 0 0 0 1px var(--border-soft); font: 10.5px var(--font-mono); }

.wave-empty { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; text-align: center; padding: 24px; position: relative; }
.wave-empty::before { content: ""; position: absolute; left: 48px; right: 24px; top: 50%; height: 1px; background: var(--ink-3); opacity: .5; }
.wave-empty::after { content: "nA"; position: absolute; left: 12px; top: 12px; color: var(--ink-3); font: 10px var(--font-mono); }
.wave-empty > * { position: relative; background: var(--ground); padding: 6px 12px; border-radius: var(--r-sm); }
.continuous-review-status { margin-bottom: 24px; }
.reviewer-actions { justify-content: end; }
.reviewer-actions .button { width: 100%; }
.continuous-counts { margin: 16px 0 0; }
.continuous-review-layout { grid-template-columns: 270px minmax(0,1fr) 360px; }
.continuous-wave { height: 410px; }
.continuous-wave-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.zoom-fields { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; }
.zoom-fields label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.zoom-fields .input { width: 112px; min-width: 0; font-family: var(--font-mono); font-size: 12px; }
.window-annotations { display: grid; gap: 10px; max-height: 390px; overflow: auto; }
.window-annotations.disabled-annotations { opacity: .4; }
.window-annotation-row { padding: 14px; border: 0; border-radius: var(--r-md); background: var(--ground); }
.annotation-row-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: var(--s-2); margin-bottom: 10px; }
.annotation-row-head strong { font-size: 13px; }
.annotation-row-head .icon-button { width: 28px; height: 28px; box-shadow: none; }
.annotation-row-head .icon-button svg { width: 12px; height: 12px; }

/* ---------- 上传与分析 ---------- */
.intake-layout { display: grid; grid-template-columns: minmax(380px,.75fr) minmax(0,1.25fr); gap: 24px; }
.compact-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.compact-kpis .kpi { min-height: 108px; }
.compact-kpis .kpi-value { font-size: 26px; overflow-wrap: anywhere; }
.upload-zone { width: 100%; min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; padding: 18px 20px 22px; border: 2px dashed color-mix(in srgb, var(--accent-500) 45%, transparent); border-radius: var(--r-card); background: var(--accent-050); color: var(--ink); cursor: pointer; position: relative; overflow: hidden; transition: border-color .15s, background-color .15s, transform .12s; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--accent-500); background-color: var(--accent-100); border-style: solid; }
.upload-zone:active { transform: scale(.995); }
.upload-zone > svg { display: none; }
.upload-zone::before { content: ""; width: 98px; height: 77px; margin: 0 auto 10px; background: var(--px-drop) center / contain no-repeat; image-rendering: pixelated; }
.upload-zone.compact::before { width: 56px; height: 44px; }
.upload-zone strong { font-size: 15px; position: relative; }
.upload-zone span { color: var(--ink-2); font-size: 12px; position: relative; text-align: center; }
.upload-zone:disabled { cursor: not-allowed; opacity: .5; }
.upload-zone.compact { min-height: 130px; padding-top: 14px; }
.upload-progress { height: 6px; margin: 14px 0; overflow: hidden; border-radius: var(--r-pill); background: var(--surface-2); }
.upload-progress span { display: block; width: 0; height: 100%; border-radius: var(--r-pill); background: var(--accent-500); transition: width .25s; }
#abfSubmit, #npzSubmit, #noteSubmit { margin-top: 16px; width: 100%; }
.intake-fields { margin-top: 20px; }
/* 标签换行时，同一行的控件仍保持同一顶边 */
.intake-fields > .field { align-content: start; }
.intake-fields > .field > label { height: 32px; display: flex; align-items: flex-end; line-height: 16px; overflow: hidden; }
.intake-fields > .field > .input, .intake-fields > .field > select { align-self: start; height: 40px; }
.intake-fields > .field > textarea { min-height: 88px; }
#abfSubmit > svg { display: none; }
.job-status { min-height: 30px; display: flex; align-items: center; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.error-text { color: var(--red); }
.compact-empty { min-height: 90px; }
.advanced-import { margin-top: 24px; padding: 0 24px; }
.advanced-import summary { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 0; cursor: pointer; font-size: 14px; font-weight: 600; list-style: none; }
.advanced-import summary::-webkit-details-marker { display: none; }
.advanced-import summary::after { content: "展开"; margin-left: auto; color: var(--soft); font-size: 12px; font-weight: 400; }
.advanced-import[open] summary::after { content: "收起"; }
.advanced-import[open] { padding-bottom: 24px; }
.advanced-import summary svg { width: 22px; height: 22px; color: var(--ink-1); }
.directive-list { display: grid; gap: 10px; }
.directive-card { padding: 14px; border: 0; border-radius: var(--r-md); background: var(--surface-2); }
.directive-card blockquote { margin: 8px 0; padding: 8px 14px; border-left: 3px solid var(--accent-500); border-radius: 2px; background: transparent; font-size: 13px; font-style: italic; line-height: 1.6; }
.directive-card small { color: var(--muted); font-size: 11.5px; }
.mini-event-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.mini-event-list button { min-width: 0; padding: 10px 12px; text-align: left; border: 1.5px solid transparent; border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; transition: border-color .12s, background .12s; }
.mini-event-list button:hover { background: var(--accent-050); }
.mini-event-list button[aria-pressed="true"] { border-color: var(--accent-500); background: var(--accent-050); }
.mini-event-list strong, .mini-event-list span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.mini-event-list span { margin-top: 3px; color: var(--muted); font-variant-numeric: tabular-nums; }
.compact-heading { margin-top: 26px; padding: 0 0 8px; }
.task-list { display: grid; gap: 10px; padding: 12px 0 0; }
.task-list.compact { padding: 0; }
.task-card { padding: 14px 16px; border: 0; border-radius: var(--r-md); background: var(--surface-2); }
.task-card .task-top, .task-card > div:first-child { display: flex; align-items: center; gap: 10px; }
.task-card strong { font-size: 14px; }
.task-card p { margin: 10px 0 6px; font-size: 13px; line-height: 1.55; }
.task-card small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.task-card .button { margin-top: 12px; }
.assistant-answer { padding: 14px 18px; border-radius: var(--r-md); background: var(--accent-050); font-size: 13.5px; line-height: 1.7; }
.api-row { margin-top: 16px; border: 0; }

/* ---------- 登录 ---------- */
.auth-overlay { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 28px; padding: max(24px, 5vh) 24px 40px; overflow: auto; background: var(--ground); }
.auth-overlay::before { content: ""; flex: 0 0 auto; width: min(840px, 88vw); aspect-ratio: 224 / 96; pointer-events: none; background: var(--px-auth) center / contain no-repeat; image-rendering: pixelated; }
.auth-overlay[hidden] { display: none; }
.auth-panel { position: relative; width: min(430px,100%); padding: 34px 34px 30px; border: 0; border-radius: 24px; background: var(--surface-1); box-shadow: var(--shadow-lg); margin-top: 0; }
.auth-panel .brand-mark { margin-bottom: 18px; }
.auth-panel h2 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.auth-intro { margin: 8px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); }
.auth-tabs button { min-height: 36px; border: 0; border-radius: var(--r-pill); color: var(--ink-2); background: transparent; font-size: 13px; }
.auth-tabs button[aria-selected="true"] { color: var(--ink-inv); background: var(--accent-500); font-weight: 600; }
.auth-panel form { display: grid; gap: 14px; }
.auth-panel form[hidden] { display: none; }
.auth-panel .field label { letter-spacing: .12em; font-size: 10.5px; }
.auth-panel .button { width: 100%; margin-top: 18px; }
.auth-panel .error-state { min-height: 0; margin-top: 14px; padding: 10px 14px; }
.auth-note { margin: -2px 0 0; color: var(--soft); font-size: 11.5px; line-height: 1.5; text-align: center; }
.auth-message { margin-top: 14px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--green-soft); color: var(--green); font-size: 12.5px; line-height: 1.55; }
.service-login { margin-top: 20px; border-top: 1px solid var(--border-soft); padding-top: 14px; }
.service-login summary { color: var(--soft); cursor: pointer; font-size: 11.5px; text-align: center; }
.service-login form { margin-top: 14px; }
.service-login .button { margin-top: 4px; }
.account-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-actions .button { min-height: 34px; padding: 0 13px; font-size: 12px; }
.form-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px 16px; }
.field .input, .field select, .field textarea, .form-grid .input, .form-grid select, .form-grid textarea { width: 100%; min-width: 0; }
.form-grid .wide { grid-column: 1 / -1; }
.relation-list { display: grid; gap: 8px; }
.relation-row { display: grid; grid-template-columns: 60px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 0; border-radius: var(--r-md); background: var(--surface-2); }
.relation-score { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--accent-700); }
.relation-path { font: 12px var(--font-mono); font-weight: 600; overflow-wrap: anywhere; word-break: normal; }
.relation-reason { margin-top: 4px; color: var(--muted); font-size: 11.5px; }

/* ---------- 详情表与技术信息 ---------- */
.detail-grid { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 0; border-radius: var(--r-md); background: var(--surface-2); padding: 6px 16px; }
.detail-grid dt, .detail-grid dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; overflow-wrap: anywhere; }
.detail-grid dt:nth-last-of-type(1), .detail-grid dd:last-of-type { border-bottom: 0; }
.detail-grid dt { color: var(--muted); padding-right: 14px; }
.detail-grid dd { color: var(--ink); }
.panel .detail-grid, .review-main .detail-grid { background: var(--ground); }
.technical-details { margin-top: 14px; border: 0; border-radius: var(--r-md); background: transparent; }
.technical-details > summary, .technical-panel > summary { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 4px; color: var(--muted); cursor: pointer; font-size: 12.5px; list-style: none; border-radius: var(--r-sm); }
.technical-details > summary:hover, .technical-panel > summary:hover { color: var(--ink-1); }
.technical-details > summary::-webkit-details-marker, .technical-panel > summary::-webkit-details-marker { display: none; }
.technical-details > summary::after, .technical-panel > summary::after { content: "展开"; margin-left: auto; color: var(--soft); font-size: 11.5px; }
.technical-details[open] > summary::after, .technical-panel[open] > summary::after { content: "收起"; }
.technical-details > summary svg, .technical-panel > summary svg { width: 18px; height: 18px; color: var(--soft); --px-accent: var(--soft); }
.technical-details > .detail-grid { margin: 6px 0 4px; }

/* ---------- 科学状态 ---------- */
.science-summary { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 24px; padding: 24px 28px; border: 0; border-radius: var(--r-card); background: var(--warn-bg); }
.science-summary.ready { background: var(--pass-bg); }
.science-summary > svg { width: 36px; height: 36px; flex: 0 0 auto; color: var(--ink-1); --px-accent: var(--amber); margin-top: 4px; }
.science-summary.ready > svg { --px-accent: var(--green); }
.science-summary strong { font-size: 21px; letter-spacing: -.015em; }
.science-summary p { margin: 8px 0 0; max-width: 760px; color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.evidence-ladder { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.evidence-step { position: relative; display: grid; grid-template-columns: 36px minmax(0,1fr); grid-template-rows: auto auto; column-gap: 12px; align-content: start; padding: 22px 22px 20px; border: 0; border-radius: var(--r-card); background: var(--surface-1); box-shadow: var(--shadow-card); overflow: hidden; }
.evidence-step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--warn); }
.evidence-step.complete::before { background: var(--green); }
.evidence-step > span { grid-row: 1; grid-column: 1; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-inv); background: var(--warn); font-size: 15px; font-weight: 600; }
.evidence-step.complete > span { background: var(--green); }
.evidence-step > svg { grid-row: 1; grid-column: 2; width: 30px; height: 30px; color: var(--ink-1); align-self: center; justify-self: end; }
.evidence-step > div { grid-row: 2; grid-column: 1 / -1; margin-top: 18px; }
.evidence-step small { color: var(--accent-700); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.evidence-step h3 { margin: 8px 0 10px; font-size: 16.5px; line-height: 1.35; }
.evidence-step p { min-height: 72px; margin: 0 0 12px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.science-actions { grid-template-columns: minmax(0,1.25fr) minmax(310px,.75fr); }
.next-action-list { margin: 0; padding-left: 26px; display: grid; gap: 14px; }
.next-action-list li { padding-left: 6px; font-size: 13px; }
.next-action-list li::marker { font-weight: 600; color: var(--accent-500); }
.next-action-list strong, .next-action-list span { display: block; }
.next-action-list strong { font-size: 15px; }
.next-action-list span { margin-top: 4px; color: var(--muted); line-height: 1.6; }
.science-actions .daily-actions { display: flex; margin-top: 22px; }
.frozen-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.frozen-results article h3 { margin: 0 0 10px; font-size: 15px; }
.technical-panel { background: var(--surface-1); }
.technical-panel > summary { min-height: 44px; padding: 0; font-size: 14px; }
.technical-panel > .panel-body { border-top: 0; }
.technical-panel > .panel-body > p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.evidence-block { margin-top: 14px; padding: 14px 18px; border-radius: var(--r-md); background: var(--accent-050); color: var(--ink-2); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.evidence-block strong { color: var(--ink); }
.source-list { display: grid; gap: 6px; }
.source-row { display: grid; grid-template-columns: 36px minmax(0,1fr) 140px 80px; gap: 12px; align-items: center; min-height: 60px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-2); }
.source-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-1); background: var(--surface-1); border-radius: 50%; }
.source-icon svg { width: 20px; height: 20px; }
.source-name { font-size: 14px; font-weight: 600; }
.source-path { margin-top: 4px; color: var(--muted); font: 11px var(--font-mono); overflow-wrap: anywhere; word-break: normal; }
.preview-pre { margin: 0; padding: 16px; max-height: 620px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; font: 11.5px/1.6 var(--font-mono); background: var(--surface-2); border-radius: var(--r-md); }

/* ---------- 抽屉、对话框、提示 ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: var(--rail-bg); opacity: .45; }
.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 70; width: min(640px, 92vw); display: flex; flex-direction: column; background: var(--surface-1); border: 0; border-radius: 22px; box-shadow: var(--shadow-lg); transform: translateX(104%); transition: transform .24s cubic-bezier(.2,.7,.2,1); overflow: hidden; }
.drawer[hidden] { display: none; }
.drawer.open { transform: translateX(0); }
.drawer-header { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: var(--s-3); padding: 26px 30px 14px; border-bottom: 1px solid var(--border-soft); }
.drawer-header small { color: var(--accent-700); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.drawer-header h2 { margin: 6px 0 0; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 23px; letter-spacing: -.02em; }
.drawer-header .icon-button { background: var(--surface-2); box-shadow: none; }
.drawer-body { flex: 1; min-height: 0; padding: 8px 30px 40px; overflow: auto; }
.confirm-dialog { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 22px; color: var(--ink); background: var(--surface-1); box-shadow: var(--shadow-lg); }
.confirm-dialog::backdrop { background: color-mix(in srgb, #1f2a35 55%, transparent); backdrop-filter: blur(3px); }
.confirm-dialog-head { display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 14px; padding: 26px 28px 12px; }
.confirm-dialog-head small { color: var(--accent-700); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.confirm-dialog-head h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.02em; }
.confirm-dialog-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-1); background: var(--accent-050); }
.confirm-dialog-icon svg { width: 26px; height: 26px; }
.confirm-dialog-body { padding: 12px 28px 8px; }
.confirm-dialog-body .detail-grid { margin: 0; }
.confirm-dialog-notice { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 10px; margin-top: 14px; padding: 12px 14px; border: 0; border-radius: var(--r-md); background: var(--info-bg); }
.confirm-dialog-notice svg { width: 20px; height: 20px; color: var(--accent-700); }
.confirm-dialog-notice p { margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.6; }
.confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 28px 26px; }
.toast { position: fixed; right: 28px; bottom: 28px; z-index: 100; max-width: 440px; padding: 13px 18px; border: 0; border-radius: var(--r-md); color: var(--ink-inv); background: var(--rail-bg); box-shadow: var(--shadow-lg); font-size: 13px; }

.loading-state, .empty-state { min-height: 240px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--surface-3); border-top-color: var(--accent-500); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { padding: 14px 18px; border: 0; border-radius: var(--r-md); color: var(--red); background: var(--red-soft); font-size: 13px; }
.download-status { margin-top: 8px; padding: 10px 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1360px) {
  .app-shell { grid-template-columns: 212px minmax(0,1fr); }
  .brand strong { font-size: 16px; }
  .view-root, .topbar { padding-inline: 24px; }
  .review-layout { grid-template-columns: 260px minmax(0,1fr) 300px; }
  .guide-hero { padding-right: 260px; }
  .guide-hero::after { width: 216px; height: 120px; right: 20px; }
}
@media (max-width: 1120px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid, .fingerprint-grid { grid-template-columns: 1fr; }
  .review-layout { grid-template-columns: 240px minmax(0,1fr); }
  .continuous-review-layout { grid-template-columns: 240px minmax(0,1fr); }
  .review-form { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border-soft); }
  .event-layout { grid-template-columns: 1fr; }
  .evidence-ladder, .science-flow { grid-template-columns: 1fr 1fr; }
  .frozen-results { grid-template-columns: 1fr; }
  .intake-layout { grid-template-columns: 1fr; }
  /* 「如何使用」两块面板在窄视口里并排会把卡片压到一字一行：改为单列 */
  .guide-grid, .role-guide, .daily-actions { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 72px minmax(0,1fr); }
  .sidebar { padding: 12px 8px; }
  .brand { min-height: 60px; justify-content: center; padding: 8px 0 14px; }
  .brand > div:last-child, .nav-item span, .sidebar-footer { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item[aria-current="page"]::before { left: -8px; }
  .topbar { min-height: 72px; padding: 14px 16px 10px; }
  .topbar h1 { font-size: 24px; }
  .topbar .status-pill { display: none; }
  .view-root { padding: 6px 16px 40px; }
  .science-flow { grid-template-columns: 1fr; gap: 10px; }
  .evidence-ladder { grid-template-columns: 1fr 1fr; }
  .guide-hero { padding-right: 36px; }
  .guide-hero::after { display: none; }
}
@media (max-width: 600px) {
  .topbar h1 { font-size: 22px; }
  .breadcrumb { max-width: 240px; overflow-wrap: anywhere; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { min-height: 100px; padding: 16px; }
  .kpi-value { font-size: 28px; }
  .intake-layout, .review-layout { grid-template-columns: 1fr; }
  .continuous-wave-controls { align-items: flex-start; }
  .zoom-fields { flex-direction: column; align-items: stretch; }
  .zoom-fields label { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  .zoom-fields .input { width: 150px; }
  .review-queue { max-height: 260px; }
  .review-main { padding: 16px; }
  .review-form { grid-column: auto; }
  .fingerprint-row { grid-template-columns: minmax(150px,1fr) 100px 80px; }
  .fingerprint-row > :nth-child(4), .fingerprint-row > :nth-child(5) { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .branch-row { grid-template-columns: 120px minmax(0,1fr) 55px; }
  .search-box { min-width: 100%; }
  .mini-event-list { grid-template-columns: 1fr; }
  .guide-hero { display: block; padding: 24px; }
  .guide-hero h2 { font-size: 26px; }
  .guide-hero .button { width: 100%; margin-top: 20px; }
  .guide-grid, .role-guide, .daily-actions, .evidence-ladder { grid-template-columns: 1fr; }
  .evidence-step p { min-height: 0; }
  .science-actions .daily-actions { display: grid; }
  .data-safety-card { grid-template-columns: 1fr; }
  .data-safety-card .button { width: 100%; }
  .confirm-dialog-actions { display: grid; grid-template-columns: 1fr; }
  .confirm-dialog-actions .button { width: 100%; }
  .drawer { top: 0; right: 0; bottom: 0; border-radius: 0; }
}
@media (max-width: 360px) {
  .kpi-grid, .compact-kpis { grid-template-columns: 1fr; }
  .kpi { min-height: 108px; }
  .kpi-value, .compact-kpis .kpi-value { font-size: 26px; line-height: 1.08; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
