/* 荧光绿：近白的纸、墨色字、一支荧光笔（只用来铺底、划重点，不用作文字色），纸页小人做吉祥物。只用系统字体，不加载外部字体。 */
:root {
  color-scheme: light dark;
  --paper: #fffefb;
  --paper-2: #f7f6f0;
  --sheet: #fffffe;
  --rule: #ecebe3;
  --rule-2: #dcdbd2;
  --ink: #16170f;
  --ink-2: #45473f;
  --ink-3: #66685e;
  --accent: #d6f36b;
  --accent-2: #c8e752;
  --accent-ink: #16170f;
  --accent-wash: #f3f9dc;
  --mark: #4a6310;
  --danger: #c0392b;
  --danger-wash: #fbebe8;
  --ok: #2f7a4b;
  --ok-wash: #e7f4eb;
  --warn-wash: #fff5d6;
  --focus: #16170f80;
  --shadow: 0 1px 2px #16170f12, 0 12px 28px -18px #16170f55;
  --sticker: #fffefb;
  --hl: var(--accent);   /* 标题荧光笔；深色模式压暗，免得浅色字压在亮绿上看不清 */

  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;

  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 24px);
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141510;
    --paper-2: #1b1c16;
    --sheet: #202119;
    --rule: #2e3027;
    --rule-2: #40423a;
    --ink: #efefe7;
    --ink-2: #c6c8bd;
    --ink-3: #9d9f94;
    --accent-2: #e3f88f;
    --accent-wash: #272e14;
    --mark: #d6f36b;
    --danger: #f08a7c;
    --danger-wash: #3a1f1b;
    --ok: #7fd39f;
    --ok-wash: #1b3123;
    --warn-wash: #36301a;
    --focus: #d6f36b99;
    --shadow: 0 1px 0 #00000066, 0 14px 30px -18px #000000cc;
    --hl: #55631f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
a:hover { color: var(--mark); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
/* 标题、导语、按钮这类短文本只在标点和空格处换行，避免把一个词拆到两行；长段落仍按字换行，右边才整齐 */
h1, h2, h3, .lede, .h-note, .drop-title, .drop-hint, summary, .btn, .h-checks li, .h-tool .d { word-break: keep-all; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .tabular { font-variant-numeric: tabular-nums; }
/* 吉祥物：纸页小人。身体用荧光色，折角用纸色，描边固定墨色（深色模式下也像一张贴纸） */
.fa { fill: var(--accent); }
.fp { fill: var(--sticker); }
/* 深色模式：吉祥物的墨线会融进深色背景，整只加一圈浅色描边（像模切贴纸）；身体外的问号、zzz 也改成墨线，和手脚一样被描边 */
@media (prefers-color-scheme: dark) {
  svg:has(.fa) { filter: drop-shadow(1.2px 0 0 var(--ink)) drop-shadow(-1.2px 0 0 var(--ink)) drop-shadow(0 1.2px 0 var(--ink)) drop-shadow(0 -1.2px 0 var(--ink)); }
  svg:has(.fa) [stroke="currentColor"] { stroke: #16170f; }
  svg:has(.fa) [fill="currentColor"] { fill: #16170f; }
}

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 6px 12px; z-index: 10; border-radius: 8px; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- 页头 ---------- */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; flex: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 36px; }
.site-nav { flex: 1; display: flex; justify-content: center; gap: 4px; }
.site-nav a { text-decoration: none; color: var(--ink-2); padding: 8px 14px; font-size: 15px; white-space: nowrap; border-radius: 10px; }
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--accent-wash); }
.head-cta { flex: none; margin-left: auto; }
@media (max-width: 760px) {
  .site-nav { display: none; }
  .site-head .wrap { min-height: 60px; }
}

/* ---------- 页脚 ---------- */
.site-foot { position: relative; margin-top: clamp(110px, 10vw, 150px); border-top: 1px solid var(--rule-2); background: var(--paper-2); }
.foot-sleep { position: absolute; right: 12%; top: -82px; width: 112px; height: 84px; }
.foot-main { display: flex; flex-wrap: wrap; gap: 36px 64px; padding-top: 52px; padding-bottom: 36px; }
.foot-brand { flex: 1 1 240px; max-width: 320px; }
.foot-brand .brand { font-size: 19px; }
.foot-brand p { margin-top: 12px; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.foot-index { flex: 3 1 600px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.foot-index h3 { font-size: 14px; margin-bottom: 12px; }
.foot-index ul { list-style: none; margin: 0; padding: 0; }
.foot-index li { font-size: 14px; line-height: 2.1; }
.foot-index a { text-decoration: none; color: var(--ink-2); }
.foot-index a:hover { color: var(--ink); text-decoration: underline; }
.foot-base { padding-top: 18px; padding-bottom: 30px; border-top: 1px solid var(--rule-2); display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--ink-3); }
.foot-base a { color: var(--ink-3); }
.foot-base .sp { margin-left: auto; }
@media (max-width: 820px) {
  .foot-index { grid-template-columns: repeat(2, minmax(0, 1fr)); flex-basis: 100%; }
  .foot-base .sp { margin-left: 0; }
  .foot-sleep { right: 20px; }
}

/* ---------- 通用按钮与表单 ---------- */
.btn {
  appearance: none; border: 1.5px solid var(--rule-2); background: var(--sheet); color: var(--ink);
  min-height: 44px; padding: 0 18px; border-radius: var(--r); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease);
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.dark:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--paper); }
.btn.block { width: 100%; min-height: 50px; font-size: 16px; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn svg { width: 16px; height: 16px; flex: none; }
.linkish { appearance: none; border: 0; background: none; padding: 0; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; font-size: 14px; }
.linkish:hover { color: var(--ink); text-decoration-color: currentColor; }

.field { display: grid; gap: 6px; }
.field + .field { margin-top: 16px; }
.field > label, .field > .label, .field > legend { font-size: 13px; color: var(--ink-2); font-weight: 600; padding: 0; }
.field .hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 8px 12px; border: 1.5px solid var(--rule-2); border-radius: 10px;
  background: var(--sheet); color: var(--ink); font-size: 15px;
}
textarea.input { min-height: 72px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 60%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; min-width: 0; }
input[type="range"] { width: 100%; accent-color: var(--ink); }
input[type="color"] { width: 44px; height: 42px; padding: 3px; border: 1.5px solid var(--rule-2); border-radius: 10px; background: var(--sheet); flex: none; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; flex: none; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); cursor: pointer; }
.check + .check { margin-top: 6px; }

/* 分段选择：一行几个互斥选项，选中的铺荧光色 */
.seg { display: flex; border: 1.5px solid var(--rule-2); border-radius: var(--r); overflow: hidden; background: var(--sheet); }
.seg label { flex: 1; position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 8px; font-size: 14px; color: var(--ink-2); text-align: center; line-height: 1.25; }
.seg label + label span { border-left: 1px solid var(--rule); }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }
.seg.stack { flex-direction: column; }
.seg.stack label + label span { border-left: 0; border-top: 1px solid var(--rule); }
.seg.stack span { justify-content: flex-start; padding: 9px 12px; flex-direction: column; align-items: flex-start; gap: 2px; }
.seg.stack span small { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.seg.stack input:checked + span small { color: color-mix(in oklab, var(--accent-ink) 70%, transparent); }

/* ---------- 工具页 ---------- */
.tool-head { padding: clamp(28px, 4.5vw, 52px) 0 clamp(20px, 3vw, 30px); }
.crumb { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; }
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.crumb [aria-current] { color: var(--ink-2); }
.tool-head h1 { margin-top: 12px; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.15; letter-spacing: -0.02em; }
.lede { margin-top: 12px; font-size: clamp(15px, 1.6vw, 17px); color: var(--ink-2); max-width: 46em; }
.assure { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 13px; color: var(--ink-2); background: var(--sheet); }
.assure svg { width: 14px; height: 14px; color: var(--ink); }

/* 工作台：一张墨线描边的大卡片，上面是结果，下面左边操作区、右边设置 */
.bench {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "result result" "stage panel";
  border: 1.5px solid var(--ink); border-radius: var(--r-xl); background: var(--sheet); padding: 0 24px;
  scroll-margin-top: 16px;
}
.bench > .result { grid-area: result; }
.bench > .stage { grid-area: stage; padding: 24px 24px 26px 0; min-width: 0; }
.bench > .panel { grid-area: panel; padding: 24px 0 26px 24px; border-left: 1px solid var(--rule); }
.panel-title { font: 600 12px/1 var(--sans); letter-spacing: 0.14em; color: var(--ink-3); margin-bottom: 16px; }
/* 主按钮区吸在屏幕底部：设置项多时不用滚到底才找得到按钮（进度条也在这里） */
.panel .actions { margin-top: 22px; display: grid; gap: 10px; position: sticky; bottom: 0; z-index: 2; background: var(--sheet); padding: 12px 0 14px; margin-bottom: -14px; }
/* 键盘切换、自动滚动到某个设置项时，给吸底按钮区留出位置，免得选项落在按钮区下面 */
html:has(.panel .actions) { scroll-padding-bottom: 120px; }
.panel .why { font-size: 12.5px; color: var(--ink-3); text-align: center; min-height: 1.5em; }
/* 结果页：处理成功后工作台只剩回执，设置栏和操作区收起，「返回修改设置」再展开 */
.bench.done { grid-template-columns: minmax(0, 1fr); grid-template-areas: "result"; }
.bench.done > .stage, .bench.done > .panel { display: none; }
.bench.done[data-keep-stage] { grid-template-areas: "result" "stage"; }
.bench.done[data-keep-stage] > .stage { display: block; padding: 22px 0 26px; }
.bench.done .receipt { padding: clamp(28px, 4vw, 44px) clamp(0px, 2vw, 20px) clamp(30px, 4vw, 44px); border-bottom: 0; }
.bench.done[data-keep-stage] .receipt { border-bottom: 1px solid var(--rule); }
.bench.done .receipt .dl { margin-top: 20px; gap: 10px; }
.bench.done .receipt .dl .btn.primary { min-height: 56px; padding: 0 30px; font-size: 17px; }
.bench.done .receipt .dl .btn:not(.primary) { min-height: 56px; }
.receipt .dl-file { margin-top: 10px; display: flex; gap: 10px; align-items: baseline; min-width: 0; font-size: 13px; color: var(--ink-3); }
.receipt .dl-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt .dl-file small { flex: none; font-variant-numeric: tabular-nums; }

/* 手机浮动按钮（core.js 的 makeFloatRun 控制显隐） */
.run-float { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in oklab, var(--paper) 94%, transparent); border-top: 1px solid var(--rule); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (min-width: 901px) { .run-float { display: none !important; } }

@media (max-width: 900px) {
  /* 手机上工作台向两侧留白各借一点（离屏幕边 10px），把宽度留给缩略图和签字板 */
  .bench { grid-template-columns: minmax(0, 1fr); grid-template-areas: "result" "stage" "panel"; padding: 0 12px; margin-inline: calc(10px - var(--gut)); border-radius: var(--r-lg); }
  .bench > .stage { padding: 18px 0; }
  .bench > .panel { padding: 18px 0 22px; border-left: 0; border-top: 1px solid var(--rule); }
}

/* 投放区：虚线圆角框 */
.drop {
  position: relative; display: grid; place-items: center; text-align: center;
  min-height: clamp(220px, 30vw, 290px); padding: 28px 20px;
  background: var(--paper-2); border: 2px dashed var(--rule-2); border-radius: var(--r-lg);
  cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.drop:hover { border-color: var(--ink-3); }
.drop.over { border-color: var(--ink); background: var(--accent-wash); }
.drop .drop-in { display: grid; gap: 10px; justify-items: center; }
.drop .drop-mark { width: 40px; height: 50px; color: var(--ink); }
.drop .drop-title { font: 700 20px/1.4 var(--sans); }
.drop .drop-hint { font-size: 14px; color: var(--ink-2); }
.drop .btn { margin-top: 8px; }
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop.compact { min-height: 0; padding: 14px 16px; place-items: stretch; text-align: left; border-width: 1.5px; border-radius: var(--r); background: transparent; }
.drop.compact .drop-in { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; }
.drop.compact .drop-mark { width: 18px; height: 22px; }
.drop.compact .drop-title { font: 600 14px/1.4 var(--sans); }
.drop.compact .drop-hint, .drop.compact .btn { display: none; }
.drop.compact.nudge { border-style: solid; border-color: var(--ink); background: var(--accent-wash); }
.drop.compact.nudge .drop-title { font-weight: 700; }

.stage-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; color: var(--ink-3); }
.stage-bar .sp { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.stage-bar b { color: var(--ink); font-weight: 600; }

/* 文件清单 */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); counter-reset: led; }
.ledger li { display: grid; grid-template-columns: 28px 26px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.ledger li.sortable-ghost { opacity: .35; }
.ledger li.sortable-chosen { background: var(--accent-wash); }
.ledger .idx { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; }
.ledger .grip { cursor: grab; color: var(--ink-3); display: grid; place-items: center; height: 32px; touch-action: none; }
.ledger .grip svg { width: 14px; height: 14px; }
.ledger .nm { min-width: 0; }
.ledger .nm b { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger .nm small { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.ledger .nm small.err { color: var(--danger); }
.ledger .thumb { width: 34px; height: 44px; object-fit: contain; background: #fff; border: 1px solid var(--rule); border-radius: 4px; }
.ledger .ops { display: flex; gap: 2px; }
.icon-btn { appearance: none; border: 0; background: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; cursor: pointer; color: var(--ink-3); }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn[disabled] { opacity: .3; cursor: default; }

/* 页面缩略图网格 */
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px 14px; }
@media (max-width: 520px) { .pages { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; } }
.pg { position: relative; display: grid; gap: 6px; justify-items: center; user-select: none; -webkit-user-select: none; }
.pg .sheet { position: relative; width: 100%; aspect-ratio: 0.74; display: grid; place-items: center; background: var(--paper-2); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--rule); cursor: pointer; overflow: hidden; transition: box-shadow .2s var(--ease); }
.pg .sheet canvas, .pg .sheet img { max-width: 90%; max-height: 90%; width: auto; height: auto; transition: transform .25s var(--ease); background: #fff; box-shadow: 0 1px 3px #16170f26; }
.pg .sheet .ph { font-size: 12px; color: var(--ink-3); }
.pg .cap { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; display: flex; gap: 6px; align-items: center; }
.pg .tick { position: absolute; z-index: 1; pointer-events: none; top: 6px; left: 6px; width: 22px; height: 22px; border: 1.5px solid var(--rule-2); background: var(--sheet); border-radius: 6px; display: grid; place-items: center; color: var(--accent-ink); }
.pg .tick svg { width: 12px; height: 12px; opacity: 0; }
.pg.sel .sheet { box-shadow: inset 0 0 0 2.5px var(--ink); }
.pg.sel .tick { background: var(--accent); border-color: var(--ink); }
.pg.sel .tick svg { opacity: 1; }
.pg.gone .sheet { opacity: .3; }
.pg.gone .sheet::after { content: "删除"; position: absolute; inset: auto 0 40%; text-align: center; font: 700 14px/1 var(--sans); color: var(--danger); letter-spacing: .3em; }
.pg .pg-ops { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.pg:hover .pg-ops, .pg:focus-within .pg-ops { opacity: 1; }
@media (hover: none) { .pg .pg-ops { opacity: 1; } }
.pg .pg-ops .icon-btn { width: 28px; height: 28px; background: var(--sheet); box-shadow: 0 0 0 1px var(--rule-2); }
.pg.sortable-ghost { opacity: .3; }
.pg.sortable-drag .sheet { box-shadow: inset 0 0 0 2.5px var(--ink), var(--shadow); }

/* 进度：墨线描边的胶囊条，荧光色填充 */
.progress { margin-top: 14px; }
.progress .bar { height: 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--sheet); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.progress .bar.indet i { width: 30% !important; animation: indet 1.1s var(--ease) infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.progress .txt { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }

/* 结果：回执 */
.receipt { padding: 22px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 20px; align-items: start; animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.stamp { grid-row: span 3; width: 60px; height: 60px; border: 1.5px solid var(--ink); background: var(--accent); color: var(--accent-ink); border-radius: 50%; display: grid; place-items: center; font: 700 15px/1 var(--sans); letter-spacing: .08em; padding-left: .08em; }
.receipt.error .stamp, .receipt.empty .stamp { background: var(--paper-2); border-color: var(--ink-3); color: var(--ink-2); }
.receipt h2 { font-size: 20px; }
.receipt .meta { color: var(--ink-2); font-size: 14px; }
.receipt .meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
.receipt .dl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.receipt .files { list-style: none; padding: 0; margin: 10px 0 0; max-height: 220px; overflow: auto; border-top: 1px solid var(--rule); }
.receipt .files li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.receipt .files li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt .files li small { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.receipt .next { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.receipt .next p { flex-basis: 100%; margin-bottom: 2px; font-size: 14px; font-weight: 600; color: var(--ink); }
.receipt .next p small { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.receipt .preview { margin-top: 12px; max-height: 360px; overflow: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper-2); }
.receipt .preview img { margin: 0 auto; }
@media (max-width: 520px) { .stamp { width: 50px; height: 50px; font-size: 13px; } .receipt { gap: 4px 14px; } }
/* 手机结果页：印章缩小靠左，标题绕排；下载按钮占满一行，另外两个按钮平分下一行 */
@media (max-width: 520px) {
  .bench.done .receipt { display: block; }
  .bench.done .receipt .stamp { float: left; width: 46px; height: 46px; font-size: 12.5px; margin: 0 12px 6px 0; }
  .bench.done .receipt .dl { clear: both; padding-top: 6px; }
  .bench.done .receipt .dl .btn { flex: 1 1 0; padding: 0 12px; }
  .bench.done .receipt .dl .btn.primary { flex-basis: 100%; }
}

.notice { margin-top: 12px; padding: 10px 14px; font-size: 13.5px; line-height: 1.6; background: var(--warn-wash); color: var(--ink); border-radius: 10px; }
.notice.info { background: var(--paper-2); color: var(--ink-2); }
.notice.err { background: var(--danger-wash); }
.notice a, .notice button { color: inherit; }

/* ---------- 正文 ---------- */
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 56px; padding-top: clamp(44px, 6vw, 72px); }
.doc > * { grid-column: 1; }
.doc > .related { grid-column: 2; grid-row: 1 / span 6; align-self: start; position: sticky; top: 20px; }
.doc > section + section { margin-top: 44px; }
.doc > .related { margin-top: 0; }
.doc h2 { font-size: 22px; margin-bottom: 14px; letter-spacing: -0.02em; }
.doc .intro p { font-size: 16px; line-height: 1.85; color: var(--ink); max-width: 40em; }
.doc .intro p + p { margin-top: 12px; }
.doc .steps ol { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.doc .steps li { counter-increment: st; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; padding: 12px 0; border-top: 1px solid var(--rule); }
.doc .steps li:last-child { border-bottom: 1px solid var(--rule); }
.doc .steps li::before { content: counter(st); width: 26px; height: 26px; margin-top: 1px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--ink); color: var(--accent-ink); font: 700 13px/1 var(--sans); font-variant-numeric: tabular-nums; }
.doc .scen ul, .doc .limits ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.doc .scen li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.doc .scen li:last-child { border-bottom: 1px solid var(--rule); }
.doc .scen li b { font-weight: 600; }
.doc .scen li span { color: var(--ink-2); }
.doc .limits li { position: relative; padding: 4px 0 4px 18px; color: var(--ink-2); }
.doc .limits li::before { content: ""; position: absolute; left: 2px; top: 0.95em; width: 7px; height: 2px; background: var(--ink-3); }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-52%); font: 300 26px/1 var(--sans); color: var(--ink); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: translateY(-52%) rotate(45deg); }
.faq details p { padding: 0 36px 18px 0; color: var(--ink-2); max-width: 42em; }
.related h2 { font-size: 13px; color: var(--ink-3); letter-spacing: .14em; font-weight: 600; }
.related ul { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.related li a { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.related li a b { font-weight: 600; }
.related li a span { font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.related li a:hover b { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc > .related { grid-column: 1; grid-row: auto; position: static; margin-top: 48px; order: 10; }
  .doc .scen li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- 首页 ---------- */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--ink-3); }
.h-sec-title { margin-top: 12px; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.2; letter-spacing: -0.02em; }

.h-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: clamp(52px, 8vw, 104px); }
.h-badge { display: inline-flex; align-items: center; gap: 9px; padding: 7px 16px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 14px; color: var(--ink-2); background: var(--sheet); }
.h-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--ink); }
.h-hero h1 { margin-top: 28px; font-size: clamp(36px, 5.6vw, 78px); line-height: 1.16; letter-spacing: -0.02em; }
.hl { background: linear-gradient(to top, transparent 3%, var(--hl) 3%, var(--hl) 36%, transparent 36%); padding: 0 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.h-hero .lede { margin: 24px auto 0; max-width: 33em; font-size: clamp(16px, 1.45vw, 19px); line-height: 1.8; text-wrap: balance; }

.h-drop-card { position: relative; width: 100%; max-width: 680px; margin-top: 104px; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--r-xl); padding: 22px; text-align: center; }
.h-peek { position: absolute; top: -75px; left: 48px; width: 100px; height: 76px; }
.h-drop-card .drop { min-height: 0; padding: 36px 20px 32px; }
.h-drop-card .drop .btn { min-height: 50px; padding: 0 26px; font-size: 17px; }
.h-drop-card .drop .drop-change { display: none; }
.h-drop-card .drop.compact { padding: 12px 16px; }
.h-drop-card .drop.compact .drop-in { grid-template-columns: auto minmax(0, 1fr) auto; justify-items: start; }
.h-drop-card .drop.compact .drop-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-drop-card .drop.compact .drop-change { display: inline; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
.h-drop-card.picked .pick { margin-top: 14px; }
.h-drop-card.picked .h-quick { display: none; }
.pick { margin-top: 18px; text-align: left; }
.pick h3 { font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.pick .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pick .pick-group { margin-top: 16px; }
.h-quick { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: var(--ink-3); }
.h-quick span { margin-right: 4px; }
.h-quick a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--rule-2); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.h-quick a:hover { border-color: var(--ink); color: var(--ink); }

/* 对比面板：上传式工具 → 这里 */
.h-compare { max-width: 1100px; margin: clamp(80px, 9vw, 112px) auto 0; }
.h-panel { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 28px; padding: 32px; display: flex; align-items: stretch; gap: 20px; }
.h-card { position: relative; flex: 1 1 0; min-width: 0; background: var(--sheet); border: 1px solid var(--rule-2); border-radius: var(--r-lg); padding: 28px 28px 30px; }
.h-card.strong { border: 1.5px solid var(--ink); }
.h-card .h-mascot { position: absolute; top: -66px; right: 32px; }
.h-card-head { margin-top: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.h-card-head h3 { font-size: 24px; }
.h-card-head span { font-size: 14px; color: var(--ink-3); }
.h-checks { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 15px; font-size: 16px; color: var(--ink-2); }
.h-card.strong .h-checks { color: var(--ink); }
.h-checks li { display: flex; gap: 12px; align-items: center; }
.h-checks svg { width: 16px; height: 16px; flex: none; }
.h-mid { flex: 0 0 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.h-pill { background: var(--accent); color: var(--accent-ink); padding: 6px 16px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.h-mid small { font-size: 14px; color: var(--ink-2); }

/* 工具目录：三栏，每栏一到两类 */
.h-tools { padding-top: clamp(88px, 10vw, 136px); }
.h-center { text-align: center; }
.h-note { margin-top: 14px; font-size: 16px; color: var(--ink-2); }
.h-cols { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px 56px; align-items: start; }
.h-col { display: flex; flex-direction: column; gap: 40px; }
.h-group { scroll-margin-top: 24px; }
.h-group-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); }
.h-group-head h3 { font-size: 18px; }
.h-group-head span { font-size: 13px; color: var(--ink-3); }
.h-list { list-style: none; margin: 0; padding: 0; }
.h-list li { border-bottom: 1px solid var(--rule); }
.h-tool { display: flex; align-items: center; gap: 12px; padding: 14px 2px; min-height: 44px; text-decoration: none; }
.h-tool:hover { color: var(--ink); }
.h-tool .txt { flex: 1; min-width: 0; }
.h-tool .name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.h-tool .d { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.h-tool:hover .name b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.h-tool .chev { width: 16px; height: 16px; flex: none; transition: transform .2s var(--ease); }
.h-tool:hover .chev { transform: translateX(3px); }
.tag { font-size: 12px; font-weight: 600; background: var(--accent); color: var(--accent-ink); padding: 2px 8px; border-radius: 999px; }

/* 问答 */
.h-faq { max-width: 820px; margin: 0 auto; padding-top: clamp(96px, 10vw, 144px); text-align: center; }
.h-faq > svg { margin: 0 auto; }
.h-faq .eyebrow { margin-top: 14px; }
.h-faq-box { margin-top: 44px; text-align: left; border: 1px solid var(--rule-2); border-radius: var(--r-lg); padding: 0 clamp(18px, 3vw, 30px); background: var(--sheet); }
.h-faq-box details:first-of-type { border-top: 0; }
.h-faq-box details:last-of-type { border-bottom: 0; }
.h-faq-box summary { padding: 22px 40px 22px 0; font-size: 17px; }
.h-faq-box details p { font-size: 15.5px; line-height: 1.85; padding-bottom: 24px; }

/* 收尾横幅 */
.h-cta { max-width: 1240px; margin: clamp(96px, 10vw, 144px) auto 0; }
.h-cta-box { position: relative; background: color-mix(in oklab, var(--accent) 22%, var(--paper)); border: 1px solid color-mix(in oklab, var(--accent) 45%, var(--paper)); border-radius: 28px; padding: clamp(56px, 7vw, 92px) 24px; text-align: center; }
.h-cta-box > :not(.h-cta-mascot) { position: relative; z-index: 1; }
.h-cta-box h2 { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.25; letter-spacing: -0.02em; }
.h-cta-box p { margin: 18px auto 0; max-width: 28em; font-size: 17px; line-height: 1.8; color: var(--ink-2); }
.h-cta-box .btn { margin-top: 32px; min-height: 56px; padding: 0 26px; font-size: 17px; }
.h-cta-mascot { position: absolute; left: 4.5%; bottom: -2px; width: 200px; height: 164px; }

@media (max-width: 760px) {
  .h-panel { flex-direction: column; gap: 0; padding: 20px; padding-top: 64px; }
  .h-mid { flex: 0 0 auto; padding: 20px 0 84px; }
  .h-mid svg, .h-mid small, .h-card-head span { display: none; }
  .h-card { padding: 24px 22px 26px; }
  .h-cta-mascot { display: none; }
}

/* 页面载入：首屏依次浮现 */
@media (prefers-reduced-motion: no-preference) {
  .h-hero > * { animation: rise .6s var(--ease) both; }
  .h-hero > :nth-child(2) { animation-delay: .06s; }
  .h-hero > :nth-child(3) { animation-delay: .12s; }
  .h-hero > :nth-child(4) { animation-delay: .18s; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- 说明页 ---------- */
.infopage { max-width: 760px; padding-top: clamp(32px, 5vw, 60px); }
.infopage h1 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.02em; }
.infopage .updated { margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.infopage section { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--rule); }
.infopage section h2 { font-size: 19px; margin-bottom: 10px; }
.infopage section p, .infopage section li { color: var(--ink-2); }
.infopage section p + p { margin-top: 10px; }
.infopage section ul { padding-left: 1.2em; margin: 10px 0 0; }

/* ---------- 工具专用的小部件 ---------- */
.canvas-pad { position: relative; border: 1.5px solid var(--rule-2); border-radius: var(--r); background: #fff; touch-action: none; overflow: hidden; }
.canvas-pad canvas { width: 100%; height: 180px; cursor: crosshair; }
.canvas-pad .pad-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #66685e; font-size: 14px; pointer-events: none; }
.place { position: relative; margin: 0 auto; background: #fff; box-shadow: var(--shadow); touch-action: pan-x pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.place canvas.page { width: 100%; height: auto; }
.place .box { position: absolute; border: 1.5px dashed #16170f; cursor: move; touch-action: none; }
.place .box img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.place .box .h { position: absolute; right: -8px; bottom: -8px; width: 16px; height: 16px; background: #d6f36b; border: 1.5px solid #16170f; border-radius: 4px; cursor: nwse-resize; touch-action: none; }
.place .crop-shade { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.place .crop-shade i { position: absolute; box-shadow: 0 0 0 9999px #16170f6b; }
.place .crop { position: absolute; border: 1.5px solid #16170f; cursor: move; touch-action: none; }
.place .crop .h { position: absolute; width: 16px; height: 16px; background: #d6f36b; border: 1.5px solid #16170f; border-radius: 4px; touch-action: none; }
.place .crop .h.nw { left: -8px; top: -8px; cursor: nwse-resize; }
.place .crop .h.ne { right: -8px; top: -8px; cursor: nesw-resize; }
.place .crop .h.sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.place .crop .h.se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.textout { width: 100%; min-height: 280px; font: 13px/1.6 var(--sans); padding: 12px; border: 1.5px solid var(--rule-2); border-radius: var(--r); background: var(--sheet); color: var(--ink); resize: vertical; white-space: pre-wrap; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; font-size: 13px; color: var(--ink-2); margin-top: 12px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
