.tabs { min-width: 0; }
[role="tablist"] { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
[role="tab"] { display: inline-flex; align-items: center; justify-content: center; position: relative; min-height: 44px; padding: 10px 20px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text-muted); line-height: 1.5; font-size: 14px; overflow: hidden; }
[role="tab"]:hover { border-color: var(--border-strong); color: var(--text); }
[role="tab"][aria-selected="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-dark); }
[role="tabpanel"] { min-width: 0; }
.tab-progress { position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px; background: var(--on-dark); color: var(--text); transform: scaleX(0); transform-origin: left; }
[data-playing="true"] [aria-selected="true"] .tab-progress { animation: tab-clock var(--feature-period) linear forwards; }
@keyframes tab-clock { to { transform: scaleX(1); } }
.toc { position: sticky; top: var(--header-h); z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; overflow-x: visible; padding-top: 12px; padding-bottom: 12px; background: var(--bg); color: var(--text); border-bottom: 1px solid var(--border); }
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; flex-shrink: 0; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text-muted); font-size: 14px; }
.toc a:hover, .toc a[aria-current] { border-color: var(--accent); color: var(--accent); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { position: relative; padding: 24px 40px 24px 0; cursor: pointer; list-style: none; font-size: 18px; line-height: 1.6; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 8px; top: 24px; color: var(--text-muted); }
.faq-item[open] summary::after { content: "−"; color: var(--accent); }
.faq-answer { padding-bottom: 26px; color: var(--text-muted); max-width: 65em; }
.faq-answer p + p { margin-top: 14px; }
.term-card { border-top: 3px solid var(--accent); }
.term-en { display: block; margin-top: 6px; font-family: var(--font-mono); color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; min-height: 26px; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--text-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.badge-first { background: var(--accent); color: var(--on-dark); border-color: var(--accent); }
.badge-recommend { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-soft); }
.badge-archived { background: var(--bg); color: var(--text-muted); border-color: var(--border-strong); }
.status-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--success); color: var(--on-dark); }
.status-dot.is-warning { background: var(--warn); color: var(--text); }
.status-dot.is-error { background: var(--error); color: var(--on-dark); }
.client-card { display: grid; gap: 24px; }
.client-card.is-first { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.client-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.client-head > div { min-width: 0; flex: 1; }
.client-logo { width: 56px; height: 56px; flex-shrink: 0; }
.client-card p { color: var(--text-muted); }
.client-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--text-muted); }
.client-actions { display: flex; flex-wrap: wrap; gap: 12px; }
[data-version]:empty { display: none; }
.post-card { display: flex; flex-direction: column; align-items: flex-start; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.post-card h3 { font-size: 23px; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { margin-top: 16px; margin-bottom: 24px; color: var(--text-muted); }
.post-card > .text-link { margin-top: auto; }
.callout { margin: 28px 0; padding: 22px 24px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-inner); background: var(--bg-panel); color: var(--text); }
.callout p + p { margin-top: 12px; }
.callout-title { font-weight: var(--weight-medium); margin-bottom: 8px; }
.callout-warning { border-left-color: var(--warn); }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--border); border-radius: var(--r-inner); }
.data-table { width: 100%; border-collapse: collapse; background: var(--bg-panel); color: var(--text); font-size: 14px; text-align: left; }
.data-table th, .data-table td, .prose table th, .prose table td, .article-body table th, .article-body table td { min-width: 7em; padding: 16px 20px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: normal; word-break: normal; }
.data-table th, .prose table th, .article-body table th { background: var(--bg); color: var(--text); font-weight: var(--weight-medium); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table, .article-body table { display: block; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; background: var(--bg-panel); color: var(--text); }
.download-note { margin-top: 48px; padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.download-note > div { min-width: 0; }
.download-note p { margin-top: 10px; color: var(--text-muted); }
.download-note .btn { flex-shrink: 0; }
.dl-fab { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: var(--r-btn); background: var(--text); color: var(--on-dark); font-size: 14px; font-weight: var(--weight-medium); box-shadow: var(--shadow-fab); transition: background-color var(--speed); }
.dl-fab svg { width: 17px; height: 17px; }
.dl-fab:hover { background: var(--accent-dark); color: var(--on-dark); }

.band { background: var(--bg-panel-2); color: var(--on-dark); padding-top: 120px; padding-bottom: 120px; }
.band-heading { text-align: center; margin-bottom: 40px; }
.band-cap { font-size: 14px; font-weight: var(--weight-medium); }
.band h2 { margin-top: 16px; font-size: 34px; }
.band-heading > p { margin: 18px auto 0; max-width: 40em; font-size: 16px; color: var(--on-dark-muted); }
.band [role="tablist"] { justify-content: center; margin-bottom: 36px; }
.band [role="tab"] { background: var(--bg-panel-3); color: var(--on-dark-muted); border-color: var(--bg-panel-3); }
.band [role="tab"][aria-selected="true"] { background: var(--bg-panel); color: var(--text); border-color: var(--bg-panel); }
.band .tab-progress { background: var(--text); color: var(--on-dark); }
.feature-detail { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0,1.6fr); overflow: hidden; border-radius: var(--r-window); background: var(--bg-panel-3); color: var(--on-dark); }
.feature-art { aspect-ratio: 1; display: grid; place-items: center; background: var(--black); color: var(--on-dark); }
.feature-art svg { width: 48%; height: 48%; stroke-width: 1; }
.feature-copy { padding: 48px; align-self: center; }
.feature-copy h3 { font-size: 28px; }
.feature-copy p { margin-top: 20px; color: var(--on-dark-muted); line-height: 1.9; }
.feature-copy a { display: inline-block; margin-top: 28px; color: var(--on-dark); text-decoration: underline; text-underline-offset: 6px; }
.quick-steps { list-style: none; padding: 0; margin: 0; counter-reset: quick; }
.quick-steps li { counter-increment: quick; padding-block: 24px; border-bottom: 1px solid var(--border); }
.quick-steps li::before { content: counter(quick,decimal-leading-zero); display: inline-block; margin-right: 16px; color: var(--coral); font-family: var(--font-mono); }
.quick-steps h3 { display: inline; }
.quick-steps p { margin-top: 12px; color: var(--text-muted); }

.stage { position: relative; width: 718px; height: 534px; }
.win { position: absolute; left: 0; top: 0; width: 680px; background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-window); box-shadow: var(--shadow-window); overflow: hidden; }
.win-chrome { position: relative; height: 44px; display: flex; align-items: center; gap: 8px; padding-left: 18px; border-bottom: 1px solid var(--border); }
.win-chrome i { width: 11px; height: 11px; border-radius: var(--r-circle); background: var(--chrome-dot); color: var(--text); }
.win-title { position: absolute; left: 0; right: 0; text-align: center; font-size: 12.5px; font-weight: var(--weight-medium); color: var(--text-muted); letter-spacing: .01em; }
.win-body { display: grid; grid-template-columns: 64px 160px minmax(0,1fr); }
.rail { display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; border-right: 1px solid var(--border); }
.rail-mark { width: 30px; height: 30px; }
.rail-tools { display: flex; flex-direction: column; gap: 16px; color: var(--text-muted); }
.rail-tools svg { width: 18px; height: 18px; }
.side { background: var(--bg); color: var(--text-muted); padding: 18px 12px; border-right: 1px solid var(--border); }
.side-cap { font-size: 11px; color: var(--text-muted); padding: 0 10px 10px; letter-spacing: .04em; }
.side ul, .rules, .rail-tools { list-style: none; margin: 0; padding-left: 0; }
.side li { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; margin-bottom: 4px; border-radius: var(--r-pill); font-size: 13px; }
.side li svg { width: 16px; height: 16px; }
.side li.is-on { background: var(--accent); color: var(--on-dark); }
.win-main { min-width: 0; padding: 20px 24px; }
.main-title { font-size: 15px; font-weight: var(--weight-medium); line-height: 20px; }
.sub-input { display: flex; gap: 8px; margin-top: 14px; }
.sub-field { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; gap: 8px; padding-inline: 12px; border: 1px solid var(--border); border-radius: var(--r-inner); background: var(--bg-panel); color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; overflow: hidden; }
.sub-field svg { width: 15px; height: 15px; }
.sub-btn { height: 40px; padding-inline: 16px; display: flex; align-items: center; border-radius: var(--r-inner); background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: var(--weight-medium); }
.blk-cap { margin-top: 18px; font-size: 11.5px; line-height: 14px; color: var(--text-muted); letter-spacing: .03em; display: flex; align-items: center; gap: 8px; }
.cards { display: grid; gap: 10px; margin-top: 10px; }
.cfg { height: 60px; display: flex; align-items: center; gap: 12px; padding-inline: 14px; border: 1px solid var(--border); border-radius: var(--r-inner); background: var(--bg-panel); color: var(--text); }
.cfg.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cfg-ico { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r-small); background: var(--bg); color: var(--text-muted); }
.cfg.is-on .cfg-ico { background: var(--accent-soft); color: var(--accent); }
.cfg-ico svg { width: 16px; height: 16px; }
.cfg-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: var(--weight-medium); line-height: 18px; }
.cfg-chip { font-size: 10.5px; line-height: 18px; padding-inline: 7px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); }
.cfg-meta { font-size: 11.5px; line-height: 16px; color: var(--text-muted); margin-top: 2px; }
.mode-dot { width: 6px; height: 6px; border-radius: var(--r-circle); background: var(--coral); color: var(--text); }
.mode-label { color: var(--text-muted); }
.rules { position: relative; margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r-inner); overflow: hidden; }
.rules li { position: relative; z-index: 1; height: 32px; display: flex; align-items: center; gap: 10px; padding-inline: 12px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text); white-space: nowrap; }
.rules li + li { border-top: 1px solid var(--border); }
.r-val, .r-sep { color: var(--text-muted); }
.r-pol { font-weight: var(--weight-medium); }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 32px; z-index: 0; background: var(--accent-soft); color: var(--text); animation: rule-scan 9s ease-in-out infinite; }
@keyframes rule-scan {
  0% { transform: translateY(0); opacity: 0; }
  4% { transform: translateY(0); opacity: 1; }
  30% { transform: translateY(0); }
  36% { transform: translateY(100%); }
  63% { transform: translateY(100%); }
  69% { transform: translateY(200%); }
  95% { transform: translateY(200%); opacity: 1; }
  100% { transform: translateY(200%); opacity: 0; }
}
.phone { position: absolute; left: 508px; top: 150px; width: 210px; height: 384px; padding: 7px; background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-phone); box-shadow: var(--shadow-phone); animation: phone-float 7s ease-in-out infinite; }
@keyframes phone-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.screen { height: 100%; display: flex; flex-direction: column; padding: 10px 12px 8px; background: var(--bg); color: var(--text); border-radius: var(--r-phone-screen); }
.status { display: flex; align-items: center; justify-content: space-between; height: 18px; padding-inline: 6px; font-size: 11px; font-weight: var(--weight-semibold); }
.status-ico { display: flex; align-items: center; gap: 4px; }
.status-ico svg { height: 9px; width: auto; }
.ph-title { margin-top: 12px; padding-inline: 4px; font-size: 16px; font-weight: var(--weight-medium); line-height: 22px; }
.ph-card { background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-device-card); }
.start { margin-top: 12px; display: flex; flex-direction: column; align-items: center; padding-top: 14px; padding-bottom: 10px; }
.start-key { width: 76px; height: 76px; border-radius: var(--r-circle); display: grid; place-items: center; border: 1px solid var(--border); background: var(--bg-panel); color: var(--text); box-shadow: 0 0 0 6px var(--bg); }
.start-key span { width: 54px; height: 54px; border-radius: var(--r-circle); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.start-key svg { width: 24px; height: 24px; }
.start-label { margin-top: 8px; font-size: 11.5px; color: var(--text-muted); }
.seg { margin-top: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; padding: 3px; border-radius: var(--r-pill); }
.seg span { height: 28px; display: flex; align-items: center; justify-content: center; gap: 5px; border-radius: var(--r-pill); font-size: 11.5px; color: var(--text-muted); }
.seg span.is-on { background: var(--accent-soft); color: var(--accent); font-weight: var(--weight-medium); }
.toggles { margin-top: 10px; }
.tg { height: 42px; display: flex; align-items: center; justify-content: space-between; padding-inline: 12px; font-size: 12px; }
.tg + .tg { border-top: 1px solid var(--border); }
.sw { position: relative; width: 32px; height: 19px; border-radius: var(--r-pill); background: var(--switch-off); color: var(--text); }
.sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 15px; height: 15px; border-radius: var(--r-circle); background: var(--knob); color: var(--text); box-shadow: var(--shadow-soft); }
.sw.is-on { background: var(--accent); color: var(--on-dark); }
.sw.is-on::after { transform: translateX(13px); }
.home-bar { margin: auto auto 0; width: 64px; height: 4px; border-radius: var(--r-pill); background: var(--text); color: var(--on-dark); opacity: .85; }

.swatch-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; }
.swatch { min-width: 0; border: 1px solid var(--border); border-radius: var(--r-inner); overflow: hidden; background: var(--bg-panel); color: var(--text); }
.swatch-color { height: 72px; }
.swatch code { display: block; padding: 12px; color: var(--text); }
.sw-bg { background: var(--bg); color: var(--text); }
.sw-panel { background: var(--bg-panel); color: var(--text); }
.sw-panel2 { background: var(--bg-panel-2); color: var(--on-dark); }
.sw-panel3 { background: var(--bg-panel-3); color: var(--on-dark); }
.sw-black { background: var(--black); color: var(--on-dark); }
.sw-border { background: var(--border); color: var(--text); }
.sw-border-strong { background: var(--border-strong); color: var(--text); }
.sw-accent { background: var(--accent); color: var(--on-dark); }
.sw-accent-dark { background: var(--accent-dark); color: var(--on-dark); }
.sw-accent-soft { background: var(--accent-soft); color: var(--text); }
.sw-accent-ring { background: var(--accent-ring); color: var(--text); }
.sw-coral { background: var(--coral); color: var(--text); }
.sw-text { background: var(--text); color: var(--on-dark); }
.sw-muted { background: var(--text-muted); color: var(--on-dark); }
.sw-faint { background: var(--text-faint); color: var(--text); }
.sw-on-dark { background: var(--on-dark); color: var(--text); }
.sw-on-dark-muted { background: var(--bg-panel-2); color: var(--on-dark-muted); }
.sw-on-dark-muted::after { content: ""; display: block; height: 100%; background: var(--on-dark-muted); color: var(--text); }
.sw-success { background: var(--success); color: var(--text); }
.sw-warn { background: var(--warn); color: var(--text); }
.sw-error { background: var(--error); color: var(--on-dark); }
.sw-chrome { background: var(--chrome-dot); color: var(--text); }
.sw-switch { background: var(--switch-off); color: var(--text); }
.sw-knob { background: var(--knob); color: var(--text); }
.sw-veil { background: var(--veil); color: var(--text); }
.sw-clear { background: var(--clear); color: var(--text); }
.type-sample { display: grid; gap: 24px; }
.display-sample { font-family: var(--font-display); font-size: clamp(24px,3vw,40px); font-weight: var(--weight-normal); line-height: 1.2; letter-spacing: -.02em; }
.button-states { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.focus-sample { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (min-width: 641px) and (max-width: 800px) {
  .stage { transform: scale(.8); transform-origin: top left; margin-inline: 0; }
  .stage-col { height: 440px; }
}
@media (max-width: 640px) {
  .stage { transform: scale(.5); transform-origin: top left; margin-inline: 0; }
  .stage-col { height: 280px; }
  .feature-detail { grid-template-columns: minmax(0,1fr); }
  .feature-art { aspect-ratio: auto; min-height: 220px; }
  .feature-art svg { width: 120px; height: 120px; }
  .feature-copy { padding: 28px 24px; }
  .feature-copy h3 { font-size: 24px; }
  .band h2 { font-size: 28px; }
  .band [role="tab"] { padding-inline: 14px; font-size: 13px; }
  .download-note { align-items: flex-start; flex-direction: column; padding: 24px; }
  .dl-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom,0px)); }
}
@media (max-width: 390px) {
  .stage { transform: scale(.39); }
  .stage-col { height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .scan { transform: translateY(200%); opacity: 1; }
  .phone { transform: none; }
  .tab-progress { display: none; }
}