/* ============================================================
   笔迹 — 使用手册（help.php）
   左侧目录 + 正文；所有插画都是随页内联的线稿，不引外部图片
   ============================================================ */

.help-body {
  min-height: 100vh;
  background:
    radial-gradient(860px 420px at 50% -10%, var(--accent-softer), transparent 72%),
    var(--bg);
}

.help-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(22px, 3.4vw, 44px) 26px 84px;
}

/* ---------------- 页头 ---------------- */
.help-hero {
  max-width: 720px;
  margin: 0 0 34px;
}

.help-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5.2vw, 48px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.16;
}

.help-hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.help-lead {
  margin: 0 0 22px;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--muted);
  text-wrap: pretty;
}

.help-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.help-facts li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  font-size: 12.5px;
  color: var(--muted);
}

.help-facts b {
  font-size: 14px;
  font-weight: 750;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------- 两栏：目录 + 正文 ---------------- */
.help-cols {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
}

.help-rail {
  position: sticky;
  top: calc(var(--nav-h) + 18px);
  max-height: calc(100vh - var(--nav-h) - 36px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}

.help-rail p {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

/* 目录分组：笔记教程 / 协作教程 */
.help-rail .part {
  margin: 18px 0 8px;
}

.help-rail .part + ol {
  margin-bottom: 4px;
}

.help-rail ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}

.help-rail a {
  display: block;
  position: relative;
  padding: 5px 8px 5px 14px;
  font-size: 12.8px;
  line-height: 1.5;
  color: var(--muted);
  text-decoration: none;
  border-radius: 0 8px 8px 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.help-rail a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.help-rail a.is-here {
  color: var(--accent);
  font-weight: 650;
  background: var(--accent-softer);
}

.help-rail a.is-here::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.help-rail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--faint);
  text-decoration: none;
}

.help-rail-back:hover {
  color: var(--accent);
}

/* ---------------- 章节 ---------------- */
.help-doc {
  min-width: 0;
}

.hp-sec {
  padding: 30px 0 4px;
  border-top: 1px dashed var(--line-strong);
  scroll-margin-top: calc(var(--nav-h) + 18px);
}

.hp-sec:first-child {
  padding-top: 0;
  border-top: 0;
}

/* 部分分隔牌：笔记教程 / 协作教程 */
.hp-part {
  margin: 36px 0 0;
  padding: 24px 24px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(460px 210px at 92% 0%, var(--accent-softer), transparent 74%),
    var(--surface);
  box-shadow: var(--shadow-md);
  scroll-margin-top: calc(var(--nav-h) + 18px);
}

.hp-part-kicker {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.hp-part h2 {
  margin: 0 0 8px;
  font-size: clamp(21px, 2.8vw, 26px);
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.hp-part > p:last-child {
  margin: 0;
  max-width: 64ch;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  text-wrap: pretty;
}

.hp-h {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
}

.hp-h h2 {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 25px);
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.hp-h h2 span {
  color: var(--accent);
}

/* 每张章节小画：一枚随手裁下的纸片，里面一根线稿 */
.hp-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 12px 12px 12px 4px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
}

.hp-badge svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hp-lead {
  margin: 0 0 18px;
  max-width: 66ch;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--muted);
  text-wrap: pretty;
}

.hp-h3 {
  margin: 26px 0 10px;
  font-size: 15.5px;
  font-weight: 720;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hp-h3:first-of-type {
  margin-top: 4px;
}

.hp-p {
  margin: 0 0 12px;
  max-width: 68ch;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hp-ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.hp-ul li {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}

.hp-strong {
  color: var(--ink);
  font-weight: 650;
}

/* 界面里的名字：一律用「」包起来，跟正文区分开 */
.hp-ui {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

[data-theme="dark"] .hp-ui {
  background: var(--surface-3);
}

.hp-code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--code-bg);
  color: var(--code-ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* ---------------- 步骤 ---------------- */
.hp-steps {
  counter-reset: hpstep;
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.hp-step {
  position: relative;
  padding: 14px 16px 14px 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.hp-step::before {
  counter-increment: hpstep;
  content: counter(hpstep, decimal-leading-zero);
  position: absolute;
  left: 15px;
  top: 15px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.hp-step b {
  display: block;
  margin-bottom: 3px;
  font-size: 14.5px;
  font-weight: 700;
}

.hp-step span {
  display: block;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------------- 卡片网格 ---------------- */
.hp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.hp-card {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.hp-card b {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
}

.hp-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  text-wrap: pretty;
}

/* 词条式列表：左边名字，右边解释 */
.hp-kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px 16px;
  margin: 0 0 18px;
  padding: 0;
}

.hp-kv dt {
  font-size: 13.5px;
  font-weight: 680;
  color: var(--ink);
  white-space: nowrap;
}

.hp-kv dd {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------------- 页边批注 ---------------- */
.hp-note {
  position: relative;
  margin: 0 0 18px;
  padding: 11px 14px 11px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-softer);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hp-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}

.hp-note.warn::before {
  background: color-mix(in srgb, var(--coral) 70%, transparent);
}

.hp-note b {
  color: var(--ink);
}

/* ---------------- 表格 ---------------- */
.hp-table {
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.hp-table caption {
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--faint);
  text-align: left;
}

.hp-table th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-strong);
  font-weight: 700;
  text-align: left;
  color: var(--ink);
  white-space: nowrap;
}

.hp-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.75;
  vertical-align: top;
}

.hp-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.hp-table tbody tr:hover {
  background: var(--accent-softer);
}

.hp-table code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
}

.hp-table .hp-say {
  color: var(--ink-2);
}

/* ---------------- 小票（chips） ---------------- */
.hp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}

.hp-chip {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink-2);
}

.hp-chip.coral {
  border-color: color-mix(in srgb, var(--coral) 40%, var(--line));
  color: color-mix(in srgb, var(--coral) 78%, var(--ink));
}

/* ---------------- 插图容器 ---------------- */
.hp-figure {
  margin: 0 0 20px;
  padding: 20px 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, transparent), var(--surface));
  box-shadow: var(--shadow-md);
}

.hp-figure figcaption {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--faint);
  text-align: center;
}

.hp-swipe {
  display: none;
}

.hp-doodle {
  display: block;
  width: 100%;
  height: auto;
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   界面示意：用真的设计 token 画的小模型
   ============================================================ */
.hp-mock {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-deep);
}

.hp-mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.hp-mock-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.hp-mock-bar i:first-child {
  background: color-mix(in srgb, var(--coral) 70%, var(--line-strong));
}

.hp-mock-bar b {
  margin-left: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* 三栏 */
.hp-mock-app {
  display: grid;
  grid-template-columns: 96px 116px minmax(0, 1fr);
  height: 232px;
  background: var(--bg);
}

.hp-mk-col {
  padding: 9px 8px;
  overflow: hidden;
}

.hp-mk-col + .hp-mk-col {
  border-left: 1px solid var(--line);
}

.hp-mk-side {
  background: var(--surface-2);
}

.hp-mk-list {
  background: var(--bg);
}

.hp-mk-paper {
  position: relative;
  background: var(--surface);
}

.hp-mk-label {
  display: block;
  margin: 0 0 7px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.hp-mk-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}

.hp-mk-row em {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.hp-mk-row.is-on {
  color: var(--accent);
  font-weight: 650;
}

.hp-mk-row.is-on em {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: var(--accent-soft);
}

.hp-mk-card {
  margin-bottom: 6px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.hp-mk-card b {
  display: block;
  font-size: 11px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-mk-card span {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--faint);
}

.hp-mk-card.is-on {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-softer);
}

.hp-mk-title {
  margin: 2px 0 8px;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hp-mk-line {
  height: 6px;
  margin-bottom: 7px;
  border-radius: 3px;
  background: var(--surface-4);
}

.hp-mk-line.w1 { width: 92%; }
.hp-mk-line.w2 { width: 78%; }
.hp-mk-line.w3 { width: 86%; }
.hp-mk-line.w4 { width: 46%; }
.hp-mk-line.caret { background: color-mix(in srgb, var(--accent) 22%, var(--surface-4)); }

.hp-mk-tools {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.hp-mk-tools i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
}

.hp-mk-foot {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 9.5px;
  color: var(--faint);
}

.hp-mk-ring {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hp-mk-ring em {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
}

/* 标注小条：贴在示意图下面，说明「这里是什么」 */
.hp-marks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.hp-mark {
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

.hp-mark b {
  display: block;
  margin-bottom: 1px;
  font-size: 12.5px;
  color: var(--ink);
}

/* 弹窗示意（分享、设置都用它） */
.hp-dialog {
  max-width: 380px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hp-dialog-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.hp-dialog-head b {
  display: block;
  font-size: 13.5px;
  font-weight: 720;
}

.hp-dialog-head span {
  font-size: 11px;
  color: var(--faint);
}

.hp-dialog-body {
  padding: 12px 14px;
  display: grid;
  gap: 9px;
}

.hp-field {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  background: var(--surface-2);
}

.hp-field > em {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
  margin-bottom: 4px;
}

.hp-field > b {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.hp-field .hp-seg {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.hp-seg span {
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--surface);
}

.hp-seg span.on {
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}

.hp-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hp-switch i {
  width: 30px;
  height: 17px;
  flex: none;
  border-radius: 999px;
  background: var(--accent);
  position: relative;
}

.hp-switch i::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
}

.hp-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
}

.hp-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  font-size: 11.5px;
  color: var(--muted);
  background: var(--surface);
}

.hp-btn.primary {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}

/* 手机示意 */
.hp-phone {
  width: 214px;
  margin: 0 auto;
  padding: 9px;
  border: 2px solid var(--line-strong);
  border-radius: 26px;
  background: var(--surface-2);
}

.hp-phone-screen {
  position: relative;
  height: 336px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.hp-ph-head {
  padding: 10px 11px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.hp-ph-head b {
  display: block;
  font-size: 12.5px;
  font-weight: 750;
}

.hp-ph-head span {
  font-size: 9.5px;
  color: var(--faint);
}

.hp-ph-body {
  flex: 1;
  padding: 10px;
  display: grid;
  gap: 7px;
  align-content: start;
}

.hp-ph-pill {
  position: absolute;
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--accent) 85%, transparent);
}

.hp-ph-tabs {
  display: flex;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.hp-ph-tabs span {
  flex: 1;
  padding: 7px 0 8px;
  text-align: center;
  font-size: 9.5px;
  color: var(--faint);
}

.hp-ph-tabs span.on {
  color: var(--accent);
  font-weight: 700;
}

/* 时间轴示意 */
.hp-axis {
  position: relative;
  margin: 22px 6px 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-strong);
}

.hp-axis i {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--line-strong);
  transform: translate(-50%, -50%);
}

.hp-axis i.on {
  width: 16px;
  height: 16px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hp-axis b {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 500;
  color: var(--faint);
  white-space: nowrap;
}

.hp-axis span {
  position: absolute;
  top: -24px;
  right: 0;
  font-size: 10.5px;
  color: var(--accent);
  font-weight: 650;
}

/* 热力图示意 */
.hp-heat {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 12px);
  gap: 4px;
  justify-content: center;
}

.hp-heat i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--surface-4);
}

.hp-heat i.a { background: color-mix(in srgb, var(--accent) 25%, var(--surface-4)); }
.hp-heat i.b { background: color-mix(in srgb, var(--accent) 50%, var(--surface-4)); }
.hp-heat i.c { background: color-mix(in srgb, var(--accent) 75%, var(--surface-4)); }
.hp-heat i.d { background: var(--accent); }

/* ---------------- 常见问题 ---------------- */
.hp-faq {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.hp-q {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.hp-q > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}

.hp-q > summary::-webkit-details-marker {
  display: none;
}

.hp-q > summary::after {
  content: "";
  margin-left: auto;
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1.8px solid var(--faint);
  border-bottom: 1.8px solid var(--faint);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.hp-q[open] > summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.hp-q > summary::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

.hp-q .hp-a {
  padding: 0 14px 13px 30px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
  text-wrap: pretty;
}

.hp-q .hp-a p {
  margin: 0 0 8px;
}

/* ---------------- 结尾 ---------------- */
.hp-end {
  margin-top: 34px;
  padding: 24px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(520px 220px at 12% 0%, var(--accent-softer), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-md);
}

.hp-end h2 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.hp-end p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 56ch;
}

.hp-end-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  font-size: 13px;
}

.hp-end-links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--line-strong);
}

.hp-end-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------------- 窄屏 ---------------- */
@media (max-width: 1080px) {
  .help-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .help-rail {
    position: sticky;
    top: var(--nav-h);
    z-index: 12;
    max-height: none;
    margin: 0 -26px 18px;
    padding: 8px 26px 10px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .help-rail::-webkit-scrollbar {
    display: none;
  }

  .help-rail p,
  .help-rail .help-rail-back {
    display: none;
  }

  .help-rail .part {
    display: block;
    flex: none;
    margin: 0 2px 0 10px;
    font-size: 9.5px;
  }

  .help-rail .part + ol {
    margin-bottom: 0;
  }

  .help-rail ol {
    display: flex;
    gap: 6px;
    border-left: 0;
    flex: none;
  }

  .help-rail a {
    flex: none;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .help-rail a.is-here {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    background: var(--accent-soft);
  }

  .help-rail a.is-here::before {
    content: none;
  }
}

@media (max-width: 720px) {
  .help-main {
    padding: 18px 16px 72px;
  }

  .help-rail {
    margin: 0 -16px 16px;
    padding: 8px 16px 10px;
  }

  .hp-kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px 0;
  }

  .hp-kv dt {
    white-space: normal;
  }

  .hp-kv dd {
    margin-bottom: 9px;
  }

  .hp-mock {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  /* 三栏模型在手机上不该被挤到换行——给它一条能横着推的宽度 */
  .hp-mock-bar,
  .hp-mock-app {
    min-width: 520px;
  }

  .hp-mock-app {
    grid-template-columns: 92px 112px minmax(0, 1fr);
    height: 232px;
  }

  .hp-swipe {
    display: block;
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-style: normal;
    letter-spacing: 0.06em;
    color: var(--accent);
  }

  /* 182 格在手机上摊不开，把格子收小一点，正好一屏装完 */
  .hp-heat {
    gap: 3px;
  }

  .hp-heat i {
    width: 11px;
    height: 11px;
  }

  .hp-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  .hp-table td,
  .hp-table th {
    white-space: normal;
    min-width: 96px;
  }

  .hp-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px 10px 10px 3px;
  }

  .hp-badge svg {
    width: 19px;
    height: 19px;
  }
}

/* 打印：手册本身也该能印出来带走 */
@media print {
  .help-rail,
  .help-actions,
  .site-nav,
  .site-footer,
  .back-top {
    display: none !important;
  }

  .help-body {
    background: #fff;
  }

  .help-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-sec {
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .help-rail a,
  .hp-q > summary::after {
    transition: none;
  }
}
