:root {
  --shot-width: 280px;
  --r-shot: 10px;
  --fs-rule: 11px;
  --fs-rule-head: 11.5px;
  --fs-device-title: 24px;
  --fs-machine-label: 15px;
  --stage-width: 720px;
  --swatch-height: 68px;
}
.facts, .fact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 30px; padding: 0; list-style: none; }
.fact, .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  max-width: 100%;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-chip);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  overflow-wrap: anywhere;
  text-decoration: none;
}
.fact-dot, .rc-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-round); }
.fact-dot--pink, .rc-dot--proxy { background: var(--accent); box-shadow: var(--dot-ring-pink); }
.fact-dot--violet, .rc-dot--direct { background: var(--violet); box-shadow: var(--dot-ring-violet); }
.fact-dot--amber, .rc-dot--reject { background: var(--amber); box-shadow: var(--dot-ring-amber); }
.badge--warn { background: var(--bg-panel); color: var(--amber); border-color: var(--amber); }
.badge--success { background: var(--bg-panel); color: var(--success); border-color: var(--success); }
.badge--error { background: var(--bg-panel); color: var(--error); border-color: var(--error); }
.appstore-button { min-height: 52px; background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-btn); }
.appstore-button:hover { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-btn-hover); }
.appstore-button svg { width: 21px; height: 23px; fill: currentColor; }
.store-copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; }
.store-copy small { font-size: var(--fs-caption); font-weight: var(--weight-label); }
.store-copy strong { font-size: var(--fs-body); font-weight: var(--weight-title); }
.config-tabs { display: grid; grid-template-columns: minmax(190px, .65fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.config-tabs > * { min-width: 0; }
.config-tabs [role="tablist"] { display: flex; flex-direction: column; gap: 4px; }
.config-tabs [role="tab"] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 18px;
  border: 0;
  border-left: 3px solid var(--transparent);
  border-radius: var(--r-chip);
  background: var(--transparent);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-code);
  text-align: left;
}
.config-tabs [role="tab"]:hover { background: var(--bg-panel); color: var(--text); }
.config-tabs [role="tab"][aria-selected="true"] { border-left-color: var(--accent); background: var(--bg-panel); color: var(--text); }
.config-tabs [role="tab"]::after { content: ""; width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-round); background: var(--amber); opacity: 0; }
.config-tabs [role="tab"][aria-selected="true"]::after { opacity: 1; box-shadow: var(--dot-ring-amber); }
.tab-panel { min-width: 0; }
.tab-panel p { color: var(--text-muted); line-height: 1.85; }
.tab-panel h3 { margin-top: 0; }
.tab-panel pre { margin-bottom: 0; }
.toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-panel);
  color: var(--text);
}
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-chip); color: var(--text-muted); text-decoration: none; }
.toc a:hover, .toc a[aria-current] { background: var(--bg-panel-2); color: var(--text); }
.toc--sticky { position: sticky; top: 12px; z-index: 5; }
.faq-item { margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 60px; padding: 18px 22px; cursor: pointer; list-style: none; font-weight: var(--weight-label); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; font-family: var(--font-mono); color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 22px 22px; color: var(--text-muted); }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card dt { font: var(--weight-strong) var(--fs-h3)/1.4 var(--font-mono); color: var(--violet-light); margin-bottom: 16px; }
.term-card dd { margin: 0; color: var(--text-muted); }
.term-card .badge { margin-bottom: 16px; }
.official-shot { width: min(100%, var(--shot-width)); max-width: var(--shot-width); margin: 0 auto; padding: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: 10px; }
.official-shot img { outline: 1px solid var(--border); outline-offset: -1px; }
.official-shot figcaption { margin-top: 12px; color: var(--text-muted); font-size: var(--fs-caption); line-height: 1.65; }
.shot-row { display: flex; align-items: flex-start; justify-content: center; flex-wrap: wrap; gap: 32px; }
.device-card { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; text-decoration: none; }
.device-card h3 { margin: 0; font-size: var(--fs-device-title); }
.device-card p { margin: 0; color: var(--text-muted); }
.device-card > svg { width: 48px; height: 56px; flex-shrink: 0; fill: none; stroke: var(--violet-light); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.device-card .card-link { margin-top: auto; }
.card-link { color: var(--accent); font-weight: var(--weight-strong); }
.article-card { display: flex; flex-direction: column; gap: 14px; }
.article-card h3, .article-card p { margin: 0; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--violet-light); }
.article-card p { color: var(--text-muted); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: var(--fs-caption); color: var(--text-muted); }
.article-card .card-link { margin-top: auto; }
.callout { margin: 24px 0; padding: 20px 24px; border: 1px solid var(--border); border-left: 3px solid var(--amber); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { margin-bottom: 8px; color: var(--amber); font-weight: var(--weight-strong); }
.callout--note { border-left-color: var(--violet); }
.callout--note .callout-title { color: var(--violet-light); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--r-card); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: top;
}
.data-table th, .prose table th { background: var(--bg-panel-2); color: var(--text); font-weight: var(--weight-label); }
.data-table td, .prose table td { background: var(--bg-panel); color: var(--text-muted); }
.data-table td code, .prose table td code { overflow-wrap: anywhere; }
.prose table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  text-align: left;
}
.dl-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--r-btn);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  font-weight: var(--weight-strong);
}
.dl-fab svg { width: 23px; height: 23px; color: var(--accent); flex-shrink: 0; }
.dl-fab:hover { background: var(--bg-panel-2); color: var(--text); }
.article-store-card { margin-top: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.article-store-card h2 { margin: 0 0 10px; font-size: var(--fs-h3); }
.article-store-card p { margin: 0; color: var(--text-muted); }
.group-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.group-list li + li { border-top: 1px solid var(--border); }
.group-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 20px; color: var(--text); text-decoration: none; }
.group-list a::after { content: "›"; color: var(--accent); flex-shrink: 0; }
.stage { position: relative; width: 100%; max-width: var(--stage-width); margin-left: auto; aspect-ratio: 720 / 620; }
.stage-art { position: absolute; inset: 0; }
.stage-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.st-pink { stop-color: var(--accent); }
.st-amber { stop-color: var(--amber); }
.beam-pink { fill: var(--accent); opacity: .09; }
.beam-amber { fill: var(--amber); opacity: .09; }
.sky path { fill: none; stroke: var(--text-muted); stroke-width: 1.6; stroke-linecap: round; opacity: .5; }
.ground { fill: var(--ink); opacity: .55; }
.ink { fill: var(--ink); }
.machine-body { fill: var(--violet); }
.machine-shade { fill: var(--violet-shade); }
.machine-outline { stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; }
.outline { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; }
.chute { fill: var(--violet-shade); stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; }
.rail { fill: none; stroke-width: 4; stroke-linecap: round; }
.rail-pink { stroke: var(--accent); }
.rail-violet { stroke: var(--violet-light); }
.rail-amber { stroke: var(--amber); }
.plate { stroke: var(--ink); stroke-width: 3; }
.plate-proxy { fill: var(--accent); }
.plate-direct { fill: var(--violet); }
.plate-reject { fill: var(--amber); }
.plate-text { fill: var(--ink); font: var(--weight-title) var(--fs-machine-label) var(--font-mono); letter-spacing: .06em; text-anchor: middle; }
.hilite { fill: var(--violet-light); opacity: .75; }
.vent { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.rivet { fill: var(--ink); }
.led { stroke: var(--ink); stroke-width: 2.5; }
.led-pink { fill: var(--accent); }
.led-violet { fill: var(--violet-light); }
.led-amber { fill: var(--amber); }
.bezel { fill: var(--violet-light); stroke: var(--ink); stroke-width: 3.5; }
.dial { fill: var(--bg-deep); stroke: var(--ink); stroke-width: 3; }
.ticks line { stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; }
.arc { fill: none; stroke-width: 9; }
.arc-pink { stroke: var(--accent); }
.arc-violet { stroke: var(--violet); }
.arc-amber { stroke: var(--amber); }
.needle { stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.hub { fill: var(--violet-light); stroke: var(--ink); stroke-width: 2.5; }
.glare { fill: none; stroke: var(--text); stroke-width: 4; stroke-linecap: round; opacity: .3; }
.label-plate { fill: var(--ink); }
.label-text { fill: var(--text); font: var(--weight-strong) var(--fs-body) var(--font-mono); text-anchor: middle; }
.req-box { fill: var(--text); stroke: var(--ink); stroke-width: 2.5; }
.req-text { fill: var(--ink); font: var(--weight-strong) var(--fs-rule) var(--font-mono); }
.rule-cards { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.rule-card {
  position: absolute;
  width: 256px;
  padding: 13px 14px 12px;
  border: 1px solid var(--transparent);
  border-radius: var(--r-card);
  background: linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box, var(--grad-edge) border-box;
  color: var(--text);
  box-shadow: var(--shadow-card);
  pointer-events: auto;
}
.rc-lt { left: -5%; top: 10.3%; transform: rotate(-2deg); }
.rc-lb { left: -5%; top: 60%; transform: rotate(1.5deg); }
.rc-rt { right: -5%; top: 19%; transform: rotate(2deg); }
.rc-rb { right: -5%; top: 55.8%; transform: rotate(-1.5deg); }
.rc-head { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; font-size: var(--fs-rule-head); font-weight: var(--weight-title); line-height: 1; letter-spacing: var(--tracking-label); color: var(--text); }
.rc-code { display: block; overflow-x: auto; padding: 6px 8px; border-radius: var(--r-chip); background: var(--ink-wash); color: var(--text); font-family: var(--font-mono); font-size: var(--fs-rule); font-weight: var(--weight-label); line-height: 1.5; white-space: nowrap; overflow-wrap: normal; }
.tk-k { color: var(--violet-light); }
.tk-s { color: var(--text-muted); }
.tk-v { color: var(--text); }
.tk-proxy { color: var(--accent); }
.tk-direct { color: var(--violet-light); }
.tk-reject { color: var(--amber); }
.rc-note { margin: 8px 0 0; font-size: var(--fs-caption); line-height: 1.4; color: var(--text-muted); }
.hero-star { position: absolute; width: 18px; height: 18px; color: var(--text-muted); opacity: .5; pointer-events: none; }
.hero-star path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.hero-star--a { top: 7%; left: 37%; }
.hero-star--b { bottom: 9%; left: 2.4%; width: 13px; height: 13px; }
.next { padding-top: 56px; padding-bottom: 0; }
.next-title { margin: 0 0 14px; font-size: var(--fs-h2); font-weight: var(--weight-title); line-height: 1.25; }
.next-text { margin: 0; max-width: 640px; color: var(--text-muted); }
.preview-section { padding-top: var(--section-space); }
.preview-section > h2 { margin-top: 0; margin-bottom: 28px; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.swatch { min-width: 0; margin: 0; }
.swatch-color { height: var(--swatch-height); border: 1px solid var(--border); border-radius: var(--r-card); }
.swatch figcaption { margin-top: 8px; color: var(--text-muted); font-family: var(--font-mono); font-size: var(--fs-caption); overflow-wrap: anywhere; }
.sw-bg { background: var(--bg); color: var(--text); }
.sw-head { background: var(--bg-head); color: var(--text); }
.sw-deep { background: var(--bg-deep); color: var(--text); }
.sw-panel { background: var(--bg-panel); color: var(--text); }
.sw-panel2 { background: var(--bg-panel-2); color: var(--text); }
.sw-border { background: var(--border); color: var(--text); }
.sw-accent { background: var(--accent); color: var(--ink); }
.sw-accent-dark { background: var(--accent-dark); color: var(--ink); }
.sw-violet { background: var(--violet); color: var(--ink); }
.sw-violet-shade { background: var(--violet-shade); color: var(--text); }
.sw-violet-light { background: var(--violet-light); color: var(--ink); }
.sw-amber { background: var(--amber); color: var(--ink); }
.sw-text { background: var(--text); color: var(--ink); }
.sw-muted { background: var(--text-muted); color: var(--ink); }
.sw-success { background: var(--success); color: var(--ink); }
.sw-error { background: var(--error); color: var(--ink); }
.sw-ink { background: var(--ink); color: var(--text); }
.sw-line { background: var(--line); color: var(--text); }
.sw-wash { background: var(--accent-wash); color: var(--text); }
.sw-ink-wash { background: var(--ink-wash); color: var(--text); }
.sw-edge { background: var(--grad-edge); color: var(--ink); }
.type-sample { margin-block: 20px; }
.type-display { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: var(--weight-display); line-height: 1.2; }
.type-heading { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: var(--weight-title); }
.type-subheading { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--weight-strong); }
.preview-shot {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  width: 100%;
  aspect-ratio: 750 / 1334;
  border: 1px solid var(--border);
  border-radius: var(--r-shot);
  background: var(--bg-panel-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: center;
}
.preview-shot span { font-size: var(--fs-caption); }
.preview-stack { display: grid; gap: 24px; }
@media (max-width: 1080px) {
  .stage { max-width: 640px; margin-inline: auto; }
}
@media (max-width: 720px) {
  .stage { aspect-ratio: auto; }
  .stage-art { position: relative; aspect-ratio: 720 / 620; }
  .rule-cards { position: static; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 20px; }
  .rule-card { position: static; width: 100%; transform: none; }
}
@media (max-width: 640px) {
  .facts, .fact-row { justify-content: center; flex-direction: row; flex-wrap: wrap; }
  .config-tabs { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .config-tabs [role="tablist"] { flex-direction: row; overflow-x: auto; padding-bottom: 8px; }
  .config-tabs [role="tab"] { flex-shrink: 0; white-space: nowrap; border-left: 0; border-bottom: 3px solid var(--transparent); }
  .config-tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--accent); }
  .toc { flex-wrap: nowrap; overflow-x: auto; }
  .toc a { flex-shrink: 0; white-space: nowrap; }
  .shot-row { flex-direction: column; align-items: center; }
  .official-shot { width: min(100%, var(--shot-width)); }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-item summary { padding: 16px 18px; }
  .faq-answer { padding: 0 18px 18px; }
  .callout { padding: 18px; }
  .article-store-card { align-items: flex-start; }
  .rule-card, .tilt { transform: none; }
}