/* 花括号 tab：详情面板不依赖固定高度，长文完整展开。 */
.tabs { min-width: 0; }
.tabs-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 32px; }
[role="tablist"] { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; min-width: 0; }
[role="tab"] {
  min-height: var(--touch);
  max-width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: var(--line-width) solid var(--c-line);
  border-radius: var(--r-0);
  background: var(--c-clear);
  color: var(--c-muted);
  font-family: var(--f-mono);
  font-size: var(--size-small);
  letter-spacing: var(--tracking-mono);
  overflow-wrap: anywhere;
}
[role="tab"][aria-selected="true"] { border-bottom: 2px solid var(--c-accent); color: var(--c-accent); }
[role="tab"]:hover { color: var(--c-accent); }
[role="tabpanel"] { min-width: 0; scroll-margin-top: 24px; }
.rule-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  border: var(--line-width) solid var(--c-line);
  background: var(--c-panel);
  color: var(--c-text);
}
.rule-panel::before, .rule-panel::after {
  content: "+";
  position: absolute;
  top: 0;
  font: 12px/7px var(--f-mono);
  width: 7px;
  height: 7px;
  color: var(--c-cross);
  transform: translate(-50%, -50%);
}
.rule-panel::before { left: 0; }
.rule-panel::after { left: 100%; }
.rule-copy { padding: 36px; min-width: 0; }
.rule-copy h3 { margin-top: 0; }
.rule-copy p { color: var(--c-muted); line-height: 1.9; }
.rule-example { display: flex; align-items: center; min-width: 0; padding: 36px; border-left: var(--line-width) solid var(--c-line); }
.rule-example pre { width: 100%; margin: 0; padding: 0; border: 0; background: var(--c-panel); color: var(--c-text); font-size: 12px; }
.rule-prefix { color: var(--c-accent); }
.interface-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.interface-tag { display: inline-block; max-width: 100%; padding: 5px 9px; border: var(--line-width) solid var(--c-line); border-radius: var(--r-0); background: var(--c-panel); color: var(--c-muted); font-family: var(--f-mono); font-size: var(--size-micro); overflow-wrap: anywhere; }
.interface-tag::before { content: "{"; }
.interface-tag::after { content: "}"; }

.toc { position: sticky; top: 0; z-index: 10; padding-top: 14px; padding-bottom: 14px; border-block: var(--line-width) solid var(--c-line); background: var(--c-panel); color: var(--c-text); }
.toc ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.toc a { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--c-muted); font-size: var(--size-small); text-decoration: none; }
.toc a:hover, .toc a[aria-current="location"] { color: var(--c-accent); }
.toc.is-static { position: static; }
.faq-item { border-bottom: var(--line-width) solid var(--c-line); background: var(--c-panel); color: var(--c-text); }
.faq-item:first-child { border-top: var(--line-width) solid var(--c-line); }
.faq-item summary { position: relative; padding: 24px 52px 24px 24px; cursor: pointer; list-style: none; font-weight: var(--weight-strong); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 24px; top: 24px; color: var(--c-accent); font-family: var(--f-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 24px 24px; color: var(--c-muted); line-height: 1.9; }
.faq-answer p:last-child { margin-bottom: 0; }

.term-card { border-top: 2px solid var(--c-accent); }
.term-key { margin: 0 0 14px; font-family: var(--f-mono); font-size: 18px; font-weight: var(--weight-medium); overflow-wrap: anywhere; }
.term-category { margin-bottom: 20px; color: var(--c-muted); font-size: var(--size-micro); }
.term-card p { color: var(--c-muted); }
.app-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  max-width: 100%;
  padding: 10px 24px;
  border: var(--line-width) solid var(--c-accent);
  border-radius: var(--r-0);
  background: var(--c-accent);
  color: var(--c-on-accent);
  text-decoration: none;
  transition: background-color var(--duration), border-color var(--duration);
}
.app-store:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); color: var(--c-on-accent); }
.app-store svg { width: 26px; height: 26px; fill: currentColor; }
.store-copy { display: block; min-width: 0; text-align: left; }
.store-copy small { display: block; font-size: 11px; line-height: 1.4; }
.store-copy strong { display: block; font-size: 17px; line-height: 1.5; font-weight: var(--weight-strong); }
.fact-pills { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fact-pill { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; max-width: 100%; padding: 8px 12px; border: var(--line-width) solid var(--c-line); background: var(--c-panel); color: var(--c-text); font-size: var(--size-micro); overflow-wrap: anywhere; }
.fact-pill .fact-name { color: var(--c-muted); font-family: var(--f-mono); }
.fact-pill a { text-decoration: none; }
.official-shot { width: 100%; max-width: 280px; min-width: 0; margin: 0 auto; padding: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot { border: var(--line-width) solid var(--c-line); background: var(--c-panel); color: var(--c-text); }
.official-shot figcaption { padding: 14px 16px; border-top: var(--line-width) solid var(--c-line); color: var(--c-muted); font-size: var(--size-micro); line-height: 1.8; }
.shot-row { display: flex; align-items: flex-start; justify-content: center; flex-wrap: wrap; gap: 32px; }
.shot-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334; border-radius: var(--r-shot); background: var(--c-panel-2); color: var(--c-muted); }
.shot-placeholder span { max-width: 180px; padding: 20px; text-align: center; font: var(--size-micro)/1.8 var(--f-mono); }
.device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.device-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 24px; }
.device-card > svg { width: 48px; height: 56px; fill: none; stroke: var(--c-text); stroke-width: 1.4; }
.device-card h3 { margin: 0 0 12px; }
.device-card p { color: var(--c-muted); margin-bottom: 24px; }
.device-card a { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--c-accent); text-decoration: none; }
.article-card { display: flex; flex-direction: column; gap: 18px; }
.article-card h3 { margin: 0; font-size: 20px; }
.article-card h3 a { text-decoration: none; }
.article-card p { margin: 0; color: var(--c-muted); }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--c-muted); font-size: var(--size-micro); font-family: var(--f-mono); }
.article-card > .text-link { margin-top: auto; padding-top: 12px; }
.callout { margin: 32px 0; padding: 24px 28px; border: var(--line-width) solid var(--c-line); border-left: 3px solid var(--c-accent); background: var(--c-panel); color: var(--c-text); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 10px; font-weight: var(--weight-strong); }
.callout-warning { border-left-color: var(--c-warn); }
.badge { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 9px; border: var(--line-width) solid var(--c-line); background: var(--c-panel); color: var(--c-muted); font-family: var(--f-mono); font-size: var(--size-micro); overflow-wrap: anywhere; }
.status-dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-dot); background: var(--c-accent); }
.status-dot.success { background: var(--c-success); }
.status-dot.warning { background: var(--c-warn); }
.status-dot.error { background: var(--c-error); }
.table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: var(--line-width) solid var(--c-line); }
.data-table { width: 100%; border-collapse: collapse; background: var(--c-panel); color: var(--c-text); font-size: var(--size-small); }
.data-table caption { padding: 16px; text-align: left; font-weight: var(--weight-strong); }
.data-table th, .data-table td,
.prose table th, .prose table td {
  min-width: 7em;
  padding: 16px 20px;
  border-bottom: var(--line-width) solid var(--c-line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th { background: var(--c-panel-2); color: var(--c-text); font-weight: var(--weight-strong); }
.prose table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  background: var(--c-panel);
  color: var(--c-text);
  overscroll-behavior-x: contain;
}
.prose table code, .data-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: var(--z-fab);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 40px);
  min-height: 52px;
  padding: 12px 18px;
  border: var(--line-width) solid var(--c-accent);
  background: var(--c-accent);
  color: var(--c-on-accent);
  font-size: var(--size-small);
  font-weight: var(--weight-strong);
  text-decoration: none;
}
.dl-fab:hover { background: var(--c-accent-dark); color: var(--c-on-accent); }
.dl-fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.article-store-note { margin-top: 64px; border-top: 2px solid var(--c-accent); }
.article-store-note p { max-width: 640px; }
.preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.swatch { min-width: 0; border: var(--line-width) solid var(--c-line); background: var(--c-panel); color: var(--c-text); }
.swatch-sample { display: block; height: 72px; }
.swatch code { display: block; padding: 12px; color: var(--c-muted); font-size: 11px; }
.swatch-bg { background: var(--c-bg); }
.swatch-panel { background: var(--c-panel); }
.swatch-panel-2 { background: var(--c-panel-2); }
.swatch-line { background: var(--c-line); }
.swatch-accent { background: var(--c-accent); }
.swatch-accent-dark { background: var(--c-accent-dark); }
.swatch-text { background: var(--c-text); }
.swatch-muted { background: var(--c-muted); }
.swatch-success { background: var(--c-success); }
.swatch-warn { background: var(--c-warn); }
.swatch-error { background: var(--c-error); }
.swatch-dust { background: var(--c-dust); }
.swatch-dot { background: var(--c-dot); }
.swatch-cross { background: var(--c-cross); }
.swatch-on-accent { background: var(--c-on-accent); }
.swatch-clear { background: var(--c-clear); }
.preview-stack { display: grid; gap: 32px; min-width: 0; }
.preview-h1 { margin: 0; font-size: var(--size-h1); }
.preview-sample-label { margin: 0 0 16px; font-family: var(--f-mono); font-size: var(--size-micro); color: var(--c-muted); }
@media (max-width: 768px) {
  .rule-panel { grid-template-columns: minmax(0, 1fr); }
  .rule-copy, .rule-example { padding: 24px; }
  .rule-example { border-left: 0; border-top: var(--line-width) solid var(--c-line); }
  .device-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tabs-head { gap: 16px; }
  [role="tablist"] { gap: 8px 18px; }
  [role="tab"] { font-size: var(--size-micro); }
  .fact-pills { justify-content: center; flex-direction: row; }
  .shot-row { flex-direction: column; align-items: center; }
  .device-card { grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
  .device-card > svg { width: 36px; height: 48px; }
  .callout { padding: 20px; }
  .dl-fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }
}