/* 首屏：顶栏和分拣工作台共享一层氛围。 */
.top { position: relative; isolation: isolate; overflow-x: clip; background: linear-gradient(180deg, var(--hero-top), var(--bg) 68%); color: var(--text); }
html.nav-open .top:has(> .site-header) { z-index: 50; overflow: visible; }
.atmos { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.atmos--glow {
  background:
    radial-gradient(560px 460px at 71% 54%, var(--accent-haze), var(--clear) 70%),
    radial-gradient(420px 360px at 82% 30%, var(--lilac-haze), var(--clear) 72%),
    radial-gradient(300px 220px at 46% 92%, var(--warn-haze), var(--clear) 75%);
}
.atmos--dots {
  background-image: radial-gradient(circle, var(--dot) 1px, var(--clear) 1.5px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 34% 46% at 71% 52%, var(--bg-2), var(--clear));
  opacity: .55;
}
.atmos--fade { background: linear-gradient(180deg, var(--clear) 70%, var(--bg)); }
.hero { position: relative; height: max(700px, calc(100vh - var(--header-h) - 44px)); }
.hero__in {
  height: 100%; padding-block-end: 24px; display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); align-items: center; gap: 32px;
}
.lead { min-width: 0; max-width: 560px; }
.badge {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; max-width: 100%;
  padding: 7px 14px 7px 10px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--glass); color: var(--muted); font: 500 var(--size-mono)/1.2 var(--font-mono); letter-spacing: .02em;
}
.badge b { color: var(--text); font-weight: 600; }
.badge__dot, .sb-dot, .tab-light {
  flex: none; width: 8px; height: 8px; border-radius: var(--r-round);
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 14px var(--accent-glow);
}
.h1 { margin: 26px 0 0; line-height: 1.1; }
.h1__brand { display: block; }
.h1__kw {
  position: relative; isolation: isolate; display: inline-block; margin-top: .08em;
  padding: .06em .22em .1em; transform: translateY(.34em) rotate(-3deg); transform-origin: 0 100%;
}
.h1__kw::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 1px solid var(--clear); border-radius: var(--r-card);
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--edge) border-box;
  box-shadow: 0 20px 38px -18px var(--shadow), 0 0 34px -14px var(--accent-glow);
}
.h1__kw-t { color: var(--accent); }
@supports (background-clip: text) {
  .h1__kw-t { background: var(--keyword-fill); background-clip: text; color: var(--clear); }
}
.h1__sub { display: block; margin: 1.25em 0 0; font: 700 clamp(16px, 1.7vw, 22px)/1.3 var(--font-body); color: var(--muted); }
.desc { margin: 20px 0 0; max-width: 540px; font-size: 16.5px; line-height: 1.75; color: var(--muted); }
.desc strong { color: var(--text); background: linear-gradient(180deg, var(--clear) 64%, var(--accent-soft) 64%); }
.desc code { color: var(--text); font-size: .9em; }
.actions, .get-actions, .plat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.actions, .get-actions { margin-top: 30px; }
.get-note {
  display: inline-block; max-width: 100%; margin: 14px 0 0; padding: 7px 13px;
  border: 1px solid var(--line); border-radius: var(--r-note);
  background: var(--glass); color: var(--muted); font: 500 var(--size-mono)/1.3 var(--font-mono);
}
.get-note [data-pkg-ver] { color: var(--text); font-weight: 600; }
.platforms { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); max-width: 520px; }
.tiers {
  display: inline-flex; flex-wrap: wrap; align-items: center; max-width: 100%; margin: 0;
  border: 1px solid var(--line); border-radius: var(--r-note); font: 600 12px/1.25 var(--font-mono);
}
.tiers__k { padding: 6px 10px; color: var(--accent); background: var(--accent-tint); border-radius: var(--r-pill); }
.tiers__v { padding: 6px 10px; color: var(--muted); }
.plat-list { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 14px 0 0; padding: 0; }
.plat { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.plat:hover { color: var(--text); text-decoration: underline; }
.plat svg { width: 17px; height: 17px; color: var(--text); opacity: .85; }

.scene { position: relative; width: 100%; max-width: 720px; aspect-ratio: 740 / 640; justify-self: end; }
.scene::before {
  content: ""; position: absolute; inset: 8% -4% 6% 14%; z-index: -1;
  border-radius: var(--r-round); background: radial-gradient(closest-side, var(--accent-haze), var(--clear));
}
.scene__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rule-card {
  position: absolute; z-index: 1; max-width: 100%; padding: 11px 15px 12px;
  border: 1px solid var(--clear); border-radius: var(--r-card);
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--edge) border-box;
  box-shadow: var(--lift); color: var(--muted); font: 500 12px/1.8 var(--font-mono);
}
.rule-card--a { inset: 3% auto auto -1%; transform: rotate(-4deg); }
.rule-card--b { inset: 60% -1% auto auto; transform: rotate(3deg); }
.rule-card__head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; font-size: 10.5px; letter-spacing: .16em; }
.rule-card__head .sb-dot { width: 6px; height: 6px; }
.rc-line { display: block; }
.rk { color: var(--text); font-weight: 700; }
.pol--proxy { color: var(--accent); font-weight: 700; }
.pol--direct { color: var(--lilac); font-weight: 700; }

.f-cyan { fill: var(--accent); }
.f-cyan-dark { fill: var(--accent-dark); }
.f-cyan-deep { fill: var(--accent-deep); }
.f-lilac { fill: var(--lilac); }
.f-lilac-l { fill: var(--lilac-light); }
.f-lilac-d { fill: var(--lilac-deep); }
.f-lilac-dd { fill: var(--lilac-deeper); }
.f-panel { fill: var(--bg-panel); }
.f-panel2 { fill: var(--bg-2); }
.f-paper { fill: var(--text); }
.f-warn { fill: var(--warn); }
.f-none { fill: none; }
.s-ink { stroke: var(--bg-2); stroke-width: 3.5; stroke-linejoin: round; }
.s-warn { stroke: var(--warn); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.s-post { stroke: var(--border); stroke-width: 4; stroke-linecap: round; }
.s-glint { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; opacity: .45; fill: none; }
.s-flap { stroke: var(--lilac-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.s-belt { stroke: var(--lilac-deep); stroke-width: 2; stroke-dasharray: 10 8; fill: none; }
.star { stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; opacity: .5; fill: none; }
.o-contact { fill: var(--bg-2); opacity: .5; }
.st-beam-0 { stop-color: var(--accent); stop-opacity: .2; }
.st-beam-1 { stop-color: var(--accent); stop-opacity: 0; }
.t-label { font: 700 14px/1 var(--font-mono); letter-spacing: .08em; }
.t-dark { fill: var(--bg-2); }
.t-warn { fill: var(--warn); }
.env { animation: belt 9s linear infinite; }
.env--2, .led--2 { animation-delay: -3s; }
.env--3, .led--3 { animation-delay: -6s; }
.led { opacity: .42; animation-name: lamp; animation-duration: 9s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
@keyframes belt {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 1; }
  78% { transform: translate(290px, 0); opacity: 1; }
  92%, 100% { transform: translate(330px, 38px); opacity: 0; }
}
@keyframes lamp { 0%, 76%, 100% { opacity: .42; } 86% { opacity: 1; } }
.preview-page :is(.env, .led) { animation: none; }
.preview-page .env--1 { transform: translate(20px, 0); }
.preview-page .env--2 { transform: translate(120px, 0); }
.preview-page .env--3 { transform: translate(220px, 0); }
.preview-page .led { opacity: .85; }

.statusbar { position: relative; background: var(--bg-2); color: var(--muted); border-top: 1px solid var(--line); }
.statusbar::before { content: ""; position: absolute; inset: -1px 0 auto; height: 1px; background: var(--edge); opacity: .35; }
.statusbar__in {
  min-height: 56px; padding-block: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 36px;
  font: 500 12px/1.4 var(--font-mono);
}
.sb-item { display: inline-flex; align-items: center; gap: 8px; }
.sb-item b { color: var(--text); font-weight: 600; }
.sb-dot { width: 7px; height: 7px; box-shadow: 0 0 8px var(--accent-glow); }

/* 通用交互与文档排版 */
.tab-ledger { display: grid; grid-template-columns: minmax(210px, .7fr) minmax(0, 2fr); gap: var(--gap); align-items: start; }
.tab-ledger > * { min-width: 0; }
[role="tablist"] { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px; min-width: 0; }
.tab-ledger [role="tablist"] { flex-direction: column; }
[role="tab"] {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 44px;
  padding: 8px 12px; border: 1px solid var(--line); border-inline-start: 3px solid var(--line);
  border-radius: var(--r-btn); color: var(--text); background: var(--bg-panel);
  text-align: start; cursor: pointer;
}
[role="tab"]:hover { background: var(--bg-2); color: var(--text); }
[role="tab"][aria-selected="true"] { border-inline-start-color: var(--accent); background: var(--bg-2); color: var(--accent); }
[role="tab"]:disabled { cursor: default; }
.tab-num { color: var(--muted); font: 600 var(--size-mono)/1 var(--font-mono); }
.tab-light { margin-inline-start: auto; visibility: hidden; }
[aria-selected="true"] .tab-light { visibility: visible; }
.tab-body { position: relative; isolation: isolate; overflow-x: clip; }
.tab-body::after {
  content: ""; position: absolute; inset: auto 0 0 auto; z-index: -1; width: min(55%, 340px); height: 140px;
  clip-path: polygon(100% 0, 100% 100%, 4% 100%); background: linear-gradient(135deg, var(--clear), var(--accent-tint));
}
.tab-body + .tab-body { margin-block-start: 16px; }
.sample-slot { margin-block-start: 20px; border-block-start: 1px solid var(--line); padding-block-start: 14px; }
.sample-slot pre { margin-block-end: 0; }
.toc {
  width: fit-content; max-width: 100%; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg-2); color: var(--text);
}
.toc ul { display: flex; flex-wrap: wrap; gap: 4px 12px; list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: 6px; text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.section-id {
  display: inline-flex; gap: 7px; align-items: center; max-width: 100%; padding: 6px 11px;
  border-radius: var(--r-pill); background: var(--accent); color: var(--bg-2);
  font: 750 var(--size-mono)/1.25 var(--font-mono);
}
.sec--ink .section-id { background: var(--bg-2); color: var(--text); }
.doc-spread { display: grid; grid-template-columns: minmax(185px, .65fr) minmax(0, 2fr); gap: clamp(20px, 4vw, 64px); align-items: start; }
.doc-spread > * { min-width: 0; }
.doc-spread > .toc { position: sticky; inset-block-start: 20px; max-height: calc(100dvh - 40px); overflow-y: auto; }
.doc-spread > .toc ul { flex-direction: column; }
.doc-spread > .toc.toc--static { position: static; max-height: none; }
.numbered-chapter + .numbered-chapter { margin-block-start: clamp(40px, 6vw, 80px); }
.numbered-chapter > h2 { margin-block-start: .45em; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text);
}
.faq-item + .faq-item { margin-block-start: 10px; }
.faq-item summary {
  position: relative; display: flex; align-items: center; min-height: 52px;
  padding: 12px 48px 12px 16px; list-style: none; font-weight: 750; cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "＋"; position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-family: var(--font-mono);
}
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 10px 16px 16px; border-block-start: 1px solid var(--line); }
.faq-answer > :last-child { margin-block-end: 0; }
.term-card dt { font: 750 var(--size-h3)/1.25 var(--font-mono); }
.term-card dd { margin: .6em 0 0; color: var(--muted); }
.article-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.article-card h3, .article-card p { margin: 0; }
.article-card .article-card__more { margin-block-start: auto; color: var(--accent); }
.callout {
  margin: 1em 0; padding: 16px 20px; border-inline-start: 3px solid var(--accent);
  border-radius: var(--r-card); background: var(--bg-panel); color: var(--text);
}
.callout--warn { border-inline-start-color: var(--warn); }
.callout > :last-child { margin-block-end: 0; }
.callout a, .store-guide a:not(.btn) { color: var(--accent); }

.store-button { justify-content: flex-start; min-height: 52px; text-align: start; }
.store-button svg { width: 22px; height: 22px; }
.store-button__label { display: grid; gap: 3px; }
.store-button__label small { font: 700 var(--size-mono)/1 var(--font-mono); }
.store-guide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.store-guide > div { flex: 1 1 260px; }
.store-guide p { margin: 0; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; list-style: none; padding: 0; margin: 12px 0; }
.fact, .tag {
  display: inline-block; max-width: 100%; padding: 5px 9px; border: 1px solid var(--line); border-radius: var(--r-note);
  background: var(--glass); color: var(--text); font: 600 var(--size-mono)/1.35 var(--font-mono);
}
.tag { color: var(--accent); background: var(--accent-tint); }
.plat-grid { display: flex; flex-wrap: wrap; gap: var(--gap); }
.plat-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 12px;
  flex: 1 1 30%; min-width: 0; max-width: calc((100% - var(--gap)) / 2);
}
.plat-card > :is(h2, h3, p) { margin: 0; }
.plat-card .plat-actions { margin-block-start: auto; padding-block-start: 6px; order: 2; }
.plat-card::before { content: none; }
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"][data-mine]::before,
html[data-visitor-os="mac"] .plat-card[data-plat="mac"][data-mine]::before,
html[data-visitor-os="windows"] .plat-card[data-plat="windows"][data-mine]::before,
html[data-visitor-os="android"] .plat-card[data-plat="android"][data-mine]::before,
html[data-visitor-os="linux"] .plat-card[data-plat="linux"][data-mine]::before {
  content: attr(data-mine); align-self: flex-start; padding: 4px 8px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--bg-2); font: 700 var(--size-mono)/1.2 var(--font-mono);
}
.device-entry { display: flex; align-items: flex-start; gap: 16px; text-decoration: none; }
.device-entry svg { width: 32px; height: 38px; color: var(--accent); }
.device-entry p { margin: 0; color: var(--muted); }
.device-entry:hover h3 { text-decoration: underline; }
.wx-open-tip {
  position: fixed; z-index: 45; inset: auto auto calc(84px + env(safe-area-inset-bottom)) 50%;
  transform: translateX(-50%); width: max-content; max-width: calc(100% - var(--gutter) * 2);
  padding: 14px 18px; border: 1px solid var(--warn); border-radius: var(--r-card);
  background: var(--bg-2); color: var(--text); box-shadow: var(--lift);
}
.shot-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.official-shot { width: min(100%, 280px); flex-shrink: 0; margin: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot img, .shot-sample { outline: 1px solid var(--line); outline-offset: -1px; }
.official-shot figcaption { margin-top: 8px; color: var(--muted); font-size: var(--size-small); }
.shot-sample { display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334; border-radius: var(--r-shot); background: var(--bg-panel); color: var(--muted); text-align: center; }

.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; }
.data-table, .prose table, .doc-spread table {
  border-collapse: collapse; margin-block: 12px; text-align: start;
}
.prose table, .doc-spread table, .data-table {
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0;
}
.table-scroll > .data-table { display: table; width: 100%; overflow: visible; }
:is(.data-table, .prose table, .doc-spread table) :is(th, td) {
  min-width: 7em; padding: 10px 14px; border: 1px solid var(--border);
  vertical-align: top; text-align: start; overflow-wrap: normal; word-break: normal;
}
:is(.data-table, .prose table, .doc-spread table) th { background: var(--bg-panel); color: var(--text); }
:is(.data-table, .prose table, .doc-spread table) th[scope="row"] { width: 1%; white-space: nowrap; }

.dl-fab {
  position: fixed; inset: auto max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) auto;
  z-index: 30; display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px;
  border: 1px solid var(--clear); border-radius: var(--r-pill);
  background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--edge) border-box;
  color: var(--text); font: 700 var(--size-small)/1 var(--font-body); text-decoration: none;
  box-shadow: var(--lift); transition: transform var(--quick);
}
.dl-fab:hover { transform: translateY(-2px); }
.dl-fab__ic {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px;
  border-radius: var(--r-round); background: var(--cta-fill); color: var(--bg-2);
  box-shadow: inset 0 1px 0 var(--gloss);
}
.dl-fab__ic svg { width: 16px; height: 16px; }

@media (max-width: 1040px) {
  .hero { height: auto; }
  .hero__in { grid-template-columns: minmax(0, 1fr); padding-block: 36px 84px; gap: 48px; }
  .scene { justify-self: center; max-width: 640px; }
}
@media (max-width: 900px) {
  .plat-card { flex-basis: 43%; max-width: none; }
}
@media (max-width: 768px) {
  .tab-ledger, .doc-spread { grid-template-columns: minmax(0, 1fr); }
  .tab-ledger [role="tablist"] { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; }
  .tab-ledger [role="tab"] { flex: 0 0 auto; border-radius: var(--r-pill); }
  .doc-spread > .toc { position: static; max-height: none; }
  .doc-spread > .toc ul { flex-direction: row; }
}
@media (max-width: 640px) {
  .hero__in { padding-block: 18px 48px; gap: 26px; }
  .hero .badge { margin-bottom: 0; }
  .h1 { margin-block-start: 17px; }
  .desc { margin-block-start: 13px; font-size: 15.5px; line-height: 1.6; }
  .hero .get-actions { margin-block-start: 18px; }
  .platforms { margin-block-start: 18px; padding-block-start: 12px; }
  .rule-card { font-size: 9.5px; padding: 6px 8px; }
  .rule-card__head { font-size: 9px; }
  .rule-card--a, .rule-card--b { transform: none; }
  .rule-card--a { inset-inline-start: 0; }
  .rule-card--b { inset: auto 0 1% auto; }
  .plat-card { flex-basis: 100%; }
  .facts { justify-content: center; }
  .shot-row { flex-direction: column; align-items: center; }
  #install table, table#install {
    display: block; width: 100%; max-width: 100%; overflow-x: auto;
  }
  #install table thead, table#install thead { display: none; }
  #install table :is(tbody, tr, th, td), table#install :is(tbody, tr, th, td) {
    display: block; min-width: 0; width: auto; white-space: normal;
  }
  #install table tr + tr, table#install tr + tr { margin-block-start: 12px; }
  #install table code, table#install code {
    display: inline-block; max-width: 100%; overflow-x: auto; vertical-align: bottom;
    white-space: pre; word-break: normal; overflow-wrap: normal;
  }
  .dl-fab {
    inset: auto max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) auto;
    width: 52px; height: 52px; justify-content: center; padding: 0;
  }
  .dl-fab__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .env, .led { animation: none; }
  .env--1 { transform: translate(20px, 0); }
  .env--2 { transform: translate(120px, 0); }
  .env--3 { transform: translate(220px, 0); }
  .led { opacity: .85; }
}

/* 预览页专用样品架。 */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; list-style: none; padding: 0; }
.swatches li { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-card); }
.swatches i { display: block; height: 44px; margin-block-end: 5px; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--sample); color: var(--bg-2); }
.sw-bg { --sample: var(--bg); }
.sw-panel { --sample: var(--bg-panel); }
.sw-panel2 { --sample: var(--bg-2); }
.sw-border { --sample: var(--border); }
.sw-accent { --sample: var(--accent); }
.sw-accent-dark { --sample: var(--accent-dark); }
.sw-text { --sample: var(--text); }
.sw-muted { --sample: var(--muted); }
.sw-success { --sample: var(--success); }
.sw-warn { --sample: var(--warn); }
.sw-error { --sample: var(--error); }
.sw-lilac { --sample: var(--lilac); }
.sw-tint { --sample: var(--layer-tint); }
.sw-ink { --sample: var(--layer-ink); }
.sw-edge { --sample: var(--edge); }
.type-sample { font: 900 var(--size-h1)/1.1 var(--font-display); }
.preview-group { margin-block-start: 24px; }
.preview-focus { outline: 2px solid var(--focus); outline-offset: 3px; }