/* 共享内容组件；正文容器请使用 .prose。 */
.prose { min-width: 0; max-width: 820px; line-height: 1.9; }
.prose > * + * { margin-top: 1.35em; }
.prose h2 { margin-top: 2.2em; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.7em; scroll-margin-top: 90px; }
.prose a:not(.btn):not(.store-button) { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.5em; list-style: revert; }
.prose li + li { margin-top: .5em; }
.prose pre { padding: 20px; border-radius: 16px; background: var(--bg-panel2); color: var(--ink-on-dark); }
.prose :not(pre) > code { padding: .1em .3em; border-radius: 5px; background: var(--bg-panel); color: var(--text); }
.callout { padding: 22px 26px; border-left: 3px solid var(--accent-dark); border-radius: 0 16px 16px 0; background: var(--bg-panel); color: var(--text); }
.callout strong { color: var(--text); }

/* 内页商店直达按钮：路径仅由使用该组件的页面填写。 */
.store-button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 54px; padding: 10px 23px; border: 1px solid var(--bg-panel2); border-radius: var(--radius-pill); background: var(--bg-panel2); color: var(--ink-on-dark); font-size: 15px; font-weight: 600; box-shadow: var(--shadow-pill); transition: transform .2s ease, background-color .2s ease; }
.store-button:hover { background: var(--device-rim); color: var(--ink-on-dark); transform: translateY(-2px); }
.store-button svg { width: 20px; height: 20px; flex-shrink: 0; }
.store-button-copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.store-button-copy small { font-size: 11px; font-weight: 400; }
.store-button-copy strong { font-size: 15px; }
.fact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.fact-chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 34px; padding: 6px 13px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg-panel); color: var(--text); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.fact-chip svg { width: 16px; height: 16px; margin-right: 6px; }

/* 左衬线目录 / 右深墨板。较窄视口逐项展开为手风琴。 */
.feature-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; align-items: stretch; }
.feature-tabs { display: flex; flex-direction: column; align-items: stretch; gap: 7px; }
.feature-tab { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; min-height: 64px; padding: 9px 16px 9px 22px; border: 0; background: transparent; color: var(--text-muted); text-align: left; font-family: var(--font-display); font-size: 28px; font-weight: 400; }
.feature-tab::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: var(--radius-pill); background: transparent; }
.feature-tab[aria-selected="true"] { color: var(--text); }
.feature-tab[aria-selected="true"]::before { background: var(--accent); }
.tab-number { display: inline-grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border: 1px solid var(--accent-dark); border-radius: 50%; color: var(--accent-dark); font: 12px var(--font-mono); }
.feature-panels { min-width: 0; }
.feature-panel { min-width: 0; min-height: 360px; padding: clamp(26px, 4vw, 48px); border-radius: var(--radius-card); background: var(--bg-panel2); color: var(--ink-on-dark); }
.feature-panel[hidden] { display: none; }
.feature-panel h3 { font-family: var(--font-display); font-size: 30px; font-weight: 400; }
.feature-panel p { margin-top: 20px; color: var(--ink-dim-on-dark); line-height: 1.85; }
.feature-panel pre { max-width: 100%; margin-top: 28px; padding: 17px; overflow-x: auto; border: 1px solid var(--line-on-dark-strong); border-radius: 14px; background: var(--device); color: var(--ink-on-dark); font-size: 12px; }
.syntax-proxy { color: var(--accent); }
.syntax-direct { color: var(--success); }
.syntax-reject { color: var(--error); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 18px; background: var(--bg-panel); color: var(--text); }
.toc a { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 12px; border-radius: 10px; color: var(--text); font-size: 13px; }
.toc a:hover, .toc a[aria-current="location"] { background: var(--bg); color: var(--accent-dark); }
.toc-static { position: static !important; }
.long-content { min-width: 0; }
.long-content > .toc { position: sticky; top: 10px; z-index: 5; }
/* 只有在 .toc 的直接父级包含全部章节时，才使用 .long-content。 */

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { min-height: 62px; padding: 19px 38px 19px 0; position: relative; cursor: pointer; color: var(--text); font-weight: 600; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 17px; color: var(--accent-dark); font: 25px var(--font-display); }
.faq-item[open] summary::after { content: "−"; }
.faq-item > :not(summary) { margin-bottom: 22px; color: var(--text-muted); }

.glossary-card { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-badge); }
.glossary-card dt { font-family: var(--font-mono); font-size: 16px; font-weight: 600; }
.glossary-card dd { margin: 12px 0 0; color: var(--text-muted); line-height: 1.8; }
.device-grid, .article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.device-card { display: flex; align-items: flex-start; gap: 22px; min-width: 0; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-badge); }
.device-card:hover, .article-card:hover { border-color: var(--accent); }
.device-card svg { width: 42px; height: 42px; flex-shrink: 0; }
.device-card h3 { font-family: var(--font-display); font-size: 25px; font-weight: 400; }
.device-card p { margin-top: 7px; color: var(--text-muted); font-size: 14px; }
.device-card .text-link { display: inline-block; margin-top: 18px; color: var(--accent-dark); font-weight: 600; }
.article-card { display: flex; flex-direction: column; min-width: 0; padding: 27px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-badge); }
.article-card h3 { margin-top: 16px; font-family: var(--font-display); font-size: 23px; font-weight: 400; }
.article-card p { margin-top: 12px; color: var(--text-muted); font-size: 14px; }
.article-card .text-link { margin-top: auto; padding-top: 22px; color: var(--accent-dark); font-size: 14px; font-weight: 600; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--text-muted); font: 12px var(--font-mono); }
.article-tag { padding: 3px 9px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg-panel); color: var(--text); font-family: var(--font-body); }

/* 官方原图直接展示；不替图片规定裁切尺寸。 */
.official-shot { width: min(100%, 280px); max-width: 280px; flex-shrink: 0; margin-inline: auto; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: 10px; }
.official-shot figcaption { margin-top: 10px; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.shot-layout { display: flex; align-items: flex-start; gap: 32px; }
.shot-layout > * { min-width: 0; }
.shot-placeholder { width: 100%; aspect-ratio: 750 / 1334; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-panel); color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }

/* 包裹容器横滑；对嵌套在正文任意深度的裸表格也兜底。 */
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table, .prose table { width: 100%; border-collapse: collapse; color: var(--text); font-size: 14px; }
.prose table { display: block; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table th, .data-table td, .prose table th, .prose table td { min-width: 7em; padding: 12px 17px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; overflow-wrap: normal; word-break: normal; }
.data-table th, .prose table th { background: var(--bg-panel); color: var(--text); font-weight: 600; }
.data-table td, .prose table td { background: var(--bg); color: var(--text); }
.data-table code, .prose table code { overflow-wrap: anywhere; }

/* 正文收尾引导与文章专用浮层。非文章主页面不要放浮层。 */
.end-store-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-badge); }
.end-store-card p { margin-top: 7px; color: var(--text-muted); }
.dl-fab { position: fixed; z-index: 20; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 36px); min-height: 52px; padding: 10px 18px; border: 1px solid var(--bg-panel2); border-radius: var(--radius-pill); background: var(--bg-panel2); color: var(--ink-on-dark); box-shadow: var(--shadow-float); font-size: 13px; font-weight: 600; }
.dl-fab:hover { background: var(--device-rim); color: var(--ink-on-dark); }
.dl-fab svg { width: 18px; height: 18px; }
@media (max-width: 768px) {
  .feature-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .feature-tabs { gap: 0; }
  .feature-tab { font-size: 23px; }
  .feature-panel { min-height: 0; }
  .feature-accordion [role="tablist"] { display: contents; }
  .feature-accordion .feature-layout { display: block; }
  .feature-accordion .feature-tabs, .feature-accordion .feature-panels { display: contents; }
  .feature-accordion .feature-tab { margin-top: 10px; }
  .feature-accordion .feature-panel { margin-bottom: 12px; }
  .shot-layout { flex-direction: column; }
}
@media (max-width: 640px) {
  .device-grid, .article-grid { grid-template-columns: minmax(0, 1fr); }
  .device-card { padding: 22px; }
  .fact-row { flex-direction: row; flex-wrap: wrap; }
  .toc { gap: 3px; }
  .end-store-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .store-button { transition: none; }
}