.badge, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 6px 14px 6px 11px;
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-pill);
  background: var(--white-a80);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  line-height: 1.5;
}
.badge__dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--success); color: var(--text); box-shadow: 0 0 0 4px var(--success-a18); }
.badge__sep { color: var(--text-muted); }
.eyebrow { padding: 4px 13px; border-color: var(--accent-a35); background: var(--bg); color: var(--accent-ink); font-size: 12.5px; font-weight: var(--weight-semibold); box-shadow: none; }
.facts { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.facts code { font-size: 11.5px; color: var(--text); }
.tag { display: inline-block; max-width: 100%; padding: 4px 10px; border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
.devices { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.devices ul { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 0; margin: 0 0 0 -10px; list-style: none; }
.devices a { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 10px; border-radius: var(--r-pill); color: var(--text-muted); font-size: 13.5px; text-decoration: none; white-space: nowrap; transition: color var(--motion-fast), background-color var(--motion-fast); }
.devices svg { width: 17px; height: 20px; }
.devices a:hover { color: var(--text); background: var(--bg-panel); }
.devices__rule { width: 1px; height: 16px; flex-shrink: 0; background: var(--border); color: var(--text); margin: 0 8px 0 4px; }
.devices .store-pill, .store-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 12px; border: var(--stroke) solid var(--accent-a35); border-radius: var(--r-pill); background: var(--accent-a06); color: var(--accent-ink); font-size: 12.5px; font-weight: var(--weight-semibold); text-decoration: none; }
.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  max-width: 100%;
  padding: 10px 24px;
  border: var(--stroke) solid var(--text);
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform var(--motion-fast), box-shadow var(--motion-fast);
}
.app-store-button > svg { width: 25px; height: 29px; }
.app-store-button__text { display: block; line-height: 1.25; }
.app-store-button small { display: block; font-size: 11px; font-weight: var(--weight-medium); }
.app-store-button strong { display: block; margin-top: 2px; font-size: 16px; font-weight: var(--weight-semibold); }
.app-store-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-board); }
.app-store-button:active { transform: translateY(1px); }
.app-store-button[aria-disabled="true"] { background: var(--bg-panel-2); color: var(--text-muted); border-color: var(--border); box-shadow: none; cursor: not-allowed; transform: none; }
.store-guide { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.store-guide__copy { max-width: 40em; min-width: 0; }
.store-guide__copy h2 { margin-top: 0; }
.store-guide__copy p { margin-bottom: 0; color: var(--text-muted); }

.tabs-layout { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.7fr); gap: 32px; align-items: start; }
.tab-list {
  margin: 0;
  padding: 0;
  border: var(--stroke) solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.tab-list [role="tab"] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 58px;
  padding: 16px 22px;
  border: 0;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 15px;
  text-align: left;
}
.tab-list [role="tab"] + [role="tab"]::before { content: ""; position: absolute; top: 0; left: 22px; right: 0; height: 1px; background: var(--border-soft); }
.tab-list [role="tab"]::after { content: "›"; color: var(--text-muted); font-size: 22px; line-height: 1; flex-shrink: 0; }
.tab-list [role="tab"][aria-selected="true"] { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.tab-list [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; inset: 12px auto 12px 0; width: 3px; height: auto; border-radius: var(--r-line); background: var(--accent); }
.tab-list [role="tab"][aria-selected="true"]::after { color: var(--accent-ink); }
.tab-list [role="tab"]:focus-visible { outline-offset: -4px; z-index: 1; }
.tab-panel { min-width: 0; padding: 32px; border: var(--stroke) solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.tab-panel h3 { margin-top: 0; }
.tab-panel p { color: var(--text-muted); line-height: 1.85; }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-bottom: 56px; align-items: stretch; }
.comparison__problems { padding: 28px; background: var(--bg); color: var(--text); border-radius: var(--r-card); }
.comparison__solutions { padding: 28px; border: var(--stroke) solid var(--border); background: var(--bg); color: var(--text); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.comparison h3 { margin-top: 0; }
.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li { display: flex; align-items: flex-start; gap: 12px; padding-block: 12px; }
.status-point { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: var(--r-circle); font-size: 15px; font-weight: var(--weight-bold); }
.status-point--error { background: var(--reject-bg); color: var(--reject-ink); }
.status-point--success { background: var(--direct-bg); color: var(--direct-ink); }
.toc { padding: 16px; border: var(--stroke) solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); }
.toc ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.toc a { display: block; padding: 10px 14px; border-radius: var(--r-pill); color: var(--text-muted); font-size: 14px; text-decoration: none; }
.toc a:hover, .toc a[aria-current] { background: var(--bg-panel); color: var(--text); }
.toc--sticky { position: sticky; top: 16px; z-index: 5; }
.faq-list { border: var(--stroke) solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); }
.faq { padding-inline: 24px; }
.faq + .faq { border-top: var(--stroke) solid var(--border-soft); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 20px; min-height: 64px; cursor: pointer; list-style: none; font-weight: var(--weight-semibold); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-ink); font-size: 23px; flex-shrink: 0; }
.faq[open] summary::after { content: "−"; }
.faq__answer { padding-bottom: 22px; color: var(--text-muted); }
.faq__answer > :last-child { margin-bottom: 0; }
.term-card { border-top: 3px solid var(--accent); }
.term-card__category { display: block; color: var(--accent-ink); font-size: 12px; margin-bottom: 12px; }
.term-card dt { font-family: var(--font-mono); font-size: 19px; font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.term-card dd { margin: 14px 0 0; color: var(--text-muted); }
.device-card { display: flex; gap: 24px; align-items: flex-start; }
.device-card__icon { width: 44px; height: 60px; flex-shrink: 0; color: var(--text-muted); }
.device-card__body { min-width: 0; }
.device-card h3 { margin-bottom: 12px; }
.device-card p { color: var(--text-muted); }
.device-card__link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--accent-ink); font-weight: var(--weight-semibold); text-decoration: none; }
.article-card { display: flex; flex-direction: column; align-items: flex-start; height: 100%; }
.article-card h3 { margin: 18px 0 12px; font-size: 20px; line-height: 1.5; }
.article-card h3 a { text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-ink); }
.article-card p { color: var(--text-muted); font-size: 14px; }
.article-card__link { margin-top: auto; padding-top: 12px; color: var(--accent-ink); font-size: 14px; text-decoration: none; }
.callout { margin: 24px 0; padding: 22px 24px; border: var(--stroke) solid var(--accent-a24); border-left: 3px solid var(--accent); border-radius: var(--r-tag); background: var(--accent-a06); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout__title { display: block; margin-bottom: 8px; font-weight: var(--weight-semibold); color: var(--accent-ink); }
.official-shot { width: 100%; max-width: 280px; margin: 24px auto; padding: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-mini); }
.official-shot { border-radius: var(--r-mini); }
.official-shot img, .shot-placeholder { outline: var(--stroke) solid var(--border); outline-offset: -1px; }
.official-shot figcaption { margin-top: 12px; color: var(--text-muted); font-size: 12.5px; line-height: 1.6; text-align: center; }
.shot-placeholder { display: grid; place-content: center; aspect-ratio: 750 / 1334; border-radius: var(--r-mini); background: var(--bg-panel); color: var(--text-muted); text-align: center; padding: 24px; }
.shot-placeholder strong { font-family: var(--font-mono); font-size: 18px; }
.shot-placeholder span { display: block; margin-top: 8px; font-size: 12px; }
.shot-layout { display: flex; align-items: flex-start; gap: 48px; }
.shot-layout > :not(.official-shot) { min-width: 0; flex: 1; }
.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; border: var(--stroke) solid var(--border); border-radius: var(--r-tag); -webkit-overflow-scrolling: touch; }
.data-table { border-collapse: collapse; width: 100%; color: var(--text); font-size: 14px; }
.data-table th, .data-table td, .prose th, .prose td {
  min-width: 7em;
  padding: 14px 18px;
  border-bottom: var(--stroke) solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.data-table td, .prose td { background: var(--bg); color: var(--text); }
.data-table td code, .prose 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; }
.dl-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--layer-fab);
  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-card);
  text-decoration: none;
  font-size: 14px;
}
.dl-fab svg { width: 22px; height: 22px; color: var(--accent-ink); }
.dl-fab small { display: block; color: var(--text-muted); font-size: 11px; }
.dl-fab:hover { border-color: var(--accent); }

/* A configuration document rendered as a three-lane rule board, not an app screen. */
.device { margin: 0; min-width: 0; }
.shell { padding: 10px; border-radius: var(--r-shell); background: var(--white-a60); color: var(--text); border: var(--stroke) solid var(--border); box-shadow: var(--shadow-shell); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.board { background: var(--bg); color: var(--text); border: var(--stroke) solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-board); overflow: hidden; }
.board__bar { min-height: 46px; display: flex; align-items: center; gap: 14px; padding: 8px 18px; border-bottom: var(--stroke) solid var(--border-soft); background: linear-gradient(180deg, var(--bg), var(--bg-lane)); color: var(--text-muted); }
.dots { display: flex; gap: 7px; flex-shrink: 0; }
.dots i { width: 10px; height: 10px; border-radius: var(--r-circle); background: var(--bg-panel-2); color: var(--text); border: var(--stroke) solid var(--border); }
.board__file { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.board__file svg { width: 14px; height: 16px; }
.board__mode { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.board__mode b { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 10px; border-radius: var(--r-pill); background: var(--accent-a10); color: var(--accent-ink); font-family: var(--font-mono); font-size: 11px; font-weight: var(--weight-semibold); }
.board__body {
  --row-h: 50px;
  --row-gap: 8px;
  --travel: calc((var(--row-h) + var(--row-gap)) * 6);
  display: grid;
  grid-template-columns: 28px 112px repeat(3, minmax(0, 1fr));
  grid-template-rows: 32px repeat(7, var(--row-h)) 46px;
  column-gap: 8px;
  row-gap: var(--row-gap);
  padding: 16px 18px 18px;
}
.board__body > * { min-width: 0; }
.colhead { grid-row: 1; align-self: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); z-index: 2; }
.colhead--scale { grid-column: 1; justify-self: center; }
.colhead--sec { grid-column: 2; font-family: var(--font-body); padding-left: 2px; }
.c-p { grid-column: 3; }
.c-d { grid-column: 4; }
.c-r { grid-column: 5; }
.r1 { grid-row: 2; }
.r2 { grid-row: 3; }
.r3 { grid-row: 4; }
.r4 { grid-row: 5; }
.r5 { grid-row: 6; }
.r6 { grid-row: 7; }
.r7 { grid-row: 8; }
.lane-bg { grid-row: 1 / 9; margin-top: -6px; border-radius: var(--r-lane); background: var(--bg-lane); color: var(--text); border: var(--stroke) solid var(--border-soft); z-index: 0; }
.lane-head { grid-row: 1; align-self: center; padding-inline: 8px; z-index: 2; }
.policy { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; padding: 3px 11px 3px 9px; border-radius: var(--r-pill); font-family: var(--font-mono); font-size: 11px; font-weight: var(--weight-semibold); }
.policy i { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-circle); }
.policy--proxy { background: var(--grad-accent); color: var(--on-accent); box-shadow: var(--shadow-mini); }
.policy--proxy i { background: var(--white-a85); }
.policy--direct { background: var(--direct-bg); color: var(--direct-ink); }
.policy--direct i { background: var(--success); }
.policy--reject { background: var(--reject-bg); color: var(--reject-ink); }
.policy--reject i { background: var(--error); }
.rail { grid-column: 1; grid-row: 2 / 9; justify-self: center; width: 0; border-left: 1px dashed var(--border-strong); z-index: 1; }
.tick { grid-column: 1; align-self: center; justify-self: center; z-index: 2; padding: 2px 3px; border-radius: var(--r-tick); background: var(--bg); color: var(--accent-ink); font-family: var(--font-mono); font-size: 11px; font-weight: var(--weight-semibold); line-height: 1.2; }
.cursor { grid-column: 1 / -1; grid-row: 2; margin: -3px -10px; border-radius: var(--r-tag); background: linear-gradient(90deg, var(--accent-a24), var(--accent-a10) 28%, var(--accent-a06)); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-a16); z-index: 1; position: relative; opacity: 0; will-change: transform, opacity; animation: rule-sweep var(--sweep-dur) linear infinite; }
.cursor::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: var(--r-line); background: var(--accent); }
.secs { grid-column: 2; grid-row: 2 / span 3; align-self: start; z-index: 2; margin: 0; padding: 0; list-style: none; background: var(--bg); color: var(--text); border: var(--stroke) solid var(--border); border-radius: var(--r-tag); box-shadow: var(--shadow-mini); overflow: hidden; }
.secs li { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 37px; padding: 6px 7px 6px 10px; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.secs li + li::before { content: ""; position: absolute; left: 10px; right: 0; top: 0; height: 1px; background: var(--border-soft); }
.secs li::after { content: "›"; color: var(--text-muted); font-family: var(--font-body); font-size: 16px; }
.secs li.is-current { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.secs li.is-current::after { color: var(--accent-ink); }
.order-note { grid-column: 2; grid-row: 6 / span 3; align-self: end; z-index: 2; display: flex; gap: 7px; padding: 0 4px 4px; font-size: 11.5px; line-height: 1.55; color: var(--text-muted); }
.order-note svg { width: 13px; height: 16px; color: var(--accent-ink); margin-top: 2px; }
.rule { position: relative; z-index: 2; margin-inline: 6px; display: grid; align-content: center; padding: 7px 10px; background: var(--bg); color: var(--text); border: var(--stroke) solid var(--border); border-radius: var(--r-mini); box-shadow: var(--shadow-mini); }
.rule__idx { position: absolute; top: 6px; right: 8px; font-family: var(--font-mono); font-size: 9.5px; line-height: 1; color: var(--text-muted); }
.rule code { display: block; font-size: 10.5px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.rule .ln { display: block; }
.rule .k { font-weight: var(--weight-semibold); }
.rule .v { color: var(--text-muted); }
.c-p .p { color: var(--accent-ink); font-weight: var(--weight-semibold); }
.c-d .p { color: var(--direct-ink); font-weight: var(--weight-semibold); }
.c-r .p { color: var(--reject-ink); font-weight: var(--weight-semibold); }
.final { grid-column: 3 / 6; grid-row: 9; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-tag); background: var(--bg); color: var(--text); }
.final code { font-size: 12px; font-weight: var(--weight-semibold); }
.final code .p { color: var(--accent-ink); }
.final > span { font-size: 12px; color: var(--text-muted); }
@keyframes rule-sweep {
  0% { transform: translateY(0); opacity: 0; }
  3% { transform: translateY(0); opacity: 1; }
  75%, 90% { transform: translateY(var(--travel)); opacity: 1; }
  97% { transform: translateY(var(--travel)); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* Preview-only furniture stays in the external stylesheet. */
.preview-section { padding-top: 64px; padding-bottom: 64px; }
.preview-section h2 { margin-top: 0; }
.preview-label { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.swatch { min-width: 0; border: var(--stroke) solid var(--border); border-radius: var(--r-tag); background: var(--bg); color: var(--text); overflow: hidden; }
.swatch__paint { height: 64px; border-bottom: var(--stroke) solid var(--border); }
.swatch code { display: block; padding: 10px 12px; color: var(--text); font-size: 11px; }
.paint-bg { background: var(--bg); }
.paint-panel { background: var(--bg-panel); }
.paint-panel2 { background: var(--bg-panel-2); }
.paint-lane { background: var(--bg-lane); }
.paint-border { background: var(--border); }
.paint-border-soft { background: var(--border-soft); }
.paint-border-strong { background: var(--border-strong); }
.paint-accent { background: var(--accent); }
.paint-accent-dark { background: var(--accent-dark); }
.paint-accent-ink { background: var(--accent-ink); }
.paint-text { background: var(--text); }
.paint-muted { background: var(--text-muted); }
.paint-faint { background: var(--text-faint); }
.paint-success { background: var(--success); }
.paint-warn { background: var(--warn); }
.paint-error { background: var(--error); }
.paint-direct { background: var(--direct-bg); }
.paint-direct-ink { background: var(--direct-ink); }
.paint-reject { background: var(--reject-bg); }
.paint-reject-ink { background: var(--reject-ink); }
.paint-glow1 { background: var(--glow-1); }
.paint-glow2 { background: var(--glow-2); }
.paint-glow0 { background: var(--glow-0); }
.paint-a06 { background: var(--accent-a06); }
.paint-a10 { background: var(--accent-a10); }
.paint-a16 { background: var(--accent-a16); }
.paint-a24 { background: var(--accent-a24); }
.paint-a35 { background: var(--accent-a35); }
.paint-a50 { background: var(--accent-a50); }
.paint-success-a18 { background: var(--success-a18); }
.paint-white60 { background: var(--white-a60); }
.paint-white80 { background: var(--white-a80); }
.paint-white85 { background: var(--white-a85); }
.paint-white30 { background: var(--white-a30); }
.paint-veil { background: var(--veil); }
.paint-gradient { background: var(--grad-accent); }
.preview-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.preview-type { margin-bottom: 28px; }
@media (max-width: 768px) {
  .tabs-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .comparison { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .shot-layout { flex-direction: column; gap: 24px; }
  .shot-layout .official-shot { align-self: center; }
}
@media (max-width: 640px) {
  .facts { flex-direction: row; flex-wrap: wrap; }
  .tab-panel { padding: 22px; }
  .comparison__problems, .comparison__solutions { padding: 22px; }
  .device-card { gap: 18px; }
  .faq { padding-inline: 20px; }
  .official-shot { max-width: min(280px, 100%); }
  .dl-fab { right: 20px; bottom: 20px; padding: 10px 16px; }
  .board__mode { display: none; }
  .board__body { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
  .colhead, .rail, .tick, .cursor, .secs, .order-note, .lane-bg, .lane-head.c-d, .lane-head.c-r, .rule.c-d, .rule.c-r { display: none; }
  .lane-head { padding: 0 0 4px; }
  .rule { margin: 0; padding: 10px 12px; }
  .rule code { font-size: 11.5px; }
  .final { padding: 12px 14px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .board__bar { gap: 10px; padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; opacity: 1; transform: none; }
  .app-store-button:hover { transform: none; }
}