/* 首屏按照确认稿保留自然高度，不使用整屏最小高度。 */
.lede {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 60px 24px 56px;
  text-align: center;
}
.lede-floor {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: -1;
  height: 66%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, var(--clear) 0%, var(--mask-solid) 58%, var(--mask-solid) 100%);
  mask-image: linear-gradient(to bottom, var(--clear) 0%, var(--mask-solid) 58%, var(--mask-solid) 100%);
  animation: floorIn 1.6s ease-out both;
}
.lede-floor svg { display: block; width: 100%; height: 100%; }
.lede-floor path { fill: none; stroke: var(--bg-panel-2); stroke-width: 1.25; }
.lede-floor .floor-horizon { stroke: var(--border); }
@keyframes floorIn { from { opacity: 0; } to { opacity: 1; } }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 30px;
  margin: 0 0 22px;
  padding: 4px 14px 4px 12px;
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  box-shadow: var(--shadow-chip);
}
.badge-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.lede h1 { margin-bottom: 28px; }
.lede-note { max-width: 780px; margin: 0 auto 40px; color: var(--text-muted); font-size: 16px; line-height: 1.65; }
.lede-note strong { color: var(--text); font-weight: var(--weight-medium); }
.hero-app-shot {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 10px;
  box-shadow: var(--shadow-slab);
}
.ruleslab {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 28px 18px;
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-slab);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-slab);
  text-align: left;
}
.ruleslab-tag { margin: 0 0 6px; color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: var(--track-code); }
.rule-lines {
  max-width: 100%;
  margin: 0;
  padding: 0 0 2px;
  overflow-x: auto;
  list-style: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 2;
  font-variant-ligatures: none;
  overscroll-behavior-inline: contain;
}
.rule-ln { white-space: nowrap; }
.rule-ln.is-live { color: var(--text); }
.rule-kw { color: var(--accent); }
.caret { display: inline-block; width: 1.5px; height: 1.15em; margin-left: 3px; vertical-align: -0.22em; background: var(--accent); color: var(--on-accent); animation: caretBlink 1s step-end infinite; }
@keyframes caretBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.ruleslab-foot { display: flex; justify-content: flex-end; margin-top: 4px; }
.enter-key { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-circle); background: var(--bg-panel-2); color: var(--text-muted); box-shadow: var(--shadow-key); }
.enter-key svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kw-row, .facts-row, .tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.kw-row { justify-content: center; margin-top: 18px; }
.kw-row li, .tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 30px;
  padding: 4px 14px;
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-chip);
}
.kw-row li.is-on, .tag-accent { border-color: var(--accent-line); color: var(--accent); }
.devline { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 24px; margin-top: 38px; color: var(--text-muted); font-size: 13px; }
.devline-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.devline-list li, .devline-list a { display: inline-flex; align-items: center; gap: 7px; }
.devline-list a { text-decoration: none; }
.devline-list a:hover { color: var(--accent-dark); }
.dev-ico { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.devline-sep { width: 1px; height: 16px; flex-shrink: 0; background: var(--border); color: var(--text); }
.devline-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 26px;
  padding: 3px 11px;
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.fact-pill svg { width: 12px; height: 12px; flex-shrink: 0; }
.facts-row { margin-block: 20px; }
.facts-row.is-centered { justify-content: center; }
.factband { border-block: var(--stroke) solid var(--border); background: var(--bg-panel); color: var(--text-muted); }
.factband-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1376px; height: 44px; margin: 0 auto; padding-inline: 32px; overflow: hidden; font-family: var(--font-mono); font-size: 12px; letter-spacing: var(--track-code); white-space: nowrap; }
.factband-row span { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.factband-row span::before { content: ""; width: 5px; height: 5px; flex-shrink: 0; border-radius: var(--r-dot); background: var(--border-strong); color: var(--text); }
.slab { padding: 40px 32px 0; }
.slab-panel {
  position: relative;
  max-width: 1376px;
  height: 380px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--r-panel);
  background: linear-gradient(118deg, var(--accent) 0%, var(--accent-wash) 100%);
  color: var(--text);
}
.slab-word {
  position: absolute;
  top: -62px;
  left: 44px;
  margin: 0;
  color: var(--on-accent);
  font-family: var(--font-display);
  font-size: 260px;
  font-weight: var(--weight-medium);
  line-height: 0.8;
  letter-spacing: var(--track-poster);
  white-space: nowrap;
}
.slab-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; max-width: 1376px; margin-inline: auto; padding-top: 36px; padding-bottom: 96px; }
.slab-copy > * { min-width: 0; }
.slab-copy h2 { margin: 0; }
.slab-copy p { max-width: 560px; margin: 0; color: var(--text-muted); font-size: 15px; }

/* 目录 + 图形面板。图形中的裁切字仅作装饰，不承担说明。 */
.feature-tabs { display: grid; grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.65fr); gap: 56px; align-items: start; }
.feature-tabs > * { min-width: 0; }
.feature-tabs [role="tablist"] { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
[role="tab"] {
  border: 0;
  background: var(--clear);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  cursor: pointer;
}
.feature-tabs [role="tab"] { position: relative; min-height: 64px; padding: 14px 0 14px 24px; text-align: left; font-size: 28px; line-height: 1.4; }
.feature-tabs [role="tab"]::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 2px; background: var(--clear); color: var(--text); }
.feature-tabs [role="tab"][aria-selected="true"] { color: var(--text); }
.feature-tabs [role="tab"][aria-selected="true"]::before { background: var(--accent); color: var(--on-accent); }
[role="tab"]:hover { color: var(--text); }
.tab-panel { min-width: 0; border: var(--stroke) solid var(--border); border-radius: var(--r-panel); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.tab-art { position: relative; height: 280px; overflow: hidden; border-radius: var(--r-panel) var(--r-panel) 0 0; background: linear-gradient(118deg, var(--accent), var(--accent-wash)); color: var(--text); }
.tab-art-word { position: absolute; top: -30px; left: 24px; margin: 0; font-family: var(--font-display); font-size: 180px; font-weight: var(--weight-regular); line-height: 0.9; letter-spacing: var(--track-poster); color: var(--on-accent); white-space: nowrap; }
.tab-copy { padding: 32px; }
.tab-copy p { color: var(--text-muted); }
.tabs-inline [role="tablist"] { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 4px; margin-bottom: 24px; }
.tabs-inline [role="tab"] { flex-shrink: 0; min-height: 44px; padding: 10px 20px; border: var(--stroke) solid var(--border); border-radius: var(--r-pill); font-size: 15px; }
.tabs-inline [role="tab"][aria-selected="true"] { background: var(--bg-panel); color: var(--text); }
.toc { max-width: 100%; padding-block: 16px; border-block: var(--stroke) solid var(--border); background: var(--bg); color: var(--text); }
.toc ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.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; }
.toc a:hover, .toc a[aria-current="location"] { background: var(--bg-panel); color: var(--text); }
.toc-sticky { position: sticky; top: 0; z-index: 10; }
/* 吸顶目录的直接父元素必须覆盖全部章节；空间不足时使用此静态降级类。 */
.toc-static { position: static; }
.faq-group { border: var(--stroke) solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.faq-item + .faq-item { border-top: var(--stroke) solid var(--border); }
.faq-item summary { position: relative; min-height: 64px; padding: 20px 56px 20px 24px; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 24px; top: 19px; color: var(--accent); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 24px 24px; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { height: 100%; }
.term-card dt { margin-bottom: 14px; font-family: var(--font-mono); font-size: 20px; overflow-wrap: anywhere; }
.term-card dd { margin: 0; color: var(--text-muted); }
.term-category { display: block; margin-bottom: 18px; font-size: 12px; color: var(--text-muted); }

.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
  min-height: 56px;
  padding: 10px 24px;
  border: var(--stroke) solid var(--clear);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-cta);
  text-decoration: none;
  transition: background-color var(--motion-fast) var(--ease);
}
.app-store-button:hover, .app-store-button.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.app-store-button svg { width: 25px; height: 28px; flex-shrink: 0; fill: currentColor; }
.store-button-copy { display: block; text-align: left; }
.store-button-copy small { display: block; font-size: 11px; line-height: 1.4; }
.store-button-copy strong { display: block; font-size: 16px; font-weight: var(--weight-medium); line-height: 1.5; }
.app-store-button.is-focus { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
.app-store-button[aria-disabled="true"] { background: var(--bg-panel-2); color: var(--text-muted); box-shadow: none; }
.store-guide-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 56px; }
.store-guide-card > div { flex: 1 1 260px; min-width: 0; }
.store-guide-card h2 { font-size: var(--size-h3); margin-bottom: 12px; }
.store-guide-card p { color: var(--text-muted); }

.official-shot { width: 100%; max-width: 280px; min-width: 0; margin-inline: auto; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: 10px; }
.official-shot img { outline: var(--stroke) solid var(--border); outline-offset: -1px; }
.official-shot figcaption { padding-top: 14px; color: var(--text-muted); font-size: 13px; line-height: 1.7; }
.shot-row { display: flex; justify-content: center; align-items: flex-start; gap: 32px; }
.shot-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 750 / 1334;
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-shot);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
}
.device-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; align-items: start; }
.device-card > * { min-width: 0; }
.device-card .dev-ico { width: 48px; height: 56px; color: var(--text-muted); }
.device-card p { color: var(--text-muted); margin-bottom: 20px; }
.device-card h3 { margin-bottom: 10px; }
.device-card .btn { justify-self: start; }
.article-card { display: flex; flex-direction: column; height: 100%; }
.article-card h3 a { text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-dark); }
.article-card p { color: var(--text-muted); }
.article-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; font-size: 12px; color: var(--text-muted); }
.article-card .article-link { margin-top: auto; color: var(--accent-dark); font-size: 14px; }
.callout { margin: 28px 0; padding: 24px; border: var(--stroke) solid var(--border); border-left: 2px solid var(--accent); border-radius: 0 var(--r-small) var(--r-small) 0; background: var(--bg-panel); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 10px; font-weight: var(--weight-medium); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.status::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-circle); background: currentColor; color: inherit; }
.status-success { color: var(--success-ink); }
.status-warn { color: var(--warn-ink); }
.status-error { color: var(--error); }

.table-scroll { min-width: 0; max-width: 100%; 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: var(--stroke) solid var(--border);
  vertical-align: top;
  word-break: normal;
  overflow-wrap: 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 { background: var(--bg); color: var(--text); }
.prose table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  overscroll-behavior-inline: contain;
}
.data-table code, .prose table code { overflow-wrap: anywhere; }
.dl-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 40px);
  min-height: 56px;
  padding: 12px 20px;
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-slab);
  font-size: 14px;
  text-decoration: none;
}
.dl-fab svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; }
.dl-fab:hover { border-color: var(--accent-line); color: var(--accent-dark); }
.has-article-fab .site-footer { padding-bottom: 112px; }
.fab-sample { position: static; margin-top: 24px; }

/* 仅用于根目录静态设计预览，所有色值仍来自根令牌。 */
.preview-section + .preview-section { border-top: var(--stroke) solid var(--border); }
.swatch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.swatch { min-width: 0; padding: 12px; border: var(--stroke) solid var(--border); border-radius: var(--r-small); background: var(--bg); color: var(--text); }
.swatch-sample { height: 72px; margin-bottom: 12px; border: var(--stroke) solid var(--border); border-radius: var(--r-mark); }
.swatch code { font-size: 12px; }
.sw-bg { background: var(--bg); color: var(--text); }
.sw-panel { background: var(--bg-panel); color: var(--text); }
.sw-panel-2 { background: var(--bg-panel-2); color: var(--text); }
.sw-border { background: var(--border); color: var(--text); }
.sw-border-strong { background: var(--border-strong); color: var(--text); }
.sw-accent { background: var(--accent); color: var(--on-accent); }
.sw-accent-dark { background: var(--accent-dark); color: var(--on-accent); }
.sw-accent-wash { background: var(--accent-wash); color: var(--text); }
.sw-accent-ring { background: var(--accent-ring); color: var(--text); }
.sw-accent-line { background: var(--accent-line); color: var(--text); }
.sw-text { background: var(--text); color: var(--bg); }
.sw-muted { background: var(--text-muted); color: var(--bg); }
.sw-faint { background: var(--text-faint); color: var(--text); }
.sw-success { background: var(--success); color: var(--text); }
.sw-success-ink { background: var(--success-ink); color: var(--on-accent); }
.sw-warn { background: var(--warn); color: var(--text); }
.sw-warn-ink { background: var(--warn-ink); color: var(--on-accent); }
.sw-error { background: var(--error); color: var(--on-accent); }
.sw-on-accent { background: var(--on-accent); color: var(--text); }
.sw-mask { background: var(--mask-solid); color: var(--bg); }
.sw-clear { background: var(--clear); color: var(--text); }
.sw-veil { background: var(--veil); color: var(--text); }
.type-display { font-family: var(--font-display); font-size: var(--size-h1); font-weight: var(--weight-regular); letter-spacing: var(--track-tight); line-height: var(--leading-title); }
.preview-note { font-size: 13px; color: var(--text-muted); }
@media (max-width: 900px) {
  .feature-tabs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .feature-tabs [role="tablist"] { flex-direction: row; gap: 8px; max-width: 100%; overflow-x: auto; padding: 4px; }
  .feature-tabs [role="tab"] { flex-shrink: 0; min-height: 44px; padding: 10px 18px; border: var(--stroke) solid var(--border); border-radius: var(--r-pill); font-size: 16px; white-space: nowrap; }
  .feature-tabs [role="tab"]::before { display: none; }
  .feature-tabs [role="tab"][aria-selected="true"] { background: var(--bg-panel); color: var(--text); border-color: var(--accent-line); }
  .swatch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .lede { padding: 40px 20px 44px; }
  .lede h1 { margin-bottom: 22px; }
  .lede-note { font-size: 15px; margin-bottom: 32px; }
  .ruleslab { padding: 18px 18px 14px; border-radius: var(--r-card); }
  .rule-lines { font-size: 13px; }
  .devline-sep { display: none; }
  .factband-row { justify-content: flex-start; padding-inline: 20px; }
  .slab { padding: 28px 16px 0; }
  .slab-panel { height: 260px; }
  .slab-word { font-size: 140px; top: -30px; left: 24px; }
  .slab-copy { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 28px 4px 72px; }
}
@media (max-width: 640px) {
  .shot-row { flex-direction: column; align-items: center; }
  .tab-art { height: 220px; }
  .tab-art-word { font-size: 124px; }
  .tab-copy { padding: 24px; }
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .device-card { grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
  .device-card .dev-ico { width: 36px; height: 46px; }
  .facts-row, .kw-row, .tag-row { flex-direction: row; flex-wrap: wrap; }
  .type-display { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .lede-floor, .caret { opacity: 1; }
}