.hero { padding-top: 44px; text-align: center; }
.tag, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  min-height: 30px;
  padding: 4px 14px;
  border: var(--line) solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.tag { margin: 1em 0; }
.tag__dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: var(--r-dot);
  background: var(--c-accent);
  color: var(--c-on-accent);
  box-shadow: 0 0 0 3px var(--c-accent-ring);
}
.hero__title {
  margin: 22px 0 0;
  font-size: var(--fs-h1);
  font-weight: var(--weight-regular);
  line-height: 1.15;
  letter-spacing: var(--tracking-display);
}
.hero__title-soft { color: var(--c-muted); }
.hero__lede { max-width: 700px; margin: 18px auto 0; font-size: var(--fs-body); line-height: 1.75; color: var(--c-muted); }
.hero__lede strong { font-weight: var(--weight-medium); color: var(--c-text); }
.hero__cta { margin-top: 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.devices {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 26px;
}
.devices__item { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--c-muted); }
.devices__item svg { width: 18px; height: 18px; color: var(--c-text); }
.devices a:hover { color: var(--c-link); }
.devices__sep { width: 1px; height: 16px; background: var(--c-border); color: var(--c-text); }
.store-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 11px; border: var(--line) solid var(--c-border); border-radius: var(--r-pill); background: var(--c-panel); color: var(--c-text); font-size: var(--fs-caption); }
.store-chip svg { width: 12px; height: 12px; }
.stage { margin-top: 36px; }
.stage__canvas {
  position: relative;
  height: 470px;
  margin: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: radial-gradient(55% 75% at 88% 0%, var(--c-sheen) 0%, var(--c-clear) 70%), linear-gradient(170deg, var(--c-accent) 45%, var(--c-accent-dark) 135%);
  color: var(--c-on-accent);
  box-shadow: inset 0 1px 0 var(--c-ink-30);
}
.stage__canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--c-grid-dot) 1px, var(--c-clear) 1.3px);
  background-size: 22px 22px;
  mask-image: radial-gradient(70% 90% at 80% 28%, var(--c-mask-solid) 15%, var(--c-clear) 75%);
  pointer-events: none;
}
.stack { position: absolute; top: 36px; right: 140px; width: 920px; height: 384px; perspective: 1800px; }
.stack__plane { position: absolute; inset: 0; transform: rotateX(14deg); transform-origin: 50% 100%; }
.sheet {
  position: absolute;
  width: 380px;
  height: 168px;
  border: var(--line) solid var(--c-glass-line);
  border-radius: var(--r-glass);
  -webkit-backdrop-filter: blur(8px) saturate(1.08);
  backdrop-filter: blur(8px) saturate(1.08);
  box-shadow: inset 0 1px 0 var(--c-glass-hi);
  color: var(--c-on-accent);
}
.sheet::before { content: ""; position: absolute; top: -1px; left: 18px; right: 18px; height: 1px; background: linear-gradient(90deg, var(--c-clear), var(--c-glass-hi), var(--c-clear)); }
.sheet--general { left: 0; top: 0; background: var(--c-glass-1); }
.sheet--rule { left: 180px; top: 72px; background: var(--c-glass-2); }
.sheet--host { left: 360px; top: 144px; background: var(--c-glass-3); }
.sheet--mitm { left: 540px; top: 216px; background: var(--c-glass-4); }
.sheet__bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 16px; border-bottom: var(--line) solid var(--c-glass-rule); }
.sheet__dots { display: inline-flex; gap: 6px; flex-shrink: 0; }
.sheet__dots i { display: block; width: 7px; height: 7px; border-radius: var(--r-dot); background: var(--c-ink-90); }
.sheet__dots i:nth-child(2) { background: var(--c-ink-50); }
.sheet__dots i:nth-child(3) { background: var(--c-ink-30); }
.sheet__name { font-family: var(--font-mono); font-size: 13px; font-weight: var(--weight-medium); letter-spacing: 0.01em; }
.sheet__body { padding: 12px 18px; }
.sheet__line { display: block; font-family: var(--font-mono); font-size: 13px; line-height: 1.8; white-space: pre; }
.caret { display: inline-block; width: 8px; height: 15px; margin-left: 4px; vertical-align: -2px; background: var(--c-ink-70); border-radius: var(--r-caret); }
.stage__note { position: absolute; left: 48px; bottom: 56px; display: flex; align-items: center; gap: 12px; margin: 0; font-size: 13px; color: var(--c-on-accent); }
.stage__note::before { content: ""; width: 20px; height: 1px; flex-shrink: 0; background: var(--c-ink-50); }

.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 22px;
  border: var(--line-button) solid var(--c-text);
  border-radius: var(--r-md);
  background: var(--c-text);
  color: var(--c-bg);
  transition: background-color var(--duration-fast);
}
.app-store-button:hover { background: var(--c-text-strong); color: var(--c-bg); }
.app-store-button > svg { width: 25px; height: 28px; }
.app-store-button__copy { display: grid; gap: 2px; text-align: left; line-height: 1.25; }
.app-store-button__copy small { font-size: 11px; }
.app-store-button__copy strong { font-size: var(--fs-body); font-weight: var(--weight-medium); }
.app-store-button--primary { min-height: 64px; padding: 14px 28px; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; list-style: none; margin: 24px 0 0; padding: 0; }
.facts__item { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px; border: var(--line) solid var(--c-border); border-radius: var(--r-pill); background: var(--c-bg); color: var(--c-muted); font-size: var(--fs-caption); overflow-wrap: anywhere; }
.facts__item strong { color: var(--c-text); }
.facts--start { justify-content: flex-start; }
.badge--accent { background: var(--c-accent); color: var(--c-on-accent); border-color: var(--c-accent); }
.badge--success { background: var(--c-bg); color: var(--c-success); }

.tabs { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); gap: 48px; }
.tabs > * { min-width: 0; }
.tabs [role="tablist"] { display: flex; flex-direction: column; align-items: stretch; }
.tabs [role="tab"] {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  min-height: 78px;
  padding: 20px 12px 20px 24px;
  border-bottom: var(--line) solid var(--c-border);
  color: var(--c-muted);
  font-size: 17px;
  font-weight: var(--weight-regular);
  text-align: left;
}
.tabs [role="tab"]::before { content: ""; position: absolute; left: 0; width: 8px; height: 8px; background: var(--c-clear); }
.tabs [role="tab"][aria-selected="true"] { color: var(--c-text); }
.tabs [role="tab"][aria-selected="true"]::before { background: var(--c-accent); }
.tab-number { flex-shrink: 0; font-family: var(--font-mono); font-size: var(--fs-small); }
.tab-panel { min-width: 0; padding: 36px; border: var(--line) solid var(--c-border); border-radius: var(--r-xl); background: var(--c-bg); color: var(--c-text); }
.tab-panel h3 { margin: 0 0 18px; }
.tab-panel > p { color: var(--c-muted); line-height: 1.85; }
.detail-layers { padding-top: 24px; padding-bottom: 20px; }
.detail-layer { position: relative; min-width: 0; padding: 20px; border: var(--line) solid var(--c-border); border-radius: var(--r-menu); background: var(--c-detail-glass); color: var(--c-text); }
.detail-layer + .detail-layer { margin-top: -4px; margin-left: 28px; }
.detail-layer code { font-size: var(--fs-small); }
.detail-layer pre { margin: 0; padding: 0; border: 0; background: var(--c-clear); color: var(--c-text); }

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 12px);
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px;
  overflow-x: visible;
  border: var(--line) solid var(--c-border);
  border-radius: var(--r-menu);
  background: var(--c-bg);
  color: var(--c-text);
}
.toc a { flex-shrink: 0; min-height: 44px; padding: 10px 14px; border-radius: var(--r-sm); font-size: var(--fs-small); }
.toc a:hover, .toc a[aria-current] { background: var(--c-panel); color: var(--c-text); }
.toc--static { position: static; }
.faq-group { border: var(--line) solid var(--c-border); border-radius: var(--r-xl); background: var(--c-bg); color: var(--c-text); }
.faq-item { padding-inline: 28px; }
.faq-item + .faq-item { border-top: var(--line) solid var(--c-border); }
.faq-item summary { position: relative; padding: 24px 32px 24px 0; cursor: pointer; list-style: none; font-size: 17px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0; top: 22px; font-family: var(--font-mono); font-size: 22px; color: var(--c-muted); }
.faq-item[open] summary::after { content: "−"; }
.faq-item__body { padding-bottom: 24px; color: var(--c-muted); }
.faq-item__body p:last-child { margin-bottom: 0; }
.term-card { padding: 28px; border: var(--line) solid var(--c-border); border-radius: var(--r-menu); background: var(--c-bg); color: var(--c-text); }
.term-card__category { font-size: var(--fs-caption); color: var(--c-muted); }
.term-card h3 { margin: 12px 0; font-family: var(--font-mono); font-size: 20px; overflow-wrap: anywhere; }
.term-card p:last-child { margin-bottom: 0; color: var(--c-muted); }
.callout { margin: 28px 0; padding: 24px 28px; border-left: 3px solid var(--c-accent); border-radius: var(--r-sm); background: var(--c-panel); color: var(--c-text); }
.callout p:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--c-warn); }
.callout--success { border-left-color: var(--c-success); }
.grouped-list { list-style: none; margin: 0; padding: 0; border: var(--line) solid var(--c-border); border-radius: var(--r-menu); background: var(--c-bg); color: var(--c-text); }
.grouped-list li + li { border-top: var(--line) solid var(--c-border); }
.grouped-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 16px 20px; }
.grouped-list a::after { content: "›"; flex-shrink: 0; color: var(--c-muted); }
.grouped-list a:hover { background: var(--c-panel); color: var(--c-text); }

.official-shot { width: 100%; max-width: 280px; min-width: 0; flex-shrink: 0; margin: 0 auto; padding: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot figcaption { margin-top: 12px; color: var(--c-muted); font-size: var(--fs-caption); line-height: 1.7; }
.official-shot__frame { border: var(--line) solid var(--c-border); border-radius: var(--r-shot); }
.shot-pair { display: flex; justify-content: center; align-items: flex-start; gap: 32px; }
.device-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 28px; padding: 36px; border: var(--line) solid var(--c-border); border-radius: var(--r-xl); background: var(--c-bg); color: var(--c-text); }
.device-card > svg { width: 48px; height: 64px; color: var(--c-text); }
.device-card h3 { margin: 0 0 12px; }
.device-card p { color: var(--c-muted); }
.device-card .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.article-card { display: flex; flex-direction: column; align-items: flex-start; padding: 32px; border: var(--line) solid var(--c-border); border-radius: var(--r-xl); background: var(--c-bg); color: var(--c-text); }
.article-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: var(--fs-caption); color: var(--c-muted); }
.article-card h3 { margin: 24px 0 16px; font-size: var(--fs-h3); }
.article-card p { color: var(--c-muted); }
.article-card > .text-link { margin-top: auto; padding-top: 12px; }
.article-store-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 32px; border: var(--line) solid var(--c-border); border-radius: var(--r-xl); background: var(--c-panel); color: var(--c-text); }
.article-store-card__copy { flex: 1 1 260px; min-width: 0; }
.article-store-card h2 { margin: 0 0 12px; font-size: var(--fs-h3); }
.article-store-card p { margin-bottom: 0; color: var(--c-muted); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--fs-small); }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 16px 20px;
  border-bottom: var(--line) solid var(--c-border);
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th { background: var(--c-panel); color: var(--c-text); font-weight: var(--weight-medium); }
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; }
.prose table code, .data-table code { overflow-wrap: anywhere; }
.dl-fab { position: fixed; right: 24px; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px 10px 14px; border-radius: var(--r-pill); background: var(--c-text); color: var(--c-bg); font-size: var(--fs-small); font-weight: var(--weight-medium); box-shadow: var(--shadow-float); transition: background-color var(--duration-fast); }
.dl-fab:hover { background: var(--c-text-strong); color: var(--c-bg); }
.dl-fab svg { width: 16px; height: 16px; }

.token-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.token { min-width: 0; margin: 0; border: var(--line) solid var(--c-border); border-radius: var(--r-md); background: var(--c-bg); color: var(--c-text); }
.token__paint { height: 72px; border-radius: var(--r-md) var(--r-md) 0 0; }
.token figcaption { padding: 12px; font-family: var(--font-mono); font-size: var(--fs-caption); overflow-wrap: anywhere; }
.sw-bg { background: var(--c-bg); }
.sw-panel { background: var(--c-panel); }
.sw-panel-2 { background: var(--c-panel-2); }
.sw-border { background: var(--c-border); }
.sw-accent { background: var(--c-accent); }
.sw-accent-dark { background: var(--c-accent-dark); }
.sw-accent-ring { background: var(--c-accent-ring); }
.sw-text { background: var(--c-text); }
.sw-text-strong { background: var(--c-text-strong); }
.sw-muted { background: var(--c-muted); }
.sw-link { background: var(--c-link); }
.sw-success { background: var(--c-success); }
.sw-warn { background: var(--c-warn); }
.sw-error { background: var(--c-error); }
.sw-on-accent { background: var(--c-on-accent); }
.sw-glass-1 { background: linear-gradient(var(--c-glass-1), var(--c-glass-1)), var(--c-accent); }
.sw-glass-2 { background: linear-gradient(var(--c-glass-2), var(--c-glass-2)), var(--c-accent); }
.sw-glass-3 { background: linear-gradient(var(--c-glass-3), var(--c-glass-3)), var(--c-accent); }
.sw-glass-4 { background: linear-gradient(var(--c-glass-4), var(--c-glass-4)), var(--c-accent); }
.sw-glass-line { background: linear-gradient(var(--c-glass-line), var(--c-glass-line)), var(--c-accent); }
.sw-glass-rule { background: linear-gradient(var(--c-glass-rule), var(--c-glass-rule)), var(--c-accent); }
.sw-glass-hi { background: linear-gradient(var(--c-glass-hi), var(--c-glass-hi)), var(--c-accent); }
.sw-ink-90 { background: linear-gradient(var(--c-ink-90), var(--c-ink-90)), var(--c-accent); }
.sw-ink-70 { background: linear-gradient(var(--c-ink-70), var(--c-ink-70)), var(--c-accent); }
.sw-ink-50 { background: linear-gradient(var(--c-ink-50), var(--c-ink-50)), var(--c-accent); }
.sw-ink-30 { background: linear-gradient(var(--c-ink-30), var(--c-ink-30)), var(--c-accent); }
.sw-grid-dot { background: linear-gradient(var(--c-grid-dot), var(--c-grid-dot)), var(--c-accent); }
.sw-sheen { background: linear-gradient(var(--c-sheen), var(--c-sheen)), var(--c-accent); }
.sw-mask { background: var(--c-mask-solid); }
.sw-clear { background: var(--c-clear); }
.sw-veil { background: var(--c-veil); }
.sw-detail { background: linear-gradient(var(--c-detail-glass), var(--c-detail-glass)), var(--c-accent); }
.preview-shot { display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334; border: var(--line) solid var(--c-border); border-radius: var(--r-shot); background: var(--c-panel); color: var(--c-muted); text-align: center; }
.preview-shot span { max-width: 180px; padding: 16px; font-size: var(--fs-small); }
.preview-type h1 { margin-top: 0; }
.preview-type__mono { font-family: var(--font-mono); }
.preview-caption { margin-top: 24px; color: var(--c-muted); font-size: var(--fs-small); }

@media (max-width: 1240px) {
  .stack { right: 50%; transform: translateX(50%) scale(0.84); transform-origin: 50% 0; }
}
@media (max-width: 1080px) {
  .stack { transform: translateX(50%) scale(0.7); }
  .stage__canvas { height: 400px; }
  .tabs { gap: 28px; }
}
@media (max-width: 768px) {
  .token-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .device-card { padding: 28px; gap: 20px; }
}
@media (max-width: 720px) {
  .hero { padding-top: 32px; }
  .hero__lede { font-size: 15px; }
  .hero__cta { flex-direction: column; align-items: stretch; max-width: 320px; margin-inline: auto; }
  .devices { gap: 10px 18px; }
  .devices__sep { display: none; }
  .stage__canvas { height: 300px; border-radius: var(--r-mobile-stage); }
  .stack { top: 20px; transform: translateX(50%) scale(0.37); }
  .stage__note { left: 20px; right: 20px; bottom: 22px; font-size: 12px; }
}
@media (max-width: 640px) {
  .tabs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tabs [role="tablist"] { flex-direction: row; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
  .tabs [role="tab"] { flex-shrink: 0; min-height: 44px; padding: 10px 16px; border: var(--line) solid var(--c-border); border-radius: var(--r-pill); font-size: var(--fs-small); }
  .tabs [role="tab"]::before { position: static; flex-shrink: 0; width: 8px; height: 8px; }
  .tab-panel { padding: 24px; }
  .detail-layer + .detail-layer { margin-left: 12px; }
  .facts { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .facts__item { padding: 5px 10px; }
  .shot-pair { flex-direction: column; align-items: center; }
  .official-shot { max-width: min(280px, 100%); }
  .faq-item { padding-inline: 20px; }
  .device-card { padding: 24px; grid-template-columns: 36px minmax(0, 1fr); }
  .device-card > svg { width: 36px; height: 48px; }
  .article-card { padding: 24px; }
  .article-store-card { padding: 24px; }
  .token-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
}