/* ============================================================
   企旺星 · 功能操作说明 — 文档样式（完全离线，系统字体栈）
   ============================================================ */
:root {
  --primary: #1668dc;
  --primary-strong: #0e4faa;
  --primary-soft: #e8f1fd;
  --ink: #23303f;
  --ink-2: #45566b;
  --ink-3: #7a8a9d;
  --line: #e4e9f0;
  --line-soft: #eef2f7;
  --bg: #ffffff;
  --bg-side: #f7f9fc;
  --topbar-h: 56px;
  --side-w: 304px;
  --content-max: 1000px;
  --radius: 10px;
  --shadow-img: 0 1px 2px rgba(30, 48, 72, .06), 0 6px 18px rgba(30, 48, 72, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 8px; flex: none; }
.brand .brand-name { font-size: 18px; font-weight: 700; letter-spacing: .5px; color: var(--ink); }
.brand .brand-sep { width: 1px; height: 18px; background: var(--line); margin: 0 2px; }
.brand .doc-name { font-size: 15px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar .ver-chip {
  font-size: 12px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid #c8ddf8;
  border-radius: 999px;
  padding: 2px 12px;
  white-space: nowrap;
}

/* ---------------- 布局 ---------------- */
.layout { display: block; }

.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--side-w);
  background: var(--bg-side);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 90;
}

.content {
  margin-left: var(--side-w);
  padding: 0 48px 80px;
}

.content-inner { max-width: var(--content-max); margin: 0 auto; }

/* ---------------- 侧栏：搜索 ---------------- */
.side-search { padding: 14px 14px 10px; border-bottom: 1px solid var(--line-soft); }

.side-search input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px 0 32px;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a8a9d' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.3' y2='16.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}

.side-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22, 104, 220, .12); }

.toc-empty { display: none; padding: 18px 16px; font-size: 13px; color: var(--ink-3); text-align: center; }
.toc.is-empty + .toc-empty { display: block; }

/* ---------------- 侧栏：目录树 ---------------- */
.toc { flex: 1; overflow-y: auto; padding: 8px 8px 24px; scrollbar-width: thin; scrollbar-color: #c6d0dc transparent; }
.toc::-webkit-scrollbar { width: 8px; }
.toc::-webkit-scrollbar-thumb { background: #c9d3df; border-radius: 4px; }
.toc::-webkit-scrollbar-track { background: transparent; }

.toc-chapter { margin-bottom: 2px; }
.toc-chapter.hidden { display: none; }

.toc-ch-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
  user-select: none;
}

.toc-ch-btn:hover { background: #eef3fa; }

.toc-ch-btn .caret {
  flex: none;
  width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .18s ease;
  color: var(--ink-3);
}
.toc-ch-btn .caret svg { display: block; }
.toc-chapter.open > .toc-ch-btn .caret { transform: rotate(90deg); }

.toc-ch-btn .ch-count { margin-left: auto; font-weight: 400; font-size: 11px; color: var(--ink-3); }

.toc-sections { display: none; padding: 1px 0 4px; }
.toc-chapter.open > .toc-sections { display: block; }

.toc-link {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  padding: 5px 8px 5px 30px;
  border-radius: 7px;
  border-left: 2px solid transparent;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-link:hover { color: var(--primary); background: #eef3fa; }
.toc-link.hidden { display: none; }

.toc-link.active {
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* ---------------- 封面（居中书面版式） ---------------- */
.cover {
  min-height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 0 56px;
}

.cover-logo {
  width: 76px; height: 76px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-img);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 34px;
}
.cover-logo img { width: 52px; height: 52px; }

.cover-product { font-size: 46px; font-weight: 800; letter-spacing: 4px; margin: 0 0 12px; color: var(--ink); }
.cover-sub { font-size: 18px; color: var(--ink-2); letter-spacing: 4px; margin: 0 0 52px; }

.cover-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--primary-strong);
  letter-spacing: 3px;
  margin: 0;
  line-height: 1.4;
}

.cover-date { margin-top: 130px; font-size: 13.5px; color: var(--ink-3); }

/* ---------------- 指引节（注册和启动） ---------------- */
.guide { padding-top: 56px; }
.guide .chapter-head { margin-bottom: 20px; }
.feature .desc .em { color: #cf1322; font-weight: 700; }

/* ---------------- 目录页（内容区） ---------------- */
.doc-toc { padding: 56px 0 8px; }

.doc-toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.doc-toc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 10px;
  background: #fff;
}

.doc-toc-card h3 { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.doc-toc-card h3 a { color: inherit; text-decoration: none; }
.doc-toc-card h3 a:hover { color: var(--primary); }

.doc-toc-card ul { list-style: none; margin: 0; padding: 0; }
.doc-toc-card li { margin: 0; }
.doc-toc-card li a {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  padding: 3px 0;
  line-height: 1.5;
}
.doc-toc-card li a:hover { color: var(--primary); }
.doc-toc-card li a .n { color: var(--ink-3); margin-right: 6px; font-variant-numeric: tabular-nums; }

/* ---------------- 章 / 节 ---------------- */
.chapter { padding-top: 64px; scroll-margin-top: calc(var(--topbar-h) + 8px); }

.chapter-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 12px;
}

.chapter-head .ch-no {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: 8px;
  padding: 3px 12px;
  flex: none;
  transform: translateY(-2px);
}

.chapter-head h2 { margin: 0; font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: 1px; }
.chapter-head .ch-meta { margin-left: auto; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }

.feature { padding-top: 44px; scroll-margin-top: calc(var(--topbar-h) + 8px); }

.feature h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.feature h3 .sec-no {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 6px;
  padding: 1px 9px;
  font-variant-numeric: tabular-nums;
}

.feature .desc { margin: 0 0 16px; color: var(--ink-2); text-align: justify; white-space: pre-line; }
.feature .desc + .desc { margin-top: -6px; }

/* ---------------- 截图 ---------------- */
.shot { margin: 0 0 22px; position: relative; }

.shot .shot-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-strong);
  margin-bottom: 8px;
}
.shot .shot-tag::before {
  content: "";
  width: 0; height: 0;
  border-left: 6px solid var(--primary);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.shot img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;      /* 统一显示盒：标准 2880×1920（3:2），异形图 contain 居中留白 */
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-img);
  cursor: zoom-in;
  background: #fff;
}

/* ---------------- 页脚 ---------------- */
.doc-footer {
  margin-top: 90px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 12.5px;
}
.doc-footer img { width: 22px; height: 22px; border-radius: 5px; }

/* ---------------- 灯箱 ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 36, .88);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 36px 22px;
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 100%;
  max-height: calc(100% - 44px);
  border-radius: 6px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
  background: #fff;
}

.lightbox .lb-cap { margin-top: 12px; color: #d7e1ee; font-size: 13.5px; letter-spacing: .5px; }
.lightbox .lb-close {
  position: absolute;
  top: 14px; right: 18px;
  width: 38px; height: 38px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.lightbox .lb-close:hover { background: rgba(255, 255, 255, .24); }

/* ---------------- 回到顶部 ---------------- */
.to-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  box-shadow: var(--shadow-img);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 80;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { color: var(--primary); border-color: var(--primary); }

/* ---------------- 窄屏 ---------------- */
@media (max-width: 960px) {
  .sidebar { display: none; }
  .content { margin-left: 0; padding: 0 20px 60px; }
}

/* ============================================================
   编辑模式（进入后 body.doc-editing；运行时注入 UI 一律 data-rt="1"，
   保存序列化时整体剔除，不落入 index.html）
   ============================================================ */
.topbar-right { display: flex; align-items: center; gap: 10px; }

.edit-toggle {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-3);
  font: inherit;
  font-size: 12.5px;
  border-radius: 999px;
  padding: 2px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.edit-toggle:hover { color: var(--primary); border-color: var(--primary); }
.edit-toggle.editing {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

/* 导出 PDF 按钮（与「编辑」同为顶栏胶囊按钮） */
.pdf-export {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-3);
  font: inherit;
  font-size: 12.5px;
  border-radius: 999px;
  padding: 2px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.pdf-export::before {
  content: "";
  width: 12px; height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m0 0l-4-4m4 4l4-4'/%3E%3Cpath d='M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m0 0l-4-4m4 4l4-4'/%3E%3Cpath d='M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3C/svg%3E") center/contain no-repeat;
  flex: none;
}
.pdf-export:hover { color: var(--primary); border-color: var(--primary); }
.pdf-export:disabled { opacity: .55; cursor: default; }
.pdf-export:disabled:hover { color: var(--ink-3); border-color: var(--line); }

/* 导出前的加载遮罩（运行时注入，data-rt） */
.pdf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 36, .5);
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdf-overlay[hidden] { display: none; }
.pdf-overlay-card {
  background: #fff;
  border-radius: 12px;
  padding: 26px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  box-shadow: 0 16px 52px rgba(0, 0, 0, .3);
  min-width: 260px;
}
.pdf-spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: pdf-spin .8s linear infinite;
}
@keyframes pdf-spin { to { transform: rotate(360deg); } }
.pdf-overlay-text { font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* --- 文字就地编辑 --- */
.doc-editing .feature .desc { position: relative; border-radius: 6px; cursor: text; }
.doc-editing .feature .desc:hover { box-shadow: 0 0 0 1.5px #bcd6f7; background: #fbfdff; }
.doc-editing .feature .desc:focus { outline: none; box-shadow: 0 0 0 2px var(--primary); background: #fff; }
.doc-editing .feature .desc.edit-dirty::after {
  content: "";
  position: absolute;
  top: -3px; right: -3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fa8c16;
  box-shadow: 0 0 0 2px #fff;
}

/* --- 截图悬浮工具条 / 目标选中 / 拖放高亮 --- */
.shot-tools { position: absolute; top: 10px; right: 10px; display: none; gap: 6px; z-index: 6; }
.doc-editing .shot:hover .shot-tools { display: flex; }
/* 已删除(占位符)状态：隐藏 替换/删除 工具条，避免与右上角「撤销删除」按钮重叠；
   占位符本身即上传入口（点击/粘贴/拖拽），无需替换按钮 */
.shot-placeholder + .shot-tools { display: none !important; }
.shot-tools button {
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 6px;
  background: rgba(23, 34, 49, .74);
  color: #fff;
  font: inherit;
  font-size: 12.5px;
  padding: 3px 12px;
  cursor: pointer;
}
.shot-tools button:hover { background: var(--primary); border-color: var(--primary); }
.shot-tools button.st-del:hover { background: #d4380d; border-color: #d4380d; }

.doc-editing .shot img { cursor: pointer; }
.doc-editing .shot img.edit-target,
.doc-editing .shot-placeholder.edit-target { box-shadow: 0 0 0 3px var(--primary), var(--shadow-img); }
.doc-editing .shot.edit-dragover img,
.doc-editing .shot.edit-dragover .shot-placeholder { box-shadow: 0 0 0 3px #52c41a, var(--shadow-img); }

/* --- 待补图占位框（与图片显示盒完全同规格） --- */
.shot-placeholder {
  width: 100%;
  aspect-ratio: 3 / 2;
  border: 2px dashed #c3cedb;
  border-radius: var(--radius);
  background: #fafbfd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  position: relative;
}
.doc-editing .shot-placeholder { cursor: pointer; }
.doc-editing .shot-placeholder:hover { border-color: var(--primary); background: #f6faff; }
.shot-placeholder .ph-name { font-size: 14px; font-weight: 600; color: var(--ink-2); word-break: break-all; }
.shot-placeholder .ph-hint { font-size: 13px; color: var(--ink-3); max-width: 520px; }
.ph-del {
  position: absolute;
  top: 10px; right: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  padding: 3px 12px;
  cursor: pointer;
  display: none;
}
.doc-editing .ph-del { display: inline-block; }
.ph-del:hover { color: #fff; background: #d4380d; border-color: #d4380d; }

/* --- 删除本节 / 删除本章（悬停显现） --- */
.sec-del, .ch-del {
  display: none;
  margin-left: 10px;
  border: 1px solid #ffccc7;
  border-radius: 6px;
  background: #fff;
  color: #cf1322;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  padding: 1px 10px;
  cursor: pointer;
  flex: none;
  white-space: nowrap;
}
.ch-del { transform: translateY(-2px); }
.doc-editing .feature h3:hover .sec-del,
.doc-editing .chapter-head:hover .ch-del,
.doc-editing .feature .chapter-head:hover .sec-del { display: inline-block; }
.sec-del:hover, .ch-del:hover { background: #cf1322; border-color: #cf1322; color: #fff; }
.guide .chapter-head .sec-del { margin-left: auto; }

/* --- 已删除内容 ghost 条（保存时才真正从文件移除，点击可恢复） --- */
.doc-editing .edit-removed {
  display: flex !important;
  align-items: center;
  min-height: 0;
  margin: 14px 0;
  padding: 10px 16px !important;
  border: 1.5px dashed #ffa39e;
  border-radius: 8px;
  background: #fff1f0;
  cursor: pointer;
}
.doc-editing .edit-removed > * { display: none !important; }
.doc-editing .edit-removed::before {
  content: "已删除：" attr(data-removed-label) "　—　点击此条可恢复，保存后彻底移除";
  font-size: 13px;
  color: #cf1322;
}
.doc-editing .edit-removed:hover { border-color: #ff7875; background: #ffe5e2; }
.doc-editing .edit-removed.edit-removed-sub { display: none !important; }
body:not(.doc-editing) .edit-removed { display: none !important; }

/* --- 底部浮动保存条 --- */
.edit-savebar {
  position: fixed;
  left: 50%; bottom: 20px;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(30, 48, 72, .16);
  padding: 10px 16px;
  z-index: 130;
  white-space: nowrap;
}
.doc-editing .edit-savebar { display: flex; }
.edit-savebar .save-stats { font-size: 13px; color: var(--ink-2); }
.edit-savebar .save-stats b { color: var(--primary-strong); font-variant-numeric: tabular-nums; }
.edit-savebar button {
  font: inherit;
  font-size: 13.5px;
  border-radius: 8px;
  padding: 5px 18px;
  cursor: pointer;
}
.edit-savebar .esb-save { border: 1px solid var(--primary); background: var(--primary); color: #fff; }
.edit-savebar .esb-save:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.edit-savebar .esb-discard { border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.edit-savebar .esb-discard:hover { color: #d4380d; border-color: #d4380d; }

/* --- 轻提示 --- */
.edit-toast {
  position: fixed;
  top: 72px; left: 50%;
  transform: translateX(-50%);
  background: rgba(23, 34, 49, .88);
  color: #fff;
  font-size: 13.5px;
  border-radius: 999px;
  padding: 7px 20px;
  z-index: 1300;
  max-width: 70vw;
  text-align: center;
  pointer-events: none;
}
.edit-toast[hidden] { display: none; }

/* ---------------- 打印 / 导出 PDF ---------------- */
@media print {
  /* 强制保留配色：章头徽标(白字蓝底)、Tag、红色强调字等背景/前景，否则浏览器默认剥离背景 */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  :root { --topbar-h: 0px; }

  /* 隐藏所有交互 / 编辑 / 导出 UI */
  .topbar, .sidebar, .to-top, .lightbox,
  .edit-toggle, .pdf-export, .edit-savebar, .edit-toast,
  .shot-tools, .ph-del, .sec-del, .ch-del, .edit-removed,
  .pdf-overlay, [data-rt="1"] { display: none !important; }

  /* 抹除编辑态视觉痕迹（脏标记点 / 选中蓝框 / 悬停底色） */
  .feature .desc.edit-dirty::after { display: none !important; }
  .shot img.edit-target, .shot-placeholder.edit-target,
  .shot.edit-dragover img, .shot.edit-dragover .shot-placeholder { box-shadow: var(--shadow-img) !important; }
  .feature .desc { box-shadow: none !important; background: transparent !important; }

  .content { margin: 0; padding: 0; }
  .content-inner { max-width: none; }
  body { font-size: 12px; }

  /* 封面 → 注册指引 → 功能总览 各占独立页（对齐 Word 版式） */
  .cover { min-height: auto; padding: 40px 0 56px; break-after: page; page-break-after: always; }
  .feature.guide { break-before: page; page-break-before: always; padding-top: 20px; }
  .doc-toc { break-before: page; page-break-before: always; break-after: page; page-break-after: always; padding-top: 20px; }

  /* 每个模块（章）另起一页 */
  .chapter { padding-top: 20px; break-before: page; page-break-before: always; }
  .feature { padding-top: 16px; }
  .feature h3, .chapter-head { break-after: avoid; page-break-after: avoid; }
  .feature .desc { orphans: 3; widows: 3; }

  /* 每张截图 / 占位框整体不跨页断开 */
  .shot, figure.shot, .shot-placeholder { break-inside: avoid; page-break-inside: avoid; }
  .shot img { box-shadow: none; cursor: default; }

  a { color: inherit; text-decoration: none; }
}
