/* 博物馆进销存 — 介面 v4：仿 Lumina Minimalist Modern。
   米白底、深藏青文字、单一电光蓝强调；衬线大标题＋蓝色强调字；等宽大写小标签；
   白卡细边框＋柔和阴影；渐层图示方块；深色数据带；桌面顶部悬浮导览、手机底部导览。
   表单、库存、价格、审核与报表一律实底；仅导览使用半透明。浅色预设，深色可切换。 */
:root, html[data-theme="light"] {
  --bg: #fafafa;
  --fg: #0f172a;               /* 正文与标题 */
  --ink: #0f172a;
  --ink-strong: #0f172a;
  --muted: #55627a;            /* 次要文字，对白底 ≥ 5.9:1 */
  --muted-bg: #f1f5f9;
  --line: #e2e8f0;             /* 卡片细边框 */
  --line-strong: #8391a7;      /* 必要控件边界，对白底 ≥ 3:1 */
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --accent: #0052ff;           /* 单一强调色：链接、强调字、焦点 */
  --accent-2: #4d7cff;
  --accent-ink: #0047de;       /* 小字强调（对淡蓝底仍 ≥ 4.5:1） */
  --accent-soft: rgba(0, 82, 255, 0.06);
  --accent-line: rgba(0, 82, 255, 0.28);
  --primary-grad: linear-gradient(90deg, #0052ff 0%, #2f64ff 100%); /* 白字两端皆 ≥ 4.5:1 */
  --icon-grad: linear-gradient(135deg, #0052ff 0%, #4d7cff 100%);
  --primary-ink: #ffffff;
  --sel-bg: #eef3ff;
  --sel-ink: #0a3bb8;
  --sel-line: #b9cbff;
  --band-bg: #0f172a;          /* 深色数据带 */
  --band-ink: #f1f5f9;
  --band-muted: #a3b0c6;
  --band-line: #26324a;
  --band-accent: #7ea2ff;
  --danger: #b3261e; --danger-soft: #fdeceb; --danger-line: #f0b4b0; --danger-ink: #7d1a14;
  --warn: #7a4a00;   --warn-soft: #fff6e0;   --warn-line: #ecd096;   --warn-ink: #5c3800;
  --ok: #1b6b2f;     --ok-soft: #e8f6ec;     --ok-line: #b5ddc0;     --ok-ink: #134d22;
  --info-soft: #f2f6ff; --info-line: #c9d8ff; --info-ink: #10307a;
  --glass: rgba(255, 255, 255, 0.86);
  --glass-solid: #ffffff;
  --glass-border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
  --icon-glow: 0 6px 16px rgba(0, 82, 255, 0.32);
  --focus: #0052ff;
  --toast-bg: #0f172a; --toast-ink: #ffffff;
  --skeleton-a: #eef2f7; --skeleton-b: #f8fafc;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0b1020;
  --fg: #e2e8f0;
  --ink: #e2e8f0;
  --ink-strong: #f8fafc;
  --muted: #a3b0c6;
  --muted-bg: #131a2c;
  --line: #222c42;
  --line-strong: #6b7891;
  --surface: #111829;
  --surface-2: #151d31;
  --accent: #7ea2ff;
  --accent-2: #9db8ff;
  --accent-ink: #9db8ff;
  --accent-soft: rgba(126, 162, 255, 0.08);
  --accent-line: rgba(126, 162, 255, 0.32);
  --primary-grad: linear-gradient(90deg, #0052ff 0%, #2f64ff 100%);
  --icon-grad: linear-gradient(135deg, #0052ff 0%, #4d7cff 100%);
  --primary-ink: #ffffff;
  --sel-bg: rgba(126, 162, 255, 0.16);
  --sel-ink: #dbe5ff;
  --sel-line: #45588f;
  --band-bg: #060a16;
  --band-ink: #f1f5f9;
  --band-muted: #a3b0c6;
  --band-line: #1c2640;
  --band-accent: #8fb0ff;
  --danger: #ff8f86; --danger-soft: #3a2022; --danger-line: #6b3236; --danger-ink: #ffd2ce;
  --warn: #f2c56a;   --warn-soft: #33290f;   --warn-line: #5c4a1c;   --warn-ink: #ffe3a8;
  --ok: #82d99c;     --ok-soft: #16301f;     --ok-line: #2c5a3a;     --ok-ink: #c8f2d4;
  --info-soft: #17213b; --info-line: #33467a; --info-ink: #d3ddff;
  --glass: rgba(17, 24, 41, 0.86);
  --glass-solid: #111829;
  --glass-border: #222c42;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.45);
  --icon-glow: 0 6px 16px rgba(0, 82, 255, 0.35);
  --focus: #7ea2ff;
  --toast-bg: #e2e8f0; --toast-ink: #0b1020;
  --skeleton-a: #151d31; --skeleton-b: #1b2440;
  color-scheme: dark;
}
:root {
  --r-input: 12px;
  --r-card: 16px;
  --tap: 48px;
  --nav-h: 72px;
  --t: 150ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --serif: "Calistoga", Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font-family: var(--sans); line-height: 1.55; -webkit-text-size-adjust: 100%; overflow-x: hidden; min-height: 100dvh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--surface); color: var(--fg); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- 顶部：手机为简洁标题列；桌面为悬浮胶囊导览 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; min-height: 56px; color: var(--fg);
  background: var(--glass); border-bottom: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
}
.logo { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--icon-grad); box-shadow: var(--icon-glow); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.logo::after { content: ""; width: 10px; height: 10px; border-radius: 3px; background: #fff; }
.topbar .brand { font-weight: 600; font-size: 1rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--ink-strong); }
.topbar .who { font-size: .875rem; color: var(--muted); max-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: none; }
.back { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); margin-left: -12px; color: var(--fg); text-decoration: none; font-size: 1.5rem; border-radius: 50%; }

main { max-width: 760px; margin: 0 auto; padding: 20px 16px calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); }
main:focus { outline: none; }

/* ---------- 文字层级 ---------- */
h1 { font-family: var(--serif); font-weight: 400; font-size: 1.85rem; line-height: 1.15; letter-spacing: -0.01em; margin: 6px 0 14px; color: var(--ink-strong); }
h2 { font-size: 1.05rem; font-weight: 600; margin: 24px 0 10px; color: var(--ink-strong); }
h3 { font-size: 1rem; margin: 0 0 6px; }
p { margin: 6px 0; }
.em { color: var(--accent-ink); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
/* 等宽大写小标签（Lumina eyebrow） */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kicker { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }

/* ---------- 首页：hero、数据带、能力卡 ---------- */
.hero { position: relative; padding: 12px 0 28px; }
.hero h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); margin: 16px 0 12px; }
.hero .lead { color: var(--muted); font-size: 1.02rem; max-width: 34em; margin: 0 0 20px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-art { display: none; }
.band { background: var(--band-bg); color: var(--band-ink); border-radius: 20px; padding: 24px 20px; margin: 4px 0 28px; position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 82, 255, 0.35), transparent); pointer-events: none; }
.band .kicker { color: var(--band-muted); }
.band h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; color: var(--band-ink); margin: 10px 0 18px; }
.band h2 .em { color: var(--band-accent); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; position: relative; z-index: 1; }
.stat { padding: 12px 14px; border-left: 1px solid var(--band-line); text-decoration: none; color: inherit; }
.stat:nth-child(odd) { border-left: 0; padding-left: 0; }
.stat .v { font-family: var(--serif); font-size: 2rem; line-height: 1.1; color: var(--band-ink); font-variant-numeric: tabular-nums; }
.stat .v .u { color: var(--band-accent); font-size: 1.1rem; margin-left: 2px; }
.stat .l { color: var(--band-muted); font-size: .85rem; margin-top: 4px; }
a.stat:hover .v { color: #fff; }
.section-h { margin: 28px 0 14px; }
.section-h h2 { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; margin: 10px 0 4px; }
.section-h p { color: var(--muted); margin: 0; }

.canvas { display: grid; gap: 16px; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 18px 20px; box-shadow: var(--shadow-md); }
.group > .group-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; font-size: 1rem; font-weight: 600; color: var(--ink-strong); }
.group > .group-h .muted { font-weight: 400; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }

/* 实底卡片：库存、表单、审核明细、报表 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow-md); }
.card + .card { margin-top: 14px; }
.card.flat { box-shadow: none; background: var(--surface-2); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-input); padding: 14px; box-shadow: var(--shadow-sm); }
.kpi .label { color: var(--muted); font-size: .8rem; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.kpi .value { font-family: var(--serif); font-size: 1.6rem; color: var(--ink-strong); font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi.accent { border-color: var(--sel-line); background: var(--sel-bg); }
.kpi.accent .label { color: var(--sel-ink); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 6px; min-height: var(--tap); color: inherit; text-decoration: none; border-radius: 10px; transition: background-color var(--t) var(--ease); }
a.item:hover { background: var(--sel-bg); }
.item .main { flex: 1; min-width: 0; }
.item .title { font-weight: 600; overflow-wrap: anywhere; }
.item .meta { color: var(--muted); font-size: .875rem; }
.item .end { text-align: right; font-variant-numeric: tabular-nums; }
.item .end strong { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; }
.chev::after { content: "›"; color: var(--muted); font-size: 1.4rem; padding-left: 4px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.b-pending { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn-line); }
.b-posted { background: var(--ok-soft); color: var(--ok-ink); border-color: var(--ok-line); }
.b-rejected { background: var(--danger-soft); color: var(--danger-ink); border-color: var(--danger-line); }
.b-info { background: var(--info-soft); color: var(--info-ink); border-color: var(--info-line); }
.b-neutral { background: var(--muted-bg); color: var(--muted); border-color: var(--line); }

/* ---------- 表单 ---------- */
form { margin: 0; }
.field { display: block; margin-bottom: 16px; }
.field > .lbl { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .875rem; margin-top: 4px; }
.field .ferr { color: var(--danger); font-size: .9rem; margin-top: 4px; font-weight: 600; }
.field .ferr::before { content: "⚠ "; }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; }
input, select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px; font: inherit; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-input); box-shadow: var(--shadow-sm);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.14); outline: none; }
textarea { min-height: 88px; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
input[readonly] { background: var(--surface-2); }
.check { display: flex; align-items: center; gap: 12px; min-height: var(--tap); cursor: pointer; }
.check input { width: 22px; min-height: 22px; height: 22px; accent-color: #0052ff; box-shadow: none; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-line); }
.seg button[aria-pressed="true"]::before { content: "✓"; font-weight: 700; }

/* ---------- 按钮：圆角 12、主按钮渐层 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); min-width: var(--tap);
  padding: 10px 20px; font: inherit; font-size: .95rem; font-weight: 500; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--fg); cursor: pointer; text-decoration: none; touch-action: manipulation; box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary-grad); background-color: #0052ff; color: var(--primary-ink); border-color: transparent; box-shadow: 0 4px 14px rgba(0, 82, 255, 0.28); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 82, 255, 0.32); }
.btn.arrow::after { content: "→"; }
.btn.danger { border-color: var(--danger); color: var(--danger); background: var(--surface); }
.btn.danger::before { content: "✕"; font-weight: 700; }
.btn.danger.primary { background: var(--danger); color: #fff; box-shadow: none; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .62; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.small { min-height: var(--tap); padding: 6px 14px; }
button.linklike { background: none; border: 0; color: var(--accent-ink); font: inherit; text-decoration: underline; min-height: var(--tap); cursor: pointer; padding: 0 4px; }
.decide { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 4px; }
.decide .btn { min-width: 132px; }
.submitbar { margin-top: 18px; scroll-margin-bottom: calc(var(--nav-h) + 24px); }
.submitbar .btn { width: 100%; }

.notice { border-radius: var(--r-input); padding: 12px 16px; margin: 10px 0; border: 1px solid; }
.notice.err { background: var(--danger-soft); color: var(--danger-ink); border-color: var(--danger-line); }
.notice.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn-line); }
.notice.ok { background: var(--ok-soft); color: var(--ok-ink); border-color: var(--ok-line); }
.notice.info { background: var(--info-soft); color: var(--info-ink); border-color: var(--info-line); }
.notice strong { display: block; margin-bottom: 2px; }

.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty .btn { margin-top: 10px; }
.loading { padding: 32px; text-align: center; color: var(--muted); }
.skeleton { height: 64px; border-radius: var(--r-input); background: linear-gradient(90deg, var(--skeleton-a), var(--skeleton-b), var(--skeleton-a)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; margin-bottom: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 表格：宽版表格，窄版摘要卡 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
@media (max-width: 599px) {
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-input); margin-bottom: 8px; padding: 6px 12px; box-shadow: var(--shadow-sm); }
  .tbl td { border: 0; display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; text-align: right; }
  .tbl td::before { content: attr(data-label); color: var(--muted); text-align: left; font-size: .875rem; }
  .tbl td:first-child { font-weight: 700; }
  .tbl td:first-child::before { content: none; }
}
details.more > summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; color: var(--accent-ink); font-weight: 600; }

/* ---------- 导览（手机底部悬浮胶囊） ---------- */
.glass { background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-xl); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass, .topbar { background: var(--glass-solid); } }
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; gap: 4px; padding: 6px; border-radius: 20px; width: min(560px, calc(100% - 20px));
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; min-width: var(--tap);
  border-radius: 14px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 500; position: relative;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.bottom-nav a .ic { font-size: 1.2rem; line-height: 1.1; }
.bottom-nav a[aria-current="page"] { background: var(--sel-bg); color: var(--sel-ink); font-weight: 700; }
.bottom-nav a[aria-current="page"]::before { content: ""; position: absolute; top: 5px; width: 16px; height: 3px; border-radius: 3px; background: var(--accent); }
.bottom-nav .dot, .topnav .dot { position: absolute; top: 4px; right: calc(50% - 24px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #c62828; color: #fff; font-size: .75rem; display: flex; align-items: center; justify-content: center; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 68px); z-index: 30; max-width: calc(100% - 32px); background: var(--toast-bg); color: var(--toast-ink); padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow-xl); }

/* ---------- 能力卡（作业／管理入口） ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; min-height: 84px; text-decoration: none; color: var(--fg); display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; box-shadow: var(--shadow-sm); transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.tile:hover { border-color: var(--sel-line); box-shadow: var(--shadow-xl); transform: translateY(-2px); }
.tile:active { transform: scale(.98); }
.tile .t { font-weight: 600; color: var(--ink-strong); margin-top: 6px; }
.tile .d { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.tile-ic { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--icon-grad); color: #fff; font-size: 1.05rem; font-weight: 700; box-shadow: var(--icon-glow); }
.tile.hot { background: var(--sel-bg); border-color: var(--sel-line); }
.tile.hot .t { color: var(--sel-ink); }
.result { border: 1.5px solid var(--sel-line); }
.result .docno { font-family: var(--serif); font-size: 1.35rem; letter-spacing: .01em; color: var(--ink-strong); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.arrow-row { display: grid; grid-template-columns: 1fr 110px 48px; gap: 8px; align-items: end; margin-bottom: 8px; }
.icon-btn { min-width: var(--tap); min-height: var(--tap); border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); font-size: 1.2rem; cursor: pointer; }

/* 登录页 */
.auth { max-width: 440px; margin: 6vh auto 0; }
.auth .eyebrow { margin-bottom: 4px; }
.auth h1 { font-size: 2.2rem; }

/* ---------- 低透明、减少动态、高对比 ---------- */
html.solid .glass, html.solid .topbar { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--line-strong); }
@media (prefers-reduced-transparency: reduce) { .glass, .topbar { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-contrast: more) { :root { --muted: #333f55; --line: #8391a7; } .glass, .topbar { background: var(--glass-solid); backdrop-filter: none; -webkit-backdrop-filter: none; } }
html.still *, html.still *::before, html.still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.still .btn.primary { box-shadow: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .btn.primary { box-shadow: none; } }

/* ---------- 自适应 ---------- */
@media (max-width: 359px) {
  :root { font-size: 15px; }
  main { padding-left: 12px; padding-right: 12px; }
  .tiles { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 0 0; }
  .kv dd { margin-bottom: 6px; }
  .arrow-row { grid-template-columns: 1fr 84px 48px; }
  .decide .btn { flex: 1; }
  .stat .v { font-size: 1.6rem; }
}
@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  main { padding-left: 24px; padding-right: 24px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat:nth-child(odd) { border-left: 1px solid var(--band-line); padding-left: 14px; }
  .stat:first-child { border-left: 0; padding-left: 0; }
  .band { padding: 32px 32px; }
}
/* 桌面：顶部悬浮胶囊导览，隐藏底部导览 */
@media (min-width: 900px) {
  :root { --nav-h: 0px; }
  .topbar {
    position: sticky; top: 12px; margin: 12px auto 0; width: min(1120px, calc(100% - 48px)); min-height: 60px;
    padding: 8px 10px 8px 14px; border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: var(--shadow-md);
  }
  .topbar .brand { flex: none; max-width: 220px; }
  .topnav { display: flex; flex: 1; justify-content: center; gap: 4px; }
  .topnav a { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 500; }
  .topnav a:hover { color: var(--fg); background: var(--muted-bg); }
  .topnav a[aria-current="page"] { color: var(--sel-ink); background: var(--sel-bg); font-weight: 600; }
  .topnav .dot { top: -4px; right: -4px; }
  .bottom-nav { display: none !important; }
  main { max-width: 1120px; padding: 32px 24px 64px; }
  h1 { font-size: 2.3rem; }
  .hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; align-items: center; padding: 28px 0 44px; }
  .hero h1 { font-size: 3.4rem; }
  .hero-art { display: block; position: relative; height: 320px; }
  .hero-art .ring { position: absolute; inset: 20px 10px 10px 40px; border-radius: 50%; border: 1px solid var(--line); }
  .hero-art .ring.r2 { inset: 70px 60px 60px 90px; }
  .hero-art .blob { position: absolute; right: 24px; top: 34px; width: 120px; height: 110px; border-radius: 46% 54% 48% 52% / 55% 45% 55% 45%; background: var(--icon-grad); box-shadow: 0 24px 48px rgba(0, 82, 255, 0.28); }
  .hero-art .dotx { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
  .hero-art .float { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-xl); padding: 16px 18px; min-width: 200px; }
  .hero-art .float .kicker { font-size: .68rem; }
  .hero-art .float .v { font-family: var(--serif); font-size: 2rem; color: var(--ink-strong); line-height: 1.15; font-variant-numeric: tabular-nums; }
  .hero-art .float .pill { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: var(--primary-grad); color: #fff; font-size: .75rem; font-weight: 600; }
  .hero-art .d1 { right: 170px; top: 20px; }
  .hero-art .d2 { left: 120px; bottom: 6px; width: 8px; height: 8px; }
  .hero-art .f1 { left: 0; top: 60px; }
  .hero-art .f2 { right: 0; bottom: 20px; }
  .hero-art .f1 { z-index: 3; }
  .band { padding: 40px 44px; border-radius: 24px; }
  .band h2 { font-size: 2.1rem; }
  .stat .v { font-size: 2.6rem; }
  .section-h h2 { font-size: 2rem; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .canvas.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .canvas.wide > .span2 { grid-column: 1 / -1; }
  .canvas.wide > .span2 > .group { height: 100%; }
  main > form.card, main > div > form.card, .card > form { max-width: 760px; }
  .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .cards > .card + .card { margin-top: 0; }
  .toast { top: 88px; }
}
@media (min-width: 1280px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mt { margin-top: 12px; }
.m0 { margin: 0; }
html[data-theme="dark"] .band { border: 1px solid var(--line); background: linear-gradient(160deg, #0d1530 0%, #060a16 70%); }

/* =====================================================================
   v5 液态玻璃层：水滴、半透明毛玻璃、水滴圆角、柔和高光、层次分明。
   资料区（表单、库存、价格、审核、报表）用高不透明度霜面（≥ 0.86），
   导览与捷径用较通透的玻璃；只叠一层，不在玻璃上再叠玻璃。
   ===================================================================== */
:root, html[data-theme="light"] {
  --bg: #f3f6fc;
  --page-wash:
    radial-gradient(620px 520px at 6% 4%, rgba(160, 196, 255, 0.55) 0%, transparent 70%),
    radial-gradient(560px 480px at 96% 12%, rgba(196, 181, 253, 0.40) 0%, transparent 70%),
    radial-gradient(700px 560px at 88% 92%, rgba(125, 211, 252, 0.32) 0%, transparent 70%),
    radial-gradient(640px 520px at 10% 96%, rgba(167, 199, 255, 0.40) 0%, transparent 70%);
  --g-thin: rgba(255, 255, 255, 0.58);      /* 导览、捷径：通透 */
  --g-thick: rgba(255, 255, 255, 0.86);     /* 资料卡：霜面 */
  --g-edge: rgba(255, 255, 255, 0.85);      /* 亮边 */
  --g-edge-2: rgba(15, 23, 42, 0.06);       /* 外缘细线，浅底上看得到边界 */
  --g-hi: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.18) 38%, rgba(255, 255, 255, 0) 60%);
  --g-depth: 0 1px 1px rgba(15, 23, 42, 0.04), 0 10px 30px -6px rgba(30, 64, 175, 0.12), 0 28px 60px -24px rgba(0, 82, 255, 0.18);
  --g-inset: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  --g-blur: blur(22px) saturate(180%);
  --surface: rgba(255, 255, 255, 0.92);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.85);
  --sel-bg: rgba(219, 232, 255, 0.85);
}
html[data-theme="dark"] {
  --bg: #0a0f1e;
  --page-wash:
    radial-gradient(620px 520px at 6% 4%, rgba(37, 78, 190, 0.40) 0%, transparent 70%),
    radial-gradient(560px 480px at 96% 12%, rgba(91, 66, 180, 0.30) 0%, transparent 70%),
    radial-gradient(700px 560px at 88% 92%, rgba(14, 116, 144, 0.26) 0%, transparent 70%),
    radial-gradient(640px 520px at 10% 96%, rgba(30, 64, 175, 0.30) 0%, transparent 70%);
  --g-thin: rgba(22, 30, 52, 0.55);
  --g-thick: rgba(17, 24, 41, 0.86);
  --g-edge: rgba(255, 255, 255, 0.12);
  --g-edge-2: rgba(0, 0, 0, 0.35);
  --g-hi: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.03) 38%, rgba(255, 255, 255, 0) 60%);
  --g-depth: 0 1px 1px rgba(0, 0, 0, 0.3), 0 12px 32px -8px rgba(0, 0, 0, 0.55), 0 28px 60px -24px rgba(0, 82, 255, 0.25);
  --g-inset: inset 0 1px 0 rgba(255, 255, 255, 0.10), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  --g-blur: blur(22px) saturate(160%);
  --surface: rgba(17, 24, 41, 0.92);
  --glass: rgba(17, 24, 41, 0.62);
  --glass-border: rgba(255, 255, 255, 0.10);
}
:root { --r-card: 24px; --r-input: 14px; }

/* 页面底：柔和蓝紫水彩光斑，玻璃才有可透的层次 */
body { background-color: var(--bg); background-image: var(--page-wash); background-attachment: fixed; }

/* 通用玻璃表面：半透明＋模糊＋亮边＋顶部柔光 */
.group, .card, .tile, .kpi, .topbar, .bottom-nav, .hero-art .float, .eyebrow, .tbl tr {
  -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
}
.group, .card {
  position: relative; background: var(--g-thick); border: 1px solid var(--g-edge);
  box-shadow: var(--g-inset), var(--g-depth), 0 0 0 1px var(--g-edge-2);
}
.group::before, .card::before, .tile::before, .topbar::before, .bottom-nav::before, .hero-art .float::before, .btn.primary::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--g-hi); pointer-events: none; z-index: 0;
}
.group > *, .card > *, .tile > *, .topbar > *, .bottom-nav > *, .hero-art .float > * { position: relative; z-index: 1; }
.card.flat { background: var(--g-thin); box-shadow: var(--g-inset), 0 0 0 1px var(--g-edge-2); }
.kpi { background: var(--g-thick); border: 1px solid var(--g-edge); box-shadow: var(--g-inset), 0 6px 18px -8px rgba(30, 64, 175, 0.18), 0 0 0 1px var(--g-edge-2); border-radius: 18px; }

/* 捷径卡：较通透，悬停时浮起并加深柔光 */
.tile {
  position: relative; border-radius: 22px; background: var(--g-thin); border: 1px solid var(--g-edge);
  box-shadow: var(--g-inset), 0 8px 24px -10px rgba(30, 64, 175, 0.20), 0 0 0 1px var(--g-edge-2);
}
.tile:hover { background: var(--g-thick); box-shadow: var(--g-inset), var(--g-depth), 0 0 0 1px var(--sel-line); transform: translateY(-3px); }
.tile.hot { background: var(--sel-bg); }
/* 图示：水滴形、立体高光 */
.tile-ic {
  width: 40px; height: 40px; border-radius: 50% 50% 50% 50% / 44% 44% 56% 56%;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.85) 0 9%, rgba(255, 255, 255, 0) 30%), var(--icon-grad);
  box-shadow: inset 0 -4px 8px rgba(0, 30, 120, 0.35), inset 0 2px 3px rgba(255, 255, 255, 0.55), 0 8px 18px rgba(0, 82, 255, 0.35);
}

/* 按钮：水滴胶囊、光泽高光 */
.btn { border-radius: 999px; background: var(--g-thin); border-color: var(--g-edge); box-shadow: var(--g-inset), 0 4px 14px -6px rgba(30, 64, 175, 0.25), 0 0 0 1px var(--g-edge-2); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); }
html[data-theme="light"] .btn:not(.primary):not(.danger) { background: rgba(255, 255, 255, 0.78); }
.btn:hover { border-color: var(--sel-line); }
.btn.primary { position: relative; overflow: hidden; background: var(--primary-grad); background-color: #0052ff; border-color: rgba(255, 255, 255, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 6px rgba(0, 20, 90, 0.30), 0 10px 24px -8px rgba(0, 82, 255, 0.55); }
.btn.primary::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 55%); }
.btn.danger { border-color: var(--danger); background: var(--surface); }
.icon-btn { border-radius: 50%; background: var(--g-thin); border-color: var(--g-edge); box-shadow: var(--g-inset), 0 0 0 1px var(--g-edge-2); }

/* 输入：实底霜面，焦点为柔光环 */
input, select, textarea { background: rgba(255, 255, 255, 0.96); border-color: var(--line-strong); box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05); }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #0f1628; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.16), inset 0 1px 2px rgba(15, 23, 42, 0.05); }

/* 小标签：玻璃胶囊 */
.eyebrow { background: var(--g-thin); border-color: var(--g-edge); box-shadow: var(--g-inset), 0 0 0 1px var(--accent-line); }

/* 顶栏与底部导览：最通透的一层，水滴圆角 */
.topbar { background: var(--glass); border-bottom-color: var(--g-edge); box-shadow: var(--g-inset), 0 8px 24px -12px rgba(30, 64, 175, 0.18); }
.bottom-nav { border-radius: 28px; background: var(--glass); border: 1px solid var(--g-edge); box-shadow: var(--g-inset), var(--g-depth), 0 0 0 1px var(--g-edge-2); }
.bottom-nav a { border-radius: 22px; }
.bottom-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.85); box-shadow: inset 0 1px 0 #fff, 0 4px 12px -4px rgba(0, 82, 255, 0.30), 0 0 0 1px var(--sel-line); }
html[data-theme="dark"] .bottom-nav a[aria-current="page"] { background: rgba(126, 162, 255, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px var(--sel-line); }

/* 表格窄版卡、提示框 */
.tbl tr { background: var(--g-thick); border-color: var(--g-edge); box-shadow: var(--g-inset), 0 0 0 1px var(--g-edge-2); border-radius: 16px; }
.notice { border-radius: 18px; }
.toast { border-radius: 999px; }

/* 首页 hero：漂浮水滴与玻璃卡片的层次 */
.hero-drops { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero > :not(.hero-drops) { position: relative; z-index: 1; }
.hero-drops i, .hero-art .drop {
  position: absolute; display: block; border-radius: 50% 50% 50% 50% / 44% 44% 56% 56%;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.95) 0 7%, rgba(255, 255, 255, 0) 26%),
              radial-gradient(circle at 70% 80%, rgba(0, 82, 255, 0.35) 0%, rgba(0, 82, 255, 0) 60%),
              linear-gradient(160deg, rgba(160, 196, 255, 0.70) 0%, rgba(77, 124, 255, 0.55) 100%);
  box-shadow: inset 0 -6px 14px rgba(0, 40, 160, 0.25), inset 0 3px 6px rgba(255, 255, 255, 0.7), 0 14px 30px -10px rgba(0, 82, 255, 0.40);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero-drops i:nth-child(1) { width: 64px; height: 70px; right: 6px; top: 4px; }
.hero-drops i:nth-child(2) { width: 26px; height: 29px; right: 84px; top: 58px; opacity: .85; }
.hero-drops i:nth-child(3) { width: 14px; height: 16px; right: 40px; top: 96px; opacity: .7; }
.hero-art .blob {
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border-radius: 50% 50% 50% 50% / 44% 44% 56% 56%; width: 150px; height: 160px; right: 18px; top: 20px;
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.95) 0 6%, rgba(255, 255, 255, 0) 24%),
              radial-gradient(circle at 68% 78%, rgba(0, 30, 140, 0.35) 0%, rgba(0, 30, 140, 0) 55%),
              linear-gradient(160deg, rgba(126, 162, 255, 0.92) 0%, rgba(0, 82, 255, 0.88) 70%);
  box-shadow: inset 0 -12px 24px rgba(0, 25, 110, 0.35), inset 0 6px 12px rgba(255, 255, 255, 0.55), 0 30px 60px -16px rgba(0, 82, 255, 0.55);
}
.hero-art .dr1 { width: 56px; height: 62px; left: 40%; top: 4px; }
.hero-art .dr2 { width: 30px; height: 33px; right: 6px; top: 200px; }
.hero-art .dr3 { width: 18px; height: 20px; left: 26%; bottom: 0; }
.hero-art .float { background: var(--g-thin); border: 1px solid var(--g-edge); border-radius: 22px; box-shadow: var(--g-inset), var(--g-depth), 0 0 0 1px var(--g-edge-2); z-index: 2; }
.hero-art .float .pill { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45); }

/* 深色数据带：深海玻璃，内含光斑与高光 */
.band { border-radius: 28px; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), var(--g-depth);
  background: radial-gradient(520px 300px at 92% -10%, rgba(0, 82, 255, 0.55) 0%, transparent 70%), radial-gradient(420px 260px at 0% 120%, rgba(91, 66, 180, 0.35) 0%, transparent 70%), linear-gradient(160deg, #111a33 0%, #0b1022 100%); }
.band::after { right: 28px; top: 22px; width: 90px; height: 98px; border-radius: 50% 50% 50% 50% / 44% 44% 56% 56%;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.85) 0 7%, rgba(255, 255, 255, 0) 26%), linear-gradient(160deg, rgba(126, 162, 255, 0.55), rgba(0, 82, 255, 0.35));
  box-shadow: inset 0 -8px 16px rgba(0, 20, 90, 0.4), inset 0 3px 6px rgba(255, 255, 255, 0.35), 0 18px 40px -12px rgba(0, 82, 255, 0.6); }
.band::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 40%); pointer-events: none; }
.band > * { position: relative; z-index: 1; }
html[data-theme="dark"] .band { border-color: rgba(255, 255, 255, 0.10); }

@media (min-width: 900px) {
  .topbar { border-radius: 22px; border: 1px solid var(--g-edge); box-shadow: var(--g-inset), var(--g-depth), 0 0 0 1px var(--g-edge-2); }
  .topnav a { border-radius: 999px; }
  .topnav a[aria-current="page"] { background: rgba(255, 255, 255, 0.85); box-shadow: inset 0 1px 0 #fff, 0 4px 12px -4px rgba(0, 82, 255, 0.30), 0 0 0 1px var(--sel-line); }
  html[data-theme="dark"] .topnav a[aria-current="page"] { background: rgba(126, 162, 255, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px var(--sel-line); }
  .hero-drops { display: none; }
  .hero-art { height: 340px; }
}
@media (max-width: 599px) { .hero-drops i:nth-child(1) { width: 48px; height: 53px; } }

/* 低透明／不支持模糊：全部回到实底，功能不变 */
html.solid .group, html.solid .card, html.solid .tile, html.solid .btn:not(.primary), html.solid .eyebrow, html.solid .tbl tr, html.solid .hero-art .float { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
html.solid .bottom-nav { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .group, .card, .tile, .bottom-nav, .topbar, .hero-art .float { background: var(--glass-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  .group, .card, .tile, .btn:not(.primary), .eyebrow, .bottom-nav, .hero-art .float { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
html.still .tile:hover { transform: none; }
@media (max-width: 899px) { .band::after { top: auto; bottom: 18px; right: 16px; width: 46px; height: 50px; opacity: .9; } }
.band { background-color: #0b1022; }
/* 不叠玻璃：卡片内的子卡改为浅霜面，无模糊、无外阴影 */
.card .card, .group .card, .card details.card { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, 0.55); border-radius: 18px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 1px var(--g-edge-2); }
.card .card::before, .group .card::before { display: none; }
html[data-theme="dark"] .card .card, html[data-theme="dark"] .group .card { background: rgba(255, 255, 255, 0.03); }

/* =====================================================================
   v6 液态玻璃（Liquid Glass）：透镜折射边缘、镜面高光环、指针光泽、
   导览水滴指示器（流动滑行）、按压果冻回弹、流动背景、页面流入。
   - 折射只在支持 backdrop-filter:url() 的 Chromium 开启（html.lg-lens）；
     其他浏览器维持 v5 毛玻璃，外观接近、功能不变。
   - 资料区仍用高不透明霜面，文字对比不因透明度下降。
   - 低透明（html.solid）、减少动态（html.still / reduced-motion）一律关闭特效。
   ===================================================================== */
:root, html[data-theme="light"] {
  --lg-rim: conic-gradient(from 210deg at 50% 50%, rgba(255,255,255,.95) 0deg, rgba(255,255,255,.15) 70deg, rgba(255,255,255,.05) 140deg, rgba(255,255,255,.75) 190deg, rgba(255,255,255,.10) 260deg, rgba(255,255,255,.95) 360deg);
  --lg-glare: rgba(255, 255, 255, .55);
  --lg-drop: rgba(255, 255, 255, .78);
  --lg-drop-edge: rgba(255, 255, 255, .95);
  --lg-blob-1: rgba(77, 124, 255, .55);
  --lg-blob-2: rgba(168, 85, 247, .35);
  --lg-blob-3: rgba(14, 165, 233, .40);
  --lg-spring: cubic-bezier(.34, 1.56, .64, 1);
  --lg-flow: cubic-bezier(.22, 1, .36, 1);
}
html[data-theme="dark"] {
  --lg-rim: conic-gradient(from 210deg at 50% 50%, rgba(255,255,255,.40) 0deg, rgba(255,255,255,.04) 70deg, rgba(255,255,255,.02) 140deg, rgba(160,190,255,.35) 190deg, rgba(255,255,255,.03) 260deg, rgba(255,255,255,.40) 360deg);
  --lg-glare: rgba(170, 196, 255, .16);
  --lg-drop: rgba(126, 162, 255, .22);
  --lg-drop-edge: rgba(255, 255, 255, .22);
  --lg-blob-1: rgba(37, 78, 210, .45);
  --lg-blob-2: rgba(110, 60, 200, .30);
  --lg-blob-3: rgba(8, 120, 160, .30);
}

/* 流动背景：三颗大液滴缓慢漂移，给玻璃可折射的色彩 */
.lg-bg { position: fixed; inset: -10vmax; z-index: -1; pointer-events: none; overflow: hidden; }
.lg-bg i { position: absolute; display: block; border-radius: 50% 50% 50% 50% / 44% 44% 56% 56%; filter: blur(60px); opacity: .9; will-change: transform; }
.lg-bg i:nth-child(1) { width: 46vmax; height: 50vmax; left: 0; top: 0; background: radial-gradient(circle at 40% 40%, var(--lg-blob-1), transparent 70%); animation: lg-drift-a 38s var(--lg-flow) infinite alternate; }
.lg-bg i:nth-child(2) { width: 40vmax; height: 44vmax; right: 0; top: 10vmax; background: radial-gradient(circle at 50% 50%, var(--lg-blob-2), transparent 70%); animation: lg-drift-b 46s var(--lg-flow) infinite alternate; }
.lg-bg i:nth-child(3) { width: 52vmax; height: 46vmax; left: 20vmax; bottom: 0; background: radial-gradient(circle at 50% 50%, var(--lg-blob-3), transparent 70%); animation: lg-drift-c 54s var(--lg-flow) infinite alternate; }
@keyframes lg-drift-a { to { transform: translate(14vmax, 10vmax) scale(1.12) rotate(18deg); } }
@keyframes lg-drift-b { to { transform: translate(-16vmax, 12vmax) scale(.9) rotate(-22deg); } }
@keyframes lg-drift-c { to { transform: translate(-8vmax, -14vmax) scale(1.08) rotate(14deg); } }

/* 镜面高光环：玻璃边缘一圈不均匀的亮边（左上最亮、右下次亮） */
.group, .card, .tile, .kpi, .btn:not(.primary):not(.danger), .icon-btn, .eyebrow { position: relative; }
.group::after, .card::after, .tile::after, .kpi::after, .topbar::after, .bottom-nav::after,
.btn:not(.primary):not(.danger)::after, .icon-btn::after, .eyebrow::after, .hero-art .float::after, .lg-drop::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none; z-index: 2;
  background: var(--lg-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card .card::after, .group .card::after { display: none; }

/* 指针光泽：滑过时一团柔光跟着走（只在精确指针、非静止模式） */
.tile, .card, .group, .kpi { --mx: 30%; --my: -20%; }
html.lg-hover .tile::before, html.lg-hover .card:not(.card .card)::before, html.lg-hover .group::before {
  background: radial-gradient(260px 200px at var(--mx) var(--my), var(--lg-glare), transparent 70%), var(--g-hi);
}

/* 按压果冻回弹：按下缩小、放开弹回 */
.btn, .tile, .icon-btn, .bottom-nav a, .topnav a, .seg .btn {
  transition: transform .5s var(--lg-spring), background-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow .3s var(--ease), border-color var(--t) var(--ease);
}
.btn:active, .icon-btn:active, .seg .btn:active { transform: scale(.94); transition-duration: .12s; }
.tile:active { transform: scale(.97); transition-duration: .12s; }
.bottom-nav a:active, .topnav a:active { transform: scale(.9); transition-duration: .12s; }

/* 导览水滴指示器：选中项下方一颗玻璃液滴，切页时流动滑行并拉长 */
.topnav { position: relative; }
.lg-drop {
  position: absolute; z-index: 0; pointer-events: none; left: 0; top: var(--lg-y, 6px);
  width: var(--lg-w, 0px); height: var(--lg-h, 56px); transform: translateX(var(--lg-x, 0px));
  border-radius: 22px; background: var(--lg-drop);
  box-shadow: inset 0 1px 0 var(--lg-drop-edge), inset 0 -6px 12px rgba(0, 60, 200, .08), 0 6px 16px -6px rgba(0, 82, 255, .35);
  transition: transform .55s var(--lg-spring), width .45s var(--lg-flow), height .45s var(--lg-flow), top .45s var(--lg-flow), opacity .2s;
}
.lg-drop.moving { animation: lg-stretch .55s var(--lg-flow); }
@keyframes lg-stretch { 0% { scale: 1 1; } 35% { scale: 1.25 .82; } 70% { scale: .96 1.05; } 100% { scale: 1 1; } }
.topnav .lg-drop { border-radius: 999px; }
html.lg-ready .bottom-nav a[aria-current="page"], html.lg-ready .topnav a[aria-current="page"] { background: transparent !important; box-shadow: none !important; }
.bottom-nav a, .topnav a { z-index: 1; }

/* 页面流入：每次切页内容由下而上浮现 */
#main > * { animation: lg-in .42s var(--lg-flow) both; }
#main > *:nth-child(2) { animation-delay: .03s; } #main > *:nth-child(3) { animation-delay: .06s; } #main > *:nth-child(4) { animation-delay: .09s; }
@keyframes lg-in { from { opacity: 0; transform: translateY(10px) scale(.995); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }

/* 手机：顶栏也成为悬浮玻璃胶囊 */
@media (max-width: 899px) {
  .topbar { margin: 8px 10px 0; border-radius: 22px; border: 1px solid var(--g-edge); top: 8px; }
}

/* 透镜折射：只在 Chromium（html.lg-lens）启用；边缘把背后的色彩弯折 */
html.lg-lens .bottom-nav, html.lg-lens .topbar, html.lg-lens .tile, html.lg-lens .eyebrow,
html.lg-lens .btn:not(.primary):not(.danger), html.lg-lens .hero-art .float {
  -webkit-backdrop-filter: url(#lg-lens) blur(10px) saturate(190%) brightness(1.04);
  backdrop-filter: url(#lg-lens) blur(10px) saturate(190%) brightness(1.04);
}
html.lg-lens .lg-drop { backdrop-filter: url(#lg-lens-sm) blur(2px) saturate(200%); -webkit-backdrop-filter: url(#lg-lens-sm) blur(2px) saturate(200%); }
.lg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* 关闭条件：低透明、减少动态 */
html.solid .lg-bg, html.solid .group::after, html.solid .card::after, html.solid .tile::after { display: none; }
html.solid.lg-lens .bottom-nav, html.solid.lg-lens .topbar, html.solid.lg-lens .tile, html.solid.lg-lens .btn:not(.primary):not(.danger) { backdrop-filter: none; -webkit-backdrop-filter: none; }
html.still .lg-bg i, html.still #main > *, html.still .lg-drop.moving { animation: none; }
html.still .lg-drop { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .lg-bg i, #main > *, .lg-drop.moving { animation: none; }
  .lg-drop, .btn, .tile, .bottom-nav a, .topnav a { transition: none; }
}
@media (prefers-reduced-transparency: reduce) { .lg-bg { display: none; } }
@media print { .lg-bg, .lg-drop { display: none; } }
