:root {
  --bg: #f7f5f0; --panel: #ffffff; --fg: #1f1d1a; --muted: #6f6a61; --line: #e4dfd5;
  --accent: #2f6b4f; --accent-fg: #ffffff; --accent-soft: #e5efe9;
  --warn: #9a5b00; --warn-soft: #fff3df; --err: #b3261e; --err-soft: #fde8e6;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151514; --panel: #1e1e1c; --fg: #ecebe7; --muted: #a3a097; --line: #34332f;
    --accent: #6fbf95; --accent-fg: #0f1a14; --accent-soft: #1f2e26;
    --warn: #f0b45a; --warn-soft: #33281a; --err: #f28b82; --err-soft: #3a1f1d;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 16px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 860px; margin: 0 auto; padding: 32px 16px 64px; }
header.site { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
header.site a.brand { font-weight: 700; font-size: 18px; color: var(--fg); text-decoration: none; letter-spacing: .02em; }
header.site nav a { color: var(--muted); font-size: 14px; margin-left: 16px; text-decoration: none; }
h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.3; margin: 0 0 12px; font-family: "Songti SC", "Noto Serif SC", serif; }
h2 { font-size: 20px; margin: 0 0 12px; }
p.lead { color: var(--muted); font-size: 17px; margin: 0 0 28px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.steps li b { display: block; color: var(--fg); font-size: 15px; margin-bottom: 2px; }
label { display: block; font-weight: 600; margin: 18px 0 6px; font-size: 15px; }
label:first-child { margin-top: 0; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
input[type=text], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px;
}
textarea { min-height: 260px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.drop { border: 2px dashed var(--line); border-radius: 10px; padding: 28px 16px; text-align: center; cursor: pointer; color: var(--muted); }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { color: var(--fg); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 6px; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600;
  border: 0; border-radius: 8px; padding: 11px 20px; cursor: pointer; background: var(--accent); color: var(--accent-fg);
  text-decoration: none;
}
button.secondary, .btn.secondary { background: transparent; color: var(--fg); border: 1px solid var(--line); }
button:disabled { opacity: .55; cursor: wait; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.msg { border-radius: 8px; padding: 12px 14px; margin-top: 16px; font-size: 15px; }
.msg.err { background: var(--err-soft); color: var(--err); }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.msg.ok { background: var(--accent-soft); color: var(--accent); }
.badge { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.timeline { list-style: none; margin: 16px 0 0; padding: 0; }
.timeline li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.timeline li:last-child { border-bottom: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.timeline li.done .dot { background: var(--accent); border-color: var(--accent); }
.timeline li.active .dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li .count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
table.terms { width: 100%; border-collapse: collapse; font-size: 14px; }
table.terms th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); }
table.terms td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.terms td input[type=text] { padding: 6px 8px; font-size: 14px; }
table.terms tr.verify td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.scroll { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 16px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
pre.log { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 12px; max-height: 200px; overflow: auto; white-space: pre-wrap; }
footer.site { color: var(--muted); font-size: 13px; margin-top: 40px; }
.hidden { display: none !important; }
@media (max-width: 600px) {
  .panel { padding: 18px; }
  .kv { grid-template-columns: 1fr; }
  table.terms .opt { display: none; }
}
