/* ===== PDF 工具箱样式（独立；色板与科研导航站、TextDiff、ZHConvert 保持一致） =====
   顶栏 / 语言切换 / 主题按钮 / 说明区沿用各子应用同一套写法，改文案时几处一起看。
   深色模式同样逐个核过对比度：缩略图底板、虚框投放区、选中态在深色下都单独给了值。 */
:root {
  --bg: #f5f6f8;
  --bg-card: #ffffff;
  --bg-hover: #f0f2f5;
  --text: #2c3e50;
  --text-sub: #7f8c9b;
  --border: #e8ebef;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, .1);
  --accent-text: #fff;
  /* 浅底上的主色文字：直接用 --accent 落在 --accent-soft 上只有 ~3.4:1，13px 正文不达标，
     所以单给一个更深的墨蓝（在 --accent-soft 上约 6.6:1）。 */
  --accent-ink: #1d4ed8;
  --danger: #e2544d;
  --ok: #2f9e57;
  --shadow: 0 2px 8px rgba(30, 40, 60, .06);
  --bar-bg: #f7f8fa;
  --stage: #eceff3;
  --drop-bg: #fafbfc;
  --sel: #e8f1ff;
}

html[data-theme="dark"] {
  --bg: #060a17;
  --bg-card: #0d1424;
  --bg-hover: #1a2336;
  --text: #dce3ec;
  --text-sub: #8794a8;
  --border: #1e2a44;
  --accent: #4d94ff;
  --accent-soft: rgba(77, 148, 255, .16);
  --accent-ink: #9cc4ff;
  --danger: #ff6b64;
  --ok: #58c47f;
  --shadow: 0 2px 10px rgba(0, 0, 0, .5);
  --bar-bg: #0a1120;
  --stage: #060d1c;
  --drop-bg: #0a1120;
  --sel: #16305a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  transition: background .25s, color .25s;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 20px;
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.back { font-size: 13px; color: var(--text-sub); white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; display: block; flex: none; }
.brand-mark img { width: 100%; height: 100%; display: block; border-radius: 9px; }
.brand-text h1 { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text p { font-size: 12px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.top-control {
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  border-radius: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.top-control:hover { background: var(--bg-hover); border-color: var(--accent); }
.icon-btn { width: 34px; text-align: center; }
.lang-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); }
.lang-btn {
  display: inline-block; text-decoration: none;
  border: 0; background: transparent; color: var(--text-sub);
  padding: 5px 9px; border-radius: 7px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--accent); color: var(--accent-text); }

main { padding: 14px 20px 60px; max-width: 1320px; margin: 0 auto; }

/* ===== 布局：左侧常驻工具导航 + 右侧工作区 ===== */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 16px; align-items: start; }
/* minmax(0,1fr) 之外再兜一层：栅格项默认 min-width:auto，内容一宽就把整列撑破 */
.workspace { min-width: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ===== 工具导航（15 个工具按用途分 4 组） =====
   桌面是粘性侧栏；≤900px 折成「当前工具 + 展开列表」，见文件末尾的媒体查询。 */
.toolnav {
  position: sticky; top: 62px;
  max-height: calc(100vh - 78px); overflow-y: auto; overscroll-behavior: contain;
  padding: 10px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
}
.navtoggle { display: none; }
.navgroup + .navgroup { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.navgroup-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-sub); padding: 0 9px 5px;
}
.navgroup-body { display: flex; flex-direction: column; gap: 2px; }
.tab {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: 1px solid transparent; background: transparent; color: var(--text-sub);
  border-radius: 8px; padding: 7px 9px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.tab:hover { background: var(--bg-hover); color: var(--text); }
/* 选中态刻意不用实心主色块：15 个工具里只有一个在跑，浅底 + 主色字层级更轻，
   也和右侧「开始处理」那个实心按钮拉开了主次（实心留给动作，浅底留给位置）。 */
.tab.active {
  background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  color: var(--accent-ink); font-weight: 600;
}
/* 图标走 currentColor 继承，所以只在这里定义一次描边，15 个 <use> 自动跟随 */
.tab-ico {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* ===== 工具面板 ===== */
.tool {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 14px 16px 16px;
}
.tool-head { margin-bottom: 12px; }
.tool-head h2 { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.tool-head p { font-size: 12.5px; color: var(--text-sub); line-height: 1.7; }

.bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; margin-bottom: 10px;
  background: var(--bar-bg); border: 1px solid var(--border); border-radius: 10px;
}
.bar .hint { font-size: 12.5px; color: var(--text-sub); }
.btn {
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); background: var(--accent); border-color: var(--accent); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.mini {
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-sub);
  border-radius: 7px; padding: 3px 8px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.mini:hover { background: var(--bg-hover); color: var(--text); border-color: var(--accent); }

/* ===== 投放区 ===== */
.drop {
  /* ⚠ display:block 不能省 —— .drop 是 <label>，默认 inline，而里面 .drop-icon / b / .drop-sub
     都是块级：inline 容器装块级子元素会把盒子打散，结果是虚线边框只在左侧画出一小段、
     内容整体左偏（线上实测过，截图里就是一个残缺的左侧竖线）。 */
  display: block; position: relative; cursor: pointer;
  border: 2px dashed var(--border); border-radius: 11px; background: var(--drop-bg);
  padding: 26px 16px; text-align: center; transition: border-color .2s, background .2s;
}
.drop:hover, .drop:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.drop.dragover { border-color: var(--accent); background: var(--accent-soft); }
.drop b { display: block; font-size: 14px; margin-bottom: 4px; }
.drop .drop-sub { display: block; font-size: 12px; color: var(--text-sub); }
.drop .drop-icon { display: block; font-size: 24px; color: var(--accent); margin-bottom: 6px; line-height: 1; }
.drop.compact { padding: 16px; }

/* ===== 文件列表 ===== */
.filelist { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.filelist:empty { display: none; }
.fitem {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); background: var(--bg-card); border-radius: 10px;
  padding: 7px 10px; font-size: 13px;
}
.fitem.dragging { opacity: .45; }
.fitem.drop-before { border-top: 2px solid var(--accent); }
.fitem.drop-after { border-bottom: 2px solid var(--accent); }
.fitem .grip { color: var(--text-sub); cursor: grab; user-select: none; letter-spacing: -2px; }
.fitem .fthumb {
  width: 34px; height: 42px; flex: none; border-radius: 5px; overflow: hidden;
  background: var(--stage); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-sub); font-weight: 700;
}
.fitem .fthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fitem .fmain { min-width: 0; flex: 1; }
.fitem .fname {
  font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: block;
}
.fitem .fmeta { font-size: 11.5px; color: var(--text-sub); }
.fitem .fops { display: flex; gap: 4px; flex: none; }
.empty-note { font-size: 12.5px; color: var(--text-sub); padding: 8px 2px 0; }

/* ===== 选项区 ===== */
.opts {
  margin-top: 12px; padding: 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bar-bg);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 14px;
}
.opts.single { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
/* 只有一个字段的工具（比如「合并」的输出文件名）以前会被 auto-fit 拉到整个卡片那么宽，
   文本框 850px 配着 6 个字的默认值很别扭。限个宽，多列时仍然照常铺满。 */
.opts > .field { max-width: 420px; }
.opts.single > .field { max-width: none; }
.field > label { font-size: 12px; color: var(--text-sub); }
.field input[type="text"], .field input[type="number"], .field input[type="password"], .field select {
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
  border-radius: 8px; padding: 7px 9px; font-size: 13px; width: 100%;
}
.field textarea {
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
  border-radius: 8px; padding: 7px 9px; font-size: 13px; width: 100%;
  resize: vertical; min-height: 62px; line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.field input[type="color"] {
  border: 1px solid var(--border); background: var(--bg-card); border-radius: 8px;
  width: 100%; height: 34px; padding: 2px; cursor: pointer;
}
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.field .range-row { display: flex; align-items: center; gap: 8px; }
.field .range-val { font-size: 12px; color: var(--text-sub); min-width: 42px; text-align: right; }
.field .sub { font-size: 11.5px; color: var(--text-sub); }

.segmented { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-card); flex-wrap: wrap; }
.segmented button {
  border: 0; background: transparent; color: var(--text-sub);
  padding: 6px 10px; border-radius: 7px; font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--accent); color: var(--accent-text); font-weight: 600; }

.check-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text); }
.check-row input { accent-color: var(--accent); }

/* ===== 缩略图工作台（整理页面） ===== */
.grid {
  margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--stage);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px;
  max-height: min(70vh, 760px); overflow: auto;
}
/* ⚠ 没有文件时它是空的，但 .grid 自带 padding + 底色，会渲染成一条「空灰条」，
   看起来像坏掉的控件（线上实测过）。有 .filelist:empty 的先例，这里同样兜底。 */
.grid:empty { display: none; }
.pg {
  position: relative; background: var(--bg-card); border: 2px solid var(--border);
  border-radius: 8px; padding: 6px; cursor: pointer; user-select: none;
}
.pg:hover { border-color: var(--accent); }
.pg.sel { border-color: var(--accent); background: var(--sel); }
.pg.dragging { opacity: .4; }
.pg.over { border-color: var(--accent); border-style: dashed; }
.pg canvas, .pg img { width: 100%; height: auto; display: block; border-radius: 4px; background: #fff; }
.pg .pgno {
  position: absolute; top: 2px; left: 2px; font-size: 11px; font-weight: 700;
  background: rgba(0, 0, 0, .55); color: #fff; border-radius: 5px; padding: 1px 6px;
}
.pg .pgrot {
  position: absolute; top: 2px; right: 2px; font-size: 10px; font-weight: 700;
  background: var(--accent); color: #fff; border-radius: 5px; padding: 1px 5px;
}
.pg .pgops { display: flex; justify-content: center; gap: 4px; margin-top: 5px; }
.pg .pgops button {
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-sub);
  border-radius: 6px; font-size: 11px; padding: 2px 6px; cursor: pointer;
}
.pg .pgops button:hover { color: var(--accent); border-color: var(--accent); }
.pg .pgops button.del:hover { color: var(--danger); border-color: var(--danger); }

/* ===== 结果区 ===== */
.result {
  margin-top: 12px; padding: 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card);
}
.result-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-head b { font-size: 13.5px; }
.result-meta { font-size: 12px; color: var(--text-sub); }
.result-note { font-size: 12px; color: var(--text-sub); margin-top: 6px; line-height: 1.7; }
.result-list { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.result-list li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.result-list .rname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 进度条（合并 / 拆分 / 渲染缩略图时显示） */
.progress { width: 100%; height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress-text { font-size: 12px; color: var(--text-sub); margin-top: 5px; display: block; }

/* ===== 说明区（在工作区列里，跟工具卡片左对齐；限宽保证行长可读） ===== */
.doc { max-width: 760px; margin: 26px 0 0; line-height: 1.85; font-size: 14px; }
.doc h2 { font-size: 16px; margin: 22px 0 8px; }
.doc p { color: var(--text-sub); }
.doc ul, .doc ol { margin: 8px 0 0 20px; color: var(--text-sub); }
.doc li { margin-bottom: 6px; }
.doc li b { color: var(--text); margin-right: 6px; }
.doc .faq dt { font-weight: 600; margin-top: 10px; }
.doc .faq dd { color: var(--text-sub); margin-left: 0; }
.doc .ver { margin-top: 20px; font-size: 12px; }
/* —— 工具落地页正文（build.mjs 用该工具专属长文替换 .doc 通用说明区后形成，嵌在工具面板下方） —— */
.landing-doc { max-width: 900px; width: 100%; }
.landing-doc .lead { font-size: 15px; color: var(--text-sub); margin-top: 5px; }
.landing-cta-row { margin-top: 14px; }

/* ===== 提示条 ===== */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  max-width: min(92vw, 620px);
  padding: 9px 14px; border-radius: 9px; font-size: 13px;
  background: var(--text); color: var(--bg-card);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
  z-index: 300; pointer-events: none;
}
.toast:empty { display: none; }

/* ≤900px：侧栏折进「当前工具 + 展开列表」，工作区占满整行。
   15 个工具平铺在窄屏要占 5 行、把工具本体挤到折叠线以下，所以这里必须折叠而不是换行。 */
@media (max-width: 900px) {
  .shell { display: block; }
  .toolnav { position: static; max-height: none; overflow: visible; margin-bottom: 12px; padding: 8px 10px; }
  .navtoggle {
    display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
    border: 0; background: transparent; color: var(--text); cursor: pointer; padding: 5px 4px; font-size: 13px;
  }
  .navtoggle-label { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-sub); }
  .navtoggle-name { font-weight: 700; }
  .navtoggle-chev { margin-left: auto; color: var(--text-sub); transition: transform .2s; }
  .toolnav.open .navtoggle-chev { transform: rotate(180deg); }
  .navgroups { display: none; }
  .toolnav.open .navgroups { display: block; padding-top: 6px; }
  .navgroup + .navgroup { margin-top: 8px; padding-top: 8px; }
  .navgroup-title { padding-left: 6px; }
  .tab { padding: 8px 7px; font-size: 13.5px; }
}

@media (max-width: 720px) {
  main { padding: 12px 12px 50px; }
  .topbar { padding: 8px 12px; gap: 10px; }
  .brand-text p { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .doc { font-size: 13.5px; }
  .opts > .field { max-width: none; }
}
/* ===== 签名板 ===== */
.sign-pad {
  width: 100%; max-width: 600px; height: 200px; touch-action: none; display: block;
  background: #fff; border: 1px dashed var(--border); border-radius: 10px; cursor: crosshair;
}

/* ===== 表单字段 ===== */
.forms-fields { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.forms-fields:empty { display: none; }
.form-row { display: flex; flex-direction: column; gap: 4px; }
.form-row > label { font-size: 12px; color: var(--text-sub); }
.form-row .form-type { font-size: 11px; color: var(--text-sub); margin-left: 6px; }
.form-row input[type="text"] {
  padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: 13px;
}
.form-row .check-row { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.forms-note { font-size: 12px; color: var(--text-sub); line-height: 1.7; }

/* ===== 文本对比视图 ===== */
.diff-stat { font-size: 12.5px; color: var(--text-sub); margin: 6px 0 10px; display: flex; gap: 14px; flex-wrap: wrap; }
.diff-stat b.add { color: #16a34a; }
.diff-stat b.del { color: #dc2626; }
.diff-view {
  max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.75;
}
.diff-line { display: flex; gap: 8px; padding: 0 8px; white-space: pre-wrap; word-break: break-word; }
.diff-line .ln { flex: 0 0 44px; text-align: right; color: var(--text-sub); opacity: .6; user-select: none; }
.diff-line .sg { flex: 0 0 10px; user-select: none; }
.diff-add { background: rgba(22, 163, 74, .12); }
.diff-del { background: rgba(220, 38, 38, .12); }
.diff-inline-add { background: rgba(22, 163, 74, .35); border-radius: 3px; }
.diff-inline-del { background: rgba(220, 38, 38, .35); border-radius: 3px; text-decoration: line-through; }
.diff-ctx { color: var(--text-sub); }
.diff-empty { padding: 14px; font-size: 13px; color: var(--text-sub); }
/* ===== SEO 落地页（15 工具 × 3 语言 = 45 个） =====
   这些页以前由 build.mjs 各自注入一段写死的内联样式（只做浅色、自带 header 与 .lang-switch
   规则，和这里的同名类互相打架），和本体是两套观感、也没有深色模式。
   现在统一复用上面这套变量与顶栏，只保留下面这几个落地页专属类。 */
.landing { max-width: 720px; margin: 26px auto 0; line-height: 1.75; }
.landing h2 { font-size: 17px; margin: 26px 0 8px; }
.landing .lead { font-size: 15px; color: var(--text-sub); margin-top: 5px; }

/* 「文件不上传」这条是落地页最该被看见的一句，所以给它一个带左侧色条的独立块 */
.landing-privacy {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 20px 0; padding: 12px 14px; font-size: 13px; line-height: 1.7;
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--ok); border-radius: 10px; box-shadow: var(--shadow);
}
.landing-privacy svg {
  width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--ok);
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.landing-cta { display: inline-block; margin: 2px 0 0; padding: 10px 22px; font-size: 14px; text-decoration: none; }
.landing-cta:hover { text-decoration: none; }
.landing-related {
  list-style: none; margin-top: 10px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px;
}
.landing-related a {
  display: block; padding: 9px 12px; font-size: 13px; text-decoration: none;
  color: var(--text); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 9px;
}
.landing-related a:hover {
  border-color: var(--accent); background: var(--accent-soft);
  color: var(--accent-ink); text-decoration: none;
}
/* 落地页的 How-to 与 FAQ：SEO 长文主体，字号略小、留白充足 */
.landing-howto { margin: 8px 0 0 20px; color: var(--text-sub); }
.landing-howto li { margin-bottom: 6px; }
.landing-faq { margin-top: 8px; }
.landing-faq dt { font-weight: 600; margin-top: 12px; }
.landing-faq dd { color: var(--text-sub); margin: 2px 0 0; line-height: 1.75; }

/* 工具专属正文（落地页 lead 之下的两个段落）：主体内容，留白比 lead 略收敛 */
.landing-body { margin: 18px 0 0; font-size: 14px; color: var(--text); }
.landing-body p { margin: 0 0 12px; color: var(--text); line-height: 1.85; }

/* 主页底部的「各工具详细说明」链接区：给落地页一个可被爬虫跟从的入口 */
.tool-links { margin-top: 30px; }
.tool-links h2 { margin-bottom: 12px; }
.landing-links {
  list-style: none; margin: 8px 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px;
}
.landing-links a {
  display: block; padding: 9px 12px; font-size: 13px; text-decoration: none;
  color: var(--text); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 9px;
}
.landing-links a:hover {
  border-color: var(--accent); background: var(--accent-soft);
  color: var(--accent-ink); text-decoration: none;
}

/* ===== 信任条（工具上方，滚动前就能看到） ===== */
.trust {
  margin-bottom: 12px; padding: 12px 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.trust-title { font-size: 13px; font-weight: 700; margin-bottom: 9px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 14px; }
.trust-item { display: flex; align-items: flex-start; gap: 9px; }
.trust-item svg {
  width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--ok);
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.trust-item b { display: block; font-size: 13px; }
.trust-item span { display: block; font-size: 11.5px; color: var(--text-sub); }

/* ===== 涂黑工作台 ===== */
.redact-stage {
  position: relative; margin-top: 12px; line-height: 0;
  border: 1px solid var(--border); border-radius: 10px; background: var(--stage);
  max-height: min(72vh, 820px); overflow: auto;
}
.redact-stage canvas { display: block; max-width: 100%; height: auto; }
#redact-overlay { position: absolute; top: 0; left: 0; cursor: crosshair; touch-action: none; }
.redact-warn {
  margin-top: 10px; padding: 9px 12px; font-size: 12.5px; line-height: 1.7;
  color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); border-radius: 9px;
}

/* ===== 结果预览弹层 ===== */
.modal {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(0, 0, 0, .55);
}
.modal-card {
  width: min(900px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
  overflow: hidden;
}
.modal-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.modal-head b { font-size: 14px; }
.modal-body { padding: 14px; overflow: auto; text-align: center; }
.preview-canvas, .preview-img {
  max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.preview-note { margin-top: 8px; font-size: 12.5px; color: var(--text-sub); }
