/* xparts.kbsr.co.jp v0.6.0 - brutalism + TOC + hotspots (chassis + compare) */

:root {
    --ink: #000;
    --paper: #fff;
    --rule: #ccc;
    --rule-2: #eee;
    --muted: #666;
    --hover: #ffffcc;
    --accent: #0044cc;
    --font: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
    overflow-x: hidden;  /* html 側も必要: body 単独だと iOS Safari 等で不完全 */
}
body {
    overflow-x: hidden;       /* prevent horizontal overflow from wide tables on mobile */
    position: relative;       /* pair with overflow-x: hidden for iOS Safari edge cases */
    max-width: 100vw;
}
body {
    font: 14px/1.5 var(--font);
    color: var(--ink);
    background: var(--paper);
    -webkit-text-size-adjust: 100%;
}

a { color: #0000EE; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:visited { color: #0000EE; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.2; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mut { color: var(--muted); }

button, input, select {
    font: inherit;
    color: inherit;
}
button { cursor: pointer; }

/* iOS Safari auto-zoom 防止: 全 input / textarea / select を 16px 統一 (button は除外) */
input, textarea, select {
    font-size: 16px;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px; }

/* ============ Header ============ */
header.site {
    border-bottom: 1px solid var(--ink);
    background: var(--paper);
    position: sticky; top: 0; z-index: 10;
}
header.site .wrap {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 16px;
    gap: 16px;
}
.site__brand {
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.site__brand a { color: var(--ink); text-decoration: none; }
.site__brand a:hover { text-decoration: underline; }
.site__nav { display: flex; gap: 16px; font-size: 13px; }
.site__nav a { text-decoration: none; }
.site__nav a:hover { text-decoration: underline; }

/* ============ Footer ============ */
footer.site {
    border-top: 1px solid var(--ink);
    margin-top: 40px;
    padding: 12px 0;
    font-size: 12px;
    color: var(--muted);
}
footer.site .footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
footer.site .footer-links a {
    text-decoration: none;
}
footer.site .footer-links a:hover {
    text-decoration: underline;
}
footer.site .footer-note {
    font-size: 11px;
}

/* ============ Common ============ */
.section {
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
}
.section:last-child { border-bottom: none; }

.filter {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--ink);
    font: 16px var(--mono);
    background: var(--paper);
    border-radius: 0;
    -webkit-appearance: none;
}
.filter:focus { outline: none; border-width: 2px; padding: 5px 7px; }

.btn {
    padding: 4px 10px;
    background: var(--paper);
    border: 1px solid var(--ink);
    font: 12px var(--mono);
    text-transform: uppercase;
    border-radius: 0;
    -webkit-appearance: none;
    color: var(--ink);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.copied { background: #4a6d3a; color: var(--paper); border-color: #4a6d3a; }

/* ============ Home ============ */
.finder {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.finder label { font-size: 12px; color: var(--muted); font-family: var(--mono); text-transform: uppercase; }
.finder input[type=text] {
    padding: 6px 8px;
    border: 1px solid var(--ink);
    font: 16px var(--mono);
    text-transform: uppercase;
    width: 140px;
    border-radius: 0;
    -webkit-appearance: none;
}
.finder .x { font-family: var(--mono); color: var(--muted); }
.finder button {
    padding: 6px 12px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    font: 13px var(--mono);
    text-transform: uppercase;
    border-radius: 0;
    -webkit-appearance: none;
}
.finder button:hover { background: var(--paper); color: var(--ink); }
.finder__hint { font-size: 11px; color: var(--muted); width: 100%; margin-top: 4px; }

.pair-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 0;
}
.pair-list li {
    border-bottom: 1px solid var(--rule);
}
.pair-list a {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 6px 0;
    min-width: 0;
}
.pair-list a:hover .codes {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.pair-list .codes {
    font-family: var(--mono);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.pair-list .codes .x {
    color: var(--muted);
    font-weight: 400;
    margin: 0 2px;
}
.pair-list .names {
    color: var(--muted);
    font-size: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pair-list .score {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .pair-list { grid-template-columns: 1fr; }
}

/* ============ Maker/Model list (hierarchy pages) ============ */
.maker-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 0;
}
.maker-list li {
    border-bottom: 1px solid var(--rule);
}
.maker-list a {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 6px 0;
    text-decoration: none;
    font-size: 14px;
}
.maker-list a:hover { text-decoration: underline; text-underline-offset: 2px; }
.maker-list__name { font-family: var(--mono); font-weight: 700; flex-shrink: 0; }
.maker-list__ja { font-size: 12px; color: var(--muted); }
.maker-list__count {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    text-align: right;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .maker-list { grid-template-columns: 1fr; }
}

/* ============ Generation grouping (model page) ============ */
.gen-group {
    margin-bottom: 24px;
}
.gen-group__hd {
    padding: 6px 8px;
    background: var(--rule-2);
    font-size: 13px;
    font-weight: 600;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule);
    margin: 0 0 4px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.gen-group__hd .mono {
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
}

/* Chassis table (home) */
table.chassis-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
}
table.chassis-list th, table.chassis-list td {
    padding: 4px 8px;
    text-align: left;
    border-bottom: 1px solid var(--rule-2);
}
table.chassis-list th {
    background: var(--rule-2);
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    border-bottom: 1px solid var(--ink);
}
table.chassis-list td.num { text-align: right; }
table.chassis-list th.num { text-align: right; }
table.chassis-list a { text-decoration: none; }
table.chassis-list tr:hover td { background: var(--hover); }

/* ============ Chassis detail ============ */
.crumb {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    padding: 4px 0;
}
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

.chassis-hd {
    padding: 8px 0;
    border-bottom: 1px solid var(--ink);
}
.chassis-hd h1 {
    font-family: var(--mono);
    font-size: 20px;
    display: inline;
}
.chassis-hd .meta {
    font-size: 13px;
    color: var(--muted);
    margin-left: 12px;
}
.chassis-hd .meta .num { color: var(--ink); font-family: var(--mono); font-weight: 700; }

.compare-form {
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
}

.parts-hd {
    padding: 8px 0;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.parts-hd .filter { flex: 1 1 300px; }
.parts-hd .count { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Schema panel */
.schemas { border-top: 1px solid var(--ink); }
.schema {
    border-bottom: 1px solid var(--rule);
}
.schema[hidden] { display: none; }
.schema summary {
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    list-style: none;
    background: var(--paper);
    position: sticky;
    top: 40px;
    z-index: 2;
    border-bottom: 1px solid var(--rule-2);
}
.schema summary::-webkit-details-marker { display: none; }
.schema summary::before {
    content: '▶';
    font-size: 10px;
    color: var(--muted);
    display: inline-block;
    width: 12px;
}
.schema[open] summary::before { content: '▼'; }
.schema summary:hover { background: var(--hover); }
.schema__name { flex: 1; font-size: 14px; font-weight: 600; }
.schema__count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.schema__body { padding: 8px 0 16px; }
.schema__diagram { display: block; max-width: 100%; height: auto; margin: 0 auto 8px; border: 1px solid var(--rule); }

table.parts {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.parts th, table.parts td {
    padding: 3px 8px;
    text-align: left;
    border-bottom: 1px solid var(--rule-2);
    vertical-align: top;
}
table.parts th {
    background: var(--rule-2);
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    border-bottom: 1px solid var(--ink);
}
table.parts .pos { width: 32px; text-align: right; color: var(--muted); }
table.parts .oem { width: 140px; white-space: nowrap; }
table.parts tr:hover td { background: var(--hover); }
table.parts tr[hidden] { display: none; }

/* Legacy prefix-groups (fallback) */
.prefix-group {
    border-bottom: 1px solid var(--rule);
}
.prefix-group summary {
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    list-style: none;
    font-family: var(--mono);
}
.prefix-group summary::-webkit-details-marker { display: none; }
.prefix-group summary::before { content: '▶ '; color: var(--muted); }
.prefix-group[open] summary::before { content: '▼ '; }
.prefix-group summary:hover { background: var(--hover); }

.src-dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 16px; font-size: 12px; }
.src-dl dt { font-family: var(--mono); text-transform: uppercase; color: var(--muted); }
.src-dl dd { margin: 0; }

/* ============ Compare ============ */
.compare-hd {
    padding: 8px 0;
    border-bottom: 1px solid var(--ink);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
}
.compare-hd h1 { font-family: var(--mono); font-size: 20px; }
.compare-hd h1 a { color: var(--ink); text-decoration: none; }
.compare-hd h1 a:hover { text-decoration: underline; }
.compare-hd .x { color: var(--muted); margin: 0 6px; }
.compare-hd .stat { font-family: var(--mono); font-size: 13px; }
.compare-hd .stat .num { font-size: 18px; font-weight: 700; color: var(--accent); }

.compare-legend {
    display: flex;
    gap: 20px;
    padding: 6px 0;
    font-size: 12px;
    color: var(--muted);
    border-bottom: 1px solid var(--rule);
    flex-wrap: wrap;
}
.compare-legend .code { font-family: var(--mono); color: var(--ink); font-weight: 700; }

/* Compare grid: parts table + sticky diagram panel */
.compare-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 480px;
    gap: 20px;
    align-items: start;
    padding: 8px 0;
}
@media (max-width: 900px) {
    .compare-grid { grid-template-columns: 1fr; }
    .diagram-col { display: none; }
}

.diagram-col {
    position: sticky;
    top: 48px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 4px;
}
.diagram-panel {
    border: 1px solid var(--ink);
    padding: 8px;
    background: var(--paper);
}
.diagram-panel .placeholder {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    border: 1px dashed var(--rule);
}
.diagram-panel img {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}
.diagram-panel .caption {
    padding-top: 6px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--rule-2);
    margin-top: 6px;
}
.diagram-panel .caption .pos {
    color: var(--accent);
    font-weight: 700;
}

table.common {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.common th, table.common td {
    padding: 3px 8px;
    text-align: left;
    border-bottom: 1px solid var(--rule-2);
    vertical-align: top;
}
table.common th {
    background: var(--rule-2);
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    border-bottom: 1px solid var(--ink);
    position: sticky;
    top: 40px;
}
table.common .pos { width: 30px; text-align: right; color: var(--muted); }
table.common .oem { width: 140px; white-space: nowrap; }
table.common tr:hover td { background: var(--hover); cursor: pointer; }
table.common tr.active td { background: #e6f0ff; }
table.common tr[hidden] { display: none; }

.share {
    padding: 8px 0;
    display: flex;
    gap: 8px;
    align-items: center;
    font-family: var(--mono);
    font-size: 12px;
    flex-wrap: wrap;
}
.share code { color: var(--muted); word-break: break-all; }

/* ============ 404 ============ */
.notfound {
    padding: 40px 0;
}
.notfound__code {
    font-family: var(--mono);
    font-size: 48px;
    color: var(--accent);
    line-height: 1;
}
.notfound__title { font-size: 18px; margin: 8px 0 16px; }
.notfound__msg { color: var(--muted); margin-bottom: 20px; }
.notfound a.btn { text-decoration: none; }

/* ============ Compare view toggle ============ */
.view-toggle {
    display: inline-flex;
    border: 1px solid var(--ink);
    background: var(--paper);
}
.view-btn {
    background: var(--paper);
    color: var(--ink);
    border: 0;
    padding: 6px 14px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    border-right: 1px solid var(--rule);
    line-height: 1.2;
}
.view-btn:last-child { border-right: 0; }
.view-btn.is-active {
    background: var(--ink);
    color: var(--paper);
}
.view-btn:not(.is-active):hover {
    background: var(--rule-2);
}
.view-mode[hidden] { display: none; }

/* ============ Compare section mode: main + right TOC ============ */
.compare-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .compare-layout { grid-template-columns: minmax(0, 1fr); }
    .toc { display: none; }
}

.toc {
    position: sticky;
    top: 48px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    border-left: 1px solid var(--ink);
    padding: 4px 0 4px 12px;
    font-size: 12px;
}
.toc__hd {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 4px 0 6px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 4px;
    position: sticky;
    top: 0;
    background: var(--paper);
    z-index: 1;
}
.toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.toc__item {
    border-bottom: 1px dotted var(--rule-2);
}
.toc__item:last-child { border-bottom: 0; }
.toc__item a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
    padding: 4px 4px 4px 8px;
    color: var(--ink);
    text-decoration: none;
    line-height: 1.3;
    position: relative;
}
.toc__item a:hover { text-decoration: underline; text-underline-offset: 2px; }
.toc__item.is-current a {
    background: var(--rule-2);
    font-weight: 700;
}
.toc__item.is-current a::before {
    content: '';
    position: absolute;
    left: -13px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--accent);
}
.toc__name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}
.toc__count {
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.toc__item.is-current .toc__count { color: var(--ink); }

/* Scroll offset so anchor jumps clear sticky header + summary bar */
.schema { scroll-margin-top: 90px; }

/* ============ Section mode: multi-diagram grid ============ */
.schema__diagrams {
    display: grid;
    gap: 12px;
    margin: 0 auto 8px;
    max-width: 100%;
    overflow: hidden;  /* clip any child overflow (defense-in-depth for img.naturalWidth on load) */
}
/* minmax(0, 1fr): grid track が img.naturalWidth などの min-content で膨張しないよう
   下限を 0 に明示。これがないと画像 load 完了時に compare page の 2 カラム grid が
   viewport を超える幅で描画され、右にはみ出す (chassis single はカラム 1 で無害)。 */
.schema__diagrams[data-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 700px; }
.schema__diagrams[data-count="2"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.schema__diagrams[data-count="3"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.schema__diagrams[data-count="4"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 640px) {
    .schema__diagrams,
    .schema__diagrams[data-count="2"],
    .schema__diagrams[data-count="3"],
    .schema__diagrams[data-count="4"] { grid-template-columns: minmax(0, 1fr); }
}
figure.schema__diagram {
    margin: 0;
    border: 1px solid var(--rule);
    padding: 8px;
    background: var(--paper);
    display: flex;
    flex-direction: column;
    overflow: hidden;  /* prevent SVG hotspots from extending beyond diagram bounds */
    min-width: 0 !important;  /* prevent grid children from expanding to img.naturalWidth */
    max-width: 100% !important;
    box-sizing: border-box;
}
.schema__diagram-wrap {
    position: relative;
    line-height: 0;  /* remove baseline gap under img */
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}
figure.schema__diagram img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    margin: 0;
    border: 0;
    box-sizing: border-box;
}
.schema__hotspots {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    pointer-events: none;
    overflow: hidden;  /* clip hotspot rects that would extend outside diagram */
}
.hotspot {
    fill: transparent;
    stroke: transparent;
    stroke-width: 1.5;
    pointer-events: auto;
    cursor: pointer;
    transition: fill 60ms linear, stroke 60ms linear;
    vector-effect: non-scaling-stroke;
}
/* Compare page: 両車種に共通する OEM を常時ハイライト。
   hover / pinned の方が優先されるよう、後段のルールで上書きされる。 */
.hotspot.is-common {
    fill: rgba(255, 204, 0, 0.10);
    stroke: rgba(217, 120, 0, 0.35);
    stroke-width: 1;
}
.hotspot:hover,
.hotspot.is-hover {
    fill: rgba(255, 204, 0, 0.35);
    stroke: #d97800;
    stroke-width: 2;
}
.hotspot.is-pinned {
    fill: rgba(0, 68, 204, 0.28);
    stroke: var(--accent);
    stroke-width: 2.5;
}
tr[data-oem].is-hover td { background: var(--hover); }
tr[data-oem].is-pinned td { background: #e6f0ff; }
figure.schema__diagram figcaption {
    padding-top: 6px;
    margin-top: 6px;
    border-top: 1px solid var(--rule-2);
    font-size: 11px;
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
    line-height: 1.4;
}
figure.schema__diagram figcaption .mono { font-weight: 700; }
figure.schema__diagram figcaption .mut {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* ============ Mobile refinements (≤ 640px) ============ */
@media (max-width: 640px) {
    /* Home の型式検索 finder: label を独立行に (input 幅確保) */
    .finder {
        gap: 6px;
    }
    .finder label {
        flex-basis: 100%;
        width: 100%;
        margin-bottom: 2px;
    }
    .finder input[type=text] {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        padding: 10px 10px;
        font-size: 16px;  /* iOS Safari は 16px 未満だと focus 時に自動ズーム */
    }
    .finder button {
        padding: 10px 14px;
        font-size: 14px;
    }
    .finder__hint {
        width: 100%;
        margin-top: 6px;
    }

    /* Compare: カテゴリ/リスト切替を 100% 幅、指で押しやすいサイズに */
    .view-toggle {
        display: flex;
        width: 100%;
    }
    .view-btn {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
        font-size: 14px;
    }

    /* diagrams はみ出しを防止 (figure 側の overflow: hidden と合わせて図面が親要素を超えないよう二重防御)。
       parts-col はテーブル単独なので横スクロール可のまま。 */
    .schema__body {
        overflow-x: hidden;
    }
    .parts-col {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Table 内のセル padding とフォントサイズを詰めて幅圧縮 */
    table.parts, table.common {
        font-size: 12px;
    }
    table.parts th, table.parts td,
    table.common th, table.common td {
        padding: 4px 6px;
    }
    table.parts .oem, table.common .oem {
        width: auto;
        min-width: 96px;
    }

    /* リストモード (table.common) の sticky ヘッダは狭画面で位置が合わないので通常フローへ、
       かつ見出しを黒地白抜きにして分かりやすく */
    table.common th {
        position: static;
        top: auto;
        background: var(--ink);
        color: var(--paper);
        border-bottom: 1px solid var(--ink);
    }

    /* Home の finder__hint / メーカーラベルなど、狭い横幅で読みやすく */
    .wrap { padding: 0 12px; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
