/* 轻办公 — 设计系统 */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --border: #dde3ec;
  --border-strong: #c8d1dd;
  --text: #151b26;
  --text-dim: #536174;
  --text-faint: #8792a3;
  --primary: #1f5eff;
  --primary-d: #194fcf;
  --primary-soft: #e8efff;
  --accent: #0f8f68;
  --accent-soft: #e5f5ee;
  --danger: #d94852;
  --warn: #a86510;
  --paper: #fffdf8;
  --paper-line: #dfe7f2;
  --ink-soft: #eaf2ff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 8px 22px rgba(16, 24, 40, .08), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-lg: 0 22px 52px rgba(16, 24, 40, .16);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}
[data-theme="dark"] {
  --bg: #0d1118;
  --surface: #171c25;
  --surface-2: #202735;
  --border: #2b3545;
  --border-strong: #3d4a5f;
  --text: #eef2f8;
  --text-dim: #a5afbf;
  --text-faint: #728097;
  --primary: #6f92ff;
  --primary-d: #5d80f5;
  --primary-soft: #202c4d;
  --accent: #38c889;
  --accent-soft: #153428;
  --paper: #1d2430;
  --paper-line: #344056;
  --ink-soft: #19253b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary-soft) 44%, transparent) 0, transparent 360px),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--primary-soft); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent); outline-offset: 2px; }
.qo-skip { position: fixed; left: 16px; top: 10px; z-index: 2000; transform: translateY(-140%); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; box-shadow: var(--shadow-md); }
.qo-skip:focus { transform: translateY(0); }

/* ---------- 顶栏 ---------- */
.qo-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.qo-header-in { max-width: var(--maxw); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
.qo-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.qo-logo { width: 34px; height: 34px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; box-shadow: var(--shadow-sm); flex: none; overflow: hidden; }
.qo-logo img { width: 34px; height: 34px; display: block; }
.qo-brand-name { font-weight: 700; font-size: 17px; letter-spacing: .3px; white-space: nowrap; }
.qo-brand-sub { font-size: 11.5px; color: var(--text-faint); margin-top: -2px; }
.qo-header-spacer { flex: 1; }
.qo-localbadge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 6px 11px; border-radius: 999px; white-space: nowrap; flex: none; }
.qo-localbadge svg { width: 15px; height: 15px; }
.qo-localbadge-ico { display: inline-flex; width: 15px; height: 15px; }
.qo-iconbtn { width: 38px; height: 38px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; color: var(--text-dim); cursor: pointer; display: grid; place-items: center; transition: .15s; }
.qo-iconbtn:hover { color: var(--text); border-color: var(--border-strong); }
.qo-iconbtn svg { width: 18px; height: 18px; }

/* ---------- 主容器 ---------- */
.qo-main { max-width: var(--maxw); margin: 0 auto; padding: 20px 20px 80px; }

/* ---------- 首页 Hero ---------- */
.qo-hero { display: grid; gap: 18px; padding: 20px 0 18px; border-bottom: 1px solid var(--border); }
.qo-hero-console { grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); align-items: stretch; border-bottom: none; }
.qo-hero-copy { min-width: 0; align-self: center; }
.qo-hero-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 12.5px; font-weight: 800; margin-bottom: 8px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border)); border-radius: 999px; padding: 5px 10px; }
.qo-hero-kicker svg { width: 16px; height: 16px; }
.qo-hero h1 { font-size: 36px; line-height: 1.12; margin: 0 0 10px; letter-spacing: 0; max-width: 620px; }
.qo-hero p { color: var(--text-dim); font-size: 15.5px; margin: 0; max-width: 660px; }
.qo-hero-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 18px; }
.qo-hero-action { min-height: 88px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); padding: 11px; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s, border-color .16s, background .16s; }
.qo-hero-action:hover { transform: translateY(-1px); border-color: var(--border-strong); box-shadow: var(--shadow-md); background: color-mix(in srgb, var(--surface) 88%, var(--primary-soft)); }
.qo-hero-action-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.qo-hero-action.good .qo-hero-action-ico { background: var(--accent-soft); color: var(--accent); }
.qo-hero-action.hot .qo-hero-action-ico { background: #fdeaea; color: var(--danger); }
.qo-hero-action.calm .qo-hero-action-ico { background: #f1ebfd; color: #7952d6; }
[data-theme="dark"] .qo-hero-action.hot .qo-hero-action-ico { background: #3a1f22; }
[data-theme="dark"] .qo-hero-action.calm .qo-hero-action-ico { background: #2a1f44; }
.qo-hero-action-ico svg { width: 21px; height: 21px; }
.qo-hero-action-copy { display: grid; gap: 3px; min-width: 0; }
.qo-hero-action-copy b { font-size: 13.5px; line-height: 1.25; }
.qo-hero-action-copy em { font-style: normal; font-size: 12px; line-height: 1.35; color: var(--text-dim); }
.qo-hero-action-go { color: var(--text-faint); display: grid; place-items: center; }
.qo-hero-action-go svg { width: 16px; height: 16px; }
.qo-hero-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.qo-hero-metric { display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 78%, transparent); border-radius: 999px; padding: 6px 10px; color: var(--text-dim); }
.qo-hero-metric b { color: var(--text); font-size: 15px; line-height: 1; }
.qo-hero-metric em { font-style: normal; font-size: 12px; font-weight: 700; }
.qo-hero-panel { display: grid; gap: 10px; min-width: 0; }
.qo-docstage { min-height: 238px; position: relative; border: 1px solid var(--border); border-radius: 8px; background:
  linear-gradient(135deg, color-mix(in srgb, var(--paper) 92%, var(--primary-soft)), var(--surface));
  overflow: hidden; box-shadow: var(--shadow-sm); }
.qo-docstage::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--paper-line) 1px, transparent 1px), linear-gradient(90deg, var(--paper-line) 1px, transparent 1px); background-size: 28px 28px; opacity: .34; }
.qo-doc-card { position: absolute; width: 178px; min-height: 150px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); box-shadow: 0 16px 36px rgba(16, 24, 40, .14); padding: 16px; display: grid; align-content: start; gap: 12px; }
.qo-doc-card-a { left: 11%; top: 25px; transform: rotate(-4deg); }
.qo-doc-card-b { right: 10%; bottom: 24px; transform: rotate(5deg); }
.qo-doc-tab { width: 44px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: #fdeaea; color: var(--danger); font-size: 12px; font-weight: 900; }
.qo-doc-line { display: block; height: 8px; border-radius: 999px; background: var(--paper-line); }
.qo-doc-line.w1 { width: 86%; } .qo-doc-line.w2 { width: 68%; } .qo-doc-line.w3 { width: 78%; } .qo-doc-line.w4 { width: 52%; }
.qo-doc-chip { width: fit-content; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 900; }
.qo-doc-chip.safe { color: var(--accent); background: var(--accent-soft); }
.qo-doc-chip.audit { color: var(--primary); background: var(--primary-soft); }
.qo-doc-float { position: absolute; width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-md); }
.qo-doc-float svg { width: 21px; height: 21px; }
.qo-doc-lock { left: 49%; top: 36px; color: var(--primary); }
.qo-doc-check { right: 21%; top: 92px; color: var(--accent); }
.qo-trust { display: grid; grid-template-columns: repeat(3, minmax(132px, 1fr)); gap: 8px; min-width: 420px; }
.qo-trust-compact { grid-template-columns: 1fr; min-width: 0; }
.qo-trust-chip { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); padding: 10px 11px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.qo-trust-chip i { grid-row: 1 / 3; width: 22px; height: 22px; display: grid; place-items: center; color: var(--accent); }
.qo-trust-chip i svg { width: 18px; height: 18px; }
.qo-trust-chip b { color: var(--text); font-size: 12.5px; line-height: 1.2; }
.qo-trust-chip em { color: var(--text-faint); font-size: 11.5px; font-style: normal; line-height: 1.25; }

/* ---------- 搜索 ---------- */
.qo-searchbar { max-width: 760px; margin: 18px 0 6px; position: relative; }
.qo-searchbar svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-faint); }
.qo-searchbar input { width: 100%; padding: 14px 16px 14px 44px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 15px; box-shadow: var(--shadow-sm); outline: none; transition: .15s; }
.qo-searchbar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* ---------- 分类区 ---------- */
.qo-catnav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; margin: 16px 0 8px; }
.qo-cat-pill { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: .15s; }
.qo-cat-pill:hover { color: var(--text); }
.qo-cat-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }

.qo-catblock { margin-top: 26px; }
.qo-catblock-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 14px; }
.qo-catblock-title .dot { width: 9px; height: 9px; border-radius: 3px; }

/* ---------- PDF 快速入口 ---------- */
.pdf-quick { margin-top: 22px; }
.pdf-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.pdf-quick-card { min-height: 86px; display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; text-align: left; padding: 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow-sm); transition: background .16s, border-color .16s, box-shadow .16s; }
.pdf-quick-card:hover { background: color-mix(in srgb, var(--surface) 88%, var(--primary-soft)); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.pdf-quick-ico { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; color: #e5484d; background: #fdeaea; }
.pdf-quick-ico svg { width: 23px; height: 23px; }
.pdf-quick-copy { display: grid; gap: 3px; min-width: 0; }
.pdf-quick-copy b { font-size: 14px; line-height: 1.25; }
.pdf-quick-copy em { font-style: normal; color: var(--text-dim); font-size: 12.5px; line-height: 1.35; }
[data-theme="dark"] .pdf-quick-ico { background: #3a1f22; }

/* ---------- 工具卡片网格 ---------- */
.qo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 14px; }
.qo-card { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; cursor: pointer; transition: background .16s, box-shadow .16s, border-color .16s; display: flex; flex-direction: column; gap: 9px; position: relative; overflow: hidden; min-height: 166px; color: var(--text); }
.qo-card:hover { background: color-mix(in srgb, var(--surface) 88%, var(--primary-soft)); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.qo-card:active { background: var(--surface-2); }
.qo-card-ico { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; font-size: 22px; flex: none; }
.qo-card-ico svg { width: 24px; height: 24px; }
.qo-card-name { font-weight: 700; font-size: 15.5px; }
.qo-card-desc { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.qo-card-meta { margin-top: auto; font-size: 11.5px; color: var(--text-faint); }
.qo-card-tag { position: absolute; top: 12px; right: 12px; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.qo-card-tag.hot { background: #ffeede; color: #d2660a; }
.qo-card-tag.new { background: var(--primary-soft); color: var(--primary-d); }

.cat-pdf   { --c: #e5484d; --cs: #fdeaea; }
.cat-image { --c: #2458d3; --cs: #eaf0ff; }
.cat-text  { --c: #12a150; --cs: #e6f6ec; }
.cat-qr    { --c: #8b5cf6; --cs: #f1ebfd; }
[data-theme="dark"] .cat-pdf { --cs: #3a1f22; }
[data-theme="dark"] .cat-image { --cs: #1c2540; }
[data-theme="dark"] .cat-text { --cs: #143025; }
[data-theme="dark"] .cat-qr { --cs: #2a1f44; }
.qo-card-ico { background: var(--cs); color: var(--c); }
.qo-catblock-title .dot { background: var(--c); }

.qo-empty { text-align: center; color: var(--text-faint); padding: 60px 0; }

/* ---------- 工具页 ---------- */
.qo-toolpage { max-width: 860px; margin: 0 auto; }
.qo-toolhead { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 4px; }
.qo-toolhead .qo-card-ico { width: 50px; height: 50px; border-radius: 10px; }
.qo-toolhead-txt h2 { margin: 2px 0 4px; font-size: 21px; }
.qo-toolhead-txt p { margin: 0; color: var(--text-dim); font-size: 14px; }
.qo-backbtn { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 14px; font-weight: 600; cursor: pointer; background: none; border: none; padding: 8px 0; margin-bottom: 8px; }
.qo-backbtn:hover { color: var(--text); }
.qo-backbtn svg { width: 18px; height: 18px; }
.qo-privacy-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 9px 13px; margin: 14px 0 18px; }
.qo-privacy-note svg { width: 16px; height: 16px; flex: none; }
.qo-privacy-note--warn { color: var(--warn); background: #fdefdd; }
[data-theme="dark"] .qo-privacy-note--warn { background: #3a2913; }

.qo-checkline { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.qo-checkline input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- PDF 工作台 ---------- */
.pdfs-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: sticky; top: 60px; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.pdfs-count { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.pdfs-bar .sep { width: 1px; height: 22px; background: var(--border); margin: 0 2px; }
.pdf-suite-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; background:
  linear-gradient(135deg, color-mix(in srgb, var(--surface) 82%, var(--primary-soft)), var(--surface));
  border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm); overflow: hidden; position: relative; }
.pdf-suite-intro::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--danger), var(--primary), var(--accent)); }
.pdf-suite-kicker { display: inline-flex; width: fit-content; margin-bottom: 5px; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 800; }
.pdf-suite-copy { position: relative; z-index: 1; }
.pdf-suite-copy h3 { margin: 0 0 4px; font-size: 18px; }
.pdf-suite-copy p { margin: 0 0 13px; color: var(--text-dim); font-size: 13.5px; }
.pdf-suite-badges { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 280px; }
.pdf-suite-badges span { border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-dim); padding: 5px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pdf-taskgrid { position: relative; z-index: 1; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.pdf-task { min-height: 82px; display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; padding: 10px; transition: background .15s, border-color .15s, box-shadow .15s; }
.pdf-task:hover { background: var(--surface-2); border-color: var(--border-strong); }
.pdf-task.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary-soft); }
.pdf-task-ico { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: #e5484d; background: #fdeaea; }
.pdf-task-ico svg { width: 20px; height: 20px; }
.pdf-task-copy { display: grid; gap: 2px; min-width: 0; }
.pdf-task-copy b { font-size: 13.5px; line-height: 1.2; }
.pdf-task-copy em { font-size: 12px; line-height: 1.35; font-style: normal; color: var(--text-dim); }
[data-theme="dark"] .pdf-task-ico { background: #3a1f22; }
.pdf-flow-wrap { position: relative; z-index: 1; grid-column: 1 / -1; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--surface) 86%, transparent); padding: 12px; }
.pdf-flow-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.pdf-flow-head span { font-size: 13px; font-weight: 800; color: var(--text); }
.pdf-flow-head em { font-style: normal; color: var(--text-faint); font-size: 12px; }
.pdf-flowgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pdf-flow { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; text-align: left; padding: 10px; display: grid; gap: 7px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; }
.pdf-flow:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.pdf-flow-label { color: var(--primary); font-size: 12px; font-weight: 900; }
.pdf-flow b { font-size: 12.5px; line-height: 1.35; color: var(--text); }
.pdf-flow-steps { display: flex; flex-wrap: wrap; gap: 5px; }
.pdf-flow-step { display: inline-flex; align-items: center; gap: 4px; color: var(--text-dim); background: var(--surface-2); border-radius: 999px; padding: 3px 7px; font-size: 11.5px; font-weight: 800; }
.pdf-flow-step em { width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--primary); font-style: normal; font-size: 10px; }
.pdf-tabbar { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin: 2px 0 18px; }
.pdf-tab { border: none; background: none; padding: 9px 12px; font-size: 14px; font-weight: 600; color: var(--text-dim); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 8px 8px 0 0; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.pdf-tab svg { width: 17px; height: 17px; }
.pdf-tab:hover { color: var(--text); background: var(--surface-2); }
.pdf-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.pdf-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; }
.pdf-info-row { min-height: 64px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); display: grid; gap: 4px; align-content: center; }
.pdf-info-row span { color: var(--text-faint); font-size: 12px; }
.pdf-info-row b { color: var(--text); font-size: 13.5px; line-height: 1.35; word-break: break-word; }
.pdf-info-clear { margin-top: 2px; align-items: flex-start; line-height: 1.45; }
.pdf-info-filelist { display: grid; gap: 7px; margin-top: 11px; }
.pdf-info-file { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 38px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 7px 10px; }
.pdf-info-file-index { width: 24px; height: 24px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.pdf-info-file-name { min-width: 0; color: var(--text); font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-info-file-size { color: var(--text-faint); font-size: 12px; white-space: nowrap; }
.pdf-info-errors { display: grid; gap: 4px; border: 1px solid var(--warn); border-radius: 8px; background: #fff8eb; color: #7a3f00; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
[data-theme="dark"] .pdf-info-errors { background: #342411; color: #ffd18b; }
.pdf-audit-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 9px; }
.pdf-audit-stat { min-height: 86px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); padding: 11px 12px; display: grid; align-content: center; gap: 3px; }
.pdf-audit-stat span { color: var(--text-faint); font-size: 12px; }
.pdf-audit-stat b { color: var(--text); font-size: 22px; line-height: 1.15; letter-spacing: 0; }
.pdf-audit-stat em { color: var(--text-dim); font-size: 12px; font-style: normal; line-height: 1.3; }
.pdf-audit-stat.good { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.pdf-audit-stat.warn { background: #fff7e8; border-color: #f1d7a5; }
.pdf-audit-stat.bad { background: #fdecec; border-color: #f2b8bb; }
[data-theme="dark"] .pdf-audit-stat.warn { background: #342713; border-color: #6b4d1c; }
[data-theme="dark"] .pdf-audit-stat.bad { background: #3a1e22; border-color: #6e2d34; }
.pdf-audit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.pdf-audit-action { display: grid; gap: 2px; text-align: left; min-width: 190px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); padding: 10px 12px; cursor: pointer; box-shadow: var(--shadow-sm); }
.pdf-audit-action:hover { border-color: var(--primary); background: var(--primary-soft); }
.pdf-audit-action b { font-size: 13px; }
.pdf-audit-action span { color: var(--text-dim); font-size: 12px; line-height: 1.35; }
.pdf-audit-ok { color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; font-weight: 700; }
.pdf-audit-list { display: grid; gap: 10px; }
.pdf-audit-card { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 12px; box-shadow: var(--shadow-sm); }
.pdf-audit-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.pdf-audit-name { display: grid; gap: 2px; min-width: 0; }
.pdf-audit-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-audit-name span { color: var(--text-dim); font-size: 12.5px; }
.pdf-audit-score { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; font-size: 18px; background: var(--surface-2); color: var(--text); }
.pdf-audit-score.good { background: var(--accent-soft); color: var(--accent); }
.pdf-audit-score.warn { background: #fff2d8; color: var(--warn); }
.pdf-audit-score.bad { background: #fde1e3; color: var(--danger); }
.pdf-audit-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pdf-audit-chip { border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); background: var(--surface-2); padding: 3px 8px; font-size: 12px; font-weight: 700; }
.pdf-audit-chip.good { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.pdf-audit-chip.warn { color: var(--warn); background: #fff7e8; border-color: #f1d7a5; }
.pdf-audit-meta { margin-top: 9px; color: var(--text-dim); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; line-height: 1.4; word-break: break-word; }
.pdf-audit-issues { display: grid; gap: 7px; margin-top: 10px; }
.pdf-audit-issue { border-left: 3px solid var(--border-strong); background: var(--surface-2); border-radius: 7px; padding: 8px 10px; display: grid; gap: 2px; }
.pdf-audit-issue b { font-size: 13px; }
.pdf-audit-issue span { color: var(--text-dim); font-size: 12.5px; line-height: 1.35; }
.pdf-audit-issue.good { border-left-color: var(--accent); }
.pdf-audit-issue.warn { border-left-color: var(--warn); }
.pdf-audit-issue.bad { border-left-color: var(--danger); }
.pdfs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.pdfs-grid.sz-s { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); }
.pdfs-grid.sz-l { grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); }
.pdfs-grid.sz-s .pdfs-thumb { height: 124px; }
.pdfs-grid.sz-l .pdfs-thumb { height: 236px; }
.pdfs-egroup { border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; margin-bottom: 12px; }
.pdfs-egroup h4 { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.pdfs-erow { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.pdfs-erow + .pdfs-erow { margin-top: 10px; }
.pdfs-erow .qo-input, .pdfs-erow select.qo-select { max-width: 150px; }
.pdfs-blank { background: repeating-linear-gradient(45deg,#fafafa,#fafafa 8px,#f0f0f0 8px,#f0f0f0 16px); }
.pdfs-page { position: relative; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; background: var(--surface-2); transition: box-shadow .15s, border-color .15s; }
.pdfs-page.sel { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.pdfs-page.dragover { border-color: var(--primary); border-style: dashed; }
.pdfs-thumb { position: relative; height: 168px; display: grid; place-items: center; cursor: zoom-in; background: #fff; overflow: hidden; }
.pdfs-thumb img { max-width: 92%; max-height: 92%; transition: transform .2s; display: block; box-shadow: 0 1px 5px rgba(0,0,0,.18); }
.pdfs-thumb .pdfs-spin { font-size: 11px; color: var(--text-faint); }
.pdfs-num { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.62); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; pointer-events: none; }
.pdfs-src { position: absolute; left: 6px; top: 6px; background: var(--primary-soft); color: var(--primary-d); font-size: 10px; padding: 1px 6px; border-radius: 6px; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.pdfs-check { position: absolute; right: 6px; top: 6px; width: 19px; height: 19px; accent-color: var(--primary); cursor: pointer; z-index: 3; }
.pdfs-zoomhint { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.5); color: #fff; border-radius: 6px; width: 22px; height: 22px; display: grid; place-items: center; pointer-events: none; }
.pdfs-zoomhint svg { width: 13px; height: 13px; }
.pdfs-acts { display: flex; justify-content: center; gap: 1px; padding: 4px; border-top: 1px solid var(--border); background: var(--surface); }
.pdfs-acts button { border: none; background: none; color: var(--text-dim); cursor: pointer; padding: 5px; border-radius: 6px; display: grid; place-items: center; }
.pdfs-acts button:hover { background: var(--surface-2); color: var(--text); }
.pdfs-acts button.del:hover { color: var(--danger); }
.pdfs-acts svg { width: 15px; height: 15px; }
/* 灯箱（点开放大） */
.pdfs-lb { position: fixed; inset: 0; z-index: 1000; background: rgba(8,10,16,.9); display: flex; flex-direction: column; }
.pdfs-lb-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: #fff; flex-wrap: wrap; }
.pdfs-lb-title { font-size: 14px; font-weight: 600; }
.pdfs-lb-sub { font-size: 12px; color: rgba(255,255,255,.65); }
.pdfs-lb-spacer { flex: 1; }
.pdfs-lb-stage { flex: 1; display: grid; place-items: center; overflow: auto; padding: 8px; position: relative; }
.pdfs-lb-stage canvas { max-width: 95%; max-height: 100%; background: #fff; box-shadow: 0 8px 36px rgba(0,0,0,.55); border-radius: 2px; }
.pdfs-lb-btn { background: rgba(255,255,255,.16); color: #fff; border: none; border-radius: 8px; padding: 8px 13px; cursor: pointer; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.pdfs-lb-btn:hover { background: rgba(255,255,255,.28); }
.pdfs-lb-btn svg { width: 16px; height: 16px; }
.pdfs-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 26px; line-height: 1; color: #fff; background: rgba(0,0,0,.35); border: none; cursor: pointer; width: 46px; height: 70px; border-radius: 10px; }
.pdfs-lb-nav:hover { background: rgba(0,0,0,.55); }
.pdfs-lb-prev { left: 12px; } .pdfs-lb-next { right: 12px; }
@media (max-width: 640px){ .pdfs-bar { top: 54px; } .pdfs-thumb { height: 140px; } .pdfs-lb-nav { width: 38px; height: 56px; } }

/* ---------- Section / 卡片块 ---------- */
.qo-sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.qo-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.qo-sec-title { margin: 0; font-size: 14.5px; font-weight: 700; }
.qo-sec-body { }

/* ---------- 表单控件 ---------- */
.qo-field { margin-bottom: 14px; }
.qo-field:last-child { margin-bottom: 0; }
.qo-field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.qo-field-hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; }
.qo-field-hint--warn { color: var(--warn); }
.qo-input, .qo-select, textarea.qo-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: 14px; outline: none; transition: .15s; font-family: inherit;
}
.qo-input:focus, .qo-select:focus, textarea.qo-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.qo-input { resize: vertical; min-height: 120px; line-height: 1.6; }
.qo-row { display: flex; gap: 12px; flex-wrap: wrap; }
.qo-row > * { flex: 1; min-width: 120px; }
.qo-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

input[type="range"].qo-range { width: 100%; accent-color: var(--primary); }
input[type="color"].qo-color { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.qo-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.qo-check input { width: 16px; height: 16px; accent-color: var(--primary); }

/* 分段选择 */
.qo-seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.qo-seg-item { border: none; background: none; padding: 7px 13px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-dim); cursor: pointer; transition: .12s; }
.qo-seg-item.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ---------- 按钮 ---------- */
.qo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; transition: .14s; }
.qo-btn:hover { background: var(--surface-2); }
.qo-btn:disabled { opacity: .5; cursor: not-allowed; }
.qo-btn-ico { display: inline-flex; }
.qo-btn-ico svg { width: 17px; height: 17px; }
.qo-btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.qo-btn-primary:hover { background: var(--primary-d); }
.qo-btn-danger { color: var(--danger); }
.qo-btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.qo-btn-ghost { border-color: transparent; background: transparent; padding: 7px; }
.qo-btn-ghost:hover { background: var(--surface-2); }
.qo-btn-block { width: 100%; }
.qo-btn-sm { padding: 6px 10px; font-size: 12.5px; }
.qo-btn-ghost.qo-btn-sm { width: 30px; height: 30px; padding: 0; }
.qo-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- 进度条 ---------- */
.qo-prog { margin-top: 14px; }
.qo-prog-track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.qo-prog-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), #0f9f8f); border-radius: 999px; transition: width .25s; }
.qo-prog.indet .qo-prog-bar { animation: qo-indet 1.1s ease-in-out infinite; }
@keyframes qo-indet { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.qo-prog-txt { font-size: 12.5px; color: var(--text-dim); margin-top: 7px; text-align: center; }

/* ---------- 拖拽上传区 ---------- */
.qo-dz { position: relative; border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 34px 20px; text-align: center; cursor: pointer; transition: .16s; background: var(--surface); }
.qo-dz:hover { border-color: var(--primary); background: var(--primary-soft); }
.qo-dz.drag { border-color: var(--primary); background: var(--primary-soft); transform: scale(1.005); }
.qo-dz-ico { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.qo-dz-ico svg { width: 26px; height: 26px; }
.qo-dz-main { font-weight: 600; font-size: 15px; }
.qo-dz-hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }
.qo-dz-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* ---------- 文件列表 ---------- */
.qo-filelist { display: flex; flex-direction: column; gap: 8px; }
.qo-fl-row { display: flex; align-items: center; gap: 12px; padding: 9px 11px; background: var(--surface-2); border-radius: var(--radius-sm); }
.qo-fl-idx { width: 22px; height: 22px; flex: none; border-radius: 6px; background: var(--surface); color: var(--text-dim); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.qo-fl-ico { width: 30px; height: 30px; flex: none; color: var(--text-faint); display: grid; place-items: center; }
.qo-fl-ico svg { width: 22px; height: 22px; }
.qo-fl-thumb { width: 40px; height: 40px; flex: none; object-fit: cover; border-radius: 7px; background: var(--surface); border: 1px solid var(--border); }
.qo-fl-meta { flex: 1; font-size: 13px; color: var(--text); word-break: break-all; min-width: 0; }
.qo-fl-actions { display: flex; gap: 2px; flex: none; }

/* ---------- 结果区 / 缩略图 ---------- */
.qo-result { border-color: var(--accent); }
.qo-result-body { display: flex; flex-direction: column; gap: 12px; }
.qo-result-stat { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13.5px; }
.qo-result-stat b { color: var(--accent); }
.qo-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.qo-thumb { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.qo-thumb img, .qo-thumb canvas { display: block; width: 100%; height: 130px; object-fit: contain; background: repeating-conic-gradient(#0001 0% 25%, transparent 0% 50%) 50% / 18px 18px; }
.qo-thumb-cap { font-size: 11.5px; color: var(--text-dim); padding: 6px 8px; text-align: center; border-top: 1px solid var(--border); word-break: break-all; }
.qo-preview-img { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ---------- 页脚 ---------- */
.qo-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.qo-footer-in { max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 32px; text-align: center; color: var(--text-faint); font-size: 12.5px; line-height: 1.9; }
.qo-footer a { color: var(--text-faint); }
.qo-footer a:hover { color: var(--text-dim); }
.qo-footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.qo-footer-links a { font-weight: 700; color: var(--text-dim); }

/* ---------- 合规页面 ---------- */
.qo-legalpage .qo-sec { margin-top: 16px; }
.qo-legal-list { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: 13.5px; line-height: 1.75; }
.qo-legal-list li + li { margin-top: 6px; }
.qo-license-list { display: grid; gap: 8px; }
.qo-license-row { display: grid; grid-template-columns: 160px 120px 1fr; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; color: var(--text); background: var(--surface); }
.qo-license-row:hover { border-color: var(--border-strong); background: var(--surface-2); }
.qo-license-name { font-weight: 800; }
.qo-license-meta { color: var(--primary); font-size: 12px; font-weight: 700; }
.qo-license-detail { color: var(--text-dim); font-size: 13px; }

/* ---------- Toast ---------- */
.qo-toasts { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.qo-toast { padding: 11px 18px; border-radius: 12px; background: var(--text); color: var(--surface); font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: .28s; max-width: 86vw; }
.qo-toast.show { opacity: 1; transform: translateY(0); }
.qo-toast-error { background: var(--danger); color: #fff; }
.qo-toast-warn { background: var(--warn); color: #fff; }
.qo-toast-success { background: var(--accent); color: #fff; }

/* 裁剪 / 画布交互 */
.qo-stage { position: relative; max-width: 100%; margin: 0 auto; touch-action: none; user-select: none; background: repeating-conic-gradient(#0001 0% 25%, transparent 0% 50%) 50% / 20px 20px; border-radius: var(--radius-sm); overflow: hidden; }
.qo-stage canvas { display: block; max-width: 100%; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .qo-main { padding: 16px 14px 70px; }
  .qo-hero { gap: 14px; padding-top: 10px; }
  .qo-hero-console { grid-template-columns: 1fr; }
  .qo-hero h1 { font-size: 27px; }
  .qo-hero p { font-size: 14.5px; }
  .qo-hero-actions { display: flex; overflow-x: auto; gap: 8px; margin: 14px -14px 0; padding: 0 14px 3px; scroll-snap-type: x mandatory; }
  .qo-hero-actions::-webkit-scrollbar { display: none; }
  .qo-hero-action { min-width: 254px; min-height: 76px; scroll-snap-align: start; }
  .qo-hero-panel { gap: 8px; }
  .qo-docstage { min-height: 136px; }
  .qo-doc-card { width: 124px; min-height: 96px; padding: 10px; gap: 7px; }
  .qo-doc-tab { width: 38px; height: 24px; font-size: 11px; }
  .qo-doc-card-a { left: 8%; top: 16px; }
  .qo-doc-card-b { right: 7%; bottom: 14px; }
  .qo-doc-float { width: 34px; height: 34px; }
  .qo-doc-float svg { width: 17px; height: 17px; }
  .qo-doc-lock { left: 48%; top: 20px; }
  .qo-doc-check { right: 18%; top: 56px; }
  .qo-trust { min-width: 0; grid-template-columns: 1fr; }
  .qo-trust-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .qo-trust-compact .qo-trust-chip { display: flex; align-items: center; gap: 5px; padding: 8px 7px; min-width: 0; }
  .qo-trust-compact .qo-trust-chip i { width: 16px; height: 16px; flex: none; }
  .qo-trust-compact .qo-trust-chip i svg { width: 14px; height: 14px; }
  .qo-trust-compact .qo-trust-chip b { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .qo-trust-compact .qo-trust-chip em { display: none; }
  .qo-brand-sub { display: none; }
  .qo-localbadge span.lb-long { display: none; }
  .qo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; }
  .qo-card { padding: 14px; }
  .pdf-quick-grid { grid-template-columns: 1fr; }
  .pdf-taskgrid { grid-template-columns: 1fr; }
  .pdf-suite-intro { grid-template-columns: 1fr; }
  .pdf-suite-badges { justify-content: flex-start; max-width: none; }
  .pdf-suite-intro { padding: 14px; }
  .pdf-flow-head { display: grid; gap: 1px; }
  .pdf-flowgrid { grid-template-columns: 1fr; }
  .pdf-tab { flex: 1 1 calc(50% - 4px); justify-content: center; padding: 9px 8px; }
  .pdf-info-grid { grid-template-columns: 1fr; }
  .qo-sec { padding: 15px; }
  .qo-header-in { padding: 10px 14px; }
  .qo-searchbar { margin-top: 14px; }
  .qo-license-row { grid-template-columns: 1fr; gap: 2px; }
}
* { -webkit-tap-highlight-color: transparent; }
html { touch-action: manipulation; }
