.feature-tabs { min-width: 0; }
.tab-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 24px;
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--ink);
}
.tab-rail [role="tab"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
  min-height: 60px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--ink);
  font-weight: var(--weight-heading);
  line-height: 1.5;
  transition: background-color var(--time-fast) var(--ease), box-shadow var(--time-fast) var(--ease);
}
.tab-icon { width: 28px; height: 28px; flex-shrink: 0; }
.tab-plus { display: inline-flex; justify-content: center; align-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--bg-panel-hover); color: var(--ink); font-size: 24px; font-weight: var(--weight-normal); transition: transform var(--time-fast) var(--ease); }
.tab-rail [role="tab"][aria-selected="true"] { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-card); }
.tab-rail [aria-selected="true"] .tab-plus { transform: rotate(45deg); }
.tab-detail { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: clamp(24px, 4vw, 48px); border-radius: var(--r-card); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-card); }
.tab-detail p { color: var(--muted); }
.tab-detail pre { margin: 0; }
[role="tabpanel"]:focus-visible { border-radius: var(--r-card); }

.toc {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  overflow-x: visible;
  padding: 8px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--ink);
}
.toc a { display: block; flex-shrink: 0; min-height: 44px; padding: 10px 16px; border-radius: var(--r-pill); white-space: nowrap; font-size: 14px; }
.toc a:hover, .toc a[aria-current="location"] { background: var(--bg-panel); color: var(--ink); }
.toc.is-static { position: static; }

.faq-list { display: grid; gap: 12px; }
.faq-item { min-width: 0; border-radius: var(--r-code); background: var(--bg-panel); color: var(--ink); }
.faq-item summary { position: relative; min-height: 64px; padding: 18px 60px 18px 24px; cursor: pointer; list-style: none; font-weight: var(--weight-heading); line-height: 1.65; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 24px; top: 15px; font-size: 24px; font-weight: var(--weight-normal); transition: transform var(--time-fast) var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 24px 24px; color: var(--muted); }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { padding: 28px; border-radius: var(--r-card); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-card); }
.term-card dt { margin-bottom: 12px; font-size: 22px; font-weight: var(--weight-heading); letter-spacing: var(--tracking-title); }
.term-card dd { margin: 0; color: var(--muted); }
.term-card code { font-size: .875rem; }

.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 24px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-accent);
  line-height: 1.25;
  text-align: left;
  transition: background-color var(--time-fast) var(--ease);
}
.store-button:hover, .store-button.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.store-button svg { width: 25px; height: 28px; flex-shrink: 0; fill: currentColor; }
.store-button small { display: block; font-size: 11px; font-weight: var(--weight-heading); }
.store-button strong { display: block; margin-top: 2px; font-size: 16px; font-weight: var(--weight-strong); }
.store-button--ink { background: var(--ink); color: var(--bg); box-shadow: var(--shadow-card); }
.store-button--ink:hover { background: var(--muted); color: var(--bg); }

.fact-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fact-pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--ink);
  font-size: 12px;
  font-weight: var(--weight-heading);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.fact-pill svg, .badge svg { width: 18px; height: 18px; flex-shrink: 0; }
.badge-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--pine); }
.badge--outlined { border: 1px solid var(--border); background: var(--bg); color: var(--ink); }
.badge--note { background: var(--sky-tint); color: var(--sky-ink); }

.shot-row { display: flex; justify-content: center; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.official-shot { width: 100%; max-width: 280px; min-width: 0; flex-shrink: 0; margin: 0 auto; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot { outline: 1px solid var(--border); outline-offset: 0; border-radius: var(--r-shot); }
.official-shot figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.7; text-align: center; }
.device-card { display: grid; justify-items: start; align-content: start; gap: 14px; padding: 32px; border-radius: var(--r-card); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-card); }
.device-card > svg { width: 56px; height: 64px; }
.device-card h3, .device-card p { margin: 0; }
.device-card p { color: var(--muted); }
.device-card .btn { margin-top: 6px; }
.article-card { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px; border-radius: var(--r-card); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-card); }
.article-card h3 { font-size: 22px; line-height: 1.5; margin: 0; }
.article-card p { flex: 1; margin: 0; color: var(--muted); font-size: 14px; }
.article-card h3 a:hover { text-decoration: underline; text-underline-offset: .2em; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--muted); font-size: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: var(--weight-strong); }
.text-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.callout { margin: 24px 0; padding: 24px; border-left: 3px solid var(--accent); border-radius: var(--r-code); background: var(--bg-panel); color: var(--ink); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: var(--weight-strong); }
.callout-title svg { width: 22px; height: 22px; flex-shrink: 0; }
.store-guide-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 32px; margin-top: 48px; border-radius: var(--r-card); background: var(--bg-panel); color: var(--ink); }
.store-guide-card > div { flex: 1 1 240px; min-width: 0; }
.store-guide-card h2 { font-size: 24px; }
.store-guide-card p { margin: 0; color: var(--muted); font-size: 14px; }

.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.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(--ink); font-weight: var(--weight-strong); }
.data-table td, .prose table td, .article-body table td { background: var(--bg); color: var(--ink); }
.prose table, .article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; text-align: left; }
.data-table code, .prose table code, .article-body table code { overflow-wrap: anywhere; white-space: normal; }

.dl-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: var(--z-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);
  box-shadow: var(--shadow-accent);
  font-size: 14px;
  font-weight: var(--weight-strong);
}
.dl-fab:hover { background: var(--accent-dark); color: var(--on-accent); }
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.has-article-fab .site-footer { padding-bottom: 100px; }

/* 仅用于根目录风格预览；不影响正式头部的纯文字导航。 */
.preview-topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 88px; padding-inline: 40px; gap: 16px; }
.preview-tabs { display: flex; align-items: center; gap: 2px; margin: 0; padding: 5px; list-style: none; border-radius: var(--r-pill); background: var(--bg-panel); color: var(--ink); }
.preview-tabs a { position: relative; display: block; padding: 10px 17px; font-size: 14.5px; line-height: 1.5; font-weight: var(--weight-heading); white-space: nowrap; color: var(--muted); border-radius: var(--r-pill); }
.preview-tabs [aria-current="page"] { background: var(--bg); color: var(--ink); font-weight: var(--weight-strong); box-shadow: var(--shadow-xs); }
.preview-tabs [aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 20px; height: 3px; margin-left: -10px; border-radius: var(--r-indicator); background: var(--accent); }
.preview-lang { justify-self: end; font-size: 14px; }
.preview-lang summary { list-style: none; cursor: pointer; padding: 9px 14px; }
.preview-lang summary::-webkit-details-marker { display: none; }
.preview-lang summary svg { width: 17px; height: 17px; vertical-align: -.2em; margin-right: 8px; }
.preview-lang { position: relative; }
.preview-lang ul { position: absolute; top: 100%; right: 0; z-index: 20; width: 180px; list-style: none; margin: 0; padding: 8px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-card); border-radius: var(--r-code); }
.preview-lang a { display: block; padding: 10px 12px; min-height: 44px; }
.preview-gallery { display: grid; gap: 32px; }
.sample-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sample-block { margin-top: 32px; }
.sample-block > h3 { margin-bottom: 20px; }
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.swatch-grid li { border: 1px solid var(--border); border-radius: var(--r-code); padding: 12px; font-size: 12px; }
.swatch { display: block; height: 72px; margin-bottom: 12px; border-radius: var(--r-small); border: 1px solid var(--border); }
.sw-bg { background: var(--bg); }
.sw-panel { background: var(--bg-panel); }
.sw-hover { background: var(--bg-panel-hover); }
.sw-border { background: var(--border); }
.sw-ink { background: var(--ink); }
.sw-muted { background: var(--muted); }
.sw-accent { background: var(--accent); }
.sw-accent-dark { background: var(--accent-dark); }
.sw-sky { background: var(--sky); }
.sw-sky-deep { background: var(--sky-deep); }
.sw-tint { background: var(--sky-tint); }
.sw-sky-ink { background: var(--sky-ink); }
.sw-pine { background: var(--pine); }
.sw-honey { background: var(--honey); }
.sw-lav { background: var(--lav); }
.sw-error { background: var(--error); }
.sw-clear { background: var(--clear); }
.sw-veil { background: var(--veil); }
.preview-shot-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334; border-radius: var(--r-shot); background: var(--bg-panel); color: var(--muted); font-family: var(--font-mono); font-size: 13px; text-align: center; }
.preview-shot-placeholder span { max-width: 180px; padding: 16px; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.preview-fab { position: static; }
.preview-heading { font-family: var(--font-display); font-size: var(--size-h1); line-height: 1.18; font-weight: var(--weight-heading); letter-spacing: var(--tracking-title); }
.grouped-links { padding: 0; margin: 0; list-style: none; border-radius: var(--r-code); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-xs); }
.grouped-links li + li { border-top: 1px solid var(--border); }
.grouped-links a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 16px 24px; }
.grouped-links a::after { content: "→"; flex-shrink: 0; }

@media (max-width: 1080px) {
  .preview-topbar { grid-template-columns: auto 1fr; padding: 16px 20px; row-gap: 10px; }
  .preview-nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; }
  .preview-tabs { width: max-content; }
  .preview-lang { grid-column: 2; grid-row: 1; }
}
@media (max-width: 768px) {
  .tab-rail { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overscroll-behavior-inline: contain; border-radius: var(--r-code); }
  .tab-rail [role="tab"] { min-height: 56px; }
  .tab-detail { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .shot-row { flex-direction: column; align-items: center; }
}
@media (max-width: 640px) {
  .device-card, .article-card, .term-card { padding: 24px; }
  .fact-row { flex-direction: row; flex-wrap: wrap; }
  .fact-pill { padding: 5px 10px; font-size: 11px; }
  .store-guide-card { padding: 24px; }
  .dl-fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: calc(100% - 32px); }
}