:root {
  --bg: #f5faf7;
  --card: #ffffff;
  --primary: #0d7a4f;
  --primary-dark: #0c5c3f;
  --text: #14231c;
  --muted: #5b6b63;
  --border: #d7e5dc;
  --ok: #039855;
  --warn: #b54708;
  --danger: #d92d20;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(10, 61, 44, 0.08);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.55;
}
a { color: var(--primary); text-decoration: none; }
.container { max-width: 1080px; margin: 0 auto; padding: 16px; }
.nav {
  background: #0a3d2c; color: #fff; position: sticky; top: 0; z-index: 20;
  box-shadow: var(--shadow);
}
.nav-inner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; max-width: 1080px; margin: 0 auto; }
.nav a { color: #d7ebe1; font-size: 14px; }
.demo-banner { background: #fff7ed; color: #9a3412; text-align: center; padding: 8px 16px; font-size: 14px; border-bottom: 1px solid #fed7aa; }
.nav-more { position: relative; }
.nav-more summary { color: #d7ebe1; cursor: pointer; font-size: 14px; }
.nav-more[open] { background: #fff; border-radius: 10px; padding: 8px 10px; }
.nav-more[open] summary, .nav-more[open] a { color: var(--text); display: block; padding: 4px 0; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #e7f6ee; color: var(--primary-dark); font-size: 12px; }
.brand { font-weight: 700; font-size: 18px; margin-right: auto; color: #fff !important; display: inline-flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 6px;
  display: inline-block; object-fit: contain; flex-shrink: 0;
  background: transparent;
}
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin: 12px 0; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
h1,h2,h3 { margin: 0.4em 0; }
.muted { color: var(--muted); font-size: 13px; }
.btn {
  display: inline-block; background: var(--primary); color: #fff !important; border: none;
  border-radius: 10px; padding: 10px 16px; cursor: pointer; font-size: 14px;
}
.btn[hidden], [hidden] { display: none !important; }
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: #fff; color: var(--primary) !important; border: 1px solid var(--primary); }
.btn.danger { background: var(--danger); }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; background: #fff;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { border-bottom: 1px solid var(--border); padding: 8px; text-align: left; vertical-align: top; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #e8f7ef; color: #0c5c3f; }
.badge.warn { background: #fffaeb; color: var(--warn); }
.badge.ok { background: #ecfdf3; color: var(--ok); }
.badge.err { background: #fef3f2; color: var(--danger); }
.count-card {
  margin: 14px 0;
  padding: 12px 14px;
  border: 2px solid var(--primary);
  background: #f3faf6;
  font-size: 18px;
  font-weight: 700;
}
.lock-field { position: relative; }
.lock-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  color: #c2410c;
  font-weight: 700;
  cursor: help;
}
.lock-icon { width: 14px; height: 14px; flex: none; }
.lock-tip {
  display: none;
  position: absolute;
  z-index: 5;
  left: 0;
  top: calc(100% + 6px);
  width: 280px;
  padding: 8px 10px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.lock-badge:hover .lock-tip,
.lock-badge:focus .lock-tip,
.lock-field:focus-within .lock-tip { display: block; }
#chargeDialog {
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 20px 22px;
  max-width: 520px;
  width: calc(100vw - 32px);
  color: #101828;
}
#chargeDialog::backdrop { background: rgba(16, 24, 40, 0.45); }
#chargeDialog h2 { margin: 0 0 12px; font-size: 18px; }
#chargeDialog ul { margin: 0 0 12px; padding-left: 18px; line-height: 1.7; }
#chargeDialog p { line-height: 1.6; }
button:disabled, .btn:disabled {
  background: #d0d5dd;
  color: #667085;
  border-color: #d0d5dd;
  opacity: 1;
  cursor: not-allowed;
}
.lock-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: #fff4e5;
  color: var(--warn);
  border: 1px solid #f5c08a;
  border-radius: 999px;
  font-size: 13px;
}
.lock-mark {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border: 1px solid var(--warn);
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
}
.lock-note {
  padding: 8px 10px;
  background: #fff8e8;
  border: 1px solid #e6d3a1;
}
.hint {
  background: #f2fbf6; border-left: 3px solid var(--primary); padding: 8px 10px; margin: 6px 0 12px;
  font-size: 12px; color: var(--muted);
}
.disclaimer {
  font-size: 12px; color: var(--muted); border-top: 1px dashed var(--border); margin-top: 24px; padding-top: 12px;
}
.flash-err { background: #fef3f2; color: var(--danger); padding: 10px; border-radius: 8px; }
.dyn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 8px; padding: 8px; border: 1px dashed var(--border); border-radius: 8px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a, .tabs button { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; cursor: pointer; }
.tabs .active { background: #e8f7ef; border-color: var(--primary); color: var(--primary); }
.flow { display: flex; gap: 8px; list-style: none; padding: 0; margin: 12px 0 16px; flex-wrap: wrap; }
.flow li { flex: 1; min-width: 160px; background: #f3f7f5; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.flow li span { width: 22px; height: 22px; border-radius: 50%; background: #d7e5dc; color: #14231c; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.flow li.current { background: #e8f7ef; border-color: var(--primary); color: var(--text); }
.flow li.current span, .flow li.done span { background: var(--primary); color: #fff; }
.guide-banner { display: flex; gap: 12px; justify-content: space-between; align-items: center; background: #e7f6ee; border: 1px solid #b7e2cb; border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.guide-banner ol { margin: 4px 0 0; padding-left: 18px; }
.guide-banner li { margin: 2px 0; }
.new-project, .quick-upload { display: grid; gap: 8px; margin-top: 12px; max-width: 520px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.type-groups { display: grid; gap: 12px; margin: 8px 0 12px; }
.type-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.type-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: grid; gap: 4px; cursor: pointer; background: #fff; }
.type-card input { width: auto; }
.type-card span { color: var(--muted); font-size: 12px; }
.chapter-list { list-style: none; padding: 0; margin: 8px 0 0; }
.chapter-list li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.chapter-list li span { flex: 1; }
.chapter-list .btn { padding: 4px 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.next-step { background: #e8f7ef; border-radius: 10px; padding: 10px 12px; }
@media (max-width: 640px) {
  .guide-banner { flex-direction: column; align-items: stretch; }
}
.queue-box {
  margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #e8f7ef; border: 1px solid #b7e2cb;
  font-size: 14px; color: #0a3d2c;
}
.queue-box.done { background: #ecfdf3; border-color: #abefc6; }
.queue-box.failed { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.toast-notify {
  position: fixed; right: 16px; bottom: 16px; z-index: 100;
  background: #0a3d2c; color: #fff; padding: 14px 18px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(10,61,44,0.25); max-width: 320px; display: none;
}
.toast-notify.show { display: block; }
@media (max-width: 640px) {
  .nav-inner { gap: 8px; }
  .brand { width: 100%; margin-bottom: 4px; }
}
