.rule-tabs { display: grid; grid-template-columns: minmax(220px, 0.75fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.rule-tabs [role="tablist"] { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rule-tabs [role="tab"] {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  text-align: left;
  border: 0;
  border-left: 3px solid var(--clear);
  border-radius: var(--r-btn);
  background: var(--panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--size-small);
  line-height: 1.6;
}
.rule-tabs [role="tab"]::before { content: ""; width: 6px; height: 6px; border-radius: var(--r-circle); background: var(--clear); flex-shrink: 0; }
.rule-tabs [role="tab"][aria-selected="true"] { border-left-color: var(--bg); background: var(--code-bg); color: var(--text); }
.rule-tabs [role="tab"][aria-selected="true"]::before { background: var(--success); }
.rule-tabs [role="tab"]:hover { background: var(--code-bg); color: var(--text); }
.tab-panel { padding: 32px; border-top: 1px solid var(--bg); border-radius: 0 0 var(--r-card) var(--r-card); background: var(--panel); color: var(--text); box-shadow: var(--shadow-soft); }
.tab-panel p { color: var(--text-muted); }
.tab-panel pre { margin-bottom: 0; }
.toc { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--panel); color: var(--text); box-shadow: var(--shadow-soft); }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-btn); text-decoration: none; font-size: var(--size-small); }
.toc a:hover { background: var(--code-bg); color: var(--link); }
.toc-static { position: static; }
.faq-group { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--panel); color: var(--text); box-shadow: var(--shadow-soft); }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary { position: relative; display: block; padding: 22px 54px 22px 24px; list-style: none; font-weight: var(--weight-medium); cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 24px; top: 20px; font-family: var(--font-mono); color: var(--link); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 24px 24px; color: var(--text-muted); }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { padding: 28px; border: 1px solid var(--border); border-top: 3px solid var(--bg); border-radius: var(--r-card); background: var(--panel); color: var(--text); }
.term-card h3 { font-family: var(--font-mono); }
.term-card p { color: var(--text-muted); }
.term-card p:last-child { margin-bottom: 0; }
.appstore-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; max-width: 100%; padding: 10px 22px; border: 0; border-radius: var(--r-btn); background: var(--accent); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-cta); transition: background-color var(--ease), transform var(--ease); }
.appstore-button svg { width: 25px; height: 29px; }
.appstore-copy { display: flex; flex-direction: column; text-align: left; line-height: 1.4; }
.appstore-copy small { font-size: var(--size-caption); }
.appstore-copy strong { font-size: var(--size-body); font-weight: var(--weight-medium); }
.appstore-button:hover { background: var(--accent-dark); color: var(--ink); transform: translateY(-1px); }
.appstore-button:active { transform: translateY(0); }
.fact-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 0; padding: 0; list-style: none; }
.fact-pill { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 32px; padding: 5px 12px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--code-bg); color: var(--text); font-size: var(--size-caption); overflow-wrap: anywhere; }
.fact-pill strong { font-weight: var(--weight-medium); }
.fact-row-on-blue .fact-pill { border-color: var(--on-bg-line); background: var(--on-bg-fill); color: var(--on-bg); }
.badge { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 28px; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--panel); color: var(--text-muted); font-family: var(--font-mono); font-size: var(--size-caption); overflow-wrap: anywhere; }
.official-shot { width: min(280px, 100%); max-width: 100%; flex-shrink: 0; margin: 0 auto; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot img { outline: 1px solid var(--border); outline-offset: -1px; }
.official-shot figcaption { margin-top: 12px; font-size: var(--size-caption); line-height: 1.6; color: var(--text-muted); }
.shot-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: 48px; align-items: start; }
.shot-placeholder { display: grid; place-items: center; aspect-ratio: 750 / 1334; width: 100%; padding: 20px; border: 1px dashed var(--border); border-radius: var(--r-shot); background: var(--code-bg); color: var(--text-muted); font-size: var(--size-small); text-align: center; }
.device-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: 24px; padding: 32px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--panel); color: var(--text); box-shadow: var(--shadow-soft); }
.device-card > svg { width: 60px; height: 72px; color: var(--bg); }
.device-card p { color: var(--text-muted); }
.device-card .btn { margin-top: 4px; }
.article-card { display: flex; flex-direction: column; gap: 18px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--panel); color: var(--text); box-shadow: var(--shadow-soft); }
.article-card h3 { margin: 0; }
.article-card h3 a { text-decoration: none; }
.article-card h3 a:hover { text-decoration: underline; color: var(--link); }
.article-card p { margin: 0; color: var(--text-muted); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: var(--size-caption); color: var(--text-muted); }
.article-card > a { margin-top: auto; color: var(--link); }
.callout { margin: 28px 0; padding: 24px; border-left: 3px solid var(--bg); border-radius: 0 var(--r-card) var(--r-card) 0; background: var(--code-bg); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 8px; font-weight: var(--weight-medium); }
.grouped-list { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--panel); color: var(--text); box-shadow: var(--shadow-soft); }
.grouped-list a { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 18px 24px; text-decoration: none; }
.grouped-list a + a { border-top: 1px solid var(--border); }
.grouped-list a::after { content: "›"; color: var(--text-muted); font-family: var(--font-mono); flex-shrink: 0; }
.grouped-list a:hover { background: var(--code-bg); color: var(--link); }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--r-card); }
.data-table { width: 100%; border-collapse: collapse; background: var(--panel); color: var(--text); text-align: left; }
.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(--code-bg); color: var(--text); font-weight: var(--weight-medium); }
.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; background: var(--panel); color: var(--text); }
.prose table code, .data-table code { overflow-wrap: anywhere; white-space: normal; }
.dl-fab { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 25; display: inline-flex; align-items: center; gap: 12px; max-width: calc(100vw - 40px); min-height: 52px; padding: 12px 18px; border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--panel); color: var(--link); box-shadow: var(--shadow-soft); text-decoration: none; font-size: var(--size-small); }
.dl-fab svg { width: 22px; height: 22px; }
.dl-fab:hover { background: var(--code-bg); color: var(--text); }
.article-store-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-top: 56px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--code-bg); color: var(--text); }
.article-store-card p { margin: 0; max-width: 500px; }
.terminal { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--panel); color: var(--text); box-shadow: var(--shadow-soft); overflow: clip; }
.terminal-head { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--code-bg); color: var(--text-muted); font-family: var(--font-mono); font-size: var(--size-caption); }
.terminal-dot { display: inline-block; width: 8px; height: 8px; flex-shrink: 0; border-radius: var(--r-circle); }
.terminal-dot-stop { background: var(--error); }
.terminal-dot-wait { background: var(--warn); }
.terminal-dot-ready { background: var(--success); }
.terminal-title { margin-left: 8px; overflow-wrap: anywhere; }
.terminal pre { margin: 0; border: 0; border-radius: 0; background: var(--panel); color: var(--text); }
@media (max-width: 800px) {
  .rule-tabs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rule-tabs [role="tablist"] { flex-direction: row; overflow-x: auto; padding-bottom: 8px; }
  .rule-tabs [role="tab"] { width: auto; flex-shrink: 0; min-height: 44px; border-left: 0; border-bottom: 3px solid var(--clear); border-radius: var(--r-pill); white-space: nowrap; }
  .rule-tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--bg); }
  .shot-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tab-panel { padding: 24px 20px; }
  .device-card { grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding: 24px 20px; }
  .device-card > svg { width: 42px; height: 54px; }
  .fact-row { flex-direction: row; justify-content: center; gap: 8px; }
  .fact-pill { padding: 5px 9px; }
  .official-shot { width: min(280px, 100%); }
  .article-store-card { padding: 22px; }
  .faq-item summary { padding-left: 20px; }
  .faq-answer { padding-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) { .appstore-button:hover { transform: none; } }