:root{
  color-scheme: light;   /* 界面是明亮风格：强制表单控件用浅色渲染，
                            避免系统深色模式下按钮/输入框变白字白底「隐形」 */
  --brand:#2563eb; --brand-dark:#1d4ed8; --brand-light:#eff6ff; --brand-border:#bfdbfe;
  --bg:#f7f9fc; --card:#ffffff; --line:#e5e9f0; --line-soft:#f0f3f8;
  --text:#1e2939; --text-sub:#5b6879; --text-mute:#8a95a6;
  --ok:#16a34a; --ok-bg:#f0fdf4; --warn:#c77c00; --warn-bg:#fffbeb; --err:#dc2626; --err-bg:#fef2f2;
  --radius:12px; --shadow:0 1px 3px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.05);
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 0; min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", -apple-system, sans-serif;
  background: #f7f9fc; background: var(--bg); color: #1e2939; color: var(--text); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.window {
  width: 100%; min-height: 100vh;
  background: #ffffff; background: var(--card);
  overflow: hidden;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* ---------- 顶部栏 ---------- */
.titlebar {
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 10px 20px; gap: 12px;
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand .brand-name { font-weight: 700; font-size: 18px; color: #111827; letter-spacing: -.01em; }
.brand .brand-sub { font-size: 12.5px; color: var(--text-mute); }
.tb-right { margin-left: auto; font-size: 13px; color: var(--text-mute); display: flex; align-items: center; gap: 10px; }
.tb-link {
  font-size: 13px; color: #4b5563; cursor: pointer; background: none; border: none;
  padding: 4px 0; margin: 0; font-family: inherit; text-decoration: none;
}
.tb-link:hover { color: var(--brand); }
.userbar {
  display: flex; align-items: center; gap: 10px; padding: 9px 22px;
  background: #eff6ff; background: var(--brand-light); border-bottom: 1px solid #bfdbfe; border-bottom: 1px solid var(--brand-border); font-size: 13px; color: #1e40af;
}
.userbar .ub-state { margin-right: auto; font-weight: 600; }

.body { display: flex; min-height: 620px; }

/* ---------- 侧边导航 ---------- */
.sidebar { width: 180px; background: #fff; border-right: 1px solid var(--line); padding: 10px 10px; flex-shrink: 0; }
.logo { display: none; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.nav {
  display: flex; align-items: center; gap: 8px; text-align: left;
  padding: 8px 10px; border: 1px solid transparent; border-radius: 6px;
  background: transparent; cursor: pointer; font-size: 13px; color: var(--text-sub);
  font-family: inherit; transition: .15s; min-height: 0;
}
.nav:hover { background: #eff6ff; background: var(--brand-light); color: #1d4ed8; color: var(--brand-dark); }
.nav.active { background: #2563eb; background: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(37,99,235,.28); }
.nav .nav-ico { font-size: 12px; width: 22px; height: 22px; text-align: center; line-height: 22px;
  border-radius: 6px; background: #eff6ff; background: var(--brand-light); color: #1d4ed8; color: var(--brand-dark); font-weight: 800; }
.nav.active .nav-ico { background: rgba(255,255,255,.22); color: #fff; }

/* 板块配色：Word=蓝（主色）/ Excel=绿 / 设置·说明=中性黑 */
.nav[data-tab="p-word"] .nav-ico { background: #e5edff; color: #1d4ed8; }
.nav[data-tab="p-word"]:hover { background: #eef3ff; color: #1d4ed8; }
.nav[data-tab="p-word"].active { background: #2563eb; color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.28); }
.nav[data-tab="p-word"].active .nav-ico { background: rgba(255,255,255,.24); color: #fff; }

.nav[data-tab="p-excel"] .nav-ico { background: #e3f5ea; color: #15803d; }
.nav[data-tab="p-excel"]:hover { background: #ecf8f1; color: #15803d; }
.nav[data-tab="p-excel"].active { background: #16a34a; color: #fff; box-shadow: 0 2px 8px rgba(22,163,74,.28); }
.nav[data-tab="p-excel"].active .nav-ico { background: rgba(255,255,255,.24); color: #fff; }

/* PDF=红 / PS=紫（Ps 双字母徽标稍宽） */
.nav[data-tab="p-pdf"] .nav-ico { background: #fee2e2; color: #dc2626; }
.nav[data-tab="p-pdf"]:hover { background: #fef2f2; color: #dc2626; }
.nav[data-tab="p-pdf"].active { background: #dc2626; color: #fff; box-shadow: 0 2px 8px rgba(220,38,38,.28); }
.nav[data-tab="p-pdf"].active .nav-ico { background: rgba(255,255,255,.24); color: #fff; }

.nav[data-tab="p-ps"] .nav-ico { background: #f3e8ff; color: #9333ea; width: 26px; }
.nav[data-tab="p-ps"]:hover { background: #faf5ff; color: #9333ea; }
.nav[data-tab="p-ps"].active { background: #9333ea; color: #fff; box-shadow: 0 2px 8px rgba(147,51,234,.28); }
.nav[data-tab="p-ps"].active .nav-ico { background: rgba(255,255,255,.24); color: #fff; }

.nav[data-tab="p-set"] .nav-ico,
.nav[data-tab="p-help"] .nav-ico { background: #eff6ff; background: var(--brand-light); color: #1d4ed8; color: var(--brand-dark); }
.nav[data-tab="p-set"]:hover, .nav[data-tab="p-help"]:hover { background: #eff6ff; background: var(--brand-light); color: #1d4ed8; color: var(--brand-dark); }
.nav[data-tab="p-set"].active, .nav[data-tab="p-help"].active {
  background: #2563eb; background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.28); }
.nav[data-tab="p-set"].active .nav-ico,
.nav[data-tab="p-help"].active .nav-ico { background: rgba(255,255,255,.22); color: #fff; }
.side-note { margin-top: 10px; padding: 0 8px; font-size: 12px; color: var(--text-mute); }
.buyout-btn { display: flex; align-items: center; gap: 8px; width: calc(100% - 16px);
  margin: 10px 8px 4px; padding: 9px 11px; cursor: pointer; text-align: left;
  border: 1px solid #fcd34d; border-radius: 8px; font-family: inherit;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  box-shadow: 0 3px 12px rgba(217,119,6,.14); transition: .16s; }
.buyout-btn:hover { transform: translateY(-1px); border-color: #f59e0b;
  box-shadow: 0 6px 18px rgba(217,119,6,.22); }
.bo-ico { flex: none; width: 26px; height: 26px; border-radius: 8px; text-align: center;
  line-height: 26px; font-size: 15px; color: #fff; background: linear-gradient(135deg,#f59e0b,#d97706); }
.bo-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bo-txt b { font-size: 13.5px; color: #92400e; letter-spacing: .2px; }
.bo-txt em { font-style: normal; font-size: 11px; color: #b45309; }
.side-note ul { margin: 8px 0 0; padding-left: 16px; }
.side-note li { margin: 3px 0; }

/* ---------- 主区 ---------- */
.main { flex: 1; padding: 14px 18px 18px; overflow-y: auto; }
.page-head { margin-bottom: 10px; }
.page-head h1 { margin: 0 0 2px; font-size: 17px; font-weight: 700; }
.page-head .sub { color: var(--text-mute); font-size: 12.5px; margin: 0; }

/* 子标签（Word 板块内部） */
.panel { display: none; }
.panel.active { display: block; }

/* ---------- Excel 板块：整页绿色主题 ---------- */
/* 用 CSS 变量覆盖，使 Excel 面板内的按钮、强调色、输入框聚焦态全部变绿 */
#p-excel {
  --brand: #16a34a; --brand-dark: #15803d; --brand-light: #f0fdf4; --brand-border: #bbf7d0;
}
#p-excel .page-head { border-left: 4px solid #2563eb; border-left: 4px solid var(--brand); padding-left: 12px; }
#p-excel .page-head h1 { color: #15803d; }
#p-excel .sub { color: #4b7c5e; }
#p-excel .card-box { border-color: #d6f0df; }
#p-excel .card-box h3 { color: #15803d; }
#p-excel .subtab:hover, #p-excel .subtab.active { color: #2563eb; color: var(--brand); border-bottom-color: #2563eb; border-bottom-color: var(--brand); }
#p-excel .btn.primary, #p-excel .btn:not(.ghost):not(.plain):not(.tiny):not(.small) {
  background: #2563eb; background: var(--brand); border-color: #2563eb; border-color: var(--brand); }
#p-excel .btn:hover { background: #1d4ed8; background: var(--brand-dark); border-color: #1d4ed8; border-color: var(--brand-dark); }
#p-excel .btn.ghost { color: #2563eb; color: var(--brand); border-color: #bfdbfe; border-color: var(--brand-border); background: #fff; }
#p-excel .btn.ghost:hover { background: #eff6ff; background: var(--brand-light); }
#p-excel .btn.small { background: #2563eb; background: var(--brand); border-color: #2563eb; border-color: var(--brand); color: #fff; }
#p-excel input:focus, #p-excel textarea:focus, #p-excel select:focus {
  border-color: #2563eb; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,163,74,.14); }
#p-excel .dropzone { border-color: #c9ecd6; }
#p-excel .dropzone:hover { border-color: #2563eb; border-color: var(--brand); background: #eff6ff; background: var(--brand-light); }
#p-excel .dropzone.dragover { border-color: #2563eb; border-color: var(--brand); background: #dcfce7;
  box-shadow: 0 0 0 4px rgba(22,163,74,.12); }
#p-excel .dz-ico { color: #2563eb; color: var(--brand); }
#p-excel .dz-main u { color: #2563eb; color: var(--brand); border-bottom-color: #2563eb; border-bottom-color: var(--brand); }
#p-excel .field > span { color: #2f6b46; }
#p-excel .hint { color: #4b7c5e; }
#p-excel .tpl-count b { color: #2563eb; color: var(--brand); }
#p-excel .alert { background: #eff6ff; background: var(--brand-light); border-color: #bfdbfe; border-color: var(--brand-border); color: #166534; }

/* PDF 板块主题：红色 */
#p-pdf { --brand: #dc2626; --brand-dark: #b91c1c; --brand-light: #fef2f2; --brand-border: #fecaca; }
#p-pdf .page-head { border-left: 4px solid #2563eb; border-left: 4px solid var(--brand); padding-left: 12px; }
#p-pdf .page-head h1 { color: #b91c1c; }
#p-pdf .sub { color: #8a4a4a; }
#p-pdf .card-box { border-color: #f6d5d5; }
#p-pdf .card-box h3 { color: #b91c1c; }
#p-pdf .btn.primary, #p-pdf .btn:not(.ghost):not(.plain):not(.tiny):not(.small) {
  background: #2563eb; background: var(--brand); border-color: #2563eb; border-color: var(--brand); }
#p-pdf .btn:hover { background: #1d4ed8; background: var(--brand-dark); border-color: #1d4ed8; border-color: var(--brand-dark); }
#p-pdf .btn.ghost { color: #2563eb; color: var(--brand); border-color: #bfdbfe; border-color: var(--brand-border); background: #fff; }
#p-pdf .btn.ghost:hover { background: #eff6ff; background: var(--brand-light); }
#p-pdf .btn.small { background: #2563eb; background: var(--brand); border-color: #2563eb; border-color: var(--brand); color: #fff; }
#p-pdf input:focus, #p-pdf textarea:focus, #p-pdf select:focus {
  border-color: #2563eb; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,38,38,.14); }
#p-pdf .dropzone { border-color: #f3b9b9; background: #fffafa; }
#p-pdf .dropzone:hover { border-color: #2563eb; border-color: var(--brand); background: #eff6ff; background: var(--brand-light); }
#p-pdf .dropzone.dragover { border-color: #2563eb; border-color: var(--brand); background: #fee2e2;
  box-shadow: 0 0 0 4px rgba(220,38,38,.12); }
#p-pdf .dz-ico { color: #2563eb; color: var(--brand); }
#p-pdf .dz-main u { color: #2563eb; color: var(--brand); border-bottom-color: #2563eb; border-bottom-color: var(--brand); }
#p-pdf .field > span { color: #7a3b3b; }
#p-pdf .hint { color: #8a5555; }

/* PS 板块主题：紫色 */
#p-ps { --brand: #9333ea; --brand-dark: #7e22ce; --brand-light: #faf5ff; --brand-border: #e9d5ff; }
#p-ps .page-head { border-left: 4px solid #2563eb; border-left: 4px solid var(--brand); padding-left: 12px; }
#p-ps .page-head h1 { color: #7e22ce; }
#p-ps .sub { color: #6b4a8a; }
#p-ps .card-box { border-color: #e4ccf5; }
#p-ps .card-box h3 { color: #7e22ce; }
#p-ps .btn.primary, #p-ps .btn:not(.ghost):not(.plain):not(.tiny):not(.small) {
  background: #2563eb; background: var(--brand); border-color: #2563eb; border-color: var(--brand); }
#p-ps .btn:hover { background: #1d4ed8; background: var(--brand-dark); border-color: #1d4ed8; border-color: var(--brand-dark); }
#p-ps .btn.ghost { color: #2563eb; color: var(--brand); border-color: #bfdbfe; border-color: var(--brand-border); background: #fff; }
#p-ps .btn.ghost:hover { background: #eff6ff; background: var(--brand-light); }
#p-ps .btn.small { background: #2563eb; background: var(--brand); border-color: #2563eb; border-color: var(--brand); color: #fff; }
#p-ps input:focus, #p-ps textarea:focus, #p-ps select:focus {
  border-color: #2563eb; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(147,51,234,.14); }
#p-ps .dropzone { border-color: #d3b3ee; background: #fdfbff; }
#p-ps .dropzone:hover { border-color: #2563eb; border-color: var(--brand); background: #eff6ff; background: var(--brand-light); }
#p-ps .dropzone.dragover { border-color: #2563eb; border-color: var(--brand); background: #f3e8ff;
  box-shadow: 0 0 0 4px rgba(147,51,234,.12); }
#p-ps .dz-ico { color: #2563eb; color: var(--brand); }
#p-ps .dz-main u { color: #2563eb; color: var(--brand); border-bottom-color: #2563eb; border-bottom-color: var(--brand); }
#p-ps .field > span { color: #5d3b7a; }
#p-ps .hint { color: #6b5580; }

/* 折叠卡：点击标题展开 / 收起 */
.foldable > h3 { cursor: pointer; user-select: none; }
.foldable > h3::after { content: '收起 ▴'; margin-left: auto; font-size: 12px;
  color: #94a3b8; font-weight: 400; }
.foldable.folded > h3::after { content: '展开 ▾'; }
.foldable.folded > *:not(h3) { display: none !important; }
#p-excel .alert.ok { background: #f0fdf4; border-color: #86efac; color: #166534; }
#p-excel .empty-hint { color: #4b7c5e; }
/* Word 板块内部子面板 */
.subpanel { display: none; }
.subpanel.active { display: block; }
.subtabs { display: flex; gap: 0; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.subtab {
  padding: 5px 10px; border: none; background: transparent; cursor: pointer;
  font-size: 12.5px; color: var(--text-sub); border-bottom: 2px solid transparent; font-family: inherit;
}
.subtab:hover { color: #2563eb; color: var(--brand); }
.subtab.active { color: #2563eb; color: var(--brand); border-bottom-color: #2563eb; border-bottom-color: var(--brand); font-weight: 600; }

/* ---------- 卡片 ---------- */
.card-box {
  background: #ffffff; background: var(--card); border: 1px solid var(--line);
  padding: 12px 16px; margin-bottom: 10px; border-radius: 8px;
  box-shadow: none;
}
.card-box > h3 { margin: 0 0 6px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-box > .hint { margin-top: 0; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 10px; }
[hidden] { display: none !important; }
.field > span { display: block; font-weight: 600; margin-bottom: 4px; color: var(--text); font-size: 12.5px; }
.field input[type=text], .field input[type=password], .field input:not([type]), .field input[type=number], .field select, .field textarea {
  width: 100%; padding: 7px 10px; border: 1px solid #d6dce6; border-radius: 6px;
  font-size: 13px; font-family: inherit; background: #fff; color: #1e2939; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
/* 卡片内非 .field 的裸输入框（如速查表搜索框）*/
.card-box > input[type=text], .card-box .cmd-search { display: block; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: #2563eb; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}
.field textarea { resize: vertical; min-height: 60px; line-height: 1.55; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.hint { color: var(--text-mute); font-size: 11.5px; margin: -2px 0 6px; line-height: 1.4; }

/* ---------- 拖拽上传 ---------- */
.dropzone {
  position: relative; border: 2px dashed #c7d2fe; border-radius: 8px;
  background: #fbfdff; padding: 18px 16px; text-align: center; cursor: pointer;
  transition: .18s; color: var(--text-sub);
}
.dropzone:hover { border-color: #2563eb; border-color: var(--brand); background: #eff6ff; background: var(--brand-light); }
.dropzone.dragover { border-color: #2563eb; border-color: var(--brand); background: #e0ecff; box-shadow: 0 0 0 4px rgba(37,99,235,.1); }

.dropzone .dz-main { display: block; font-size: 15px; font-weight: 600; color: #1e2939; color: var(--text); margin-top: 2px; }
.dropzone .dz-ico { font-size: 22px; font-weight: 800; color: #2563eb; color: var(--brand); }
/* 套用模板后的定位高亮 */
.dropzone.flash, .card-box.flash { animation: flashPulse 1.6s ease; }
@keyframes flashPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
  25% { box-shadow: 0 0 0 5px rgba(37,99,235,.22); }
  60% { box-shadow: 0 0 0 5px rgba(37,99,235,.10); }
}
.dropzone .dz-main u { color: #2563eb; color: var(--brand); text-decoration: none; border-bottom: 1px solid #2563eb; border-bottom: 1px solid var(--brand); }
.dropzone .dz-sub { display: block; font-size: 12.5px; color: #8a95a6; color: var(--text-mute); margin-top: 6px; }
.dropzone input[type=file] { display: none; }
.dz-picked { margin-top: 10px; font-size: 13px; color: #16a34a; color: var(--ok); font-weight: 600; }
.dz-picked.multiple { max-height: 96px; overflow-y: auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: #2563eb; background: var(--brand); color: #fff; border: 1px solid #2563eb; border: 1px solid var(--brand);
  padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: .16s; font-family: inherit;
}
.btn:hover { background: #1d4ed8; background: var(--brand-dark); border-color: #1d4ed8; border-color: var(--brand-dark); }
.btn.ghost { background: #fff; color: #2563eb; color: var(--brand); border-color: #bfdbfe; border-color: var(--brand-border); }
.btn.ghost:hover { background: #eff6ff; background: var(--brand-light); }
.btn.plain { background: #fff; color: #5b6879; color: var(--text-sub); border-color: #e5e9f0; border-color: var(--line); }
.btn.plain:hover { background: #f0f3f8; background: var(--line-soft); color: #1e2939; color: var(--text); }
.btn.small { padding: 5px 11px; font-size: 12px; }
.btn.tiny { font-size: 11.5px; padding: 3px 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

/* ---------- 提示条 ---------- */
.alert { background: #fef2f2; background: var(--err-bg); border: 1px solid #fecaca; color: #dc2626; color: var(--err);
padding: 11px 15px; border-radius: 10px; margin-bottom: 14px; font-size: 13.5px; }
.alert.ok { background: #f0fdf4; background: var(--ok-bg); color: #16a34a; color: var(--ok); border-color: #bbf7d0; }
.gate-note { background: #fffbeb; background: var(--warn-bg); border: 1px solid #fde68a; color: #92400e;
padding: 9px 14px; border-radius: 10px; font-size: 13px; margin: 10px 0; }
.privacy-note {
  display: flex; gap: 10px; align-items: flex-start; background: #f0fdf4; background: var(--ok-bg);
  border: 1px solid #bbf7d0; border-radius: 12px; border-radius: var(--radius); padding: 13px 16px;
  font-size: 13.5px; color: #15803d; margin-bottom: 18px;
}
.privacy-note b { display: block; margin-bottom: 2px; }

/* ---------- 模板选择 / 开关 ---------- */
.preset-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #eff6ff; background: var(--brand-light); border: 1px solid #bfdbfe; border: 1px solid var(--brand-border);
  border-radius: 12px; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px;
}
.preset-bar > label { font-size: 13.5px; font-weight: 600; color: #1e40af; }
.preset-bar select { padding: 8px 11px; border-radius: 9px; border: 1px solid #bfdbfe; border: 1px solid var(--brand-border);
  font-size: 14px; background: #fff; min-width: 220px; font-family: inherit; }
.preset-note { font-size: 12.5px; color: #5b6879; color: var(--text-sub); flex: 1; min-width: 220px; }
.options {
  background: #fcfdff; border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 12px; border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px; font-size: 13px; color: #5b6879; color: var(--text-sub);
  display: flex; flex-wrap: wrap; gap: 7px 18px; align-items: center;
}
.opt-title { font-weight: 700; color: #1e2939; color: var(--text); }
/* 处理选项：默认折叠 */
.opt-fold { margin-bottom: 16px; border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 12px; border-radius: var(--radius);
  background: #fcfdff; overflow: hidden; }
.opt-fold > summary { cursor: pointer; padding: 11px 16px; display: flex; align-items: center;
  gap: 10px; list-style: none; user-select: none; }
.opt-fold > summary::-webkit-details-marker { display: none; }
.opt-fold > summary::before { content: "\25B8"; color: #8a95a6; color: var(--text-mute); font-size: 13px;
  transition: transform .15s ease; }
.opt-fold[open] > summary::before { transform: rotate(90deg); }
.opt-fold > summary:hover { background: #f6f9fd; }
.opt-hint { font-style: normal; font-size: 12px; color: #8a95a6; color: var(--text-mute); }
.opt-fold > .options { border: none; border-top: 1px solid #e5e9f0; border-top: 1px solid var(--line); border-radius: 0;
  margin-bottom: 0; background: transparent; }
/* 模板数量提示 */
.tpl-count { font-size: 12px; color: #8a95a6; color: var(--text-mute); padding: 2px 0 8px; }
.tpl-count b { color: #2563eb; color: var(--brand); }
.tpl-msg { margin-top: 8px; font-size: 12.5px; line-height: 1.7; color: #5b6879; color: var(--text-sub); }
textarea.flash { animation: flashPulse 1.6s ease; border-radius: 10px; }
.options label { cursor: pointer; user-select: none; }
.options label.disabled { opacity: .45; text-decoration: line-through; }

/* ---------- 模板库树 ---------- */
#preset-tree { margin-top: 8px; }
#preset-tree summary {
  cursor: pointer; padding: 5px 6px; border-radius: 7px; font-weight: 600;
  color: #1e2939; color: var(--text); list-style: none; user-select: none; font-size: 12.5px;
}
#preset-tree summary::-webkit-details-marker { display: none; }
#preset-tree summary::before { content: '▸ '; color: #2563eb; color: var(--brand); }
#preset-tree details[open] > summary::before { content: '▾ '; }
#preset-tree summary:hover { background: #eff6ff; background: var(--brand-light); }
.tree-list { margin: 2px 0 6px; padding-left: 6px; list-style: none; max-height: 200px; overflow-y: auto; }
.tree-list li { padding: 3px 8px; border-radius: 6px; cursor: pointer; color: #5b6879; color: var(--text-sub);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.tree-list li:hover { background: #2563eb; background: var(--brand); color: #fff; }
.tree-note { font-size: 12px; line-height: 1.6; color: #92400e; background: #fffbeb; background: var(--warn-bg);
  border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.tree-note strong { color: #78350f; }

/* ---------- 模板库速览 ---------- */
.lib-group { margin-bottom: 22px; }
.lib-group h4 { margin: 0 0 10px; font-size: 15px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.lib-card { background: #fff; border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 12px; border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; box-shadow: 0 1px 3px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.05); box-shadow: var(--shadow); }
.lib-card b { color: #2563eb; color: var(--brand); font-size: 14.5px; }
.lib-card p { margin: 0; font-size: 12.5px; color: #8a95a6; color: var(--text-mute); flex: 1; }

/* ---------- 我的模板 / 方案列表 ---------- */
.tpl-list { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.tpl-item { display: flex; align-items: center; gap: 12px; background: #fbfdff;
  border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.tpl-item b { color: #1e2939; color: var(--text); }
.tpl-item .tpl-meta { color: #8a95a6; color: var(--text-mute); font-size: 12.5px; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-hint { background: #fbfdff; border: 1px dashed #e5e9f0; border: 1px dashed var(--line); border-radius: 10px;
  padding: 16px; text-align: center; color: #8a95a6; color: var(--text-mute); font-size: 13px; }

/* ---------- 说明页：实例演示 ---------- */
.demo-card { border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 12px; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.demo-card .dc-head { background: #fbfdff; border-bottom: 1px solid #e5e9f0; border-bottom: 1px solid var(--line);
  padding: 11px 16px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.demo-card .dc-head b { font-size: 14.5px; }
.demo-card .dc-head .step-no { background: #2563eb; background: var(--brand); color: #fff; border-radius: 20px;
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; }
.demo-card .dc-body { padding: 14px 16px; }
.demo-card img { width: 100%; max-width: 560px; border-radius: 10px; border: 1px solid #e5e9f0; border: 1px solid var(--line); display: block; }
.io-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.io-box { border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.io-box .io-h { background: #fbfdff; border-bottom: 1px solid #e5e9f0; border-bottom: 1px solid var(--line);
  padding: 7px 12px; font-size: 12.5px; font-weight: 600; color: #5b6879; color: var(--text-sub); }
.io-box .io-b { padding: 10px 12px; font-size: 13px; }
.io-box pre { margin: 0; white-space: pre-wrap; font-family: inherit; line-height: 1.7; }
code.cmd {
  background: #eff6ff; background: var(--brand-light); color: #1d4ed8; color: var(--brand-dark); padding: 2px 7px;
  border-radius: 5px; font-size: 12.5px; font-family: ui-monospace, Consolas, monospace;
}
.tbl-mini { border-collapse: collapse; font-size: 12px; width: 100%; }
.tbl-mini th, .tbl-mini td { border: 1px solid #e5e9f0; border: 1px solid var(--line); padding: 4px 8px; text-align: center; }
.tbl-mini th { background: #f2f6ff; color: #1d4ed8; color: var(--brand-dark); font-weight: 600; }

/* ---------- 指令速查表 ---------- */
.cmd-ref { width: 100%; border-collapse: collapse; margin: 10px 0 8px; font-size: 13px; }
.cmd-ref th, .cmd-ref td { border: 1px solid #e5e9f0; border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.cmd-ref thead th { background: #f2f6ff; color: #1d4ed8; color: var(--brand-dark); position: sticky; top: 0; z-index: 1; }
.cmd-ref tbody tr:hover { background: #fbfdff; }
.cmd-ref code { background: #eff6ff; background: var(--brand-light); padding: 1px 6px; border-radius: 5px; color: #1d4ed8; color: var(--brand-dark); font-size: 12px; }
.cmd-search { width: 100%; max-width: 340px; padding: 9px 13px; border: 1px solid #d6dce6;
  border-radius: 9px; font-size: 14px; font-family: inherit; margin-bottom: 8px; }
.cmd-count { font-size: 12.5px; color: #8a95a6; color: var(--text-mute); margin: 0 0 8px; }
.doc-list { font-size: 13.5px; padding-left: 20px; margin: 6px 0; }
.doc-list li { margin-bottom: 7px; }
.faq-item { border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; background: #fff; }
.faq-item b { color: #1e2939; color: var(--text); display: block; margin-bottom: 4px; }
.faq-item p { margin: 0; font-size: 13px; color: #5b6879; color: var(--text-sub); }

/* ---------- 结果 / 批量表---------- */
.batch-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.batch-table th, .batch-table td { border: 1px solid #e5e9f0; border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.batch-table thead th { background: #f7faff; font-weight: 600; color: #5b6879; color: var(--text-sub); }
.batch-table .fname { max-width: 220px; word-break: break-all; }
.batch-table .stats { color: #5b6879; color: var(--text-sub); line-height: 1.7; }
.batch-table .dl { white-space: nowrap; }
.batch-table input[type=checkbox] { width: auto; }
.badge { display: inline-block; padding: 2px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.ok { background: #f0fdf4; background: var(--ok-bg); color: #16a34a; color: var(--ok); }
.badge.bad { background: #fef2f2; background: var(--err-bg); color: #dc2626; color: var(--err); }
.result-box { background: #f0fdf4; background: var(--ok-bg); border: 1px solid #bbf7d0; border-radius: 12px; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; }
.result-box h3 { margin: 0 0 6px; color: #16a34a; color: var(--ok); }
.result-box.alt { background: #eff6ff; background: var(--brand-light); border-color: #bfdbfe; border-color: var(--brand-border); }
.result-box.alt h3 { color: #1d4ed8; color: var(--brand-dark); }
.export-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: #fff; border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; margin: 12px 0; }
.export-bar .eb-label { font-size: 13px; font-weight: 600; color: #5b6879; color: var(--text-sub); }
.export-bar .eb-count { color: #2563eb; color: var(--brand); font-weight: 700; }

/* ---------- 状态栏 ---------- */
.statusbar { display: flex; align-items: center; padding: 9px 22px;
  background: #fbfdff; border-top: 1px solid #e5e9f0; border-top: 1px solid var(--line); font-size: 13px; color: #5b6879; color: var(--text-sub); }
.statusbar .sb-left { font-size: 12.5px; color: #8a95a6; color: var(--text-mute); }
.statusbar .sb-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.sb-toggle { display: flex; align-items: center; gap: 5px; cursor: pointer; color: #5b6879; color: var(--text-sub); }
.sb-lic { background: #eff6ff; background: var(--brand-light); color: #1d4ed8; color: var(--brand-dark); border: 1px solid #bfdbfe; border: 1px solid var(--brand-border);
  border-radius: 20px; padding: 4px 13px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.sb-lic:hover { background: #dbeafe; }
.sb-btn { background: #fff; color: #5b6879; color: var(--text-sub); border: 1px solid #e5e9f0; border: 1px solid var(--line);
  border-radius: 20px; padding: 4px 13px; cursor: pointer; font-size: 12.5px; }
.sb-btn:hover { border-color: #2563eb; border-color: var(--brand); color: #2563eb; color: var(--brand); }

/* ---------- 打赏卡：蓝色调 + 茶杯冒烟气（折叠态） ---------- */
.tip-card { position: relative; overflow: hidden; margin-top: 18px;
  padding: 0; border-radius: 16px; border: 1px solid #d6e4fb;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(147,197,253,.28) 0%, rgba(147,197,253,0) 58%),
    linear-gradient(140deg, #fbfdff 0%, #f2f7ff 100%);
  box-shadow: 0 6px 22px rgba(37,99,235,.10); cursor: pointer; }
.tip-card:hover { border-color: #b6d0f7; box-shadow: 0 8px 26px rgba(37,99,235,.16); }

/* 茶杯 + 三缕热气（仅折叠态显示） */
.tip-tea { position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  display: none; align-items: center; justify-content: center; width: 46px; height: 46px;
  pointer-events: none; }
.tip-cup { display: block; }
.tip-steam { position: absolute; top: -2px; left: 50%; width: 3px; height: 10px; margin-left: -1.5px;
  border-radius: 3px; background: linear-gradient(180deg, rgba(37,99,235,0), rgba(37,99,235,.45));
  opacity: 0; animation: steamRise 2.4s ease-in-out infinite; }
.tip-steam.s1 { left: 38%; animation-delay: 0s; }
.tip-steam.s2 { left: 50%; animation-delay: .45s; }
.tip-steam.s3 { left: 62%; animation-delay: .9s; }
@keyframes steamRise {
  0%   { opacity: 0; transform: translateY(4px) scaleY(.6); }
  30%  { opacity: .85; }
  100% { opacity: 0; transform: translateY(-14px) scaleY(1.25); }
}

/* 折叠态：只剩茶杯 + 标题（无文字按钮） */
.tip-card.folded { padding: 12px 14px 12px 66px; min-height: 62px; }
.tip-card.folded .tip-tea { display: flex; }
.tip-card.folded .tip-content { display: none; }
.tip-card.folded .tip-title { font-size: 13.5px; color: #1d4ed8; }
/* 折叠态右上角：小圆点（代替「展开/收起」文字），hover 时显示提示 */
.tip-card.folded .tip-fold {
  margin-left: auto; width: 10px; height: 10px; border-radius: 50%;
  background: #93c5fd; box-shadow: 0 0 0 4px rgba(147,197,253,.22); cursor: pointer;
  animation: tipPulse 2.6s ease-in-out infinite; }
.tip-card.folded .tip-fold:hover { background: #2563eb; }
@keyframes tipPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(147,197,253,.22); }
  50% { box-shadow: 0 0 0 7px rgba(147,197,253,.08); }
}

.tip-main { position: relative; padding: 14px 16px 14px 18px; }
.tip-head { display: flex; align-items: center; gap: 10px; }
.tip-title { font-size: 15px; letter-spacing: .3px; color: #1e3a8a; font-weight: 700; }
.tip-fold { display: none; }  /* 展开态不显示任何折叠控件 */
.tip-content { margin-top: 9px; }
.tip-desc { margin: 0 0 11px; font-size: 12.5px; line-height: 1.7; color: #4b6285; }
/* 金额档位：3 列两行 */
.tip-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tip-amt { cursor: pointer; padding: 9px 0; font-size: 14px; font-weight: 600; color: #1d4ed8;
  background: rgba(255,255,255,.85); border: 1px solid #cfe0fb; border-radius: 11px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.tip-amt:hover { transform: translateY(-1px); border-color: #9dc0f8;
  box-shadow: 0 4px 12px rgba(37,99,235,.16); }
.tip-amt.on { background: linear-gradient(135deg,#4d8ef7,#2563eb); color: #fff; border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37,99,235,.30); }
.tip-other { display: block; margin: 8px 0 0; width: 100%; cursor: pointer;
  padding: 5px 0; font-size: 11px; color: #6b86ad; letter-spacing: .3px;
  background: rgba(255,255,255,.6); border: 1px dashed #c7dcfb; border-radius: 9px; }
.tip-other:hover { color: #1d4ed8; border-color: #9dc0f8; background: #fff; }
.tip-custom { width: 100%; margin-top: 8px; padding: 7px 10px; font-size: 12.5px;
  border: 1px solid #c7dcfb; border-radius: 9px; background: #fff; }
.tip-foot { display: flex; align-items: center; gap: 10px; margin-top: 11px;
  padding-top: 10px; border-top: 1px dashed #d8e6fb; }
.tip-sel { font-size: 12px; color: #4b6285; }
.tip-foot .btn { margin-left: auto; }
.tip-qr { margin-top: 10px; padding: 12px; text-align: center;
  background: #fff; border: 1px dashed #c7dcfb; border-radius: 11px; }
.tip-qr-tip { margin: 0 0 8px; font-size: 12px; color: #4b6285; }
.tip-qr img { max-width: 168px; border-radius: 8px; }
/* 扫码确认后才出现的金额区 */
.tip-paid { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #d8e6fb; }
.tip-paid-tip { margin: 0 0 10px; font-size: 12.5px; color: #1d4ed8; font-weight: 600; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15,25,45,.42); display: flex;
  align-items: center; justify-content: center; z-index: 50; backdrop-filter: blur(2px); }
.modal-mask[hidden] { display: none; }
.modal { width: 480px; max-width: 92vw; max-height: 88vh; background: #fff; border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(15,25,45,.28); }
.modal-head { display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; background: #fbfdff; border-bottom: 1px solid #e5e9f0; border-bottom: 1px solid var(--line); }
.modal-head b { font-size: 15px; }
.modal-close { cursor: pointer; color: #8a95a6; color: var(--text-mute); font-size: 17px; }
.modal-close:hover { color: #1e2939; color: var(--text); }
.modal-body { padding: 18px; overflow-y: auto; }
/* 反馈 / 登录类弹窗：内容较多，放宽到620px 并加大行距 */
.modal-wide { width: 620px; }
.modal-wide .modal-body { padding: 22px 24px; }
.modal-wide .field { margin-bottom: 16px; }
.modal-wide .field > span { font-size: 13.5px; margin-bottom: 7px; }
.modal-wide input[type=text], .modal-wide input[type=password], .modal-wide input:not([type]),
.modal-wide select, .modal-wide textarea { font-size: 14px; line-height: 1.7; padding: 10px 12px; }
.modal-wide textarea { line-height: 1.8; }
.modal-wide .hint { line-height: 1.85; font-size: 12.5px; }
.modal-wide .field.inline.check { line-height: 1.8; }
.modal-wide .btn { padding: 9px 22px; font-size: 14px; }

/* 登录 / 注册 */
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px;
  border-bottom: 1px solid #e5e9f0; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.auth-tab { cursor: pointer; padding: 8px 20px; font-size: 14px; font-weight: 600;
  color: #5b6879; color: var(--text-sub); background: #fff; border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 9px; }
.auth-tab.on { background: #2563eb; background: var(--brand); border-color: #2563eb; border-color: var(--brand); color: #fff; }
.auth-err { margin: 4px 0 12px; padding: 10px 13px; font-size: 13px; line-height: 1.7;
  color: #b42318; background: #fef3f2; border: 1px solid #fecdc9; border-radius: 9px; }
.auth-wechat { text-align: center; margin-bottom: 4px; }
.btn-wechat { width: 100%; border-color: #07c160; color: #07c160; font-weight: 600; }
.btn-wechat:hover { background: #f0fdf6; }
.auth-wechat .hint { margin: 8px auto 0; max-width: 44em; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 14px 0 16px;
  color: #8a95a6; color: var(--text-mute); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: #e5e9f0; background: var(--line); }
.code-wrap { display: flex; gap: 10px; }
.code-wrap input { flex: 1; letter-spacing: 4px; }
.btn-code { flex-shrink: 0; white-space: nowrap; }
.btn-code:disabled { opacity: .55; cursor: not-allowed; }
.cap-wrap { display: flex; gap: 10px; align-items: stretch; }
.cap-wrap img { width: 118px; height: 42px; flex-shrink: 0; cursor: pointer;
  border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 8px; background: #f6f8fb; }
.cap-wrap input { flex: 1; min-width: 0; letter-spacing: 3px; text-transform: uppercase; }
#globalToast { position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%) translateY(16px);
  background: rgba(20, 30, 50, .88); color: #fff; font-size: 13.5px; padding: 10px 18px;
  border-radius: 10px; opacity: 0; pointer-events: none; transition: all .25s ease;
  z-index: 999; max-width: 82vw; }
#globalToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.lic-status { background: #eff6ff; background: var(--brand-light); border: 1px solid #bfdbfe; border: 1px solid var(--brand-border);
  border-radius: 10px; padding: 11px 14px; margin-bottom: 14px; font-size: 14px; }

/* ---------- 进度浮层 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,25,45,.5); display: flex;
  align-items: center; justify-content: center; z-index: 60; }
.overlay[hidden] { display: none; }
.overlay-card { width: 460px; max-width: 92vw; background: #fff; border-radius: 16px;
  padding: 24px 26px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.ov-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.ov-bar { height: 12px; background: #f0f3f8; background: var(--line-soft); border-radius: 8px; overflow: hidden; }
.ov-fill { height: 100%; width: 2%; background: linear-gradient(90deg,#2563eb,#60a5fa); background: linear-gradient(90deg,var(--brand),#60a5fa);
  border-radius: 8px; transition: width .35s ease; }
.ov-info { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px;
  font-size: 13px; color: #5b6879; color: var(--text-sub); }
.ov-est { color: #2563eb; color: var(--brand); font-weight: 600; }
.ov-hint { margin: 12px 0 0; font-size: 12.5px; color: #8a95a6; color: var(--text-mute); line-height: 1.6; }

/* ---------- 行内项 / 其它 ---------- */
.field.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: #5b6879; color: var(--text-sub); }
/* 标签不能被压成窄条逐字换行（窄容器 / 手机宽度下会变成「批 量 操 作」竖排） */
.field.inline > span { white-space: nowrap; }
.field.inline input { width: auto; }
.field.inline.check span { font-size: 13px; color: #5b6879; color: var(--text-sub); }
.setting-row { display: flex; flex-direction: column; gap: 10px; margin: 12px 0;
  padding: 12px 14px; background: #fbfdff; border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 10px; }
.muted { color: #8a95a6; color: var(--text-mute); font-size: 13px; }
h4.sec { margin: 20px 0 10px; font-size: 15px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.card { background: #fbfdff; border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 18px; min-width: 110px; text-align: center; }
.card b { display: block; font-size: 23px; color: #2563eb; color: var(--brand); }
.card span { font-size: 12px; color: #8a95a6; color: var(--text-mute); }
.cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.changes { display: grid; gap: 10px; }
.chg { background: #fbfdff; border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 10px; padding: 11px 15px; font-size: 13.5px; }
.mlist, .wlist { margin: 6px 0; padding-left: 20px; }
.vlist { margin: 6px 0; padding-left: 4px; list-style: none; }
.vlist li { margin: 4px 0; font-size: 14px; }
.vlist .v-ok b { color: #16a34a; color: var(--ok); }
.vlist .v-bad b { color: #dc2626; color: var(--err); }

/* ---------- 语音输入 ---------- */
.mic-wrap { display: inline-flex; align-items: center; gap: 6px; }
.btn.mic { background: #fff; color: #2563eb; color: var(--brand); border-color: #bfdbfe; border-color: var(--brand-border); }
.btn.mic.on { background: #dc2626; background: var(--err); color: #fff; border-color: #dc2626; border-color: var(--err); animation: micpulse 1.3s infinite; }
@keyframes micpulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(220,38,38,.35);} 50%{ box-shadow: 0 0 0 6px rgba(220,38,38,0);} }
.mic-tip { display: none; font-size: 12.5px; color: #dc2626; color: var(--err); background: #fef2f2; background: var(--err-bg);
  border: 1px solid #fecaca; border-radius: 8px; padding: 6px 11px; margin: 6px 0 10px; }
.mic-tip.show { display: block; }
.mic-live { font-size: 12.5px; color: #1d4ed8; color: var(--brand-dark); background: #eff6ff; background: var(--brand-light);
  border-left: 3px solid #2563eb; border-left: 3px solid var(--brand); padding: 5px 11px; margin: 6px 0 0; border-radius: 0 8px 8px 0; min-height: 20px; }

/* ---------- 导出 ---------- */
.exp-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.hp-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==================== 手机端适配（≤820px） ==================== */
@media (max-width: 820px){
  body { padding: 0; }
  .window { border-radius: 0; border-left: none; border-right: none; min-height: 100vh; }

  /* 顶栏：品牌名 + 隐私标签换行 */
  .titlebar { flex-wrap: wrap; padding: 10px 14px; gap: 6px; }
  .brand .brand-sub { display: none; }
  .userbar { flex-wrap: wrap; padding: 8px 14px; gap: 8px; font-size: 12.5px; }
  .userbar .ub-state { width: 100%; margin-right: 0; }

  /* 侧边栏 → 顶部横向导航条（四板块可横滑，买断按钮常驻） */
  .body { flex-direction: column; min-height: 0; }
  .sidebar {
    position: sticky; top: 0; z-index: 30;
    display: flex; width: 100%; box-sizing: border-box;
    flex-direction: row; align-items: center; gap: 8px;
    padding: 8px 10px; border-right: none; border-bottom: 1px solid #e5e9f0; border-bottom: 1px solid var(--line);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    box-shadow: 0 1px 6px rgba(15,25,45,.06);
  }
  .sidebar .logo { display: none; }
  .sidebar nav { flex-direction: row; gap: 6px; flex-shrink: 0; }
  .nav { white-space: nowrap; padding: 8px 13px; border-radius: 10px; font-size: 13.5px; }
  .nav .nav-ico { width: 20px; height: 20px; line-height: 20px; font-size: 11px; }
  .buyout-btn { flex-shrink: 0; margin: 0 0 0 auto; padding: 8px 12px; }
  .buyout-btn .bo-txt em { display: none; }
  .side-note { display: none; }   /* 模板库在设置页，手机端不占地方 */

  .main { padding: 14px 12px 28px; }
  .page-head h1 { font-size: 20px; }
  .page-head .sub { font-size: 12.5px; }

  /* 表单与按钮：全宽、好点 */
  .field > span { font-size: 13px; }
  .field input, .field select, .field textarea, .build-input { width: 100%; }
  .btn { padding: 10px 16px; }
  .btn.tiny { padding: 7px 12px; }
  .grid2, .grid3, .io-row { grid-template-columns: 1fr; gap: 12px; }
  .card-box { padding: 14px; border-radius: 12px; }
  .dropzone { padding: 20px 12px; }
  .options { grid-template-columns: 1fr 1fr; }
  .opt-fold > summary { flex-wrap: wrap; gap: 4px; }
  .opt-fold > summary .opt-hint { width: 100%; }

  /* 打赏卡：档位 2 列更宽松 */
  .tip-amounts { grid-template-columns: repeat(2, 1fr); }
  .tip-card.folded { padding: 12px 12px 12px 64px; }

  /* 买断弹窗：三档竖排 */
  .bo-plans { grid-template-columns: 1fr; }
  .bo-plan { display: flex; align-items: center; gap: 12px; text-align: left; }
  .bo-plan b, .bo-plan em { margin: 0; }
  .bo-plan ul { display: none; }

  /* 弹窗：近全屏，方便手机操作 */
  .modal { width: 100vw; max-width: 100vw; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .modal-wide { width: 100vw; max-width: 100vw; }
  .modal-mask { align-items: flex-end; }
  .modal-body { padding: 16px; }
  .auth-tabs { gap: 8px; }
  .auth-tab { flex: 1; padding: 10px 0; }
  .field input { font-size: 16px; }   /* ≥16px 防 iOS 聚焦自动放大 */

  /* 结果页 / 预览：表格与图横向滚动 */
  .print-info > span, .storage-info > span { flex: 1 1 100%; }
  .pv-canvas { padding: 8px; }
  .report-box { padding: 14px; }
  .btn-row { flex-wrap: wrap; }
  .btn-row .btn { flex: 1 1 auto; }
  .tpl-item { flex-wrap: wrap; gap: 6px; }
  .tpl-item .btn { margin-left: 0; }
  .faq-item { padding: 12px; }
  .demo-grid { grid-template-columns: 1fr !important; }
  .cmp-table { font-size: 12px; }
  .cmp-table th, .cmp-table td { padding: 7px 8px; }
}

/* 超小屏（≤420px）：进一步压缩 */
@media (max-width: 420px){
  .nav { padding: 7px 10px; font-size: 13px; }
  .buyout-btn { padding: 7px 10px; }
  .buyout-btn .bo-txt b { font-size: 12.5px; }
  .tip-amt { padding: 8px 0; font-size: 13px; }
  .userbar .btn.tiny { padding: 6px 10px; font-size: 12px; }
}
.pending-file{
  margin-top:6px;padding:10px 14px;border-radius:10px;
  background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;font-size:13.5px;
}

/* 打印预览卡片 */
.print-prev-box{margin-top:16px;}
.pv-card{margin:12px 0;border: 1px solid #e5e9f0; border: 1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff;}
.pv-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:9px 12px;background:#f3f7fc;border-bottom: 1px solid #e5e9f0; border-bottom: 1px solid var(--line);font-size:13px;}
.pv-tag{padding:2px 9px;border-radius:999px;background:#eaf1fb;color:#2b5c9b;font-size:12px;}
.pv-canvas{padding:10px;overflow-x:auto;}
.pv-canvas svg{display:block;max-width:100%;height:auto;border-radius:6px;}

/* ---------- 买断弹窗 ---------- */
.bo-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.bo-plan { position: relative; cursor: pointer; padding: 14px 12px; text-align: center;
  border: 1.5px solid #e5e7eb; border-radius: 12px; background: #fff; transition: .16s; }
.bo-plan:hover { border-color: #2563eb; box-shadow: 0 4px 14px rgba(37,99,235,.12); }
.bo-plan.on { border-color: #2563eb; background: #eff6ff; }
.bo-plan b { display: block; font-size: 14px; color: #1e2939; color: var(--text); }
.bo-plan em { display: block; font-style: normal; font-size: 11px; color: #8a95a6; color: var(--text-mute); margin: 2px 0 8px; }
.bo-price { display: block; font-size: 22px; font-weight: 800; color: #2563eb; }
.bo-plan ul { margin: 10px 0 0; padding: 0; list-style: none; text-align: left; }
.bo-plan li { font-size: 11.5px; color: #5b6879; color: var(--text-sub); line-height: 1.9; padding-left: 14px; position: relative; }
.bo-plan li::before { content: "✓"; position: absolute; left: 0; color: #16a34a; font-size: 10px; }
.bo-plan.hot { border-color: #fcd34d; background: linear-gradient(160deg,#fffbeb,#fff); }
.bo-plan.hot.on { border-color: #f59e0b; background: #fef3c7; }
.bo-badge { position: absolute; top: -9px; right: 8px; font-style: normal; font-size: 10px;
  padding: 2px 8px; border-radius: 999px; color: #fff; background: linear-gradient(135deg,#f59e0b,#d97706); }
.bo-steps { padding: 14px; background: #f8fafc; border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 12px; }
.bo-step-tip { margin: 0 0 12px; font-size: 12.5px; line-height: 1.85; color: #5b6879; color: var(--text-sub); }
.bo-qr { text-align: center; }
.bo-qr img { width: 150px; border-radius: 10px; border: 1px solid #e5e9f0; border: 1px solid var(--line); }
.bo-qr span { display: block; margin-top: 6px; font-size: 11.5px; color: #8a95a6; color: var(--text-mute); }

/* ---------- 打印设置摘要（结果页） ---------- */
.print-info { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.print-info > span { flex: 1 1 130px; padding: 8px 10px; background: #fff;
  border: 1px solid #dbeafe; border-radius: 10px; }
.print-info i { display: block; font-style: normal; font-size: 11px; color: #8a95a6; color: var(--text-mute); margin-bottom: 3px; }
.print-info b { font-size: 13px; color: #1d4ed8; }

/* ---------- 存储占用展示 ---------- */
.storage-info { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.storage-info > span { flex: 1 1 150px; padding: 8px 10px; background: #f8fafc;
  border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; color: #5b6879; color: var(--text-sub); }
.storage-info b { display: block; font-size: 15px; color: #2563eb; color: var(--brand); margin-top: 2px; }

/* 今日剩余次数角标 */
.quota-chip { display: inline-block; margin-left: 6px; padding: 1px 9px; font-size: 11.5px;
  font-weight: 600; color: #065f46; background: #d1fae5; border: 1px solid #a7f3d0;
  border-radius: 999px; }
.quota-chip.trial { color: #1e40af; background: #dbeafe; border-color: #bfdbfe; }
.quota-chip.warn { color: #92400e; background: #fef3c7; border-color: #fde68a; }

/* 买断弹窗：早鸟横幅 / 划线价 / 省价徽章 */
.bo-early-tip { margin-bottom: 12px; padding: 10px 13px; font-size: 12.5px; line-height: 1.8;
  color: #92400e; background: linear-gradient(135deg,#fffbeb,#fef3c7);
  border: 1px solid #fde68a; border-radius: 10px; font-weight: 600; }
.bo-reg { display: block; font-size: 12px; color: #8a95a6; color: var(--text-mute); margin-top: 2px; }
.bo-save { display: inline-block; margin-top: 5px; padding: 1px 8px; font-size: 10.5px;
  font-weight: 700; color: #b42318; background: #fef3f2; border: 1px solid #fecdc9;
  border-radius: 999px; }

/* ===================== 结果预览 + 继续调教 ===================== */
.preview-box { border-color: #bfdbfe; background: #f8fbff; }
.preview-scroll { max-height: 480px; overflow-y: auto; border: 1px solid #e5e9f0; border: 1px solid var(--line);
  border-radius: 10px; padding: 18px 20px; background: #fff; }
.doc-preview p { line-height: 1.9; color: #1f2937; }
.pv-table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 13px; }
.pv-table td { border: 1px solid #d1d5db; padding: 5px 9px; }
.pv-table td.th { font-weight: 600; }
.xlsx-preview .xp-sheet { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 6px; }
.xlsx-preview .xp-sheet b { font-size: 14px; }
.xp-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 上传区：已选文件操作 + 预览 ---------- */
.dz-acts { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.dz-clear { border: 1px solid #e5e9f0; border: 1px solid var(--line); background: #fff; color: #b91c1c;
  font-size: 12px; border-radius: 6px; padding: 1px 8px; cursor: pointer; line-height: 1.6; }
.dz-clear:hover { background: #fef2f2; border-color: #fca5a5; }
.dz-clear.pv { color: #2563eb; color: var(--brand); }
.dz-clear.pv:hover { background: #eff6ff; border-color: #93c5fd; }
.dp-text { font-size: 13.5px; line-height: 1.7; white-space: pre-wrap;
  background: #f8fafc; border: 1px solid #e5e9f0; border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; }
/* 排版报告可折叠区块（默认收起） */
details.rep-fold { border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 8px;
  margin: 8px 0; background: #f8fafc; }
details.rep-fold > summary { cursor: pointer; padding: 8px 12px; font-weight: 700;
  font-size: 14px; color: #1e3a5f; list-style: revert; }
details.rep-fold > summary:hover { color: #2563eb; color: var(--brand); }
details.rep-fold > ul, details.rep-fold > .changes { margin: 0; padding: 4px 12px 10px; }
.dp-table-head { font-size: 13px; font-weight: 700; color: #2563eb; color: var(--brand); margin: 12px 0 6px; }
/* docx 原版预览：左侧半幅停靠面板 */
.dp-panel { position: fixed; top: 0; left: 0; height: 100vh; width: var(--dp-w, 50vw);
  min-width: 340px; background: #fff; z-index: 80; display: flex; flex-direction: column;
  border-right: 1px solid #e5e9f0; border-right: 1px solid var(--line); box-shadow: 10px 0 30px rgba(15,23,42,.14); }
.dp-panel[hidden] { display: none; }
.dp-drag { position: absolute; right: -4px; top: 0; width: 9px; height: 100%;
  cursor: col-resize; z-index: 3; }
.dp-drag:hover { background: linear-gradient(90deg, transparent, rgba(37,99,235,.18)); }
/* 头部：按钮文字以前会被压成竖排（「适 宽」「标 题 级 别」），
   改成按钮不换行、不够宽时整行折下去，标题也不再被挤成两行。 */
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px; border-bottom: 1px solid #e5e9f0; border-bottom: 1px solid var(--line); background: #f8fafc;
  font-size: 14px; flex: 0 0 auto; row-gap: 6px; }
.dp-head > b { white-space: nowrap; flex: 0 0 auto; }
.dp-tools { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  justify-content: flex-end; row-gap: 6px; }
.dp-zoom { border: 1px solid #e5e9f0; border: 1px solid var(--line); background: #fff; border-radius: 6px;
  min-width: 28px; padding: 3px 9px; font-size: 13px; cursor: pointer; color: #334155;
  white-space: nowrap; flex: 0 0 auto; }
.dp-zoom:hover { border-color: #2563eb; border-color: var(--brand); color: #2563eb; color: var(--brand); background: #eff6ff; }
.dp-pct { font-size: 12px; color: #64748b; min-width: 42px; text-align: center; }
.dp-body { flex: 1 1 auto; overflow: auto; background: #e2e8f0; padding: 12px 14px; }
/* 预览打开时右侧内容（整个窗口：功能板块+主区）让出面板宽度 */
body.preview-docked .window { margin-left: var(--dp-w, 50vw); }
@media (max-width: 900px) {
  body.preview-docked .window { margin-left: 0; }
  .dp-panel { width: 100vw; min-width: 0; }
  .dp-drag { display: none; }
}
/* ===================== Word 预览增强：选区 / 标题级别底纹 / 分屏 ===================== */
.dp-sep { display: inline-block; width: 1px; height: 16px; background: #e5e9f0; background: var(--line); }
.dp-zoom.on { border-color: #2563eb; border-color: var(--brand); color: #2563eb; color: var(--brand); background: #eff6ff; font-weight: 600; }

/* 选区说明条：必须明确告诉用户红虚线不是下划线 */
.dp-selbar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 14px; background: #fff7ed; border-bottom: 1px solid #fed7aa;
  font-size: 12px; color: #9a3412; line-height: 1.5; flex: 0 0 auto; }
.dp-selbar[hidden] { display: none; }
.dp-sel-actions { display: inline-flex; gap: 6px; flex: 0 0 auto; }

/* 选区标记：红色虚线框 + 极淡红底（虚线在文字上下方，不贴字，像「选中框」而非「下划线」） */
.dp-native p.wselable { cursor: text; border-radius: 3px; position: relative; }
.dp-native .wsel {
  outline: 2px dashed #e5484d;
  outline-offset: 3px;                 /* 虚线离开文字，避免被当成下划线 */
  background: rgba(229,72,77,.07);
  border-radius: 2px;
}
/* 小标签只挂在选区第一个块上；其余只有虚框，避免满屏红标 */
.dp-native .wsel.wsel-first::after {
  content: '已选中';
  position: absolute; right: 2px; top: -14px;
  font-size: 11px; line-height: 1.1; color: #fff; background: #e5484d;
  padding: 1px 5px; border-radius: 6px; letter-spacing: .5px;
  pointer-events: none; white-space: nowrap; z-index: 2;
}

/* 标题级别底纹（赤橙黄绿青蓝紫）：仅预览显示，文件里没有 */
.dp-lvlbar { padding: 6px 14px; background: #f8fafc; border-bottom: 1px solid #e5e9f0; border-bottom: 1px solid var(--line);
  font-size: 12px; color: #475569; flex: 0 0 auto; }
.dp-lvlbar[hidden] { display: none; }
.dp-lvl-legend { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px;
  color: #64748b; font-size: 11px; }
.dp-lvl-legend .dp-lvl-chip { display: inline-block; width: 11px; height: 11px;
  border-radius: 3px; margin-left: 6px; vertical-align: -1px; }
.dp-native .wlvl {
  background: color-mix(in srgb, var(--wlvl-c, #888) 16%, transparent);
  box-shadow: inset 3px 0 0 var(--wlvl-c, #888);
  border-radius: 2px;
}
.dp-native h1.wlvl, .dp-native h2.wlvl, .dp-native h3.wlvl,
.dp-native h4.wlvl, .dp-native h5.wlvl, .dp-native h6.wlvl { position: relative; }

/* 全屏底部命令栏的来源容器（默认跟随排版区，全屏时移到底部） */
.dp-cmdbar-src { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
/* 【本轮优化】底部指令栏整体半透明 + 更紧凑：
   · 背景带 alpha 并加毛玻璃，底下的表格能隐约透出来（用户要求「显示类似透明状」）
   · 引导语默认收起（由「用法 ▾」按钮展开），不再占一整行
   · 输入框与按钮压薄，整条只占一行高度 */
.dp-cmdbar-src{
  background: rgba(241,245,249,.82);
  backdrop-filter: blur(8px) saturate(1.15);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
  border: 1px solid rgba(203,213,225,.85);
  border-radius: 10px; padding: 6px 10px; margin: 6px 0;
}
.dp-cmdbar-src .field > span{ font-size: 11px; color: #64748b; }
.dp-cmdbar-src input[type="text"]{
  padding: 5px 10px; border-radius: 8px; border: 1px solid #cbd5e0;
  background: rgba(255,255,255,.92);
}
.dp-cmdbar-src .btn.primary{ padding: 5px 16px; }
/* 「用法」展开按钮：平时就一个很小的胶囊，不抢地方 */
.dp-cmd-help-btn{
  border: 1px solid #cbd5e0; background: rgba(255,255,255,.75);
  color: #64748b; font-size: 11px; padding: 2px 8px; border-radius: 99px;
  cursor: pointer; white-space: nowrap;
}
.dp-cmd-help-btn:hover{ background:#fff; color:#0a5c2e; border-color:#9ad0b3; }
.dp-cmd-help{ font-size: 11px; line-height: 1.6; }
.dp-cmdbar:empty { display: none; }
body.dp-is-full .dp-cmdbar .field { flex: 1 1 320px; margin: 0; }

/* 工具条小图标：用 CSS 画，避免 emoji 在部分字体下变成方框 */
.dp-ic { display: inline-block; width: 14px; height: 14px; border-radius: 3px;
  margin-right: 5px; vertical-align: -2px; }
.dp-ic-sel { border: 2px dashed #e5484d; background: rgba(229,72,77,.12); }
.dp-ic-lvl { background: linear-gradient(90deg,#e5484d 0 14%,#f2760c 14% 28%,#e8b71a 28% 42%,
  #2f9e44 42% 56%,#12b5a5 56% 70%,#3b82f6 70% 84%,#8b5cf6 84% 100%); }
.dp-ic-mark { border: 2px dashed #f59e0b; background: #fff4e5; }

/* 屏幕占比：半屏 / 2/3 屏 / 全屏（body 上加 dp-mode-two / dp-mode-full） */
.dp-panel.dp-two { width: 66.6vw; }
body.preview-docked .window { transition: margin-left .18s ease; }
body.preview-docked.dp-mode-two .window { margin-left: 66.6vw; }
/* 全屏：预览铺满整个屏幕，右侧功能区收起；指令栏固定在底部（全屏时的命令栏） */
.dp-panel.dp-full { width: 100vw; border-right: none; z-index: 90; }
body.dp-is-full .window { display: none; }
body.dp-is-full .dp-cmdbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px;
  /* 【本轮优化】用户要求「下面的悬浮框应该显示类似透明状」。
     改成半透明毛玻璃：底色带 alpha + backdrop-filter 模糊，
     底下是表格时能隐约看见，但字仍然清楚。 */
  background: rgba(15,23,42,.72); color: #e2e8f0;
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 -6px 20px rgba(2,6,23,.28);
  border-top: 1px solid rgba(148,163,184,.25);
}
/* 全屏时下方指令栏默认「被预览遮住」，鼠标移到下边缘时滑出显示。
   注意：**上边缘不再滑出任何东西** —— 用户反馈「鼠标放到上部出来的不是
   网页栏而是缩小的界面」。现在全屏是纯 CSS 占满，浏览器自己的地址栏
   （网页栏）始终在最上方，鼠标移到屏幕顶端看到的就是它；
   要回到功能区，点面板右上角「半屏 / 2-3屏」即可（那个工具条一直在）。 */
body.dp-is-full .window {
  display: none;
}
body.dp-is-full .dp-cmdbar {
  transform: translateY(102%); transition: transform .18s ease;
}
body.dp-is-full.dp-peek-bottom .dp-cmdbar { transform: translateY(0); }
body.dp-is-full .dp-cmdbar .field > span { color: #cbd5e1; }
body.dp-is-full .dp-cmdbar .hint,
body.dp-is-full .dp-cmdbar label,
body.dp-is-full .dp-cmdbar .field > span { color: #cbd5e1; }
body.dp-is-full .dp-cmdbar textarea, body.dp-is-full .dp-cmdbar input {
  background: #1e293b; color: #f1f5f9; border-color: #334155;
}
body.dp-is-full .dp-cmdbar input::placeholder { color: #94a3b8; }
/* 全屏时的底部指令条同样紧凑化：里面那块 .dp-cmdbar-src 不要再带白底与边框，
   否则半透明的深色底上会套一块不透明的白板（用户要的是「透明状」）。 */
body.dp-is-full .dp-cmdbar .dp-cmdbar-src{
  background: transparent; border: 0; border-radius: 0; padding: 0; margin: 0;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
body.dp-is-full .dp-cmdbar .dp-cmdbar-src input[type="text"]{
  background: rgba(30,41,59,.75); color: #f1f5f9; border-color: rgba(100,116,139,.6);
}
body.dp-is-full .dp-cmdbar .dp-cmd-help-btn{
  background: rgba(30,41,59,.75); color: #cbd5e1; border-color: rgba(100,116,139,.6);
}
body.dp-is-full .dp-cmdbar .dp-cmd-help-btn:hover{ background: rgba(51,65,85,.85); color:#fff; }
body.dp-is-full .dp-cmdbar .dp-cmd-help code.cmd{
  background: rgba(51,65,85,.7); color: #e2e8f0;
}
body.dp-is-full .dp-cmdbar .btn.ghost { color: #e2e8f0; border-color: #475569; }
@media (max-width: 900px) {
  .dp-panel.dp-two { width: 100vw; }
  body.preview-docked.dp-mode-two .window { margin-left: 0; }
}
.dp-approx { background: #fff; border-radius: 8px; padding: 6px 10px; }
.dp-approx .pv-h1, .dp-approx h1 { font-size: 1.4em; }
.dp-native .docx-wrapper { background: transparent; padding: 8px 0; }
.dp-native .docx-wrapper > section.docx { box-shadow: 0 2px 14px rgba(15,25,45,.16);
  margin-bottom: 14px; background: #fff; }
/* 照片删除角标 */
.ill-chip { position: relative; cursor: pointer; }
.ill-chip:hover { border-color: #2563eb; border-color: var(--brand); }
.ill-chip .ill-del { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px;
  border-radius: 50%; background: #dc2626; color: #fff; font-size: 14px; line-height: 18px;
  text-align: center; cursor: pointer; display: none; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.ill-chip:hover .ill-del { display: block; }
.ill-chip .ill-del:hover { background: #b91c1c; }
/* 照片放大预览（lightbox） */
.img-lightbox { position: fixed; inset: 0; z-index: 999; background: rgba(10,18,32,.78);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: zoom-out; padding: 30px; }
.img-lightbox[hidden] { display: none; }
.img-lightbox img { max-width: 92vw; max-height: 80vh; border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5); background: #fff; }
.img-lightbox .lb-name { color: #fff; font-size: 13px; margin-top: 10px;
  max-width: 90vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-lightbox .lb-close { position: absolute; top: 14px; right: 22px; color: #fff;
  font-size: 34px; line-height: 1; }

/* ---------- Word 插图：照片编号 + 表格结构预览 ---------- */
.ill-dz .dz-picked { display: none; }
.ill-img-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ill-chip { width: 88px; border: 1px solid #e5e9f0; border: 1px solid var(--line); border-radius: 9px;
  padding: 5px; text-align: center; background: #fff; }
.ill-chip img { width: 100%; height: 54px; object-fit: cover; border-radius: 5px;
  background: #f0f3f8; background: var(--line-soft); display: block; }
.ill-chip .ill-no { display: block; font-size: 12px; font-weight: 700;
  color: #2563eb; color: var(--brand); margin-top: 3px; }
.ill-chip .ill-name { display: block; font-size: 10px; color: #8a95a6; color: var(--text-mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ill-preview-box { margin: 12px 0; border: 1px solid #bfdbfe; border: 1px solid var(--brand-border);
  border-radius: 10px; padding: 12px 14px; background: #fff; }
.ill-pv-head { font-size: 13px; font-weight: 700; color: #2563eb; color: var(--brand);
  margin-bottom: 6px; }
.ill-tbl-cap { font-size: 12.5px; font-weight: 700; margin: 14px 0 4px;
  color: #5b6879; color: var(--text-sub); }
.ill-table .rn, .ill-table .cn { width: 30px; min-width: 30px; text-align: center;
  color: #8a95a6; color: var(--text-mute); font-weight: 400; background: #f6f8fb; font-size: 11px;
  padding: 4px 2px; }
.ill-table .col-head th.cn { border-bottom: 2px solid #bfdbfe; border-bottom: 2px solid var(--brand-border); }
.ill-table td.th { font-weight: 600; }
/* 插图原界面反馈（不跳页） */
#illResult { margin-top: 4px; }
.ill-msg { border-radius: 10px; padding: 12px 14px; font-size: 13.5px;
  margin: 10px 0; line-height: 1.7; }
.ill-msg.info { background: #eff6ff; border: 1px solid #bfdbfe; border: 1px solid var(--brand-border); color: #2563eb; color: var(--brand); }
.ill-msg.err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.ill-msg.err span { color: #9f7a7a; font-size: 12.5px; }
.ill-msg.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ill-pv-details { margin: 8px 0; }
.ill-pv-details summary { cursor: pointer; font-size: 13px; font-weight: 600;
  color: #2563eb; color: var(--brand); user-select: none; }
.ill-pv-details[open] summary { margin-bottom: 8px; }
.ill-preview .ill-table td { font-size: 12.5px; padding: 4px 8px; }
.retry-box { border-color: #fde68a; background: #fffdf5; }
.retry-box textarea { width: 100%; box-sizing: border-box; font-size: 16px; }
@media (max-width: 820px){
  .preview-scroll { max-height: 340px; padding: 12px 14px; }
}

/* ===================== 测试版（测试链接进入） ===================== */
body.tester-mode #buyoutBtn,
body.tester-mode #tipCard { display: none !important; }
body.tester-mode .quota-chip.ok {
  background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0;
  font-weight: 600;
}
body.tester-mode #userState { color: #047857; }

/* ===================== 会员专属（反馈） ===================== */
/* 非会员：隐藏反馈入口（状态栏按钮 + 设置页卡片），改为显示提示 */
body:not(.member-mode) .js-fb,
body:not(.member-mode) #fbCard { display: none !important; }
.js-fb-hint { display: none; }
body:not(.member-mode) .js-fb-hint { display: block; margin: 0 0 14px; }

/* ===================== Excel 类 Excel 预览器 ===================== */
.xlw { border:1px solid var(--line,#d7dde6); border-radius:10px; overflow:hidden; background:#fff; font-size:13px; }
.xlw-bar { display:flex; align-items:center; gap:10px; padding:6px 10px; background:#f6f8fb; border-bottom:1px solid #e3e8ef; }
.xlw-bar b { color:#1f6feb; }
.xlw-bar .muted { font-size:12px; }
.xlw-scroll { overflow:auto; max-height:60vh; }
.xlw-grid { border-collapse:separate; border-spacing:0; table-layout:auto; min-width:100%; }
.xlw-grid th, .xlw-grid td { border-right:1px solid #e3e8ef; border-bottom:1px solid #e3e8ef; padding:4px 8px; white-space:nowrap; max-width:340px; overflow:hidden; text-overflow:ellipsis; }
.xlw-grid th { background:#f1f5fa; color:#41506b; font-weight:600; text-align:center; position:sticky; z-index:2; }
.xlw-grid thead th { top:0; }
.xlw-grid .xlw-no { background:#f6f8fb; color:#8b98ad; text-align:center; min-width:44px; position:sticky; left:0; z-index:1; }
.xlw-grid thead .xlw-no { z-index:3; }
.xlw-grid td.xlw-hd { background:#eaf2fe; font-weight:700; color:#15315f; }
.xlw-grid td.xlw-num { text-align:right; font-variant-numeric:tabular-nums; }
.xlw-grid td.xlw-clickable { cursor:cell; }
.xlw-grid td.xlw-clickable:hover { outline:1px dashed #1f6feb; outline-offset:-1px; }
.xlw-grid td.xlw-clickable.sel { outline:2px solid #1f6feb; outline-offset:-2px; background:#fff7d6; }
.xlw-tabs { display:flex; align-items:center; gap:2px; padding:4px 8px; background:#f6f8fb; border-top:1px solid #e3e8ef; overflow-x:auto; }
.xlw-tab { border:1px solid transparent; background:none; padding:4px 12px; border-radius:6px 6px 0 0; cursor:pointer; color:#41506b; white-space:nowrap; }
.xlw-tab:hover { background:#e9eef6; }
.xlw-tab.on { background:#fff; border-color:#e3e8ef; border-bottom-color:#fff; color:#1f6feb; font-weight:600; }
.xlw-frozen-note { font-size:11px; color:#8b98ad; }

/* 本次改动位置：橙色虚线框 + 淡橙底色（仅为预览标记，不会写进文件） */
.xlw-grid td.xlw-changed { background:#fff4e5; box-shadow: inset 0 0 0 2px #f59e0b; }
.xlw-grid td.xlw-changed.xlw-hd { background:#ffe9c7; }
.xlw-grid td.xlw-changed.sel { background:#ffe9c7; }
.xlw-mark-legend { font-size:11px; color:#b45309; background:#fff7ed; border:1px dashed #f59e0b; border-radius:6px; padding:1px 8px; }

/* ===================== 十字光标定位（Crosshair）=====================
 * 横竖参考线 + 当前行列高亮 + 地址角标；默认开启，可关闭，偏好记 localStorage。
 * 主站预览（浅色主题）与 /web 在线体验版（深色主题）共用 crosshair.js，
 * 样式按主题各一份：这里浅色，webedit.html 里深色。                       */
.xlw-bar .xh-toggle { margin-left:auto; border:1px solid #d5dce6; background:#fff; color:#41506b;
  font-size:12px; padding:3px 10px; border-radius:6px; cursor:pointer; white-space:nowrap; }
.xlw-bar .xh-toggle:hover { border-color:#1f6feb; color:#1f6feb; }
.xlw-bar .xh-toggle.on { border-color:#1f6feb; color:#1f6feb; background:#eaf2fe; font-weight:600; }
.xh-overlay { position:absolute; inset:0; pointer-events:none; z-index:4; display:none; }
.xh-band { position:absolute; background:rgba(29,111,235,.09); pointer-events:none; }
.xh-line { position:absolute; background:rgba(29,111,235,.55); pointer-events:none; }
.xh-v { top:0; bottom:0; width:1px; }
.xh-h { left:0; right:0; height:1px; }
.xh-addr { position:fixed; z-index:9999; display:none; pointer-events:none; white-space:nowrap;
  background:#1f6feb; color:#fff; font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;
  padding:1px 7px; border-radius:5px; box-shadow:0 2px 8px rgba(15,23,42,.25); }

/* ===================== 打印区域蓝框拖拽 ===================== */
.pv-canvas { position: relative; }
.pv-drag { position: absolute; box-sizing: border-box; border: 2.4px dashed #1f6feb; cursor: move; z-index: 5; }
.pv-drag .pv-handle { position: absolute; right: -8px; bottom: -8px; width: 16px; height: 16px; background: #1f6feb; border: 2px solid #fff; border-radius: 50%; cursor: nwse-resize; box-shadow: 0 1px 5px rgba(21,49,95,.45); }
.pv-drag .pv-handle:hover { background: #0f4fb8; }
.pv-tip { position: absolute; background: #1f6feb; color: #fff; font-size: 11px; line-height: 1; padding: 4px 8px; border-radius: 4px; pointer-events: none; white-space: nowrap; z-index: 9; box-shadow: 0 2px 6px rgba(21,49,95,.35); }
.pv-guide { position: absolute; z-index: 10; max-width: 240px; background: #15315f; color: #fff; font-size: 12px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; box-shadow: 0 4px 14px rgba(21,49,95,.4); pointer-events: auto; cursor: pointer; }
.pv-guide .pv-arrow { position: absolute; width: 0; height: 0; border: 9px solid transparent; }
.pv-guide b { color: #9fd0ff; }
.pv-busy { position: absolute; inset: 0; background: rgba(255,255,255,.65); display: flex; align-items: center; justify-content: center; font-size: 12px; color: #1f6feb; z-index: 8; }

/* Excel 前端预览（停靠面板内）：工作表标签 + 表格 */
.xlsx-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.xlsx-tab { padding: 3px 12px; border: 1px solid #d1d5db; border-radius: 999px;
  background: #fff; cursor: pointer; font-size: 12px; color: #374151; }
.xlsx-tab.active { background: #16a34a; border-color: #16a34a; color: #fff; }
.xlsx-table { border-collapse: collapse; font-size: 12px; width: max-content; min-width: 100%; }
.xlsx-table th, .xlsx-table td { border: 1px solid #e2e8f0; padding: 4px 10px;
  white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.xlsx-table th { background: #f1f5f9; font-weight: 600; position: sticky; top: 0; }
.xlsx-table .rowno { background: #f8fafc; color: #94a3b8; text-align: center; width: 40px; }
.xlsx-tabs.files { border-bottom: 1px solid #e2e8f0; padding-bottom: 4px; margin-bottom: 4px; }
.xlsx-tab.file { background: #f8fafc; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.xlsx-tab.file.active { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.xlsx-table td { white-space: pre-line; vertical-align: top; }
.xlsx-table td { border: 1px solid #d7dde5; }      /* 默认细网格线，被单元格自带边框覆盖 */
.xlsx-table td { padding: 3px 8px; }

/* ── 上部紧凑化（用户：「太占地方了，使表格的显示面积太少」）──────────
   以前：文件标签行 / 文件名行 / 显示行数行 / 编辑栏行 / 工作表标签行 共 5 层。
   现在合并成 2 层：
     ① .xl-head    文件名 + 行列信息 + 显示行数 + 工作表标签（同一行，放不下才换行）
     ② .xl-edit-bar 紧凑样式条（提示文字改成 title 悬浮提示，不再占行）
   整体比原来少占约 120px，表格可用高度明显变大。 */
.xl-head{
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  margin:0 0 4px; padding:4px 8px;
  background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px;
  font-size:12px; line-height:1.6;
}
.xl-head-name{ font-size:12px; color:#0f172a; max-width:280px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.xl-head .muted{ font-size:11px; }
.xl-head-lab{ font-size:11px; color:#64748b; }
.xl-head-sep{ width:1px; height:14px; background:#e2e8f0; margin:0 2px; }
.xl-head .xlsx-tab{ padding:2px 10px; font-size:11px; }
.xl-head .xlsx-tab.active{ background:#16a34a; border-color:#16a34a; color:#fff; }

/* 预览内直接编辑（Excel / Word） */
/* 紧凑化：整条样式栏必须**单行**。之前 flex-wrap 会在窄容器里折成两行，
   编辑栏高度从 35px 涨到 54px，白白吃掉表格显示面积。
   手段：控件本身收窄 + 提示文字只留一小截（完整内容靠 title 悬浮看）。 */
.xl-edit-bar { display: flex; gap: 3px; align-items: center; flex-wrap: nowrap;
  margin: 0 0 4px; padding: 3px 6px; background: #f0fdf4;
  border: 1px solid #bbf7d0; border-radius: 8px; overflow: hidden; }
.xl-edit-bar .xl-head-sep { flex: 0 0 1px; }
.xl-eb-title { font-size: 12px; color: #166534; font-weight: 600; flex: 0 0 auto; }
.xl-eb-btn { padding: 2px 7px; border: 1px solid #d1d5db; border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 12px; color: #374151;
  flex: 0 0 auto; white-space: nowrap; }
.xl-eb-btn:hover { border-color: #16a34a; color: #166534; }
.xl-eb-lab { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: #374151;
  flex: 0 0 auto; white-space: nowrap; }
.xl-eb-lab input[type="color"] { width: 22px; height: 20px; padding: 0; border: 1px solid #d1d5db;
  border-radius: 4px; background: #fff; cursor: pointer; }
.xl-eb-save { padding: 3px 12px; border: 1px solid #16a34a; border-radius: 6px;
  background: #16a34a; color: #fff; cursor: pointer; font-size: 12px; font-weight: 600;
  /* 单行紧凑条里绝不能换行：一旦「💾 保存」折成两行，整条编辑栏高度翻倍 */
  flex: 0 0 auto; white-space: nowrap; line-height: 1.5; }
.xl-eb-save:hover { background: #15803d; }
.xl-eb-save:disabled { opacity: .6; cursor: default; }
/* 提示文字不再常驻占地方，改成有内容时才显示（且可 title 悬浮查看） */
/* 提示文字强制单行省略：多行会把编辑栏撑高，白白吃掉表格显示面积。
   完整内容仍可用鼠标悬停看（HTML 里有 title）。 */
.xl-eb-msg { font-size: 11px; color: #64748b;
  flex: 0 1 150px; min-width: 24px; max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
.xl-eb-msg:empty{ display:none; }
td.xl-cell { cursor: text; }
/* 选中态统一走「整块外框」：聚焦不再画蓝框，活动格也不再画橙框（两个框叠着很乱） */
td.xl-cell:focus { outline: none; background: #fff; }
td.xl-cell.sel:not(.xl-inrange) { outline: 2px solid #0a5c2e; outline-offset: -2px; }
.xl-eb-addr { padding: 2px 8px; border: 1px solid #bfdbfe; border-radius: 6px;
  background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 600;
  font-family: ui-monospace, Consolas, monospace;
  flex: 0 1 auto; min-width: 0; max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.xl-cell.hl { background: #fde68a !important; box-shadow: inset 0 0 0 2px #f59e0b; }
.nl-explain { margin: 6px 0 2px; padding: 7px 12px; border-radius: 10px; font-size: 13px;
  line-height: 1.6; }
.nl-explain.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.nl-explain.miss { background: #f8fafc; border: 1px solid #e2e8f0; color: #64748b; }
.nl-explain .nl-pro { margin-top: 4px; padding-top: 4px; border-top: 1px dashed #bbf7d0;
  color: #1d4ed8; font-size: 12.5px; }
.nl-explain .nl-pro b { font-family: ui-monospace, Consolas, monospace; }
.pos-line { margin: 6px 0 0; font-size: 13px; color: #1d4ed8; }
.pos-line b { font-family: ui-monospace, Consolas, monospace; }
.dp-savebar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin: 0 0 10px; padding: 8px 12px; background: #f0fdf4;
  border: 1px solid #bbf7d0; border-radius: 10px; }
.dp-save-tip { font-size: 12px; color: #166534; font-weight: 600; }
/* 【实测坑】Excel 表格的单元格也是 contenteditable，点一下就会被这条规则画上
   2px 蓝框（还外扩 1px）→ 加上格子自己的绿色，屏幕上就是「每格一个蓝框 + 一个绿框」，
   这正是用户说的「选中的效果不好看」。表格里的格子交给选区外框统一处理，这里排除掉。 */
.dp-native [contenteditable="true"]:focus:not(td.xl-cell) { outline: 2px solid #1f6feb; outline-offset: 1px;
  background: rgba(31,111,235,.04); }
.dp-native td.xl-cell:focus { outline: none; background: transparent; }

/* 进度条改为右下角悬浮卡片：不遮挡界面，用户可继续操作其他板块 */
#progressOverlay.overlay { position: fixed; inset: auto; right: 16px; bottom: 16px;
  background: transparent; display: block; z-index: 60; pointer-events: none; }
#progressOverlay.overlay[hidden] { display: none; }
#progressOverlay .overlay-card { pointer-events: auto; width: 340px; max-width: 90vw;
  padding: 16px 18px 14px; border-radius: 14px; animation: slideUp .25s ease;
  border-left: 4px solid #dc2626; box-shadow: 0 12px 36px rgba(16,24,40,.18); }
#progressOverlay .ov-title { font-size: 15px; margin-bottom: 10px; font-weight: 700; }
/* 阶段文字是用户唯一能看出「还在动」的信号，加粗放大，别让人以为卡住 */
#progressOverlay .ov-info { font-size: 13.5px; font-weight: 600; color: #111827; }
#progressOverlay .ov-est { font-weight: 400; color: #6b7280; font-size: 12.5px; }
#progressOverlay .ov-hint { font-size: 12px; color: #9aa0a6; margin: 8px 0 0; line-height: 1.6; }
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; } }

/* ══════════════════════════════════════════════════════════════
   Office 风格功能区（Ribbon）—— 见 static/js/ribbon.js
   目标：布局和命名照 Office 写，用户从 Office 迁过来不用重新学。
   图标全部用 CSS 画，不依赖 emoji 字体（无 emoji 字体会显示豆腐块 □）。
   ══════════════════════════════════════════════════════════════ */
.rb-host{ background:#f3f2f1; border-bottom:1px solid #d8d6d3; user-select:none; }
/* 【实测坑】预览面板是 flex 纵向布局，rb-host 默认 flex-shrink:1 会被压到 56px，
   按钮上的「字色 / 填充 / 无填充」这几个字被下面的公式栏盖住半截
   —— 用户说的「字体有一点被简单遮住了」就是这个。这里禁止压缩。 */
#dpRibbon{ flex:0 0 auto; }
#dpRibbon .rb-body{ align-items:stretch; }
.rb-tabs{ display:flex; gap:1px; padding:0 6px; background:#f3f2f1; border-bottom:1px solid #e3e1de; }
.rb-tab{
  appearance:none; border:0; background:transparent; cursor:pointer;
  font:inherit; font-size:13px; color:#444; padding:6px 13px 5px;
  border-radius:5px 5px 0 0; position:relative;
}
.rb-tab:hover{ background:#e9e7e4; color:#222; }
.rb-tab.on{ background:#fff; color:#0a5c2e; font-weight:600; }
.rb-tab.on::after{
  content:''; position:absolute; left:11px; right:11px; top:0; height:2px;
  background:#0a5c2e; border-radius:2px;
}
/* 面板窄的时候要能换行，否则右侧按钮会被裁掉点不到
   （半屏预览时最容易出现，用户会以为「按钮坏了」） */
.rb-body{ display:flex; align-items:stretch; gap:0; flex-wrap:wrap; padding:2px 4px 0; }
.rb-body::-webkit-scrollbar{ height:5px; }
.rb-group{
  display:flex; flex-direction:column; justify-content:space-between;
  padding:2px 9px 1px; border-right:1px solid #e0dedb; min-width:0; flex:0 0 auto;
}
.rb-group:last-child{ border-right:0; }
.rb-items{ display:flex; align-items:center; gap:2px; flex-wrap:wrap; max-width:100%; }
.rb-gtitle{ font-size:10px; color:#777; text-align:center; margin-top:1px; letter-spacing:.3px; }

.rb-item{ display:inline-flex; }
.rb-btn{
  appearance:none; border:1px solid transparent; background:transparent; cursor:pointer;
  border-radius:4px; padding:3px 6px; min-width:30px; min-height:30px;
  display:inline-flex; flex-direction:column; align-items:center; justify-content:center;
  gap:2px; color:#333; font:inherit;
}
.rb-btn:hover{ background:#e6e4e1; border-color:#d8d6d3; }
.rb-btn:active{ background:#dcdad7; }
.rb-btn.on{ background:#cfe4d8; border-color:#8fbf9f; }
/* 【实测坑】line-height:1.1 只有 12px，而 11px 中文的实际字身约 13px，
   底部被行盒裁掉一截 —— 用户看到的就是「字体有一点被简单遮住了」。
   改成 1.5 并给 1px 下内边距，字身完整显示。 */
.rb-lab{ font-size:11px; line-height:1.5; padding-bottom:1px; white-space:nowrap; }
.rb-btn .rb-ic + .rb-lab:empty{ display:none; }
.rb-btn:has(.rb-lab:empty){ padding:3px; min-width:30px; }

.rb-select{
  font:inherit; font-size:12px; padding:3px 4px; border:1px solid #d0cecb;
  border-radius:3px; background:#fff; color:#333; cursor:pointer; height:26px;
}
.rb-select:hover{ border-color:#9a9895; }
.rb-dd{ align-items:center; }

.rb-color{
  appearance:none; border:1px solid transparent; background:transparent; cursor:pointer;
  border-radius:4px; padding:3px 6px 4px; display:inline-flex; flex-direction:column;
  align-items:center; gap:1px; color:#333; font:inherit;
}
.rb-color:hover{ background:#e6e4e1; border-color:#d8d6d3; }
.rb-color-wrap{ display:inline-flex; flex-direction:column; align-items:center; gap:2px; flex:none; }
/* 色条与字母图标是一组：不许被 flex 压扁（压到 15px 时字母 A 的下沿就被色条盖住了） */
.rb-color-wrap .rb-ic{ flex:none; width:17px; height:17px; }
.rb-color-bar{ display:block; width:18px; height:4px; border-radius:1px; border:1px solid rgba(0,0,0,.15); }

/* 取色控件 = 主按钮 + 小箭头 + 展开的预设色盘（和 Office 的「字体颜色 / 填充颜色」一样） */
.rb-color{ position:relative; flex-direction:row; align-items:stretch; padding:0; gap:0; }
.rb-color .rb-color-main{
  display:flex; flex-direction:column; align-items:center; gap:1px;
  border:0; background:transparent; cursor:pointer; padding:3px 5px 4px; border-radius:4px 0 0 4px;
  color:#333; font:inherit;
}
.rb-color .rb-color-arrow{
  border:0; background:transparent; cursor:pointer; color:#666; font-size:11px;
  padding:0 3px 0 1px; border-radius:0 4px 4px 0;
}
.rb-color .rb-color-main:hover, .rb-color .rb-color-arrow:hover{ background:#e6e4e1; }
.rb-palette{
  position:absolute; top:100%; left:0; z-index:60; margin-top:2px;
  display:grid; grid-template-columns:repeat(5, 20px); gap:3px; padding:6px;
  background:#fff; border:1px solid #d8d6d3; border-radius:5px;
  box-shadow:0 4px 12px rgba(0,0,0,.16);
}
.rb-sw{ display:block; width:20px; height:18px; border-radius:2px; cursor:pointer; border:1px solid rgba(0,0,0,.18); }
.rb-sw:hover{ outline:2px solid #1f6feb; outline-offset:1px; }

/* ---- 图标：全部 CSS 绘制，避免 emoji 豆腐块 ---- */
.rb-ic{ display:block; position:relative; width:17px; height:17px; flex:0 0 auto; }
.rb-ic.dot{ border-radius:50%; background:#c8c6c3; }
.rb-ic.b::after{
  content:'B'; position:absolute; inset:0; font:700 15px/17px Georgia,serif;
  text-align:center; color:#1a1a1a;
}
.rb-ic.i::after{
  content:'I'; position:absolute; inset:0; font:italic 700 15px/17px Georgia,serif;
  text-align:center; color:#1a1a1a;
}
.rb-ic.u::after{
  content:'U'; position:absolute; inset:0; font:700 15px/15px Georgia,serif;
  text-align:center; color:#1a1a1a; border-bottom:2px solid #1a1a1a;
}
.rb-ic.strike::after{
  content:'S'; position:absolute; inset:0; font:700 15px/17px Georgia,serif;
  text-align:center; color:#1a1a1a;
  background:linear-gradient(to bottom,transparent 46%,#1a1a1a 46%,#1a1a1a 56%,transparent 56%);
}
.rb-ic.paste{ background:#8ec5a8; border:1.5px solid #2f6b47; border-radius:2px; }
.rb-ic.paste::before{
  content:''; position:absolute; left:3px; right:3px; top:-3px; height:4px;
  background:#2f6b47; border-radius:1px;
}
.rb-ic.cut{ background:
  linear-gradient(45deg,transparent 46%,#666 46%,#666 54%,transparent 54%) no-repeat left 6px top 1px/2px 9px,
  linear-gradient(-45deg,transparent 46%,#666 46%,#666 54%,transparent 54%) no-repeat right 6px top 1px/2px 9px,
  radial-gradient(circle at 3px 14px,#666 0 2.4px,transparent 2.6px),
  radial-gradient(circle at 14px 14px,#666 0 2.4px,transparent 2.6px);
}
.rb-ic.copy{ background:#cfe0f2; border:1.5px solid #3a6ea5; border-radius:2px; }
.rb-ic.copy::before{
  content:''; position:absolute; left:-3px; top:-3px; width:9px; height:9px;
  background:#eaf1fa; border:1.5px solid #3a6ea5; border-radius:1px;
}
.rb-ic.brush{ background:#f2d9a8; border:1.5px solid #a5761f; border-radius:1px 1px 5px 5px; }
.rb-ic.font::before{
  content:'A'; position:absolute; inset:0; font:700 15px/17px Georgia,serif;
  text-align:center; color:#1a1a1a;
}
.rb-ic.fsize::before{
  content:'A'; position:absolute; left:0; top:0; font:700 15px/13px Georgia,serif; color:#1a1a1a;
}
.rb-ic.fsize::after{
  content:'2'; position:absolute; right:0; bottom:0; font:700 9px/9px Georgia,serif; color:#1a1a1a;
}
.rb-ic.fcolor::before{
  content:'A'; position:absolute; inset:0 0 3px 0; font:700 15px/14px Georgia,serif;
  text-align:center; color:#1a1a1a;
}
.rb-ic.bcolor{ background:linear-gradient(160deg,#ffe08a 45%,#c98b1a 46%); border-radius:2px; }
.rb-ic.nofill{ background:#fff; border:1.5px solid #b9b7b4; border-radius:2px; }
.rb-ic.nofill::after{
  content:''; position:absolute; left:1px; right:1px; top:7.5px; height:2px;
  background:#d0342c; transform:rotate(-45deg);
}
.rb-ic.align-l::before,.rb-ic.align-c::before,.rb-ic.align-r::before,
.rb-ic.align-j::before,.rb-ic.align-top::before,.rb-ic.align-middle::before,.rb-ic.align-bottom::before{
  content:''; position:absolute; left:2px; right:2px; height:2px; background:#444; border-radius:1px;
}
.rb-ic.align-l::before{ top:3px; box-shadow:0 4px 0 #444,0 8px 0 #444; }
.rb-ic.align-c::before{ top:3px; left:2px; right:2px; box-shadow:0 4px 0 #444,0 8px 0 #444; }
.rb-ic.align-c::after{
  content:''; position:absolute; left:0; right:0; top:7px; height:2px;
  background:#0a5c2e; transform:translateX(2px); width:13px;
}
.rb-ic.align-r::before{ top:3px; left:6px; box-shadow:0 4px 0 #444,0 8px 0 #444; }
.rb-ic.align-j::before{
  top:3px; left:1px; right:1px; height:11px; background:transparent; border-bottom:0;
  box-shadow:none; border-top:2px solid #444;
}
.rb-ic.align-j::after{
  content:''; position:absolute; left:1px; right:1px; top:13px; height:2px; background:#444;
}
.rb-ic.align-top::before{ left:7px; right:auto; width:2px; top:2px; height:13px;
  box-shadow:5px 0 0 -0px #444; }
.rb-ic.align-top::after{
  content:''; position:absolute; left:2px; top:3px; width:10px; height:2px; background:#0a5c2e;
}
.rb-ic.align-middle::before{ left:7px; top:2px; width:2px; height:13px; }
.rb-ic.align-middle::after{
  content:''; position:absolute; left:2px; top:7.5px; width:10px; height:2px; background:#0a5c2e;
}
.rb-ic.align-bottom::before{ left:7px; top:2px; width:2px; height:13px; }
.rb-ic.align-bottom::after{
  content:''; position:absolute; left:2px; top:12px; width:10px; height:2px; background:#0a5c2e;
}
.rb-ic.spacing::before{
  content:''; position:absolute; inset:2px 4px; background:
    linear-gradient(#444,#444) 0 2px/100% 2px no-repeat,
    linear-gradient(#444,#444) 0 6px/100% 2px no-repeat,
    linear-gradient(#444,#444) 0 10px/100% 2px no-repeat;
}
.rb-ic.indent::before{
  content:''; position:absolute; inset:1px 3px; background:
    linear-gradient(#0a5c2e,#0a5c2e) 0 0/2px 15px no-repeat,
    linear-gradient(#444,#444) 4px 3px/10px 2px no-repeat,
    linear-gradient(#444,#444) 4px 7px/10px 2px no-repeat,
    linear-gradient(#444,#444) 4px 11px/6px 2px no-repeat;
}
.rb-ic.clearfmt::before{
  content:'A'; position:absolute; inset:0; font:700 15px/17px Georgia,serif; text-align:center; color:#444;
}
.rb-ic.clearfmt::after{
  content:''; position:absolute; left:0; right:0; top:8px; height:2px; background:#d0342c;
}
.rb-ic.find{ border:2px solid #3a6ea5; border-radius:50%; }
.rb-ic.find::after{
  content:''; position:absolute; right:-4px; bottom:-4px; width:7px; height:2px;
  background:#3a6ea5; transform:rotate(45deg); border-radius:1px;
}
.rb-ic.replace::before{
  content:'↔'; position:absolute; inset:0; font:700 14px/17px sans-serif; text-align:center; color:#3a6ea5;
}
.rb-ic.shot{ border:1.5px solid #2f6b47; border-radius:2px; background:#d9efe2; }
.rb-ic.shot::before{
  content:''; position:absolute; left:2px; right:2px; bottom:2px; height:8px;
  background:linear-gradient(to top right,#2f6b47 2px,transparent 2px) 0 100%/5px 5px;
}
.rb-ic.shot::after{
  content:''; position:absolute; left:3px; bottom:7px; width:4px; height:4px;
  border-left:1.5px solid #2f6b47; border-top:1.5px solid #2f6b47; transform:skewY(-30deg);
}
.rb-ic.table{ border:1.5px solid #666; }
.rb-ic.table::before{
  content:''; position:absolute; inset:2px; background:
    linear-gradient(#666,#666) 0 4.5px/100% 1.5px no-repeat,
    linear-gradient(#666,#666) 0 9px/100% 1.5px no-repeat,
    linear-gradient(#666,#666) 5px 0/1.5px 100% no-repeat;
}
.rb-ic.pagebreak{ background:#fff; border:1px solid #bbb; border-radius:1px; }
.rb-ic.pagebreak::before{
  content:''; position:absolute; left:1px; right:1px; top:7px; height:1.5px;
  background:repeating-linear-gradient(90deg,#666 0 3px,transparent 3px 6px);
}
.rb-ic.numfmt::before{
  content:'123'; position:absolute; inset:0; font:600 8px/17px sans-serif;
  text-align:center; color:#1a1a1a;
}
.rb-ic.sum{ border-radius:50%; background:#e8f2ec; border:1.5px solid #0a5c2e; }
.rb-ic.sum::after{
  content:'Σ'; position:absolute; inset:0; font:700 12px/15px Georgia,serif;
  text-align:center; color:#0a5c2e;
}
.rb-ic.merge{
  background:linear-gradient(#666,#666) 0 0/100% 1.5px no-repeat,
             linear-gradient(#666,#666) 0 100%/100% 1.5px no-repeat,
             linear-gradient(#666,#666) 0 0/1.5px 100% no-repeat,
             linear-gradient(#666,#666) 100% 0/1.5px 100% no-repeat;
  margin:2px 0;
}
.rb-ic.wrap::before{
  content:''; position:absolute; left:1px; right:1px; top:4px; height:11px;
  background:
    linear-gradient(#0a5c2e,#0a5c2e) 0 0/100% 2px no-repeat,
    linear-gradient(#0a5c2e,#0a5c2e) 0 4px/8px 2px no-repeat,
    linear-gradient(#0a5c2e,#0a5c2e) 0 8px/100% 2px no-repeat;
}
.rb-ic.sortaz::before,.rb-ic.sortza::before{
  content:''; position:absolute; left:5px; top:1px; width:2px; height:15px; background:#444;
}
.rb-ic.sortaz::after{
  content:''; position:absolute; left:2px; bottom:2px;
  border-left:4px solid transparent; border-right:4px solid transparent; border-bottom:6px solid #0a5c2e;
}
.rb-ic.sortza::after{
  content:''; position:absolute; left:2px; top:2px;
  border-left:4px solid transparent; border-right:4px solid transparent; border-top:6px solid #c0392b;
}
.rb-ic.filter{
  background:linear-gradient(#444,#444) 0 0/100% 2px no-repeat;
  padding-top:2px;
}
.rb-ic.filter::after{
  content:''; position:absolute; left:3px; top:5px;
  border-left:5px solid transparent; border-right:5px solid transparent; border-top:7px solid #444;
}
.rb-ic.clearfilter{
  background:linear-gradient(#444,#444) 0 0/100% 2px no-repeat;
}
.rb-ic.clearfilter::after{
  content:'✕'; position:absolute; inset:2px 0 0 0; font:700 11px/15px sans-serif;
  text-align:center; color:#c0392b;
}
.rb-ic.agg::before{
  content:'Σ'; position:absolute; inset:0; font:700 15px/17px Georgia,serif;
  text-align:center; color:#1a1a1a;
}
.rb-ic.agg::after{
  content:''; position:absolute; right:0; bottom:0; width:6px; height:6px;
  background:linear-gradient(135deg,#0a5c2e 50%,#c0392b 50%);
}
.rb-ic.cf{
  border-radius:50%;
  background:conic-gradient(#c0392b 0 25%,#e8b71a 0 50%,#2f9e44 0 75%,#3b82f6 0);
}
.rb-ic.border{
  background:
    linear-gradient(#444,#444) 0 0/100% 1.5px no-repeat,
    linear-gradient(#444,#444) 0 100%/100% 1.5px no-repeat,
    linear-gradient(#444,#444) 0 0/1.5px 100% no-repeat,
    linear-gradient(#444,#444) 100% 0/1.5px 100% no-repeat;
  margin:2px 1px;
}
.rb-ic.freeze{ background:#dce9f7; border:1.5px solid #3a6ea5; border-radius:2px; }
.rb-ic.freeze::before{
  content:''; position:absolute; left:0; right:0; top:5px; height:1.5px; background:#3a6ea5;
  box-shadow:0 4px 0 -1px #3a6ea5;
}
.rb-ic.ruler{ background:#f0e2b8; border:1px solid #a5761f; border-radius:1px; }
.rb-ic.ruler::before{
  content:''; position:absolute; left:2px; right:2px; top:4px; height:8px; background:
    repeating-linear-gradient(90deg,#a5761f 0 1px,transparent 1px 4px);
}
.rb-ic.zoomin::before{
  content:'+'; position:absolute; inset:0; font:700 16px/17px sans-serif; text-align:center; color:#1a1a1a;
}
.rb-ic.zoomout::before{
  content:'−'; position:absolute; inset:0; font:700 16px/17px sans-serif; text-align:center; color:#1a1a1a;
}
.rb-ic.fit{ border:1.5px solid #3a6ea5; border-radius:2px; }
.rb-ic.fit::before,.rb-ic.fit::after{
  content:''; position:absolute; width:5px; height:5px; border:1.5px solid #3a6ea5;
}
.rb-ic.fit::before{ left:-1px; top:-1px; border-right:0; border-bottom:0; }
.rb-ic.fit::after{ right:-1px; bottom:-1px; border-left:0; border-top:0; }
.rb-ic.viewmode{ background:linear-gradient(#0a5c2e,#0a5c2e) 0 0/100% 3px no-repeat,
  linear-gradient(#0a5c2e,#0a5c2e) 0 100%/100% 3px no-repeat; border:1px solid #0a5c2e; border-radius:1px; }
.rb-ic.viewmode::after{
  content:''; position:absolute; left:2px; top:5px; width:9px; height:4px; background:#0a5c2e;
}
.rb-ic.sel{ outline:2px dashed #e5484d; outline-offset:1px; border-radius:2px; }
.rb-ic.lvl{ background:linear-gradient(90deg,#e5484d 0 14%,#f2760c 0 28%,#e8b71a 0 42%,
  #2f9e44 0 57%,#12b5a5 0 71%,#3b82f6 0 85%,#8b5cf6 0); border-radius:2px; }

/* 全屏时 Ribbon 固定在最上方，命令栏在底部，中间给文档 */
.dp-is-full .rb-host{ position:sticky; top:0; z-index:6; }

/* ══════════════════════════════════════════════════════════════
   框选截图（见 static/js/shot.js）
   ══════════════════════════════════════════════════════════════ */
body.sh-armed{ cursor:crosshair !important; }
body.sh-armed *{ cursor:crosshair !important; user-select:none !important; }
.sh-guide{
  position:fixed; z-index:9998; display:none; pointer-events:none;
  border:2px dashed #0a5c2e; background:rgba(10,92,46,.10);
  border-radius:2px; box-shadow:0 0 0 9999px rgba(0,0,0,.18);
}
.sh-guide.done{
  border-style:solid; border-color:#0a5c2e; background:rgba(10,92,46,.16);
  animation:shPop .26s ease;
}
@keyframes shPop{ from{ transform:scale(.96); opacity:.5; } to{ transform:scale(1); opacity:1; } }
.sh-tip{
  position:fixed; z-index:9999; top:14px; left:50%; transform:translateX(-50%);
  background:#22303c; color:#fff; font-size:13px; padding:7px 15px; border-radius:6px;
  box-shadow:0 6px 20px rgba(0,0,0,.28); pointer-events:none;
}
.sh-esc{ color:#9fd8b4; margin-left:6px; }
.sh-flash{
  position:fixed; z-index:9999; top:64px; left:50%; transform:translateX(-50%);
  background:#b42318; color:#fff; font-size:13px; padding:8px 16px; border-radius:6px;
  box-shadow:0 6px 20px rgba(0,0,0,.28);
}

/* 查找/替换小条 */
.dp-findbar{
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  padding:6px 10px; background:#fff; border-bottom:1px solid #e3e1de; font-size:13px;
}
.dp-findbar input{
  font:inherit; font-size:13px; padding:4px 8px; border:1px solid #d0cecb; border-radius:3px;
}
.dp-findbar input:focus{ outline:2px solid #0a5c2e33; border-color:#0a5c2e; }
/* 标尺（视图标签页里的开关） */
.dp-ruler{
  position:absolute; left:0; right:0; height:18px; z-index:5; pointer-events:none;
  background:
    repeating-linear-gradient(90deg,#9a9895 0 1px,transparent 1px 20px) no-repeat left 8px top 0/10px 6px,
    repeating-linear-gradient(90deg,#c9c7c4 0 1px,transparent 1px 10px) no-repeat left 8px top 0/5px 11px;
  opacity:.55; border-bottom:1px solid #b9b7b4;
}

/* 表格拖选出来的一片区域（Excel 里选中多格就是这个观感） */
td.xl-cell{ position:relative; }
td.xl-cell.xl-inrange{ background-color:rgba(10,92,46,.10); }
td.xl-cell.xl-inrange.sel{ background-color:rgba(255,255,255,.55); }
.xlsx-table td.sel{ outline:2px solid #0a5c2e; outline-offset:-2px; }

/* 表头筛选：真实的可点按钮（以前只是一个 CSS 画的三角，点它什么也不发生） */
.xlsx-table th.colhead{ position:relative; padding-right:16px !important; cursor:pointer; user-select:none; }
.xlsx-table th.colhead:hover{ background:#e6f0ea; }
.xlsx-table th.colhead.xl-hasfilter{ background:#e8f2ec; color:#0a5c2e; }
/* 正在按这一列筛选：底色加深 + 加个「已筛选」态，用户一眼知道有筛选条件 */
.xlsx-table th.colhead.xl-filtering{ background:#cfe6d9; color:#0a5c2e; font-weight:800; }
.xlsx-table th.colhead .xl-fbtn{
  display:inline-block; margin-left:4px; padding:0 3px; border-radius:3px;
  background:#0a5c2e; color:#fff; font-size:11px; line-height:15px; cursor:pointer;
  vertical-align:middle; text-decoration:none;
}
.xlsx-table th.colhead .xl-fbtn:hover{ background:#084a26; }

/* 选中整行/整列时，列标与行号也要亮起来（否则用户不知道操作范围多大） */
.xlsx-table th.colhead.xl-headsel,
.xlsx-table td.rowno.xl-headsel{ background:#0a5c2e; color:#fff; font-weight:700; }
.xlsx-table th.rowno.corner{ cursor:pointer; }

/* 筛选下拉面板 */
.xl-filterpanel{
  position:fixed; z-index:9999; width:236px; display:flex; flex-direction:column;
  background:#fff; border:1px solid #cbd5e0; border-radius:8px;
  box-shadow:0 8px 28px rgba(15,23,42,.22); overflow:hidden; font-size:12px;
}
.xl-fp-head{ display:flex; align-items:center; padding:6px 8px; background:#f1f5f9;
  font-weight:700; color:#1a202c; border-bottom:1px solid #e2e8f0; }
.xl-fp-x{ margin-left:auto; border:0; background:transparent; cursor:pointer;
  font-size:15px; line-height:1; color:#64748b; padding:0 3px; }
.xl-fp-x:hover{ color:#dc2626; }
.xl-fp-search{ padding:5px 6px; border-bottom:1px solid #f1f5f9; }
.xl-fp-search input{ width:100%; padding:3px 6px; font-size:12px; }
.xl-fp-btns{ display:flex; align-items:center; gap:4px; padding:4px 6px; border-bottom:1px solid #f1f5f9; }
.xl-fp-btns button{ border:1px solid #cbd5e0; background:#fff; border-radius:4px;
  font-size:11px; padding:1px 6px; cursor:pointer; }
.xl-fp-btns button:hover{ background:#eafaf0; border-color:#9ad0b3; }
.xl-fp-cnt{ margin-left:auto; font-size:11px; color:#94a3b8; }
.xl-fp-list{ overflow:auto; flex:1 1 auto; max-height:230px; padding:2px 0; }
.xl-fp-item{ display:flex; align-items:center; gap:5px; padding:2px 8px; cursor:pointer; }
.xl-fp-item:hover{ background:#eafaf0; }
.xl-fp-t{ flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.xl-fp-n{ color:#94a3b8; font-size:11px; }
.xl-fp-foot{ display:flex; justify-content:flex-end; gap:5px; padding:5px 6px;
  border-top:1px solid #e2e8f0; background:#f8fafc; }

/* ============ 插件管理面板 ============ */
#p-plug .hint { color: #4a5568; }
.plug-item { border:1px solid #e2e8f0; border-radius:10px; padding:12px 14px; margin:10px 0; background:#fbfcfe; }
.plug-hd { display:flex; align-items:center; gap:10px; }
.plug-hd b { font-size:14px; color:#1a202c; }
.plug-state { font-size:11px; padding:2px 8px; border-radius:99px; border:1px solid #cbd5e0; color:#64748b; background:#fff; }
.plug-state.plug-available { color:#0a5c2e; border-color:#9ad0b3; background:#eafaf0; }
.plug-state.plug-installed { color:#92610a; border-color:#e6c98a; background:#fdf7e8; }
.plug-desc { font-size:12px; color:#4a5568; margin-top:5px; }
.plug-meta { font-size:11px; color:#94a3b8; margin-top:3px; }
.plug-ok { font-size:12px; color:#0a5c2e; font-weight:700; }
.plug-btn { font-size:12px; }
.plug-bar { margin-top:8px; }
.plug-bar-in { height:7px; border-radius:99px; background:#e2e8f0; overflow:hidden; }
.plug-bar-in i { display:block; height:100%; width:0; background:linear-gradient(90deg,#2f9e63,#38b26b); transition:width .3s; }
.plug-bar-tx { font-size:11px; color:#64748b; margin-top:4px; display:block; }
.plug-msg { margin-top:6px; min-height:15px; }

/* 演示动图缺失时的优雅降级（线上打包未含 gifs 时不出现裂图） */
.gif-fallback::after{
  content:"演示动图 · 完整版安装包内含完整动图演示";
  display:flex;align-items:center;justify-content:center;
  min-height:120px;padding:16px;text-align:center;
  color:#64748b;font-size:13px;
  background:repeating-linear-gradient(45deg,#f9fafb,#f9fafb 10px,#f3f4f6 10px,#f3f4f6 20px);
  border:1px dashed #d1d5db;border-radius:8px;
}

/* ============================================================
   新手引导条：简洁紧凑，首屏一屏看完
   ============================================================ */
.we-guide{
  background:#f8fafd;border:1px solid #e5e9f0;border-radius:10px;
  padding:12px 16px;margin:0 0 14px;
  overflow:hidden;word-break:break-word;
}
.we-guide .wg-top{display:flex;align-items:center;gap:12px;justify-content:space-between}
.we-guide .wg-title{font-size:15px;font-weight:600;color:#1e2939;line-height:1.4}
.we-guide .wg-desc{font-size:12.5px;color:#6b7280;margin-top:3px;line-height:1.5}
.we-guide .wg-x{
  flex:0 0 auto;width:24px;height:24px;min-height:24px;line-height:1;
  border:1px solid #e5e7eb;background:#fff;color:#9ca3af;
  border-radius:6px;font-size:16px;cursor:pointer
}
.we-guide .wg-x:hover{background:#f3f4f6;color:#374151}
.we-guide .wg-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.we-guide .wg-acts button{
  border:1px solid #d1d9e6;background:#fff;color:#374151;
  padding:7px 14px;border-radius:6px;font-size:13px;cursor:pointer;min-height:34px
}
.we-guide .wg-acts button:hover{background:#2563eb;border-color:#2563eb;color:#fff}
.we-guide .wg-acts button:active{transform:translateY(1px)}
.we-guide .wg-acts .wg-primary{
  background:#2563eb;border-color:#2563eb;color:#fff;font-weight:500
}
.we-guide .wg-acts .wg-primary:hover{background:#1d4ed8;border-color:#1d4ed8}
.we-guide .wg-note{
  margin-top:12px;padding-top:11px;border-top:1px dashed #cddef8;
  font-size:13px;color:#5b6879;line-height:1.7
}
.we-guide .wg-note b{color:#b45309}
@media (max-width:560px){
  .we-guide{padding:14px}
  .we-guide .wg-title{font-size:15px;line-height:1.55}
  .we-guide .wg-desc,.we-guide .wg-note{font-size:12.5px;word-break:break-word}
  /* 窄屏每个按钮独占一行，文字完整显示，不再被裁切 */
  .we-guide .wg-acts button{flex:1 1 100%;min-width:0;padding:11px 10px;font-size:13.5px;text-align:center}
}

/* ============================================================
   全站可访问性 / 一致性补强（追加覆盖，不改原规则）
   ============================================================ */
:root{ --text-mute:#5b6879; }
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,
textarea:focus-visible,[tabindex]:focus-visible{
  outline:2px solid #2563eb;outline-offset:2px
}
.btn:active,.we-guide .wg-acts button:active{transform:translateY(1px)}
.btn:disabled,.btn[disabled],button:disabled{
  opacity:1;background:#e5e9f0;color:#64748b;border-color:#d6dce6;cursor:not-allowed
}
.muted,.hint,.brand-sub,.side-note,.empty-hint,.gif-fallback{color:#5b6879 !important}
@media (max-width:820px){
  button,.btn,.rb-btn,.tbx-checks label{min-height:44px}
  .we-guide .wg-x{min-height:28px;height:28px}
  /* 移动端宽表格改为可横向滚动，避免整页被撑破 */
  table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;white-space:nowrap}
}
@media (max-width:1024px){
  .grid2,.grid3{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important;transition:none !important;scroll-behavior:auto !important}
}

/* 窄屏顶部信息栏：次要 chip 收起，配额说明整行可读，不再被右侧裁切 */
@media (max-width:560px){
  .titlebar,.userbar{flex-wrap:wrap}
  .tb-right .privacy-chip:not(:first-child){display:none}
  .quota-chip{display:inline-block;white-space:normal;line-height:1.6;max-width:100%}
}

/* ============================================================
   折叠卡 / 任务导航 / 结果页主下载
   ============================================================ */
/* 恢复分板块配色：Excel 绿 / PDF 红 / 图片处理 紫 由前面
   「#p-excel / #p-pdf / #p-ps 主题段」定义，此处不再统一覆盖为产品蓝。
   板块色是用户识别功能的线索，统一成单一蓝色反而降低辨识度。 */

/* 高级设置折叠：默认收起，首屏不再被 20+ 参数淹没 */
.adv-fold { border: 1px solid #dbeafe; border-radius: 10px; padding: 8px 14px; margin: 12px 0 16px; background: #fbfdff; }
.adv-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; padding: 6px 0; min-height: 32px; }
.adv-fold > summary::-webkit-details-marker { display: none; }
.adv-fold > summary::before { content: "▸"; color: #2563eb; font-size: 13px; transition: transform .15s; }
.adv-fold[open] > summary::before { transform: rotate(90deg); }
.adv-fold > summary .opt-title { font-weight: 700; color: #1d4ed8; font-size: 14px; }
.adv-fold > summary .opt-hint { font-style: normal; color: #64748b; font-size: 12.5px; }
.adv-fold[open] > summary { border-bottom: 1px dashed #dbeafe; padding-bottom: 10px; margin-bottom: 8px; }
.adv-fold > .card-box { border: 0; box-shadow: none; padding: 6px 0; }
@media (max-width: 640px) { .adv-fold > summary .opt-hint { width: 100%; } }

/* 折叠卡：可见的「收起/展开」文字，手机也能发现 */
.foldable > h3::after { content: none !important; }
.fold-toggle { margin-left: auto; font-size: 12px; font-weight: 600; color: #2563eb;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.foldable.folded > h3 .fold-toggle { background: #f1f5f9; border-color: #dbeafe; }

/* 统一任务导航 */
.task-nav { background: #f8fbff; border: 1px solid #dbeafe; border-radius: 14px; padding: 16px 18px; margin: 0 0 18px; }
.tn-title { font-weight: 700; color: #1d4ed8; margin-bottom: 10px; font-size: 15px; }
.tn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.tn-grid button { text-align: left; background: #fff; border: 1px solid #dbeafe; border-radius: 10px;
  padding: 11px 13px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-height: 62px; }
.tn-grid button:hover { border-color: #2563eb; background: #eff6ff; }
.tn-grid button:active { transform: translateY(1px); }
.tn-grid b { color: #1e293b; font-size: 14px; }
.tn-grid em { font-style: normal; color: #64748b; font-size: 12px; line-height: 1.5; }
.task-nav > .hint { margin: 10px 0 0; }
@media (max-width: 560px) { .tn-grid { grid-template-columns: 1fr 1fr; } .tn-grid button { min-height: 44px; } }

/* 结果页：只想下 1 个文件时的一键主下载，不用先理解勾选表格 */
.big-dl { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 700; padding: 13px 26px; border-radius: 12px; margin: 4px 0 12px; }
.big-dl + .dl-tip { color: #5b6879; font-size: 13px; margin: 0 0 14px; }
@media (max-width: 560px) { .big-dl { display: flex; width: 100%; } }

/* 无障碍：仅屏幕阅读器可见的表格标题 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* 侧栏图标沿用各板块对应色（见文件开头「板块配色」段）：
   Word 蓝 / Excel 绿 / PDF 红 / 图片处理 紫 / 设置·说明 中性蓝。
   不再追加统一产品蓝的覆盖规则。 */

/* ==========================================================================
   上手引导 / 步骤选择 / 交互演示（static/js/guide.js 专用样式）
   聚光高亮 + 数字气泡 + 第 n/N 步；遮罩只盖住非目标区域，目标仍可点。
   ========================================================================== */
.wt-root { position: fixed; inset: 0; z-index: 10000; display: none; pointer-events: none; }
.wt-root.on { display: block; }
.wt-shade { position: fixed; background: rgba(15, 23, 42, .60); pointer-events: auto; }
.wt-ring {
  position: fixed; border: 2px solid #2563eb; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .20), 0 0 26px rgba(37, 99, 235, .55);
  transition: left .18s, top .18s, width .18s, height .18s;
}
.wt-badge {
  position: fixed; width: 30px; height: 30px; border-radius: 50%;
  background: #2563eb; color: #fff; font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(37, 99, 235, .5); border: 2px solid #fff;
  pointer-events: none; z-index: 10002;
}
.wt-card {
  position: fixed; z-index: 10003; pointer-events: auto;
  background: #fff; border: 1px solid #dbeafe; border-radius: 14px;
  padding: 16px 18px 14px; box-shadow: 0 18px 50px rgba(15, 23, 42, .28);
  max-height: calc(100vh - 24px); overflow-y: auto;
}
.wt-card.wt-center {
  left: 50% !important; top: 50% !important; right: auto !important; bottom: auto !important;
  width: min(420px, calc(100vw - 28px)) !important; transform: translate(-50%, -50%);
}
.wt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wt-step { font-size: 12px; font-weight: 800; color: #fff; background: #2563eb; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.wt-scene { font-size: 12px; color: #64748b; }
.wt-x { margin-left: auto; width: 26px; height: 26px; min-height: 26px; line-height: 1;
  border: 1px solid #dbeafe; background: #f8fbff; color: #64748b; border-radius: 7px; font-size: 17px; cursor: pointer; }
.wt-x:hover { background: #eff6ff; color: #1d4ed8; }
.wt-title { font-size: 16px; font-weight: 800; color: #0f172a; line-height: 1.5; margin-bottom: 6px; }
.wt-text { font-size: 13.5px; color: #334155; line-height: 1.75; }
.wt-tip { margin-top: 9px; padding: 8px 10px; background: #f8fbff; border-left: 3px solid #2563eb;
  border-radius: 0 8px 8px 0; font-size: 12.5px; color: #1e40af; line-height: 1.6; }
.wt-demo { margin-top: 9px; padding: 8px 10px; background: #fff7ed; border: 1px dashed #fdba74;
  border-radius: 8px; font-size: 12.5px; color: #9a3412; line-height: 1.6; }
.wt-dots { display: flex; gap: 6px; margin: 12px 0 10px; flex-wrap: wrap; }
.wt-dot { width: 7px; height: 7px; border-radius: 50%; background: #dbeafe; }
.wt-dot.done { background: #93c5fd; }
.wt-dot.cur { background: #2563eb; width: 18px; border-radius: 4px; }
.wt-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.wt-btn { border: 1px solid #c7dbfb; background: #fff; color: #1d4ed8; border-radius: 9px;
  padding: 9px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; min-height: 38px; }
.wt-btn:hover:not(:disabled) { background: #eff6ff; border-color: #2563eb; }
.wt-btn:disabled { opacity: .45; cursor: not-allowed; }
.wt-btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; flex: 1 1 auto; }
.wt-btn.primary:hover:not(:disabled) { background: #1d4ed8; }
.wt-foot { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 11px; padding-top: 9px;
  border-top: 1px dashed #e2e8f0; }
.wt-foot button { background: none; border: 0; color: #64748b; font-size: 12.5px;
  cursor: pointer; padding: 2px 0; text-decoration: underline; }
.wt-foot button:hover { color: #1d4ed8; }

/* 步骤选择面板 */
.wt-pick { position: fixed; z-index: 10004; pointer-events: auto; display: none;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border: 1px solid #dbeafe; border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .30); }
.wt-root.picking .wt-pick { display: block; }
.wt-pick-head { display: flex; align-items: center; gap: 10px; }
.wt-pick-head b { font-size: 17px; color: #0f172a; }
.wt-pick-desc { font-size: 13px; color: #5b6879; line-height: 1.7; margin: 8px 0 12px; }
.wt-pick-list { max-height: 46vh; overflow-y: auto; border: 1px solid #e8eef8; border-radius: 10px; }
.wt-pick-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px;
  border-bottom: 1px dashed #eef2f8; cursor: pointer; font-size: 13.5px; color: #1e293b; }
.wt-pick-item:last-child { border-bottom: 0; }
.wt-pick-item:hover { background: #f8fbff; }
.wt-pick-item input { width: 16px; height: 16px; accent-color: #2563eb; flex: 0 0 auto; }
.wt-pick-n { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: #eff6ff;
  color: #1d4ed8; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.wt-pick-t { flex: 1 1 auto; }
.wt-pick-known { font-style: normal; font-size: 11.5px; color: #059669; background: #ecfdf5;
  border-radius: 999px; padding: 2px 8px; }
.wt-pick-acts { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.wt-pick-acts .wt-btn { flex: 1 1 auto; }

@media (max-width: 620px) {
  .wt-card { width: calc(100vw - 20px); padding: 14px; }
  .wt-title { font-size: 15px; }
  .wt-text { font-size: 13px; }
  .wt-acts .wt-btn { flex: 1 1 45%; }
  .wt-pick { padding: 15px; }
  .wt-pick-list { max-height: 40vh; }
}

/* ==========================================================================
   上手指南板块（功能地图 / Office 对照 / 快捷键 / 零输入试一试）
   ========================================================================== */
.intro-hero { background: linear-gradient(135deg, #eff6ff, #f8fbff); border: 1px solid #c7dbfb;
  border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.intro-hero h2 { font-size: 18px; color: #1d4ed8; margin: 0 0 6px; }
.intro-hero p { font-size: 13.5px; color: #334155; line-height: 1.8; margin: 0 0 12px; }
.intro-acts { display: flex; gap: 9px; flex-wrap: wrap; }
.intro-acts button, .intro-acts a { border: 1px solid #93b8f5; background: #fff; color: #1d4ed8;
  padding: 9px 15px; border-radius: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  text-decoration: none; min-height: 40px; }
.intro-acts button:hover, .intro-acts a:hover { background: #2563eb; border-color: #2563eb; color: #fff; }
.intro-flow { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; margin: 6px 0 18px; }
.intro-flow .if-step { flex: 1 1 180px; background: #fff; border: 1px solid #dbeafe; border-radius: 12px;
  padding: 13px 15px; display: flex; gap: 11px; align-items: flex-start; }
.intro-flow .if-n { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: #2563eb;
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.intro-flow b { display: block; color: #0f172a; font-size: 14px; margin-bottom: 3px; }
.intro-flow em { font-style: normal; color: #64748b; font-size: 12.5px; line-height: 1.6; }
.intro-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 11px; margin-bottom: 16px; }
.intro-card { background: #fff; border: 1px solid #dbeafe; border-radius: 12px; padding: 13px 15px;
  display: flex; flex-direction: column; gap: 6px; }
.intro-card:hover { border-color: #2563eb; box-shadow: 0 6px 18px rgba(37, 99, 235, .10); }
.intro-card .ic-top { display: flex; align-items: center; gap: 8px; }
.intro-card .ic-ico { font-size: 20px; }
.intro-card b { font-size: 14px; color: #0f172a; }
.intro-card .ic-tag { margin-left: auto; font-size: 11px; color: #1d4ed8; background: #eff6ff;
  border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.intro-card p { font-size: 12.5px; color: #5b6879; line-height: 1.65; margin: 0; }
.intro-card .ic-office { font-size: 12px; color: #1e40af; background: #f8fbff; border-radius: 7px; padding: 6px 9px; }
.intro-card .ic-acts { display: flex; gap: 7px; margin-top: 2px; flex-wrap: wrap; }
.intro-card .ic-acts button { border: 1px solid #c7dbfb; background: #fff; color: #1d4ed8;
  border-radius: 7px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.intro-card .ic-acts button:hover { background: #eff6ff; border-color: #2563eb; }
.intro-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.intro-table th, .intro-table td { border: 1px solid #e2e8f0; padding: 8px 11px; text-align: left; line-height: 1.6; }
.intro-table th { background: #f8fbff; color: #1d4ed8; font-weight: 700; }
.intro-table td:first-child { color: #334155; white-space: nowrap; }
.intro-keys { display: flex; gap: 9px; flex-wrap: wrap; margin: 8px 0 4px; }
.intro-keys span { background: #f8fbff; border: 1px solid #dbeafe; border-radius: 8px; padding: 7px 11px;
  font-size: 12.5px; color: #334155; }
.intro-keys kbd { background: #fff; border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 6px; font-family: inherit; font-weight: 700; color: #1d4ed8; }
@media (max-width: 560px) {
  .intro-map { grid-template-columns: 1fr; }
  .intro-acts button, .intro-acts a { flex: 1 1 100%; text-align: center; }
  .intro-table { font-size: 12px; }
  .intro-table th, .intro-table td { padding: 6px 7px; }
}

/* 理解回显（Word / Excel 共用） */
.req-echo { border-radius: 10px; padding: 10px 13px; margin: 8px 0 10px; font-size: 13px; line-height: 1.75; }
.req-echo.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.req-echo.miss { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.req-echo .re-line { display: block; }
.req-echo .re-chg { color: #1d4ed8; font-size: 12.5px; }
.req-echo .re-fix { margin-top: 7px; }
.req-echo .re-fix button { border: 1px solid #93b8f5; background: #fff; color: #1d4ed8;
  border-radius: 7px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.req-echo .re-fix button:hover { background: #eff6ff; }
.nl-explain .nl-miss { color: #b45309; font-size: 12.5px; line-height: 1.7; }
.nl-explain .re-chg, .nl-explain .re-fix { margin-top: 5px; font-size: 12.5px; }

/* ==========================================================================
   Excel 预览：高保真还原 + 贴近 Excel 的紧凑布局（2026-11-10）
   ① 无填充单元格恢复白底（原来透出 .dp-body 的灰蓝底）
   ② 行高列宽按原表精确还原（fixed 布局，不再被内容撑开/被 100% 拉伸）
   ③ 顶部工具区压成单行、行列信息移到状态栏，增大表格显示面积
   ④ 底部文字命令输入框常驻，不再滑出屏幕
   ========================================================================== */

/* ① 白底 */
.dp-body { background: #fff; }
.xlsx-table td.xl-cell { background: #fff; }

/* ② 精确行列：table-layout:fixed 让 colgroup 宽度严格生效 */
.xlsx-table { table-layout: fixed; min-width: 0; width: max-content; }
.xlsx-table th, .xlsx-table td { max-width: none; box-sizing: border-box; overflow: hidden; }
.xlsx-table td.xl-cell { padding: 1px 3px; line-height: 1.15; }
.xlsx-table th.colhead { background: #f3f4f6; color: #374151; text-align: center;
  padding: 1px 0; height: 20px; }
.xlsx-table td.rowno, .xlsx-table th.rowno { background: #f3f4f6; color: #6b7280;
  text-align: center; padding: 0; }
.xlsx-table th, .xlsx-table td { border-color: #d0d7de; }

/* ③ Ribbon 单行紧凑：组标题隐藏，按钮压薄，横向可滚而不换行 */
.rb-tabs { padding: 0 5px; }
.rb-tab { padding: 3px 10px 2px; font-size: 12px; }
/* 【实测坑】原来写死 height:36px + overflow-y:hidden，按钮上的标签（字色/填充/无填充）
   被裁掉下半截 —— 用户说的「字体有一点被简单遮住了」就是这个。改成按内容撑高。 */
.rb-body { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; height: auto; padding: 1px 4px 0; }
.rb-group { padding: 1px 6px; }
.rb-gtitle { display: none; }
.rb-items { flex-wrap: nowrap; }
.rb-btn { min-height: 26px; min-width: 26px; padding: 2px 4px; gap: 1px; }
.rb-lab { font-size: 10px; }
.rb-select { height: 22px; font-size: 11px; padding: 2px 3px; }
.rb-ic { width: 15px; height: 15px; }
.rb-palette { z-index: 200; }
/* 功能区右侧还有按钮时给一条渐隐，避免右边缘的文字被"硬切"看不出还能滚 */
#dpRibbon.rb-host { position: relative; }
#dpRibbon.rb-more::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 24px;
  pointer-events: none; z-index: 3;
  background: linear-gradient(to right, rgba(255,255,255,0), #fff 72%);
}
#dpRibbon .rb-body { scrollbar-width: thin; }

/* Excel 公式栏：名称框 + fx + 内容输入，快速格式按钮并入同一行 */
.xl-formula-bar { display: flex; align-items: center; gap: 4px; flex: 0 0 auto;
  padding: 3px 8px; background: #fff; border-bottom: 1px solid #d0d7de; }
.xl-fx { font: italic 13px Georgia, serif; color: #6b7280; padding: 0 3px; flex: 0 0 auto; }
.xl-formula-input { flex: 1 1 auto; min-width: 80px; height: 24px; padding: 2px 8px;
  border: 1px solid #d0d7de; border-radius: 3px; font-size: 12px; background: #fff; color: #111827; }
.xl-formula-input:focus { outline: 1px solid #16a34a; border-color: #16a34a; }
.xl-edit-bar { margin: 0; padding: 0 0 0 6px; border: 0; border-left: 1px solid #e5e7eb;
  border-radius: 0; background: #fff; flex: 0 0 auto; }
.xl-eb-title { display: none; }
.xl-eb-btn { padding: 2px 6px; }
.xl-eb-save { padding: 2px 8px; }
.xl-eb-lab input[type="color"] { width: 18px; height: 18px; }
.xl-eb-msg { display: none; }

/* 表格区占满剩余高度；状态栏固定在表格下方（像 Excel 底部） */
.xl-root { display: flex; flex-direction: column; height: 100%; }
#xlsxSheetBox { flex: 1 1 auto; overflow: auto; background: #fff; }
.xl-statusbar { display: flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 3px 10px; background: #f3f4f6; border-top: 1px solid #d0d7de;
  font-size: 11px; color: #4b5563; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
.xl-statusbar .xlsx-tab { padding: 1px 8px; font-size: 11px; }
.xl-statusbar .muted, .xl-statusbar .xl-head-lab { font-size: 11px; }
.xl-statusbar .xl-eb-msg { display: block; max-width: 220px; color: #0a5c2e; }
/* 十字光标开关（新版 Excel 实时预览，共用 crosshair.js；Excel 板块用绿色） */
.xl-statusbar .xh-toggle { flex: 0 0 auto; border: 1px solid #cbd5e1; background: #fff;
  color: #41506b; font-size: 11px; padding: 1px 8px; border-radius: 6px;
  cursor: pointer; white-space: nowrap; }
.xl-statusbar .xh-toggle:hover { border-color: #16a34a; color: #16a34a; }
.xl-statusbar .xh-toggle.on { border-color: #16a34a; color: #0a5c2e;
  background: #e8f7ee; font-weight: 600; }

/* ④ 命令栏常驻（半屏 / 2-3屏 / 全屏都在），去掉全屏时滑出屏幕的隐藏 */
.dp-cmdbar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: #f8fafc; border-top: 1px solid #d0d7de; }
.dp-cmdbar:empty { display: none; }
.dp-cmdbar .dp-cmdbar-src { margin: 0; padding: 0; flex: 1 1 auto; align-items: center;
  background: transparent; border: 0; border-radius: 0;
  backdrop-filter: none; -webkit-backdrop-filter: none; }
.dp-cmdbar .dp-cmdbar-src .field { flex: 1 1 auto; }
.dp-cmdbar .dp-cmdbar-src .field > span { display: none; }
.dp-cmdbar .dp-cmdbar-src input[type="text"] { flex: 1 1 auto; min-width: 140px; }
body.dp-is-full .dp-cmdbar {
  transform: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  background: #f8fafc; color: #374151; border-top: 1px solid #d0d7de;
  box-shadow: 0 -2px 8px rgba(15,23,42,.08); backdrop-filter: none; -webkit-backdrop-filter: none;
}
body.dp-is-full .dp-cmdbar .dp-cmdbar-src { background: transparent; border: 0; padding: 0; margin: 0; }
body.dp-is-full .dp-cmdbar .dp-cmdbar-src input[type="text"] { background: #fff; color: #111827; border-color: #cbd5e1; }
body.dp-is-full .dp-cmdbar .field > span { display: none; }
body.dp-is-full .dp-cmdbar .dp-cmd-help-btn { background: #fff; color: #64748b; border-color: #cbd5e1; }
body.dp-is-full .dp-cmdbar .hint { color: #64748b; }

/* 行高严格一致：HTML 表格里 td 的 height 只是最小值，内容换行会把它撑高
   （实测原表 35pt→47px 的行被撑到 68px）。用 nowrap + overflow:hidden
   让行高严格等于原表设定值；完整内容保留在单元格 title 里悬浮可见。 */
.xlsx-table td.xl-cell { white-space: nowrap !important; overflow: hidden !important; }


/* ==================== 截图反馈：工具栏压缩 / 框选 / 十字光标 / 冻结 ==================== */
/* 1) 顶部四行压薄：只减高度和留白，不删任何功能 */
.rb-tabs { padding: 0 4px !important; }
.rb-tab { padding: 2px 9px 1px !important; font-size: 11px !important; line-height: 1.35 !important; }
.rb-group { padding: 1px 5px !important; }
.rb-items { padding: 1px 0 !important; }
.rb-item, .rb-btn { padding: 1px 4px !important; font-size: 11px !important; }
.xl-formula-bar { padding: 2px 6px !important; min-height: 26px !important; }
.xl-edit-bar { padding-left: 4px !important; }
.xl-eb-btn, .xl-eb-lab, .xl-eb-save { padding: 1px 5px !important; font-size: 11px !important; line-height: 1.5 !important; }
.xl-statusbar { padding: 2px 6px !important; min-height: 24px !important; }
.dp-cmdbar-src { margin: 3px 0 !important; }
.dp-cmdbar-src .field > span { display: none; }  /* 提示已在 placeholder 里，省一整行 */
.dp-cmdbar { padding: 2px 6px !important; }

/* 2) 框选：像 Excel 一样「整块一个外框」，不再每格套一个框
      —— 用户反馈「选中的效果不好看」，原来是每格 2px 描边，20 个格子就是 20 个框。 */
#xlsxSheetBox { position: relative; }
td.xl-cell { user-select: none; -webkit-user-select: none; }
td.xl-cell:focus { user-select: text; -webkit-user-select: text; }
.xlsx-table td.xl-cell::selection,
.xlsx-table td.xl-cell *::selection { background: transparent; }
td.xl-cell.xl-inrange {
  background-color: rgba(16, 110, 60, .10) !important;
  box-shadow: none !important;
}
/* 活动格（选区里点下去的那一个）留白，和 Excel 一致 */
td.xl-cell.xl-inrange.master { background-color: rgba(255, 255, 255, .55) !important; }
/* 单个格子（没拖选）时给一圈细框，能看出选中了哪一格 */
td.xl-cell.sel:not(.xl-inrange) { outline: 2px solid #0a5c2e !important; outline-offset: -2px !important; }
.xls-selrect, .xl-selrect {
  position: absolute; pointer-events: none; z-index: 5;
  border: 2px solid #0a5c2e; border-radius: 1px;
}
.xl-selrect::after {   /* 右下角填充柄，和 Excel 一样 */
  content: ''; position: absolute; right: -4px; bottom: -4px;
  width: 7px; height: 7px; background: #0a5c2e; border: 1px solid #fff; border-radius: 1px;
}
.xl-eb-btn.on { background: #e6f4ea !important; border-color: #0a5c2e !important; color: #0a5c2e !important; font-weight: 700; }

/* 3) 十字光标：行列高亮变浅、中心格加深 */
.xh-band { background: rgba(29, 111, 235, .055) !important; }
.xh-cell { position: absolute; pointer-events: none;
  background: rgba(29, 111, 235, .17); border: 1px solid rgba(29, 111, 235, .45); }
.xh-line { background: rgba(29, 111, 235, .55); }

/* 4) 冻结左侧列 + 上侧行（容器 class 由 xlCycleFreeze 切换，重绘不丢） */
#xlsxSheetBox .xlsx-table th.colhead { position: sticky; top: 0; z-index: 3; }
#xlsxSheetBox .xlsx-table td.rowno,
#xlsxSheetBox .xlsx-table th.rowno { position: sticky; left: 0; z-index: 2; background: #f3f4f6; }
#xlsxSheetBox .xlsx-table th.rowno.corner { z-index: 4; }
#xlsxSheetBox.xl-fz-1 .xlsx-table tr:first-child th,
#xlsxSheetBox.xl-fz-2 .xlsx-table tr:first-child th,
#xlsxSheetBox.xl-fz-3 .xlsx-table tr:first-child th { position: sticky; top: 0; z-index: 3; background: #eef2f7; }
#xlsxSheetBox.xl-fz-2 .xlsx-table td.xl-cell[data-c="1"],
#xlsxSheetBox.xl-fz-3 .xlsx-table td.xl-cell[data-c="1"] { position: sticky; left: 40px; z-index: 2;
  background: #fff; box-shadow: 1px 0 0 #cbd5e1; }
#xlsxSheetBox.xl-fz-2 .xlsx-table td.rowno,
#xlsxSheetBox.xl-fz-3 .xlsx-table td.rowno { z-index: 3; }

/* 收起功能区：一键把按钮行折起来，表格显示区立刻变大 */
.rb-host.rb-collapsed .rb-body { display: none !important; }
.rb-collapse-btn { font-weight: 600; }
.rb-host.rb-collapsed + .dp-selbar { margin-top: 2px; }
/* ==========================================================================
   界面视觉升级 v2 · 2026-11-14
   参考对象与取法（每一条都能说出抄的是谁、为什么）：
     · Ant Design 5   —— 中性灰阶：灰不做蓝调；控件/圆角/间距走 8px 阶梯
     · Linear         —— 1px 极细描边 + 几乎看不见的阴影，靠留白分层，不靠投影
     · Stripe         —— 主按钮顶部内高光（inset highlight），按下有实体感
     · Notion / 飞书  —— 侧栏浅灰底，选中项变成"白色卡片"
     · Apple HIG      —— 动效只表达因果、时长克制，并尊重 prefers-reduced-motion
   影响面：只动观感（颜色 / 圆角 / 阴影 / 间距 / 动效 / 焦点态），
          不动任何布局结构与 Excel 表格像素。整段删除即可完整回滚。
   ========================================================================== */

:root {
  /* —— 中性色阶（对齐 Ant gray-1…gray-10，去掉原来的蓝调灰） —— */
  --n0: #fff;      --n25: #fcfcfd;  --n50: #f7f8fa;  --n100: #f2f3f5;
  --n200: #e4e7ec; --n300: #d5d9e0; --n400: #b6bcc6; --n500: #8b939f;
  --n600: #5b6472;
  /* —— 圆角阶梯：小控件 6 / 控件 8 / 卡片 14 / 窗口 18 —— */
  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 14px; --r-xl: 18px;
  /* —— 阴影三级：卡片只留"描边级"阴影，浮起才加投影 —— */
  --sh1: 0 1px 2px rgba(16, 24, 40, .05);
  --sh2: 0 2px 8px -2px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --sh3: 0 24px 48px -16px rgba(16, 24, 40, .18), 0 4px 12px -4px rgba(16, 24, 40, .08);
  /* —— 统一缓动（Linear 的减速曲线，收尾更"稳"） —— */
  --ease: cubic-bezier(.2, .8, .25, 1);
  --dur: .16s;

  /* —— 覆写基础色板：绝大多数组件本来就取这两个变量，改这里等于全站换色 —— */
  --bg: #f6f7f9;
  --line: #e4e7ec;
  --line-soft: #f1f3f5;
  --text: #171b21;
  --text-sub: #58616e;
  --text-mute: #8b939f;
  --shadow: var(--sh1);
}

/* 字体：原来是「微软雅黑」打头，英文数字一律被雅黑画得又宽又钝。
   改成系统字体优先——西文走 Segoe UI / SF，中文自动回落到雅黑 / 苹方。 */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: -.003em;
}
::selection { background: rgba(37, 99, 235, .16); }

/* 细滚动条：大厂标配。只收窄视觉宽度，不缩小可点击热区（10px）。 */
html { scrollbar-width: thin; scrollbar-color: #d5d9e0 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #d5d9e0; border-radius: 8px;
  border: 3px solid transparent; background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: #b6bcc6; background-clip: padding-box; }

/* —— 窗口容器：全屏铺满，无边框无阴影 —— */
html, body { padding: 0; margin: 0; width: 100%; height: 100%; box-sizing: border-box; overflow: hidden; }
*, *::before, *::after { box-sizing: border-box; }
.window {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.window > .titlebar { flex-shrink: 0; }
.window > .body { flex: 1 1 auto; min-height: 0; overflow: hidden; }

/* —— 顶栏：品牌字收紧字距，右侧 chip 从"三个绿药丸"改成中性胶囊 —— */
.titlebar { padding: 13px 22px; gap: 10px; }
.brand .brand-name { font-size: 18.5px; letter-spacing: -.02em; }
.brand .brand-sub { font-size: 12.5px; }
.privacy-chip {
  background: var(--n50); color: var(--text-sub); border: 1px solid var(--n200);
  border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 500;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
a.privacy-chip:hover, button.privacy-chip:hover {
  background: #fff; border-color: var(--n300); color: var(--text);
}
/* 登录状态条：原来整条蓝底，视觉噪声最大的一处，改成中性细条 */
.userbar {
  background: var(--n25); border-bottom: 1px solid var(--n200);
  color: var(--text-sub); font-size: 12.5px; padding: 8px 22px;
}
.userbar .ub-state { font-weight: 600; color: var(--text-sub); }

/* —— 侧栏：浅灰底 + 选中项变白色卡片（Notion / 飞书的手法） —— */
.sidebar {
  width: 216px; background: var(--n25);
  border-right: 1px solid var(--n200); padding: 14px 10px 18px;
}
/* 原来"功能板块"是 17px 粗黑标题，抢了主区标题的层级；降级成小节标签 */
.logo {
  font-size: 11.5px; font-weight: 600; color: var(--text-mute);
  letter-spacing: .08em; margin: 4px 10px 10px;
}
.sidebar nav { gap: 2px; }
.nav {
  padding: 9px 11px; border-radius: var(--r-sm); font-size: 13.5px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.nav .nav-ico { width: 24px; height: 24px; line-height: 24px; border-radius: 7px; font-size: 11.5px; }

/* 每个板块的图标色（选中态复原成实色小块，不再被"半透明白"盖住） */
.sidebar .nav[data-tab="p-word"]  { --tile: #e8efff; --tile-ink: #1d4ed8; }
.sidebar .nav[data-tab="p-excel"] { --tile: #e3f5ea; --tile-ink: #15803d; }
.sidebar .nav[data-tab="p-pdf"]   { --tile: #fee7e7; --tile-ink: #dc2626; }
.sidebar .nav[data-tab="p-ps"]    { --tile: #f3e8ff; --tile-ink: #9333ea; }
.sidebar .nav[data-tab="p-set"],
.sidebar .nav[data-tab="p-help"],
.sidebar .nav[data-tab="p-plug"],
.sidebar .nav[data-tab="p-intro"] { --tile: #eceff3; --tile-ink: #4b5563; }

.sidebar .nav[data-tab].active,
.sidebar .nav[data-tab].active:hover {
  background: #fff; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px var(--n200);
}
.sidebar .nav[data-tab].active .nav-ico { background: var(--tile); color: var(--tile-ink); }

/* 买断入口：金色太满会像促销弹窗，改成白底 + 金色只落在图标和文字上 */
.buyout-btn {
  margin: 12px 4px 6px; width: calc(100% - 8px); padding: 10px 11px;
  border: 1px solid #f2d9a0; border-radius: var(--r-md);
  background: #fffdf7; box-shadow: none;
}
.buyout-btn:hover { border-color: #e8bd63; background: #fffbef; box-shadow: var(--sh1); transform: none; }
.bo-txt b { font-size: 13px; }
.bo-txt em { font-size: 10.5px; }
.side-note { font-size: 12px; }
.side-note summary { cursor: pointer; padding: 3px 0; }

/* —— 主区与标题层级 —— */
.main { padding: 24px 28px 36px; }
.page-head { margin-bottom: 16px; }
.page-head h1 { font-size: 22px; letter-spacing: -.02em; line-height: 1.35; }
.page-head .sub { font-size: 13px; line-height: 1.65; }

/* —— 卡片：靠 1px 描边分层，投影收到几乎看不见 —— */
.card-box {
  border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 16px;
  border-color: var(--n200); box-shadow: var(--sh1);
}
.card-box > h3 { font-size: 15.5px; letter-spacing: -.01em; }
/* Excel 板块：绿只留在标题、按钮、图标上，卡片边与标签回到中性，绿味才不"廉价" */
#p-excel .card-box { border-color: var(--n200); }
#p-excel .field > span { color: var(--text-sub); }

/* —— 子标签：加 hover 底色与圆角，点起来有"片"的感觉 —— */
.subtabs { gap: 2px; border-bottom-color: var(--n200); margin-bottom: 18px; }
.subtab {
  padding: 9px 14px; border-radius: var(--r-xs) var(--r-xs) 0 0; font-size: 13.5px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.subtab:hover { background: var(--n50); }
.subtab.active { background: var(--n50); }

/* —— 表单：边框回到中性灰，hover 加深、focus 统一成 3px 品牌环 —— */
.field { margin-bottom: 15px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-sub); margin-bottom: 5px; }
.field input[type=text], .field input[type=password], .field input:not([type]),
.field input[type=number], .field select, .field textarea {
  padding: 9px 11px; border-radius: var(--r-sm); border-color: var(--n300);
  font-size: 13.5px; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--n400); }
.hint { font-size: 12.5px; line-height: 1.65; }

/* —— 拖拽区：虚线变细、底色更浅，hover 用品牌浅色"描一圈"而不是整块变蓝 —— */
.dropzone {
  border: 1.5px dashed var(--n300); border-radius: var(--r-lg);
  background: var(--n25); padding: 24px 20px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.dropzone:hover {
  border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px var(--brand-light);
}
.dropzone .dz-ico { font-size: 20px; }
.dropzone .dz-main { font-size: 14.5px; }

/* —— 按钮：Stripe 式顶部内高光 + 按下内凹；用 --brand 派生，Excel 绿自动跟随 —— */
.btn {
  border-radius: var(--r-sm); padding: 9px 18px; font-size: 14px; font-weight: 600;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-color: var(--brand-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(16, 24, 40, .10);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform .08s var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover, #p-excel .btn:hover {
  background: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand-dark) 100%);
  border-color: var(--brand-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 3px 8px -2px rgba(16, 24, 40, .22);
}
.btn:active, #p-excel .btn:active {
  transform: translateY(.5px);
  box-shadow: inset 0 1px 3px rgba(16, 24, 40, .22);
}
.btn.ghost { background: #fff; box-shadow: var(--sh1); }
.btn.ghost:hover { background: var(--brand-light); box-shadow: var(--sh1); }
.btn.plain { background: #fff; border-color: var(--n200); color: var(--text-sub); box-shadow: none; }
.btn.plain:hover { background: var(--n50); border-color: var(--n300); color: var(--text); box-shadow: none; }
.btn.small { padding: 6px 12px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn.tiny { padding: 4px 10px; font-size: 11.5px; border-radius: var(--r-xs); }
.btn:disabled, .btn[disabled] { opacity: .45; box-shadow: none; transform: none; }
.btn-row { gap: 8px; margin-top: 14px; }

/* —— 键盘焦点环：鼠标点击不出现，Tab 键才有（大厂无障碍基线） —— */
a:focus-visible, button:focus-visible, .nav:focus-visible, .subtab:focus-visible,
.btn:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-xs);
}

/* —— 提示条：左侧加一条 3px 色脊，比整块红底更克制（Ant 的 Alert 变体） —— */
.alert {
  border-radius: var(--r-md); padding: 10px 14px; border-left: 3px solid currentColor;
  font-size: 13px; line-height: 1.6;
}
.gate-note { border-radius: var(--r-md); font-size: 12.5px; }
.privacy-note { border-radius: var(--r-lg); font-size: 13px; }

/* —— 弹窗：更深的遮罩 + 背景轻微虚化，浮层关系一眼分清 —— */
.modal-mask {
  background: rgba(15, 23, 42, .38);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.modal { border-radius: var(--r-lg); box-shadow: var(--sh3); border: 1px solid var(--n200); }
.modal-head { border-bottom: 1px solid var(--n200); }
.modal-close { transition: color var(--dur) var(--ease), background var(--dur) var(--ease); }
.modal-close:hover { background: var(--n100); border-radius: var(--r-xs); }

/* —— 新手引导卡：保留"第一眼要被看见"的浅蓝渐变，只把圆角/描边/按钮收干净 —— */
.we-guide {
  border-radius: var(--r-lg);
  border-color: #d7e5fb;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.we-guide .wg-title { font-size: 16px; letter-spacing: -.01em; }
.we-guide .wg-acts button {
  border-radius: var(--r-sm); border-color: #c3d8f7; color: var(--brand);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), transform .08s var(--ease);
}
.we-guide .wg-acts button:hover {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 2px 6px -1px rgba(37, 99, 235, .35);
}

/* —— 触屏 / 窄屏：侧栏宽度收一档，避免主区被挤压 —— */
@media (max-width: 1100px) { .sidebar { width: 196px; } .main { padding: 20px 20px 30px; } }
@media (max-width: 720px)  { body { padding: 12px 8px; } .window { border-radius: var(--r-md); } }

/* —— 尊重系统"减少动态效果"：所有动效降到近零 —— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   视觉升级 v2.1 · 实拍复核后补的 4 处（截图逐处比出来的，不是想出来的）
   截图发现：①「选择文件」是浏览器原生灰块，最显廉价 ②引导卡 7 个按钮同等权重
             ③顶部登录按钮孤零零挂右边 ④提示文字紧贴控件
   ========================================================================== */

/* ① 原生文件选择控件：换成"浅色方块 + 品牌字"的样式，去掉系统灰块
      ::file-selector-button 是新标准，::-webkit-file-upload-button 是老写法，分开写避免整条规则失效 */
input[type=file] {
  font: inherit; font-size: 12.5px; color: var(--text-sub);
  border: 0; background: transparent; padding: 0; cursor: pointer; max-width: 100%;
}
input[type=file]::file-selector-button {
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--brand);
  background: var(--brand-light); border: 1px solid var(--brand-border);
  border-radius: 6px; padding: 4px 11px; margin-right: 9px; cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
input[type=file]::file-selector-button:hover { background: #fff; border-color: var(--brand); }
input[type=file]::-webkit-file-upload-button {
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--brand);
  background: var(--brand-light); border: 1px solid var(--brand-border);
  border-radius: 6px; padding: 4px 11px; margin-right: 9px; cursor: pointer;
}

/* ② 引导卡按钮分级：前 3 个是主操作（实心），后面 4 个降为文字按钮（不再抢视线） */
.we-guide .wg-acts { gap: 8px; }
.we-guide .wg-acts button { font-size: 13.5px; font-weight: 600; }
.we-guide .wg-acts button:nth-child(-n+3) {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(16, 24, 40, .10);
}
.we-guide .wg-acts button:nth-child(-n+3):hover {
  background: var(--brand-dark); border-color: var(--brand-dark); color: #fff;
}
.we-guide .wg-acts button:nth-child(n+4) {
  background: transparent; border-color: transparent; color: var(--text-sub);
  font-weight: 500; padding: 9px 8px;
}
.we-guide .wg-acts button:nth-child(n+4):hover {
  background: rgba(37, 99, 235, .08); color: var(--brand);
  border-color: transparent; box-shadow: none;
}

/* ③ 登录状态条：那颗蓝色实心按钮在细灰条里太跳，降级成描边小按钮 */
.userbar .btn.tiny {
  background: #fff; color: var(--brand); border-color: var(--brand-border);
  box-shadow: none; font-size: 11.5px; padding: 3px 10px;
}
.userbar .btn.tiny:hover { background: var(--brand-light); border-color: var(--brand); }

/* ④ 文件选择控件下面的提示：取消负外边距，给到 6px 呼吸位，别贴着控件 */
.field + .hint, input[type=file] + .hint { margin-top: 6px; }

/* ⑤ 语音实时识别条：没在录音时不该占一整行。
      实拍发现输入框下方总有一条空的浅色条（Word 蓝、Excel 绿），像渲染缺陷。
      根因是元素里始终留着一个换行符，:empty 匹配不到，所以改在模板里用 hidden 控制。 */
.mic-live[hidden] { display: none !important; }
.mic-live { padding: 5px 11px; }

/* ⑥ 按钮行下面紧跟的说明文字：原来是 -4px 负边距，紧贴按钮，读起来挤 */
.btn-row + .hint { margin-top: 8px; line-height: 1.7; }

/* 补出来的空白网格（只为把面板铺满，不可点不可编辑） */
.xlsx-table td.xl-fill, .xlsx-table th.xl-fillhead { background: #fff; cursor: default; }
.xlsx-table th.xl-fillhead { color: #9aa1ab; }
/* 纵向补白的网格行：行号格留空（有数字会让人以为「凭空多了一堆空行」） */
.xlsx-table tr.xl-fillrow td.rowno, .xlsx-table tr.xl-fillrow td.xl-fill { background: #fff; cursor: default; }
.xlsx-table tr.xl-fillrow td.xl-fill { border-color: #e3e8ef; }

/* =====================================================================
   桌面客户端布局（仅 body.app-desktop 生效，网页版完全不受影响）
   目标：去掉"网页居中卡片"的观感——铺满窗口、无外边距、
        顶栏/侧栏固定、内容区自己滚动，一屏之内不再整页上下拖。
   ===================================================================== */
body.app-desktop {
  padding: 0; margin: 0;
  height: 100vh; overflow: hidden;
  background: var(--card);
}
body.app-desktop .window {
  max-width: none; width: 100%;
  height: 100vh;
  margin: 0; border-radius: 0; border: 0; box-shadow: none;
  display: flex; flex-direction: column;
  overflow: hidden;
}
/* 桌面端同样要让出左侧预览面板的宽度。
   上面那条 `margin: 0`（简写）把 margin-left 一并清成 0，
   于是左侧固定定位的预览面板压在右侧内容上：按钮看得见却点不到，
   「在线浏览效果」这类操作直接失效。预览在左、操作在右是这个布局的核心，
   这里把左边距补回来（面板宽度由 --dp-w 决定，可拖动调整）。 */
body.app-desktop.preview-docked .window {
  margin-left: var(--dp-w, 50vw);
  width: calc(100% - var(--dp-w, 50vw));
}
body.app-desktop.preview-docked.dp-mode-two .window {
  margin-left: 66.6vw;
  width: calc(100% - 66.6vw);
}
@media (max-width: 900px) {
  body.app-desktop.preview-docked .window { margin-left: 0; }
}
/* 顶栏与登录条固定，不参与滚动 */
body.app-desktop .titlebar,
body.app-desktop .userbar { flex: 0 0 auto; }

/* 主体区撑满剩余高度；侧栏与内容区各自独立滚动 */
body.app-desktop .body {
  flex: 1 1 auto;
  min-height: 0;          /* 关键：flex 子项默认 min-height:auto 会撑破容器 */
  overflow: hidden;
}
body.app-desktop .sidebar {
  overflow-y: auto;
  height: 100%;
}
body.app-desktop .main {
  height: 100%;
  overflow-y: auto;
  padding: 18px 24px 22px;   /* 桌面端略收，首屏能多显示一屏内容 */
}

/* 桌面端再紧凑一档：顶部横幅与首块间距收窄，减少"要滚才看得全" */
body.app-desktop .main > *:first-child { margin-top: 0; }
body.app-desktop .door { margin-bottom: 14px; }

/* 桌面端滚动条更细更安静（应用窗口里不该出现很粗的网页滚动条） */
body.app-desktop ::-webkit-scrollbar { width: 10px; height: 10px; }
body.app-desktop ::-webkit-scrollbar-track { background: transparent; }
body.app-desktop ::-webkit-scrollbar-thumb {
  background: #cbd5e1; border: 3px solid transparent; border-radius: 8px; background-clip: padding-box;
}
body.app-desktop ::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: padding-box; }

/* ---------- 品牌图标（logo）---------- */
/* 字标已改为「草书 W 蓝 + E 绿」的透明底图，宽高比约 1.26:1。
   旧规则写死 26×26 + 圆角 + 蓝色投影，是为方形蓝底图标设的；直接套用会把
   字标横向压扁、圆角把笔画切掉、蓝投影糊在绿笔画上。改为按高度定高、
   宽度随比例走。 */
.logo { display: flex; align-items: center; gap: 9px; }
.logo-mark { height: 27px; width: auto; max-width: 51px; flex: 0 0 auto;
  display: block; }
.logo-txt { font-weight: 700; font-size: 15px; color: #111827; letter-spacing: .2px; }
.logo-txt b { color: #2563eb; font-weight: 700; }
.brand-mark { height: 30px; width: auto; max-width: 57px; flex: 0 0 auto;
  display: block; align-self: center; }

/* 说明页顶部的条款入口 */
.legal-links { margin: 8px 0 0; font-size: 13px; color: #5b6879; }
.legal-links a { color: #2563eb; text-decoration: none; font-weight: 600; }
.legal-links a:hover { text-decoration: underline; }

/* ---------- 桌面端首屏紧凑化：引导块与面板间距收一档 ---------- */
body.app-desktop .we-guide { padding: 12px 16px; margin: 0 0 12px; }
body.app-desktop .we-guide .wg-title { font-size: 15.5px; }
body.app-desktop .we-guide .wg-desc { font-size: 12.5px; margin-top: 4px; line-height: 1.6; }
body.app-desktop .we-guide .wg-acts { margin-top: 10px; gap: 8px; }
body.app-desktop .we-guide .wg-acts button { padding: 7px 13px; font-size: 13px; min-height: 34px; }
body.app-desktop .panel > .page-head { margin-bottom: 10px; }
body.app-desktop .card, body.app-desktop .card-box { margin-top: 10px; }

/* ---------- 桌面端：表单区再收一档，让「开始排版」出现在首屏 ---------- */
body.app-desktop .field { margin-bottom: 10px; }
body.app-desktop .field textarea { min-height: 52px; height: 72px; line-height: 1.55; }
body.app-desktop .field > span { margin-bottom: 4px; }
body.app-desktop .dropzone { padding: 18px 16px; }
body.app-desktop .tabs, body.app-desktop .seg { margin-bottom: 8px; }
body.app-desktop .side-note, body.app-desktop .buy-card { padding: 10px 12px; }

/* ---------- 桌面端：拖文件遮罩 / 右键菜单 / 轻提示 ---------- */
.drop-overlay {
  position: fixed; inset: 0; z-index: 9998; display: none;
  background: rgba(13, 22, 41, .55);
  backdrop-filter: blur(2px);
  align-items: center; justify-content: center;
}
.drop-overlay.on { display: flex; }
.drop-overlay-box {
  width: 380px; padding: 40px 28px 34px; border-radius: 18px;
  background: #fff; text-align: center;
  border: 2px dashed #93b4f0;
  box-shadow: 0 24px 60px rgba(15, 30, 60, .28);
}
.drop-overlay-ico {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  background: #eaf1fd; color: #1a4cd6; font-size: 30px; line-height: 56px;
  font-weight: 300;
}
.drop-overlay-main { font-size: 16px; font-weight: 700; color: #111827; }
.drop-overlay-sub { margin-top: 8px; font-size: 13px; color: #6b7789; }

/* 拖入后短暂高亮，让用户知道文件进了哪个框 */
.dropzone.dz-flash {
  animation: dzFlash 0.9s ease-out;
  border-color: #1a4cd6 !important;
}
@keyframes dzFlash {
  0%   { background: #dbe7ff; }
  100% { background: transparent; }
}

.app-ctx {
  position: fixed; z-index: 10000; display: none; min-width: 172px;
  padding: 6px; border-radius: 10px; background: #fff;
  border: 1px solid #e3e8f0; box-shadow: 0 12px 34px rgba(15, 30, 60, .16);
  font-size: 13.5px;
}
.app-ctx.on { display: block; }
.app-ctx button {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  gap: 24px; padding: 8px 10px; border: 0; border-radius: 7px;
  background: transparent; color: #1f2937; font: inherit; text-align: left;
  cursor: pointer;
}
.app-ctx button:hover { background: #eef3fd; color: #1a4cd6; }
.app-ctx button span { font-size: 11.5px; color: #9aa5b5; }
.app-ctx button.disabled { opacity: .4; pointer-events: none; }
.ctx-sep { height: 1px; margin: 5px 8px; background: #eef1f6; }

.app-toast {
  position: fixed; left: 50%; bottom: 46px; transform: translate(-50%, 14px);
  z-index: 10001; padding: 10px 18px; border-radius: 10px;
  background: rgba(17, 24, 39, .92); color: #fff; font-size: 13.5px;
  opacity: 0; transition: .22s; pointer-events: none;
  max-width: 74vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 侧栏折叠：把宽度让给内容区 ---------- */
.sb-toggle {
  margin-left: auto; flex: 0 0 auto;
  width: 20px; height: 20px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e5e9f0; border-radius: 6px;
  background: #fff; color: #8b97a8; font-size: 13px; line-height: 1;
  font-family: inherit; cursor: pointer; transition: .15s;
}
.sb-toggle:hover { color: #1a4cd6; border-color: #c7d7f5; background: #f4f8ff; }

body.sb-mini .sidebar { width: 60px; padding: 12px 6px 16px; }
body.sb-mini .sidebar .logo {
  justify-content: center; margin: 0 0 10px; padding: 0;
}
body.sb-mini .sb-toggle {
  width: 26px; height: 26px; font-size: 15px;
  background: #f4f7fc; border-color: #e2e8f2;
}
body.sb-mini .sidebar .logo-mark,
body.sb-mini .sidebar .logo-txt { display: none; }
/* 导航文字是裸文本节点，只能靠 font-size:0 收掉；图标方块再单独把字号放回来 */
body.sb-mini .sidebar .nav {
  font-size: 0; gap: 0; justify-content: center;
  padding: 10px 0; border-radius: 9px;
}
body.sb-mini .sidebar .nav .nav-ico { margin: 0; }
body.sb-mini .sidebar .nav .nav-ico-ps { font-size: 12px; }
body.sb-mini .sidebar .buyout-btn,
body.sb-mini .sidebar .side-note,
body.sb-mini .sidebar .side-donate { display: none !important; }

/* ---------- 顶栏里的账号区（原 userbar 并入） ---------- */
.titlebar .ub-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: #5b6879; max-width: 560px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.titlebar .tb-sep {
  width: 1px; height: 16px; background: #e7ebf2; margin: 0 3px; flex: 0 0 auto;
}
.tb-right { flex-wrap: nowrap; overflow: hidden; }

/* 窄窗口先把次要提示收掉，别把顶栏挤爆 */
@media (max-width: 1280px) {
  .titlebar .brand-sub { display: none; }
  .titlebar .ub-state { max-width: 380px; }
}
@media (max-width: 1100px) {
  .titlebar .ub-state { display: none; }
}

/* ── 预览顶部「已打开文档」标签条（Word 多文档来回切换） ── */
.dp-doctabs{ display:flex; align-items:center; gap:6px; padding:6px 14px; overflow-x:auto;
  background:#f8fafc; border-bottom:1px solid #e5e9f0; flex:0 0 auto; }
.dp-doctabs[hidden]{ display:none; }
.dp-doctabs button{ flex:0 0 auto; max-width:240px; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; font-size:12px; padding:4px 10px; border-radius:7px 7px 0 0;
  border:1px solid #dbe1ea; border-bottom:none; background:#fff; color:#475569; cursor:pointer; }
.dp-doctabs button.on{ background:#eef4ff; border-color:#b9cdf5; color:#1d4ed8; font-weight:600; }
.dp-doctabs button:hover{ background:#f1f5fb; }
.dp-doctabs-hint{ margin-left:auto; flex:0 0 auto; font-size:11px; color:#94a3b8; }

/* ── Excel 多份文件切换条（和 Word 文档标签同一位置） ── */
.dp-filetabs{ display:flex; align-items:center; gap:6px; padding:6px 14px; overflow-x:auto;
  background:#f8fafc; border-bottom:1px solid #e5e9f0; flex:0 0 auto; }
.dp-filetabs[hidden]{ display:none; }
.dp-filetabs b{ font-size:12px; color:#475569; font-weight:600; white-space:nowrap; margin-right:4px; }
.dp-filetabs button{ flex:0 0 auto; max-width:260px; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; font-size:12px; padding:4px 11px; border-radius:7px 7px 0 0;
  border:1px solid #dbe1ea; border-bottom:none; background:#fff; color:#475569; cursor:pointer; }
.dp-filetabs button.on{ background:#e8f7ef; border-color:#a7d9bd; color:#15803d; font-weight:600; }
.dp-filetabs button:hover{ background:#f1f5fb; }
.dp-filetabs-hint{ margin-left:auto; flex:0 0 auto; font-size:11px; color:#94a3b8; }
/* Word 可编辑文字：鼠标放上去给出明显提示，避免用户以为只能查看 */
.dp-native [contenteditable="true"]:hover{ background:#fff7d6; box-shadow:inset 0 0 0 1px #f59e0b; border-radius:2px; }
.dp-native [contenteditable="true"]:focus{ outline:2px solid #f59e0b; outline-offset:2px; background:#fffbeb; }

/* 预览场景标识：让 Word / Excel 一眼分得清 */
.dp-head b.dp-scene{ padding:3px 9px; border-radius:7px; font-size:13px; }
.dp-head b.dp-scene.word{ color:#1d4ed8; background:#eaf1ff; }
.dp-head b.dp-scene.excel{ color:#15803d; background:#e9f7ef; }

/* ============ 网页端布局修复（B112，2026-11-29）============
   背景：11-29 那版把 .window 改成 100vw / 100vh + overflow:hidden，
   那是给桌面壳（Electron，body.app-desktop）用的；浏览器里等于把整页
   锁死在一屏：登录用户排版后结果区有 1817px 高，只能看到前 900px，
   「下载」按钮被裁在视口外、页面又滚不动 —— 实测「排版完找不到下载」。
   处理：只在「非桌面壳」时恢复文档流滚动；桌面壳行为一字不改。
   顺带让预览面板停靠时窗口真正让位（原来只加 margin 不减宽，
   100vw 的窗口整体右移溢出屏幕，面板压住左导航）。 */
html:not(:has(body.app-desktop)) { height: auto; overflow-y: auto; overflow-x: hidden; }
body:not(.app-desktop) { height: auto; min-height: 100vh; overflow: visible; padding: 20px; }
body:not(.app-desktop) .window {
  width: 100%; height: auto; min-height: 0; max-width: 1240px;
  margin: 0 auto; border-radius: 16px;
  border: 1px solid var(--line, #e5e9f0);
  box-shadow: 0 1px 3px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.05);
  overflow: visible;
}
body:not(.app-desktop) .window > .body,
body:not(.app-desktop) .window > .main { min-height: 0; }
body:not(.app-desktop).preview-docked .window {
  margin-left: calc(var(--dp-w, 50vw) + 4px);
  margin-right: 20px; width: auto; max-width: none;
}
@media (max-width: 900px) {
  body:not(.app-desktop).preview-docked .window { margin-left: 0; margin-right: 0; }
}

/* ============ 设置页操作按钮（B112）============
   原来 .setting-row 是竖排，每个按钮撑满整行；「导出我的数据」和
   「注销账号」两条同色同宽的大蓝条并排堆着，危险操作毫无区分度，
   容易误点。改成横排 + 注销用红色描边。 */
.card-box .setting-row { flex-direction: row; flex-wrap: wrap; align-items: center; }
.card-box .setting-row .btn { width: auto; }
.btn.danger { background: #fff; color: #b91c1c; border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }

/* ============ 手机端横向导航条收紧（B112）============
   小屏侧栏是「横向滑动导航条」，但每项偏宽（图标+6 字标签约 110px），
   390px 屏上只能看到一项半，用户不知道右边还有 PDF / 图片 / 设置。
   这里收紧尺寸 + 隐藏滚动条，让一屏看到三项半，滑动意图更明显。 */
@media (max-width: 900px) {
  body:not(.app-desktop) .sidebar { scrollbar-width: none; -ms-overflow-style: none; }
  body:not(.app-desktop) .sidebar::-webkit-scrollbar { display: none; }
  body:not(.app-desktop) .sidebar .nav { padding: 7px 10px; font-size: 12.5px; gap: 5px; }
  body:not(.app-desktop) .sidebar .nav .nav-ico { width: 18px; font-size: 10px; }
}

/* ============ 板块职责分离（2026-11-29 用户要求）============
   毕业设计板块只做「上传论文 + 学校要求 → 自动解析 → 预览」；
   模板填空 / 批量排版 / 粘贴去格式 / 模板 以及侧栏模板库属通用排版。
   以前两套东西挤在一个面板里，用户不知道自己在哪个流程里。 */
body.thesis-mode .subtabs .subtab[data-sub="w2"],
body.thesis-mode .subtabs .subtab[data-sub="w3"],
body.thesis-mode .subtabs .subtab[data-sub="w4"],
body.thesis-mode .subtabs .subtab[data-sub="w5"] { display: none; }
body.thesis-mode #sidebarPresets { display: none; }
/* 只剩一个子标签时，下面那条细分割线没有意义，去掉更干净 */
body.thesis-mode #p-word > .subtabs { border-bottom: 0; }

/* ============ 侧栏顶部（2026-11-29）============
   原来只有一个小图标 + 折叠按钮，中间一大片空，和下面红底菜单直接贴住。
   这里把图标放大一点、加一条分隔线，视觉上把「品牌区」和「导航区」分开。 */
.sidebar .logo { padding: 11px 12px 10px; border-bottom: 1px solid #eef0f3; margin-bottom: 6px; }
.sidebar .logo-mark { height: 30px; max-width: 62px; }

/* ============ 排版次数用尽 · 购买弹窗（2026-11-29）============
   毕设板块不付费下载不下来：点「开始排版」前先提示买次数，
   允许「先看效果」（结果只能在线看，下载按钮引导购买）。 */
.pay-box { position: relative; }
.pay-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.pay-plan { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 10px; text-align: center; background: #fff; }
.pay-plan.hot { border-color: #fca5a5; background: #fff7f7; }
.pay-plan b { display: block; font-size: 13px; color: var(--text); }
.pay-plan em { display: block; font-style: normal; font-size: 11px; color: var(--text-mute); margin: 2px 0 6px; }
.pay-plan span { display: block; font-size: 20px; font-weight: 800; color: var(--brand); }
.pay-contact { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 12.5px; line-height: 1.9; color: var(--text-sub); }
.pay-contact b { color: var(--text); }
.pay-tip { font-size: 12px; color: var(--text-mute); margin: 10px 0 0; line-height: 1.8; }
@media (max-width: 640px) { .pay-plans { grid-template-columns: 1fr; } }

/* 侧栏一句定位（2026-11-29）：WE助手是办公软件辅助系统，不只做排版 */
.sidebar .sb-tag { margin: -2px 12px 8px; font-size: 11.5px; color: #94a3b8; letter-spacing: .2px; }
/* 侧栏顶部只留折叠按钮（2026-11-29 b118）：原来那块 WE logo 与顶栏品牌重复，用户要求彻底去掉 */
.sidebar .sb-head { display: flex; justify-content: flex-end; align-items: center;
  padding: 10px 12px 2px; border-bottom: 1px solid #eef0f3; margin-bottom: 6px; }
body.sb-mini .sidebar .sb-head { justify-content: center; padding: 8px 0 2px; }
.mode-hero .mh-lead { font-size: 13.5px; line-height: 1.9; color: #4b5563; margin: 0 0 10px; }

/* 购买弹窗必须盖住文档预览面板（dp-panel 的 z-index 是 90） */
#payModal { z-index: 9980; }

/* ============ 红色「WE助手」背景水印（2026-11-29 b117）============
   毕设没买次数时：在线预览与下载到的文件都带这层水印；
   付费下载后拿到的是无水印原件。预览是 HTML 近似图，水印用 CSS 平铺叠加，
   与 docx 里烤进去的水印同一套视觉（红色 #dc2626、斜 30°、约 35% 不透明）。 */
.wm-bg { position: relative; isolation: isolate; }
.wm-bg::after {
  content: ''; position: absolute; inset: 0; z-index: 60; pointer-events: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='180'%3E%3Ctext x='125' y='104' font-size='29' font-family='Microsoft%20YaHei,PingFang%20SC,sans-serif' fill='%23dc2626' fill-opacity='0.38' text-anchor='middle' transform='rotate(-30 125 104)'%3EWE%E5%8A%A9%E6%89%8B%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* 结果页里的报价小卡：不弹窗也能看清价格与联系方式 */
.pay-inline { margin-top: 10px; padding: 12px 14px; background: #fff7f7; border: 1px solid #fecaca; border-radius: 12px; }
.pay-inline-plans { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-inline-plans span { flex: 1 1 90px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 4px; font-size: 13px; font-weight: 700; color: var(--brand); }
.pay-inline-plans span b { display: block; font-size: 11px; font-weight: 600; color: var(--text-mute); margin-top: 2px; }
.pay-inline-plans span.hot { border-color: #fca5a5; background: #fff1f1; }

/* ============ 毕业设计排版：就两个上传框（2026-11-29 b117）============
   用户原话：毕设板块除了「上传要求」和「上传文稿」这两个框，其他都没有。
   所以这里不再放模板下拉、排版规范、子标签、选项区。 */
.thesis-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.thesis-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 16px; }
.thesis-box .tb-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.thesis-box .tb-no { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: #dc2626; color: #fff;
  font-size: 12px; font-weight: 700; align-items: center; justify-content: center; flex: none; }
.thesis-box .tb-head b { font-size: 15px; color: var(--text); }
.thesis-box .tb-head em { font-style: normal; font-size: 12px; color: var(--text-mute); }
.thesis-box .tb-zone { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; min-height: 190px; margin: 0; padding: 22px 14px; border: 1.5px dashed #d5d9e0;
  border-radius: 12px; background: #fafbfc; cursor: pointer; text-align: center; }
.thesis-box .tb-zone:hover, .thesis-box .tb-zone.on { border-color: #f0a3a3; background: #fff7f7; }
.thesis-box .tb-zone .dz-ico { font-size: 26px; color: #c9ced6; line-height: 1; }
.thesis-box .tb-zone .dz-main { font-size: 13.5px; color: var(--text); }
.thesis-box .tb-zone .dz-sub { font-size: 12px; color: var(--text-mute); }
.thesis-box .tb-zone input[type=file] { display: none; }
.thesis-box .dz-picked { font-size: 12.5px; color: #15803d; word-break: break-all; }
.thesis-box .tb-paste { margin-top: 8px; }
.thesis-box .tb-paste summary { font-size: 12px; color: var(--text-mute); cursor: pointer; }
.thesis-box .tb-paste textarea { width: 100%; margin-top: 6px; font-size: 13px; line-height: 1.7; }
.thesis-go { margin-top: 16px; }
.thesis-go .btn.primary { min-width: 160px; }
.thesis-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.9; color: var(--text-mute); }
@media (max-width: 860px) {
  .thesis-two { grid-template-columns: 1fr; }
  .thesis-box .tb-zone { min-height: 132px; }
  /* 手机端侧栏改横排：竖排 180px 会把正文挤成一条缝，
     而且「办公软件辅助系统」这种短标签会竖着排成一列（B102）。 */
  .sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--line);
             padding: 6px 8px; overflow-x: auto; }
  .sidebar .logo, .sidebar .sb-head, .sidebar .sb-tag, .sidebar #sidebarPresets,
  .sidebar .side-note, .sidebar .buyout-btn { display: none !important; }
  .sidebar nav { flex-direction: row; gap: 6px; }
  .sidebar .nav { white-space: nowrap; padding: 7px 10px; font-size: 13px; }
  .window { flex-direction: column; }
}

/* ============ 购买次数弹窗（b118）参考 WorkBuddy 会员付费页
   结构：三档套餐卡（选中态 + 推荐角标 + 权益列表）→ 支付区（左付款方式 / 右金额+单号）
   → 协议勾选 → 底部次要操作。目标是看起来像正经商品页，而不是「找客服」的说明纸。 */
.pay-mask { z-index: 9980; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.pay-modal { width: min(880px, 94vw); max-height: 92vh; overflow: auto; padding: 0;
  border-radius: 18px; background: #fff; box-shadow: 0 24px 60px rgba(15, 23, 42, .28); }
.pm-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 22px 12px; border-bottom: 1px solid var(--line); }
.pm-title { font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: .2px; }
.pm-sub { font-size: 12.5px; color: var(--text-mute); margin-top: 4px; line-height: 1.7; }
.pm-sub b { color: var(--text-sub); }
.pm-body { padding: 16px 22px 4px; }

.pm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pm-card { position: relative; display: block; cursor: pointer; padding: 16px 14px 14px;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.pm-card:hover { border-color: #f3b4b4; transform: translateY(-1px); }
.pm-card input { position: absolute; opacity: 0; pointer-events: none; }
.pm-card.on { border-color: #dc2626; box-shadow: 0 6px 18px rgba(220, 38, 38, .12); background: #fffafa; }
.pm-card.is-hot { border-color: #f8c9c9; }
.pm-badge { position: absolute; top: -9px; right: 12px; font-size: 11px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #ef4444, #dc2626);
  padding: 2px 9px; border-radius: 999px; letter-spacing: .4px; }
.pm-card-h b { font-size: 14px; color: var(--text); }
.pm-card-h em { display: block; font-style: normal; font-size: 11.5px; color: var(--text-mute); margin-top: 2px; }
.pm-price { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1.2; margin: 10px 0 0; }
.pm-price i { font-size: 15px; font-style: normal; font-weight: 700; margin-right: 2px; }
.pm-card.on .pm-price { color: #dc2626; }
.pm-cr { font-size: 12px; color: var(--text-mute); margin: 2px 0 10px; }
.pm-cr b { font-size: 14px; color: var(--text-sub); }
.pm-card ul { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px dashed var(--line); }
.pm-card li { position: relative; padding-left: 18px; font-size: 12.5px; color: var(--text-sub); line-height: 2; }
.pm-card li::before { content: '✓'; position: absolute; left: 0; top: 0; color: #dc2626; font-weight: 700; }

.pm-pay { display: grid; grid-template-columns: 250px 1fr; gap: 16px; margin-top: 16px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.pm-pay-t { font-size: 12.5px; font-weight: 700; color: var(--text-sub); margin-bottom: 8px; }
.pm-ways { display: flex; gap: 8px; }
.pm-way { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; cursor: pointer; transition: .15s; }
.pm-way:hover { border-color: #dc2626; background: #fff7f7; }
.pm-way-ico { width: 26px; height: 26px; border-radius: 8px; color: #fff; font-size: 13px;
  font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pm-way-ico.wx { background: #16a34a; }
.pm-way-ico.ali { background: #1677ff; }
.pm-way b { font-size: 12.5px; color: var(--text); }
.pm-way em { font-style: normal; font-size: 11px; color: var(--text-mute); }
/* 选中态（b119）：付款方式按钮 */
.pm-way.on { border-color: #dc2626; background: #fff7f7; box-shadow: 0 0 0 3px rgba(220, 38, 38, .08); }
.pm-way.on b { color: #dc2626; }
/* 二维码区（b119）：扫码付款，不再让用户填单号 */
.pm-qr { margin-top: 10px; display: flex; align-items: center; justify-content: center;
  min-height: 150px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.pm-qr img { width: 168px; height: 168px; object-fit: contain; image-rendering: pixelated; }
.pm-qr-ph { text-align: center; cursor: pointer; line-height: 1.7; }
.pm-qr-ph b { display: block; font-size: 12.5px; color: var(--text-sub); }
.pm-qr-ph em { font-style: normal; font-size: 11.5px; color: var(--text-mute); }
.pm-qr-ph code { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }
.pm-qr-tip { margin-top: 8px; text-align: center; font-size: 12px; color: var(--text-mute); }
.pm-qr-tip .pm-sum-price { font-size: 15px; }

.pm-sum { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--text-sub); }
.pm-sum-price { font-size: 26px; font-weight: 800; color: #dc2626; }
.pm-sum-meta { font-size: 12px; color: var(--text-mute); }
.pm-steps { display: flex; gap: 6px; margin: 8px 0; }
.pm-steps span { flex: 1; text-align: center; font-size: 11.5px; color: var(--text-sub);
  background: #fff; border: 1px dashed var(--line); border-radius: 8px; padding: 5px 0; }

.pm-hint { font-size: 11.5px; color: var(--text-mute); line-height: 1.7; margin: 8px 0 0; }
.pm-hint.bad { color: #dc2626; }
.pm-agree { display: flex; align-items: flex-start; gap: 6px; font-size: 11.5px;
  color: var(--text-sub); line-height: 1.7; margin-top: 10px; cursor: pointer; }
.pm-agree input { margin-top: 3px; }
.pm-agree a { color: #dc2626; text-decoration: none; }
.pm-foot { display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 22px 18px; }
@media (max-width: 720px) {
  .pm-grid { grid-template-columns: 1fr; gap: 8px; }
  /* 手机上一屏放不下三张大卡：权益列表收起，价格与次数并排，保证支付区不用翻很久 */
  .pm-card { padding: 11px 14px; }
  .pm-card ul { display: none; }
  .pm-price { display: inline-block; font-size: 22px; margin: 4px 10px 0 0; }
  .pm-cr { display: inline-block; margin: 0; }
  .pm-card-h em { display: inline; margin-left: 6px; }
  .pm-pay { grid-template-columns: 1fr; gap: 10px; }
  .pm-qr { min-height: 0; padding: 8px; }
  .pm-qr img { width: 120px; height: 120px; }
  .pm-title { font-size: 15.5px; }
  .pm-foot { justify-content: stretch; }
  .pm-foot .btn { flex: 1; }
}
/* 结果页付费区（b118）：按钮 + 三档价格条，不再堆一串客服联系方式 */
.pay-inline-act { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pay-inline-plans { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-inline-plans span { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12.5px;
  color: var(--text-sub); background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; }
.pay-inline-plans span b { font-size: 12px; color: var(--text); }
.pay-inline-plans span.hot { border-color: #f8c9c9; background: #fff7f7; }
/* 后台表格横向滚动容器（b118：待确认收款表） */
.tbl-wrap { overflow-x: auto; }
.tbl-wrap table { min-width: 620px; }

/* ============ 意见反馈（b118） ============ */
.side-fb { display: flex; align-items: center; gap: 9px; width: calc(100% - 16px);
  margin: 10px 8px 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; text-align: left; cursor: pointer; transition: .15s; }
.side-fb:hover { border-color: #f3b4b4; background: #fff8f8; }
.side-fb .sf-ico { font-size: 15px; line-height: 1; }
.side-fb .sf-txt { display: flex; flex-direction: column; gap: 1px; }
.side-fb .sf-txt b { font-size: 13px; color: var(--text); font-weight: 600; }
.side-fb .sf-txt em { font-style: normal; font-size: 11px; color: var(--text-mute); }
body.sb-mini .side-fb { display: none; }

.fb-modal { width: 560px; }
.fb-modal .modal-body { display: flex; flex-direction: column; gap: 10px; }
.fb-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-sub); }
.fb-row select { flex: 1; height: 34px; padding: 0 8px; font: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.fb-modal textarea { width: 100%; min-height: 132px; resize: vertical; padding: 10px 12px;
  font: inherit; font-size: 13.5px; line-height: 1.75; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.fb-modal textarea:focus { outline: none; border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.fb-row2 { display: flex; align-items: center; gap: 10px; }
.fb-row2 input { flex: 1; min-width: 0; height: 34px; padding: 0 12px; font: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.fb-count { font-size: 11.5px; color: var(--text-mute); white-space: nowrap; }
.fb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.fb-tip { font-size: 12px; color: var(--text-mute); line-height: 1.75; margin: 0; }
.fb-tip.bad { color: #dc2626; }
@media (max-width: 640px) { .fb-modal { width: 94vw; } }

/* ============ 设置页：各板块规则表（b118） ============ */
.rule-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.rule-table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--text-sub);
  background: #f6f8fb; padding: 8px 10px; border: 1px solid var(--line); }
.rule-table td { padding: 10px; border: 1px solid var(--line); color: var(--text-sub); line-height: 1.85; vertical-align: top; }
.rule-table td:first-child { width: 150px; color: var(--text); }
.rule-table td b { color: var(--text); }
@media (max-width: 720px) { .rule-table td:first-child { width: 100px; } }

/* 购买须知（b119）：右栏原来内容太少，一大片空白；补 4 条用户最常问的，
   顺便减少「下载会不会重复扣」「次数会不会过期」这类客服问题。 */
.pm-notes { list-style: none; margin: 10px 0 0; padding: 0; }
.pm-notes li { position: relative; padding-left: 18px; font-size: 12.5px; color: var(--text-sub); line-height: 1.95; }
.pm-notes li::before { content: '✓'; position: absolute; left: 0; top: 0; color: #dc2626; font-weight: 700; }
.pm-notes li b { color: var(--text); }
/* 协议勾选：原来 sub-element 直接是 flex item，<a> 被拉成块导致换行错乱（b119 修正） */
.pm-agree span { flex: 1; min-width: 0; }
.pm-agree a { white-space: nowrap; }

/* 手机端付款弹窗压缩（b119）：三档卡 + 二维码 + 协议要尽量落在一屏内。
   购买须知在小屏上是重复信息（卡里已写了「重复下载不扣」「次数长期有效」），直接收起。 */
@media (max-width: 720px) {
  .pm-notes { display: none; }
  .pm-top { padding: 14px 16px 10px; }
  .pm-sub { font-size: 12px; }
  .pm-body { padding: 12px 16px 2px; }
  .pm-qr { min-height: 0; padding: 8px; }
  .pm-qr img { width: 112px; height: 112px; }
  .pm-qr-ph em { font-size: 11px; }
  .pm-qr-tip { margin-top: 6px; font-size: 11.5px; }
  .pm-hint { font-size: 11px; }
  .pm-foot { padding: 8px 16px 14px; }
  .pm-sum { margin-bottom: 2px; }
}
/* 手机端底部按钮：主按钮独占一行，「我已完成支付」不再被挤成两行（b119） */
@media (max-width: 720px) {
  .pm-foot { flex-wrap: wrap; }
  .pm-foot #pmSubmit { order: -1; flex: 1 0 100%; height: 42px; }
  .pm-foot #payRefresh, .pm-foot #payCancel { flex: 1; white-space: nowrap; }
}

/* ── 顶栏「策芯科技」返回入口（b122）──────────────────────────────
   位置：WE助手 标题栏最左侧，形成 策芯科技 / WE助手 面包屑。
   移动端隐藏文字，只留标题，避免挤压右侧按钮区。 */
.brand .crumb{font-size:12.5px;color:#8b97a9;text-decoration:none;flex:0 0 auto;
  transition:color .15s}
.brand .crumb:hover{color:#111827}
.brand .crumb-sep{color:#cbd5e1;font-size:12px;flex:0 0 auto}
@media(max-width:720px){
  .brand .crumb,
  .brand .crumb-sep{display:none}
}
