/* 官网 · 使用手册 / 更新日志 专用样式 V1.0
   与官网同色系：米白底 / 墨黑字 / 朱红点，手机端单列铺满。 */
:root {
  --doc-bg: #fbf8f1;
  --doc-txt: #201e1a;
  --doc-mut: #6e6a62;
  --doc-line: #e2ddd2;
  --doc-acc: #b5342b;
  --doc-gold: #c29a5b;
  --doc-card: #fffdf8;
}
.doc {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--doc-txt);
  background: var(--doc-bg);
  padding: 26px 0 10px;
}
.doc .wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 页头 ---------- */
.doc-head {
  text-align: center;
  padding: 22px 0 8px;
}
.doc-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--doc-gold);
  border: 1px solid var(--doc-gold);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 12px;
}
.doc-head h1 {
  font-size: 32px;
  line-height: 1.3;
  margin: 0 0 10px;
  letter-spacing: .5px;
}
.doc-lead {
  color: var(--doc-mut);
  font-size: 15.5px;
  line-height: 1.9;
  margin: 0 auto 10px;
  max-width: 640px;
}
.doc-meta {
  font-size: 12.5px;
  color: var(--doc-mut);
  opacity: .9;
  margin-top: 6px;
}

/* ---------- 切换卡 ---------- */
.doc-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 4px;
  flex-wrap: wrap;
}
.doc-tab {
  -webkit-appearance:none;appearance:none;
  -webkit-appearance: none;
  border: 1.5px solid var(--doc-line);
  background: var(--doc-card);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 15px;
  font-family: inherit;
  color: var(--doc-txt);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  transition: all .18s;
}
.doc-tab em {
  font-style: normal;
  font-size: 12px;
  color: var(--doc-mut);
}
.doc-tab:hover {
  border-color: var(--doc-gold);
}
.doc-tab.on {
  background: var(--doc-txt);
  border-color: var(--doc-txt);
  color: #fbf8f1;
}
.doc-tab.on em {
  color: rgba(251, 248, 241, .75);
}

/* ---------- 正文 ---------- */
.doc-body {
  padding-top: 12px;
}
.doc-pane {
  display: none;
}
.doc-pane.on {
  display: block;
}
.doc-sec {
  background: var(--doc-card);
  border: 1px solid var(--doc-line);
  border-radius: 16px;
  padding: 20px 22px 18px;
  margin: 16px 0;
}
.doc-sec h2 {
  font-size: 19px;
  margin: 0 0 8px;
  line-height: 1.5;
}
.doc-what {
  color: var(--doc-mut);
  font-size: 14.5px;
  line-height: 1.9;
  margin: 0 0 12px;
}
.doc-steps {
  margin: 0;
  padding-left: 22px;
}
.doc-steps li {
  font-size: 15px;
  line-height: 1.95;
  margin-bottom: 4px;
}
.doc-steps li::marker {
  color: var(--doc-acc);
  font-weight: 700;
}
.doc-tip {
  margin-top: 12px;
  background: #f4efe2;
  border-left: 3px solid var(--doc-gold);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #5c574d;
}
.doc-tip b {
  color: var(--doc-gold);
  margin-right: 8px;
}
.doc-fig {
  margin: 4px 0 14px;
}
.doc-fig img {
  width: 100%;
  border: 1px solid var(--doc-line);
  border-radius: 12px;
  display: block;
  cursor: zoom-in;
  background: #fff;
}
.doc-fig figcaption {
  font-size: 12.5px;
  color: var(--doc-mut);
  text-align: center;
  margin-top: 6px;
}
.doc-note {
  text-align: center;
  color: var(--doc-mut);
  font-size: 13px;
  padding: 18px 20px 30px;
  line-height: 1.9;
}

/* ---------- 图片放大 ---------- */
.doc-zoom {
  position: fixed;
  inset: 0;
  background: rgba(32, 30, 26, .82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 24px;
  cursor: zoom-out;
}
.doc-zoom.on {
  display: flex;
}
.doc-zoom img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

/* ---------- AI 伙伴署名 ---------- */
.tm {
  padding: 18px 0 6px;
}
.tm h2 {
  text-align: center;
  font-size: 20px;
  margin: 0 0 6px;
}
.tm-sub {
  text-align: center;
  color: var(--doc-mut);
  font-size: 13px;
  margin: 0 0 16px;
}
.tm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.tm-card {
  background: var(--doc-card);
  border: 1px solid var(--doc-line);
  border-radius: 14px;
  padding: 14px 16px;
}
.tm-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
}
.tm-role {
  font-size: 12.5px;
  color: var(--doc-acc);
  margin: 2px 0 8px;
}
.tm-duty {
  font-size: 12.5px;
  color: var(--doc-mut);
  line-height: 1.8;
}
.tm-word {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--doc-gold);
}

/* ---------- 更新日志 ---------- */
.cl-wrap {
  padding-top: 14px;
}
.cl-day {
  display: flex;
  gap: 18px;
  margin-bottom: 8px;
}
.cl-date {
  flex: none;
  width: 92px;
  text-align: right;
  font-size: 13px;
  color: var(--doc-mut);
  padding-top: 16px;
  font-variant-numeric: tabular-nums;
}
.cl-list {
  flex: 1;
  min-width: 0;   /* 手机端 flex 子项不被长文本撑开（否则整页横向溢出） */
  border-left: 2px solid var(--doc-line);
  padding-left: 20px;
}
.cl-item {
  background: var(--doc-card);
  border: 1px solid var(--doc-line);
  border-radius: 14px;
  padding: 14px 18px 12px;
  margin: 12px 0;
  position: relative;
  min-width: 0;
  overflow-wrap: break-word;   /* 长英文 token / 长数字串允许断行 */
}
.cl-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--doc-gold);
  box-shadow: 0 0 0 3px var(--doc-bg);
}
.cl-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.cl-type {
  font-size: 12px;
  border-radius: 6px;
  padding: 2px 8px;
  color: #fff;
}
.cl-type.t-new {
  background: #4e7a5a;
}
.cl-type.t-opt {
  background: var(--doc-gold);
}
.cl-type.t-fix {
  background: var(--doc-acc);
}
.cl-scope {
  font-size: 12px;
  color: var(--doc-mut);
  border: 1px solid var(--doc-line);
  border-radius: 6px;
  padding: 1px 7px;
}
.cl-v {
  font-size: 11.5px;
  color: var(--doc-mut);
  opacity: .75;
}
.cl-item h3 {
  font-size: 16.5px;
  margin: 0 0 6px;
  line-height: 1.6;
}
.cl-item p {
  font-size: 14px;
  color: #4a463f;
  line-height: 1.9;
  margin: 0;
}
.cl-by {
  margin-top: 8px;
  font-size: 12px;
  color: var(--doc-gold);
}

/* ---------- 手机端 ---------- */
@media (max-width: 720px) {
  .doc-head h1 {
    font-size: 25px;
  }
  .doc-tabs {
    gap: 8px;
  }
  .doc-tab {
    padding: 9px 14px;
    font-size: 14.5px;
  }
  .doc-sec {
    padding: 16px 15px 14px;
    border-radius: 14px;
  }
  .cl-day {
    gap: 10px;
  }
  .cl-date {
    width: 62px;
    font-size: 12px;
    padding-top: 14px;
  }
  .cl-list {
    padding-left: 14px;
    min-width: 0;
  }
  .cl-item::before {
    left: -20px;
  }
  .cl-item h3, .cl-item p, .cl-tags, .cl-by {
    overflow-wrap: break-word;
  }
}

/* ============================================================
   使用手册 · 作业本风 V2.0（2026-11-03，r281）
   与家长端手册（parent-app-guide.html）同一风格语言：
   纸纹底、朱红章、楷体标题、胶带贴角、编号步骤、便签提示；
   配图全部升级为「动图」——设备框内截图自动浏览全页（CSS 动画）。
   仅影响 .doc 手册页（manual.html）；changelog 的 .cl-* 不受影响。
   ============================================================ */
.doc {
  background-color: #FBF7EC;
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(217, 210, 192, .45) 27px 28px);
}
.doc .wrap::before {
  content: ""; position: fixed; left: max(14px, calc(50% - 472px + 2px)); top: 0; bottom: 0;
  width: 1px; background: rgba(192, 57, 43, .30); z-index: 0; pointer-events: none;
}

/* ---------- 页头：朱红章 + 楷体标题 + 胶带 ---------- */
.doc-head { text-align: center; padding: 30px 0 8px; position: relative; }
.doc-stamp {
  display: inline-block; border: 2.5px solid #C0392B; color: #C0392B; border-radius: 8px;
  padding: 3px 12px; font-size: 12px; letter-spacing: 3px; transform: rotate(-3deg);
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
}
.doc-tape-top {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%) rotate(-1.5deg);
  width: 150px; height: 26px; background: rgba(217, 164, 65, .30);
  border-left: 1px dashed rgba(0, 0, 0, .08); border-right: 1px dashed rgba(0, 0, 0, .08);
}
.doc-head h1 {
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "PingFang SC", serif;
  font-size: 34px; letter-spacing: 2px;
}
.doc-head h1 em { font-style: normal; color: #0E7A43; border-bottom: 4px solid rgba(14, 122, 67, .25); padding-bottom: 2px; }

/* ---------- 最近更新（自动同步 changelog） ---------- */
.doc-upd {
  background: rgba(255, 253, 248, .92); border: 1.5px solid var(--doc-line); border-radius: 14px;
  padding: 14px 18px; margin: 16px 0 4px; box-shadow: 0 3px 0 rgba(217, 210, 192, .45);
}
.doc-upd h2 {
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif; font-size: 18px; margin: 0 0 4px;
  color: #C0392B; letter-spacing: 1px;
}
.doc-upd-sub { margin: 0 0 8px; font-size: 12.5px; color: var(--doc-mut); }
.doc-upd-sub a { color: #0E7A43; text-decoration: none; border-bottom: 1px dashed rgba(14, 122, 67, .5); }
.doc-upd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.doc-upd-list li { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; line-height: 1.6; min-width: 0; }
.doc-upd-list .v {
  flex: none; font-size: 11px; color: #fff; background: #0E7A43; border-radius: 6px; padding: 1px 7px; font-weight: 700;
}
.doc-upd-list b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.doc-upd-list .d { flex: none; margin-left: auto; font-size: 11.5px; color: var(--doc-mut); }

/* ---------- 目录卡 ---------- */
.doc-toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px;
}
.doc-toc-it {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: var(--doc-txt);
  background: rgba(255, 253, 248, .92); border: 1.5px solid var(--doc-line); border-radius: 999px;
  padding: 5px 13px 5px 6px; font-size: 13px; line-height: 1.5;
  box-shadow: 0 2px 0 rgba(217, 210, 192, .4); max-width: 100%; min-width: 0;
}
.doc-toc-it i {
  font-style: normal; flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: #0E7A43; color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.doc-toc-it:active { transform: translateY(1px); }

/* ---------- 章节卡：白纸 + 胶带贴角 + 编号章 ---------- */
.doc-sec {
  background: rgba(255, 253, 248, .94); border: 1.5px solid var(--doc-line); border-radius: 16px;
  padding: 20px 22px; margin: 18px 0; box-shadow: 0 3px 0 rgba(217, 210, 192, .5);
  position: relative; overflow: visible;
}
.doc-tape {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  width: 86px; height: 20px; background: rgba(217, 164, 65, .34);
  border-left: 1px dashed rgba(0, 0, 0, .08); border-right: 1px dashed rgba(0, 0, 0, .08);
}
.doc-sec h2 {
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif; font-size: 21px; margin: 0 0 8px;
  letter-spacing: .5px; line-height: 1.5; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.doc-no {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: #C0392B; color: #fff;
  font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  transform: rotate(-4deg); font-family: -apple-system, "PingFang SC", sans-serif;
}

/* ---------- 步骤：绿圆编号 ---------- */
.doc-steps { counter-reset: st; list-style: none; padding: 0; margin: 12px 0; }
.doc-steps li {
  counter-increment: st; position: relative; padding: 9px 0 9px 42px;
  border-bottom: 1px dashed var(--doc-line); font-size: 14.5px; line-height: 1.85;
}
.doc-steps li:before {
  content: counter(st); position: absolute; left: 0; top: 10px; width: 26px; height: 26px; border-radius: 50%;
  background: #0E7A43; color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.doc-steps li:last-child { border-bottom: 0; }

/* ---------- 提示便签 ---------- */
.doc-tip {
  background: #FDF3D2; border: 1px solid rgba(217, 164, 65, .5); border-radius: 4px;
  padding: 10px 14px; transform: rotate(-.6deg); box-shadow: 2px 3px 0 rgba(0, 0, 0, .06);
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "PingFang SC", serif; font-size: 14.5px; line-height: 1.8;
}
.doc-tip b { color: #B48320; margin-right: 8px; font-size: 12px; letter-spacing: 2px; }

/* ---------- 动图卡：设备框 + 自动浏览（配图增加动图） ---------- */
.gf { margin: 16px 0; text-align: center; }
.gf-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #C0392B;
  border: 1px solid rgba(192, 57, 43, .4); border-radius: 999px; padding: 2px 12px; margin-bottom: 10px;
  background: rgba(255, 253, 248, .9);
}
.gf-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #C0392B; animation: gfBlink 1.2s ease-in-out infinite; }
@keyframes gfBlink { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
.gf-frame {
  margin: 0 auto; overflow: hidden; background: #fff; position: relative;
  border: 2.5px solid #2B2723; box-shadow: 0 4px 0 rgba(43, 39, 35, .12);
}
.gf-phone .gf-frame { width: min(280px, 78vw); height: 460px; border-radius: 24px; }
.gf-wide .gf-frame { width: 100%; max-width: 860px; height: 420px; border-radius: 14px; }
.gf-frame img { width: 100%; display: block; cursor: zoom-in; }
.gf-frame.on img { animation: gfPan 16s ease-in-out infinite; }
@keyframes gfPan {
  0%, 8% { transform: translateY(0) }
  46%, 54% { transform: translateY(calc(-1 * var(--pan, 0px))) }
  92%, 100% { transform: translateY(0) }
}
.gf-frame:hover img, .gf-frame:active img { animation-play-state: paused; }
.gf figcaption { font-size: 12.5px; color: var(--doc-mut); margin-top: 10px; line-height: 1.7; }
.gf-wide .gf-frame::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
  background: linear-gradient(180deg, transparent, rgba(43, 39, 35, .05)); pointer-events: none;
}

/* ---------- 尾部便签 ---------- */
.doc-note { text-align: center; margin-top: 30px; }
.doc-sticky {
  display: inline-block; background: #FDF3D2; border: 1px solid rgba(217, 164, 65, .5); border-radius: 4px;
  padding: 10px 16px; transform: rotate(-1.2deg); box-shadow: 2px 3px 0 rgba(0, 0, 0, .06);
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif; font-size: 14.5px; line-height: 1.8; max-width: 92%;
}

/* ---------- 手机适配 ---------- */
@media (max-width: 720px) {
  .doc-head h1 { font-size: 26px; }
  .doc-sec { padding: 16px 15px; }
  .doc-sec h2 { font-size: 18px; }
  .gf-phone .gf-frame { width: min(240px, 70vw); height: 400px; }
  .gf-wide .gf-frame { height: 300px; }
  .doc-upd-list .d { display: none; }
  .doc-steps li { font-size: 14px; }
}

/* ---------- 分步焦点框（2026-11-07）：在 .gf 底座上加一层，不新增第二套 ----------
   结构约定：
     <div class="gf gf-step" data-step="3">
       <div class="gf-badge"><span class="dot"></span>分步 1-3 · 循环</div>
       <div class="gf-frame on">
         <img src="..." data-zoom>
         <span class="gf-ring" style="--x:62%;--y:8%;--w:30%;--h:7%"></span>
         <span class="gf-ring" style="--x:6%;--y:34%;--w:52%;--h:9%"></span>
         <span class="gf-ring" style="--x:40%;--y:70%;--w:44%;--h:8%"></span>
       </div>
     </div>
   参数：--x/--y = 焦点框左上角，--w/--h = 宽高，全部按「图片显示区域」的百分比算；
        每个 <span class="gf-ring"> 就是一步，出现顺序即播放顺序；data-step 只支持 3 / 4（步数多请拆两张图）。
   节奏：整轮 5.4s（与市场端/家长端/标注手册同一套循环周期）；每步亮约 1.3s，步间空约 0.5s。
   动效只用 CSS animation，不引 JS；鼠标悬停暂停（与 .gfPan 一致），系统开启「减少动态效果」时全部静止、焦点框常显。 */
.gf-step .gf-frame { position: relative; }
.gf-step .gf-ring {
  position: absolute; left: var(--x, 8%); top: var(--y, 12%);
  width: var(--w, 30%); height: var(--h, 8%);
  border: 2px solid #C0392B; border-radius: 8px; box-sizing: border-box;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .7), 0 0 0 9999px rgba(43, 39, 35, .26);
  opacity: 0; pointer-events: none;
  animation: gfRing 5.4s ease-in-out infinite;
}
@keyframes gfRing {
  0%        { opacity: 0; transform: scale(.97) }
  6%        { opacity: 1; transform: none }
  25%       { opacity: 1; transform: none }
  30%, 100% { opacity: 0; transform: none }
}
/* 3 步：每步 1.8s */
.gf-step[data-step="3"] .gf-ring:nth-of-type(1) { animation-delay: 0s }
.gf-step[data-step="3"] .gf-ring:nth-of-type(2) { animation-delay: 1.8s }
.gf-step[data-step="3"] .gf-ring:nth-of-type(3) { animation-delay: 3.6s }
/* 4 步：每步 1.35s */
.gf-step[data-step="4"] .gf-ring:nth-of-type(1) { animation-delay: 0s }
.gf-step[data-step="4"] .gf-ring:nth-of-type(2) { animation-delay: 1.35s }
.gf-step[data-step="4"] .gf-ring:nth-of-type(3) { animation-delay: 2.7s }
.gf-step[data-step="4"] .gf-ring:nth-of-type(4) { animation-delay: 4.05s }
.gf-step .gf-frame:hover .gf-ring { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .gf-step .gf-ring { animation: none; opacity: 1; }
  .gf-frame.on img { animation: none; }
}
