:root {
  --red-900: #701a18;
  --red-800: #851f1d;
  --red-700: #982724;
  --red-600: #ad3530;
  --gold-700: #806027;
  --gold-600: #9b7635;
  --gold-500: #b58b45;
  --gold-100: #f7f1e5;
  --ink: #1c252e;
  --ink-2: #344054;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e7ec;
  --line-2: #eef0f3;
  --paper: #ffffff;
  --bg: #f6f6f4;
  --blue: #1f5f99;
  --blue-soft: #eef6ff;
  --green: #157a55;
  --green-soft: #ecf8f2;
  --amber: #9a650f;
  --amber-soft: #fff8e6;
  --gray-soft: #f2f4f7;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 10px 28px rgba(16, 24, 40, .09);
  --shadow-lg: 0 24px 64px rgba(16, 24, 40, .18);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: var(--sans); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
body.large-text { font-size: 17px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
svg.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
svg.ic-lg { width: 24px; height: 24px; }
svg.ic-sm { width: 15px; height: 15px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -80px; z-index: 9999; background: #fff; color: var(--red-800); padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-md); }
.skip:focus { top: 16px; }
:focus-visible { outline: 3px solid rgba(31, 95, 153, .3); outline-offset: 2px; }
::selection { background: #f1dfba; color: var(--ink); }

.wrap { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.wrap-wide { width: min(1440px, calc(100% - 48px)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.text-red { color: var(--red-700); }
.text-green { color: var(--green); }
.text-blue { color: var(--blue); }
.text-amber { color: var(--amber); }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; }

.btn { border: 1px solid transparent; border-radius: 9px; background: var(--red-700); color: #fff; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; line-height: 1.2; transition: .18s ease; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.btn:hover { background: var(--red-800); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.secondary { background: #fff; color: var(--red-700); border-color: #d8b5b2; }
.btn.secondary:hover { background: #fff8f7; }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--gray-soft); }
.btn.blue { background: var(--blue); }
.btn.blue:hover { background: #184c7b; }
.btn.green { background: var(--green); }
.btn.green:hover { background: #0f6445; }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 7px; }
.btn.xs { padding: 5px 9px; font-size: 12px; border-radius: 6px; }
.btn.icon-only { padding: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.link-btn { border: 0; padding: 0; background: none; color: var(--blue); font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

.field { display: grid; gap: 6px; }
.field > label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea { width: 100%; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; padding: 10px 12px; color: var(--ink); outline: none; transition: .16s ease; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(181,139,69,.14); }
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #9aa4b2; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.checkline { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.checkline input { margin-top: 4px; accent-color: var(--red-700); }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { border: 1px solid var(--line); background: #fff; padding: 7px 12px; border-radius: 999px; font-size: 13px; color: var(--ink-2); }
.choice.active { border-color: var(--red-700); background: #fff7f6; color: var(--red-700); font-weight: 700; }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--gray-soft); color: var(--ink-2); white-space: nowrap; }
.tag.red { background: #fff0ee; color: var(--red-700); }
.tag.gold { background: var(--gold-100); color: var(--gold-700); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.gray { background: var(--gray-soft); color: var(--muted); }
.tag.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.outline-tag { display: inline-flex; align-items: center; padding: 2px 7px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; color: var(--muted); background: #fff; }

.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-dot.green { background: var(--green); }
.status-dot.amber { background: #d59a29; }
.status-dot.blue { background: var(--blue); }
.status-dot.red { background: var(--danger); }
.status-dot.gray { background: var(--muted-2); }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.section-head h2, .section-head h3 { margin: 0; font-family: var(--serif); letter-spacing: .02em; }
.section-head h2 { font-size: 28px; line-height: 1.3; }
.section-head h3 { font-size: 21px; line-height: 1.35; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0 0 7px; color: var(--gold-700); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.divider { height: 1px; background: var(--line-2); }
.notice { border: 1px solid #f1dfba; background: #fffbf2; color: #684d1f; border-radius: 9px; padding: 10px 12px; font-size: 12px; line-height: 1.6; }
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty .empty-icon { margin: 0 auto 12px; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--gray-soft); color: var(--muted-2); }
.empty h3 { margin: 0 0 5px; color: var(--ink-2); font-size: 16px; }
.empty p { margin: 0; font-size: 13px; }
.progress { height: 7px; border-radius: 99px; background: #eceff3; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-500), var(--red-700)); transition: width .35s ease; }
.skeleton { min-height: 120px; border-radius: var(--radius); background: linear-gradient(100deg, #eef1f5 20%, #f8f9fb 38%, #eef1f5 56%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }

.modal-mask { position: fixed; inset: 0; z-index: 1000; background: rgba(14, 20, 28, .52); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadeIn .16s ease; }
.modal { width: min(640px, 100%); max-height: min(88vh, 880px); overflow: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); animation: rise .2s ease; }
.modal.wide { width: min(920px, 100%); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 20px 22px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-family: var(--serif); font-size: 22px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.modal-body { padding: 22px; }
.modal-foot { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: #fff; border-top: 1px solid var(--line); }
.close-btn { border: 0; background: var(--gray-soft); color: var(--muted); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.close-btn:hover { background: #e9edf2; color: var(--ink); }

.drawer-mask { position: fixed; inset: 0; z-index: 900; background: rgba(14, 20, 28, .42); backdrop-filter: blur(1px); }
.drawer { position: fixed; z-index: 901; top: 0; right: 0; height: 100vh; width: min(760px, 94vw); background: #fff; box-shadow: -18px 0 50px rgba(16,24,40,.16); display: flex; flex-direction: column; animation: slideIn .22s ease; }
.drawer-head { padding: 22px 24px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff 0%, #fcfbf8 100%); }
.drawer-head .flex-between { align-items: flex-start; }
.drawer-head h2 { margin: 4px 0 6px; font-family: var(--serif); font-size: 25px; line-height: 1.4; }
.drawer-head p { margin: 0; color: var(--muted); font-size: 12px; }
.drawer-body { padding: 22px 24px 36px; overflow: auto; }
.drawer-foot { padding: 13px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #fff; }
@keyframes slideIn { from { transform: translateX(36px); opacity: .7; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(12px); opacity: .6; } to { transform: none; opacity: 1; } }

#toast { position: fixed; z-index: 2000; left: 50%; bottom: 32px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #17212b; color: #fff; padding: 11px 16px; border-radius: 9px; box-shadow: var(--shadow-lg); font-size: 13px; transition: .2s ease; max-width: min(560px, calc(100vw - 32px)); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.success { background: #0f664a; }
#toast.error { background: #9e2a21; }

.loading-dots { display: inline-flex; align-items: center; gap: 4px; }
.loading-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: dot 1.2s infinite; }
.loading-dots i:nth-child(2) { animation-delay: .15s; }
.loading-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 70%, 100% { opacity: .25; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }

.kv { display: grid; grid-template-columns: 112px 1fr; gap: 10px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); }

@media (max-width: 760px) {
  .wrap, .wrap-wide { width: min(100% - 28px, 1200px); }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .section-head h2 { font-size: 23px; }
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal { max-height: 92vh; border-radius: 18px 18px 0 0; }
  .drawer { width: 100vw; }
  .kv { grid-template-columns: 88px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* 全局弹层滚动锁定 */
.no-scroll { overflow: hidden; }
