:root {
  color-scheme: light;
  --bg: #f0ece3;
  --surface: #ffffff;
  --surface-2: #f8f5ef;
  --line: #e2dbcf;
  --line-strong: #cfc5b5;
  --ink: #2b2620;
  --ink-2: #5d554b;
  --ink-3: #8c8377;
  --brand: #8b6914;
  --brand-ink: #ffffff;
  --brand-soft: #f6eedb;
  --deep: #3d2b1f;
  --deep-ink: #efe4d4;
  --red: #b3372f;
  --red-soft: #fbe9e6;
  --yellow: #8f6100;
  --yellow-soft: #fdf2d6;
  --green: #2f7a4a;
  --green-soft: #e4f2e8;
  --grey: #7d7569;
  --grey-soft: #eeeae3;
  --info: #3c6390;
  --info-soft: #e7eef7;
  --shadow: 0 1px 2px rgba(61, 43, 31, .05), 0 2px 8px rgba(61, 43, 31, .06);
  --radius: 14px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #17130f;
    --surface: #221c16;
    --surface-2: #2a231c;
    --line: #3a3128;
    --line-strong: #4d4236;
    --ink: #f1ebe2;
    --ink-2: #c9bfb2;
    --ink-3: #9a8f81;
    --brand: #d2a84c;
    --brand-ink: #1b150f;
    --brand-soft: #3a2f1a;
    --deep: #0f0c09;
    --deep-ink: #e9dcc8;
    --red: #f08a7f;
    --red-soft: #3d1d19;
    --yellow: #e6b54c;
    --yellow-soft: #3a2d10;
    --green: #6fcf93;
    --green-soft: #183323;
    --grey: #a39a8d;
    --grey-soft: #2e2822;
    --info: #8fb4e3;
    --info-soft: #1b2738;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17130f; --surface: #221c16; --surface-2: #2a231c; --line: #3a3128; --line-strong: #4d4236;
  --ink: #f1ebe2; --ink-2: #c9bfb2; --ink-3: #9a8f81; --brand: #d2a84c; --brand-ink: #1b150f; --brand-soft: #3a2f1a;
  --deep: #0f0c09; --deep-ink: #e9dcc8; --red: #f08a7f; --red-soft: #3d1d19; --yellow: #e6b54c; --yellow-soft: #3a2d10;
  --green: #6fcf93; --green-soft: #183323; --grey: #a39a8d; --grey-soft: #2e2822; --info: #8fb4e3; --info-soft: #1b2738;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; margin: 0; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */
.topbar { background: var(--deep); color: var(--deep-ink); padding: 10px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 16px; font-weight: 600; color: #fff; }
.brand-sub { font-size: 12px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { color: var(--deep-ink); text-decoration: none; padding: 5px 10px; border-radius: 999px; font-size: 13px; opacity: .8; }
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, .14); opacity: 1; }
.site-nav a:hover { opacity: 1; }

.demo-strip { background: var(--brand-soft); border-bottom: 1px solid var(--line); padding: 6px 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.demo-strip .tag { background: var(--brand); color: var(--brand-ink); border-radius: 6px; padding: 0 6px; font-size: 11px; font-weight: 600; }
.demo-strip .now { font-weight: 600; font-variant-numeric: tabular-nums; }
.demo-strip .spacer { flex: 1; }
.chip-btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 2px 10px; cursor: pointer; font-size: 13px; }
.chip-btn:hover { border-color: var(--brand); }

/* ---------- 布局 ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 14px 16px 96px; }
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 14px; position: sticky; top: 8px; z-index: 5; box-shadow: var(--shadow); }
.tabs button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 7px 0; cursor: pointer; color: var(--ink-2); font-weight: 500; position: relative; }
.tabs button[aria-selected="true"] { background: var(--deep); color: #fff; }
.tabs .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; }
.grid { display: grid; gap: 14px; }
@media (min-width: 900px) {
  .grid.two { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head .right { margin-left: auto; }
.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 6px 12px; cursor: pointer; font-size: 14px; line-height: 1.4; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.sm { padding: 3px 9px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.demo { border-style: dashed; color: var(--ink-2); }

/* ---------- 此刻 ---------- */
.now-card { background: var(--deep); color: var(--deep-ink); border: 0; }
.now-card .where { font-family: var(--serif); font-size: 22px; color: #fff; line-height: 1.35; }
.now-card .next { margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.now-card .next b { color: #fff; }
.now-card .pill { background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.now-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; opacity: .85; }

/* ---------- 状态灯与提示 ---------- */
.light { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.light.red { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.light.yellow { background: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.light.green { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.light.grey { background: var(--grey); box-shadow: 0 0 0 3px var(--grey-soft); }
.light.info { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }

.item { border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.item.red { border-left-color: var(--red); background: linear-gradient(90deg, var(--red-soft), var(--surface) 40%); }
.item.yellow { border-left-color: var(--yellow); }
.item.green { border-left-color: var(--green); }
.item.grey { border-left-color: var(--grey); }
.item.info { border-left-color: var(--info); }
.item-title { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.item-text { color: var(--ink-2); font-size: 14px; margin-top: 3px; }
.item-actions { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.kind { font-size: 11px; border-radius: 6px; padding: 0 6px; background: var(--grey-soft); color: var(--ink-2); font-weight: 500; flex: none; }
.ai-tag { font-size: 11px; border-radius: 6px; padding: 0 6px; background: var(--info-soft); color: var(--info); font-weight: 600; }
.why { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.why summary { cursor: pointer; color: var(--ink-2); }
.why ul { margin: 4px 0 0; padding-left: 18px; }
.empty { color: var(--ink-3); font-size: 14px; padding: 6px 0; }

/* ---------- 时间轴 ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 50px 18px minmax(0, 1fr); gap: 8px; padding: 6px 0; position: relative; }
.timeline .t { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 13px; padding-top: 1px; }
.timeline .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); margin-top: 5px; position: relative; z-index: 1; }
.timeline li::before { content: ""; position: absolute; left: 63px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline li:first-child::before { top: 14px; }
.timeline li:last-child::before { bottom: calc(100% - 14px); }
.timeline li.done { opacity: .55; }
.timeline li.done .dot { background: var(--line-strong); }
.timeline li.now .dot, .timeline li.next .dot { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.timeline li.next .dot { background: var(--surface); }
.timeline .title { font-weight: 500; }
.timeline .sub { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 11px; border-radius: 6px; padding: 0 6px; font-weight: 600; }
.badge.next { background: var(--brand); color: var(--brand-ink); }
.badge.now { background: var(--green); color: #fff; }
.badge.warn { background: var(--yellow-soft); color: var(--yellow); }
.badge.story { background: var(--brand-soft); color: var(--brand); }
.alt { font-variant-numeric: tabular-nums; }

/* ---------- 风险雷达 ---------- */
.risk-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.risk-row:first-child { border-top: 0; padding-top: 0; }
.risk-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.level-word { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 0 6px; }
.level-word.red { background: var(--red-soft); color: var(--red); }
.level-word.yellow { background: var(--yellow-soft); color: var(--yellow); }
.level-word.green { background: var(--green-soft); color: var(--green); }
.followed { font-size: 13px; color: var(--green); margin-top: 4px; }
.inline-form { display: flex; gap: 6px; margin-top: 8px; }
.inline-form input { flex: 1; min-width: 0; }

/* ---------- 表单 ---------- */
input[type="text"], select, textarea { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 7px 10px; width: 100%; }
textarea { resize: vertical; min-height: 64px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
label.field { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.form-grid { display: grid; gap: 10px; }
@media (min-width: 640px) { .form-grid.cols { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 3px 11px; cursor: pointer; font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--deep); color: #fff; border-color: var(--deep); }
.tag-list { display: flex; gap: 5px; flex-wrap: wrap; }
.tag-pill { font-size: 12px; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 1px 9px; }
.tag-pill.health { background: var(--red-soft); color: var(--red); }
.tag-pill.plain { background: var(--grey-soft); color: var(--ink-2); }

/* ---------- 事项 ---------- */
.task-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.task-log { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--ink-3); }
.task-log li::before { content: "· "; }
.draft-box { margin-top: 8px; display: grid; gap: 6px; }
.demo-label { font-size: 11px; color: var(--ink-3); }

/* ---------- 客人 ---------- */
.guest { display: grid; gap: 8px; }
.guest-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.guest-head .name { font-family: var(--serif); font-weight: 600; font-size: 16px; }
.kv { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 4px 10px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.quote { border-left: 3px solid var(--brand); padding: 2px 0 2px 10px; color: var(--ink-2); font-size: 14px; }
.digest-item { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 14px; }
.digest-item input { margin-top: 5px; }

/* ---------- 锦囊 ---------- */
.story { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.story.told { opacity: .62; }
.story h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.story .body { margin-top: 6px; font-family: var(--serif); font-size: 15px; line-height: 1.8; }
.story .src { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.hint { font-size: 13px; color: var(--brand); margin-top: 6px; }
.hint::before { content: "◆ "; font-size: 10px; }

/* ---------- 速记 ---------- */
.fab { position: fixed; right: 18px; bottom: 22px; z-index: 20; border: 0; border-radius: 999px; background: var(--brand); color: var(--brand-ink); padding: 12px 18px; font-weight: 600; box-shadow: 0 6px 18px rgba(61, 43, 31, .28); cursor: pointer; display: flex; gap: 6px; align-items: center; }
dialog.sheet { border: 0; padding: 0; width: min(560px, 100%); max-height: 88vh; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
dialog.sheet::backdrop { background: rgba(23, 19, 15, .45); }
@media (max-width: 640px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 18px 18px 0 0; }
}
.sheet-body { padding: 16px; display: grid; gap: 12px; }
.sheet-head { display: flex; align-items: center; gap: 8px; }
.sheet-head .btn { margin-left: auto; }
.mic { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 18px; flex: none; }
.mic.on { background: var(--red); color: #fff; border-color: var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--red-soft); } }
pre.handover { white-space: pre-wrap; font: 13px/1.7 var(--sans); background: var(--surface-2); border-radius: 10px; padding: 12px; margin: 0; max-height: 60vh; overflow: auto; }

/* ---------- 提示条 ---------- */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--deep); color: #fff; padding: 8px 14px; border-radius: 10px; font-size: 14px; z-index: 50; max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.toast.err { background: var(--red); }

/* ---------- 调度台 ---------- */
.board { display: grid; gap: 12px; }
@media (min-width: 760px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.butler { display: grid; gap: 8px; }
.butler.red { border-color: var(--red); }
.butler .head { display: flex; gap: 10px; align-items: center; }
.butler .name { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.butler ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.advice { font-weight: 600; color: var(--red); font-size: 14px; }
.advice.yellow { color: var(--yellow); }
.live-tag { font-size: 11px; background: var(--info-soft); color: var(--info); border-radius: 6px; padding: 0 6px; font-weight: 600; }

/* ---------- 原则页 ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose section { margin-bottom: 18px; }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { font-size: 20px; margin-bottom: 8px; }
.lead { font-family: var(--serif); font-size: 20px; line-height: 1.7; color: var(--ink); }
.split { display: grid; gap: 12px; }
@media (min-width: 700px) { .split { grid-template-columns: 1fr 1fr; } }
.split .card h3 { margin-bottom: 6px; }
.split ul { margin: 0; padding-left: 18px; }
.mods { display: grid; gap: 10px; }
@media (min-width: 700px) { .mods { grid-template-columns: 1fr 1fr; } }
.mods .card b { font-family: var(--serif); }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain td, table.plain th { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: left; vertical-align: top; }
table.plain th { color: var(--ink-3); font-weight: 500; }
@media (max-width: 640px) {
  .demo-strip .muted { display: none; }
  .site-nav { margin-left: 0; width: 100%; }
}
select.chip-btn { width: auto; max-width: min(320px, 100%); padding: 2px 8px; }

/* ================= 在地采购：单据与流程组件 ================= */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding: 4px max(8px, env(safe-area-inset-left, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px)); }
.bottom-nav a { flex: 1; text-align: center; text-decoration: none; color: var(--ink-3); font-size: 12px; padding: 6px 0 4px; border-radius: 10px; display: grid; gap: 1px; }
.bottom-nav a b { font-size: 18px; line-height: 1; font-weight: 400; }
.bottom-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.bottom-nav a.primary-nav b { color: var(--brand-ink); background: var(--brand); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin: -2px auto 0; font-size: 22px; }
@media (min-width: 900px) { .bottom-nav { position: sticky; top: 0; bottom: auto; justify-content: center; border-top: 0; border-bottom: 1px solid var(--line); }
  .bottom-nav a { flex: 0 0 auto; padding: 8px 18px; display: flex; gap: 6px; font-size: 14px; } .bottom-nav a b { font-size: 15px; }
  .bottom-nav a.primary-nav b { width: auto; height: auto; background: none; color: inherit; margin: 0; } .wrap { padding-bottom: 40px; } }
.persona { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.persona select { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 4px 10px; font-size: 13px; width: auto; max-width: 60vw; }
.persona select option { color: #222; }
.role-chip { font-size: 11px; border-radius: 6px; padding: 1px 6px; background: rgba(255,255,255,.16); color: #fff; white-space: nowrap; }
.page-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.page-title h1 { font-family: var(--serif); font-size: 21px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.kpi .v { font: 600 21px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .l { font-size: 12px; color: var(--ink-3); }
.kpi.warn .v { color: var(--yellow); } .kpi.bad .v { color: var(--red); }
.list { display: grid; gap: 8px; }
.po { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; }
.po:hover { border-color: var(--brand); }
.po .no { font: 600 13px var(--mono); color: var(--ink-2); }
.po .amt { font: 600 15px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.po .who { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.po .sub { font-size: 12px; color: var(--ink-3); grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.st { font-size: 11px; border-radius: 6px; padding: 0 6px; font-weight: 600; white-space: nowrap; background: var(--grey-soft); color: var(--ink-2); }
.st.draft, .st.none { background: var(--grey-soft); color: var(--ink-2); }
.st.pending, .st.partial, .st.linked { background: var(--yellow-soft); color: var(--yellow); }
.st.returned, .st.exception, .st.bad { background: var(--red-soft); color: var(--red); }
.st.approved, .st.received, .st.verified, .st.paid, .st.ok { background: var(--green-soft); color: var(--green); }
.st.offlist { background: var(--red-soft); color: var(--red); } .st.group { background: var(--info-soft); color: var(--info); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.lines { display: grid; gap: 8px; }
.line { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 8px; background: var(--surface-2); }
.line-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 6px; }
@media (max-width: 520px) { .line-grid { grid-template-columns: 1fr 1fr; } .line-grid .span2 { grid-column: 1 / -1; } }
.line-grid input, .line-grid select { padding: 6px 8px; }
.line-total { font: 600 14px var(--mono); text-align: right; }
.total-bar { position: sticky; bottom: 64px; z-index: 5; display: flex; align-items: center; gap: 10px; background: var(--deep); color: #fff; border-radius: 12px; padding: 10px 14px; margin-top: 12px; flex-wrap: wrap; }
.total-bar .sum { font: 600 18px var(--mono); }
.total-bar .route { font-size: 12px; opacity: .8; }
.total-bar .spacer { flex: 1; }
@media (min-width: 900px) { .total-bar { bottom: 12px; } }
.picker { display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.pick { display: flex; gap: 8px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); cursor: pointer; text-align: left; width: 100%; }
.pick[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.pick .nm { font-weight: 600; }
.pick .meta { font-size: 12px; color: var(--ink-3); }
.warnbox { border: 1px solid var(--yellow); background: var(--yellow-soft); color: var(--ink); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.errbox { border: 1px solid var(--red); background: var(--red-soft); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 84px; display: grid; gap: 3px; font-size: 11px; color: var(--ink-3); text-decoration: none; }
.thumb img, .thumb .pdf { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; font-weight: 600; color: var(--ink-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 6px 0; position: relative; }
.steps li::before { content: ""; position: absolute; left: 8px; top: 20px; bottom: -6px; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); margin-top: 3px; z-index: 1; }
.steps .approved .dot { background: var(--green); border-color: var(--green); }
.steps .pending .dot { background: var(--yellow); border-color: var(--yellow); }
.steps .returned .dot { background: var(--red); border-color: var(--red); }
.steps .cancelled, .steps .waiting { opacity: .55; }
.trail { font-size: 12px; color: var(--ink-3); display: grid; gap: 3px; max-height: 260px; overflow: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { color: var(--ink-3); font-weight: 500; font-size: 12px; white-space: nowrap; }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.scroll-x { overflow-x: auto; }
.bar { height: 8px; background: var(--brand-soft); border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--brand); }
.bar.red i { background: var(--red); }
.filters { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.filters label { font-size: 12px; color: var(--ink-3); display: grid; gap: 3px; }
.filters select, .filters input { padding: 6px 8px; font-size: 13px; }
.approve-card { display: grid; gap: 8px; }
.approve-card .head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.approve-card .big { font: 600 22px var(--mono); }
.guide { border: 1px dashed var(--brand); background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; font-size: 14px; }
.guide ol { margin: 0; padding-left: 20px; }
details.fold > summary { cursor: pointer; color: var(--ink-2); font-size: 13px; padding: 4px 0; }
.sec-title { font-family: var(--serif); font-size: 15px; font-weight: 600; margin: 4px 0 6px; }
.amount-diff { font-family: var(--mono); }
.amount-diff.bad { color: var(--red); font-weight: 600; }

/* ================= 会员体系 ================= */
.mcard { border-radius: 18px; padding: 18px 20px; color: #f3ead9; display: grid; gap: 10px; position: relative; overflow: hidden; min-height: 170px;
  background: linear-gradient(135deg, #6b5440, #3d2b1f); box-shadow: 0 8px 24px rgba(30, 20, 10, .25); }
.mcard.premium { background: linear-gradient(135deg, #5a3a22, #24160d); }
.mcard.private { background: linear-gradient(135deg, #1c1a17, #050505); color: #e9d39a; border: 1px solid #6e5a2e; }
.mcard .tier { font-family: var(--serif); font-size: 22px; letter-spacing: .12em; }
.mcard .who { font-size: 15px; opacity: .9; }
.mcard .years { position: absolute; right: 18px; top: 14px; text-align: right; font-family: var(--serif); }
.mcard .years b { font-size: 40px; line-height: 1; display: block; }
.mcard .row2 { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; opacity: .9; }
.mcard .row2 b { display: block; font: 600 18px var(--mono); }
.progress { height: 8px; background: rgba(255,255,255,.18); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: #d9b25c; }
.tierchip { font-size: 11px; border-radius: 6px; padding: 1px 7px; font-weight: 600; white-space: nowrap; }
.tierchip.basic { background: var(--grey-soft); color: var(--ink-2); }
.tierchip.premium { background: var(--brand-soft); color: var(--brand); }
.tierchip.private { background: #1d1a15; color: #e9d39a; }
.dims { display: grid; gap: 8px; }
.dim { display: grid; grid-template-columns: 76px minmax(0, 1fr) 40px; gap: 8px; align-items: center; font-size: 13px; }
.dim .bar { height: 8px; }
.dim .why { grid-column: 2 / -1; color: var(--ink-3); font-size: 12px; margin-top: -4px; }
.timeline-y { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-height: 520px; overflow: auto; }
.timeline-y li { display: grid; grid-template-columns: 84px 14px minmax(0, 1fr); gap: 10px; padding: 5px 0; position: relative; font-size: 13.5px; }
.timeline-y li::before { content: ""; position: absolute; left: 100px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline-y .d { color: var(--ink-3); font-family: var(--mono); font-size: 12px; text-align: right; padding-top: 1px; }
.timeline-y .k { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--line-strong); z-index: 1; margin-left: 2px; }
.timeline-y .memory .k { background: var(--brand); } .timeline-y .tier .k { background: #d9b25c; } .timeline-y .milestone .k { background: var(--red); }
.timeline-y .join .k { background: var(--green); } .timeline-y .event .k, .timeline-y .referral .k { background: var(--info); }
.timeline-y .memory .t { font-family: var(--serif); }
.timeline-y .year { grid-column: 1 / -1; font: 600 13px var(--mono); color: var(--brand); padding: 8px 0 2px; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); text-decoration: none; color: inherit; }
.mrow:hover { border-color: var(--brand); }
.mrow .nm { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mrow .val { font: 600 16px var(--mono); text-align: right; }
.mrow .sub { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.hbar { display: grid; grid-template-columns: minmax(64px, 120px) minmax(60px, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; }
.hbar .track { height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--brand); }
.hbar .n { font-family: var(--mono); text-align: right; white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; }
