/* 纵向能力清单 + 深青演示区 */
.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: var(--space-9);
  align-items: stretch;
}
.feature-layout > *, .feature-tab-slot { min-width: 0; }
.feature-tablist { display: flex; flex-direction: column; min-width: 0; }
.feature-tab {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  min-height: 82px;
  padding: var(--space-4);
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--transparent);
  color: var(--text);
  font-size: var(--text-base);
  text-align: left;
}
.feature-tab::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--transparent); color: var(--text); }
.feature-tab:hover { background: var(--bg-panel); color: var(--text); }
.feature-tab[aria-selected="true"] { background: var(--bg-panel); color: var(--text); }
.feature-tab[aria-selected="true"]::before { background: var(--accent); color: var(--on-dark); }
.feature-tab__icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--accent-dark); flex-shrink: 0; }
.feature-tab__icon svg { width: 17px; height: 17px; }
.feature-tab__name { font-weight: var(--weight-medium); }
.feature-tab__hint { font-size: var(--text-xs); color: var(--text-muted); }
.feature-panels { min-width: 0; }
.feature-panel {
  min-width: 0;
  min-height: 492px;
  height: 100%;
  display: flex;
  align-items: center;
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  background: var(--bg-panel-2);
  color: var(--on-dark);
}
.feature-panel__card { width: 100%; min-width: 0; padding: var(--space-7); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-card); }
.feature-panel__card > :last-child { margin-bottom: 0; }
.feature-panel__card p { color: var(--text-muted); line-height: 1.85; }
.feature-panel__card pre { margin-top: 0; padding: var(--space-4); }
.tabs-strip { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-6); }
.tabs-strip [role="tab"] { min-height: 48px; padding: 12px 18px; border: 1px solid var(--border); border-radius: var(--radius-btn); background: var(--bg-panel); color: var(--text); }
.tabs-strip [role="tab"][aria-selected="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-dark); }
.tab-panel { min-width: 0; }

/* 长页目录：默认不吸顶，不依赖祖先高度。 */
.toc {
  max-width: 100%;
  min-width: 0;
  margin-block: var(--space-7);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  color: var(--text);
}
.toc__label { margin: 0 0 var(--space-3); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.toc ul { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0; padding: 0; list-style: none; }
.toc li { min-width: 0; margin: 0; }
.toc a { display: block; padding-block: 8px; font-size: var(--text-sm); }
.toc--rail ul { display: block; }
.toc--rail a { padding: 10px var(--space-3); border-left: 2px solid var(--border); color: var(--text-muted); text-decoration: none; }
.toc--rail a:hover, .toc--rail a[aria-current="location"] { border-left-color: var(--accent); color: var(--accent-dark); }

/* FAQ 与分组条目 */
.faq-group { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); }
.faq { padding-inline: var(--space-6); }
.faq + .faq { border-top: 1px solid var(--border); }
.faq summary { position: relative; min-height: 64px; padding: 20px 28px 20px 0; list-style: none; cursor: pointer; font-weight: var(--weight-medium); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 17px; color: var(--accent-dark); font-size: 22px; font-weight: var(--weight-regular); }
.faq[open] summary::after { content: "−"; }
.faq__body { padding-bottom: var(--space-6); color: var(--text-muted); }
.faq__body > :last-child { margin-bottom: 0; }
.group-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); }
.group-list li { margin: 0; }
.group-list li + li { border-top: 1px solid var(--border); }
.group-list a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; padding: var(--space-4) var(--space-5); color: var(--text); text-decoration: none; }
.group-list a::after { content: "›"; color: var(--accent-dark); flex-shrink: 0; }
.term-card { min-width: 0; padding: var(--space-7); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); }
.term-card__category { display: block; margin-bottom: var(--space-3); color: var(--accent-dark); font-size: var(--text-xs); }
.term-card h3 { font-family: var(--font-mono); font-size: var(--text-lead); overflow-wrap: anywhere; }
.term-card p { margin-bottom: 0; color: var(--text-muted); }
.term-card code { display: inline; }

/* 自绘按钮，不使用商店徽章图片。 */
.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 56px;
  max-width: 100%;
  padding: 10px 22px;
  border: 1px solid var(--transparent);
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: var(--on-dark);
  text-decoration: none;
}
.app-store-button:hover, .app-store-button.is-hover { background: var(--accent-dark); color: var(--on-dark); }
.app-store-button:active, .app-store-button.is-active { background: var(--accent-ink); color: var(--on-dark); }
.app-store-button svg { width: 24px; height: 28px; flex: none; }
.app-store-button__copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.app-store-button__copy small { font-size: 11px; }
.app-store-button__copy strong { font-size: var(--text-base); font-weight: var(--weight-medium); }
.app-store-button--primary { min-height: 64px; padding: 12px 28px; box-shadow: var(--shadow-soft); }
.app-store-button[aria-disabled="true"] { background: var(--bg); color: var(--text-muted); border-color: var(--border); cursor: not-allowed; }
.fact-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-6) 0; padding: 0; list-style: none; }
.fact-row li, .fact-pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.fact-row strong { color: var(--text); font-weight: var(--weight-medium); }
.badge { background: var(--accent-tint); color: var(--accent-dark); border-color: var(--transparent); }
.badge--success { color: var(--success-ink); background: var(--bg-panel); border-color: var(--border); }
.badge--warn { color: var(--warn-ink); background: var(--bg-panel); border-color: var(--border); }
.badge--error { color: var(--error-ink); background: var(--bg-panel); border-color: var(--border); }
.status-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--radius-circle); background: var(--accent); color: var(--on-dark); }
.badge--success .status-dot { background: var(--success); color: var(--text); }
.protocol-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block: var(--space-5); }
.protocol-row .badge { font-family: var(--font-mono); }

/* 官方截图：figure 无内边距，img 不锁比例、不添加画框。 */
.official-shot { width: 100%; max-width: 280px; margin-inline: auto; flex-shrink: 0; min-width: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--radius-shot); }
.official-shot { outline: 1px solid var(--border); outline-offset: -1px; border-radius: var(--radius-shot); }
.official-shot figcaption { margin-top: var(--space-3); font-size: var(--text-xs); line-height: 1.7; color: var(--text-muted); }
.shot-with-copy { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: var(--space-9); }
.shot-with-copy > * { min-width: 0; }

/* 两种主要设备入口 */
.device-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
  padding: var(--space-7);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  color: var(--text);
  text-decoration: none;
}
.device-card:hover { border-color: var(--accent); color: var(--text); }
.device-card__icon { display: flex; align-items: center; justify-content: center; width: 64px; height: 76px; border-radius: var(--radius-btn); background: var(--accent-tint); color: var(--accent-dark); }
.device-card__icon svg { width: 42px; height: 54px; }
.device-card h3 { margin-bottom: var(--space-2); }
.device-card p { margin-bottom: var(--space-4); color: var(--text-muted); font-size: var(--text-sm); }
.device-card__link { color: var(--accent-dark); font-size: var(--text-sm); }
.article-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: var(--space-7);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  color: var(--text);
}
.article-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-6); color: var(--text-muted); font-size: var(--text-xs); }
.article-card h3 { font-size: 22px; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-dark); }
.article-card p { color: var(--text-muted); font-size: var(--text-sm); }
.article-card__link { margin-top: auto; font-size: var(--text-sm); }
.callout {
  margin: var(--space-7) 0;
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-btn);
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.callout > :last-child { margin-bottom: 0; }
.callout__title { display: block; margin-bottom: var(--space-2); font-weight: var(--weight-medium); }
.article-store-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  margin-top: var(--space-10);
  padding: var(--space-7);
  border-radius: var(--radius-card);
  background: var(--bg-panel-2);
  color: var(--on-dark);
}
.article-store-card > div { min-width: 0; }
.article-store-card h2 { font-size: 24px; margin-bottom: var(--space-2); }
.article-store-card p { color: var(--on-dark-72); margin-bottom: 0; }
.article-store-card .button { flex-shrink: 0; }

/* 表格优先保持可读列宽，由容器负责横向滚动。 */
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-btn); }
.data-table { width: 100%; border-collapse: collapse; background: var(--bg-panel); color: var(--text); font-size: var(--text-sm); }
.data-table th, .data-table td,
.prose th, .prose td,
.article-body th, .article-body td,
.manual-body th, .manual-body td {
  min-width: 7em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose th, .article-body th, .manual-body th { background: var(--bg); color: var(--text); font-weight: var(--weight-medium); }
.prose table, .article-body table, .manual-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  background: var(--bg-panel);
  color: var(--text);
}
.data-table td code, .prose td code, .article-body td code, .manual-body td code { overflow-wrap: anywhere; }

/* 本站所有页面常驻。由 footer.js 幂等补入。 */
.dl-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  min-height: 44px;
  max-width: calc(100% - 32px);
  padding: 0 18px 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}
.dl-fab svg { width: 15px; height: 15px; margin-top: -2px; flex-shrink: 0; }
.dl-fab:hover { color: var(--accent-dark); }

/* 仅设计预览使用，不为正式截图 img 设置比例。 */
.preview-block { margin-top: var(--section-gap); }
.preview-block > h2 { margin-bottom: var(--space-7); }
.preview-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.preview-swatch { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-btn); background: var(--bg-panel); color: var(--text); overflow: hidden; }
.preview-swatch__paint { display: block; height: 64px; border-bottom: 1px solid var(--border); }
.preview-swatch code { display: block; padding: var(--space-3); background: var(--bg-panel); color: var(--text-muted); border-radius: 0; font-size: 11px; }
.swatch-bg { background: var(--bg); }
.swatch-panel { background: var(--bg-panel); }
.swatch-deep { background: var(--bg-panel-2); }
.swatch-border { background: var(--border); }
.swatch-accent { background: var(--accent); }
.swatch-accent-dark { background: var(--accent-dark); }
.swatch-soft { background: var(--accent-soft); }
.swatch-soft-hover { background: var(--accent-soft-hover); }
.swatch-accent-ink { background: var(--accent-ink); }
.swatch-tint { background: var(--accent-tint); }
.swatch-text { background: var(--text); }
.swatch-muted { background: var(--text-muted); }
.swatch-success { background: var(--success); }
.swatch-warn { background: var(--warn); }
.swatch-error { background: var(--error); }
.swatch-success-ink { background: var(--success-ink); }
.swatch-warn-ink { background: var(--warn-ink); }
.swatch-error-ink { background: var(--error-ink); }
.swatch-white { background: var(--on-dark); }
.swatch-white72 { background: linear-gradient(var(--on-dark-72), var(--on-dark-72)), var(--bg-panel-2); }
.swatch-white62 { background: linear-gradient(var(--on-dark-62), var(--on-dark-62)), var(--bg-panel-2); }
.swatch-white48 { background: linear-gradient(var(--on-dark-48), var(--on-dark-48)), var(--bg-panel-2); }
.swatch-line { background: linear-gradient(var(--line-dark), var(--line-dark)), var(--bg-panel-2); }
.swatch-line-strong { background: linear-gradient(var(--line-dark-strong), var(--line-dark-strong)), var(--bg-panel-2); }
.swatch-canvas1 { background: var(--canvas-1); }
.swatch-canvas2 { background: var(--canvas-2); }
.swatch-canvas3 { background: var(--canvas-3); }
.swatch-canvas4 { background: var(--canvas-4); }
.swatch-canvas5 { background: var(--canvas-5); }
.swatch-alu-hi { background: var(--alu-hi); }
.swatch-alu-mid { background: var(--alu-mid); }
.swatch-alu-lo { background: var(--alu-lo); }
.swatch-bezel { background: var(--bezel); }
.swatch-camera { background: var(--camera); }
.swatch-camera-ring { background: var(--camera-ring); }
.swatch-doc { background: var(--doc); }
.swatch-doc-line { background: var(--doc-line); }
.swatch-floor { background: linear-gradient(var(--floor-shadow), var(--floor-shadow)), var(--bg); }
.swatch-veil { background: linear-gradient(var(--veil), var(--veil)), var(--bg); }
.swatch-transparent { background: var(--transparent); }
.preview-shot {
  width: 100%;
  aspect-ratio: 750 / 1334;
  display: grid;
  place-content: center;
  gap: var(--space-3);
  border-radius: var(--radius-shot);
  background: var(--bg);
  color: var(--text-muted);
  text-align: center;
}
.preview-shot span { display: block; }
.preview-title { font-size: clamp(34px, 3.4vw, 48px); line-height: 1.14; letter-spacing: var(--heading-tracking-cjk); font-weight: var(--weight-regular); }
.preview-shadow-soft { box-shadow: var(--shadow-soft); }
.preview-shadow-card { box-shadow: var(--shadow-card); }
.preview-shadow-device { box-shadow: var(--shadow-device); }
.preview-type-row { padding-block: var(--space-5); border-bottom: 1px solid var(--border); }
.preview-type-row > :last-child { margin-bottom: 0; }

@media (max-width: 960px) {
  .feature-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .feature-panel { min-height: 0; height: auto; margin-block: var(--space-3); padding: var(--space-6); }
  .feature-panels:empty { display: none; }
  .feature-tab { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr); }
  .shot-with-copy { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .feature-tab { padding-inline: var(--space-3); gap: var(--space-3); grid-template-columns: 28px minmax(0, 1.1fr) minmax(0, 1fr); font-size: var(--text-sm); }
  .feature-tab__hint { font-size: 12px; }
  .feature-panel { padding: var(--space-4); }
  .feature-panel__card { padding: var(--space-5); }
  .feature-panel__card pre { padding: var(--space-3); font-size: 12px; }
  .fact-row { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .fact-row li { padding: 6px 9px; font-size: 12px; }
  .device-card { grid-template-columns: 48px minmax(0, 1fr); padding: var(--space-6); gap: var(--space-4); }
  .device-card__icon { width: 48px; height: 64px; }
  .device-card__icon svg { width: 32px; height: 44px; }
  .article-store-card { flex-direction: column; align-items: stretch; padding: var(--space-6); }
  .official-shot { width: 100%; max-width: 280px; }
  .preview-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-title { font-size: 30px; }
  .dl-fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
}