/* 業者向け買取価格表。PC・スマホ両対応。
   デザイントークンは管理画面（ガチャ景品卸し管理と同系統）に揃えつつ、
   業者が価格を探しやすいよう情報密度は低めにしている。 */

:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #172033;
  /* 補足の文字。薄くしすぎると毎日見る人がつらいので、読める濃さにそろえている */
  --sub: #5c6a80;
  --line: #e2e8f2;
  --line-strong: #ccd5e3;
  --navy: #121c38;
  --accent: #5368e8;
  --accent2: #3e50c6;
  --accent-soft: #eef0ff;
  --price: #c8324a;
  --new: #119b68;
  --new-soft: #e9f9f2;
  --used: #d68018;
  --used-soft: #fff7e7;
  --shadow: 0 12px 34px rgba(29, 43, 76, .07);
  --radius: 8px;

  /* 文字と枠の大きさをそろえるための共通の目盛り。
     新しく足す・直すときは、この中から選ぶ（バラバラな値を直接書かない） */
  --fs-2xs: .82rem;   /* いちばん小さい注記・キャプション（これより小さくしない） */
  --fs-xs: .86rem;    /* 補足の文字 */
  --fs-sm: .93rem;    /* ボタン・入力・ふつうの文字 */
  --fs-md: .98rem;    /* 少し強めの文字（商品名など） */
  --fs-lg: 1.05rem;   /* 小見出し */
  --fs-xl: 1.15rem;   /* セクションの見出し */
  --fs-2xl: 1.3rem;   /* 大見出し（ジャンルなど） */
  --fs-title: 1.5rem; /* ページの一番上のタイトル */
  --fs-price: 1.22rem;    /* 買取価格（メイン） */
  --fs-price-sm: 1.1rem;  /* 買取価格（一覧の中の控えめな表示） */

  /* 角の丸さは --radius（8px・ボタンや小さいカード）と、
     ここに足す --radius-lg（少し目立たせたい大きな枠）の2段階でそろえる */
  --radius-lg: 12px;
  --radius-pill: 999px; /* 丸い札・丸いボタン */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 12px 56px; }

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  padding: 14px 0 11px;
}
.site-header .wrap { padding-bottom: 0; }
.site-title { margin: 0; font-size: var(--fs-title); font-weight: 800; letter-spacing: .02em; }
.site-direction { margin: 3px 0 0; font-size: .86rem; font-weight: 700; color: #fff; }
/* ページの見出しの下に置く1行の説明（何ができるページかを言葉で書く） */
.site-lead { margin: 5px 0 0; font-size: .86rem; font-weight: 600; color: #dbe4f5; }
.site-meta {
  margin: 3px 0 0;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.3;
  /* 業者が毎日いちばんに確かめる情報なので、薄くしすぎず読める明るさにする */
  color: #dbe4f5;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 9px;
}
.site-meta-item { white-space: nowrap; }
.site-meta-item b { color: #fff; font-weight: 800; }

/* 最終更新から24時間以上たったときの注意書き。
   色だけで伝えず「!」と文章の両方で知らせる */
.update-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 9px 0 0;
  padding: 8px 11px;
  border-radius: var(--radius-lg);
  background: #fff4d6;
  border: 1px solid #e0a800;
  color: #5a3d00;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.55;
}
.update-warning-mark {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #b35c00;
  color: #fff;
  font-weight: 800;
  text-align: center;
  line-height: 20px;
}

.notice {
  margin: 11px 0 0;
  padding: 9px 12px;
  background: rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg);
  font-size: .86rem;
  font-weight: 600;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- 本日の価格更新（ヘッダーの右上に小さく出す） ----------
   ページの切り替えナビのすぐ上。件数の札を押すとその条件の価格表が開く。
   値上げ=赤 / 値下げ=青 / 新規=緑 / 終了=灰。色だけに頼らず必ず文字も添える */
.site-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
}
.site-head-main { min-width: 0; }
.change-mini {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  max-width: 100%;
}
.change-mini-title {
  color: #dbe4f5;
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}
.change-mini-note { color: #dbe4f5; font-size: .82rem; font-weight: 600; }
.change-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  justify-content: center;
  min-width: 96px;
  min-height: 30px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--bg);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.change-pill b { font-size: .82rem; font-weight: 800; }
.change-pill small { font-size: .82rem; font-weight: 700; }
.change-pill:hover { border-color: #fff; }
.change-pill.is-new    { background: #e9f9f2; color: #0b5c40; }
.change-pill.is-up     { background: #fdecef; color: #96122a; }
.change-pill.is-down   { background: #e9f1fd; color: #14418f; }
.change-pill.is-ended  { background: #eef1f6; color: #3b4453; }
/* 一覧の各行に付ける印 */
.change-badge {
  display: inline-block;
  margin: 3px 5px 0 0;
  padding: 2px 6px;
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 800;
  border: 1px solid transparent;
}
.change-badge.is-new   { background: #e9f9f2; border-color: #12855c; color: #0b5c40; }
.change-badge.is-up    { background: #fdecef; border-color: #c8324a; color: #96122a; }
.change-badge.is-down  { background: #e9f1fd; border-color: #2059c4; color: #14418f; }
.change-badge.is-ended { background: #eef1f6; border-color: #6b7688; color: #3b4453; }
.change-diff {
  display: inline-block;
  margin-top: 3px;
  font-size: .82rem;
  font-weight: 700;
}
.change-diff.is-up { color: #96122a; }
.change-diff.is-down { color: #14418f; }
.price-ended { color: var(--sub); text-decoration: line-through; }
.price-sub { display: block; font-size: .82rem; font-weight: 700; color: var(--sub); }

@media (max-width: 640px) {
  /* スマホでは更新4種を1列に並べ、重要情報を残したまま高さを抑える */
  .site-head-row { display: block; }
  .site-title { font-size: 1.05rem; line-height: 1.3; }
  .site-meta { margin-top: 2px; font-size: .82rem; line-height: 1.25; gap: 1px 7px; }
  .change-mini {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: normal;
    gap: 3px;
    margin-top: 5px;
  }
  .change-mini-title,
  .change-mini-note { grid-column: 1 / -1; font-size: .82rem; line-height: 1.2; }
  .change-pill {
    min-width: 0;
    min-height: 28px;
    justify-content: center;
    gap: 1px;
    padding: 0 2px;
    font-size: .82rem;
  }
  .change-pill b { font-size: .82rem; }
  .change-pill small { font-size: .82rem; }
}

/* ---------- 検索・絞り込み ---------- */
.search-row { display: flex; gap: 6px; flex-wrap: wrap; }
/* 入力欄と「×」（消すボタン）をひとまとめにする枠 */
.search-field { position: relative; display: flex; flex: 1 1 240px; min-width: 0; }
/* 「×」と文字が重ならないよう、右側を広めに空ける（下の指定より後に効かせる） */
.search-row .search-field input[type="search"] { flex: 1 1 auto; padding-right: 52px; }
.search-clear {
  position: absolute;
  top: 50%;
  right: 3px;
  display: grid;
  /* 指で押す場所は44px以上を確保する */
  width: 44px;
  height: 44px;
  place-items: center;
  transform: translateY(-50%);
  color: var(--sub);
  background: var(--bg);
  border: 0;
  border-radius: 50%;
  font: inherit;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.search-clear:hover { color: var(--ink); background: var(--line); }
.search-row input[type="search"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 10px 12px;
  font-size: .98rem;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  font-family: inherit;
}
.search-row input[type="search"]::placeholder,
.menu-search input[type="search"]::placeholder {
  color: var(--sub);
  font-size: .82rem;
  font-weight: 600;
  opacity: 1;
}
.search-row select {
  padding: 10px 10px;
  font-size: .93rem;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  font-family: inherit;
}
.search-row input:focus, .search-row select:focus { outline: 2px solid #bfdbfe; border-color: var(--accent); }
.btn {
  padding: 10px 19px;
  font-size: .98rem;
  font-weight: 700;
  font-family: inherit;
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.btn:hover { background: var(--accent2); border-color: var(--accent2); }

.chip {
  display: inline-block;
  padding: 6px 12px;
  font-size: .86rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--sub);
  text-decoration: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent2); }
.chip-sm { padding: 5px 10px; font-size: .82rem; }

/* いま効いている絞り込み。1つずつ押して外せるようにしてある */
.active-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 9px 0 0;
  font-size: .86rem;
  font-weight: 600;
  color: var(--sub);
}
.active-filter-label { font-weight: 700; }
.active-filter-label::after { content: "："; }
.tagpill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  /* 指で押す場所は44px以上を確保する */
  min-height: 44px;
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent2);
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}
a.tagpill:hover { border-color: var(--accent); background: #fff; }
/* 押すと外れることが分かるように「×」を丸で囲む */
.tagpill span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  background: rgba(255, 255, 255, .75);
  border-radius: 50%;
  font-size: .82rem;
  line-height: 1;
}
.active-filter-reset {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 5px;
  margin-left: 4px;
  color: var(--accent2);
  font-weight: 700;
}

/* ---------- ジャンル・カテゴリ ---------- */
.genre { margin-top: 27px; }
.genre-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 9px;
  padding-bottom: 6px;
  font-size: var(--fs-2xl);
  font-weight: 800;
  border-bottom: 3px solid var(--accent);
}
.genre-head span { font-size: .82rem; font-weight: 600; color: var(--sub); }

/* ジャンルとカテゴリの間の階層（Androidのメーカー、iPhoneの世代など） */
.sub-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 20px 0 4px;
  padding: 5px 11px;
  font-size: var(--fs-xl);
  font-weight: 800;
  background: var(--accent-soft);
  color: var(--accent2);
  border-radius: var(--radius);
}
.sub-head span { font-size: .82rem; font-weight: 600; color: var(--sub); }

.category { margin-top: 14px; }
.genre .category:first-of-type { margin-top: 0; }
.category-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0 0 6px;
  padding-left: 9px;
  border-left: 4px solid var(--accent);
}
.category-head h3 { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.category-head span { font-size: .82rem; font-weight: 600; color: var(--sub); }

/* ---------- 明細 ---------- */
.table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 9px 12px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--sub);
  text-align: left;
  background: #eef2f9;
  border-bottom: 1px solid var(--line-strong);
}
/* パソコンでは長い表をスクロールしても、見出しの行（商品名・買取価格）が上に残る。
   表の枠に overflow:hidden があると固定が効かないので、表の中でだけ切る */
@media (min-width: 761px) {
  .table-card { overflow: visible; }
  .price-table thead th, .state-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
  }
}
thead th.num, tbody td.num { text-align: right; }
tbody td { padding: 12px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
/* 1行おきに薄く色を敷く。行が長くても商品名と金額を目で追いやすくするため */
tbody tr:nth-child(even) { background: #f7fafd; }
@media (hover: hover) {
  tbody tr:hover { background: #eaf2fa; }
}
.item-name { font-size: .93rem; font-weight: 700; }
.item-note { display: block; margin-top: 4px; font-size: .82rem; color: var(--sub); }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}
.badge-new { background: var(--new-soft); color: #0d7350; }
.badge-used { background: var(--used-soft); color: #96590c; }
.price { font-size: var(--fs-price); font-weight: 800; color: var(--price); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-none { color: var(--sub); font-weight: 600; font-size: .93rem; }
/* PSAはおおよその価格帯で見せる。確定金額と見間違えないよう少し小さく出す */
.price-band { font-size: .98rem; }

.empty {
  margin-top: 23px;
  padding: 36px 16px;
  text-align: center;
  color: var(--sub);
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.site-footer { margin-top: 31px; font-size: .86rem; color: var(--sub); text-align: center; }

/* ---------- 価格の前提・ランク説明 ---------- */
/* 利用制限・SIMロックの注意。見出しだけ常に出し、全文は押したときに開く */
.price-note {
  margin-top: 12px;
  padding: 9px 13px;
  background: #fff5f5;
  border: 1px solid #f0c9c9;
  border-left: 4px solid #d64545;
  border-radius: var(--radius-lg);
}
.price-note > summary {
  /* 指で押す場所は44px以上を確保する */
  min-height: 44px;
  padding: 5px 0;
  font-size: .86rem;
  font-weight: 800;
  color: #b02a2a;
  cursor: pointer;
  list-style: none;
}
.price-note > summary::-webkit-details-marker { display: none; }
.price-note > summary::before { content: "▸ "; }
.price-note[open] > summary::before { content: "▾ "; }
.price-note p {
  margin: 4px 0 0;
  font-size: .86rem;
  line-height: 1.85;
  color: #5c3a3a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.guide {
  margin-top: 9px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.guide > summary {
  padding: 10px 13px;
  font-size: .86rem;
  font-weight: 700;
  color: var(--accent2);
  cursor: pointer;
  list-style: none;
  overflow-wrap: anywhere;
}
.guide-body, .guide li, .guide-note { overflow-wrap: anywhere; }
.guide > summary::-webkit-details-marker { display: none; }
.guide > summary::before { content: "▸ "; }
.guide[open] > summary::before { content: "▾ "; }
.guide > summary:hover { background: #f4f7fd; border-radius: var(--radius); }
.guide-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 11px;
  padding: 4px 13px 14px;
  border-top: 1px solid var(--line);
}
.guide-rank h3 {
  margin: 9px 0 5px;
  font-size: .86rem;
  font-weight: 800;
  color: var(--accent2);
}
.guide-rank ul { margin: 0; padding-left: 1.15em; }
.guide-rank li {
  font-size: .82rem;
  line-height: 1.8;
  color: var(--sub);
}
.guide-rank li a { color: var(--accent2); }
.guide-note {
  margin: 5px 0 0;
  font-size: .82rem;
  line-height: 1.75;
  color: #b06a20;
}

/* ---------- 機種から探す ---------- */
.backlink { margin: 11px 0 0; font-size: .86rem; font-weight: 700; }
.backlink a { color: var(--accent2); text-decoration: none; }
.backlink a:hover { text-decoration: underline; }
.model-note {
  margin-top: 12px; padding: 11px 13px;
  background: #fff8e8; border: 1px solid #f1dcae; border-radius: var(--radius);
  font-size: .86rem; line-height: 1.85; color: #6d5220; white-space: pre-wrap;
}
.state-picker {
  position: sticky;
  top: 0;
  z-index: 35;
  margin: 0 -4px;
  padding: 10px 4px 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 5px 12px rgba(22, 35, 61, .06);
}
.state-picker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.state-picker-head h2 { margin: 0; font-size: .98rem; font-weight: 800; }
.state-picker-head a { color: var(--accent2); font-size: .86rem; font-weight: 800; }
.state-quick {
  display: flex;
  gap: 5px;
  margin-top: 6px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.state-quick-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 42px;
  padding: 6px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.state-quick-link:hover { color: var(--accent2); border-color: var(--accent); }
.state-quick-link.is-active { color: #fff; background: var(--accent); border-color: var(--accent); }
.state-quick-link.is-clear { color: var(--accent2); background: var(--accent-soft); }
.state-picker-hint { margin: 4px 2px 0; color: var(--sub); font-size: .82rem; }
/* 機種は見出しだけを並べ、押した機種だけ状態別の金額を開く。
   40機種×全状態をいきなり広げると、スマホでは終わりが見えない長さになるため */
.model-list { display: grid; gap: 8px; margin-top: 17px; }
.model-card {
  background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); overflow: hidden;
}
.model-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 48px;
  padding: 8px 13px; background: #f1f5fb; border-bottom: 1px solid var(--line);
  cursor: pointer; list-style: none;
}
.model-head::-webkit-details-marker { display: none; }
.model-head-text { display: flex; min-width: 0; flex-direction: column; }
.model-head-text b { font-size: .98rem; font-weight: 800; overflow-wrap: anywhere; }
.model-head-text b::before { content: "▶ "; color: var(--sub); font-size: .8em; }
.model-card[open] .model-head-text b::before { content: "▼ "; }
.model-head-sub { font-size: .82rem; font-weight: 700; color: var(--sub); }
.model-head-price { flex: 0 0 auto; text-align: right; }
.model-head-price .price { font-size: var(--fs-price-sm); }
.model-select-prompt { color: var(--accent2); font-size: .86rem; font-weight: 800; }
.model-card-picked .model-head { cursor: default; }
.model-card-picked .model-head-text b::before { content: ""; }
.model-picked-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 7px 12px;
}
.model-picked-row .item-note { flex: 1 1 auto; margin: 0; }
.model-picked-actions { margin-left: auto; }
.state-table tbody td { padding: 9px 12px; }
.state-table tbody tr.is-picked td { background: #eef4ff; }
.model-pager {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  margin-top: 19px; font-size: .86rem; font-weight: 700;
}
.model-pager a {
  display: inline-flex;
  align-items: center;
  /* 指で押す場所は44px以上を確保する */
  min-height: 44px;
  padding: 0 8px;
  color: var(--accent2);
  text-decoration: none;
}
.model-pager span { color: var(--sub); }

/* ---------- ページ上部へ戻る ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.07rem;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(83, 104, 232, .4);
}
.to-top:hover { background: var(--accent2); }
/* JavaScript が動くときだけ、少し下へ動かしてから出す（最初は画面をふさがない） */
.has-js .to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-js .to-top.is-shown { opacity: 1; visibility: visible; transform: none; }

/* ---------- 公開ページ共通ナビ ----------
   どのページからでも他のページへ1タップで移れるようにヘッダーの中に置く。
   項目が増えても崩れないよう、入りきらない分は折り返す。 */
.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  margin-top: 8px;
}
.page-nav-link {
  display: flex;
  flex: 1 1 140px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 280px;
  min-height: 40px;
  padding: 4px 9px;
  color: #eaf1fb;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: var(--radius);
  text-decoration: none;
  text-align: center;
}
.page-nav-link:hover { background: rgba(255, 255, 255, .2); }
.page-nav-link.is-active {
  color: #16233d;
  background: #fff;
  border-color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
}
.buy-page .page-nav-link.is-active { color: #0a4735; }
.page-nav-label { font-size: .82rem; font-weight: 800; line-height: 1.25; }

/* 見出しへ飛んだとき、上に貼り付いたバーで見出しが隠れないようにする */
[id] { scroll-margin-top: 84px; }

/* 住所などをそのまま写せるボタン（コピーできる端末でだけ出す） */
.copy-btn {
  margin-top: 7px;
  padding: 6px 12px;
  color: var(--accent2);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}
.copy-btn:hover { color: #fff; background: var(--accent); }
.copy-btn.is-done { color: #fff; background: var(--new); border-color: var(--new); }
/* コピーできなかったときは、手で写してもらう案内に変わる */
.copy-btn.is-failed { color: #8f252b; background: #fff0f2; border-color: #e2a7ad; }

.result-summary {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  margin-top: 14px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--sub);
}
.public-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
}
.pager-pages { display: flex; gap: 4px; }
.pager-page, .pager-move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 指で押す場所は44px以上を確保する */
  min-width: 44px;
  min-height: 44px;
  padding: 5px 9px;
  color: var(--accent2);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
}
.pager-page.is-current { color: #fff; background: var(--accent2); border-color: var(--accent2); }
.pager-page:hover, .pager-move:hover { border-color: var(--accent2); }

/* ---------- 業者向け販売在庫 ---------- */
.inventory-page { max-width: 1180px; }
.inventory-kind-tabs {
  display: flex;
  gap: 0;
  width: fit-content;
  margin-top: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.inventory-kind-tab {
  min-width: 150px;
  padding: 8px 12px;
  color: var(--sub);
  font-size: .86rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  border-right: 1px solid var(--line-strong);
}
.inventory-kind-tab:last-child { border-right: 0; }
.inventory-kind-tab.is-active { color: #fff; background: var(--accent2); }
.inventory-controls { margin-top: 6px; }
.inventory-info {
  margin-top: 11px;
  padding: 9px 11px;
  color: #654d18;
  background: #fff8e5;
  border: 1px solid #ecd9a2;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 650;
}
.inventory-result-summary { margin-top: 12px; }
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 9px;
  margin-top: 8px;
}
/* PSAは画像が無く商品名が長いので、1枚を横に広く取って名前を折り返さずに読ませる */
.inventory-grid.is-psa { grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); }
.inventory-grid.is-psa .inventory-name { min-height: 0; }
.inventory-grid.is-psa .inventory-card-body { padding: 11px 12px; }
.inventory-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
.inventory-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 8px;
  overflow: hidden;
  background: #f5f7fa;
  border-bottom: 1px solid var(--line);
}
.inventory-image img { width: 100%; height: 100%; object-fit: contain; }
.inventory-no-image { color: #8793a5; font-size: .82rem; font-weight: 700; }
.inventory-card-body { display: flex; flex: 1 1 auto; flex-direction: column; padding: 9px; }
.inventory-category {
  margin: 0 0 4px;
  color: var(--sub);
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.4;
}
.inventory-name {
  margin: 0;
  min-height: 2.8em;
  overflow-wrap: anywhere;
  font-size: .93rem;
  font-weight: 800;
  line-height: 1.4;
}
.inventory-note {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--sub);
  font-size: .82rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.inventory-price-row { min-height: 2.3rem; margin-top: auto; padding-top: 8px; }
.inventory-price-row .price { font-size: 1.16rem; }
.inventory-stock { margin: 4px 0 0; font-size: .82rem; font-weight: 800; }
.stock-label-ok,
.stock-label-in_stock { color: #15734a; }
.stock-label-low { color: #a55209; }
.stock-label-soldout { color: #697487; }
/* 在庫数は掲載しない。在庫切れは「お取り寄せ」の案内だけを出す */
.stock-label-order { color: #164a7b; font-weight: 700; }
.inventory-add-row {
  display: grid;
  grid-template-columns: minmax(74px, .65fr) minmax(112px, 1fr);
  gap: 5px;
  margin-top: 8px;
}
.inventory-add-row label { display: block; min-width: 0; color: var(--sub); font-size: .82rem; font-weight: 750; }
.inventory-add-row label span { display: block; margin-bottom: 2px; }
.inventory-add-row input {
  width: 100%;
  min-height: 39px;
  padding: 5px 6px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.inventory-add-btn { align-self: end; min-height: 39px; padding: 5px 7px; font-size: .82rem; }
.inventory-empty { margin-top: 8px; }
.inventory-empty a { color: var(--accent2); font-weight: 750; }

.inventory-cart {
  position: sticky;
  bottom: 10px;
  z-index: 25;
  margin-top: 14px;
  padding: 9px 11px;
  color: #fff;
  background: var(--navy);
  border: 1px solid #31405f;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(18, 28, 56, .25);
}
.inventory-cart[hidden], .inventory-cart-detail[hidden] { display: none; }
.inventory-cart-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inventory-cart-open { flex: 0 0 auto; min-height: 40px; padding: 6px 10px; font-size: .82rem; }
.inventory-cart-detail { margin-top: 8px; padding-top: 8px; border-top: 1px solid #43506c; }
.inventory-cart-lines { color: var(--ink); background: #fff; border-radius: 7px; }
.inventory-cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  font-size: .82rem;
}
.inventory-cart-line:last-child { border-bottom: 0; }
.inventory-cart-remove {
  flex: 0 0 auto;
  padding: 4px 6px;
  color: #8e2936;
  background: #fff2f4;
  border: 1px solid #edc7ce;
  border-radius: 6px;
  font: inherit;
  font-size: .82rem;
  font-weight: 750;
  cursor: pointer;
}
.inventory-order-form { margin-top: 8px; }
.inventory-order-note { display: block; font-size: .82rem; font-weight: 750; }
.inventory-order-note input {
  width: 100%;
  margin-top: 4px;
  padding: 8px 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #65718c;
  border-radius: 7px;
  font: inherit;
}
.inventory-order-destination { margin: 7px 0; font-size: .82rem; line-height: 1.65; }
.inventory-order-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.inventory-order-actions .btn { min-height: 42px; padding: 7px 11px; font-size: .82rem; }
.btn-muted { color: #fff; background: transparent; border-color: #8490aa; }
.btn-muted:hover { background: #263450; border-color: #a7b2c8; }
.inventory-footer { margin-top: 19px; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, label:focus-visible {
  outline: 3px solid #f0ad36;
  outline-offset: 2px;
}

/* ---------- スマホ ---------- */
@media (max-width: 640px) {
  .site-title { font-size: 1.05rem; line-height: 1.3; }
  .site-header { padding: 8px 0 7px; }

  /* 検索欄は縦積みにして、指で押しやすい大きさにする。
     flex-basis は縦積みだと「高さ」になってしまうため、ここで打ち消す */
  .search-row { flex-direction: column; }
  .search-row input[type="search"], .search-row select,
  .search-row .btn, .search-row .search-field {
    flex: 0 0 auto;
    width: 100%;
  }
  .to-top { z-index: 40; }

  /* トップページ。押す場所は画面の幅いっぱいにして、指で外さないようにする */
  .menu-search-row { flex-direction: column; }
  .menu-search input[type="search"] { width: 100%; }
  .menu-search .btn { width: 100%; min-height: 46px; }
  .menu-all-link { width: 100%; justify-content: center; }
  /* ページの切り替えは2つずつ並べる（1つが細くなりすぎないように） */
  .page-nav-link { flex: 1 1 42%; max-width: none; padding: 4px 6px; }

  /* スマホでは表をやめて、1商品ずつのカードにする（横スクロールを起こさないため）。
     買取のページの価格表だけに効かせる。販売在庫の注文内容の表など、
     見出しの意味が違う表まで「買取価格」に置き換わってしまわないようにするため */
  .buy-page thead { display: none; }
  .buy-page tbody tr { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .buy-page tbody tr:last-child { border-bottom: 0; }
  .buy-page tbody td { display: block; padding: 0; border: 0; }
  .buy-page tbody td.cat { margin-top: 5px; }
  .buy-page tbody td.cond { margin-top: 5px; }
  .buy-page tbody td.num {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed var(--line);
    text-align: left;
  }
  .buy-page tbody td.num::before {
    content: "買取価格";
    font-size: .82rem;
    font-weight: 600;
    color: var(--sub);
  }

  /* 機種の見出しは、カードの上に付く帯にする */
  .unit-head-row { padding: 0; }
  .unit-head-cell { display: block; }
  .unit-head-row td.num {
    margin: 0;
    padding: 0 12px 9px;
    border-top: 0;
  }
  .unit-head-row td.num::before { content: none; }
  .unit-toggle { padding: 9px 12px 5px; }
  .unit .unit-state td:first-child,
  .unit.is-grouped .unit-state td:first-child { padding-left: 0; }
  .unit.is-grouped .unit-state { padding-left: 20px; }
  .col-copy { width: auto; margin-top: 8px; }
  .copy-pair { width: 100%; }
  .copy-mini { flex: 1 1 auto; }
  .unit-head-row td.col-copy { display: none; }
}

/* ---------- パスワード入力・公開停止 ---------- */
.center-card {
  max-width: 380px;
  margin: 12vh auto;
  padding: 23px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.center-card h1 { margin: 0 0 5px; font-size: var(--fs-2xl); font-weight: 800; }
.center-card p { margin: 0 0 14px; font-size: .93rem; color: var(--sub); }
.center-card input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  font-size: .98rem;
  font-family: inherit;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  margin-bottom: 9px;
}
.center-card .btn { width: 100%; }
.form-error {
  margin: 0 0 9px;
  padding: 9px 11px;
  font-size: .86rem;
  font-weight: 600;
  color: #8f252b;
  background: #fff0f2;
  border: 1px solid #f2c6c9;
  border-radius: var(--radius-lg);
}

@media screen and (max-width: 640px) {
  /* スマホでは2列。指で押せる高さを確保する */
  .page-nav { gap: 3px; width: 100%; margin-top: 6px; }
  .page-nav-link {
    flex: 1 1 calc(50% - 5px);
    min-height: 38px;
    max-width: none;
    padding: 3px 6px;
  }
  .page-nav-label { font-size: .82rem; line-height: 1.2; }
  .state-picker { margin-right: -12px; margin-left: -12px; padding: 8px 12px 7px; }
  .state-quick { margin-right: -12px; padding-right: 12px; }
  .state-quick-link { min-height: 40px; padding: 5px 10px; }
  .model-picked-row { flex-wrap: wrap; padding: 7px 10px; }
  .model-picked-actions { width: 100%; margin-left: 0; }
  .model-picked-actions .copy-pair { width: 100%; }
  [id] { scroll-margin-top: 12px; }

  .public-pager { flex-wrap: wrap; gap: 6px; }
  .pager-pages { order: 3; width: 100%; justify-content: center; }
  .pager-move { min-width: 92px; }

  .inventory-page { padding-bottom: 78px; }
  .inventory-kind-tabs { width: 100%; margin-top: 11px; }
  .inventory-kind-tab { flex: 1 1 50%; min-width: 0; padding: 7px 6px; font-size: .82rem; }
  .inventory-filter-bar { margin-top: 8px; }
  .inventory-controls { margin-top: 0; }
  .inventory-grid { grid-template-columns: 1fr; gap: 8px; }
  .inventory-card { display: grid; grid-template-columns: minmax(112px, 36%) 1fr; }
  /* PSAは画像が無い。画像用の1列目を空けたままだと中身が右へ寄るので、
     狭い画面では1列にして左端から並べる（横幅の指定も解除する） */
  .inventory-grid.is-psa { grid-template-columns: 1fr; }
  .inventory-grid.is-psa .inventory-card { grid-template-columns: 1fr; }
  /* カードの高さは商品名や備考の長さで変わる。画像枠を高さいっぱいに伸ばすと
     商品ごとに画像の大きさが変わってしまうので、正方形に固定して上にそろえる */
  .inventory-image {
    align-self: start;
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    padding: 6px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-bottom-right-radius: 8px;
  }
  .inventory-card-body { min-width: 0; padding: 8px; }
  .inventory-name { min-height: 0; font-size: .86rem; }
  .inventory-price-row { min-height: 0; padding-top: 5px; }
  .inventory-price-row .price { font-size: .98rem; }
  .inventory-add-row { grid-template-columns: 68px minmax(0, 1fr); }
  .inventory-add-btn { font-size: .82rem; }
  .inventory-cart { bottom: 6px; margin-right: -6px; margin-left: -6px; padding: 8px; }
  .inventory-cart-head b { font-size: .82rem; }
  .inventory-cart-line { align-items: flex-start; }
  .inventory-order-actions .btn { flex: 1 1 150px; }
}

@media (max-width: 359px) {
  .inventory-card { grid-template-columns: 1fr; }
  .inventory-image {
    align-self: stretch;
    aspect-ratio: 4 / 3;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-bottom-right-radius: 0;
  }
  .inventory-add-row { grid-template-columns: 78px minmax(0, 1fr); }
}

/* ---------- 買取・販売の画面分離 ---------- */
.buy-page {
  --accent: #08785a;
  --accent2: #056248;
  --accent-soft: #e7f5f0;
}
.sale-page {
  --accent: #2369a8;
  --accent2: #164f82;
  --accent-soft: #e9f2fa;
}
.buy-page .site-header { background: #0b5c46; border-bottom: 5px solid #e3b341; }
.sale-page .site-header { background: #164a7b; border-bottom: 5px solid #dd6b3d; }
/* 検索欄は画面に貼り付けない。貼り付けると、表の見出し（商品名・買取価格）を
   上に残す指定とぶつかって重なってしまう。上に戻る「↑」で検索欄まで戻れる */
.catalog-search {
  margin: 0 -4px;
  padding: 11px 4px 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
/* テンプレート側は category-menu-bar を使っている。
   どちらの名前でも同じ見た目になるようにしておく（以前は当たっていなかった） */
.catalog-menu-bar, .category-menu-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 72px;
  z-index: 27;
  min-height: 46px;
  margin-bottom: 9px;
  padding: 5px 7px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.category-menu-button {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: #fff;
  background: var(--accent);
  border-radius: 5px;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}
.category-menu-bar span {
  min-width: 0;
  overflow: hidden;
  color: var(--sub);
  font-size: .82rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.catalog-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.category-side-menu {
  position: sticky;
  top: 126px;
  max-height: calc(100vh - 142px);
  overflow-y: auto;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}
.category-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 3px 7px;
  border-bottom: 1px solid var(--line);
}
.category-side-head label {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--sub);
  background: var(--bg);
  border-radius: 4px;
  cursor: pointer;
}
.category-menu-list { display: grid; gap: 3px; margin-top: 6px; }
.category-menu-list a {
  min-width: 0;
  padding: 5px 7px;
  overflow-wrap: anywhere;
  color: var(--ink);
  border-left: 3px solid transparent;
  border-radius: 3px;
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.45;
  text-decoration: none;
}
.category-menu-list a:hover { color: var(--accent2); background: var(--accent-soft); }
.category-menu-list a.is-active {
  color: var(--accent2);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 800;
}
.category-menu-label {
  margin: 10px 3px 2px;
  color: var(--sub);
  font-size: .82rem;
  font-weight: 800;
}
.category-menu-sub { margin-top: 2px; }
.category-menu-toggle:not(:checked) ~ .catalog-layout {
  grid-template-columns: minmax(0, 1fr);
}
.category-menu-toggle:not(:checked) ~ .catalog-layout .category-side-menu { display: none; }
.category-menu-backdrop { display: none; }
.catalog-main { min-width: 0; }

/* ---------- 買取金額の保証（専用ページ /guarantee のカード） ----------
   写真がある保証は、通販サイトの商品一覧のように写真をカード上いっぱいに出す。
   写真が無い保証は、これまでどおり横いっぱいの一覧行のまま出す（無理に写真枠を作らない）。
   カートに入れる操作は用意しない。この保証は買取価格表の目印であって、購入するものではないため。 */
.guarantee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}
/* 写真なしのカードは一覧行のまま、常に横いっぱいに広げる */
.guarantee-card {
  grid-column: 1 / -1;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--used);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  line-height: 1.5;
}
/* 1行目は「内容」と「金額」だけ。カードが狭いので視線を動かさずに読める */
.g-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.g-label { min-width: 0; font-size: .93rem; font-weight: 800; overflow-wrap: anywhere; }
.g-amount {
  display: flex;
  flex-shrink: 0;
  align-items: baseline;
  gap: 2px;
  color: var(--price);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.g-amount b { font-size: var(--fs-lg); font-weight: 800; }
.g-amount small { color: var(--sub); font-size: .82rem; font-weight: 700; }
/* 2行目はジャンル・カテゴリ・補足。小さくして金額の読み取りを邪魔しない */
.g-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 5px;
  margin-top: 4px;
}
.g-tag {
  padding: 1px 5px;
  color: var(--accent2);
  font-size: .82rem;
  font-weight: 700;
  background: var(--accent-soft);
  border-radius: 999px;
}
.g-note { min-width: 0; color: var(--sub); font-size: .82rem; }

/* 保証ごとの商品写真がある場合は、写真をカード上いっぱいに出す商品カードの見た目にする */
.guarantee-card.has-photo {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
}
.g-photo-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--accent-soft);
}
.g-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.g-ribbon {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  color: #fff;
  background: var(--used);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
}
.guarantee-card.has-photo .g-body { padding: 8px 10px 10px; }
.guarantee-card.has-photo .g-main { display: block; }
.guarantee-card.has-photo .g-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.6em;
  font-size: .88rem;
}
.guarantee-card.has-photo .g-amount { margin-top: 3px; }

.menu-block-head.is-guarantee { border-bottom-color: var(--used); }
.menu-block-head.is-guarantee h2 { color: #a4650f; }
.menu-block-note { color: var(--sub); font-size: .82rem; font-weight: 600; }

/* トップに置く保証の入口タイル。ジャンルのタイルと同じ見た目で、
   画像を押すとそのカテゴリの保証ページ（/guarantee?genre=…）へ移る */
.guarantee-tiles { align-items: start; }
.guarantee-tile:hover { border-color: var(--used); }

/* 専用ページのカテゴリごとの枠と、いちばん下の注意書き */
.guarantee-group { margin-top: 22px; }
.guarantee-footnote {
  margin: 22px 0 0;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--sub);
  font-size: .86rem;
  line-height: 1.65;
}
.guarantee-more { margin-top: 6px; }
.guarantee-more > summary {
  display: flex;
  align-items: center;
  /* 指で押す場所は44px以上を確保する */
  min-height: 44px;
  color: var(--accent2);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}
.guarantee-more > summary::-webkit-details-marker { display: none; }
.guarantee-more > summary::before { content: "▸ "; }
.guarantee-more[open] > summary::before { content: "▾ "; }

/* カテゴリ（ブランドなど）が複数あるジャンルは、カテゴリ単位でさらに開閉できる。
   ブランド品のように件数が多いジャンルでも、目当てのブランドだけ開けば読める */
.guarantee-brand-list { display: flex; flex-direction: column; gap: 6px; }
.guarantee-brand {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.guarantee-brand > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  font-size: .86rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.guarantee-brand > summary::-webkit-details-marker { display: none; }
.guarantee-brand > summary::marker { content: ""; }
.guarantee-brand > summary span { flex: 1; min-width: 0; }
.guarantee-brand > summary small { color: var(--sub); font-weight: 700; font-size: .82rem; }
/* 閉じたままでも中身の見当がつくよう、写真付きの保証の1枚目を見出しに小さく出す */
.g-brand-thumb {
  flex: none;
  width: 34px;
  height: 34px;
  margin: 5px 0;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.guarantee-brand .guarantee-grid { padding: 0 9px 9px; margin-top: 0; }

/* ---------- 大分類のタブ（常に見えるボタン。開かないと選べない作りにしない） ---------- */
/* 札が画面に収まりきらないと、横へ動かせることに気づけない。
   はみ出しているときだけ、右端にぼかしと「▶」を出して続きがあることを知らせる。
   （印を付けるのは public.js。JavaScript が止まっていても札はそのまま横へ動かせる） */
.tab-strip { position: relative; }
.tab-strip.has-more::after {
  content: "▶";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 36px;
  padding-left: 11px;
  background: linear-gradient(to right, rgba(246, 248, 251, 0), var(--bg) 45%);
  color: var(--sub);
  font-size: .82rem;
  font-weight: 700;
  pointer-events: none;
}
.genre-tabs {
  display: flex;
  gap: 5px;
  margin-top: 8px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.genre-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  /* 指で押す場所は44px以上を確保する */
  min-height: 44px;
  padding: 7px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.genre-tab:hover { border-color: var(--accent); color: var(--accent2); }
.genre-tab.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.genre-tabs.is-sub .genre-tab {
  padding: 5px 10px;
  font-size: .82rem;
  border-radius: var(--radius);
}
.genre-tabs.is-sub .genre-tab.is-active { background: var(--accent2); border-color: var(--accent2); }
.search-hint, .menu-search-hint {
  margin: 5px 2px 0;
  color: var(--sub);
  font-size: .82rem;
  white-space: nowrap;
}

/* ---------- 買取メニュー（最初に開くページ） ---------- */
.menu-lead { margin: 12px 0 0; font-size: .93rem; font-weight: 600; }
.menu-search { margin-top: 11px; }
.menu-search-row { display: flex; gap: 6px; }
.menu-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: .93rem;
}
.menu-search input:focus { outline: 2px solid #bfdbfe; border-color: var(--accent); }
.menu-search .btn { flex: 0 0 auto; padding: 0 17px; }

/* 検索欄のすぐ下に置く「すべての商品を見る」 */
.menu-all-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  color: var(--accent2);
  font-size: .93rem;
  font-weight: 800;
  text-decoration: none;
}
.menu-all-link:hover { text-decoration: underline; }

/* おすすめ・人気の商品（ふだんは閉じておく枠） */
.menu-more {
  margin-top: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
}
.menu-more > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  font-size: .98rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.menu-more > summary::-webkit-details-marker { display: none; }
.menu-more > summary::after { content: "＋"; margin-left: auto; font-size: var(--fs-xl); }
.menu-more[open] > summary::after { content: "－"; }
.menu-more[open] { padding: 0 12px 14px; }
.menu-more[open] > summary { margin: 0 -12px; border-bottom: 1px solid var(--line); }
.menu-more .menu-block:first-of-type { margin-top: 14px; }
.menu-more.menu-secondary { margin-top: 10px; }
.menu-more.menu-secondary > summary { min-height: 42px; font-size: .86rem; }
.fav-tools { display: flex; justify-content: flex-end; margin-top: 8px; }

.menu-block { margin-top: 20px; }
.menu-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--line-strong);
}
.menu-block-head h2 { margin: 0; font-size: var(--fs-xl); font-weight: 800; }
.menu-block-head a { color: var(--accent2); font-size: .82rem; font-weight: 700; text-decoration: none; }
.menu-block-head a:hover { text-decoration: underline; }
.menu-block-head.is-boost { border-bottom-color: #e0623c; }
.menu-block-head.is-boost h2 { color: #c04222; }
.menu-block-head.is-top { border-bottom-color: #c8324a; }
.menu-block-head.is-top h2 { color: var(--price); }
.menu-block-head.is-trend { border-bottom-color: var(--accent); }

/* 強化中の商品カード */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 9px;
}
.pick-card {
  position: relative;
  display: block;
  padding: 11px 11px 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.pick-card:hover { border-color: var(--accent); }
.pick-ribbon {
  position: absolute;
  top: -9px;
  left: 12px;
  padding: 2px 7px;
  color: #fff;
  background: #e0623c;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
}
.pick-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 3em;
  font-size: .93rem;
  font-weight: 700;
  line-height: 1.5;
}
.pick-meta { display: flex; gap: 4px; align-items: center; margin-top: 5px; flex-wrap: wrap; }
.pick-price {
  display: block;
  margin-top: 5px;
  color: var(--price);
  font-size: var(--fs-price-sm);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.pick-note { display: block; margin-top: 3px; color: var(--sub); font-size: .82rem; }

/* 高額買取・ジャンル別の並び */
.rank-list { display: grid; margin: 8px 0 0; padding: 0; list-style: none; }
.rank-list li { display: flex; min-height: 64px; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list a {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}
.rank-list a:hover { background: var(--accent-soft); }
.rank-no {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 800;
}
.rank-list li:first-child .rank-no { background: #c9992b; }
.rank-name { font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.rank-name small { display: block; color: var(--sub); font-size: .82rem; font-weight: 600; }
.rank-price {
  color: var(--price);
  font-size: var(--fs-lg);
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 9px;
  margin-top: 9px;
}
.trend-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.trend-card .rank-list { flex: 1 1 auto; grid-auto-rows: 1fr; }
.trend-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
}
.trend-card-head h3 { margin: 0; font-size: .93rem; font-weight: 800; }
.trend-card-head a { color: var(--accent2); font-size: .82rem; font-weight: 700; text-decoration: none; }

.genre-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  margin-top: 9px;
}
.genre-tile {
  display: block;
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  text-decoration: none;
}
.genre-tile:hover { border-color: var(--accent); color: var(--accent2); }
.genre-tile-text { display: block; padding: 8px 11px; }
.genre-tile b { display: block; font-size: .93rem; font-weight: 800; }
.genre-tile small { display: block; margin-top: 2px; color: var(--sub); font-size: .82rem; }
/* ジャンルの写真。縦横比を固定して、写真の大きさが違っても並びが崩れないようにする */
.genre-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
}
.genre-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 買取の流れ・送付先 ----------
   番号の丸と見出しの縦位置をそろえ、説明文は見出しと同じ位置から始める。
   1行が長くなりすぎて読みにくくならないよう、枠の幅は抑える */
.flow-steps {
  counter-reset: flow;
  max-width: 720px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}
.flow-steps li {
  position: relative;
  padding: 12px 14px 12px 50px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.flow-steps li + li { margin-top: 8px; }
.flow-steps li::before {
  counter-increment: flow;
  content: counter(flow);
  position: absolute;
  top: 12px;
  left: 13px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-size: .86rem;
  font-weight: 800;
}
.flow-steps li b { display: block; font-size: .98rem; font-weight: 800; line-height: 1.5; }
.flow-steps li span {
  display: block;
  margin-top: 3px;
  color: var(--sub);
  font-size: .86rem;
  line-height: 1.65;
}
.flow-steps.is-compact li { padding-top: 8px; padding-bottom: 8px; }

.ship-box {
  margin-top: 9px;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.ship-label { display: block; color: var(--sub); font-size: .82rem; font-weight: 800; }
.ship-address {
  margin: 3px 0 0;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: pre-line;
}
.ship-note { margin: 8px 0 0; font-size: .86rem; line-height: 1.65; white-space: pre-line; }

/* ---------- 検索の見出しと、検索結果のまとめ ----------
   条件は画面のあちこちに出さず、検索結果のすぐ上1か所だけに出す。 */
.search-label {
  display: block;
  margin: 0 2px 5px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--sub);
}
.btn-filter {
  flex: 0 0 auto;
  color: var(--accent2);
  background: var(--panel);
  border-color: var(--line-strong);
}
.btn-filter:hover { color: #fff; background: var(--accent2); border-color: var(--accent2); }

.result-head {
  margin: 12px 0 6px;
  padding: 9px 11px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
}
.result-count { margin: 0; font-size: .93rem; font-weight: 700; line-height: 1.55; }
.result-count b { font-weight: 800; }
.result-number { font-size: var(--fs-lg); color: var(--accent2); }
.result-page { font-size: .82rem; font-weight: 700; color: var(--sub); }
.result-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

/* ---------- 機種ごとのまとまり ----------
   同じ機種の状態違いは1行にたたんでおき、押したときだけ状態別の金額を開く。
   JavaScript が動かない端末では、たたまずに全部そのまま見える */
.has-js .unit.is-grouped:not(.is-open) .unit-state { display: none; }
.unit.is-grouped + .unit { border-top: 1px solid var(--line); }
.unit-head-cell { padding: 0 !important; }
.unit-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  /* 指で押す場所は44px以上を確保する */
  min-height: 48px;
  padding: 9px 12px;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.unit-toggle:hover { background: var(--accent-soft); }
.unit-caret { flex: 0 0 auto; color: var(--sub); font-size: .82rem; }
.unit.is-open .unit-caret { transform: rotate(90deg); }
.unit-headline { min-width: 0; }
.unit-name { display: block; font-size: .98rem; font-weight: 800; overflow-wrap: anywhere; }
.unit-sub { display: block; font-size: .82rem; font-weight: 700; color: var(--sub); }
.unit-marks { display: block; }
.unit.is-grouped .unit-head-row { background: #f2f6fc; }
.unit.is-grouped .unit-state td:first-child { padding-left: 31px; }
/* たたんだ機種の中身は1行おきの色分けをしない（開いたとき縞がずれて見えるため） */
.unit tr:nth-child(even) { background: none; }
.unit .unit-state:nth-of-type(even) { background: #f7fafd; }
.lazy-state-status[hidden] { display: none !important; }
.lazy-state-status td {
  padding: 13px !important;
  color: var(--sub);
  background: var(--panel);
  font-size: .86rem;
  font-weight: 700;
  text-align: center;
}

/* ---------- コピーのボタンと、押したことを知らせる帯 ---------- */
.col-copy { width: 116px; }
.copy-pair { display: inline-flex; gap: 5px; }
.copy-mini {
  min-width: 48px;
  min-height: 44px;
  padding: 4px 8px;
  color: var(--accent2);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}
.copy-mini:hover { color: #fff; background: var(--accent2); border-color: var(--accent2); }
.copy-mini.is-done { color: #fff; background: var(--new); border-color: var(--new); }

/* ---------- お気に入りの☆ ---------- */
.fav-mini {
  min-width: 44px;
  min-height: 44px;
  padding: 4px 6px;
  color: var(--sub);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  font-size: .98rem;
  line-height: 1;
  cursor: pointer;
}
.fav-mini:hover { border-color: var(--accent2); }
.fav-mini.is-on { color: #b8860b; border-color: #b8860b; background: #fffaeb; }
/* 前に見たときから金額が変わった印。色だけに頼らず文字でも伝える */
.fav-changed {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 6px;
  background: #fff3d6;
  color: #7a4b00;
  border: 1px solid #d8a13a;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

/* ---------- トップの「お気に入り・最近見たもの」 ---------- */
.fav-group + .fav-group { margin-top: 11px; }
.fav-group-head {
  margin: 0 0 5px;
  font-size: .86rem;
  font-weight: 800;
  color: var(--sub);
}
.fav-list { margin: 0; padding: 0; list-style: none; }
.fav-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  min-height: 44px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
}
.fav-row:last-child { border-bottom: 0; }
.fav-name { flex: 1 1 auto; font-weight: 700; color: var(--ink); text-decoration: none; }
.fav-name:hover { text-decoration: underline; }
.fav-state {
  padding: 2px 6px;
  background: var(--soft);
  border-radius: 999px;
  font-size: .82rem;
  color: var(--sub);
}
.fav-price { font-weight: 800; color: var(--price); }
.fav-remove {
  min-width: 44px;
  min-height: 44px;
  color: var(--sub);
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}
.fav-clear {
  padding: 6px 9px;
  min-height: 44px;
  color: var(--sub);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}
.fav-note { margin: 8px 0 0; font-size: .82rem; color: var(--sub); }

/* ---------- 取引先の専用URLで開いたときの名前 ---------- */
.buyer-line {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 5px 0 0;
  font-size: .86rem;
  font-weight: 700;
}
.buyer-mark {
  padding: 2px 6px;
  background: rgba(255, 255, 255, .18);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
}

.copy-toast {
  position: fixed;
  right: 16px;
  bottom: 20px;
  left: 16px;
  z-index: 90;
  margin: 0 auto;
  max-width: 420px;
  padding: 10px 12px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: .86rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 12px 30px rgba(15, 24, 38, .3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.copy-toast.is-shown { opacity: 1; visibility: visible; transform: none; }
.copy-toast.is-failed { background: #8f252b; }

/* ---------- 下から開く絞り込みパネル ----------
   スマホでは片手で届く下側から出す。開け閉めにJavaScriptは使わない */
.sheet-toggle:not(:checked) ~ .filter-sheet { display: none; }
.sheet-toggle:not(:checked) ~ .sheet-backdrop { display: none; }
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 24, 38, .45);
}
.filter-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 85;
  max-height: 86vh;
  overflow-y: auto;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--panel);
  border-top: 1px solid var(--line-strong);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -14px 34px rgba(15, 24, 38, .22);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 8px;
}
.sheet-head b { font-size: .98rem; font-weight: 800; }
.sheet-close {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: .86rem;
  font-weight: 800;
  color: var(--sub);
  cursor: pointer;
}
.sheet-note {
  grid-column: 1 / -1;
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: .82rem;
  color: var(--sub);
  background: var(--panel-alt, #f4f6f8);
  border-radius: 8px;
}
.sheet-note b { color: var(--ink); }
.sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}
.sheet-field { display: block; min-width: 0; }
.sheet-field > span {
  display: block;
  margin-bottom: 3px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--sub);
}
.sheet-field select {
  width: 100%;
  min-height: 46px;
  padding: 8px 9px;
  font: inherit;
  font-size: .86rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
.sheet-actions {
  display: flex;
  gap: 6px;
  margin-top: 11px;
}
.sheet-actions .btn { flex: 1 1 auto; min-height: 46px; }
.btn-muted-line {
  color: var(--sub);
  background: var(--panel);
  border-color: var(--line-strong);
}
.btn-muted-line:hover { color: var(--ink); background: var(--bg); border-color: var(--ink); }

/* ---------- 何も出なかったとき ---------- */
.empty-help { padding: 20px 16px; text-align: left; }
.empty-lead { margin: 0 0 8px; font-size: .98rem; font-weight: 800; }
.empty-steps { margin: 0; padding-left: 1.2em; font-size: .86rem; line-height: 1.9; }
.empty-steps a { color: var(--accent2); font-weight: 700; }

@media (min-width: 1100px) {
  .buy-page .wrap, .sale-page .wrap { max-width: 1320px; }
}

@media (max-width: 760px) {
  .catalog-search { position: static; margin: 0; padding-top: 9px; }
  .catalog-menu-bar, .category-menu-bar {
    top: 0;
    margin: 0 -12px 8px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
  .catalog-layout, .category-menu-toggle:not(:checked) ~ .catalog-layout {
    display: block;
  }
  .category-side-menu {
    display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    width: min(86vw, 330px);
    max-height: none;
    padding: 11px;
    border: 0;
    border-right: 1px solid var(--line-strong);
    border-radius: 0;
    box-shadow: 12px 0 30px rgba(20, 30, 50, .2);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .category-menu-toggle:not(:checked) ~ .catalog-layout .category-side-menu { display: block; }
  .category-menu-toggle:checked ~ .catalog-layout .category-side-menu { transform: translateX(0); }
  .category-menu-toggle:checked ~ .category-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(15, 24, 38, .45);
  }
  .category-menu-list a { min-height: 42px; padding: 8px; }
  .guarantee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .guarantee-card { padding: 8px 10px; }
  .menu-block-head.is-guarantee { flex-wrap: wrap; gap: 0 6px; }
  .g-label { font-size: .86rem; }
  .g-amount b { font-size: .98rem; }
  .guarantee-card.has-photo .g-label { font-size: .82rem; min-height: 2.4em; }
  .guarantee-group { margin-top: 17px; }
  /* タブは横スクロールで全部たどれる。指ではじいて選べる幅にする */
  .genre-tabs { margin-right: -12px; margin-left: -12px; padding: 0 12px 5px; }
  .genre-tab { padding: 8px 12px; }
  .pick-grid { grid-template-columns: 1fr; }
  .trend-grid { grid-template-columns: 1fr; }
  .genre-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* スマホは枠と枠の間を少し詰めて、スクロールの量を減らす */
  .menu-block { margin-top: 16px; }
  .menu-block-head h2 { font-size: var(--fs-lg); }
  .genre-tile-text { padding: 7px 9px; }
  .flow-steps li { padding: 10px 12px 10px 44px; border-radius: var(--radius); }
  .flow-steps li::before { top: 10px; left: 10px; width: 24px; height: 24px; font-size: .82rem; }
  .flow-steps li b { font-size: .93rem; }
  .flow-steps li span { font-size: .82rem; }
  .ship-address { font-size: .93rem; }
  /* 機種の一覧は、見出しの補足を1行に抑えて縦の長さを詰める */
  .model-head { padding: 10px 11px; }
  .model-head-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* ---- スマホ全体のコンパクト化 ----
     文字の目盛りを一段小さくし、余白も詰めて1画面に入る量を増やす。
     いちばん小さい注記（--fs-2xs/--fs-xs）はこれ以上小さくしない */
  :root {
    --fs-md: .93rem;
    --fs-lg: .98rem;
    --fs-xl: 1.02rem;
    --fs-2xl: 1.1rem;
    --fs-title: 1.2rem;
    --fs-price: 1.08rem;
    --fs-price-sm: 1rem;
  }
  .wrap { padding: 0 10px 40px; }
  .site-header { padding: 8px 0 7px; }
  .site-lead { margin-top: 3px; }
  .site-meta { margin-top: 2px; gap: 1px 7px; }
  .notice { margin-top: 8px; padding: 7px 10px; }
  .update-warning { margin-top: 7px; }
  /* 表の代わりに出す商品カードの余白も詰める */
  .buy-page tbody tr { padding: 8px 10px; }
  .badge { padding: 3px 8px; }
  .item-note { margin-top: 2px; }
  .menu-block { margin-top: 12px; }
  .menu-block-head { margin-bottom: 6px; }
  .guarantee-group { margin-top: 13px; }
  .guarantee-footnote { margin-top: 13px; padding: 8px 10px; }
  /* ジャンルの写真は少し平たくして、タイル全体の高さを抑える */
  .genre-thumb { aspect-ratio: 2 / 1; }
  .genre-tile b { font-size: .86rem; }
  .site-footer { margin-top: 20px; }
  .empty { margin-top: 14px; padding: 22px 12px; }
}

/* ---------- 紙に印刷するとき ----------
   価格表を印刷して使う業者さん向け。検索欄やボタンなど、
   紙の上では使えないものを消して、商品名と金額だけを残す。 */
@media print {
  body { background: #fff; font-size: 12px; }
  .wrap { max-width: none; padding: 0 6px 0; }
  .site-header {
    padding: 0 0 6px;
    color: #000;
    background: #fff !important;
    border-bottom: 2px solid #000 !important;
  }
  .site-title { font-size: var(--fs-xl); }
  .site-meta { color: #333; }
  /* 紙でも「いつ・どの版か」と注意書きは残す（間違った版で商談しないため） */
  .update-warning { background: #fff !important; border: 1px solid #000; color: #000; }
  .today-changes { border: 1px solid #000; box-shadow: none; break-inside: avoid; }
  .change-tile { border: 1px solid #666; background: #fff !important; color: #000 !important; }
  .change-badge { border: 1px solid #000; background: #fff !important; color: #000 !important; }
  .page-nav,
  .catalog-search,
  .search-hint,
  .menu-search-hint,
  .category-menu-bar,
  .category-side-menu,
  .tab-strip,
  .genre-tabs,
  .active-filter,
  .today-changes-links,
  .menu-more,
  .list-csv,
  .public-pager,
  .model-pager,
  .to-top,
  .copy-btn,
  .copy-pair,
  .col-copy,
  .fav-block,
  .fav-clear,
  .fav-remove,
  .csv-link,
  .copy-toast,
  .filter-sheet,
  .sheet-backdrop,
  .guide { display: none !important; }
  /* 紙では機種をたたまない（開かないと金額が読めない紙になってしまうため） */
  .has-js .unit.is-grouped:not(.is-open) .unit-state { display: table-row; }
  .unit-toggle { padding: 5px 8px; }
  .result-head { border: 1px solid #999; }
  .price-note > summary::before { content: none; }
  .price-note p { display: block !important; }
  .catalog-layout { display: block; }
  .table-card { border-color: #999; box-shadow: none; overflow: visible; }
  thead th { background: #eee; color: #000; }
  tbody tr:nth-child(even) { background: #f4f4f4; }
  .price { color: #000; }
  /* 何百件もある表は何枚にもまたがる。表ごと分けない指定にすると
     入りきらない分が欠けてしまうので、切れて困るのは1行の中だけにする。
     2枚目からも見出しの行（商品名・買取価格）が出るようにしておく */
  thead { display: table-header-group; }
  tbody tr { break-inside: avoid; }
  /* スマホの画面から印刷しても、紙の上では表の形にそろえる */
  tbody tr, tbody td { display: table-cell; }
  tbody tr { display: table-row; padding: 0; }
  tbody td { padding: 5px 8px; border-bottom: 1px solid #ccc; }
  tbody td.num { text-align: right; }
  tbody td.num::before { content: none; }
  a { color: #000; text-decoration: none; }
}

