/* 分段控件：同一组下只显示一个完整面板。 */
.tabs { min-width: 0; }
.tab-list, [role="tablist"] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 32px;
  padding: 6px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-panel);
  color: var(--c-text);
}
[role="tab"] {
  min-height: 44px;
  max-width: 100%;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-clear);
  color: var(--c-text-2);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}
[role="tab"]:hover { background: var(--c-accent-soft); color: var(--c-accent-dark); }
[role="tab"][aria-selected="true"] { background: var(--c-accent); color: var(--c-panel); }
.tab-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 48px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-panel);
  background: var(--c-panel);
  color: var(--c-text);
}
.tab-panel > * { min-width: 0; }
.tab-panel h3 { margin-top: 0; }
.tab-panel p { color: var(--c-text-2); }
.tab-panel pre { margin: 0; }
.tab-panel:focus { outline-offset: 5px; }
.interface-chips, .fact-row, .tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.fact-row { justify-content: center; margin: 24px 0; }
.fact-pill, .badge, .interface-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-panel);
  color: var(--c-text-2);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.fact-pill strong { color: var(--c-text); font-weight: var(--weight-semibold); }
.badge--blue, .interface-chip { border-color: var(--c-accent-ring); background: var(--c-panel2); color: var(--c-accent-dark); }
.badge-dot { width: 6px; height: 6px; border-radius: var(--r-circle); background: var(--c-success); flex-shrink: 0; }
.fact-row--start { justify-content: flex-start; }

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 12px);
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 100%;
  flex-wrap: wrap;
  overflow-x: visible;
  margin-top: 24px;
  margin-bottom: 40px;
  padding: 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-panel);
  color: var(--c-text);
}
.toc a { flex: 0 0 auto; min-height: 44px; padding: 10px 16px; border-radius: var(--r-pill); color: var(--c-text-2); font-size: 14px; text-decoration: none; }
.toc a:hover, .toc a[aria-current="location"] { background: var(--c-panel2); color: var(--c-accent-dark); }
.toc--static { position: static; }

.faq-group { border: 1px solid var(--c-border); border-radius: var(--r-panel); background: var(--c-panel); color: var(--c-text); }
.faq-item { padding-inline: 28px; }
.faq-item + .faq-item { border-top: 1px solid var(--c-border); }
.faq-item summary { position: relative; min-height: 64px; padding: 20px 32px 20px 0; list-style: none; cursor: pointer; font-weight: var(--weight-semibold); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0; top: 19px; font-family: var(--font-mono); font-size: 20px; color: var(--c-accent-dark); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 24px; color: var(--c-text-2); }
.faq-answer p { margin-top: 0; }
.faq-answer > :last-child { margin-bottom: 0; }

.term-card { padding: 28px; border-top: 2px solid var(--c-accent); border-radius: var(--r-menu); background: var(--c-panel); color: var(--c-text); }
.term-card h3 { margin: 14px 0; }
.term-card p { margin-bottom: 0; color: var(--c-text-2); }

.app-store-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  max-width: 100%;
  padding: 10px 24px;
  border: 1px solid var(--c-accent);
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: var(--c-panel);
  text-decoration: none;
  transition: background var(--motion-fast), border-color var(--motion-fast);
}
.app-store-btn:hover { border-color: var(--c-accent-dark); background: var(--c-accent-dark); color: var(--c-panel); }
.app-store-btn svg { width: 25px; height: 29px; flex-shrink: 0; }
.app-store-label { display: block; text-align: left; line-height: 1.35; }
.app-store-label small { display: block; font-size: 11px; }
.app-store-label strong { display: block; font-size: 16px; font-weight: var(--weight-semibold); }
.app-store-btn--primary { min-height: 64px; padding: 14px 32px; }
.app-store-btn--primary .app-store-label strong { font-size: 18px; }

.official-shot { width: min(100%, 280px); max-width: 280px; margin: 0 auto; padding: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot { filter: none; }
.official-shot figcaption { margin-top: 12px; font-size: 12px; line-height: 1.6; color: var(--c-muted); text-align: center; }
.official-shot img { outline: 1px solid var(--c-border); outline-offset: -1px; }
.shot-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; }

.device-card { display: flex; flex-direction: column; align-items: center; padding: 40px; border-radius: var(--r-panel); background: var(--c-bg); color: var(--c-text); text-align: center; min-width: 0; }
.device-card > svg { width: 72px; height: 88px; margin-bottom: 20px; color: var(--c-accent-dark); }
.device-card h3 { margin: 0 0 14px; }
.device-card p { color: var(--c-muted); max-width: 360px; }
.device-card .pill-btn { margin-top: auto; }
.article-card { display: flex; flex-direction: column; min-width: 0; padding: 32px; border: 1px solid var(--c-border); border-radius: var(--r-panel); background: var(--c-panel); color: var(--c-text); }
.article-card h3 { margin: 24px 0 16px; font-size: 22px; }
.article-card h3 a { color: var(--c-text); text-decoration: none; }
.article-card h3 a:hover { color: var(--c-accent-dark); }
.article-card p { color: var(--c-muted); }
.article-card .article-link { margin-top: auto; padding-top: 16px; font-size: 14px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: var(--c-muted); }
.callout { margin: 32px 0; padding: 24px 28px; border-left: 3px solid var(--c-accent); border-radius: 0 var(--r-menu) var(--r-menu) 0; background: var(--c-panel2); color: var(--c-text); }
.callout p { margin: 0; }
.callout p + p { margin-top: 12px; }
.callout strong { font-weight: var(--weight-semibold); }
.callout--warn { border-left-color: var(--c-warn); }

.grouped-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--c-border); border-radius: var(--r-panel); background: var(--c-panel); color: var(--c-text); }
.grouped-list li + li { border-top: 1px solid var(--c-border); }
.grouped-list a { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 18px 28px; color: var(--c-text); text-decoration: none; }
.grouped-list a::after { content: "›"; flex-shrink: 0; font-size: 24px; color: var(--c-muted); }
.grouped-list a:hover { color: var(--c-accent-dark); }
.grouped-list a span { min-width: 0; }

.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
.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 {
  min-width: 7em;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th { background: var(--c-panel2); color: var(--c-text); font-weight: var(--weight-semibold); }
.data-table td, .prose table td { background: var(--c-panel); color: var(--c-text-2); }
.prose 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, .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: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 32px);
  min-height: 56px;
  padding: 12px 22px;
  border: 1px solid var(--c-accent);
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: var(--c-panel);
  text-decoration: none;
}
.dl-fab:hover { background: var(--c-accent-dark); color: var(--c-panel); }
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.dl-fab strong, .dl-fab small { display: block; line-height: 1.4; }
.dl-fab strong { font-size: 14px; }
.dl-fab small { font-size: 11px; }
.article-store-card { margin-top: 64px; padding: 32px; border: 1px solid var(--c-border); border-radius: var(--r-panel); background: var(--c-panel2); color: var(--c-text); }
.article-store-card h2 { margin-top: 0; font-size: 24px; }
.article-store-card p { color: var(--c-text-2); }
.article-store-card .pill-btn { margin-top: 8px; }

/* 预览专用家具，不承载任何应用界面。 */
.preview-palette { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.swatch { min-width: 0; margin: 0; border: 1px solid var(--c-border); border-radius: var(--r-menu); background: var(--c-panel); color: var(--c-text); }
.swatch-sample { height: 72px; border-radius: var(--r-menu) var(--r-menu) 0 0; }
.swatch figcaption { padding: 12px; font-family: var(--font-mono); font-size: 11px; overflow-wrap: anywhere; }
.swatch--bg { background: var(--c-bg); }
.swatch--panel { background: var(--c-panel); }
.swatch--panel2 { background: var(--c-panel2); }
.swatch--border { background: var(--c-border); }
.swatch--accent { background: var(--c-accent); }
.swatch--accent-dark { background: var(--c-accent-dark); }
.swatch--text { background: var(--c-text); }
.swatch--text2 { background: var(--c-text-2); }
.swatch--muted { background: var(--c-muted); }
.swatch--success { background: var(--c-success); }
.swatch--warn { background: var(--c-warn); }
.swatch--error { background: var(--c-error); }
.swatch--graphite { background: linear-gradient(135deg, var(--m-graphite-hi), var(--m-graphite-1), var(--m-graphite-2), var(--m-graphite-edge)); }
.swatch--silver { background: linear-gradient(135deg, var(--m-silver-hi), var(--m-silver-1), var(--m-silver-2), var(--m-silver-edge)); }
.swatch--mist { background: linear-gradient(135deg, var(--m-mist-hi), var(--m-mist-1), var(--m-mist-2), var(--m-mist-edge)); }
.swatch--optics { background: linear-gradient(90deg, var(--c-glass), var(--c-glass-edge), var(--c-lens)); }
.preview-shot-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334; border: 1px solid var(--c-border); border-radius: var(--r-shot); background: linear-gradient(var(--c-panel2), var(--c-panel)); color: var(--c-text-2); text-align: center; font-family: var(--font-mono); font-size: 13px; }
.preview-shot-placeholder span { padding: 24px; }
.preview-caption { margin-top: 20px; color: var(--c-muted); font-size: 13px; }
.preview-type-large { font-size: clamp(34px, 4vw, 48px); }
.preview-tabs-note { margin: 24px 0 0; color: var(--c-muted); font-size: 13px; }

@media (max-width: 900px) {
  .tab-panel { gap: 28px; padding: 32px; }
}
@media (max-width: 640px) {
  .tab-panel { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .tab-list, [role="tablist"] { border-radius: var(--r-menu); }
  [role="tab"] { padding-inline: 12px; font-size: 12px; }
  .fact-row, .interface-chips, .tag-row { flex-direction: row; flex-wrap: wrap; }
  .fact-pill { font-size: 11px; padding: 5px 9px; }
  .shot-row { flex-direction: column; align-items: center; }
  .official-shot { width: min(100%, 280px); }
  .device-card, .article-card { padding: 28px; }
  .faq-item { padding-inline: 20px; }
  .callout { padding: 20px; }
  .preview-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-store-card { padding: 24px; }
  .dl-fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
}