/* 能力药丸：加号是 tab 的装饰子元素，不嵌套第二个按钮。 */
.tabs { min-width: 0; }
.feature-tabs, .tab-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 4px;
}
.feature-tab, .tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  max-width: 100%;
  padding: 10px 14px 10px 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-nav);
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease);
}
.feature-tab:hover, .tab-button:hover { background: var(--bg-panel); color: var(--text); }
.feature-tab[aria-selected="true"], .tab-button[aria-selected="true"] { background: var(--bg-panel); color: var(--text); }
.feature-icon { width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: var(--line); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.icon-sky { fill: var(--sky); }
.icon-sun { fill: var(--sun); }
.icon-lilac { fill: var(--lilac); }
.icon-green { fill: var(--accent); stroke: var(--accent-dark); }
.tab-plus {
  display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--r-circle);
  background: var(--bg-panel-hover); color: var(--text);
  font-size: var(--text-xl); line-height: 1;
  transition: transform var(--duration-fast) var(--ease);
}
[aria-selected="true"] > .tab-plus { transform: rotate(45deg); }
.tab-panel {
  margin-top: 32px; padding: 40px; border-radius: var(--r-card);
  background: var(--bg); color: var(--text); box-shadow: var(--shadow-card);
}
.feature-detail { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
.feature-copy { color: var(--text-muted); line-height: 1.9; }
.feature-copy h3 { margin: 0 0 16px; color: var(--text); }
.feature-copy p { margin-bottom: 22px; }
.feature-material { min-width: 0; }
.feature-material .ios-group { margin: 0; }
.material-link { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; text-decoration: none; }
.chevron { flex: 0 0 auto; color: var(--text-muted); }
.protocols { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--font-mono); }

.toc {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 32px 0; padding: 14px; border-radius: var(--r-card);
  background: var(--bg-panel); color: var(--text);
}
.toc a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 10px 16px; border-radius: var(--r-pill);
  color: var(--text-muted); font-size: var(--text-small); text-decoration: none;
}
.toc a:hover, .toc a[aria-current="location"] { background: var(--bg); color: var(--accent-dark); }
.toc--sticky { position: sticky; top: 16px; z-index: 10; }
.toc--flow { position: static; }
.anchor-section { scroll-margin-top: 24px; }

.faq-list { display: grid; gap: 12px; }
.faq-item {
  padding: 0 24px; border-radius: var(--r-group);
  background: var(--bg-panel); color: var(--text);
}
.faq-item summary {
  position: relative; display: block; min-height: 64px;
  padding: 20px 38px 20px 0; list-style: none;
  font-size: var(--text-base); cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 0; top: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r-circle);
  background: var(--bg); color: var(--text); font-size: var(--text-xl);
}
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-top: 0; padding-bottom: 22px; color: var(--text-muted); line-height: 1.85; }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { padding: 28px; border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.term-card dt { margin-bottom: 12px; font-family: var(--font-mono); font-size: var(--text-lg); }
.term-card dd { margin: 0; color: var(--text-muted); line-height: 1.85; }
.term-category { display: inline-block; margin-bottom: 14px; color: var(--text-muted); font-size: var(--text-sm); }

.app-store-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  max-width: 100%; min-height: 60px; padding: 12px 24px;
  border: 0; border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent);
  text-decoration: none; box-shadow: var(--shadow-btn);
  transition: background var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}
.app-store-button:hover { background: var(--accent-dark); color: var(--on-accent); }
.app-store-button:active { transform: translateY(1px); }
.app-store-button svg { width: 26px; height: 26px; fill: currentColor; }
.app-store-button small { display: block; font-size: var(--text-xs); line-height: 1.4; }
.app-store-button strong { display: block; font-size: var(--text-base); font-weight: var(--weight-medium); line-height: 1.5; }
.store-guide-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: 48px; padding: 32px;
  border-radius: var(--r-card); background: var(--bg-panel); color: var(--text);
}
.store-guide-card h2, .store-guide-card h3 { margin: 0 0 10px; font-size: var(--text-xl); }
.store-guide-card p { margin: 0; color: var(--text-muted); }
.store-guide-card .btn, .store-guide-card .app-store-button { flex-shrink: 0; }
.facts-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.fact-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 32px; max-width: 100%; padding: 6px 13px;
  border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text-muted);
  font-size: var(--text-sm); line-height: 1.5; overflow-wrap: anywhere;
}
.fact-pill strong { color: var(--text); font-weight: var(--weight-medium); }
.fact-pill svg, .fact-pill .badge-dot { flex-shrink: 0; }
.fact-pill svg { width: 16px; height: 16px; }
.facts-row--start { justify-content: flex-start; }

.official-shot { flex: 0 0 auto; width: min(280px, 100%); margin: 0 auto; padding: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: 10px; }
.official-shot img { outline: 1px solid var(--border); outline-offset: -1px; }
.official-shot figcaption { margin-top: 12px; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.7; text-align: center; }
.shot-pair { display: flex; align-items: flex-start; justify-content: center; gap: 32px; }

.device-entry {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: 24px;
  padding: 32px; border-radius: var(--r-card);
  background: var(--bg); color: var(--text); box-shadow: var(--shadow-card);
}
.device-entry > svg { width: 52px; height: 64px; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.device-entry h3 { margin: 0 0 12px; font-size: var(--text-xl); }
.device-entry p { margin: 0 0 18px; color: var(--text-muted); line-height: 1.8; }
.device-entry a { color: var(--accent-dark); }
.article-card {
  display: flex; flex-direction: column; gap: 16px; padding: 28px;
  border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card);
}
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-muted); font-size: var(--text-sm); }
.article-card h3 { margin: 0; font-size: var(--text-xl); line-height: 1.5; }
.article-card h3 a { text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-dark); text-decoration: underline; }
.article-card p { margin: 0; color: var(--text-muted); line-height: 1.8; }
.article-card > .text-link { align-self: flex-start; margin-top: auto; }

.callout {
  margin: 28px 0; padding: 24px 28px; border: 0; border-left: 3px solid var(--accent);
  border-radius: var(--r-group); background: var(--accent-tint); color: var(--text); line-height: 1.85;
}
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 8px; font-weight: var(--weight-strong); }
.callout--neutral { border-left-color: var(--border); background: var(--bg-panel); color: var(--text); }

.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--text-small); }
.data-table th, .data-table td, .prose table th, .prose table td, .article-body table th, .article-body table td {
  min-width: 7em; padding: 16px 20px; border-bottom: 1px solid var(--border);
  vertical-align: top; overflow-wrap: normal; word-break: normal;
}
.data-table th, .prose table th, .article-body table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-medium); }
.data-table td, .prose table td, .article-body table td { background: var(--bg); color: var(--text); }
.data-table caption { padding: 12px 0; color: var(--text-muted); text-align: left; }
.prose table, .article-body table {
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
  max-width: 100%; min-width: 0; border-collapse: collapse;
  overscroll-behavior-inline: contain;
}
.prose table code, .article-body table code, .data-table code { overflow-wrap: anywhere; word-break: normal; }

.dl-fab {
  position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  z-index: var(--layer-fab); display: inline-flex; align-items: center; gap: 12px;
  max-width: calc(100% - 40px); min-height: 56px; padding: 12px 20px;
  border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent);
  font-size: var(--text-small); text-decoration: none; box-shadow: var(--shadow-btn);
}
.dl-fab:hover { background: var(--accent-dark); color: var(--on-accent); }
.dl-fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* 仅供根目录静态设计预览使用。 */
.preview-block { margin-top: var(--section-gap); }
.preview-block > h2 { margin-top: 0; margin-bottom: 32px; }
.preview-label { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--text-sm); }
.preview-type h1, .preview-type h2, .preview-type h3 { margin: 20px 0; }
.preview-type h1 { font-size: var(--text-h3); }
.preview-type .type-display { font-family: var(--font-display); font-size: var(--text-h1); font-weight: var(--weight-normal); }
.preview-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(156px, 1fr)); gap: 20px; }
.swatch { margin: 0; min-width: 0; }
.swatch-color {
  display: block; height: 74px; margin-bottom: 10px; border: 1px solid var(--border);
  border-radius: var(--r-group); color: var(--text);
}
.swatch figcaption { font-size: var(--text-xs); color: var(--text-muted); overflow-wrap: anywhere; }
.swatch code { color: var(--text); }
.sw-bg { background: var(--bg); }
.sw-panel { background: var(--bg-panel); }
.sw-hover { background: var(--bg-panel-hover); }
.sw-blue-panel { background: var(--bg-panel-2); }
.sw-border { background: var(--border); }
.sw-accent { background: var(--accent); }
.sw-dark { background: var(--accent-dark); }
.sw-tint { background: var(--accent-tint); }
.sw-on-accent { background: var(--on-accent); }
.sw-text { background: var(--text); }
.sw-muted { background: var(--text-muted); }
.sw-success { background: var(--success); }
.sw-warn { background: var(--warn); }
.sw-error { background: var(--error); }
.sw-sky { background: var(--sky); }
.sw-sun { background: var(--sun); }
.sw-lilac { background: var(--lilac); }
.sw-sun-tint { background: var(--sun-tint); }
.sw-lilac-tint { background: var(--lilac-tint); }
.sw-far { background: var(--wave-far); }
.sw-mid { background: var(--wave-mid); }
.sw-near { background: var(--wave-near); }
.sw-crest { background: var(--wave-crest); }
.sw-line { background: var(--line); }
.sw-clear { background: var(--clear); }
.sw-veil { background: var(--veil); }
.shot-placeholder {
  display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334;
  border: 1px solid var(--border); border-radius: var(--r-shot);
  background: var(--bg-panel); color: var(--text-muted); text-align: center;
}
.shot-placeholder span { padding: 16px; font-size: var(--text-small); }
.preview-footer { margin-bottom: 0; }

@media (max-width: 980px) {
  .feature-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 6px 4px 12px; overscroll-behavior-inline: contain; }
  .feature-tab { flex-shrink: 0; }
  .feature-detail { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 640px) {
  .tab-panel { padding: 24px; }
  .toc { padding: 10px; gap: 4px; }
  .toc a { padding: 10px 12px; }
  .shot-pair { flex-direction: column; align-items: center; }
  .official-shot { width: min(280px, 100%); }
  .device-entry { grid-template-columns: 42px minmax(0, 1fr); gap: 16px; padding: 24px; }
  .device-entry > svg { width: 40px; height: 52px; }
  .store-guide-card { flex-direction: column; align-items: flex-start; padding: 24px; }
  .facts-row { flex-direction: row; flex-wrap: wrap; }
  .fact-pill { padding: 6px 10px; }
  .faq-item { padding-inline: 18px; }
  .callout { padding: 20px; }
  .dl-fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: calc(100% - 32px); }
  .preview-type .type-display { font-size: var(--text-h1-mobile); }
}