/* 下载按钮：同 class 的系统感知按钮可由构建脚本复制。 */
.get-actions, .lede__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.get-actions > *, .plat-actions > * { min-width: 0; max-width: 100%; }
.get-actions .btn { overflow-wrap: anywhere; }
.get-note { margin: 14px 0 0; color: var(--sr-muted); font-size: 13.5px; }
.stagebox .get-note { color: var(--sr-on-dark-3); }
.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  max-width: 100%;
  padding: 10px 22px;
  border: 1px solid var(--sr-text);
  border-radius: var(--sr-r-mobile-note);
  background: var(--sr-text);
  color: var(--sr-on-dark);
  text-decoration: none;
  transition: transform var(--sr-fast) ease;
}
.store-button:hover { transform: translateY(-1px); text-decoration: none; }
.store-button svg { width: 27px; height: 30px; flex-shrink: 0; }
.store-button__copy { display: block; }
.store-button__small { display: block; font-size: 11px; line-height: 1.4; }
.store-button__title { display: block; font-size: 16px; line-height: 1.5; font-weight: 700; }
.store-button[aria-disabled="true"] { background: var(--sr-panel); color: var(--sr-muted); border-color: var(--sr-line); pointer-events: none; }
.store-guide { padding: 28px; border: 1px solid var(--sr-line); border-radius: var(--sr-r-note); background: var(--sr-panel); color: var(--sr-text); }
.store-guide__title { margin-top: 0; font-size: 24px; }
.store-guide__body { color: var(--sr-muted); }

/* tabs */
.tabs { min-width: 0; }
[role="tablist"] { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; }
[role="tab"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 20px;
  border: 1px solid var(--sr-line);
  border-radius: var(--sr-r-pill);
  background: var(--sr-bg);
  color: var(--sr-muted);
  font-weight: 600;
}
[role="tab"][aria-selected="true"] { background: var(--sr-lime); color: var(--sr-text); border-color: var(--sr-lime); }
[role="tabpanel"] { min-width: 0; padding: 28px; border-radius: var(--sr-r-note); background: var(--sr-panel); color: var(--sr-text); }
[role="tabpanel"] > :first-child { margin-top: 0; }
.tabs--vertical { display: grid; grid-template-columns: minmax(180px, 0.6fr) minmax(0, 2fr); gap: 24px; }
.tabs--vertical [role="tablist"] { display: flex; flex-direction: column; align-items: stretch; justify-content: start; margin: 0; }
.tabs--vertical [role="tab"] { justify-content: flex-start; text-align: left; }

/* 目录应直接置于覆盖全部章节的父容器内 */
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border: 1px solid var(--sr-line); border-radius: var(--sr-r-note); background: var(--sr-bg); color: var(--sr-text); margin-bottom: 32px; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 14px; border-radius: var(--sr-r-pill); color: var(--sr-muted); text-decoration: none; }
.toc a:hover, .toc a[aria-current] { background: var(--sr-lime); color: var(--sr-text); }
.toc--sticky { position: sticky; top: 12px; z-index: 10; }
.toc--static { position: static; }

/* 原生折叠 */
.faq-list { border: 1px solid var(--sr-line); border-radius: var(--sr-r-note); background: var(--sr-bg); color: var(--sr-text); }
.faq-item + .faq-item { border-top: 1px solid var(--sr-line); }
.faq-item summary { position: relative; min-height: 64px; padding: 20px 56px 20px 24px; font-weight: 700; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; top: 17px; right: 24px; color: var(--sr-olive); font-size: 22px; }
.faq-item[open] summary::after { content: "−"; }
.faq-item__body { padding: 0 24px 24px; color: var(--sr-muted); }
.faq-item__body > :first-child { margin-top: 0; }
.faq-item__body > :last-child { margin-bottom: 0; }

/* 术语、事实、文章 */
.term-card { padding: 28px; border: 1px solid var(--sr-line); border-radius: var(--sr-r-note); background: var(--sr-bg); color: var(--sr-text); box-shadow: var(--sr-shadow-card); }
.term-card__name { margin: 12px 0; font-size: 24px; }
.term-card__body { color: var(--sr-muted); }
.term-card__foot { padding-top: 16px; border-top: 1px solid var(--sr-line); font-family: var(--sr-font-mono); font-size: 13px; overflow-wrap: anywhere; }
.fact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0; list-style: none; }
.fact-pill, .badge { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 6px 12px; border: 1px solid var(--sr-line); border-radius: var(--sr-r-pill); background: var(--sr-panel); color: var(--sr-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.badge--lime { background: var(--sr-lime); color: var(--sr-text); border-color: var(--sr-lime); }
.badge--dark { background: var(--sr-text); color: var(--sr-on-dark); border-color: var(--sr-text); }
.badge__dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--sr-r-round); background: var(--sr-olive); color: var(--sr-on-dark); }
.stagebox .fact-pill { background: var(--sr-on-dark-fill); color: var(--sr-on-dark); border-color: var(--sr-price-line); }
.article-card { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px; border: 1px solid var(--sr-line); border-radius: var(--sr-r-note); background: var(--sr-bg); color: var(--sr-text); box-shadow: var(--sr-shadow-card); }
.article-card__title { margin: 0; font-size: 23px; line-height: 1.4; }
.article-card__title a { color: var(--sr-text); text-decoration: none; }
.article-card__title a:hover { color: var(--sr-olive); }
.article-card__summary { margin: 0; color: var(--sr-muted); }
.article-card__link { margin-top: auto; font-weight: 600; }
.callout { margin: 24px 0; padding: 24px; border: 1px solid var(--sr-line); border-left: 4px solid var(--sr-olive); border-radius: var(--sr-r-small); background: var(--sr-panel); color: var(--sr-text); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--sr-warn); }
.callout--error { border-left-color: var(--sr-err); }
.callout--success { border-left-color: var(--sr-ok); }

/* 五个平台卡 */
.plat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.plat-card { position: relative; min-width: 0; padding: 36px 28px 28px; border: 1px solid var(--sr-line); border-radius: var(--sr-r-note); background: var(--sr-panel); color: var(--sr-text); }
.plat-card h3 { margin: 12px 0; font-size: 26px; }
.plat-card p { color: var(--sr-muted); }
.plat-card__icon { width: 30px; height: 30px; color: var(--sr-text); }
.plat-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; }
.plat-card::before { display: none; content: attr(data-mine); position: absolute; top: 12px; right: 16px; padding: 3px 10px; border-radius: var(--sr-r-pill); background: var(--sr-lime); color: var(--sr-text); font-size: 11px; font-weight: 700; }
html[data-visitor-os="ios"] .plat-card[data-plat="ios"] { order: -1; }
html[data-visitor-os="mac"] .plat-card[data-plat="mac"] { order: -1; }
html[data-visitor-os="windows"] .plat-card[data-plat="windows"] { order: -1; }
html[data-visitor-os="android"] .plat-card[data-plat="android"] { order: -1; }
html[data-visitor-os="linux"] .plat-card[data-plat="linux"] { order: -1; }
html[data-visitor-os="ios"] .plat-card[data-plat="ios"]::before,
html[data-visitor-os="mac"] .plat-card[data-plat="mac"]::before,
html[data-visitor-os="windows"] .plat-card[data-plat="windows"]::before,
html[data-visitor-os="android"] .plat-card[data-plat="android"]::before,
html[data-visitor-os="linux"] .plat-card[data-plat="linux"]::before { display: block; }
.wx-open-tip { position: fixed; z-index: 150; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 32px)); padding: 20px 24px; border: 1px solid var(--sr-line); border-radius: var(--sr-r-note); background: var(--sr-bg); color: var(--sr-text); box-shadow: var(--sr-shadow-menu); font-size: 14px; }

/* 官方截图的图像不锁比例、不做手机壳。 */
.shot-row { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: 32px; }
.official-shot { width: 100%; max-width: 280px; flex-shrink: 0; margin: 0 auto; padding: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--sr-r-mark); }
.official-shot img { border-radius: 10px; }
.official-shot { border: 1px solid var(--sr-line); border-radius: var(--sr-r-mark); background: var(--sr-bg); color: var(--sr-muted); }
.official-shot figcaption { padding-top: 12px; padding-bottom: 12px; text-align: center; font-size: 13px; }
.shot-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334; border-radius: var(--sr-r-mark); background: var(--sr-panel); color: var(--sr-muted); text-align: center; font-size: 13px; }
.device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.device-entry { display: flex; align-items: center; gap: 20px; padding: 28px; border: 1px solid var(--sr-line); border-radius: var(--sr-r-note); background: var(--sr-bg); color: var(--sr-text); box-shadow: var(--sr-shadow-card); text-decoration: none; }
.device-entry__icon { width: 40px; height: 48px; color: var(--sr-olive); }
.device-entry__name { display: block; font-size: 20px; font-weight: 800; }
.device-entry__note { display: block; margin-top: 6px; font-size: 14px; color: var(--sr-muted); }

/* 表格与正文裸表格的双层兜底 */
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--sr-line); border-radius: var(--sr-r-small); }
.data-table { width: 100%; border-collapse: collapse; color: var(--sr-text); }
.data-table th, .data-table td,
.prose table th, .prose table td {
  min-width: 7em;
  padding: 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--sr-line);
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th { background: var(--sr-panel); color: var(--sr-text); font-weight: 700; }
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; }
.data-table tr:last-child td { border-bottom: 0; }
#install table code { word-break: normal; }
.dl-fab { position: fixed; z-index: 30; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 14px 22px; border: 1px solid var(--sr-lime); border-radius: var(--sr-r-pill); background: var(--sr-lime); color: var(--sr-text); font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: var(--sr-shadow-card); }
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; }

/* 设计验收页家具 */
.preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.swatch { min-height: 120px; padding: 20px; border: 1px solid var(--sr-line); border-radius: var(--sr-r-note); background: var(--sr-bg); color: var(--sr-text); }
.swatch code { display: block; }
.swatch--bg { background: var(--sr-bg); color: var(--sr-text); }
.swatch--panel { background: var(--sr-panel); color: var(--sr-text); }
.swatch--warm { background: var(--sr-ink-warm); color: var(--sr-on-dark); }
.swatch--line { background: var(--sr-line); color: var(--sr-text); }
.swatch--strong { background: var(--sr-line-strong); color: var(--sr-text); }
.swatch--lime { background: var(--sr-lime); color: var(--sr-text); }
.swatch--olive { background: var(--sr-olive); color: var(--sr-on-dark); }
.swatch--text { background: var(--sr-text); color: var(--sr-on-dark); }
.swatch--muted { background: var(--sr-muted); color: var(--sr-on-dark); }
.swatch--ok { border-top: 12px solid var(--sr-ok); }
.swatch--warn { border-top: 12px solid var(--sr-warn); }
.swatch--err { border-top: 12px solid var(--sr-err); }
.swatch--amber { background: var(--sr-amber); color: var(--sr-on-dark); }
.swatch--phone { background: var(--sr-phone); color: var(--sr-on-dark); }
.swatch--screen { background: var(--sr-screen-b); color: var(--sr-on-dark); }
.swatch--island { background: var(--sr-island); color: var(--sr-on-dark); }
.preview-type-title { font-size: var(--sr-h1); margin-top: 0; }
.preview-button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.preview-dark { padding: 28px; border-radius: var(--sr-r-note); background: var(--sr-ink-warm); color: var(--sr-on-dark); }
.preview-fab { position: static; }
.preview-token-list { columns: 2; column-gap: 32px; padding-left: 20px; }
.preview-token-list li { break-inside: avoid; margin-bottom: 8px; }
@media (max-width: 860px) {
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs--vertical { grid-template-columns: minmax(0, 1fr); }
  .tabs--vertical [role="tablist"] { flex-direction: row; flex-wrap: wrap; }
  .get-actions, .lede__cta { margin-top: 24px; }
}
@media (max-width: 640px) {
  .plat-grid, .device-grid { grid-template-columns: minmax(0, 1fr); }
  .shot-row { flex-direction: column; align-items: center; }
  .fact-row { justify-content: center; }
  .plat-card, .term-card, .article-card, .store-guide { padding: 28px 24px; }
  .device-entry { padding: 24px; gap: 16px; }
  .get-actions { gap: 10px; }
  .preview-token-list { columns: 1; }
  [role="tabpanel"] { padding: 24px; }
  .toc { gap: 4px; padding: 10px; }
  .dl-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 52px; height: 52px; min-height: 52px; padding: 0; border-radius: var(--sr-r-round); }
  .dl-fab__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #install table, #install table tbody, #install table tr, #install table td { display: block; width: 100%; min-width: 0; }
  #install table thead { display: none; }
  #install table tr { border-bottom: 1px solid var(--sr-line); }
  #install table td { border-bottom: 0; }
  #install table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; font-weight: 700; color: var(--sr-muted); }
  #install table code { display: block; max-width: 100%; overflow-x: auto; white-space: pre; overflow-wrap: normal; word-break: normal; padding-top: 4px; padding-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .store-button { transition: none; }
}