.tabs { min-width: 0; }
.feature-directory {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  align-items: start;
}
.feature-directory > * { min-width: 0; }
.tab-list { display: flex; flex-direction: column; min-width: 0; }
.tab-list [role="tab"] {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 72px;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid var(--on-accent-line);
  background: var(--clear);
  color: var(--on-accent-muted);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  text-align: left;
}
.tab-list [role="tab"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  background: var(--clear);
}
.tab-list [role="tab"][aria-selected="true"] { color: var(--on-accent); }
.tab-list [role="tab"][aria-selected="true"]::before { background: var(--accent); }
.tab-prefix { min-width: 112px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--on-accent-muted); }
[aria-selected="true"] .tab-prefix { color: var(--on-accent); }
.tab-list [role="tab"]:hover { background: var(--on-accent-hover); color: var(--on-accent); }
.tab-panel {
  min-width: 0;
  padding: 40px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.tab-panel p { color: var(--text-muted); }
.tab-panel > :last-child { margin-bottom: 0; }
.tab-list-light [role="tab"] { border-color: var(--border); color: var(--text-muted); }
.tab-list-light [role="tab"]:hover { background: var(--bg-panel); color: var(--text); }
.tab-list-light [role="tab"][aria-selected="true"], .tab-list-light .tab-prefix { color: var(--accent); }

.toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 40px;
}
.toc a { display: flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: var(--radius-pill); font-size: var(--text-sm); }
.toc a:hover, .toc a[aria-current="location"] { background: var(--accent); color: var(--on-accent); }
.toc-sticky { position: sticky; top: 16px; z-index: 10; }
.toc-static { position: static; }

.faq-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
}
.faq-item { padding: 0 28px; }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary {
  position: relative;
  min-height: 72px;
  padding: 22px 28px 22px 0;
  list-style: none;
  font-weight: var(--weight-semibold);
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0; top: 22px; color: var(--accent); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 24px; color: var(--text-muted); }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { border-top: 3px solid var(--accent); }
.term-name { margin: 0 0 12px; font-family: var(--font-mono); font-size: var(--text-lg); font-weight: var(--weight-bold); overflow-wrap: anywhere; }
.term-category { display: block; margin-bottom: 20px; font-size: var(--text-xs); color: var(--text-muted); }
.term-card p { color: var(--text-muted); }
.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 60px;
  max-width: 100%;
  padding: 12px 24px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  transition: background-color var(--ease-time) ease, transform var(--ease-time) ease;
}
.app-store-button svg { width: 26px; height: 30px; flex-shrink: 0; }
.app-store-copy { display: flex; flex-direction: column; text-align: left; line-height: 1.3; }
.app-store-copy small { font-size: var(--text-xs); font-weight: var(--weight-medium); }
.app-store-copy strong { font-size: var(--text-base); font-weight: var(--weight-semibold); }
.app-store-button:hover { background: var(--accent-dark); color: var(--on-accent); }
.app-store-button:active { transform: translateY(1px); }
.app-store-button-light { background: var(--bg); color: var(--accent); border-color: var(--bg); }
.app-store-button-light:hover { background: var(--on-accent-soft); color: var(--accent); }
.fact-chips, .interface-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fact-chip, .interface-chip, .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.interface-chip { font-family: var(--font-mono); }
.badge-official { border-color: var(--success); color: var(--success); }
.status-dot { width: 7px; height: 7px; border-radius: var(--radius-round); background: var(--success); flex-shrink: 0; }
.status-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-ticket);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
.status-strip span { display: inline-flex; align-items: center; gap: 8px; }
.official-shot { width: 100%; max-width: 280px; margin: 0 auto; flex-shrink: 0; }
.official-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-shot);
}
.official-shot figcaption { margin-top: 12px; font-size: var(--text-sm); color: var(--text-muted); line-height: 1.7; }
.shot-edge { border: 1px solid var(--border); border-radius: var(--radius-shot); }
.shot-row { display: flex; align-items: flex-start; justify-content: center; gap: 32px; }
.device-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.device-card > svg { width: 48px; height: 56px; color: var(--accent); margin-bottom: 28px; }
.device-card p { color: var(--text-muted); }
.device-card .text-link { margin-top: auto; padding-top: 12px; }
.article-card { display: flex; flex-direction: column; align-items: flex-start; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; font-size: var(--text-xs); color: var(--text-muted); }
.article-card h3 { font-size: var(--text-lg); }
.article-card h3 a { display: block; }
.article-card h3 a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.article-card p { color: var(--text-muted); font-size: var(--text-sm); }
.article-card .text-link { margin-top: auto; font-size: var(--text-sm); }
.callout {
  margin: 28px 0;
  padding: 24px 28px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-ticket) var(--radius-ticket) 0;
  background: var(--bg-panel);
  color: var(--text);
}
.callout strong { color: var(--accent); }
.callout > :last-child { margin-bottom: 0; }
.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; overscroll-behavior-inline: contain; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.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;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th, .article-body table th {
  background: var(--bg-panel);
  color: var(--text);
  font-weight: var(--weight-semibold);
}
.prose table, .article-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  overscroll-behavior-inline: contain;
}
.data-table code, .prose table code, .article-body table code { overflow-wrap: anywhere; }
.dl-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  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: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.dl-fab:hover { background: var(--accent-dark); color: var(--on-accent); }
.article-store-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 64px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  color: var(--text);
}
.article-store-guide h2 { font-size: var(--text-h3); margin: 0 0 12px; }
.article-store-guide p { color: var(--text-muted); margin: 0; }
.grouped-list { padding: 0; margin: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg); color: var(--text); }
.grouped-list li + li { border-top: 1px solid var(--border); }
.grouped-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 18px 24px; }
.grouped-list a::after { content: "›"; color: var(--text-muted); font-size: var(--text-lg); }
.grouped-list a:hover { color: var(--accent); }

.preview-heading { margin-bottom: 40px; }
.preview-heading small { display: block; margin-bottom: 12px; color: var(--text-muted); font-family: var(--font-mono); font-size: var(--text-xs); }
.palette-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.palette-item { min-width: 0; }
.palette-item code { display: block; margin-top: 10px; color: var(--text-muted); }
.swatch { height: 80px; border: 1px solid var(--border); border-radius: var(--radius-ticket); }
.swatch-bg { background: var(--bg); }
.swatch-panel { background: var(--bg-panel); }
.swatch-panel-2 { background: var(--bg-panel-2); }
.swatch-border { background: var(--border); }
.swatch-accent { background: var(--accent); }
.swatch-accent-dark { background: var(--accent-dark); }
.swatch-text { background: var(--text); }
.swatch-muted { background: var(--text-muted); }
.swatch-success { background: var(--success); }
.swatch-warn { background: var(--warn); }
.swatch-error { background: var(--error); }
.swatch-cobalt { background: var(--cobalt); }
.swatch-island { background: var(--island); }
.swatch-on { background: var(--on-accent); }
.swatch-tint { background: var(--on-accent-tint); }
.swatch-on-muted { background: var(--on-accent-muted); }
.swatch-soft { background: var(--on-accent-soft); }
.swatch-line { background: var(--accent); border-color: var(--on-accent-line); }
.swatch-hover { background: var(--accent); }
.swatch-hover::after { content: ""; display: block; width: 100%; height: 100%; background: var(--on-accent-hover); border-radius: var(--radius-ticket); }
.swatch-veil { background: var(--veil); }
.swatch-clear { background: var(--clear); }
.shot-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 750 / 1334;
  border: 1px solid var(--border);
  border-radius: var(--radius-shot);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-align: center;
}
.shot-placeholder span { max-width: 12em; }
.type-display-sample { font-size: var(--text-h1); font-weight: var(--weight-bold); letter-spacing: var(--track-tight); line-height: 1.2; }
.preview-focus { outline: var(--focus-ring); outline-offset: 3px; }

@media (max-width: 900px) {
  .feature-directory { grid-template-columns: 1fr; gap: 24px; }
  .tab-list { flex-direction: row; gap: 8px; overflow-x: auto; padding-bottom: 12px; overscroll-behavior-inline: contain; }
  .tab-list [role="tab"] { width: auto; min-height: 48px; padding: 12px 18px; flex-shrink: 0; white-space: nowrap; border: 1px solid var(--on-accent-line); border-radius: var(--radius-pill); }
  .tab-list [role="tab"]::before { display: none; }
  .tab-list [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
  .tab-prefix { min-width: 0; }
  .tab-list-light [role="tab"] { border-color: var(--border); }
  .tab-list-light [aria-selected="true"] .tab-prefix { color: var(--on-accent); }
  .article-store-guide { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tab-panel { padding: 28px 20px; }
  .fact-chips, .interface-chips { flex-direction: row; flex-wrap: wrap; }
  .fact-chips { justify-content: center; }
  .fact-chip { padding: 5px 9px; }
  .shot-row { flex-direction: column; align-items: center; }
  .faq-item { padding-inline: 20px; }
  .callout { padding: 20px; }
  .palette-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-store-guide { padding: 24px 20px; }
  .toc { gap: 4px; padding: 10px; }
  .toc a { padding-inline: 10px; }
  .dl-fab { padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-store-button { transition: none; }
}