:root {
  --feature-ratio: 16 / 10;
  --feature-tab-size: 24px;
  --feature-panel-title: 28px;
  --shot-width: 280px;
  --hero-height: clamp(720px, calc(100vh - var(--notice-h) - var(--bar-h) - 28px), 900px);
  --conf-name-size: 19px;
  --conf-line-size: 14px;
  --conf-leading: 22px;
  --device-stroke: 1.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  min-height: 30px;
  max-width: 100%;
  padding: 4px 14px 4px 12px;
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
}
.badge strong { color: var(--text); font-weight: var(--weight-medium); }
.badge__dot { position: relative; width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--warn); color: var(--notice-ink); }
.badge--verified { border-color: var(--warn); color: var(--warn); }
.badge--success .badge__dot { background: var(--success); color: var(--bg-panel-2); }
.badge--error .badge__dot { background: var(--error); color: var(--bg-panel-2); }
.chip, .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 28px;
  padding: 3px 12px;
  border: var(--stroke) solid var(--on-basin-line);
  border-radius: var(--r-pill);
  font-size: var(--text-sm);
  color: var(--text);
  overflow-wrap: anywhere;
}
.chip svg { width: 12px; height: 12px; }
.tag { border-color: var(--border); color: var(--text-muted); }
.facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 12px;
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: var(--text-xs);
  overflow-wrap: anywhere;
}
.fact strong { font-weight: var(--weight-medium); color: var(--text); }
.fact--verified { border-color: var(--warn); color: var(--warn); }
.fact svg { width: 14px; height: 14px; }

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: var(--hero-height);
  padding-top: 44px;
  text-align: center;
  overflow-x: clip;
}
.hero__basin {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 32%;
  bottom: 0;
  z-index: 0;
  border-radius: 0 0 var(--r-basin) var(--r-basin);
  background: linear-gradient(180deg, var(--bg) 0%, var(--basin-deep) 42%, var(--accent) 82%, var(--basin-light) 100%);
  color: var(--nav-ink);
  pointer-events: none;
}
.hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(1040px, 100%);
  padding-inline: var(--gutter);
}
.hero__title {
  margin-top: var(--space-6);
  font-size: var(--text-hero);
  font-weight: var(--weight-regular);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-title);
  color: var(--text);
}
.hero__title > span { display: block; }
.hero__title-sub { color: var(--text-muted); }
.hero__lede {
  margin-top: 18px;
  max-width: 820px;
  font-size: var(--text-lede);
  line-height: var(--leading-body);
  color: var(--text-muted);
}
.hero__lede strong { color: var(--text); font-weight: var(--weight-medium); }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: var(--space-7); }
.devices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 22px;
  margin-top: 22px;
  font-size: var(--text-label);
  color: var(--on-basin);
}
.device { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; }
.device svg { width: 18px; height: 18px; }
a.device:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.devices__sep { width: 1px; height: 16px; background: var(--on-basin-line); color: var(--text); }
.hero__stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 240px;
  width: calc(100% - var(--gutter) * 2);
  margin-top: 30px;
  overflow: hidden;
  border-radius: 0 0 var(--r-basin) var(--r-basin);
}
.hero__stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: min(86%, 1160px);
  height: 64px;
  transform: translateX(-50%);
  background: linear-gradient(0deg, var(--glow), var(--clear));
  color: var(--text);
  pointer-events: none;
}
.ipad {
  position: relative;
  width: min(86%, 1160px);
  margin-inline: auto;
  aspect-ratio: 1.43;
  padding: 18px;
  border-radius: var(--r-ipad);
  background: var(--bg-panel-2);
  color: var(--text);
  border: var(--stroke) solid var(--rim);
  box-shadow: inset 0 1px 0 var(--rim-top);
}
.ipad::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: var(--r-circle);
  background: var(--camera);
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--camera-lens);
}
.ipad__screen { height: 100%; border-radius: var(--r-screen); background: var(--screen); color: var(--screen-ink); overflow: hidden; }
.conf { padding: 24px 56px; font-family: var(--font-mono); color: var(--screen-ink); text-align: left; }
.conf__head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
  font-size: var(--text-sm);
  line-height: var(--conf-leading);
  color: var(--screen-muted);
  padding-bottom: 10px;
}
.conf__sec { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; padding-block: 10px; border-top: var(--stroke) solid var(--screen-rule); }
.conf__sec > * { min-width: 0; }
.conf__name { font-size: var(--conf-name-size); line-height: var(--conf-leading); font-weight: var(--weight-medium); letter-spacing: -0.01em; color: var(--bg); }
.conf__lines li { display: grid; grid-template-columns: 46ch minmax(0, 1fr); gap: var(--space-4); font-size: var(--conf-line-size); line-height: var(--conf-leading); }
.conf__lines code { display: block; min-width: 0; max-width: 100%; overflow-x: auto; white-space: nowrap; font-family: inherit; overflow-wrap: normal; }
.conf .c { color: var(--screen-muted); font-size: var(--text-sm); }
.conf .k { color: var(--accent-dark); font-weight: var(--weight-bold); }
.conf .t { color: var(--bg); font-weight: var(--weight-medium); }

.qs { padding-top: 168px; padding-bottom: var(--section-space); }
.qs__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-8); }
.qs__title { margin-top: var(--space-3); font-size: var(--text-h2); }
.qs__lede { margin-top: var(--space-3); max-width: 560px; color: var(--text-muted); }
.qs__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); margin-top: var(--space-12); }

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  aspect-ratio: var(--feature-ratio);
  min-height: 560px;
  overflow: hidden;
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-feature);
  background: var(--bg-panel);
  color: var(--text);
}
.tabs::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--clear));
  color: var(--text);
  pointer-events: none;
}
.tabs__list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-8);
  border-right: var(--stroke) solid var(--border);
}
.tabs [role="tab"] {
  position: relative;
  display: block;
  min-height: 64px;
  width: 100%;
  padding: var(--space-3) var(--space-5);
  border: 0;
  border-radius: var(--r-small);
  background: var(--clear);
  color: var(--text-muted);
  font-size: var(--feature-tab-size);
  font-weight: var(--weight-regular);
  line-height: 1.4;
  text-align: left;
}
.tabs [role="tab"]:hover { background: var(--bg); color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { background: var(--bg); color: var(--text); }
.tabs [role="tab"][aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--text);
}
.tabs__panels { display: grid; align-items: center; min-width: 0; padding: var(--space-12); }
.tabs [role="tabpanel"] { min-width: 0; }
.tabs__code { margin-bottom: var(--space-8); padding: var(--space-4) var(--space-5); color: var(--basin-light); }
.tabs__title { margin-bottom: var(--space-5); font-size: var(--feature-panel-title); }
.tabs__body { color: var(--text-muted); line-height: 1.9; }
.tabs__terms { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-7); }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-4);
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-menu);
  background: var(--bg-panel);
  color: var(--text);
}
.toc a { display: inline-flex; align-items: center; min-height: var(--touch); padding: 8px 14px; border-radius: var(--r-pill); color: var(--text-muted); font-size: var(--text-label); }
.toc a:hover, .toc a[aria-current="location"] { background: var(--bg-panel-2); color: var(--text); }
.toc--sticky { position: sticky; top: var(--space-4); z-index: 10; align-self: start; }
.faq-item { border-bottom: var(--stroke) solid var(--border); }
.faq-item summary {
  position: relative;
  min-height: 72px;
  padding: var(--space-6) var(--space-10) var(--space-6) 0;
  list-style: none;
  cursor: pointer;
  font-size: var(--text-brand);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: var(--space-2); top: var(--space-6); color: var(--basin-light); }
.faq-item[open] summary::after { content: "−"; }
.faq-item__body { padding-bottom: var(--space-7); padding-right: var(--space-8); color: var(--text-muted); }
.faq-item__body > * + * { margin-top: var(--space-3); }

.term-card {
  min-width: 0;
  padding: var(--space-8);
  border-radius: var(--r-card);
  border: var(--stroke) solid var(--border);
  background: var(--bg-panel-2);
  color: var(--text);
}
.term-card dt, .term-card h3 { font-family: var(--font-mono); font-size: var(--text-card); color: var(--basin-light); overflow-wrap: anywhere; }
.term-card dd, .term-card p { margin-top: var(--space-4); color: var(--text-muted); }
.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 64px;
  max-width: 100%;
  padding: 12px 26px;
  border: var(--stroke-strong) solid var(--accent-dark);
  border-radius: var(--r-menu);
  background: var(--accent-dark);
  color: var(--white);
  text-align: left;
}
.store-button svg { width: 28px; height: 28px; }
.store-button__copy { min-width: 0; }
.store-button small { display: block; font-size: var(--text-xs); line-height: 1.4; }
.store-button strong { display: block; font-size: var(--text-brand); font-weight: var(--weight-medium); line-height: 1.4; }
.store-button:hover { background: var(--basin-deep); color: var(--white); border-color: var(--basin-deep); }
.store-button:active { border-color: var(--basin-light); }
.store-button--primary { min-height: 76px; padding: var(--space-4) var(--space-8); }
.store-guide {
  position: relative;
  overflow-x: clip;
  padding: 64px;
  border-radius: var(--r-feature);
  background: linear-gradient(120deg, var(--basin-deep), var(--bg-panel-2) 80%);
  color: var(--text);
}
.store-guide p { max-width: 640px; margin-top: var(--space-4); color: var(--text); }
.store-guide .store-button { margin-top: var(--space-7); }
.official-shot {
  width: 100%;
  max-width: var(--shot-width);
  margin-inline: auto;
  flex-shrink: 0;
}
.official-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-shot);
}
.official-shot__frame { border: var(--stroke) solid var(--border); border-radius: var(--r-shot); }
.official-shot figcaption { margin-top: var(--space-3); color: var(--text-muted); font-size: var(--text-sm); line-height: 1.7; }
.shot-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--shot-width); align-items: center; gap: 64px; }
.shot-layout > * { min-width: 0; }

.device-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  padding: var(--space-8);
  border-radius: var(--r-card);
  border: var(--stroke) solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
}
.device-card__icon { width: 52px; height: 52px; color: var(--basin-light); flex-shrink: 0; }
.device-card__body { min-width: 0; }
.device-card h3 { font-size: var(--text-card); }
.device-card p { margin-top: 10px; color: var(--text-muted); }
.device-card__link { display: inline-flex; min-height: var(--touch); align-items: center; margin-top: var(--space-4); color: var(--basin-light); }
.device-card:hover { border-color: var(--basin-light); }

.article-card { display: flex; flex-direction: column; min-width: 0; }
.article-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-6); font-size: var(--text-sm); color: var(--text-muted); }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--basin-light); }
.article-card__link { display: inline-flex; align-items: center; min-height: var(--touch); margin-top: var(--space-5); color: var(--basin-light); }
.callout {
  min-width: 0;
  padding: var(--space-6) var(--space-7);
  border: var(--stroke) solid var(--border);
  border-left: 3px solid var(--warn);
  border-radius: var(--r-small);
  background: var(--bg-panel);
  color: var(--text);
}
.callout p + p { margin-top: var(--space-3); }
.callout--note { border-left-color: var(--basin-light); }

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

.dl-fab {
  position: fixed;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(var(--space-6), env(safe-area-inset-bottom));
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  max-width: calc(100% - var(--gutter) * 2);
  padding: var(--space-3) var(--space-5);
  border: var(--stroke) solid var(--rim-top);
  border-radius: var(--r-pill);
  background: var(--accent-dark);
  color: var(--white);
  font-size: var(--text-label);
}
.dl-fab svg { width: 20px; height: 20px; }
.dl-fab:hover { background: var(--basin-deep); color: var(--white); }
.article-with-fab { padding-bottom: 110px; }

/* 预览专用：色块仅承载颜色，名称在色块外显示。 */
.swatch-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-5); }
.swatch { min-width: 0; }
.swatch__color { display: block; height: 72px; margin-bottom: var(--space-2); border: var(--stroke) solid var(--border); border-radius: var(--r-small); color: var(--text); }
.swatch code { font-size: var(--text-xs); }
.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--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--basin-deep { background: var(--basin-deep); }
.swatch--basin-light { background: var(--basin-light); }
.swatch--glow { background: var(--glow); }
.swatch--white { background: var(--white); }
.swatch--nav { background: var(--nav-bg); }
.swatch--nav-ink { background: var(--nav-ink); }
.swatch--nav-muted { background: var(--nav-ink-muted); }
.swatch--nav-line { background: var(--nav-line); }
.swatch--nav-hover { background: var(--nav-hover); }
.swatch--notice { background: var(--notice-ink); }
.swatch--on-basin { background: var(--on-basin); }
.swatch--on-basin-line { background: var(--on-basin-line); }
.swatch--on-basin-hover { background: var(--on-basin-hover); }
.swatch--screen { background: var(--screen); }
.swatch--screen-ink { background: var(--screen-ink); }
.swatch--screen-muted { background: var(--screen-muted); }
.swatch--screen-rule { background: var(--screen-rule); }
.swatch--camera { background: var(--camera); }
.swatch--lens { background: var(--camera-lens); }
.swatch--rim { background: var(--rim); }
.swatch--rim-top { background: var(--rim-top); }
.swatch--veil { background: var(--veil); }
.swatch--clear { background: var(--clear); }
.shot-placeholder {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--space-3);
  aspect-ratio: 750 / 1334;
  width: 100%;
  padding: var(--space-6);
  border: var(--stroke) solid var(--screen-rule);
  border-radius: var(--r-shot);
  background: var(--screen);
  color: var(--screen-ink);
  text-align: center;
}
.shot-placeholder small { color: var(--screen-muted); }
.preview-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); }
.preview-type-h1 { font-family: var(--font-display); font-size: var(--text-h1); font-weight: var(--weight-regular); line-height: var(--leading-display); }
.preview-caption { margin-top: var(--space-3); color: var(--text-muted); font-size: var(--text-sm); }
.grouped-list { overflow: hidden; border: var(--stroke) solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.grouped-list a { display: flex; justify-content: space-between; gap: var(--space-4); min-height: 64px; align-items: center; padding: var(--space-4) var(--space-6); }
.grouped-list li + li { border-top: var(--stroke) solid var(--border); }
.grouped-list a:hover { background: var(--bg-panel-2); color: var(--text); }
.grouped-list span:last-child { color: var(--basin-light); }

@media (max-width: 1100px) {
  .conf__lines li { grid-template-columns: minmax(0, 1fr); }
  .conf .c { display: none; }
  .tabs__list { padding: var(--space-5); }
  .tabs__panels { padding: var(--space-8); }
}
@media (max-width: 900px) {
  .hero { height: auto; padding-top: 36px; }
  .hero__title { font-size: var(--text-mobile-h1); }
  .hero__lede { font-size: var(--text-nav); }
  .hero__basin { border-radius: 0 0 var(--r-mobile-basin) var(--r-mobile-basin); }
  .hero__stage { flex: none; height: 300px; border-radius: 0 0 var(--r-mobile-basin) var(--r-mobile-basin); }
  .ipad { width: 94%; border-radius: var(--r-mobile-ipad); padding: var(--space-3); }
  .ipad__screen { border-radius: var(--r-mobile-screen); }
  .conf { padding: 18px var(--space-5); }
  .conf__head span + span { display: none; }
  .conf__sec { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .conf__name { font-size: var(--text-base); }
  .conf__lines li { font-size: var(--text-xs); }
  .qs__head { flex-direction: column; align-items: flex-start; }
  .qs__grid { grid-template-columns: 1fr; }
  .tabs { aspect-ratio: auto; min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .tabs__list {
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border-right: 0;
    border-bottom: var(--stroke) solid var(--border);
    padding: var(--space-4);
  }
  .tabs [role="tab"] { flex-shrink: 0; width: auto; min-height: var(--touch); padding: 10px 18px; font-size: var(--text-base); border-radius: var(--r-pill); white-space: nowrap; }
  .tabs [role="tab"][aria-selected="true"]::before { inset: auto 18px 3px; width: auto; height: 3px; }
  .shot-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .swatch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hero__copy { width: 100%; }
  .hero__title { font-size: var(--text-mobile-h1); }
  .hero__cta { gap: var(--space-3); width: 100%; }
  .hero__cta .btn { min-width: 0; padding-inline: 18px; font-size: var(--text-label); }
  .devices { gap: 6px 14px; font-size: var(--text-sm); }
  .devices__sep { display: none; }
  .conf { padding-inline: var(--space-3); }
  .tabs__panels { padding: var(--space-6); }
  .tabs__title { font-size: var(--text-h3); }
  .device-card { gap: var(--space-4); padding: var(--space-6); }
  .device-card__icon { width: 36px; height: 36px; }
  .store-guide { padding: var(--space-8) var(--space-6); }
  .store-button { padding-inline: var(--space-5); }
  .store-button strong { font-size: var(--text-base); }
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .fact { font-size: var(--text-xs); padding: 5px 10px; }
  .dl-fab { right: var(--gutter); bottom: max(var(--space-4), env(safe-area-inset-bottom)); }
}