/* 首屏：装饰独立裁切，页头浮层保持可见。 */
.first { position: relative; isolation: isolate; overflow-x: clip; background: var(--hero-gradient); color: var(--text); }
.first::before, .first::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.first::before {
  z-index: -2; background-image: var(--hero-dots); background-size: 24px 24px; background-position: 12px 12px;
  -webkit-mask-image: var(--hero-mask); mask-image: var(--hero-mask);
}
.first::after { z-index: -1; background: var(--hero-fade); color: var(--text); }
.atmo-glow { position: absolute; z-index: -2; pointer-events: none; border-radius: var(--r-round); }
.atmo-glow--main { width: 900px; height: 760px; left: calc(50% - 760px); top: 120px; background: var(--glow-main); color: var(--text); }
.atmo-glow--deep { width: 520px; height: 420px; left: calc(50% - 160px); top: 360px; background: var(--glow-deep); color: var(--text); }
.atmo-glow--warm { width: 520px; height: 300px; right: -120px; top: -140px; background: var(--glow-warm); color: var(--text); }
.hero-grid {
  min-height: max(720px, calc(100svh - var(--head-h) - 44px));
  display: grid; grid-template-columns: minmax(0,648fr) minmax(0,512fr); column-gap: 72px;
  align-items: center; align-content: center; padding-top: 28px; padding-bottom: 40px;
}
.stage {
  position: relative; aspect-ratio: 648 / 600; border-radius: var(--r-stage);
  background: var(--bg-ink); color: var(--on-ink); overflow: hidden;
  isolation: isolate; box-shadow: var(--shadow-stage); container-type: inline-size;
}
.stage::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: var(--shadow-stage-edge); z-index: 5;
}
.st-blue { position: absolute; inset: 0; background: var(--accent); color: var(--on-ink); clip-path: polygon(0 0,52% 0,72% 100%,0 100%); }
.st-green {
  position: absolute; top: 0; right: 6.2%; width: 11%; height: 56%;
  display: flex; justify-content: center; align-items: flex-end; padding-bottom: 3.6cqw;
  background: var(--success); color: var(--bg-ink);
}
.st-green span { writing-mode: vertical-rl; font: var(--weight-poster) 9.2cqw/1 var(--font-display); letter-spacing: -.02em; }
.st-orange {
  position: absolute; left: 71%; right: 0; bottom: 16%; height: 6.8%;
  display: flex; align-items: center; padding-left: 2.6cqw; background: var(--warn); color: var(--bg-ink);
}
.st-orange span { font: var(--weight-display) 1.95cqw/1 var(--font-display); letter-spacing: .26em; }
.st-proxy {
  position: absolute; left: -2cqw; bottom: -6.2cqw; margin: 0;
  font: var(--weight-poster) 20cqw/.8 var(--font-display); letter-spacing: -.04em; white-space: nowrap;
}
.st-ring {
  position: absolute; left: 42%; top: 20.5%; width: 36%; aspect-ratio: 1;
  border: 2px solid var(--on-ink); border-radius: var(--r-round); transform: rotate(38deg);
  z-index: 2; animation: ring-turn 56s linear infinite;
}
.st-ring::after {
  content: ""; position: absolute; left: 50%; top: 0; width: 2.1cqw; height: 2.1cqw;
  border-radius: var(--r-round); background: var(--on-ink); color: var(--bg-ink);
  transform: translate(-50%,-50%); box-shadow: var(--shadow-ring);
}
@keyframes ring-turn { from { transform: rotate(38deg); } to { transform: rotate(398deg); } }
.st-final { position: absolute; right: 4.6cqw; bottom: 4.4cqw; font: 1.85cqw/1.6 var(--font-mono); letter-spacing: .06em; color: var(--ink-muted); }
.copy { min-width: 0; }
.hero h1 { margin-top: 22px; }
.hero .kw {
  display: inline-block; position: relative; padding-right: .08em; white-space: nowrap;
  font-style: italic; color: var(--accent-dark);
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero .kw { background: var(--gradient-word); -webkit-background-clip: text; background-clip: text; color: var(--clear); }
}
.hero .kw::after {
  content: ""; position: absolute; left: .02em; right: .16em; bottom: -.04em;
  height: 6px; border-radius: var(--r-line); background: var(--accent); color: var(--on-ink);
}
.lede { margin: 24px 0 0; max-width: 31em; font-size: 1.0625rem; line-height: 1.78; color: var(--text-muted); }
.lede strong { color: var(--text); font-weight: 650; }
.lede code { font-size: .84em; padding: 1px 6px; border: 1px solid var(--border); }
.badge, .eyebrow, .fact, .pf-chip {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%;
  padding: 5px 12px; border: 1px solid var(--border); border-radius: var(--r-note);
  background: var(--bg-panel); color: var(--text-muted); font-size: var(--fs-small);
}
.badge {
  min-height: 32px; padding: 3px 14px 3px 12px; gap: 9px;
  background: var(--badge-bg); color: var(--text-muted); box-shadow: var(--shadow-soft); font-weight: 500;
}
.badge b, .fact b { color: var(--text); font-weight: 650; }
.eyebrow { min-height: 28px; padding-block: 2px; font-weight: 600; }
.state-dot, .blue-dot {
  width: 6px; height: 6px; flex: none; border-radius: var(--r-round); background: var(--success); color: var(--text);
}
.state-dot { box-shadow: var(--shadow-state); }
.blue-dot { background: var(--accent); color: var(--on-ink); }
.actions, .get-actions, .plat-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.hero .get-actions, .hero .actions { margin-top: 32px; }
.get-note {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin: 16px 0 0;
  padding: 5px 13px 5px 11px; border-radius: var(--r-note); border: 1px solid var(--border);
  background: var(--note-bg); color: var(--text-muted); font-size: var(--fs-small);
}
.get-note [data-pkg-ver] { font: .96em var(--font-mono); color: var(--text); }
.get-note [data-pkg-ver]:empty { display: none; }
.free, .pf-chip .free { color: var(--free-text); font-weight: 650; }
.platforms { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border); }
.platforms-label {
  display: block; margin-bottom: 12px; font-size: .75rem; font-weight: 600;
  letter-spacing: .1em; color: var(--text-muted);
}
.pf-row, .fact-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
  list-style: none; padding: 0; margin: 0;
}
.pf-row li { min-width: 0; }
.pf-row a { display: inline-flex; align-items: center; gap: 7px; font-size: .875rem; font-weight: 500; }
.pf-row a:hover { text-decoration: underline; }
.pf-row svg { width: 16px; height: 16px; color: var(--text-muted); }
.pf-chip { margin-top: 14px; font-size: .78125rem; }
.pf-chip b { color: var(--accent-dark); font-weight: 700; }
.fact-row { gap: 8px; }
.fact code { padding: 0; }
.peek { padding-top: 20px; padding-bottom: var(--section-pad); background: var(--bg); color: var(--text); }
.peek h2 { margin-top: 18px; font-size: clamp(24px, 3vw, 32px); }
.peek p { margin: 12px 0 0; max-width: 40em; color: var(--text-muted); }

/* 功能索引与详情 */
.feature-tabs { display: grid; grid-template-columns: minmax(12rem,.75fr) minmax(0,2.25fr); gap: clamp(18px,4vw,56px); align-items: start; }
.feature-tabs > * { min-width: 0; }
[role="tablist"] { display: flex; gap: 6px; flex-wrap: wrap; }
[role="tablist"][aria-orientation="vertical"] { flex-direction: column; }
[role="tab"] {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; min-width: 0; max-width: 100%; padding: 10px 14px;
  border: 0; border-inline-start: 3px solid var(--clear); border-radius: var(--r-menu);
  background: var(--bg); color: var(--text); text-align: start;
}
[role="tab"] small { display: block; color: var(--text-muted); }
[role="tab"][aria-selected="true"], [role="tab"]:hover {
  border-inline-start-color: var(--accent); background: var(--tint); color: var(--accent-dark);
}
.feature-panel { padding: 0; }
.feature-body { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; }
.feature-body:has(.official-shot) { grid-template-columns: minmax(0,1fr) minmax(0,280px); }
.feature-body > * { min-width: 0; }
.feature-copy { padding: clamp(20px,4vw,42px); }
.feature-body > .official-shot { margin: 0; align-self: center; }
.rule-strip { margin-bottom: 0; }
.rule-strip b { color: var(--accent-dark); }

/* 长文、章节与问答 */
.toc { width: fit-content; max-width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-menu); background: var(--bg-panel); color: var(--text); }
.toc ul { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; list-style: none; }
.toc a { display: block; min-height: 44px; padding: 10px 12px; border-radius: var(--r-chip); }
.toc a:hover { background: var(--bg); color: var(--accent-dark); text-decoration: underline; }
.doc-split { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); align-items: start; gap: clamp(20px,5vw,64px); }
.doc-split > .toc { position: sticky; top: 24px; max-height: calc(100svh - 48px); overflow-y: auto; }
.doc-split > .toc.is-static { position: static; max-height: none; }
.doc-split > .toc ul { flex-direction: column; }
.number-label {
  display: inline-flex; gap: 8px; align-items: baseline; max-width: 100%; margin-bottom: 12px;
  padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-ink); font: 600 var(--fs-small)/1.5 var(--font-mono);
}
.sec--ink .number-label { background: var(--ink-link); color: var(--bg-ink); }
.doc-section + .doc-section { margin-top: 36px; }
.doc-section h2 { margin-bottom: 12px; }
.faq-stack { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary {
  display: flex; align-items: center; position: relative; list-style: none; min-height: 52px;
  padding: 12px 42px 12px 18px; font-weight: 650;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; inset-inline-end: 20px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--accent-dark); border-bottom: 2px solid var(--accent-dark);
  transform: translateY(-68%) rotate(45deg);
}
.faq-item[open] summary::after { transform: translateY(-25%) rotate(225deg); }
.faq-body { padding: 0 18px 16px; color: var(--text-muted); }
.faq-body > :last-child { margin-bottom: 0; }
.callout {
  margin: 20px 0; padding: 16px 20px; border-inline-start: 3px solid var(--accent);
  border-radius: var(--r-menu); background: var(--tint); color: var(--text);
  --link-here: var(--accent-dark); --focus: var(--accent);
}
.callout--warn { border-inline-start-color: var(--warn); background: var(--bg-panel); color: var(--text); }
.callout > :last-child { margin-bottom: 0; }
.term-card dt { font-family: var(--font-mono); font-weight: 650; color: var(--accent-dark); }
.term-card dd { margin: 8px 0 0; color: var(--text-muted); }
.article-card, .device-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.article-card p, .device-card p { margin: 0; color: var(--text-muted); }
.article-card > .card-tail { margin-top: auto; }
.device-card svg { width: 32px; height: 32px; color: var(--accent-dark); }
a.device-card:hover h3 { text-decoration: underline; text-underline-offset: .2em; }

/* 下载与商店 */
.store-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; min-width: 0; max-width: 100%; padding: 8px 18px;
  border: 1px solid var(--clear); border-radius: var(--r-pill);
  background: var(--text); color: var(--on-ink); box-shadow: var(--shadow-fab); line-height: 1.25;
}
.store-btn:hover { background: var(--accent-dark); color: var(--on-ink); }
.store-btn svg { width: 23px; height: 23px; }
.store-btn small, .store-btn strong { display: block; }
.store-btn small { font-size: .75rem; }
.store-guide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.store-guide > div { flex: 1 1 18rem; min-width: 0; }
.download-hero [data-os-pick] { min-height: 56px; }
.plat-grid { display: flex; flex-wrap: wrap; gap: var(--gap); }
.plat-card { display: flex; flex-direction: column; gap: 12px; flex: 1 1 calc((100% - var(--gap) * 2) / 3); min-width: 0; }
.plat-card > p { margin: 0; }
.plat-card > .plat-actions { margin-top: auto; order: 2; }
.plat-card > .plat-note { color: var(--text-muted); order: 1; font-size: .875rem; }
html[data-visitor-os="ios"] .plat-card[data-plat="ios"] { order: -1; }
html[data-visitor-os="mac"] .plat-card[data-plat="mac"] { order: -1; }
html[data-visitor-os="windows"] .plat-card[data-plat="windows"] { order: -1; }
html[data-visitor-os="android"] .plat-card[data-plat="android"] { order: -1; }
html[data-visitor-os="linux"] .plat-card[data-plat="linux"] { order: -1; }
html[data-visitor-os="ios"] .plat-card[data-plat="ios"]::before,
html[data-visitor-os="mac"] .plat-card[data-plat="mac"]::before,
html[data-visitor-os="windows"] .plat-card[data-plat="windows"]::before,
html[data-visitor-os="android"] .plat-card[data-plat="android"]::before,
html[data-visitor-os="linux"] .plat-card[data-plat="linux"]::before {
  content: attr(data-mine); align-self: flex-start; max-width: 100%; padding: 4px 10px;
  border-radius: var(--r-menu); background: var(--tint); color: var(--accent-dark); font-size: var(--fs-small);
}
.wx-open-tip {
  position: fixed; z-index: 65; inset-inline: 0; margin-inline: auto;
  bottom: calc(var(--fab-bottom) + 64px); width: max-content; max-width: calc(100% - var(--gutter) * 2);
  border: 1px solid var(--warn); border-radius: var(--r-note);
  padding: 12px 18px; background: var(--bg-ink); color: var(--on-ink); box-shadow: var(--shadow-menu);
}
.dl-fab {
  position: fixed; right: max(var(--fab-edge),env(safe-area-inset-right)); bottom: var(--fab-bottom);
  z-index: 30; display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  padding: 0 18px 0 6px; border-radius: var(--r-pill);
  background: var(--text); color: var(--on-ink); font-size: .875rem; font-weight: 600;
  box-shadow: var(--shadow-fab); transition: transform var(--ease);
}
.dl-fab:hover { transform: translateY(-2px); }
.dl-fab .fab-ico {
  width: 32px; height: 32px; flex: none; border-radius: var(--r-round); display: grid; place-items: center;
  background: var(--gradient-cta); color: var(--on-ink);
}
.dl-fab svg { width: 15px; height: 15px; }

/* 原图、表格与预览样本 */
.shot-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: var(--gap); }
.official-shot { width: min(100%, 280px); flex-shrink: 0; min-width: 0; margin: 0 auto; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot :is(img,.shot-sample) { outline: 1px solid var(--border); outline-offset: -1px; box-shadow: var(--shadow-card); }
.official-shot figcaption { margin-top: 8px; color: var(--text-muted); font-size: var(--fs-small); text-align: center; }
.shot-sample {
  display: grid; place-items: center; aspect-ratio: 750 / 1334; width: 100%; border-radius: var(--r-shot);
  background: var(--tint); color: var(--accent-dark); font-family: var(--font-mono); text-align: center;
}
.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; }
:is(.prose,.doc-body,.article-body,.doc-section) table {
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0;
}
.data-table { width: 100%; }
:is(.data-table,.prose table,.doc-body table,.article-body table,.doc-section table) {
  border-collapse: collapse; background: var(--bg); color: var(--text); text-align: start;
}
:is(.data-table,.prose table,.doc-body table,.article-body table,.doc-section table) :is(th,td) {
  min-width: 7em; padding: 12px 14px; text-align: start; vertical-align: top;
  border-bottom: 1px solid var(--border); word-break: normal; overflow-wrap: normal;
}
:is(.data-table,.prose table,.doc-body table,.article-body table,.doc-section table) th { background: var(--bg-panel); color: var(--text); }
th[scope="row"] { width: 1%; white-space: nowrap; }
.table-scroll:focus-visible { outline-offset: -2px; }

.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,9rem),1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.swatch-grid li { min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-menu); }
.swatch-grid li::before { content: ""; display: block; height: 42px; margin-bottom: 8px; border-radius: var(--r-chip); background: var(--sample); color: var(--text); border: 1px solid var(--border); }
.sw-bg { --sample: var(--bg); } .sw-panel { --sample: var(--bg-panel); }
.sw-ink { --sample: var(--bg-ink); } .sw-border { --sample: var(--border); }
.sw-accent { --sample: var(--accent); } .sw-deep { --sample: var(--accent-dark); }
.sw-text { --sample: var(--text); } .sw-muted { --sample: var(--text-muted); }
.sw-ok { --sample: var(--success); } .sw-warn { --sample: var(--warn); } .sw-error { --sample: var(--error); }
.sw-dot { --sample: var(--dot); } .sw-tint { --sample: var(--tint); } .sw-white { --sample: var(--on-ink); }
.sw-ink-muted { --sample: var(--ink-muted); } .sw-ink-link { --sample: var(--ink-link); }
.type-sample { font-size: var(--fs-h1); }
.sample-tools { display: none; }
.sample-block + .sample-block { margin-top: 32px; }

@media (max-width: 1280px) {
  .sample-tools { display: flex; margin-inline-start: auto; }
}
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0,1fr); row-gap: 48px; min-height: 0; padding-top: 32px; padding-bottom: 56px; }
  .hero-grid .copy { grid-row: 1; }
  .hero-grid .stage { grid-row: 2; }
  .atmo-glow--main { left: -200px; top: auto; bottom: -120px; }
}
@media (max-width: 820px) {
  .lede { font-size: var(--fs-body); }
  .hero h1 { font-size: var(--fs-h1-small); }
  .feature-tabs { grid-template-columns: minmax(0,1fr); }
  .feature-tabs [role="tablist"] {
    flex-direction: row; flex-wrap: nowrap; overflow-x: auto; max-width: 100%;
    scroll-padding-inline: 4px; padding: 4px;
  }
  .feature-tabs [role="tab"] { flex: 0 0 auto; border-radius: var(--r-pill); border-inline-start: 0; }
  .doc-split { grid-template-columns: minmax(0,1fr); }
  .doc-split > .toc { position: static; max-height: none; overflow: visible; }
  .doc-split > .toc ul { flex-direction: row; }
  .plat-card { flex-basis: calc((100% - var(--gap)) / 2); }
}
@media (max-width: 640px) {
  .hero .get-actions, .hero .actions { margin-top: 22px; }
  .fact-row, .pf-row { flex-wrap: wrap; justify-content: center; }
  .pf-row { gap: 8px 14px; }
  .feature-body:has(.official-shot) { grid-template-columns: minmax(0,1fr); }
  .feature-body > .official-shot { margin: 0 auto 18px; }
  .shot-row { flex-direction: column; align-items: center; }
  .plat-card { flex-basis: 100%; }
  #install :is(table,tbody,tr,td,th[scope="row"]) { display: block; min-width: 0; width: auto; }
  #install thead { display: none; }
  #install tr + tr { margin-top: 16px; }
  #install td { overflow-x: auto; max-width: 100%; }
  #install td code { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
  .dl-fab { width: 52px; height: 52px; min-height: 52px; padding: 0; justify-content: center; border-radius: var(--r-round); }
  .dl-fab .fab-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .st-ring { animation: none; }
}
@media (forced-colors: active) {
  .hero .kw { background: none; color: inherit; }
}