:root {
  --bg: #e8ecf2; /* 2026-11-14 デザインの見直し（A案）で少し青みのある灰色に */
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1d4ed8;
  --accent-soft: #dbe6ff;
  --star: #f59e0b;
  --star-off: #d1d5db;
  --win: #ecfdf5;
  --win-ink: #047857;
  --warn: #b45309;
  --on-accent: #ffffff; /* 青（accent）の上の文字 */
  --on-warn: #ffffff;
  --bar: #0a1f44; /* ヘッダー: ロゴと同じ紺 */
  --navy: #0a1f44; /* 一覧の順位の帯 */
  --lime: #b8e01c; /* 差し色の黄緑（共有画像と同じ。1〜3位の順位の帯） */
  --lime-ink: #1a2e05; /* 黄緑の上の文字 */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1a;
    --card: #131b2c;
    --ink: #e5e7eb;
    --muted: #9ca3af;
    --line: #233049;
    --accent: #6ea0ff;
    --accent-soft: #1b2a4a;
    --star-off: #3f4651;
    --win: #0f2a22;
    --win-ink: #6ee7b7;
    --warn: #fbbf24;
    /* ダークモードの青・黄は明るいので、上の文字は濃い色にする（白だと読みにくい。2026-11-08） */
    --on-accent: #0f1115;
    --on-warn: #0f1115;
    --bar: #0d1b36;
    --navy: #1e3a6e; /* 順位の帯（カードの色と見分けられる明るさ） */
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  /* 下のタブバー分の余白 */
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
a { color: var(--accent); }
[hidden] { display: none !important; }

/* ---------- 上部（タイトル） ---------- */
.sticky-top { position: sticky; top: 0; z-index: 10; }
/* サンプル（架空のレビュー）を表示中の帯と札 */
.sample-banner { padding: 6px 16px; background: #f59e0b; color: #1f2937; font-size: 13px; font-weight: 700; text-align: center; }
.tag.sample-tag { background: #fef3c7; color: #92400e; border-color: #f59e0b; font-weight: 700; }
/* カテゴリボタン（「評価点に反映する項目」パネルの中） */
.catbar { margin-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
/* ボタンは文字の長さに合わせて並べ、入りきらなければ次の行へ（名前の途中で折り返さない） */
.cat-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.use-desc { display: block; margin-bottom: 6px; }
.use-desc b { color: var(--ink); }
.cat-desc { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.55; }
.cat-btns .cat-btn { flex: 1 1 auto; white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.cat-btn {
  min-height: 44px; padding: 6px 2px; border-radius: 10px; letter-spacing: -0.03em; text-wrap: balance; word-break: auto-phrase;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cat-btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cat-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cat-status {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  font-size: 12px; color: var(--muted); margin-top: 5px;
}
.cat-status .mode {
  font-weight: 700; color: var(--accent); padding: 0 8px; border-radius: 999px;
  border: 1px solid var(--accent);
}
.cat-status .mode.custom { background: var(--warn); border-color: var(--warn); color: var(--on-warn); }
.items-title .mode-name { color: var(--accent); }
.items-title .mode-name.custom { color: var(--warn); }
.topbar {
  background: var(--bar); color: #fff;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
}
.topbar .brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; gap: 8px; }
.brand-icon { width: 32px; height: 32px; flex: none; display: block; }
.brand-text { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; line-height: 1.25; }
.brand-name { height: 20px; width: auto; display: block; margin: 2px 0 3px; } /* サイト名の画像（tools/icons/title_master.png から作る） */
.brand-text { flex-direction: column; align-items: flex-start; }
.brand-text small { font-size: 11px; font-weight: 400; color: #cbd5e1; }

main { max-width: 560px; margin: 0 auto; padding: 16px; }
.loading, .error { color: var(--muted); text-align: center; padding: 32px 0; }

h1 { font-size: 20px; margin: 4px 0 12px; }
h2 { font-size: 16px; margin: 0 0 8px; }
small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  color: inherit;
  text-decoration: none;
}
a.card:active { transform: scale(.99); }
.maker { color: var(--muted); font-size: 13px; }
.name { font-size: 17px; font-weight: 700; margin: 2px 0 6px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 14px; margin: 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.overall { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; }
.score { font-weight: 700; font-variant-numeric: tabular-nums; }
.score.big { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; } /* 詳細の評価点（2026-11-14 一覧と同じく大きく） */
.note { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.note.warn { color: var(--warn); }
.badge {
  display: inline-block; padding: 1px 10px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; font-weight: 700;
}

/* ---------- 一覧 ---------- */
.card.tire { display: grid; grid-template-columns: 2.2em 1fr; gap: 10px; }
.rank {
  font-size: 22px; font-weight: 800; color: var(--accent);
  text-align: center; line-height: 1.2; padding-top: 14px;
  font-variant-numeric: tabular-nums;
}
.card.unrated .rank { color: var(--muted); }
.card.unrated .name, .card.unrated .card-meta { opacity: .75; }
/* レビューが少なく順位を付けない銘柄（参考） */
.card.ref .rank { color: var(--muted); }
.rank .ref-mark { display: block; font-size: 12px; font-weight: 700; line-height: 1.3; }

/* 一覧の並び順 */
/* 並び順: 見出し「並び順」とボタン（3列。5つなので2段になる） */
.sort-box { margin: -4px 0 12px; }
.sort-pick { display: flex; align-items: center; gap: 8px; }
.sort-title { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; width: 5.6em; flex: none; }
.sort-title::before {
  content: ""; width: 16px; height: 16px; background: var(--muted);
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
  /* 上下の矢印（並べ替えの印） */
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4v15M3.5 15.5 7 19l3.5-3.5M17 20V5M13.5 8.5 17 5l3.5 3.5'/%3E%3C/svg%3E");
}
.meta dd.sorted { font-weight: 700; color: var(--accent); }
/* 一覧のカードの下の小さい行（サイズ・購入価格・レビュー数） */
.card-meta { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.card-meta .sorted { font-weight: 700; color: var(--accent); }
.card-meta .sep { margin: 0 2px; }
/* 並び順「項目別」: 項目を選ぶ欄と、カードの選んだ項目の点 */
.sort-item-pick { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sort-item-pick label { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; width: 5.6em; flex: none; }
.sort-pick select, .sort-item-pick select { flex: 1; min-width: 0; min-height: 44px; font: inherit; font-size: 16px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.sort-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; color: var(--accent); margin: 6px 0 2px; }
.sort-item b { font-size: 18px; color: var(--ink); }
.sort-item small { width: 100%; font-size: 12px; font-weight: 400; color: var(--muted); }
.sort-item.off span { font-weight: 400; color: var(--muted); }

/* ---------- 星（小数は部分的に塗る） ---------- */
.stars {
  position: relative; display: inline-block;
  font-size: 18px; line-height: 1; letter-spacing: 2px;
  color: var(--star-off); white-space: nowrap;
}
.stars::before { content: "★★★★★"; }
.stars .fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--star); }
.stars .fill::before { content: "★★★★★"; }

/* ---------- 折りたたみパネル（絞り込み・重み 共通） ---------- */
.panel { padding: 0; overflow: hidden; margin-bottom: 8px; }
.panel > summary {
  display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 8px 16px;
  cursor: pointer; list-style: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary:active { background: var(--bg); }
.panel > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.panel-title { flex: 1; font-weight: 700; font-size: 16px; line-height: 1.3; }
.panel-title small { margin-top: 2px; }
/* 見出しの頭の小さな絵。形は SVG で描き、色は --accent で塗る（どのスマホでも同じ見た目になる） */
.items-title::before, .filter-title::before {
  content: ""; display: inline-block; width: 18px; height: 18px;
  margin-right: 6px; vertical-align: -3px; background: var(--accent);
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
/* 絞り込み: じょうご（漏斗） */
.filter-title::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 4.5h17a1 1 0 0 1 .78 1.63L14.5 14.6V20a1 1 0 0 1-.55.9l-3 1.5A1 1 0 0 1 9.5 21.5v-6.9L2.72 6.13A1 1 0 0 1 3.5 4.5z'/%3E%3C/svg%3E");
}
/* 評価点に反映する項目: スライダー（つまみの付いた横線3本） */
.items-title::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M3 6h18M3 12h18M3 18h18'/%3E%3C/g%3E%3Ccircle cx='8' cy='6' r='3'/%3E%3Ccircle cx='16' cy='12' r='3'/%3E%3Ccircle cx='10' cy='18' r='3'/%3E%3C/svg%3E");
}
/* 開閉の矢印 */
.panel > summary::after {
  content: ""; width: 10px; height: 10px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s;
}
.panel[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.panel[open] > summary { border-bottom: 1px solid var(--line); }
/* 閉じていても分かる「重み調整中」「絞り込み中」 */
.panel-state {
  flex: none; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
}
.panel > :not(summary) { margin-left: 16px; margin-right: 16px; }
.panel > .note:first-of-type { margin-top: 12px; }
.panel > .btn { margin: 12px 16px 16px; width: calc(100% - 32px); min-height: 48px; }
.panel > .btn + .btn { margin-top: 0; }
.btn:disabled { opacity: .4; cursor: default; }

/* 絞り込み */
.filter-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.filter-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.filter-row select { min-height: 48px; font-size: 16px; }
.filter-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 12px;
}
.filter-banner .banner-body { flex: 1; min-width: 0; }
.filter-banner strong { color: var(--accent); font-size: 14px; }
.filter-banner .note { margin: 2px 0 0; }
.conds { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.conds li { font-size: 13px; background: var(--card); border-radius: 6px; padding: 1px 8px; }
.conds li span { color: var(--muted); font-size: 12px; margin-right: 4px; }
.conds li { display: inline-flex; align-items: center; }
/* 条件ごとの「×」（押すとその条件だけ外す）。指で押しやすいよう、見た目より広く反応する */
.cond-x {
  position: relative; margin: 0 -4px 0 4px; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: var(--line); color: var(--ink); font: inherit; font-size: 13px; line-height: 1; cursor: pointer;
}
.cond-x::after { content: ""; position: absolute; inset: -10px; }
/* 絞り込みの欄の見出し（押すと開け閉め） */
.fsec-head {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 0; border: 0; background: none;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.fsec-title { flex: none; font-size: 15px; font-weight: 700; }
.fsec-sum { flex: 1; min-width: 0; text-align: right; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsec-sum.on { color: var(--accent); font-weight: 700; }
.fsec-head::after {
  content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); margin: -4px 4px 0 2px; transition: transform .15s;
}
.fsec-head[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 4px; }
.fsec-body { padding-bottom: 8px; }
.btn.small { width: auto; flex: none; margin: 0; min-height: 44px; min-width: 64px; padding: 8px 14px; }

/* 評価点に反映する項目 */
.bulk { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.bulk .btn { margin: 0; min-height: 44px; padding: 8px; font-size: 15px; }
.item-rows { margin-top: 8px; }
.item-row {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 0 8px;
  border-bottom: 1px solid var(--line);
}
/* 項目の説明を出す「？」ボタン */
.help-btn {
  position: relative; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: var(--bg); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer;
}
.help-btn::after { content: ""; position: absolute; inset: -10px; }
.help-btn[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.item-row .desc { grid-column: 1 / -1; margin: -4px 0 8px 32px; line-height: 1.45; font-size: 12px; }
/* 最初の状態（重みを開いていない）: 名前とチェックと「？」だけを詰めて並べる
   （2列にすると「スライドコントロール性」などの名前が折り返して読みにくいので1列） */
.item-rows.compact .item-row { grid-template-columns: 1fr auto; }
.item-rows.compact .item-row .check { min-height: 44px; padding: 2px 0; }
.item-row .check input { align-self: center; margin-top: 0; }
.weights-extra { margin-top: 4px; }
/* 参考項目の見出し（評価点に最初は入れない項目） */
.ref-head { margin-top: 14px; padding-top: 10px; border-top: 2px solid var(--line); font-size: 14px; font-weight: 700; color: var(--muted); }
.ref-head small { display: block; font-weight: 400; margin-top: 2px; }
/* レビューを書く画面: 点の目安 */
.rate-scale-note { margin: 4px 0 10px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.rate-scale-note b { color: var(--ink); }
.rate-scale-note small { display: block; margin-top: 2px; }
.rate-scale-note .rate-scale-title { display: block; font-size: 14px; margin-bottom: 2px; }
.rate-scale-note ul { margin: 0; padding-left: 1.2em; }
/* 畳んだ説明（使い方の説明・点の付け方。2026-11-13） */
.fold-help { margin: 4px 0 8px; }
.fold-help summary { min-height: 40px; font-size: 14px; gap: 8px; list-style: none; }
.fold-help summary::-webkit-details-marker { display: none; }
/* 開け閉めの矢印（「評価点の計算方法を見る」と同じ形。閉じているときは下向き、開くと上向き） */
.fold-help summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; transition: transform .15s; }
.fold-help[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.fold-help > .note, .fold-help > ul { margin-top: 2px; }
.rate-scale-note li { margin: 2px 0; }
.weights-extra .btn { width: 100%; min-height: 44px; }
/* 計算方法（最初は閉じる） */
.calc-help { margin-top: 12px; }
.calc-help summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--accent); list-style: none; }
.calc-help summary::-webkit-details-marker { display: none; }
/* 開け閉めの矢印: 閉じているときは下向き、開いているときは上向き（ほかの「開く」ボタンと同じ） */
.calc-help summary::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin-top: -4px; transition: transform .15s;
}
.calc-help[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.calc-help-body p { margin: 4px 0 8px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.rank .tie { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.item-row .check {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; font-size: 15px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.item-row .check input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.weight-val { font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.weight-val b { color: var(--ink); font-size: 15px; }
.item-row.unchecked .check span { color: var(--muted); }
.item-row .check { padding: 6px 0; }

.item-help { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.item-help summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 14px; font-weight: 700; color: var(--accent); }
.item-help dl { margin: 0 0 4px; display: grid; gap: 2px 0; font-size: 13px; }
.item-help dt { font-weight: 700; margin-top: 6px; }
.item-help dd { margin: 0; color: var(--muted); }
.item-help dt.sub, .item-help dd.sub { padding-left: 1em; }
.item-help dt.sub { font-weight: 400; margin-top: 2px; }

/* 縦横の内訳 */
/* 内訳（評価点には直接使わない）: 少し小さく、ただし値ははっきり読める濃さ */
.rating-row.sub, .rating-row.child { padding: 4px 0 4px 0.8em; border-bottom-style: dashed; }
.rating-row.sub .label, .rating-row.child .label { font-size: 13px; }
.rating-row.sub .bar { height: 6px; }
.rating-row.sub .bar > span { background: var(--accent); opacity: .55; }
.rating-row.sub .num { font-size: 14px; }
.compare tr.sub th[scope="row"], .compare tr.child th[scope="row"] { padding-left: 1em; font-size: 12px; }
.compare tr.sub td { font-size: 13px; padding-top: 5px; padding-bottom: 5px; }
.compare tr.sub td small { display: block; font-size: 11px; }
.mini .parts { font-size: 12px; }

/* 一覧カードのグリップ */

/* 縦横を別々に計算する切り替え */
.item-group { border-bottom: 1px solid var(--line); }
.item-group .item-row:last-child { border-bottom: 0; }
.group-head { font-weight: 700; font-size: 15px; padding-top: 10px; }
.split-toggle {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 0 10px 32px; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--accent); -webkit-tap-highlight-color: transparent;
}
.split-toggle[hidden] { display: none; }
.split-toggle input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.split-toggle small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 1px; }
.item-row.child { padding-left: 20px; border-bottom: 1px dashed var(--line); }
.tag.mode { font-weight: 400; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 重みの3段階ボタン（普通・重視・最重視）。チェックした項目の下に、重みの調整を開いたときだけ出す */
.item-row .wlevels { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 0 8px 32px; }
.item-row .wlevels[hidden] { display: none; }
.wlevel {
  min-height: 40px; padding: 4px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wlevel.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.wlevel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.compare .na { font-size: 12px; color: var(--muted); }
.compare .dot { color: var(--accent); font-size: 11px; margin-right: 3px; vertical-align: 1px; }

/* 計算に使っている項目（一覧・比較） */
.used-items {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 12px; font-size: 14px;
}
.used-items summary { padding: 10px 14px; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.used-items summary b { color: var(--accent); }
.used-items .used-chips, .used-items .note { margin-left: 14px; margin-right: 14px; }
.used-items .note { margin-bottom: 12px; }
.used-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.used-chips li {
  font-size: 13px; padding: 2px 10px; border-radius: 999px;
  border: 1px dashed var(--line); color: var(--muted);
}
.used-chips li.on { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.used-chips li b { margin-left: 3px; color: var(--accent); }

/* 詳細: カテゴリ見出しごとの評価 */
.rating-group + .rating-group { margin-top: 12px; }
.rating-group h3 {
  font-size: 13px; margin: 8px 0 0; padding: 4px 8px; border-radius: 6px;
  background: var(--bg); color: var(--muted);
}

/* ---------- 詳細 ---------- */
.rating-row {
  display: grid; grid-template-columns: 9.5em 1fr 1.8em;
  align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.rating-row:last-child { border-bottom: 0; }
.rating-row .label { font-size: 14px; line-height: 1.35; }
.rating-row .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.rating-row.off { opacity: .45; }
.bar { height: 8px; border-radius: 4px; background: var(--star-off); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--star); border-radius: 4px; }

.comment { white-space: pre-wrap; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.others { display: grid; gap: 6px; }
.others .other {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  text-decoration: none; color: inherit; padding: 6px 0;
}
.others .other > span:first-child { min-width: 5em; font-weight: 700; color: var(--accent); }

.btn {
  display: block; width: 100%; text-align: center;
  padding: 12px; border-radius: 10px; border: 0;
  background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700;
  text-decoration: none; margin-top: 8px; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); padding: 11px; } /* 枠の1px分だけ内側の余白を減らして、塗りのボタンと同じ高さにする */
.back { display: inline-block; margin-bottom: 8px; font-size: 14px; text-decoration: none; }

/* ---------- 比較 ---------- */
/* 比較するタイヤを選ぶ欄: 名前が切れないよう1つずつ横幅いっぱいに（「A」「B」を左に） */
.pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; } /* A と B を左右に（2026-11-14） */
/* A・B ごとに、メーカー（上）と銘柄（下）を横幅いっぱいに（名前が切れないように） */
.picker { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 6px; min-width: 0; }
.picker .picker-label { text-align: left; }
.picker-label { font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; }
.picker select { min-width: 0; padding: 10px 4px 10px 8px; font-size: 16px; } /* 16px 未満だと iPhone で選ぶときに画面が拡大される */
select {
  width: 100%; padding: 10px 8px; font: inherit; font-size: 15px;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink);
}
.compare { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; table-layout: fixed; }
.compare th, .compare td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: center; font-size: 14px; vertical-align: middle; }
.compare th[scope="row"] { text-align: left; color: var(--muted); font-weight: 400; width: 34%; line-height: 1.35; }
.compare tr.total th[scope="row"] { color: var(--ink); font-weight: 700; }
.compare tr.total td { font-size: 16px; font-weight: 700; }
.compare tr.off td, .compare tr.off th { opacity: .45; }
.compare td.win { background: var(--win); color: var(--win-ink); font-weight: 700; }
.compare td.pre { white-space: pre-line; }
.compare .stars { font-size: 12px; letter-spacing: 0; display: block; margin: 2px auto 0; width: max-content; }

/* ---------- レビュー・算出元 ---------- */
.basis { font-size: 12px; color: var(--muted); margin-top: 2px; }
.lead { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }
.review { border-top: 1px solid var(--line); padding: 12px 0; }
.review:first-of-type { border-top: 0; padding-top: 4px; }
.cond { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; font-weight: 700; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; }
.usage { font-size: 13px; color: var(--muted); margin: 4px 0; }
.mini { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.mini b { color: var(--ink); }
.mini li.off { opacity: .5; }
.review .comment { font-size: 15px; }
.others .other small { flex-basis: 100%; }
.compare tr.basis-row td { font-size: 12px; color: var(--muted); }

/* ---------- レビュー入力フォーム ---------- */
.form-sec { display: grid; gap: 4px; }
.form-sec h2 { margin-bottom: 4px; }
.field { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; font-size: 14px; font-weight: 700; margin-top: 8px; }
.field > input, .field > select, .field > textarea { flex: 1 1 100%; }
.field em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--warn); margin-left: 6px; }
.field .opt { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 16px; font-weight: 400;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.field [aria-invalid="true"] { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.price-input { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; }
.price-input input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 16px; font-weight: 400; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.price-input input[aria-invalid="true"] { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.price-input > span { font-weight: 400; }
.price-field.off { color: var(--muted); }
.price-input input:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
.form-errors {
  border: 1px solid var(--warn); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px;
  background: var(--card); color: var(--ink); font-size: 14px;
}
.form-errors strong { color: var(--warn); }
.form-errors ul { margin: 6px 0 0; padding-left: 1.2em; }
.form-errors a { color: var(--accent); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 700; font-size: 14px; }
.uses, .mode-switch { margin-top: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.use-opts, .mode-opts { display: grid; gap: 8px; margin-top: 8px; }
.use-opts { display: flex; flex-wrap: wrap; }
.use-opts .use-opt { flex: 1 1 auto; }
.use-opts .use-opt span { white-space: nowrap; padding-left: 14px; padding-right: 14px; }
.mode-opts { grid-template-columns: 1fr 1fr; }
.use-opt, .mode-opt, .rate-opt { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.use-opt input, .mode-opt input, .rate-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.use-opt span, .mode-opt span, .rate-opt span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 6px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-weight: 700; font-size: 15px;
}
.mode-opt span { min-height: 64px; }
.type-opts { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.type-opts .mode-opt span { min-height: 44px; padding: 6px 1px; font-size: 14px; line-height: 1.3; }
.report-link { display: inline-block; margin-top: 8px; padding: 4px 0; font-size: 12px; color: var(--muted); text-decoration: underline; }
.mode-opt small { font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 2px; }
.use-opt input:checked + span, .mode-opt input:checked + span, .rate-opt input:checked + span {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}
.mode-opt input:checked + span small { color: var(--on-accent); }
/* 「未評価」は選ばれていても薄く（点を付けた項目が目立つように） */
.rate-opt.none input:checked + span { background: transparent; border-color: var(--muted); color: var(--muted); font-weight: 700; }
.use-opt input:focus-visible + span, .mode-opt input:focus-visible + span, .rate-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rate { padding: 10px 0; border-bottom: 1px solid var(--line); }
.rate legend small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 1px; }
.rate-opts { display: grid; grid-template-columns: repeat(5, 1fr) 1.5fr; gap: 6px; margin-top: 8px; }
/* 1と5の下に点の意味（数字のボタンの幅に合わせる） */
.rate-ends { display: grid; grid-template-columns: repeat(5, 1fr) 1.5fr; gap: 6px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.rate-ends span:first-child { grid-column: 1 / 3; text-align: left; }
.rate-ends span:last-child { grid-column: 4 / 6; text-align: right; }
.rate-opt span { font-variant-numeric: tabular-nums; }
.rate-opt.none span { font-size: 13px; font-weight: 400; }
.rate-group { padding: 10px 0 4px; border-bottom: 1px solid var(--line); }
.rate-group-head { font-weight: 700; font-size: 14px; }
.rate-group-head small { display: block; font-weight: 400; }
.rate-group .rate { padding-left: 12px; border-bottom-style: dashed; }
.rate-group .rate:last-of-type { border-bottom: 0; }
.rate-group .calc { margin: 2px 0 6px 12px; }
.more { margin-top: 8px; }
.more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--accent); }
.json {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.5;
  padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
  resize: vertical; white-space: pre; overflow-x: auto;
}
#rf-result code { font-size: 12px; background: var(--bg); padding: 0 4px; border-radius: 4px; }
.btn.danger { border-color: var(--warn); color: var(--warn); }

/* ---------- タイヤサイズ（トレッド幅・扁平率・インチ） ---------- */
.maker-filter legend, .size-filter legend, .range-filter legend { font-size: 13px; color: var(--muted); font-weight: 400; margin-bottom: 4px; }
.size-selects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-items: end; }
.size-selects label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; }
.size-selects select { min-height: 48px; padding: 8px 4px; font-size: 16px; }
.size-range-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 4px; padding: 8px 0; min-height: 44px;
  border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.size-range-toggle::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin-top: -4px; transition: transform .15s;
}
.size-range-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }
.size-range-toggle.up::after { transform: rotate(-135deg); margin-top: 3px; }
.band-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.band-btns.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.band-sub { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.maker-search { width: 100%; min-height: 44px; margin-top: 10px; padding: 8px 12px; font: inherit; font-size: 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.maker-group-sec .band-sub { margin-top: 12px; font-weight: 700; }
.maker-group-sec .maker-chips { margin-top: 4px; }
.maker-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.maker-chip {
  display: inline-flex; align-items: baseline; gap: 4px; min-height: 40px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.maker-chip small { display: inline; font-size: 12px; font-weight: 400; color: var(--muted); }
.maker-chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.maker-chip.active small { color: var(--on-accent); opacity: .85; }
.maker-chip:disabled { opacity: .4; cursor: default; }
.band-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px; padding: 4px 2px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 700; line-height: 1.25; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.band-btn small { font-size: 12px; font-weight: 400; color: var(--muted); }
.band-btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.band-btn.active small { color: var(--on-accent); opacity: .85; }
.band-btn:disabled { opacity: .4; cursor: default; }
.size-range { display: grid; grid-template-columns: 5.2em minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; margin-bottom: 6px; }
.size-range-label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.size-range-sep { color: var(--muted); font-size: 14px; }
.size-range select { min-height: 44px; padding: 6px 4px; font-size: 16px; }
.size-range select.set { border-color: var(--accent); font-weight: 700; }

/* ---------- レビュー入力: タイヤサイズの＋−ボタン ---------- */
.size-input { margin-top: 8px; }
.size-input legend { display: flex; align-items: baseline; gap: 6px; width: 100%; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.size-input legend em { font-style: normal; font-size: 12px; color: var(--warn); }
.size-now { margin-left: auto; font-size: 18px; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.size-now.empty { font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.stepper { display: grid; grid-template-columns: 1fr 48px 4.2em 48px; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.stepper-label { font-size: 14px; color: var(--muted); }
.stepper .step-btn { width: 48px; height: 48px; font-size: 22px; }
.stepper .step-btn:disabled { opacity: .35; cursor: default; }
.stepper-val { text-align: center; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- レビュー入力: 必須項目と任意項目 ---------- */
.req-sec h2 { margin-bottom: 0; }
.req-h { display: flex; align-items: baseline; gap: 6px; }
.req-h em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--warn); }
.size-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 15px; font-weight: 700; }
.size-toggle input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.size-toggle small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 1px; }
.opt-sec { padding: 0; overflow: hidden; }
.opt-sec summary {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 16px;
  cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent;
}
.opt-sec summary::-webkit-details-marker { display: none; }
.opt-sec summary::after {
  content: ""; width: 10px; height: 10px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s;
}
.opt-sec[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.opt-sec[open] summary { border-bottom: 1px solid var(--line); }
.opt-sec summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.opt-title { flex: 1; font-weight: 700; font-size: 16px; line-height: 1.3; }
.opt-title small { margin-top: 2px; }
.opt-count { flex: none; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.opt-body { padding: 4px 16px 16px; }

/* いたずら対策の見えない欄 */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-done { display: grid; gap: 8px; text-align: center; }
.form-done h1 { margin-bottom: 0; }

/* ---------- 範囲スライダー（購入価格・書いた時期） ---------- */
.range-filter legend { font-size: 13px; color: var(--muted); font-weight: 400; margin-bottom: 4px; }
.range-slider { margin-top: 4px; }
.range-slider-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.range-slider-head label { color: var(--muted); }
.range-val { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.range-slider.set .range-val { color: var(--accent); }
.range-slider-row { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; }
.step-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.step-btn:active { background: var(--accent-soft); }
.range-slider input[type=range] {
  width: 100%; height: 32px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; touch-action: pan-y;
}
.range-slider input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--star-off); }
.range-slider input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--star-off); }
.range-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--muted); box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.range-slider input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--muted); }
.range-slider.set input[type=range]::-webkit-slider-thumb { border-color: var(--accent); }
.range-slider.set input[type=range]::-moz-range-thumb { border-color: var(--accent); }
.range-slider input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- 下部 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  text-align: center; padding: 14px 0; text-decoration: none;
  color: var(--muted); font-weight: 700; font-size: 15px;
}
.tabbar a.active { color: var(--accent); }

.ad-notice {
  max-width: 560px; margin: 0 auto; padding: 8px 16px 16px;
  text-align: center; color: var(--muted); font-size: 12px;
}
.ad-notice p { margin: 0 0 4px; }
.ad-notice p:empty { display: none; }
.ad-notice .footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin: 0; }
/* ご意見箱の案内（一覧のいちばん下） */
.card.feedback p { margin: 0 0 4px; font-size: 14px; }
.card.feedback .note { margin-top: 8px; }
.ad-notice a { color: var(--muted); }
/* 「このタイヤを探す」の見出しに付ける「広告」の札 */
.ad-label {
  display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 0 6px;
  border: 1px solid var(--muted); border-radius: 4px;
  color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.6;
}
.card.shop .btn:first-of-type { margin-top: 4px; }

/* ---------- プライバシーポリシー（privacy.html） ---------- */
body.plain { padding-bottom: calc(24px + env(safe-area-inset-bottom)); } /* 下のタブバーがないページ */
.policy .card p { margin: 0 0 8px; }
.policy .card p:last-child, .policy .card ul:last-child { margin-bottom: 0; }
.policy h3 { font-size: 14px; margin: 12px 0 4px; }
.policy ul { margin: 0 0 8px; padding-left: 1.3em; }
.policy li + li { margin-top: 4px; }
.policy .card { overflow-wrap: anywhere; }

/* ---------- レビュー入力: 「もしかして」の候補（表記揺れの対策） ---------- */
.suggest {
  margin: 8px 0 0; padding: 10px 12px; border-radius: 10px;
  background: var(--accent-soft); font-size: 14px;
}
.suggest p { margin: 0 0 6px; }
.suggest-btn {
  display: inline-block; margin: 0 6px 6px 0; min-height: 40px; padding: 6px 12px;
  border: 1px solid var(--accent); border-radius: 999px; background: var(--card); color: var(--accent);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.suggest-btn:last-child { margin-bottom: 0; }
.suggest .picked { margin: 0; color: var(--win-ink); font-weight: 700; }
.suggest .note:last-child { margin-bottom: 0; }

/* ---------- レビュー入力: 投稿のルールと同意のチェック ---------- */
.rules { margin: 0; padding-left: 1.2em; font-size: 14px; }
.rules li + li { margin-top: 6px; }
.agree {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; min-height: 48px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.agree input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); margin: 0; }
.agree:has(input[aria-invalid="true"]) { border-color: var(--warn); }

/* ---------- タイヤの種類の切り替え（サマー／スタッドレス） ---------- */
.type-switch {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 4px; margin-bottom: 8px; border-radius: 12px; background: var(--line);
}
.type-btn {
  min-height: 44px; padding: 6px 2px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.3;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.type-btn.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.type-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1 .type-label { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }

/* ---------- まだレビューがない銘柄（一覧のいちばん下） ---------- */
/* 開け閉めの印は、ほかの折りたたみと同じく右側の「∨」（開くと「∧」） */
.card.waiting summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; }
.card.waiting summary::-webkit-details-marker { display: none; }
.card.waiting summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 6px 0 0; transition: transform .15s; }
.card.waiting[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.card.waiting .note { margin: 8px 0; }
.waiting-list { list-style: none; margin: 0; padding: 0; }
.waiting-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.waiting-maker { display: block; font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.waiting-names { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.waiting-names a { font-size: 15px; text-decoration: none; padding: 4px 0; }

/* 詳細画面の上の欄: 購入価格・サイズ・レビュー数 */
.detail-meta { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); align-items: baseline; }
.detail-meta .chips { margin: 0; }
article.review[hidden] { display: none; }

/* 比較表: メーカー名・見出し行・短い情報の行 */
.compare .cmp-maker { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.compare tr.grp th { text-align: left; background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 700; padding: 6px 8px; }
.compare tr.info-row td, .compare tr.wins td { font-size: 13px; }
.compare tr.info-row td small { display: block; font-size: 12px; color: var(--muted); }
.compare th[scope="row"] small { display: block; font-size: 12px; color: var(--muted); }
.cmp-help { margin-top: 12px; }
.compare .ref-note { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }

/* レビューを書く画面: 項目のまとまりの見出し・説明（？で開く）・評価済みの数・消すボタン */
.rate-sec { margin: 14px 0 0; padding: 6px 8px; background: var(--bg); border-radius: 6px; font-size: 13px; color: var(--muted); }
/* fieldset の上の余白は legend の下に入ってしまうので、余白は legend 自身に持たせる */
.rate legend { display: flex; align-items: center; gap: 6px; font-weight: 700; padding-top: 10px; }
fieldset.rate { padding-top: 0; }
.rate-help { width: 26px; height: 26px; min-width: 26px; font-size: 13px; }
.rate-desc { display: block; font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.rate-desc[hidden] { display: none; }
.req-h em.opt { color: var(--muted); }
.rated-count { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--warn); text-align: center; }
.rated-count.done { color: var(--accent); }
#rf-rated-count2 { margin: 12px 0 0; }
#rf-comment { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); resize: vertical; }

/* 一覧の上のサイトの案内 */
.card.intro { position: relative; }
.card.intro h2 { margin: 0 0 6px; font-size: 17px; padding-right: 32px; }
.card.intro p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.intro-close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.share-done { margin: 6px 0 0; text-align: center; word-break: break-all; }

/* このタイヤを探す: お店のボタンを2列に */
.shop-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.shop-btns .btn { margin: 0; font-size: 15px; padding: 11px 6px; }
.shop-btns .btn small { display: block; font-size: 12px; font-weight: 400; }

/* 点数ごとの目安（レビューを書く画面の「？」・詳細画面の「評価項目の説明」） */
.anchors { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 2px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.anchors li { display: flex; gap: 6px; }
.anchors li b { flex: none; width: 1.2em; text-align: center; color: var(--ink); }
.rate-desc small { display: block; }
.rate-desc .anchors-title { margin-top: 6px; font-weight: 700; color: var(--ink); }
.rate-anchor { margin: 6px 0 0; min-height: 1.4em; font-size: 13px; color: var(--accent); line-height: 1.45; }
.rate-anchor b { margin-right: 6px; }
.rate-anchor.empty { color: var(--muted); font-size: 12px; } /* 点を選ぶ前のひとこと */

/* 送信前の確認（画面に重ねて出す） */
.confirm-dialog {
  width: min(560px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow-y: auto;
  border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px;
  background: var(--card); color: var(--ink);
}
.confirm-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.confirm-dialog.no-modal { position: fixed; inset: 24px 16px auto; z-index: 100; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.confirm-dialog h2 { margin: 0 0 10px; font-size: 17px; }
.confirm-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 10px; font-size: 14px; }
.confirm-list dt { color: var(--muted); white-space: nowrap; }
.confirm-list dd { margin: 0; min-width: 0; word-break: break-word; }
.confirm-list dd small { display: block; font-size: 12px; color: var(--warn); }
.confirm-comment { white-space: pre-wrap; }
.confirm-btns { display: grid; gap: 8px; margin-top: 12px; }
.confirm-btns .btn { margin: 0; }

/* 銘柄ごとの検索用ページ（tools/build_pages.py が作る）の要約。JavaScript が動くまでの間と、検索ロボット向け（2026-11-12） */
.prerender h1 { font-size: 22px; margin: 4px 0 8px; }
.prerender h2 { font-size: 16px; margin: 16px 0 6px; }
.prerender ul { margin: 0; padding-left: 1.2em; }
.prerender li p { margin: 2px 0; }

/* ======================================================================
   2026-11-14 のデザインの見直し（管理人が A案「順位表」を選んだ）
   一覧の上をまとめてランキングを最初の画面に出す・評価点を大きく・ロゴの紺と差し色の黄緑
   ====================================================================== */
.t-short { display: none; }

/* ---- 一覧の上をまとめて、ランキングを最初の画面に出す ---- */
main { display: grid; grid-template-columns: 1fr 1fr; column-gap: 8px; align-items: start; }
main > * { grid-column: 1 / -1; min-width: 0; }
main > .panel:not([open]) { grid-column: auto; }
.panel > summary { min-height: 48px; padding: 6px 12px; gap: 6px; }
.panel:not([open]) .panel-title { font-size: 15px; white-space: nowrap; }
.panel:not([open]) .panel-title small { display: none; }
.panel:not([open]) .t-long { display: none; }
.panel:not([open]) .t-short { display: inline; }
.panel:not([open]) .panel-state { padding: 2px 6px; font-size: 12px; }
.card.intro { padding: 12px 14px; }
.card.intro h2 { font-size: 15px; margin-bottom: 4px; }
.card.intro p { font-size: 13px; line-height: 1.55; margin-bottom: 6px; }
.card.intro .btn { display: inline-block; width: auto; padding: 8px 18px; min-height: 40px; font-size: 14px; }
/* カード: 順位｜名前｜大きな評価点 */
.card.tire { grid-template-columns: 2.4em 1fr auto; align-items: center; }
.card.tire .score-side { display: block; text-align: right; }
.card.tire .body { min-width: 0; }
.score-side b { display: block; font-size: 30px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--ink); }
.card.tire .overall { font-size: 0; margin-top: 2px; }
.card.tire .overall .stars { font-size: 13px; }
.card.tire .overall .score { display: none; }
.card.tire .basis { display: none; }
.card.tire .name { margin-bottom: 0; line-height: 1.35; }
.card.tire .card-meta { margin-top: 4px; font-size: 12px; }
.rank { padding-top: 0; }
.rank .tie { font-size: 11px; }
.score-side .meter { display: none; }
/* 見出し「評価点ランキング」は並び順の欄と同じ内容なので画面には出さない。案内の「レビューを書く」は下のタブにあるので出さない */
.list-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; } /* 見た目は消すが、読み上げ・検索のために見出しは残す */
.sort-box { margin: 4px 0 10px; }
.card.intro .btn { display: none; }
.card.intro p { margin-bottom: 0; }

/* ---- 順位表: レースの順位表のように、行を縦に積む ---- */
.card.tire { margin: 0; border-radius: 0; border-width: 0 0 1px; padding: 0 14px 0 0; gap: 12px; min-height: 92px; align-items: stretch; }
.card.tire .body { padding: 12px 0; }
.card.tire .score-side { align-self: center; }
.card.tire:first-of-type { border-radius: 12px 12px 0 0; }
.card.tire:has(+ :not(.card.tire)) { border-radius: 0 0 12px 12px; border-bottom-width: 0; margin-bottom: 12px; }
.card.tire .rank { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--navy); color: #fff; font-size: 26px; }
.card.tire[data-rank="1"] .rank, .card.tire[data-rank="2"] .rank, .card.tire[data-rank="3"] .rank { background: var(--lime); color: var(--lime-ink); }
.card.tire .rank .tie { color: inherit; opacity: .8; }
.card.tire.ref .rank, .card.tire.unrated .rank { background: var(--line); color: var(--muted); font-size: 16px; }
.card.tire .maker { font-size: 12px; letter-spacing: .02em; }

/* 詳細の下のボタン2つは横に並べる（2026-11-14） */
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-pair .btn { margin: 0; padding-left: 6px; padding-right: 6px; font-size: 15px; }
/* 基本情報の欄の「メーカーの製品ページ」: 小さい文字のリンク（お店のボタンより目立たせない。2026-11-14） */
.official-link { margin: 8px 0 0; font-size: 13px; }
.official-link span { color: var(--muted); font-size: 12px; margin-left: 2px; }
