/* 好排版 · 纸白、墨色、朱砂 */
:root {
  --paper: #f6f3ec;
  --card: #fffdf8;
  --ink: #1f1e1b;
  --ink-2: #4a4741;
  --muted: #7a756c;
  --line: #e3ddd0;
  --line-2: #d4ccbb;
  --accent: #a8352b;
  --accent-soft: #f4e3dd;
  --ok: #2f6b4f;
  --ok-soft: #e1eee6;
  --warn: #946312;
  --warn-soft: #f6ecd6;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(40, 30, 10, .05), 0 8px 24px rgba(40, 30, 10, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1a18; --card: #23221f; --ink: #ece8df; --ink-2: #cfc9bc; --muted: #9c968a;
    --line: #34322d; --line-2: #45423b; --accent: #d9695c; --accent-soft: #3a2724;
    --ok: #7fbf9c; --ok-soft: #22322a; --warn: #d6aa55; --warn-soft: #3a3121;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.75 var(--sans); overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.3; letter-spacing: .01em; }
h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 16px; }
h2 { font-size: clamp(22px, 3.2vw, 28px); margin: 0 0 12px; }
h3 { font-size: 18px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
small, .muted { color: var(--muted); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* 顶栏 */
.top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent);
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--serif); font-size: 20px; font-weight: 700; }
.brand:hover { text-decoration: none; }
.seal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 17px; font-family: var(--serif); }
.nav { display: flex; gap: 18px; margin-left: 12px; }
.nav a { color: var(--ink-2); font-size: 15px; }
.nav a.on { color: var(--accent); }
.spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; white-space: nowrap; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
@media (max-width: 760px) {
  .nav { display: none; }
  .top .wrap { gap: 10px; }
}

/* 按钮与表单 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px;
  border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: 600 15px var(--sans);
  cursor: pointer; text-decoration: none; transition: filter .15s; }
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.plain { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn.small { padding: 6px 14px; font-size: 14px; }
.btn.block { width: 100%; }
label { display: block; font-weight: 600; margin: 0 0 6px; }
input[type=text], input[type=email], textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card);
  color: var(--ink); font: 15px/1.6 var(--sans); }
textarea { min-height: 150px; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
.field { margin-bottom: 18px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* 卡片与布局 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
section { padding: 56px 0; }
.eyebrow { color: var(--accent); font-size: 14px; letter-spacing: .12em; font-weight: 600; margin-bottom: 10px; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 640px; }
.alert { padding: 12px 16px; border-radius: 8px; margin: 0 0 16px; font-size: 15px; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.err { background: var(--accent-soft); color: var(--accent); }
.tag { display: inline-block; white-space: nowrap; padding: 1px 8px; border-radius: 4px; font-size: 12px; background: var(--line); color: var(--ink-2); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.err { background: var(--accent-soft); color: var(--accent); }

/* 首页主视觉 */
.hero { padding: 64px 0 40px; }
.hero .grid2 { align-items: center; gap: 48px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.compare { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shot { border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); padding: 14px; min-height: 300px;
  box-shadow: var(--shadow); font-size: 11px; overflow: hidden; }
.shot .cap { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.shot.messy { background: #fff; color: #333; }
.messy .bar { height: 12px; background: #d9dde3; border-radius: 3px; margin-bottom: 6px; }
.messy .ad { height: 46px; background: repeating-linear-gradient(45deg, #ffe9a8, #ffe9a8 8px, #ffdf80 8px, #ffdf80 16px);
  border-radius: 4px; margin: 8px 0; display: grid; place-items: center; color: #8a6400; font-weight: 700; }
.messy .txt { height: 6px; background: #c9ccd1; border-radius: 2px; margin: 5px 0; }
.messy .row { display: flex; gap: 6px; }
.messy .side { width: 34%; }
.messy .main { flex: 1; }
.messy .sub { background: #e8f0ff; color: #3456a0; padding: 6px; border-radius: 4px; margin-top: 8px; }
.shot.clean { font-family: var(--serif); color: var(--ink); padding: 22px 20px; }
.clean .t { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.clean .m { font-size: 10px; color: var(--muted); margin-bottom: 10px; font-family: var(--sans); }
.clean p { font-size: 11px; line-height: 1.8; margin: 0 0 7px; text-align: justify; }
.clean .fig { height: 60px; background: linear-gradient(135deg, #d8cfbd, #b9ae98); border-radius: 3px; margin: 8px 0 4px; }
.clean .fc { font-size: 9px; color: var(--muted); font-family: var(--sans); }
.arrow { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 18px; box-shadow: var(--shadow); }
.feature h3 { display: flex; gap: 8px; align-items: center; }
.num { font-family: var(--serif); color: var(--accent); font-size: 28px; font-weight: 700; line-height: 1; }
.steps { counter-reset: s; display: grid; gap: 14px; }
.steps li { list-style: none; padding-left: 0; }

/* 价格 */
.price { font-family: var(--serif); font-size: 36px; font-weight: 700; }
.price small { font-size: 15px; font-weight: 400; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
table.simple { width: 100%; border-collapse: collapse; font-size: 14px; }
table.simple th, table.simple td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.simple th { color: var(--muted); font-weight: 500; }
.table-scroll { overflow-x: auto; }

/* 工作页 */
.work { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; padding: 32px 0 64px; }
@media (max-width: 960px) { .work { grid-template-columns: 1fr; } }
.side-panel { position: sticky; top: 76px; display: grid; gap: 16px; }
@media (max-width: 960px) { .side-panel { position: static; } }
.status-line { display: flex; align-items: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.cand { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: var(--paper); }
.cand label { display: flex; gap: 10px; font-weight: 400; margin: 0; cursor: pointer; }
.cand input { margin-top: 5px; flex: none; }
.cand .ctx { font-size: 13px; color: var(--muted); margin-top: 6px; word-break: break-all; }
.cand mark { background: var(--accent-soft); color: var(--accent); text-decoration: line-through; padding: 0 2px; }
.cand.kept mark { background: var(--ok-soft); color: var(--ok); text-decoration: none; }
.img-cand { display: flex; gap: 12px; align-items: center; }
.img-cand img { max-width: 120px; max-height: 90px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; }
.cand:not(.kept) .img-cand img { opacity: .45; }
.article-list { margin: 0; padding-left: 22px; }
.article-list li { margin-bottom: 4px; }
.templates { display: grid; gap: 10px; }
.tpl { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; font-weight: 400; margin: 0; }
.tpl:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.tpl input { margin-top: 5px; }
.tpl b { display: block; }
.tpl span { font-size: 13px; color: var(--muted); }
.pages { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 14px; }
.pages img { height: 420px; max-width: none; border: 1px solid var(--line-2); border-radius: 4px; box-shadow: var(--shadow); background: #fff; }
@media (max-width: 600px) { .pages img { height: 320px; } }
.quote-box { font-size: 15px; }
.quote-box .big { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--accent); }
.files a.file { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; margin-bottom: 8px; color: var(--ink); background: var(--paper); }
.files a.file:hover { border-color: var(--accent); text-decoration: none; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.qr { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: 100%; }
.devcode { font-family: ui-monospace, Menlo, monospace; font-size: 26px; letter-spacing: .3em; color: var(--accent); }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); }
.prose h2 { margin-top: 36px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
