/* 買う前チェックの見た目（2026-10-24。決まりは docs/design_system.md）。色は brand.css だけ。ここには色の値を書かない */
:root { --r-s: 6px; --r-l: 12px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  font-size: 17px; line-height: 1.85; font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { body { font-size: 18px; } }
a { color: var(--brand); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
body.wide .wrap { max-width: 960px; }
svg.ico { width: 24px; height: 24px; flex: none; }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); text-decoration: none; min-width: 0; }
.mark { width: 32px; height: 32px; color: var(--brand); flex: none; }
.logo-text b { display: block; font-size: 19px; font-weight: 800; line-height: 1.25; letter-spacing: .02em; }
.logo-text small { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
.header-find {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 44px; padding: 0 14px;
  border: 2px solid var(--edge); border-radius: var(--r-s); color: var(--brand); font-weight: 700; font-size: 15px; text-decoration: none;
}
.header-find .ico { width: 20px; height: 20px; }

.crumbs { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 12px 0 0; }
.crumbs a { color: var(--muted); }

/* 広告の表記（h1 の上。閉じるボタンなし） */
.ad-notice {
  display: flex; gap: 8px; align-items: baseline; background: var(--notice-bg); border-radius: var(--r-s);
  font-size: 14px; line-height: 1.7; padding: 8px 12px; margin: 12px 0 0;
}
.ad-notice a { white-space: nowrap; }
.ad-tag { flex: none; font-size: 13px; font-weight: 700; line-height: 1.5; border: 1px solid currentColor; border-radius: 4px; padding: 0 6px; }

/* 見出し・本文 */
h1 {
  font-size: 24px; line-height: 1.4; font-weight: 800; margin: 20px 0 12px; letter-spacing: .01em;
  word-break: auto-phrase; text-wrap: balance; font-feature-settings: "palt";
}
@media (min-width: 768px) { h1 { font-size: 30px; } }
h2 {
  font-size: 20px; line-height: 1.5; font-weight: 800; margin: 40px 0 12px; padding-left: 12px; border-left: 4px solid var(--brand);
  word-break: auto-phrase; text-wrap: balance; font-feature-settings: "palt";
}
@media (min-width: 768px) { h2 { font-size: 22px; } }
h3 { font-size: 18px; line-height: 1.5; font-weight: 800; margin: 28px 0 8px; }
p { margin: 0 0 1em; }
.lead { margin: 0 0 16px; }
strong { font-weight: 800; }
.note { font-size: 14px; line-height: 1.7; color: var(--muted); }
.nowrap { white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }
[id] { scroll-margin-top: 16px; }

/* 出典・確認日の帯（h1 のすぐ下） */
.source-band { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 0; background: var(--surface); border-radius: var(--r-s); padding: 6px 12px; margin: 0 0 16px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.source-band .ico { width: 18px; height: 18px; color: var(--brand); align-self: center; }

/* 答えの枠 */
.answer { background: var(--brand-tint); border-radius: var(--r-l); padding: 16px; margin: 16px 0; }
.answer-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 4px; font-weight: 800; font-size: 17px; line-height: 1.5; }
.answer-head .count { font-size: 14px; color: var(--muted); font-weight: 400; }
.part-rows { list-style: none; margin: 0; padding: 0; }
.part-rows li { display: grid; grid-template-columns: 36px 1fr auto; column-gap: 12px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); border-top-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.part-rows .ico { color: var(--brand); width: 28px; height: 28px; }
.part-rows .kind { display: block; font-size: 14px; line-height: 1.5; color: var(--muted); margin-bottom: -4px; }
.part-rows .code { display: block; padding: 8px 0; font-size: 20px; line-height: 1.4; font-weight: 800; letter-spacing: .03em; }
.part-rows .qty { font-size: 14px; color: var(--muted); white-space: nowrap; }
.answer-foot { margin: 8px 0 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.big-number { display: flex; align-items: baseline; gap: 6px; margin: 0 0 8px; }
.big-number b { font-size: 44px; line-height: 1.1; font-weight: 800; color: var(--brand); letter-spacing: 0; }
.big-number span { font-size: 18px; font-weight: 800; }
.answer .label-models { margin: 12px 0 4px; }
.answer .label { margin: 0 0 4px; font-weight: 800; font-size: 17px; line-height: 1.5; }
.answer .big { margin: 0; font-weight: 800; font-size: 19px; line-height: 1.6; }

/* 注意の印 */
.warn { border: 1px solid var(--border); border-left: 6px solid var(--mark); border-radius: var(--r-s); background: var(--surface); padding: 12px 14px; margin: 16px 0; }
.warn-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--mark); color: var(--mark-ink); font-weight: 800; font-size: 14px; line-height: 1.5; padding: 2px 10px; border-radius: 4px; margin-bottom: 6px; }
.warn-tag .ico { width: 18px; height: 18px; }
.warn p { margin: 0; font-size: 16px; line-height: 1.8; }
.warn p + p { margin-top: 4px; }
.warn .note { font-size: 14px; }

/* 型番の囲み */
.label-models { font-size: 15px; font-weight: 700; margin: 16px 0 0; }
.chips { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--edge); border-radius: var(--r-s); text-decoration: none; font-size: 16px; font-weight: 600; background: var(--bg); letter-spacing: .02em; }
.chips li > span { white-space: nowrap; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-s); font-size: 16px; background: var(--bg); letter-spacing: .02em; }
.chips.models li { scroll-margin-top: 45vh; }
.chips.models li:target span { background: var(--brand-tint); border-color: var(--brand); font-weight: 800; }
.chips.models a { min-height: 40px; }
.chips.compact { margin: 8px 0; }

/* 交換の目安の帯の図 */
.interval { list-style: none; margin: 8px 0 0; padding: 0; }
.interval li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.interval li:last-child { border-bottom: 0; }
.interval .row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; line-height: 1.5; }
.interval .name { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.interval .name .ico { width: 20px; height: 20px; color: var(--brand); align-self: center; }
.interval .name b { font-weight: 800; letter-spacing: .02em; }
.interval .val { font-weight: 800; white-space: nowrap; font-size: 17px; }
.bar { height: 10px; background: var(--surface); border-radius: 5px; margin-top: 6px; overflow: hidden; border: 1px solid var(--border); }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 5px; min-width: 6px; }

/* 部品のカード */
.cards { display: grid; gap: 12px; margin: 12px 0; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { border: 1px solid var(--border); border-radius: var(--r-l); padding: 16px; background: var(--bg); }
.card:target { border-color: var(--brand); background: var(--brand-tint); }
.card .kind { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); margin: 0; }
.card .kind .ico { color: var(--brand); width: 22px; height: 22px; }
.card .model { font-size: 22px; line-height: 1.4; font-weight: 800; letter-spacing: .03em; margin: 4px 0 4px; }
.card .maker-name { font-size: 15px; line-height: 1.7; margin: 0 0 8px; }
.card .facts-line { font-size: 15px; line-height: 1.7; margin: 0 0 4px; }
.card .facts-line b { font-weight: 800; }
.msrp { display: block; margin: 8px 0 12px; padding-top: 8px; border-top: 1px dashed var(--border); }
.msrp .amount { font-size: 20px; font-weight: 800; }
.msrp .meta { font-size: 14px; line-height: 1.7; color: var(--muted); }
.card .confirm { font-size: 14px; line-height: 1.7; margin: 0 0 8px; }

/* お店のボタン（落ち着いた形。押せることは、縁と矢印でわかる） */
.shops { display: block; }
.shops .shops-label { display: block; font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0 0 6px; }
.shops a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 14px;
  border: 2px solid var(--brand); border-radius: var(--r-s); background: var(--bg); color: var(--brand);
  font-size: 15px; line-height: 1.5; font-weight: 700; text-decoration: none;
}
.shops a::after { content: ""; flex: none; width: 9px; height: 9px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; transform: rotate(45deg); margin-right: 3px; }
.shops a img { flex: none; margin-left: -12px; } /* 表示を数える 1×1 の画像が、並びの隙間を作らないように（見えなくはしない・大きさは変えない） */
.shops a:hover { background: var(--brand-tint); }

/* 表 */
.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0 6px; border: 1px solid var(--border); border-radius: var(--r-s);
  background: linear-gradient(to left, transparent, var(--bg) 85%) 100% 0 / 36px 100% no-repeat local,
              radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--text) 28%, transparent), transparent) 100% 0 / 12px 100% no-repeat scroll;
}
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; line-height: 1.6; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th { background: var(--surface); font-size: 14px; color: var(--muted); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child, th:first-child { position: sticky; left: 0; background: var(--bg); }
thead th:first-child { background: var(--surface); }
details { border: 1px solid var(--border); border-radius: var(--r-s); padding: 0 14px; margin: 8px 0; }
details summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 4px; }
details .table-scroll { margin-bottom: 14px; }

/* まとめ・出典の枠 */
.box { border: 1px solid var(--border); border-radius: var(--r-l); padding: 12px 16px; margin: 24px 0; background: var(--surface); }
.box.note p { font-size: 14px; line-height: 1.75; margin: 0 0 8px; }
.box.note p:last-child { margin-bottom: 0; }
ol.steps { padding-left: 1.4em; }

/* リンクの一覧（押せるとわかる行） */
.related { list-style: none; padding: 0; margin: 12px 0; border-top: 1px solid var(--border); }
.related li { border-bottom: 1px solid var(--border); }
.related a { display: flex; flex-direction: column; justify-content: center; position: relative; padding: 12px 28px 12px 0; text-decoration: none; min-height: 56px; }
.related a::after { content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px; margin-top: -5px; border-top: 2px solid var(--edge); border-right: 2px solid var(--edge); transform: rotate(45deg); }
.related a span, .related .nolink span { display: block; font-size: 14px; line-height: 1.6; color: var(--muted); text-decoration: none; }
.related .nolink { display: block; padding: 12px 0; }
ul:not([class]) { padding-left: 1.3em; }
ul:not([class]) li { margin-bottom: 4px; }

/* カード型のリンク（トップ・次に読む） */
.link-cards { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 720px) { .link-cards { grid-template-columns: 1fr 1fr; } }
.link-cards.three { }
@media (min-width: 720px) { .link-cards.three { grid-template-columns: repeat(3, 1fr); } }
.link-cards a { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: start; height: 100%; padding: 12px 14px; border: 1px solid var(--edge); border-radius: var(--r-l); text-decoration: none; color: var(--text); background: var(--bg); }
.link-cards a:hover { background: var(--brand-tint); }
.ico-wrap { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); }
.link-cards b { word-break: auto-phrase; text-wrap: pretty; display: block; font-size: 17px; line-height: 1.5; font-weight: 800; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link-cards span.d { display: block; font-size: 14px; line-height: 1.6; color: var(--muted); margin-top: 2px; }

/* 形名を入れる箱 */
.hero { padding: 8px 0 0; }
.hero h1 { font-size: 26px; margin-top: 16px; }
@media (min-width: 768px) { .hero h1 { font-size: 34px; } }
.finder { margin: 8px 0 8px; }
.finder-label { display: block; font-size: 15px; font-weight: 700; line-height: 1.6; margin-bottom: 4px; }
.finder-row { display: flex; gap: 8px; }
.finder input[type="search"] {
  flex: 1; min-width: 0; min-height: 56px; border: 2px solid var(--edge); border-radius: var(--r-s); padding: 0 14px;
  font: inherit; font-size: 18px; letter-spacing: .04em; background: var(--bg); color: var(--text); -webkit-appearance: none; appearance: none;
}
.finder input::placeholder { color: var(--muted); opacity: 1; letter-spacing: .02em; }
.finder button {
  flex: none; min-height: 56px; padding: 0 22px; border: 0; border-radius: var(--r-s); background: var(--brand); color: var(--on-brand);
  font: inherit; font-size: 18px; font-weight: 800; cursor: pointer;
}
.finder-results { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--edge); border-radius: var(--r-s); background: var(--bg); }
.finder-results li + li { border-top: 1px solid var(--border); }
.finder-results a, .finder-results .none { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 48px; padding: 8px 14px; text-decoration: none; font-weight: 800; letter-spacing: .03em; }
.finder-results .none { font-weight: 400; letter-spacing: 0; flex-wrap: wrap; justify-content: flex-start; }
.finder-results small { font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.finder-help { font-size: 15px; line-height: 1.7; margin: 8px 0 0; }
.hero-box { background: var(--brand-tint); border-radius: var(--r-l); padding: 16px 16px 14px; margin: 12px 0 0; }
.hero-box .finder { margin-top: 0; }

/* 数字の帯 */
.facts { list-style: none; margin: 16px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--r-l); overflow: hidden; }
.facts li { padding: 10px 8px; text-align: center; line-height: 1.4; }
.facts li + li { border-left: 1px solid var(--border); }
.facts b { display: block; font-size: 24px; line-height: 1.25; font-weight: 800; color: var(--brand); letter-spacing: 0; }
.facts span { font-size: 14px; color: var(--muted); }
@media (min-width: 640px) { .facts b { font-size: 30px; } .facts span { font-size: 15px; } }

/* 棒グラフ（種類ごとの点数） */
.bars { list-style: none; margin: 8px 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 13em 1fr 2.4em; gap: 8px; align-items: center; padding: 4px 0; font-size: 15px; }
.bars .bar { margin: 0; height: 12px; }
.bars .v { text-align: right; font-weight: 800; }
@media (max-width: 480px) { .bars li { grid-template-columns: 11.5em 1fr 2em; font-size: 14px; gap: 6px; } }

/* 手順の図 */
.flow { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 0; }
.flow li { position: relative; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; padding-bottom: 20px; }
.flow li b, .flow li span { grid-column: 2; }
.flow li::before { grid-row: 1 / span 2; grid-column: 1; content: attr(data-n); display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 800; }
.flow li::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--edge); }
.flow li:last-child { padding-bottom: 0; }
.flow li:last-child::after { display: none; }
.flow b { display: block; line-height: 1.5; }
.flow span { display: block; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ここで調べる（記事の中） */
.try-box { border: 1px solid var(--border); border-radius: var(--r-l); padding: 14px 16px; margin: 16px 0; background: var(--surface); }
.try-box h2 { margin: 0 0 8px; font-size: 18px; border: 0; padding: 0; }

/* この記事でわかること */
.toc { border: 1px solid var(--border); border-radius: var(--r-l); padding: 12px 16px; margin: 16px 0; }
.toc b { display: block; margin-bottom: 4px; }
.toc ol { margin: 0; padding-left: 1.4em; }
.toc li { margin: 2px 0; font-size: 16px; line-height: 1.7; }

/* 一覧 */
.jump { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 2px solid var(--brand); font-weight: 800; text-decoration: none; letter-spacing: .04em; }
.series { margin: 12px 0 0; font-size: 15px; font-weight: 700; color: var(--muted); }
.series + .chips { margin-top: 4px; }
.filter-input { width: 100%; min-height: 52px; border: 2px solid var(--edge); border-radius: var(--r-s); padding: 0 14px; font: inherit; font-size: 18px; background: var(--bg); color: var(--text); -webkit-appearance: none; appearance: none; }
.warn table { min-width: 0; }
.filter-count { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.filter-count:empty { display: none; }
[hidden] { display: none !important; }
.maker-card { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 14px 16px; border: 1px solid var(--edge); border-radius: var(--r-l); text-decoration: none; color: var(--text); margin: 12px 0; }
.maker-card b { word-break: auto-phrase; display: block; font-size: 20px; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.maker-card span.d { font-size: 14px; color: var(--muted); }

/* 下 */
.site-footer { border-top: 1px solid var(--border); margin-top: 56px; padding: 24px 0 40px; font-size: 14px; color: var(--muted); line-height: 1.7; background: var(--surface); }
.site-footer a { color: var(--text); }
.site-footer p { margin: 0 0 8px; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--text); margin-bottom: 12px; }
.foot-brand b { font-size: 17px; }
.foot-facts { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 4px; }
.foot-facts li { display: flex; gap: 8px; align-items: baseline; }
.foot-facts li::before { content: ""; flex: none; width: 10px; height: 6px; margin-top: 4px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg) translateY(-2px); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 12px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }

.warn ul { margin: 6px 0; padding-left: 1.3em; }
.warn li { margin-bottom: 2px; font-size: 16px; line-height: 1.7; }
.answer details.more { background: var(--bg); border-color: var(--edge); margin: 8px 0 0; }
.finder-results .none a { min-height: 44px; padding: 0 12px 0 0; text-decoration: underline; font-weight: 700; display: inline-flex; align-items: center; }
