/* KAI — ロゴの紺・青を基調に、ロゴの黄色を値札（査定結果）だけに使う */
:root {
  --ai: #004988;        /* ロゴの青：ブランド色・ボタン・利用者の吹き出し */
  --ai-deep: #012850;   /* ロゴの紺 */
  --ink: #0f1d33;       /* 本文 */
  --muted: #5c6480;
  --paper: #f7f8fb;     /* 背景 */
  --line: #dde1ec;
  --kai-bubble: #eef1f8;
  --tag: #f3b111;       /* ロゴの黄色：値札（査定結果）と、1位・申し込みボタンの強調に使う */
  --search: #d32f2f;    /* 「相場を調べる」ボタンの赤（白文字とのコントラスト比 4.98） */

  font-family: "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-size: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 880px; margin: 0 auto; padding: 0 16px 56px; }
a { color: var(--ai); }
:focus-visible { outline: 3px solid var(--tag); outline-offset: 2px; }

.env-banner { background: #b3261e; color: #fff; text-align: center; font-size: 13px; padding: 4px; }

.site-header { background: #fff; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.logo { display: inline-block; line-height: 0; }
.logo img { height: 56px; width: auto; }

.site-footer { border-top: 1px solid var(--line); padding: 24px 16px; font-size: 13px; color: var(--muted); text-align: center; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.copyright { margin-top: 4px; }

/* 運営会社・利用規約・プライバシーポリシー */
.legal { max-width: 760px; margin: 32px auto 0; }
.legal h1 { font-size: clamp(22px, 4vw, 28px); }
.legal h2 { font-size: 18px; margin-top: 32px; }
.legal ol, .legal ul { padding-left: 1.4em; }
.legal li { margin: 4px 0; }
.legal-table { width: 100%; }
.info-table.legal-table { min-width: 0; } /* 比較表用の最小幅（.info-table）を打ち消す */
.legal-table th[scope="row"] { width: 30%; white-space: normal; }
/* スマホでは表を縦に並べ、横にはみ出さないようにする（見出しは各セルの data-label で出す） */
@media (max-width: 600px) {
  .legal-table thead { display: none; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; }
  .legal-table tr { border-bottom: 1px solid var(--line); }
  .legal-table th[scope="row"] { width: auto; }
  .legal-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
}
.legal-date { margin-top: 32px; color: var(--muted); text-align: right; }

/* ------------------------------------------------------------
   TOP：KAI との会話
   ------------------------------------------------------------ */
.agent {
  margin-inline: calc(50% - 50vw);
  padding: 40px 16px 56px;
  /* 青の帯に、扱っている商品の線画アイコンを薄く並べる（文字の読みやすさを落とさない濃さ） */
  background: var(--ai) url("/images/agent-pattern.svg") 0 0 / 300px 300px repeat;
}
.genre-page[data-genre-page="camera"] .agent { background-image: url("/images/agent-pattern-camera.svg"); }

.agent-title {
  max-width: 640px;
  margin: 0 auto 24px;
  color: #fff;
  font-size: clamp(22px, 4.2vw, 30px);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0.02em;
}
.agent-title span { display: inline-block; }
.agent-note { max-width: 640px; margin: 14px auto 0; color: #fff; font-size: 13px; line-height: 1.7; }

/* ジャンルページ：藍色の帯の中に置くパンくず */
.breadcrumb.breadcrumb-on-agent { max-width: 640px; margin: 0 auto 8px; color: #fff; }
.breadcrumb-on-agent a { color: #fff; }

.chat {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  padding: 20px 20px 16px;
  box-shadow: 0 18px 40px -24px rgba(8, 12, 40, 0.6);
}

.chat-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg-user { justify-content: flex-end; scroll-margin-top: 16px; }

.avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.bubble { max-width: 85%; padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: var(--kai-bubble); }
.bubble p { margin: 0; }
.bubble p + p { margin-top: 4px; }
.msg-user .bubble { background: var(--ai); color: #fff; border-radius: 16px 4px 16px 16px; overflow-wrap: anywhere; }


/* 考え中の3つの点（操作への反応としてだけ動かす） */
.is-typing .bubble { display: flex; gap: 5px; padding: 14px 16px; }
.is-typing .bubble span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite both; }
.is-typing .bubble span:nth-child(2) { animation-delay: 0.2s; }
.is-typing .bubble span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* 値札：KAI の査定結果 */
.tag {
  position: relative;
  margin: 10px 0 8px;
  padding: 14px 18px 14px 40px;
  background: var(--tag);
  color: var(--ink);
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 22px 100%, 0 50%);
  animation: tag-in 0.35s ease-out both;
}
.tag-hole { position: absolute; left: 14px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--kai-bubble); }
.tag-label { font-size: 12px; color: var(--ai-deep); }
.tag-name { font-weight: 700; }
.tag-price { font-size: clamp(24px, 5vw, 30px); font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.tag-date { font-size: 12px; }
@keyframes tag-in { from { transform: translateY(6px) rotate(-1.5deg); opacity: 0; } to { transform: none; opacity: 1; } }

.composer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.composer input {
  flex: 1 1 220px;
  min-width: 0;
  font: inherit;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.composer input:focus { outline: none; border-color: var(--ai); background: #fff; }
.send {
  flex: none;
  font: inherit;
  font-weight: 700;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--search);
  color: #fff;
  cursor: pointer;
}
.send:hover { background: #b71c1c; }
.send:disabled { opacity: 0.55; cursor: wait; }
.cf-turnstile { flex-basis: 100%; }

/* 型番が分からないときの条件 */
.conditions { flex-basis: 100%; font-size: 14px; }
/* 「型番が分からないとき」は入力欄の上に置き、条件を選んだあと入力欄の横（スマホは下）のボタンで送る */
.composer .conditions { margin-bottom: 4px; }
.conditions summary { width: fit-content; padding: 4px 0; color: var(--ai); font-weight: 700; cursor: pointer; }
.conditions-note { margin: 6px 0 10px; color: var(--muted); }
.conditions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.condition { display: grid; gap: 4px; }
.condition span { font-size: 13px; color: var(--muted); }
.condition select { font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--paper); }
.condition select:focus { outline: none; border-color: var(--ai); background: #fff; }
.msg-user .bubble { white-space: pre-line; }

/* チャットの候補の機種 */
.candidates { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.candidates li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.candidate-name { font-weight: 700; color: var(--ai-deep); }
.candidate-price { font-variant-numeric: tabular-nums; color: inherit; }
.tag-estimate { margin-top: 8px; }

/* チャットの回答のあとの、ランキング上位の業者の案内（広告） */
.vendor-cta-pr { display: inline-block; margin: 0 0 6px; }
.vendor-mini-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 10px; }
.vendor-mini { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.vendor-mini.is-first { border: 2px solid var(--tag); }
.vendor-mini-image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 6px; margin: 8px 0; }
.vendor-mini-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.vendor-mini-rank { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #fff; background: var(--ai-deep); border-radius: 999px; padding: 1px 9px; }
.vendor-mini .vendor-mini-rank .crown { flex: none; width: 16px; height: 11px; fill: currentColor; stroke: none; }
.vendor-mini.rank-1 .vendor-mini-rank { color: #4a3300; background: linear-gradient(135deg, var(--gold-hi), var(--gold) 60%); }
.vendor-mini.rank-2 .vendor-mini-rank { color: #26324a; background: linear-gradient(135deg, var(--silver-hi), var(--silver) 60%); }
.vendor-mini.rank-3 .vendor-mini-rank { color: #3d230c; background: linear-gradient(135deg, var(--bronze-hi), var(--bronze) 60%); }
.vendor-mini.rank-2 { border-top: 3px solid var(--silver); }
.vendor-mini.rank-3 { border-top: 3px solid var(--bronze); }
.vendor-mini-score { font-size: 13px; font-weight: 700; color: var(--ai-deep); }
.vendor-mini-scores { display: grid; gap: 6px; margin: 12px 0 0; }
.vendor-mini-scores .score { grid-template-columns: 6.5em minmax(0, 1fr) auto; justify-content: stretch; gap: 10px; font-size: 13px; }
.is-first .score-bar span.on { background: var(--tag); }
.vendor-mini-scores dd { margin: 0; }
.vendor-mini-summary { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; line-height: 1.8; }
/* 査定を申し込むボタン：ロゴの黄色で目立たせる（文字は濃い色でコントラストを確保） */
.vendor-cta { display: block; margin-top: 10px; padding: 12px 16px; border-radius: 10px; background: var(--tag); color: var(--ink); font-weight: 700; text-align: center; text-decoration: none; box-shadow: 0 2px 0 #c98f00; }
.vendor-cta:hover, .vendor-cta:focus-visible { background: #ffc531; }
.vendor-cta-gap { margin: 0 0 6px; font-weight: 700; }
.estimate-spread { margin: 8px 0; font-size: 14px; }
.estimate-spread strong { color: var(--search); font-size: 1.15em; font-variant-numeric: tabular-nums; }
.vendor-cta-gap strong { color: var(--search); font-size: 1.15em; font-variant-numeric: tabular-nums; }
.vendor-cta-note { margin: 8px 0 0; font-size: 12px; }
.cf-turnstile:empty { display: none; }

/* ジャンルから探す */
.genres { max-width: 640px; margin: 40px auto 0; }
.genres h2 { font-size: 18px; margin: 0 0 8px; }
.genres ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.genres a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.genres a:hover strong { color: var(--ai); text-decoration: underline; }
.genres span { font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------
   ジャンル・商品ページ
   ------------------------------------------------------------ */
.breadcrumb { font-size: 13px; color: var(--muted); margin-top: 20px; }
main > h1 { font-size: clamp(22px, 4vw, 28px); line-height: 1.45; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; background: #fff; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
th { background: var(--kai-bubble); font-size: 14px; }
td { font-variant-numeric: tabular-nums; }
.note, .ranking-note { font-size: 13px; color: var(--muted); }

.pr-label { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--muted); border-radius: 4px; padding: 0 6px; margin-right: 6px; vertical-align: middle; }
/* お店による買取価格の差（公開中の相場の幅だけを使う） */
.price-gap { margin-top: 48px; }
.price-gap h2 { font-size: clamp(20px, 3.4vw, 24px); line-height: 1.5; margin-bottom: 8px; }
.gap-lead { margin: 0 0 16px; }
.gap-max { color: var(--search); font-size: 1.35em; font-variant-numeric: tabular-nums; }
.gap-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 720px) { .gap-list { grid-template-columns: repeat(3, 1fr); } }
.gap-item { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.gap-name { display: block; font-weight: 700; line-height: 1.5; margin-bottom: 10px; }
.gap-prices { margin: 0; display: grid; gap: 6px; }
.gap-prices div { display: grid; grid-template-columns: 4.5em 1fr; align-items: center; gap: 8px; }
.gap-prices dt { font-size: 13px; color: var(--muted); }
.gap-prices dd { margin: 0; display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.gap-bar { display: block; width: 100%; height: 10px; }
.gap-bar-low rect { fill: #b9c0d2; }
.gap-bar-high rect { fill: var(--ai); }
.gap-diff { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.gap-diff strong { color: var(--search); font-size: 22px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.gap-advice { margin-top: 28px; padding: 20px 18px; background: var(--kai-bubble); border-radius: 8px; }
.gap-advice h3 { margin: 0 0 6px; font-size: 19px; line-height: 1.5; }
.gap-advice > p { margin: 0; }
.gap-steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
@media (min-width: 720px) { .gap-steps { grid-template-columns: repeat(3, 1fr); } }
.gap-steps li { counter-increment: step; position: relative; background: #fff; border-radius: 8px; padding: 12px 12px 12px 52px; display: grid; gap: 2px; }
.gap-steps li::before { content: counter(step); position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--ai); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.gap-steps strong { line-height: 1.5; }
.gap-steps span { font-size: 14px; color: var(--muted); line-height: 1.6; }
/* .gap-advice > p より強く指定する（同じ強さだと余白が0になり、ボタンが上の手順にくっつくため） */
.gap-advice .gap-cta { margin: 24px 0 0; text-align: center; }
.gap-cta a { display: block; max-width: 420px; margin: 0 auto; padding: 14px 20px; border-radius: 999px; background: var(--ai); color: #fff; font-size: 17px; font-weight: 700; text-align: center; text-decoration: none; box-shadow: 0 2px 0 var(--ai-deep); }
.gap-cta a:hover { background: var(--ai-deep); }

/* 状態が悪くても売れることがある（イラストは content/conditions.js の SVG） */
/* クラス名は「型番が分からないとき」の .conditions と重ならないようにする */
.condition-states { margin-top: 48px; }
.condition-states h2 { font-size: clamp(20px, 3.4vw, 24px); line-height: 1.5; margin-bottom: 16px; }
.condition-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
@media (min-width: 720px) { .condition-list { grid-template-columns: repeat(3, 1fr); } }
.condition-list li { display: grid; gap: 6px; text-align: center; }
.condition-label { font-weight: 700; font-size: 15px; }
.condition-list svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.condition-advice { margin-top: 24px; padding: 20px 18px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.condition-advice h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.5; }
.condition-advice > p { margin: 0 0 6px; }
.condition-advice .gap-cta { margin: 20px 0 0; text-align: center; }

/* 業者ランキング（PR） */
.ranking { margin-top: 48px; }
.ranking h2 { font-size: clamp(20px, 3.4vw, 24px); line-height: 1.5; }
.vendors { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 16px; }

.vendor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px 20px;
}
:root {
  --gold: #f3b111;   --gold-hi: #fff1bf;   --gold-lo: #b9820a;
  --silver: #b9c2cf; --silver-hi: #ffffff; --silver-lo: #7d899b;
  --bronze: #cf8f55; --bronze-hi: #ffe0c2; --bronze-lo: #8f5527;
}
/* 1〜3位：カードの上に順位の色の帯と、うっすらした色を敷く */
.vendor.rank-1 { border: 2px solid var(--gold); box-shadow: 0 14px 32px -20px rgba(185, 130, 10, .55); background: linear-gradient(180deg, #fff8e1 0, #fff 140px); }
.vendor.rank-2 { border-top: 4px solid var(--silver); background: linear-gradient(180deg, #f3f5f9 0, #fff 120px); }
.vendor.rank-3 { border-top: 4px solid var(--bronze); background: linear-gradient(180deg, #fbf1e8 0, #fff 120px); }

.vendor-head { display: flex; gap: 16px; align-items: center; padding-top: 10px; }
/* 順位のメダル（1〜3位は王冠付き） */
.rank-badge {
  position: relative;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  line-height: 1;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--ai-deep);
}
.rank-badge b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.rank-badge .crown { position: absolute; top: -17px; left: 50%; width: 32px; height: 22px; transform: translateX(-50%); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.rank-1 .rank-badge { color: #4a3300; background: radial-gradient(circle at 32% 28%, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), 0 6px 14px -6px rgba(185, 130, 10, .8); }
.rank-2 .rank-badge { color: #26324a; background: radial-gradient(circle at 32% 28%, var(--silver-hi), var(--silver) 55%, var(--silver-lo)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6), 0 6px 14px -6px rgba(90, 100, 120, .7); }
.rank-3 .rank-badge { color: #3d230c; background: radial-gradient(circle at 32% 28%, var(--bronze-hi), var(--bronze) 55%, var(--bronze-lo)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5), 0 6px 14px -6px rgba(143, 85, 39, .7); }
.rank-1 .crown { fill: var(--gold); stroke: var(--gold-lo); stroke-width: 1; }
.rank-2 .crown { fill: var(--silver); stroke: var(--silver-lo); stroke-width: 1; }
.rank-3 .crown { fill: var(--bronze); stroke: var(--bronze-lo); stroke-width: 1; }

.vendor-title h3 { margin: 0; font-size: 20px; line-height: 1.4; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vendor-total { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.vendor-total strong { font-size: 20px; color: var(--ai-deep); font-variant-numeric: tabular-nums; }

.vendor-summary { margin: 0 0 12px; }
.scores { display: grid; gap: 6px; }
.score { display: grid; grid-template-columns: 6.5em minmax(0, 200px) auto; justify-content: start; align-items: center; gap: 12px; font-size: 14px; }
.score-label { color: var(--ink); }
.score-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.score-bar span { height: 10px; border-radius: 3px; background: var(--line); }
.score-bar span.on { background: var(--ai); }
.rank-1 .score-bar span.on { background: var(--tag); }
.score-value { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ai-deep); }
.score-value small { font-weight: 400; color: var(--muted); }

.vendor-link {
  display: block;
  text-align: center;
  padding: 14px 16px;
  background: var(--ai);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}
.vendor-link:hover { background: var(--ai-deep); }
.rank-1 .vendor-link { background: var(--tag); color: var(--ink); }
.rank-1 .vendor-link:hover { background: #e2a200; }

@media (min-width: 720px) {
  .vendor { grid-template-columns: 1fr 240px; grid-template-areas: "head head" "image image" "body link"; align-items: end; }
  .vendor-head { grid-area: head; }
  .vendor-body { grid-area: body; }
  .vendor-link { grid-area: link; }
  .vendor-image { grid-area: image; max-width: 480px; }
}

/* ------------------------------------------------------------
   ジャンルページ：高く売るコツ・よくある質問・参考情報
   ------------------------------------------------------------ */
.guide, .faq { margin-top: 56px; }
.guide > h2, .faq > h2 {
  font-size: clamp(20px, 3.4vw, 24px);
  line-height: 1.5;
  margin: 0 0 16px;
  padding-left: 14px;
  border-left: 6px solid var(--tag);
}
.guide h3 { font-size: 18px; line-height: 1.5; margin: 36px 0 10px; color: var(--ai-deep); }
.guide p, .faq > p { margin: 0 0 10px; max-width: 46em; }

.diagram { margin: 24px 0 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.diagram svg { display: block; width: 100%; height: auto; }

/* 買取の流れ：順番に意味があるので番号を付ける */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 20px 0 8px;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 44px 14px 14px;
  font-size: 14px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 12px;
  left: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ai);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}
.steps strong { display: block; color: var(--ai-deep); font-size: 15px; margin-bottom: 4px; }

/* 比較表・必要なものの表 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0 8px; }
.info-table { min-width: 560px; font-size: 14px; }
.info-table thead th { background: var(--ai); color: #fff; font-weight: 700; }
.info-table tbody th { background: var(--kai-bubble); color: var(--ai-deep); white-space: nowrap; }
.info-table td, .info-table th { vertical-align: top; }

.faq-item { border-top: 1px solid var(--line); padding: 18px 0 8px; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h3 { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.6; margin: 0 0 8px; }
.faq-item p { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; }
.faq-q, .faq-a {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.faq-q { background: var(--ai); color: #fff; }
.faq-a { background: var(--tag); color: var(--ink); }


.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 480px) {
  .diagram svg { min-width: 600px; }
  .logo img { height: 44px; }
  .agent { padding: 28px 12px 40px; }
  .chat { padding: 16px 14px 12px; border-radius: 14px; }
  .send { flex: 1 1 100%; }
  /* スマホでは KAI のアイコンを上に置き、回答は横幅いっぱいに出す */
  .msg-kai { flex-direction: column; gap: 6px; }
  .msg-kai .bubble { max-width: 100%; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tag, .is-typing .bubble span { animation: none; }
}

/* 業者の比較表 */
.compare-title { font-size: 18px; margin: 24px 0 0; }
/* 業者の列は同じ幅にそろえ、画像の有無で列の幅が変わらないようにする */
.vendor-compare { min-width: 720px; table-layout: fixed; }
.vendor-compare td { line-height: 1.6; }
.compare-rank { display: flex; align-items: center; gap: 4px; font-size: 12px; opacity: .9; }
.compare-rank .crown { flex: none; width: 18px; height: 13px; }
.compare-image { display: block; max-width: 180px; margin: 8px 0 0; border-radius: 6px; overflow: hidden; background: #fff; }
.compare-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.compare-score { font-size: 18px; font-weight: 700; color: var(--ai-deep); }
.compare-link { display: inline-block; padding: 8px 12px; border-radius: 8px; background: var(--ai); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.compare-link:hover, .compare-link:focus-visible { background: var(--ai-deep); }
.compare-note { font-size: 13px; color: var(--muted); margin: 4px 0 24px; }

/* 業者カードの強み */
.vendor-strengths { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.vendor-strengths li { position: relative; padding-left: 1.6em; line-height: 1.6; }
.vendor-strengths li::before { content: ""; position: absolute; left: .2em; top: .35em; width: .45em; height: .8em; border: solid var(--ai); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.rank-1 .vendor-strengths li::before { border-color: var(--tag); }
/* 横にスクロールしても項目名が見えるように、左端の列を固定する */
.vendor-compare thead th:first-child, .vendor-compare tbody th { position: sticky; left: 0; z-index: 1; min-width: 0; width: 7.5em; white-space: normal; }
.vendor-compare thead th:first-child { background: var(--ai); }

/* 業者カードの画像（公式サイトのスクリーンショットなど） */
.vendor-image { display: block; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.vendor-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }

/* ------------------------------------------------------------
   離脱防止ポップアップ（1位の業者をおすすめ）
   ------------------------------------------------------------ */
.exit-popup { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px 20px 18px; border: 0; border-top: 6px solid var(--tag); border-radius: 14px; box-shadow: 0 20px 60px rgba(1, 40, 80, .35); color: var(--ink); overflow-y: auto; }
.exit-popup::backdrop { background: rgba(1, 40, 80, .55); }
.exit-popup h2 { font-size: 19px; line-height: 1.5; margin: 0 28px 12px 0; }
.exit-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--kai-bubble); color: var(--ai-deep); font-size: 20px; line-height: 1; cursor: pointer; }
.exit-close:hover { background: var(--line); }
.exit-image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 12px; }
.exit-vendor { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.exit-rank { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 6px; background: var(--tag); color: var(--ai-deep); font-size: 14px; }
.exit-vendor .pr-label { vertical-align: 2px; }
.exit-total { margin: 0 0 6px; font-size: 14px; }
.exit-total strong { font-size: 20px; color: var(--ai-deep); }
.exit-scores { display: grid; gap: 4px; margin: 0 0 16px; }
.exit-popup .exit-cta { display: block; width: 100%; text-align: center; background: var(--tag); color: var(--ink); }
.exit-popup .exit-cta:hover { background: #e2a200; }
.exit-note { margin: 12px 0 0; font-size: 12px; text-align: center; }

/* 商品ページの相場：調べたサイトの数と時点 */

/* ------------------------------------------------------------
   ジャンルページ：買取相場の一覧
   ------------------------------------------------------------ */
.price-list { margin-top: 48px; }
.price-list h2 { margin-bottom: 4px; }
.price-sort { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; margin: 12px 0 8px; font-size: 14px; }
.price-sort p { display: flex; align-items: center; gap: 8px; margin: 0; }
.price-sort[hidden] { display: none; }
.price-sort select { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.price-table { width: 100%; font-size: 15px; }
.price-table th[scope="row"] { font-weight: 700; text-align: left; }
.price-table th[scope="row"] a { color: var(--ai-deep); }
.price-table.is-collapsed .is-extra { display: none; }
.price-line { display: block; white-space: nowrap; }
.price-range { white-space: nowrap; }
.price-condition { display: inline-block; margin-right: 8px; padding: 0 6px; border-radius: 4px; background: var(--kai-bubble); color: var(--ai-deep); font-size: 12px; font-weight: 700; }
.price-more-wrap { text-align: center; margin: 12px 0 0; }
.price-more { padding: 10px 20px; border: 1px solid var(--ai); border-radius: 8px; background: #fff; color: var(--ai); font: inherit; font-weight: 700; cursor: pointer; }
.price-more:hover { background: var(--kai-bubble); }
@media (max-width: 600px) {
  .price-line { white-space: normal; }
}

/* 画面の下に固定する、ランキング1位の業者の申し込みボタン（広告） */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 3px solid var(--tag); box-shadow: 0 -8px 24px -12px rgba(1, 40, 80, .45); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.sticky-cta[hidden] { display: none; }
.sticky-cta-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.sticky-cta-image { flex-shrink: 0; width: 128px; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); }
.sticky-cta-info { flex: 1; min-width: 0; }
.sticky-cta-head { margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 14px; }
.sticky-cta-rank { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #4a3300; background: linear-gradient(135deg, var(--gold-hi), var(--gold) 60%); border-radius: 999px; padding: 1px 9px; }
.sticky-cta .sticky-cta-rank .crown { flex: none; width: 16px; height: 11px; fill: currentColor; stroke: none; }
.sticky-cta-score { font-size: 13px; font-weight: 700; color: var(--ai-deep); }
.sticky-cta-scores { display: grid; gap: 2px; }
.sticky-cta-scores .score { grid-template-columns: 5.5em minmax(0, 140px) auto; gap: 8px; font-size: 12px; }
.sticky-cta-scores .score-bar span { height: 7px; }
.sticky-cta-scores .score-bar span.on { background: var(--tag); }
.sticky-cta-link { flex-shrink: 0; padding: 12px 20px; border-radius: 10px; background: var(--tag); color: var(--ink); font-weight: 700; text-decoration: none; box-shadow: 0 2px 0 #c98f00; }
.sticky-cta-link:hover, .sticky-cta-link:focus-visible { background: #ffc531; }
.sticky-cta-close { flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--line); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
body.has-sticky-cta { padding-bottom: 130px; }
@media (max-width: 520px) {
  .sticky-cta { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .sticky-cta-inner { flex-wrap: wrap; gap: 6px 10px; }
  .sticky-cta-image { width: 84px; }
  /* 画像の有無にかかわらず、業者名とグラフで1段目を使い、ボタンは2段目に回す */
  .sticky-cta-info { flex: 1 1 calc(100% - 94px); }
  .sticky-cta-score { display: none; }
  .sticky-cta-scores .score { grid-template-columns: 5em minmax(0, 1fr) auto; gap: 6px; font-size: 11px; }
  .sticky-cta-link { flex-basis: calc(100% - 42px); padding: 10px 14px; text-align: center; }
  body.has-sticky-cta { padding-bottom: 170px; }
}
