.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 32px;
  max-width: 100%;
  margin: 0;
  padding: 5px 15px 5px 12px;
  border: 1px solid var(--on-dark-16);
  border-radius: var(--r-pill);
  background: var(--on-dark-08);
  color: var(--on-dark-86);
  font-size: 13px;
  line-height: 20px;
}
.badge-dot { flex: none; width: 8px; height: 8px; border-radius: var(--r-circle); background: var(--grad-key); }
.badge--light { border-color: var(--border); background: var(--accent-soft); color: var(--accent-dark); }
.badge--light .badge-dot { background: var(--accent); }
.tag { display: inline-block; max-width: 100%; padding: 4px 10px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; overflow-wrap: anywhere; }
.facts { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fact-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  max-width: 100%;
  padding: 3px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 20px;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.fact-pill svg { flex: none; width: 12px; height: 12px; }
.stage .fact-pill, .panel--dark .fact-pill {
  border-color: var(--on-dark-16);
  background: var(--transparent);
  color: var(--on-dark-86);
}
.devices .fact-pill { margin-left: 4px; }
.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  max-width: 100%;
  padding: 10px 22px;
  border: 1px solid var(--transparent);
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--on-dark);
  text-decoration: none;
  box-shadow: var(--shadow-btn);
}
.app-store-button:hover { background: var(--accent-dark); color: var(--on-dark); text-decoration: none; }
.app-store-button svg { flex: none; width: 25px; height: 28px; }
.app-store-button small { display: block; font-size: 11px; line-height: 1.4; }
.app-store-button strong { display: block; font-size: 16px; line-height: 1.5; font-weight: var(--weight-heading); }
.app-store-button--hero { min-height: 48px; padding: 11px 22px; gap: 9px; font-size: 15px; }
.app-store-button--hero svg { width: 17px; height: 17px; margin-top: -2px; }
.store-guide-card { padding: 32px; border-radius: var(--r-panel); background: var(--bg-panel); color: var(--text); }
.store-guide-card h2, .store-guide-card h3 { margin-top: 0; }
.store-guide-card p { color: var(--text-muted); }

.tabs { min-width: 0; }
.feature-canvas {
  overflow-x: clip;
  padding: 32px;
  border-radius: var(--r-panel);
  background: linear-gradient(135deg, var(--bg-panel-2), var(--accent));
  color: var(--on-dark);
}
[role="tablist"] {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 6px;
  margin-bottom: 36px;
  overflow-x: auto;
  border: 1px solid var(--on-dark-16);
  border-radius: var(--r-pill);
  background: var(--bg-panel-2);
  color: var(--on-dark);
  scrollbar-width: thin;
}
[role="tab"] {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--transparent);
  color: var(--on-dark-86);
  font-size: 14px;
}
[role="tab"]:hover { background: var(--on-dark-08); color: var(--on-dark); }
[role="tab"][aria-selected="true"] { background: var(--bg); color: var(--text); }
[role="tabpanel"] { min-width: 0; }
.feature-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; padding: 16px 16px 24px; }
.feature-detail > * { min-width: 0; }
.feature-detail h3 { margin-top: 0; font-size: 30px; }
.feature-detail p { margin-bottom: 0; color: var(--on-dark-86); line-height: 1.9; }
.feature-sample { padding: 28px; border-radius: var(--r-card); background: var(--bg); color: var(--text); min-width: 0; }
.feature-sample pre { padding: 0; border: 0; margin: 0; border-radius: var(--r-small); background: var(--bg); color: var(--text); }
.feature-sample .facts { justify-content: flex-start; }
.tabs--light [role="tablist"] { border-color: var(--border); background: var(--bg-panel); color: var(--text); }
.tabs--light [role="tab"] { color: var(--text-muted); }
.tabs--light [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--on-dark); }
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  margin-bottom: 40px;
  border-radius: var(--r-row);
  background: var(--bg-panel);
  color: var(--text);
}
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-pill); color: var(--text-muted); text-decoration: none; }
.toc a:hover, .toc a[aria-current="location"] { background: var(--bg); color: var(--accent-dark); }
.toc--sticky { position: sticky; top: 16px; z-index: 10; }
.faq-item { border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); }
.faq-item summary { position: relative; padding: 24px 40px 24px 0; cursor: pointer; list-style: none; font-size: 18px; font-weight: var(--weight-heading); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { position: absolute; right: 8px; top: 24px; content: "+"; color: var(--accent); font-size: 22px; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 24px; max-width: 800px; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { min-width: 0; padding: 28px; border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.term-card h3 { margin: 12px 0; font-family: var(--font-mono); font-size: 21px; overflow-wrap: anywhere; }
.term-card p { color: var(--text-muted); }
.term-card p:last-child { margin-bottom: 0; }
.device-entry {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  min-width: 0;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
}
.device-entry > svg { flex: none; width: 52px; height: 64px; color: var(--accent); }
.device-entry > div { min-width: 0; }
.device-entry h3 { margin: 0 0 12px; }
.device-entry p { color: var(--text-muted); }
.article-card { display: flex; flex-direction: column; min-width: 0; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.article-card h3 { font-size: 22px; margin: 20px 0 12px; line-height: 1.5; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-dark); }
.article-card p { color: var(--text-muted); }
.article-card .article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); }
.article-card .article-link { margin-top: auto; padding-top: 16px; }
.official-shot { width: min(100%, 280px); max-width: 280px; flex-shrink: 0; margin-inline: auto; padding: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot figcaption { margin-top: 12px; font-size: 13px; line-height: 1.65; color: var(--text-muted); text-align: center; }
.shot-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: 48px; align-items: start; }
.shot-layout > * { min-width: 0; }
.callout { margin: 28px 0; padding: 24px 28px; border-left: 3px solid var(--accent); border-radius: var(--r-row); background: var(--accent-soft); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--warn); background: var(--bg-panel); color: var(--text); }
.callout--warn strong { color: var(--warn-ink); }
.callout--error { border-left-color: var(--error); background: var(--bg-panel); color: var(--text); }
.callout--error strong { color: var(--error-ink); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-heading); }
.data-table td, .prose table td { background: var(--bg); color: var(--text); }
.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; white-space: normal; }
.dl-fab {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  min-height: 56px;
  padding: 12px 20px;
  border: 1px solid var(--on-dark-16);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-dark);
  text-decoration: none;
}
.dl-fab:hover { background: var(--accent-dark); color: var(--on-dark); text-decoration: none; }
.dl-fab svg { flex: none; width: 22px; height: 22px; }
.has-article-fab { padding-bottom: 96px; }
@media (max-width: 768px) {
  .feature-detail { grid-template-columns: 1fr; gap: 28px; padding: 8px 0; }
  .feature-canvas { padding: 24px; }
  .feature-detail h3 { font-size: 25px; }
  .shot-layout { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .feature-canvas { padding: 20px; }
  .feature-sample { padding: 20px; }
  [role="tablist"] { border-radius: var(--r-row); margin-bottom: 24px; }
  .device-entry { padding: 24px; gap: 16px; }
  .device-entry > svg { width: 36px; height: 48px; }
  .facts { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .fact-pill { font-size: 12px; padding-inline: 9px; }
  .official-shot { width: min(100%, 280px); }
  .callout { padding: 20px; }
  .dl-fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  .store-guide-card { padding: 24px; }
}