.tabs {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 2fr);
  gap: 32px;
  min-width: 0;
}
.tabs [role="tablist"] { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tabs [role="tab"] {
  position: relative; display: flex; align-items: center;
  min-height: 52px; padding: 14px 20px; border: 1px solid var(--c-transparent);
  border-radius: var(--r-btn); background: var(--c-transparent); color: var(--c-muted);
  font-weight: var(--fw-semibold); text-align: left;
}
.tabs [role="tab"]:hover { background: var(--c-panel); color: var(--c-text); }
.tabs [role="tab"][aria-selected="true"] { background: var(--c-panel); color: var(--c-text); box-shadow: var(--sh-1); }
.tabs [role="tab"][aria-selected="true"]::before {
  content: ""; position: absolute; inset: 14px auto 14px 0; width: 3px;
  border-radius: var(--r-pill); background: var(--c-accent); color: var(--c-text);
}
.tabs__panels, .tabs [role="tabpanel"] { min-width: 0; }
.tabs [role="tabpanel"] { border-radius: var(--r-section); }
.tabs [role="tabpanel"] p { max-width: 62em; }
.tabs [role="tabpanel"] pre { margin-bottom: 0; }
pre .tok-proxy { color: var(--c-code-proxy); }
pre .tok-direct { color: var(--c-code-direct); }
pre .tok-reject { color: var(--c-code-reject); }
.toc {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px; border: 1px solid var(--c-border); border-radius: var(--r-card);
  background: var(--c-panel); color: var(--c-text); box-shadow: var(--sh-1);
}
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-pill); color: var(--c-muted); text-decoration: none; font-size: var(--fs-small); }
.toc a:hover, .toc a[aria-current] { background: var(--c-pink-tint); color: var(--c-accent-dark); }
.toc--sticky { position: sticky; top: calc(var(--nav-h) + 12px); z-index: 20; }
.faq-item { margin-bottom: 12px; border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--c-panel); color: var(--c-text); box-shadow: var(--sh-1); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 20px 24px; font-weight: var(--fw-semibold); list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; font-family: var(--font-mono); color: var(--c-accent-dark); }
.faq-item[open] summary::after { content: "−"; }
.faq-item__body { padding: 0 24px 24px; color: var(--c-muted); }
.faq-item__body > :last-child { margin-bottom: 0; }
.term-card { border-top: 3px solid var(--c-blue); }
.term-card dt { font-family: var(--font-mono); font-weight: var(--fw-bold); font-size: 18px; margin-bottom: 12px; }
.term-card dd { margin: 0; color: var(--c-muted); }
.appstore-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px; max-width: 100%; padding: 12px 24px;
  border: 1px solid var(--c-accent); border-radius: var(--r-btn);
  background: var(--c-accent); color: var(--c-on-accent);
  box-shadow: var(--sh-btn); text-decoration: none;
  transition: background-color var(--speed), transform var(--speed);
}
.appstore-button:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); color: var(--c-on-accent); transform: translateY(-1px); }
.appstore-button svg { width: 26px; height: 28px; flex-shrink: 0; }
.appstore-button__text { display: grid; line-height: 1.35; text-align: left; }
.appstore-button__text small { font-size: var(--fs-caption); }
.appstore-button__text strong { font-size: 17px; }
.appstore-button--lead { min-height: 72px; padding: 16px 32px; }
.appstore-button--lead .appstore-button__text strong { font-size: 20px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 24px 0; list-style: none; }
.fact, .badge {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  min-height: 30px; padding: 5px 12px; border: 1px solid var(--c-border);
  border-radius: var(--r-pill); background: var(--c-panel); color: var(--c-muted);
  font-size: var(--fs-caption); overflow-wrap: anywhere;
}
.fact strong { color: var(--c-text); }
.badge--pink { background: var(--c-pink-tint); color: var(--c-accent-dark); border-color: var(--c-line-pink); }
.badge--blue { background: var(--c-blue-tint); color: var(--c-blue-ink); border-color: var(--c-line-blue); }
.badge--orange { background: var(--c-orange-tint); color: var(--c-orange-ink); border-color: var(--c-line-orange); }
.badge--success { color: var(--c-success-ink); }
.badge--error { color: var(--c-error); }
.shot-row { display: flex; align-items: flex-start; justify-content: center; flex-wrap: wrap; gap: 32px; }
.official-shot { width: 100%; max-width: 280px; margin: 0; flex-shrink: 0; min-width: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: 10px; }
.official-shot img { outline: 1px solid var(--c-border); outline-offset: -1px; }
.official-shot figcaption { margin-top: 12px; font-size: var(--fs-caption); line-height: 1.7; color: var(--c-muted); text-align: center; }
.shot-placeholder {
  display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334;
  padding: 24px; border: 1px solid var(--c-border); border-radius: var(--r-mark);
  background: linear-gradient(150deg, var(--c-bg), var(--c-panel));
  color: var(--c-muted); font-family: var(--font-mono); text-align: center;
}
.device-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px 20px; }
.device-card > svg { width: 44px; height: 52px; color: var(--c-muted); flex-shrink: 0; }
.device-card h3 { margin: 0 0 8px; }
.device-card p { color: var(--c-muted); }
.device-card .btn { justify-self: start; grid-column: 2; }
.article-card { display: flex; flex-direction: column; gap: 16px; }
.article-card h3 { font-size: 21px; margin: 0; line-height: 1.45; }
.article-card h3 a { color: var(--c-text); text-decoration: none; }
.article-card h3 a:hover { color: var(--c-accent-dark); }
.article-card p { color: var(--c-muted); margin: 0; }
.article-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: var(--fs-caption); color: var(--c-muted); }
.article-card__link { margin-top: auto; padding-top: 8px; font-weight: var(--fw-semibold); }
.callout { margin: 24px 0; padding: 22px 24px; border: 1px solid var(--c-line-blue); border-left: 4px solid var(--c-blue); border-radius: var(--r-card); background: var(--c-blue-tint); color: var(--c-text); }
.callout--note { border-color: var(--c-line-pink); border-left-color: var(--c-accent); background: var(--c-pink-tint); color: var(--c-text); }
.callout--warn { border-color: var(--c-line-orange); border-left-color: var(--c-orange); background: var(--c-orange-tint); color: var(--c-text); }
.callout > :last-child { margin-bottom: 0; }
.group-list { padding: 0; margin: 0; border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--c-panel); color: var(--c-text); list-style: none; }
.group-list li + li { border-top: 1px solid var(--c-border-soft); }
.group-list a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px; min-height: 56px; text-decoration: none; color: var(--c-text); }
.group-list a::after { content: "›"; color: var(--c-muted); flex-shrink: 0; }
.group-list a:hover { color: var(--c-accent-dark); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--c-border); border-radius: var(--r-card); }
.data-table { width: 100%; border-collapse: collapse; background: var(--c-panel); color: var(--c-text); }
.data-table caption { text-align: left; padding: 16px; font-weight: var(--fw-semibold); }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em; padding: 16px 20px; vertical-align: top;
  border-bottom: 1px solid var(--c-border); text-align: left;
  overflow-wrap: normal; word-break: normal;
}
.data-table th, .prose table th { background: var(--c-bg); color: var(--c-text); font-weight: var(--fw-semibold); }
.data-table td, .prose table td { background: var(--c-panel); color: var(--c-text); }
.data-table code, .prose table code { overflow-wrap: anywhere; }
.prose table {
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
  max-width: 100%; min-width: 0; border-collapse: collapse;
  overscroll-behavior-inline: contain; margin-top: 24px; margin-bottom: 24px;
}
.store-guide { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; border-color: var(--c-line-pink); }
.store-guide__copy { min-width: 0; flex: 1 1 280px; }
.store-guide__copy h2 { font-size: 24px; margin: 0 0 12px; }
.store-guide__copy p { margin: 0; color: var(--c-muted); }
.dl-fab {
  position: fixed; right: 24px; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 60;
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 20px 10px 16px;
  border-radius: var(--r-pill); background: var(--c-panel-2); color: var(--c-on-accent);
  font-size: 14.5px; font-weight: var(--fw-bold); text-decoration: none;
  box-shadow: var(--sh-fab); transition: transform var(--speed);
}
.dl-fab svg { width: 17px; height: 17px; flex-shrink: 0; }
.dl-fab:hover { transform: translateY(-1px); color: var(--c-on-accent); }
.nav-open .dl-fab { visibility: hidden; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.swatch { padding: 14px; border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--c-panel); color: var(--c-text); font-size: var(--fs-caption); }
.swatch__paint { display: block; min-height: 70px; margin-bottom: 12px; border: 1px solid var(--c-border); border-radius: var(--r-btn); }
.paint-bg { background: var(--c-bg); color: var(--c-text); }
.paint-panel { background: var(--c-panel); color: var(--c-text); }
.paint-dark { background: var(--c-panel-2); color: var(--c-code-text); }
.paint-border { background: var(--c-border); color: var(--c-text); }
.paint-soft { background: var(--c-border-soft); color: var(--c-text); }
.paint-accent { background: var(--c-accent); color: var(--c-on-accent); }
.paint-accent-dark { background: var(--c-accent-dark); color: var(--c-on-accent); }
.paint-text { background: var(--c-text); color: var(--c-panel); }
.paint-muted { background: var(--c-muted); color: var(--c-panel); }
.paint-success { background: var(--c-success); color: var(--c-text); }
.paint-orange { background: var(--c-orange); color: var(--c-text); }
.paint-blue { background: var(--c-blue); color: var(--c-text); }
.paint-error { background: var(--c-error); color: var(--c-on-accent); }
.paint-peach { background: var(--rb-peach); color: var(--c-text); }
.paint-rose { background: var(--rb-rose); color: var(--c-text); }
.paint-lilac { background: var(--rb-lilac); color: var(--c-text); }
.paint-sky { background: var(--rb-sky); color: var(--c-text); }
.paint-pink { background: var(--c-pink-tint); color: var(--c-text); }
.paint-blue-tint { background: var(--c-blue-tint); color: var(--c-text); }
.paint-orange-tint { background: var(--c-orange-tint); color: var(--c-text); }
.paint-pink-line { background: var(--c-line-pink); color: var(--c-text); }
.paint-blue-line { background: var(--c-line-blue); color: var(--c-text); }
.paint-orange-line { background: var(--c-line-orange); color: var(--c-text); }
.palette-notes { margin-top: 24px; color: var(--c-muted); font-size: var(--fs-small); }
.preview-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.preview-heading { font-size: var(--fs-h1); margin: 0 0 24px; }
@media (max-width: 768px) {
  .tabs { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tabs [role="tablist"] { flex-direction: row; overflow-x: auto; padding-bottom: 8px; overscroll-behavior-inline: contain; }
  .tabs [role="tab"] { flex-shrink: 0; min-height: 44px; border-radius: var(--r-pill); padding: 10px 18px; white-space: nowrap; }
  .tabs [role="tab"][aria-selected="true"] { background: var(--c-accent); color: var(--c-on-accent); }
  .tabs [role="tab"][aria-selected="true"]::before { display: none; }
}
@media (max-width: 640px) {
  .toc { flex-wrap: nowrap; overflow-x: auto; }
  .toc a { flex-shrink: 0; }
  .toc--sticky { position: static; }
  .facts { flex-direction: row; flex-wrap: wrap; }
  .shot-row { flex-direction: column; align-items: center; }
  .official-shot { margin-inline: auto; }
  .faq-item summary { padding: 18px 20px; }
  .faq-item__body { padding: 0 20px 20px; }
  .dl-fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); min-height: 44px; }
  .device-card { grid-template-columns: 36px minmax(0, 1fr); gap: 16px; }
  .device-card > svg { width: 34px; }
}