.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 6px 13px 6px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-hair);
  font-size: 13px;
  font-weight: var(--weight-ui);
}
.badge-dot { width: 8px; height: 8px; border-radius: var(--radius-chip); background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); flex-shrink: 0; }
.facts-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.facts-label { margin-right: 4px; font-size: var(--size-label); font-weight: var(--weight-bold); letter-spacing: var(--tracking-label); color: var(--text-muted); }
.chip, .fact-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  min-height: 28px;
  padding: 3px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}
.fact-pill { font-family: var(--font-body); font-size: 13px; }
.fact-pill svg { width: 15px; height: 15px; }
.tag { display: inline-block; padding: 3px 8px; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-tag); background: var(--bg-panel-2); color: var(--text-muted); font-size: var(--size-label); font-weight: var(--weight-ui); overflow-wrap: anywhere; }

.appstore-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  max-width: 100%;
  padding: 10px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
  text-decoration: none;
  transition: background-color var(--motion-fast), transform var(--motion-fast);
}
.appstore-button:hover, .appstore-button.is-hover { background: var(--accent-dark); color: var(--on-accent); border-color: var(--accent-dark); }
.appstore-button:active { transform: translateY(1px); }
.appstore-button > svg { width: 25px; height: 29px; }
.appstore-copy { display: block; text-align: left; line-height: 1.2; }
.appstore-copy small { display: block; font-size: 11px; font-weight: var(--weight-medium); }
.appstore-copy strong { display: block; margin-top: 3px; font-size: 17px; }
.appstore-button.is-focus { outline: var(--focus-ring); outline-offset: 4px; }
.store-guide-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6); padding: var(--space-7); background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-lg); }
.store-guide-card > div { flex: 1 1 260px; min-width: 0; }
.store-guide-card h2, .store-guide-card h3 { margin-top: 0; font-size: var(--size-h3); }
.store-guide-card p { margin-bottom: 0; color: var(--text-muted); }

.feature-tabs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-9); align-items: start; }
.feature-tabs > * { min-width: 0; }
.feature-tabs [role="tablist"] { display: flex; flex-direction: column; gap: var(--space-2); }
.feature-tabs [role="tab"] {
  position: relative;
  width: 100%;
  min-height: 60px;
  padding: 14px 16px 14px 20px;
  border: 0;
  border-left: 3px solid var(--clear);
  background: var(--clear);
  color: var(--text);
  font: inherit;
  font-size: 19px;
  line-height: 1.65;
  text-align: left;
}
.tab-name { color: var(--accent); font-weight: var(--weight-bold); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.feature-tabs [role="tab"][aria-selected="true"] { border-left-color: var(--accent); }
.feature-tabs [role="tab"][aria-selected="true"] .tab-name { background: linear-gradient(to top, var(--mark) var(--mark-depth), var(--clear) var(--mark-depth)); color: var(--accent-dark); }
.feature-tabs [role="tab"]:hover { background: var(--bg-panel-2); color: var(--text); }
.tab-panels { min-width: 0; }
.tab-panel { padding: var(--space-7); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-lg); }
.tab-panel h3 { margin-top: 0; }
.tab-panel p { line-height: 1.85; }
.tab-panel pre { background: var(--bg-cell); color: var(--text); box-shadow: none; }
.tab-fold { display: none; }
.tabs-static .tab-panel + .tab-panel { margin-top: var(--space-6); }

.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-10); align-items: start; }
.doc-layout > * { min-width: 0; }
.toc { position: sticky; top: var(--space-6); align-self: start; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
.toc-title { margin-top: 0; font-size: 15px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 9px 12px; border-left: 3px solid var(--border); font-size: var(--size-small); }
.toc a:hover, .toc a[aria-current="location"] { border-left-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.jump-nav { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); padding-block: var(--space-5); border-block: 1px solid var(--border); }
.jump-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.faq-item { border-bottom: 1px solid var(--border); padding-block: var(--space-5); }
.faq-item summary { position: relative; padding-right: 32px; cursor: pointer; list-style: none; font-weight: var(--weight-bold); font-size: 18px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 0; color: var(--accent); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-top: var(--space-4); color: var(--text-muted); max-width: 65em; }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { padding: var(--space-6); background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-hair); min-width: 0; }
.term-card h3, .term-card dt { margin: 0 0 12px; color: var(--accent-dark); font: var(--weight-bold) 18px/1.5 var(--font-mono); overflow-wrap: anywhere; }
.term-card dd { margin: 0; color: var(--text-muted); }
.term-card p:last-child { margin-bottom: 0; }
.callout { margin-block: var(--space-7); padding: var(--space-5) var(--space-6); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-hair); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: var(--space-2); font-weight: var(--weight-bold); }
.callout--warning { border-left-color: var(--warn); }
.callout--error { border-left-color: var(--error); }
.callout--success { border-left-color: var(--success); }

.official-shot { width: 100%; max-width: 280px; margin: 0 auto; padding: 0; flex-shrink: 0; min-width: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--radius-shot); }
.official-shot figcaption { padding-top: var(--space-3); font-size: 13px; line-height: 1.7; color: var(--text-muted); }
.shot-surface { border: 1px solid var(--border); border-radius: var(--radius-shot); }
.shot-pair { display: flex; flex-wrap: wrap; justify-content: center; align-items: start; gap: var(--space-7); }
.step-with-shot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: var(--space-9); align-items: start; }
.step-with-shot > * { min-width: 0; }
.device-card { display: flex; flex-direction: column; align-items: start; gap: var(--space-4); padding: var(--space-7); background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-lg); min-width: 0; }
.device-card > svg { width: 42px; height: 48px; color: var(--accent); }
.device-card h3 { margin: 0; }
.device-card p { color: var(--text-muted); margin: 0; }
.device-card a { margin-top: auto; min-height: 44px; display: inline-flex; align-items: center; }
.article-card { padding: var(--space-6); border-top: 3px solid var(--accent); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-lg); min-width: 0; }
.article-card h3 { margin-block: var(--space-5) var(--space-4); font-size: 21px; line-height: 1.5; letter-spacing: -0.02em; }
.article-card p { color: var(--text-muted); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); color: var(--text-muted); font-size: var(--size-small); }
.dl-fab { position: fixed; right: max(var(--space-5), env(safe-area-inset-right)); bottom: max(var(--space-5), env(safe-area-inset-bottom)); z-index: var(--z-float); display: inline-flex; align-items: center; gap: var(--space-3); max-width: calc(100% - 40px); min-height: 52px; padding: 12px 18px; border: 1px solid var(--border); border-radius: var(--radius-btn); background: var(--bg-panel); color: var(--accent); box-shadow: var(--shadow-lg); font-size: var(--size-small); }
.dl-fab svg { width: 21px; height: 21px; }

.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-card); }
.data-table { border-collapse: collapse; width: 100%; background: var(--bg-panel); color: var(--text); text-align: left; }
.data-table th, .data-table td, .prose th, .prose td, .doc-body th, .doc-body td {
  min-width: 7em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose th, .doc-body th { background: var(--bg-panel-2); color: var(--text); font-weight: var(--weight-bold); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table, .doc-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  text-align: left;
  background: var(--bg-panel);
  color: var(--text);
}
.data-table code, .prose table code, .doc-body table code { overflow-wrap: anywhere; white-space: normal; }

.board {
  min-height: clamp(700px, calc(100vh - 64px), 900px);
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-board);
  padding: 28px 28px 26px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.board-head { display: flex; align-items: center; gap: var(--space-3); }
.board-title { margin: 0; font-size: 23px; line-height: 1.25; letter-spacing: -0.02em; }
.file-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border: 1px solid var(--border); border-radius: var(--radius-tag); background: var(--bg-panel-2); color: var(--text-muted); font-family: var(--font-mono); font-size: var(--size-label); flex-shrink: 0; }
.board-sub { margin: 6px 0 0; font-size: var(--size-small); line-height: 1.6; color: var(--text-muted); }
.board-grid { flex: 1; margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: var(--space-3); }
.cell { min-width: 0; display: flex; flex-direction: column; padding: 16px 16px 14px; background: var(--bg-cell); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-cell); }
.cell-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.cell-name { margin: 0; font-family: var(--font-mono); font-size: 13.5px; font-weight: var(--weight-bold); color: var(--accent); letter-spacing: -0.01em; }
.cell-hint { font-size: var(--size-label); color: var(--text-muted); }
.code { list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: var(--size-label); line-height: 25px; overflow-x: auto; }
.code li { white-space: nowrap; }
.code .k { color: var(--text); font-weight: var(--weight-medium); }
.code .op, .code .c { color: var(--text-muted); }
.code .v { color: var(--accent-dark); font-weight: var(--weight-ui); }
.cell-note { margin: auto 0 0; padding-top: 10px; border-top: 1px dashed var(--border-strong); font-size: 12.5px; line-height: 1.6; color: var(--text-muted); }
.cell-note b { color: var(--text); font-weight: var(--weight-bold); }
.cell > .code, .cell > .rule-stack, .cell > .policy-list, .cell > .order-list { margin-bottom: 14px; }
.rule-stack { position: relative; min-width: 0; }
.rule-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--rule-line) - var(--mark-depth));
  height: var(--mark-depth);
  border-radius: var(--radius-line);
  background: var(--mark);
  z-index: 0;
  animation: rule-scan 8.4s cubic-bezier(.6, 0, .3, 1) infinite;
  will-change: transform, opacity;
}
.rule-lines { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: var(--size-label); overflow-x: auto; }
.rule-lines li { height: var(--rule-line); line-height: var(--rule-line); padding-inline: 8px; white-space: nowrap; }
.rule-lines .t { color: var(--text); font-weight: var(--weight-ui); }
.rule-lines .p { color: var(--text-muted); }
.rule-lines .s { color: var(--text); font-weight: var(--weight-bold); }
@keyframes rule-scan {
  0%, 15% { transform: translateY(0); opacity: 1; }
  16.67%, 31.67% { transform: translateY(var(--rule-line)); opacity: 1; }
  33.33%, 48.33% { transform: translateY(calc(var(--rule-line) * 2)); opacity: 1; }
  50%, 65% { transform: translateY(calc(var(--rule-line) * 3)); opacity: 1; }
  66.67%, 95% { transform: translateY(calc(var(--rule-line) * 4)); opacity: 1; }
  97% { transform: translateY(calc(var(--rule-line) * 4)); opacity: 0; }
  97.01% { transform: translateY(0); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.policy-list { list-style: none; margin: 0; padding: 0; }
.policy-list li { display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: center; gap: 10px; padding-block: 9px; border-bottom: 1px dashed var(--border); }
.policy-list li:first-child { padding-top: 2px; }
.policy-list li:last-child { border-bottom: 0; }
.policy { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 10px; border: 1px solid var(--border); border-radius: var(--radius-chip); background: var(--bg-panel); color: var(--text); font-family: var(--font-mono); font-size: var(--size-label); font-weight: var(--weight-bold); }
.policy::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-chip); background: var(--accent); flex-shrink: 0; }
.policy--direct::before { background: var(--success); }
.policy--reject::before { background: var(--error); }
.policy-desc { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.order-list { position: relative; list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: var(--size-label); }
.order-list::before { content: ""; position: absolute; left: 8px; top: 14px; bottom: 14px; border-left: 1.5px dashed var(--border-strong); }
.order-list li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; min-height: 30px; }
.order-list .n { position: relative; z-index: 1; width: 17px; text-align: center; background: var(--bg-cell); color: var(--text-muted); font-weight: var(--weight-ui); line-height: 18px; }
.order-list .n--end::before { content: ""; display: block; width: 8px; height: 8px; margin: 5px auto; border-radius: var(--radius-line); background: var(--accent); }
.order-list .r { color: var(--text); overflow-wrap: anywhere; }
.order-list .r--final { color: var(--accent); font-weight: var(--weight-bold); }
.board-links { margin-top: 20px; }
.link-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.link-card { display: flex; align-items: center; gap: var(--space-3); min-width: 0; padding: 13px 14px; background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-hair); text-decoration: none; transition: border-color var(--motion-fast), transform var(--motion-fast); }
.link-card:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.link-tile { flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--radius-logo); border: 1px solid var(--border); background: var(--bg-panel-2); color: var(--text); display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--size-label); font-weight: var(--weight-bold); }
.link-tile svg { width: 17px; height: 17px; }
.link-text { min-width: 0; display: flex; flex-direction: column; }
.link-title { font-size: 14.5px; font-weight: var(--weight-bold); line-height: 1.35; }
.link-sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.link-arrow { margin-left: auto; flex-shrink: 0; color: var(--accent); font-weight: var(--weight-bold); }

/* 仅用于设计预览的资源占位，不作为真实品牌图或界面图。 */
.preview-logo { background: var(--bg-panel); color: var(--text); }
.shot-placeholder { display: grid; place-items: center; aspect-ratio: 750 / 1334; width: 100%; border: 1px solid var(--border); border-radius: var(--radius-shot); background: var(--bg-panel-2); color: var(--text-muted); font-size: var(--size-small); text-align: center; }
.preview-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.swatch { min-width: 0; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); }
.swatch b { display: block; min-height: 64px; margin-bottom: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-tag); }
.swatch-bg { background: var(--bg); color: var(--text); }
.swatch-panel { background: var(--bg-panel); color: var(--text); }
.swatch-panel2 { background: var(--bg-panel-2); color: var(--text); }
.swatch-cell { background: var(--bg-cell); color: var(--text); }
.swatch-border { background: var(--border); color: var(--text); }
.swatch-border-strong { background: var(--border-strong); color: var(--text); }
.swatch-accent { background: var(--accent); color: var(--on-accent); }
.swatch-accent-dark { background: var(--accent-dark); color: var(--on-accent); }
.swatch-text { background: var(--text); color: var(--bg-panel); }
.swatch-muted { background: var(--text-muted); color: var(--bg-panel); }
.swatch-success { background: var(--success); color: var(--bg-panel); }
.swatch-warn { background: var(--warn); color: var(--bg-panel); }
.swatch-error { background: var(--error); color: var(--bg-panel); }
.swatch-mark { display: flex; align-items: end; justify-content: center; background: var(--bg-panel); color: var(--text); }
.preview-states { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); }
.preview-caption { color: var(--text-muted); font-size: var(--size-small); margin-bottom: var(--space-5); }

@media (max-width: 1180px) {
  .board { min-height: 0; }
  .board-grid { grid-template-rows: auto; }
}
@media (max-width: 1000px) {
  .feature-tabs { gap: var(--space-6); }
  .doc-layout { grid-template-columns: 190px minmax(0, 1fr); gap: var(--space-7); }
}
@media (max-width: 900px) {
  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-cards { grid-template-columns: minmax(0, 1fr); }
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; }
  .toc ul { display: flex; flex-wrap: wrap; gap: var(--space-2); }
}
@media (max-width: 700px) {
  .feature-tabs { grid-template-columns: minmax(0, 1fr); }
  .feature-tabs [role="tablist"] { display: none; }
  .tab-panel { padding: 0; margin-bottom: var(--space-3); box-shadow: var(--shadow-hair); }
  .tab-fold { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: 100%; padding: 18px 20px; min-height: 56px; text-align: left; border: 0; border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); font-weight: var(--weight-bold); }
  .tab-fold::after { content: "+"; color: var(--accent); flex-shrink: 0; }
  .tab-panel.is-active .tab-fold::after { content: "−"; }
  .tab-panel .tab-content { display: none; padding: 0 20px 20px; }
  .tab-panel.is-active .tab-content, .tabs-static .tab-panel .tab-content { display: block; }
  .step-with-shot { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .board { padding: 20px 16px; }
  .board-head { flex-wrap: wrap; }
  .board-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-row { flex-direction: row; flex-wrap: wrap; }
  .shot-pair { flex-direction: column; align-items: center; }
  .device-card { padding: var(--space-6); }
  .store-guide-card { padding: var(--space-5); }
}
@media (prefers-reduced-motion: reduce) {
  .rule-scan { animation: none; transform: translateY(calc(var(--rule-line) * 4)); }
  .appstore-button, .link-card { transition: none; }
}