/* The splitter is an abstract rule-routing object, not an application screen. */
.rig { position: relative; width: 100%; aspect-ratio: 800 / 560; }
.rig__halo {
  position: absolute;
  left: 33.5%;
  top: 41%;
  aspect-ratio: 1;
  border-radius: var(--radius-pill);
  transform: translate(-50%,-50%);
  background: radial-gradient(circle at 50% 50%, var(--halo-hi) 0%, var(--halo-hi) 36%, var(--halo-lo) 72%);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--halo-edge);
}
.rig__halo--outer { width: 86%; }
.rig__halo--inner { width: 52%; }
.rig__shadow {
  position: absolute;
  left: 35%;
  top: 74%;
  width: 96%;
  aspect-ratio: 4.6 / 1;
  transform: translate(-50%,-50%);
  background:
    radial-gradient(ellipse 18% 24% at 54% 46%, var(--shade-12) 0%, var(--shade-00) 100%),
    radial-gradient(ellipse 32% 36% at 52% 48%, var(--shade-18) 0%, var(--shade-07) 48%, var(--shade-00) 100%),
    radial-gradient(ellipse 50% 50% at 50% 50%, var(--shade-07) 0%, var(--shade-03) 55%, var(--shade-00) 100%);
  color: var(--text);
  animation: rig-breathe var(--float-cycle) ease-in-out infinite;
}
.rig__layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rig__wedge { animation: rig-float var(--float-cycle) ease-in-out infinite; }
.st-top-hi { stop-color: var(--ink-top-hi); }
.st-top-lo { stop-color: var(--ink-top-lo); }
.st-face { stop-color: var(--ink-face); }
.st-face-low { stop-color: var(--ink-face-low); }
.w-top { fill: url(#srWedgeTop); }
.w-exit { fill: url(#srWedgeExit); }
.w-side { fill: var(--accent-dark); }
.w-ridge { fill: none; stroke: var(--ink-ridge); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.w-edge { fill: none; stroke: var(--ink-ridge-soft); stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; }
.wire { fill: none; stroke: var(--lead); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wire-dot { fill: var(--bg); stroke: var(--lead); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sym-fill { fill: var(--accent); }
.sym-ring { fill: var(--bg); stroke: var(--accent); stroke-width: 1.3; }
.sym-slash { fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-linecap: round; }
.rule { font-family: var(--font-mono); font-size: 14px; letter-spacing: -.01em; }
.rule__k { fill: var(--text-muted); }
.rule__a { fill: var(--text); font-weight: var(--weight-medium); }
.final-note { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .02em; fill: var(--text-faint); }
@keyframes rig-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes rig-breathe { 0%,100% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 50% { transform: translate(-50%,-50%) scale(.94); opacity: .78; } }

.tabs { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 80px; margin-top: var(--space-10); align-items: start; }
.tabs > * { min-width: 0; }
.tabs [role="tablist"] { display: flex; flex-direction: column; gap: var(--space-2); }
.tabs [role="tab"] {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 8px 0 8px var(--space-5);
  text-align: left;
  border: 0;
  border-left: 2px solid var(--shade-00);
  border-radius: 0;
  background: var(--bg);
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: var(--text-tab);
  font-weight: var(--weight-normal);
  line-height: 1.25;
}
.tabs [role="tab"]:hover { color: var(--text-muted); }
.tabs [role="tab"][aria-selected="true"] { border-left-color: var(--accent); color: var(--accent); }
.tabs__panels { position: sticky; top: calc(var(--header-h) + var(--space-7)); }
.tabs [role="tabpanel"] { min-width: 0; }
.tabs [role="tabpanel"] h3 { margin-top: 0; }
.tabs [role="tabpanel"] p { color: var(--text-muted); line-height: 1.9; }
.sheet__rules { margin: 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: var(--text-sm); }
.sheet__rules li { display: grid; grid-template-columns: 12px minmax(0,1fr) auto; align-items: center; gap: var(--space-2); padding-top: 13px; padding-bottom: 13px; border-top: 1px solid var(--border); color: var(--text-muted); min-width: 0; }
.sheet__rules li:first-child { border-top: 0; }
.sheet__rules code { min-width: 0; }
.sheet__act { color: var(--text); }
.toc {
  position: sticky;
  top: var(--header-h);
  z-index: 10;
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  overflow-x: visible;
  max-width: 100%;
  padding: var(--space-2);
  margin-block: var(--space-8);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-float);
  overscroll-behavior-inline: contain;
}
.toc a { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-nav); }
.toc a:hover, .toc a[aria-current="location"] { background: var(--accent); color: var(--bg-panel); }
.toc--static { position: static; }
.faq-group { border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-float); }
.faq-item { padding-inline: var(--space-7); }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary { position: relative; list-style: none; cursor: pointer; min-height: 64px; padding: var(--space-4) var(--space-7) var(--space-4) 0; font-size: var(--text-base); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0; top: var(--space-4); color: var(--text-muted); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-item__body { padding-bottom: var(--space-5); color: var(--text-muted); line-height: 1.85; }
.faq-item__body p { margin: 0; }
.term-card { min-width: 0; padding: var(--space-7); border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-float); }
.term-card h3 { margin: 0 0 var(--space-2); font-family: var(--font-mono); font-size: var(--text-subtitle); overflow-wrap: anywhere; }
.term-card p { margin-bottom: 0; color: var(--text-muted); }
.term-card__category { display: block; margin-bottom: var(--space-4); color: var(--text-muted); font-size: var(--text-xs); }

.appstore-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 56px;
  max-width: 100%;
  padding: 10px var(--space-5);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--bg-panel);
  box-shadow: var(--shadow-solid);
  line-height: 1.2;
}
.appstore-button:hover { background: var(--accent-dark); color: var(--bg-panel); }
.appstore-button svg { width: 25px; height: 29px; flex-shrink: 0; }
.appstore-button__text { display: block; min-width: 0; }
.appstore-button__text small { display: block; font-size: 11px; font-weight: var(--weight-normal); }
.appstore-button__text strong { display: block; margin-top: 3px; font-size: var(--text-base); font-weight: var(--weight-medium); }

.plat-grid { display: flex; flex-wrap: wrap; gap: var(--space-5); margin-top: var(--space-10); }
.plat-card {
  position: relative;
  flex: 1 1 300px;
  min-width: 0;
  max-width: 100%;
  padding: var(--space-7);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-panel);
}
.plat-card h3 { margin-top: var(--space-2); }
.plat-card p { color: var(--text-muted); }
.plat-card__icon { width: 28px; height: 28px; }
.plat-card::before { display: none; position: absolute; right: var(--space-5); top: var(--space-5); content: attr(data-mine); padding: 4px 10px; border-radius: var(--radius-pill); background: var(--accent); color: var(--bg-panel); font-size: var(--text-xs); }
.plat-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-5); }
.plat-actions > * { min-width: 0; max-width: 100%; }
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"]::before,
html[data-visitor-os="mac"] .plat-card[data-plat="mac"]::before,
html[data-visitor-os="windows"] .plat-card[data-plat="windows"]::before,
html[data-visitor-os="android"] .plat-card[data-plat="android"]::before,
html[data-visitor-os="linux"] .plat-card[data-plat="linux"]::before { display: block; }
.wx-open-tip {
  position: fixed;
  bottom: calc(var(--space-5) + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 90;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - var(--gutter) * 2);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--accent);
  color: var(--bg-panel);
  box-shadow: var(--shadow-panel);
  font-size: var(--text-nav);
  line-height: 1.7;
}
.wx-open-tip button { margin-left: var(--space-2); border: 1px solid var(--border); background: var(--bg-panel); color: var(--text); border-radius: var(--radius-pill); padding: 6px var(--space-2); }

.fact-row, .badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); margin-block: var(--space-5); padding: 0; list-style: none; }
.fact-pill, .badge { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-height: 28px; padding: 4px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg-panel); color: var(--text-muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.badge--ink { background: var(--accent); color: var(--bg-panel); border-color: var(--accent); }
.fact-pill svg, .badge svg { width: 14px; height: 14px; flex-shrink: 0; }
.official-shot { width: 100%; max-width: 280px; flex-shrink: 0; margin: var(--space-7) auto; padding: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--radius-shot); }
.official-shot img { outline: 1px solid var(--border); }
.official-shot figcaption { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); line-height: 1.7; }
.shot-row { display: flex; justify-content: center; align-items: flex-start; gap: var(--space-8); flex-wrap: wrap; }
.device-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-5); }
.device-entry { display: grid; grid-template-columns: 44px minmax(0,1fr) 16px; align-items: center; gap: var(--space-4); padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-float); }
.device-entry > svg { width: 40px; height: 48px; }
.device-entry__name { display: block; font-weight: var(--weight-medium); }
.device-entry__note { display: block; margin-top: 4px; font-size: var(--text-sm); color: var(--text-muted); }
.device-entry__arrow { font-family: var(--font-mono); color: var(--text-muted); }
.article-card { display: flex; flex-direction: column; align-items: flex-start; padding: var(--space-7); border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-float); min-width: 0; }
.article-card h3 { margin: var(--space-5) 0 var(--space-3); font-size: var(--text-h3); }
.article-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.article-card p { margin: 0 0 var(--space-5); color: var(--text-muted); }
.article-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); color: var(--text-muted); font-size: var(--text-xs); }
.article-card__link { margin-top: auto; font-size: var(--text-nav); }
.callout { margin: var(--space-7) 0; padding: var(--space-5) var(--space-7); border: 1px solid var(--border); border-left: 2px solid var(--accent); border-radius: var(--radius-panel); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-float); }
.callout p { margin-block: var(--space-1); }
.callout__title { font-weight: var(--weight-medium); }
.store-endnote { margin-top: 80px; padding: var(--space-7); border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-panel); }
.store-endnote h2 { font-size: var(--text-h3); margin-top: 0; }
.store-endnote p { color: var(--text-muted); }
.dl-fab { position: fixed; right: var(--space-5); bottom: calc(var(--space-5) + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 52px; padding: 12px var(--space-5); border: 1px solid var(--accent); border-radius: var(--radius-pill); background: var(--accent); color: var(--bg-panel); box-shadow: var(--shadow-solid); font-size: var(--text-nav); }
.dl-fab svg { width: 20px; height: 20px; flex-shrink: 0; }

.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-panel); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-nav); background: var(--bg-panel); color: var(--text); }
.data-table th, .data-table td,
.prose table th, .prose table td,
.doc-body table th, .doc-body table td { min-width: 7em; padding: var(--space-3) var(--space-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); overflow-wrap: normal; word-break: normal; }
.data-table th, .prose table th, .doc-body table th { background: var(--bg-panel-2); color: var(--text); font-weight: var(--weight-medium); }
.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; overscroll-behavior-inline: contain; }
#install table code { overflow-wrap: normal; word-break: normal; white-space: pre; }
#install td { max-width: 100%; }

/* Preview-only furniture. No application screen is simulated here. */
.preview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--space-5); margin-top: var(--space-10); }
.preview-grid > * { min-width: 0; }
.preview-palette { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--space-4); margin-top: var(--space-10); }
.swatch { min-width: 0; padding: var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--bg-panel); color: var(--text); font-size: var(--text-xs); }
.swatch code { display: block; margin-top: var(--space-2); }
.swatch__paint { display: block; height: 54px; border: 1px solid var(--border); border-radius: var(--radius-focus); color: var(--text); }
.swatch--bg .swatch__paint { background: var(--bg); }
.swatch--panel .swatch__paint { background: var(--bg-panel); }
.swatch--panel2 .swatch__paint { background: var(--bg-panel-2); }
.swatch--glass .swatch__paint { background: var(--bg-glass); }
.swatch--border .swatch__paint { background: var(--border); }
.swatch--accent .swatch__paint { background: var(--accent); }
.swatch--dark .swatch__paint { background: var(--accent-dark); }
.swatch--text .swatch__paint { background: var(--text); }
.swatch--muted .swatch__paint { background: var(--text-muted); }
.swatch--faint .swatch__paint { background: var(--text-faint); }
.swatch--sep .swatch__paint { background: var(--sep); }
.swatch--lead .swatch__paint { background: var(--lead); }
.swatch--success .swatch__paint { background: var(--success); }
.swatch--warn .swatch__paint { background: var(--warn); }
.swatch--error .swatch__paint { background: var(--error); }
.swatch--tophi .swatch__paint { background: var(--ink-top-hi); }
.swatch--toplo .swatch__paint { background: var(--ink-top-lo); }
.swatch--face .swatch__paint { background: var(--ink-face); }
.swatch--facelow .swatch__paint { background: var(--ink-face-low); }
.swatch--ridge .swatch__paint { background: var(--ink-ridge); }
.swatch--ridgesoft .swatch__paint { background: var(--ink-ridge-soft); }
.swatch--halohi .swatch__paint { background: var(--halo-hi); }
.swatch--halolo .swatch__paint { background: var(--halo-lo); }
.swatch--haloedge .swatch__paint { background: var(--halo-edge); }
.swatch--s18 .swatch__paint { background: var(--shade-18); }
.swatch--s12 .swatch__paint { background: var(--shade-12); }
.swatch--s07 .swatch__paint { background: var(--shade-07); }
.swatch--s03 .swatch__paint { background: var(--shade-03); }
.swatch--s00 .swatch__paint { background: var(--shade-00); }
.preview-shot-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 750 / 1334; border: 1px solid var(--border); border-radius: var(--radius-shot); background: var(--bg-panel-2); color: var(--text-muted); font-family: var(--font-mono); font-size: var(--text-sm); }
.preview-buttons { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; margin-top: var(--space-7); }
.preview-static-fab { position: static; margin-top: var(--space-5); }
.preview-header .preview-menu { display: none; position: static; }
.preview-menu summary { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg-panel); color: var(--text); cursor: pointer; list-style: none; }
.preview-menu summary::-webkit-details-marker { display: none; }
.preview-menu nav { position: absolute; top: var(--header-h); left: 0; right: 0; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; padding: var(--space-3) var(--gutter); background: var(--bg-panel); color: var(--text); border-bottom: 1px solid var(--border); }
.preview-menu nav a { display: flex; align-items: center; min-height: 44px; padding: var(--space-2); border-bottom: 1px solid var(--border); }

@media (max-width: 1180px) { .preview-header .preview-menu { display: block; } }
@media (max-width: 900px) {
  .tabs { grid-template-columns: minmax(0,1fr); gap: var(--space-5); }
  .tabs [role="tablist"] { flex-direction: row; overflow-x: auto; gap: var(--space-1); padding: 2px; overscroll-behavior-inline: contain; }
  .tabs [role="tab"] { flex-shrink: 0; width: auto; min-height: 44px; padding: var(--space-2) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: var(--text-nav); background: var(--bg-panel); color: var(--text-muted); white-space: nowrap; }
  .tabs [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--bg-panel); border-color: var(--accent); }
  .tabs__panels { position: static; }
  .preview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .fact-row, .badge-row { flex-direction: row; flex-wrap: wrap; }
  .device-grid, .preview-grid { grid-template-columns: minmax(0,1fr); }
  .device-entry { padding: var(--space-4); gap: var(--space-2); }
  .plat-card { flex-basis: 100%; padding: var(--space-5); }
  .plat-actions .btn { flex: 1 1 auto; }
  .faq-item { padding-inline: var(--space-4); }
  .term-card, .article-card, .callout, .store-endnote { padding: var(--space-5); }
  .official-shot { margin-inline: auto; }
  .shot-row { flex-direction: column; align-items: center; }
  .preview-palette { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dl-fab { right: var(--space-3); bottom: calc(var(--space-3) + env(safe-area-inset-bottom)); width: 52px; height: 52px; min-height: 52px; padding: 0; }
  .dl-fab__text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  body.has-article-fab { padding-bottom: 84px; }
  #install table, #install tbody, #install tr, #install td { display: block; width: 100%; min-width: 0; }
  #install thead { display: none; }
  #install tr { padding-top: var(--space-2); padding-bottom: var(--space-2); border-bottom: 1px solid var(--border); }
  #install td { border-bottom: 0; }
  #install td::before { content: attr(data-label); display: block; margin-bottom: 6px; font-weight: var(--weight-medium); color: var(--text); }
  #install td code { display: block; max-width: 100%; overflow-x: auto; overflow-wrap: normal; word-break: normal; white-space: pre; }
}
@media (prefers-reduced-motion: reduce) {
  .rig__wedge, .rig__shadow { animation: none; }
}