.tabs { min-width: 0; }
.tablist, [role="tablist"].segment-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 40px;
  padding: 12px 24px;
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
}
.tablist [role="tab"], .segment-tabs [role="tab"] {
  position: relative;
  display: inline-block;
  min-height: 44px;
  padding: 8px 2px;
  border: 0;
  background: var(--clear);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  isolation: isolate;
}
[role="tab"][aria-selected="true"] { color: var(--text); font-weight: var(--weight-bold); }
.tablist [aria-selected="true"]::after, .segment-tabs [aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 5px;
  border-radius: var(--r-mark);
  background: var(--lichen);
  transform: rotate(-1deg);
  z-index: -1;
}
[role="tabpanel"] { min-width: 0; }
.feature-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 56px; padding: 56px; border-radius: var(--r-xl); background: var(--bg); color: var(--text); box-shadow: var(--shadow-float); }
.feature-panel > * { min-width: 0; }
.feature-copy p { margin-top: 24px; line-height: 1.9; color: var(--muted); }
.rule-note { margin-top: 18px; font-size: var(--text-sm); color: var(--panel-ink); }
.rule-note::before { content: "↶"; display: inline-block; margin-right: 12px; color: var(--panel-ink); }
.feature-panel pre { padding: 0; border-radius: var(--r-sm); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; padding-block: 16px; border-block: 1px solid var(--border); }
.toc a { display: flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: var(--r-pill); font-size: var(--text-sm); color: var(--muted); }
.toc a:hover, .toc a[aria-current="location"] { background: var(--panel); color: var(--text); }
.toc.is-sticky { position: sticky; top: 0; z-index: 10; background: var(--bg); color: var(--text); }
.faq-list { min-width: 0; }
.faq-item { padding-block: 22px; border-bottom: 1px solid var(--border); }
.faq-item summary { position: relative; padding-right: 44px; min-height: 32px; list-style: none; cursor: pointer; font-weight: var(--weight-semibold); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 8px; top: 0; color: var(--accent); font-size: 24px; font-weight: var(--weight-body); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { margin-top: 18px; padding-right: 36px; color: var(--muted); line-height: 1.9; }
.term-card { min-width: 0; padding: 28px; border-radius: var(--r-xl); background: var(--panel); color: var(--text); }
.term-card h3 { font-family: var(--font-mono); font-size: 20px; overflow-wrap: anywhere; }
.term-card p { margin-top: 16px; color: var(--panel-ink); }
.term-card .chip { background: var(--bg); color: var(--text); margin-top: 24px; }
.appstore-button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 60px; max-width: 100%; padding: 12px 24px; border: 0; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-btn); text-align: left; transition: background-color var(--motion-fast); }
.appstore-button:hover, .appstore-button.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.appstore-button svg { width: 25px; height: 28px; flex: none; }
.appstore-copy { display: block; min-width: 0; line-height: 1.35; }
.appstore-copy small { display: block; font-size: 12px; }
.appstore-copy strong { display: block; font-size: 17px; font-weight: var(--weight-semibold); }
.appstore-button.is-focus { outline: 2px solid var(--accent); outline-offset: 4px; }
.appstore-button[aria-disabled="true"] { background: var(--panel2); color: var(--panel-ink); box-shadow: none; cursor: not-allowed; }
.fact-pills { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; list-style: none; }
.fact-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; max-width: 100%; padding: 6px 12px; border-radius: var(--r-pill); background: var(--panel); color: var(--panel-ink); font-size: var(--text-xs); overflow-wrap: anywhere; }
.fact-pill strong { font-weight: var(--weight-semibold); color: var(--text); }
.fact-pill svg { width: 16px; height: 16px; flex-shrink: 0; }
.official-shot { width: 100%; max-width: 280px; margin-inline: auto; padding: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot figcaption { margin-top: 14px; font-size: var(--text-xs); color: var(--muted); text-align: center; }
.official-shot img, .shot-placeholder { outline: 1px solid var(--border); outline-offset: -1px; }
.shot-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334; border-radius: var(--r-shot); background: var(--panel); color: var(--panel-ink); text-align: center; font-size: var(--text-sm); }
.shot-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,280px); align-items: center; gap: 64px; }
.shot-layout > * { min-width: 0; }
.device-card { display: flex; align-items: flex-start; gap: 24px; min-width: 0; padding: 36px; border-radius: var(--r-xl); background: var(--bg); color: var(--text); box-shadow: var(--shadow-back); }
.device-card > svg { width: 44px; height: 52px; color: var(--muted); flex-shrink: 0; }
.device-card > div { min-width: 0; }
.device-card p { margin-top: 14px; color: var(--muted); }
.device-card .text-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px; }
.article-card { display: block; min-width: 0; padding: 32px; border-radius: var(--r-xl); background: var(--bg); color: var(--text); box-shadow: var(--shadow-back); }
.article-card h3 { margin-top: 20px; font-size: 23px; }
.article-card h3 a:hover { color: var(--accent); }
.article-card p { margin-top: 16px; color: var(--muted); line-height: 1.85; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: var(--text-xs); color: var(--muted); }
.callout { min-width: 0; padding: 24px 28px; border-left: 3px solid var(--accent); border-radius: var(--r-sm) var(--r-md) var(--r-md) var(--r-sm); background: var(--panel); color: var(--text); }
.callout p + p { margin-top: 12px; }
.callout-label { display: block; margin-bottom: 8px; color: var(--accent-dark); font-weight: var(--weight-semibold); }
.badge { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 28px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--panel); color: var(--panel-ink); font-size: var(--text-xs); overflow-wrap: anywhere; }
.badge-dot { width: 6px; height: 6px; border-radius: var(--r-round); background: var(--accent); flex-shrink: 0; }
.badge-accent { background: var(--accent-mark); color: var(--accent-dark); }
.table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border-radius: var(--r-md); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--text-sm); }
.data-table th, .data-table td, .prose table th, .prose 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 { background: var(--panel); color: var(--text); font-weight: var(--weight-semibold); }
.data-table td, .prose table td { background: var(--bg); color: var(--text); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; text-align: left; }
.prose table code, .data-table code { overflow-wrap: anywhere; }
.dl-fab { position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: var(--layer-fab); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); min-height: 56px; padding: 12px 20px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-btn); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.dl-fab svg { width: 20px; height: 20px; flex-shrink: 0; }
.dl-fab:hover { background: var(--accent-dark); color: var(--on-accent); }
.has-article-fab { padding-bottom: 100px; }
.article-store-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 28px; padding: 36px; border-radius: var(--r-xl); background: var(--panel); color: var(--text); }
.article-store-card > div { min-width: 0; flex: 1 1 280px; }
.article-store-card h2 { font-size: 25px; }
.article-store-card p { margin-top: 12px; color: var(--panel-ink); }
.grouped-list { list-style: none; border-radius: var(--r-md); background: var(--panel); color: var(--text); padding-inline: 20px; }
.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: 56px; padding-block: 14px; }
.grouped-list a::after { content: "›"; color: var(--panel-ink); }
.preview-section { padding-top: var(--section-space); }
.preview-section > h2 { margin-bottom: 40px; }
.preview-section:last-child { padding-bottom: var(--section-space); }
.preview-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 20px; }
.swatch { min-width: 0; }
.swatch-color { height: 80px; border-radius: var(--r-md); border: 1px solid var(--border); margin-bottom: 10px; }
.swatch code { font-size: var(--text-xs); }
.swatch-bg { background: var(--bg); color: var(--text); }
.swatch-panel { background: var(--panel); color: var(--text); }
.swatch-panel2 { background: var(--panel2); color: var(--text); }
.swatch-border { background: var(--border); color: var(--text); }
.swatch-accent { background: var(--accent); color: var(--on-accent); }
.swatch-dark { background: var(--accent-dark); color: var(--on-accent); }
.swatch-text { background: var(--text); color: var(--bg); }
.swatch-muted { background: var(--muted); color: var(--bg); }
.swatch-panel-ink { background: var(--panel-ink); color: var(--bg); }
.swatch-success { background: var(--success); color: var(--text); }
.swatch-warn { background: var(--warn); color: var(--text); }
.swatch-error { background: var(--error); color: var(--text); }
.swatch-lichen { background: var(--lichen); color: var(--text); }
.swatch-sketch { background: var(--sketch); color: var(--text); }
.swatch-annot { background: var(--annot); color: var(--text); }
.swatch-mark { background: var(--accent-mark); color: var(--text); }
.swatch-ring { background: var(--accent-ring); color: var(--text); }
.swatch-veil { background: var(--veil); color: var(--text); }
.swatch-fold { background: var(--shadow-fold); color: var(--text); }
.preview-masthead { max-width: 1200px; gap: 0; }
.preview-masthead .header-tools { margin-left: 44px; }
.preview-type > * + * { margin-top: 24px; }
.preview-display { font-family: var(--font-display); font-size: 48px; font-weight: var(--weight-bold); letter-spacing: var(--tracking-title); line-height: 1.12; }

@media (max-width: 1080px) {
  .preview-masthead .header-tools { margin-left: auto; }
}
@media (max-width: 860px) {
  .feature-panel { grid-template-columns: minmax(0,1fr); gap: 32px; padding: 32px; }
  .shot-layout { grid-template-columns: minmax(0,1fr); gap: 36px; }
  .tablist, [role="tablist"].segment-tabs { gap: 4px 18px; padding: 8px 12px; }
}
@media (max-width: 640px) {
  .feature-panel { padding: 24px; }
  .tablist [aria-selected="true"]::after, .segment-tabs [aria-selected="true"]::after { transform: none; }
  .device-card { padding: 24px; gap: 18px; }
  .device-card > svg { width: 32px; height: 42px; }
  .article-card { padding: 24px; }
  .callout { padding: 20px; }
  .faq-answer { padding-right: 0; }
  .fact-pills { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .fact-pill { padding: 5px 10px; font-size: 12px; }
  .dl-fab { right: 16px; padding: 12px 16px; }
  .article-store-card { padding: 24px; }
  .preview-display { font-size: 30px; }
}