.tabs {
  display: grid; grid-template-columns: minmax(210px,.75fr) minmax(0,2fr);
  gap: 40px; padding: 48px;
  background: var(--bg-panel); color: var(--text); border-radius: var(--r-section);
}
.tabs > * { min-width: 0; }
.tabs [role="tablist"] { display: flex; flex-direction: column; gap: 6px; }
.tabs [role="tab"] {
  position: relative; display: block; width: 100%; min-height: 66px;
  padding: 14px 20px; text-align: left;
  border: 0; border-radius: var(--r-small);
  background: var(--clear); color: var(--text-muted);
  font-weight: var(--weight-heading); font-size: var(--fs-body);
}
.tabs [role="tab"] small {
  display: block; margin-top: 3px; font-weight: var(--weight-body);
  font-size: var(--fs-xs); color: inherit;
}
.tabs [role="tab"][aria-selected="true"] { background: var(--accent-dark); color: var(--on-accent); }
.tabs [role="tab"][aria-selected="true"]::before {
  content: ""; position: absolute; inset: 12px auto 12px 0; width: 4px;
  background: var(--accent); color: var(--on-accent); border-radius: var(--r-pill);
}
.tabs [role="tab"]:hover { background: var(--bg-panel-2); color: var(--text); }
.tabs [role="tabpanel"] {
  min-width: 0; padding: 36px; background: var(--surface); color: var(--text);
  border-radius: var(--r-card);
}
.tabs [role="tabpanel"] p { color: var(--text-muted); line-height: 1.85; }
.rule-poster {
  display: block; margin-top: 28px; padding: 24px;
  background: var(--cream); color: var(--accent-dark);
  border-radius: var(--r-card); font-family: var(--font-mono); font-size: var(--fs-sm);
  overflow-x: auto; max-width: 100%; white-space: pre; line-height: 1.8;
}
.toc {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 16px;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--bg); color: var(--text);
}
.toc a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  border-radius: var(--r-pill); color: var(--text-muted); text-decoration: none;
  font-size: var(--fs-sm);
}
.toc a:hover, .toc a[aria-current="location"] { background: var(--bg-panel); color: var(--accent-dark); }
.toc--sticky { position: sticky; top: 16px; z-index: 10; }
.faq-list { border-radius: var(--r-card); background: var(--surface); color: var(--text); padding-inline: 24px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 22px 36px 22px 0; min-height: 64px;
  font-weight: var(--weight-semibold);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 21px; color: var(--accent); font-size: var(--fs-subtitle); }
.faq-item[open] summary::after { content: "−"; }
.faq-item__body { padding-bottom: 24px; color: var(--text-muted); }
.faq-item__body p:last-child { margin-bottom: 0; }
.term-card {
  padding: 28px; border-radius: var(--r-card); border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.term-card dt { font-family: var(--font-mono); font-weight: var(--weight-heading); color: var(--accent-dark); margin-bottom: 12px; overflow-wrap: anywhere; }
.term-card dd { margin: 0; color: var(--text-muted); }
.appstore-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 12px 25px; max-width: 100%;
  background: var(--accent-dark); color: var(--on-accent);
  border: 1px solid var(--accent-dark); border-radius: var(--r-pill);
  text-decoration: none; font-weight: var(--weight-semibold); line-height: 1.25;
}
.appstore-button:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.appstore-button:active { background: var(--accent-dark); color: var(--on-accent); }
.appstore-button svg { width: 25px; height: 28px; }
.appstore-button__copy { display: block; min-width: 0; }
.appstore-button__copy small { display: block; font-size: var(--fs-xs); font-weight: var(--weight-body); }
.appstore-button__copy strong { display: block; font-size: var(--fs-body); }
.fact-pills { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 0; margin: 24px 0; list-style: none; }
.fact-pill, .badge {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 7px 13px; border-radius: var(--r-pill);
  background: var(--chip-fill); color: var(--text-muted);
  border: 1px solid var(--border); font-size: var(--fs-xs); line-height: 1.5;
  overflow-wrap: anywhere; text-decoration: none;
}
.fact-pill::before { content: ""; width: 5px; height: 5px; border-radius: var(--r-round); flex-shrink: 0; background: var(--accent); color: var(--on-accent); }
.badge--accent { background: var(--accent-dark); color: var(--on-accent); border-color: var(--accent-dark); }
.badge--success { color: var(--success); background: var(--bg); }
.badge--error { color: var(--error); background: var(--bg); }
.official-shot { width: 100%; max-width: 280px; margin: 0 auto; flex-shrink: 0; min-width: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot { outline: 1px solid var(--border); border-radius: var(--r-shot); }
.official-shot figcaption {
  padding-top: 12px; padding-bottom: 12px; font-size: var(--fs-xs); color: var(--text-muted);
  text-align: center; background: var(--bg);
}
.shot-layout { display: flex; align-items: flex-start; gap: 48px; }
.shot-layout > :not(.official-shot) { min-width: 0; flex: 1; }
.device-card {
  display: block; padding: 32px; text-decoration: none;
  border-radius: var(--r-card); background: var(--bg-panel); color: var(--text);
}
.device-card:hover { background: var(--bg-panel-2); color: var(--text); }
.device-card__icon { width: 52px; height: 64px; margin-bottom: 28px; color: var(--accent-dark); }
.device-card h3 { margin-bottom: 12px; }
.device-card p { color: var(--text-muted); }
.device-card__link { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--accent-dark); font-weight: var(--weight-semibold); }
.article-card {
  display: flex; flex-direction: column; min-width: 0; padding: 32px;
  border-radius: var(--r-card); background: var(--cream); color: var(--text);
}
.article-card h3 { margin-top: 24px; font-size: var(--fs-subtitle); }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-dark); text-decoration: underline; }
.article-card p { color: var(--muted-on-cream); font-size: var(--fs-sm); }
.article-card time { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted-on-cream); }
.article-card__link { margin-top: auto; color: var(--accent-dark); font-size: var(--fs-sm); }
.color-band { padding: 40px; border-radius: var(--r-swatch); background: var(--swatch-olive); color: var(--text); }
.callout {
  margin: 28px 0; padding: 24px 28px; border-left: 4px solid var(--accent);
  border-radius: var(--r-card); background: var(--bg-panel); color: var(--text);
}
.callout strong { display: block; margin-bottom: 8px; color: var(--accent-dark); }
.callout p:last-child { margin-bottom: 0; }
.store-endnote {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 32px; border-radius: var(--r-card); background: var(--bg-panel); color: var(--text);
}
.store-endnote p { margin-bottom: 0; color: var(--text-muted); }
.store-endnote h2 { font-size: var(--fs-h3); margin-bottom: 10px; }
.dl-fab {
  position: fixed; right: 24px; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 15;
  display: inline-flex; align-items: center; gap: 12px; max-width: calc(100% - 32px);
  min-height: 56px; padding: 12px 20px; border-radius: var(--r-pill);
  background: var(--accent-dark); color: var(--on-accent); text-decoration: none;
}
.dl-fab:hover { background: var(--accent); color: var(--on-accent); }
.dl-fab svg { width: 21px; height: 21px; }
.dl-fab span { min-width: 0; }
.dl-fab small { display: block; }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em; padding: 16px 20px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border); overflow-wrap: normal; word-break: normal;
}
.data-table th, .prose table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.data-table td, .prose table td { background: var(--bg); color: var(--text); }
.data-table code, .prose table code { overflow-wrap: anywhere; }
.prose table {
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
  max-width: 100%; min-width: 0; border-collapse: collapse; overscroll-behavior-inline: contain;
}
.group-list { list-style: none; padding: 0 24px; margin: 0; border-radius: var(--r-card); background: var(--surface); color: var(--text); }
.group-list li + li { border-top: 1px solid var(--border); }
.group-list a { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 60px; padding-top: 16px; padding-bottom: 16px; color: var(--text); text-decoration: none; }
.group-list a::after { content: "›"; color: var(--accent); font-size: var(--fs-subtitle); flex-shrink: 0; }

/* 仅供根目录设计演示使用；不作为真实截图样式。 */
.preview-section { margin-top: var(--section-gap); }
.preview-section > h2 { margin-bottom: 40px; }
.token-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.token-card { min-width: 0; font-size: var(--fs-xs); }
.token-card code { display: block; margin-top: 10px; }
.token-sample { height: 88px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.token-bg { background: var(--bg); color: var(--text); }
.token-panel { background: var(--bg-panel); color: var(--text); }
.token-panel2 { background: var(--bg-panel-2); color: var(--text); }
.token-border { background: var(--border); color: var(--text); }
.token-accent { background: var(--accent); color: var(--on-accent); }
.token-dark { background: var(--accent-dark); color: var(--on-accent); }
.token-text { background: var(--text); color: var(--bg); }
.token-muted { background: var(--text-muted); color: var(--bg); }
.token-success { background: var(--success); color: var(--surface); }
.token-warn { background: var(--warn); color: var(--text); }
.token-error { background: var(--error); color: var(--surface); }
.token-white { background: var(--surface); color: var(--text); }
.token-mist { background: var(--swatch-mist); color: var(--text); }
.token-olive { background: var(--swatch-olive); color: var(--text); }
.token-wine { background: var(--swatch-wine); color: var(--cream); }
.token-cream { background: var(--cream); color: var(--text); }
.token-creamsoft { background: var(--cream-soft); color: var(--text); }
.token-rulecream { background: var(--rule-on-cream); color: var(--text); }
.token-ruledeep { background: var(--rule-on-deep); color: var(--cream); }
.token-creamink { background: var(--muted-on-cream); color: var(--cream); }
.token-horizon { background: var(--horizon); color: var(--text); }
.token-chip { background: var(--chip-fill); color: var(--text); }
.preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.preview-shot-placeholder {
  aspect-ratio: 750 / 1334; display: grid; place-content: center; text-align: center;
  padding: 16px; border-radius: var(--r-shot); background: var(--bg-panel-2); color: var(--text-muted);
  font-family: var(--font-mono); font-size: var(--fs-sm);
}
.preview-subtitle { font-size: var(--fs-subtitle); color: var(--text-muted); }
@media (max-width: 960px) {
  .tabs { gap: 24px; padding: 32px; grid-template-columns: minmax(180px,.8fr) minmax(0,1.6fr); }
  .token-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .tabs { grid-template-columns: minmax(0,1fr); padding: 24px; }
  .tabs [role="tablist"] { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; gap: 8px; }
  .tabs [role="tab"] { flex: 0 0 auto; width: auto; min-height: 48px; padding: 10px 18px; border-radius: var(--r-pill); }
  .tabs [role="tab"] small { display: none; }
  .tabs [role="tab"][aria-selected="true"] { background: var(--accent-dark); color: var(--on-accent); }
  .tabs [role="tab"][aria-selected="true"]::before { display: none; }
  .tabs [role="tabpanel"] { padding: 24px; }
  .shot-layout { flex-direction: column; gap: 32px; }
  .official-shot { align-self: center; }
  .device-card, .article-card { padding: 24px; }
  .dl-fab { right: 16px; font-size: var(--fs-sm); }
  .color-band { padding: 24px; }
}
@media (max-width: 640px) {
  .token-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tabs { padding: 20px; gap: 20px; }
  .tabs [role="tabpanel"] { padding: 20px; }
  .rule-poster { padding: 16px; font-size: var(--fs-xs); }
  .callout { padding: 20px; }
  .faq-list { padding-inline: 20px; }
  .store-endnote { padding: 24px; }
  .fact-pills { flex-direction: row; flex-wrap: wrap; }
}