/* ==========================================================================
   羽镜世界 · 使用手册样式（manual）
   依赖 base.css。左侧固定目录 + 右侧内容流，移动端目录折叠为顶部抽屉。
   ========================================================================== */

.manual { padding: calc(var(--nav-h) + 46px) 0 90px; }
.manual__layout {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 54px;
  align-items: start;
}

/* ---------- 目录侧栏 ---------- */
.toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}
.toc::-webkit-scrollbar { width: 4px; }
.toc::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.toc__title {
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-bottom: 14px;
}
.toc__search {
  width: 100%;
  height: 38px;
  margin-bottom: 18px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color .25s;
}
.toc__search::placeholder { color: var(--text-3); }
.toc__search:focus { border-color: var(--line); }

.toc__group { margin-bottom: 6px; }
.toc__group > a {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  border-left: 2px solid transparent;
  transition: color .2s, background .2s, border-color .2s;
}
.toc__group > a:hover { color: var(--text); background: var(--surface); }
.toc__group.is-active > a {
  color: var(--gold-lt);
  border-left-color: var(--gold);
  background: rgba(201, 162, 39, .07);
}
.toc__sub { padding: 2px 0 6px 14px; }
.toc__sub a {
  display: block;
  padding: 4px 10px;
  font-size: 12.5px;
  color: var(--text-3);
  border-radius: 6px;
  transition: color .2s;
}
.toc__sub a:hover { color: var(--gold-lt); }

/* ---------- 内容区 ---------- */
.doc { min-width: 0; }
.doc__hero { margin-bottom: 46px; }
.doc__hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -.018em;
  margin-bottom: 16px;
}
.doc__hero p { font-size: 15.5px; color: var(--text-2); line-height: 1.9; max-width: 700px; }
.doc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.chapter { padding-top: 30px; margin-bottom: 58px; scroll-margin-top: calc(var(--nav-h) + 26px); }
.chapter__no {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.chapter > h2 {
  font-size: clamp(22px, 2.8vw, 29px);
  font-weight: 800;
  padding-bottom: 16px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line-2);
}
.chapter h3 {
  font-size: 17.5px;
  font-weight: 700;
  margin: 34px 0 14px;
  scroll-margin-top: calc(var(--nav-h) + 26px);
}
.chapter h3::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 15px;
  margin-right: 10px;
  vertical-align: -1px;
  border-radius: 2px;
  background: var(--grad-gold);
}
.chapter h4 { font-size: 15px; font-weight: 700; margin: 24px 0 10px; color: var(--gold-lt); }
.chapter p { font-size: 14.5px; line-height: 1.95; color: var(--text-2); margin-bottom: 14px; }
.chapter b, .chapter strong { color: var(--text); font-weight: 600; }

.chapter ul.doclist { margin: 0 0 16px; display: grid; gap: 9px; }
.chapter ul.doclist li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-2);
}
.chapter ul.doclist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--grad-gold);
}

.chapter ol.docstep { counter-reset: s; margin: 0 0 16px; display: grid; gap: 12px; }
.chapter ol.docstep li {
  counter-increment: s;
  position: relative;
  padding-left: 38px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-2);
}
.chapter ol.docstep li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--grad-gold-soft);
  color: var(--gold-lt);
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 700;
}

/* ---------- 表格 ---------- */
.doc .dtable { width: 100%; border-collapse: collapse; margin: 6px 0 20px; font-size: 13.5px; }
.doc .dtable th, .doc .dtable td {
  padding: 11px 13px;
  text-align: left;
  border: 1px solid var(--line-2);
  vertical-align: top;
}
.doc .dtable th { background: rgba(201, 162, 39, .07); color: var(--gold-lt); font-weight: 600; font-size: 13px; }
.doc .dtable td { color: var(--text-2); line-height: 1.75; }
.doc .dtable td:first-child { color: var(--text); font-weight: 600; }

/* ---------- 键位 / 路径 ---------- */
kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-2);
  font-size: 12px;
  color: var(--text);
}
.path {
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(111, 168, 200, .1);
  color: #9ccbe4;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12.5px;
  word-break: break-all;
}

/* ---------- 章节底部上下页 ---------- */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line-2);
}
.pager a {
  font-size: 13.5px;
  color: var(--text-2);
  transition: color .2s;
}
.pager a:hover { color: var(--gold-lt); }

/* ---------- 移动端目录 ---------- */
.toc__toggle {
  display: none;
  width: 100%;
  height: 44px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--gold-lt);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 1000px) {
  .manual__layout { grid-template-columns: 1fr; gap: 26px; }
  .toc {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 18px;
  }
  .toc__toggle { display: block; margin-bottom: 0; }
  .toc.is-open .toc__toggle { margin-bottom: 20px; }
  .toc__body { display: none; }
  .toc.is-open .toc__body { display: block; }
}
@media (max-width: 720px) {
  .manual { padding-top: calc(var(--nav-h) + 26px); }
  .doc .dtable { font-size: 12.5px; }
  .doc .dtable th, .doc .dtable td { padding: 9px 10px; }
}
