/* ふるさと納税還元率ナビ のスタイル。ビルド時に内容のハッシュ付きの名前で /assets/ に置かれる */
/*
 * 色は生成り色の地に白い面を置き、線ではなく面の違いで区切る。アクセントは深い緑 1 色、差し色は黄土色（ロゴの贈り物の箱と同じ系統）。
 * 白地の文字は 4.5:1 以上になる濃さにしている（--muted・--accent・--ochre-ink）。--ochre は面と図形だけに使い、文字には使わない
 */
:root {
  --fg: #2a2621;
  --muted: #6b6259;
  --line: #e7e0d4;
  --line-strong: #d9d0c1;
  --bg: #f6f3ec;
  --card: #fff;
  --well: #efe9df;
  --soft: #e3eeea;
  --accent: #1e6b62;
  --accent-dark: #15524b;
  --ochre: #c68a1e;
  --ochre-soft: #fbf0da;
  --ochre-ink: #87570c;
  --star: #d99a21;
  --rakuten: #bf0000;
  --rakuten-dark: #9a0000;
  --danger: #b42318;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(60, 45, 20, 0.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif; color: var(--fg); background: var(--bg); line-height: 1.55; font-size: 15px; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
.inner { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー: PC はサイト名・検索・ナビを 1 段、1024px 未満は 3 段（サイト名／検索／横に送るナビ） */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .inner { display: flex; align-items: center; gap: 12px 24px; min-height: 76px; padding-top: 10px; padding-bottom: 10px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { flex: none; width: 32px; height: 42px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-size: 19px; font-weight: 800; font-feature-settings: "palt"; }
.brand-tag { font-size: 11px; color: var(--muted); }
.search { display: flex; align-items: center; flex: 1 1 200px; max-width: 460px; height: 46px; padding: 0 16px 0 4px; border-radius: 999px; background: var(--card); box-shadow: 0 1px 3px rgba(60, 45, 20, 0.08), inset 0 0 0 1px var(--line); }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.search button { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.search button:hover { color: var(--accent); background: var(--soft); }
.search button .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.search input { flex: 1; min-width: 0; height: 100%; padding: 0 0 0 4px; border: 0; background: none; outline: none; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { flex: none; display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
.site-nav a:hover { background: var(--well); }
.site-nav a.on { background: var(--fg); color: #fff; }
@media (max-width: 1023px) {
  .site-header { position: static; }
  .site-header .inner { flex-wrap: wrap; min-height: 0; }
  .search { flex-basis: 100%; max-width: none; order: 2; }
  .site-nav { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
}

main { max-width: 1280px; margin: 0 auto; padding: 16px; }
.results { scroll-margin-top: 92px; }

/* 一覧の2カラム */
.list-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.results { min-width: 0; }
.results-head { margin-bottom: 12px; }
.page-title { font-size: 20px; font-weight: 800; }
.lead { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
/* 一覧の説明: 数値のチップと折りたたみの補足（文字だらけにしない） */
.facts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.facts li { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 12px; color: var(--muted); }
.facts b { color: var(--fg); font-size: 13px; }
.lead-more { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.lead-more summary { cursor: pointer; color: var(--accent-dark); font-weight: 700; }
.lead-more p { margin: 6px 0 0; }
/* ツールバー: 絞り込む（タブレット以下）と並べ替えの選択欄。スマホ・タブレットでは画面の上に固定する */
.toolbar { display: flex; align-items: center; gap: 8px; }
.sorts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sorts-label { font-size: 13px; color: var(--muted); font-weight: 700; margin-right: 4px; }
.sorts .sort { text-decoration: none; font-size: 13px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; white-space: nowrap; }
.sorts .sort.on { background: var(--soft); border-color: var(--accent); color: var(--accent-dark); font-weight: 700; }
.filters-toggle { display: none; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--fg); font-weight: 700; cursor: pointer; white-space: nowrap; }
.filters-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; }
.filters-count:empty { display: none; }
/* 並べ替えの選択欄（値は「sort:order」。JS が無い環境では noscript の .sorts のリンクを出す） */
.sort-select { position: relative; display: flex; align-items: center; gap: 6px; height: 40px; margin-left: auto; padding: 0 34px 0 16px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 14px; }
.sort-select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.sort-select-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sort-select select { min-width: 0; border: 0; background: none; font-weight: 700; color: var(--fg); cursor: pointer; appearance: none; -webkit-appearance: none; outline: none; }
.sort-select:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
/* 選択中の条件（押すとその条件を外す） */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.active-filters:empty { display: none; }
.active-chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px 0 12px; border-radius: 999px; background: var(--soft); color: var(--accent-dark); font-size: 13px; font-weight: 700; text-decoration: none; }
.active-chip .icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.active-chip:hover { background: #d3e5df; }
.active-clear { font-size: 13px; color: var(--muted); padding: 4px; }
.filters-toggle .icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
/* 結果の上のカテゴリ（タブレット以下だけ。PC は左の絞り込みパネルで選ぶ）。.chips の display: flex より強くするため 2 つのクラスで指定する */
.chips.genre-bar { display: none; }
.count { margin: 12px 4px 8px; font-size: 14px; color: var(--muted); }
.empty { background: var(--card); border: 0; border-radius: var(--radius); padding: 32px 16px; text-align: center; color: var(--muted); }

/* 絞り込みパネル */
.filters { background: var(--card); border: 0; border-radius: var(--radius); padding: 16px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filters h2 { font-size: 17px; font-weight: 800; }
.filters-close { display: none; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.filter { padding: 12px 0; border-top: 1px solid var(--line); }
.filter h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* メーカーのカテゴリ別へのリンク（/maker/<名前>/ と /maker/<名前>/genre/<id>/） */
.maker-genres, .leaf-genres { align-items: center; margin: 0 0 12px; }
.maker-genres .chip small, .leaf-genres .chip small { margin-left: 4px; color: var(--muted); font-size: 11px; }
.maker-genres .chip.on small, .leaf-genres .chip.on small { color: rgba(255, 255, 255, 0.85); }

/* 寄付金額帯へのリンク（トップと /donation/ のページ） */
.donation-bar { align-items: center; margin: 0 0 12px; }
.chips-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.chip { display: inline-block; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; text-decoration: none; cursor: pointer; line-height: 1.3; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.range { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.range input { width: 100%; min-width: 0; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.range input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.filters select { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.filter-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
body.filters-open::after { content: ""; position: fixed; inset: 0; background: rgba(42, 32, 20, 0.45); z-index: 29; }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; text-align: center; padding: 9px 12px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14px; border: 1px solid transparent; cursor: pointer; line-height: 1.3; white-space: nowrap; min-width: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.btn .icon { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--muted); }
.btn-gift { background: var(--accent); color: #fff; }
.btn-gift:hover { background: var(--accent-dark); }
.btn-market { background: var(--rakuten); color: #fff; }
.btn-market:hover { background: var(--rakuten-dark); }
/* Amazon へのボタン。Amazon のロゴやブランドカラーは使わず（アソシエイトの規約）、サイトの文字色にする */
.btn-amazon { background: var(--fg); color: #fff; }
.btn-amazon:hover { background: #000; }
.btn-detail { background: #fff; border-color: var(--line-strong); color: var(--fg); }
.btn-detail:hover { background: var(--bg); }

/*
 * カード（card.js の renderCard）: 画像と商品名、寄付金額・最安値の帯と実質還元率の丸いバッジ、レビュー 2 行、ボタン。
 * スマホは画像を左に置いた横長、640px 以上は画像を上に置いた縦長。還元率が高い順の上位 3 件は画像の左上に「No.1」の札と、カードの縁に同じ色の線
 */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: grid; grid-template-columns: 118px minmax(0, 1fr) auto; grid-template-areas: "media body body" "facts facts badge" "ratings ratings ratings" "actions actions actions"; gap: 10px 12px; align-items: start; }
.card-media { grid-area: media; position: relative; }
.card-img { display: flex; align-items: center; justify-content: center; width: 118px; height: 118px; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.noimg { color: var(--muted); font-size: 12px; }
.card-img:has(.noimg) { background: var(--well); }
.card-body { grid-area: body; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card-src { margin: 0; font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; white-space: nowrap; }
.card-genre { background: var(--soft); color: var(--accent-dark); padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.card-name { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-name a { text-decoration: none; }
.card-name a:hover { text-decoration: underline; }
.card-shop { margin: 0; font-size: 12px; color: var(--muted); }
/* 寄付金額と最安値は 1 行ずつ（左にラベル、右に金額）。2 列に並べるとラベル（「楽天市場最安値」）が折り返して金額の高さがずれる */
.card-facts { grid-area: facts; align-self: center; margin: 0; display: grid; gap: 4px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--bg); }
.card-facts div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 8px; min-width: 0; }
.card-facts dt { font-size: 12px; color: var(--muted); white-space: nowrap; }
.card-facts dd { margin: 0 0 0 auto; font-size: 16px; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; text-align: right; }
.card-facts .price-date { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.card .badge { grid-area: badge; width: 76px; height: 76px; margin: 5px; }
.card .badge-label { font-size: 9px; }
.card .badge-value { font-size: 18px; }
.card .badge small { display: none; }
.card-ratings { grid-area: ratings; display: grid; gap: 2px; }
/* ボタン: 楽天ふるさと納税を 1 段目いっぱいに、楽天市場と Amazon を 2 段目に半分ずつ（片方しか無ければいっぱいに） */
.card-actions { grid-area: actions; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.card-actions .btn { min-height: 40px; padding: 8px 6px; font-size: 13px; gap: 4px; }
.card-actions .btn-gift { grid-column: 1 / -1; min-height: 44px; font-size: 14px; }
.card-actions .btn-gift + .btn:last-child, .card-actions .btn:not(.btn-gift):only-child { grid-column: 1 / -1; }
.btn .icon { width: 15px; height: 15px; }
/* 順位の札。上位 3 件は金・銀・銅（文字は濃い色で 4.5:1 以上）、ランキングの 4 位以下は濃い地に白 */
.card-rank { position: absolute; top: -8px; left: -8px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--fg); color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 2px 6px rgba(60, 45, 20, 0.25); }
.card-rank-1, .card-rank-2, .card-rank-3 { height: 32px; padding: 0 12px; font-size: 16px; letter-spacing: 0.02em; color: #2a2107; }
.card-rank-1 { background: #eab53c; }
.card-rank-2 { background: #cdd3d8; }
.card-rank-3 { background: #d49a6a; }
.card-top1 { box-shadow: inset 0 0 0 2px #eab53c; }
.card-top2 { box-shadow: inset 0 0 0 2px #cdd3d8; }
.card-top3 { box-shadow: inset 0 0 0 2px #d49a6a; }
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .card { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto auto auto; grid-template-areas: "media media" "body body" "facts badge" "ratings ratings" "actions actions"; }
  .card-img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .card-name { -webkit-line-clamp: 2; }
  .card .badge { width: 84px; height: 84px; }
  .card .badge-value { font-size: 20px; }
}
/* レビュー（楽天ふるさと納税と楽天市場の 2 行） */
.card-ratings { grid-area: ratings; display: grid; gap: 2px; padding-top: 6px; border-top: 1px dashed var(--line); }
.rating { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.3; min-width: 0; flex-wrap: wrap; }
.rating-label { color: var(--muted); min-width: 6em; }
.stars { position: relative; display: inline-block; font-size: 14px; line-height: 1; letter-spacing: 1px; color: #e3dcd0; white-space: nowrap; }
.stars-base { display: block; }
.stars-fill { position: absolute; inset: 0; width: var(--pct, 0%); overflow: hidden; color: var(--star); white-space: nowrap; }
.rating-value { font-size: 13px; }
.rating-count, .rating-none { color: var(--muted); }
.rating-high { background: var(--ochre-soft); color: var(--ochre-ink); border: 0; border-radius: 999px; padding: 0 5px; font-size: 11px; font-weight: 700; }
.rating-lg { font-size: 14px; gap: 8px; }
.rating-lg .stars { font-size: 20px; }
.rating-lg .rating-value { font-size: 18px; }
.rating-lg .rating-label { min-width: 7em; font-weight: 700; color: var(--fg); }
.detail-ratings { display: grid; gap: 8px; margin: 0 0 14px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius-sm); }
.detail-ratings .more { margin: 0; font-size: 13px; }

/* ページ送り */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 20px 0; font-size: 14px; flex-wrap: wrap; }
.pager a, .pager span { text-decoration: none; }
.pg-prev, .pg-next { padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; }
.pg-prev.off, .pg-next.off { color: #b9b0a3; }
.pg-nums { display: flex; gap: 4px; }
.pg { min-width: 36px; padding: 6px 8px; text-align: center; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; }
.pg.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pg-gap { padding: 6px 2px; color: var(--muted); }

/* 詳細 */
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail { background: var(--card); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
.detail-media { display: flex; align-items: center; justify-content: center; background: #fff; border: 0; border-radius: var(--radius); padding: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.detail-media img { width: 100%; max-width: 400px; height: auto; aspect-ratio: 1; object-fit: contain; }
.detail-name { font-size: 22px; font-weight: 800; line-height: 1.5; margin: 4px 0 10px; font-feature-settings: "palt"; }
/* 寄付金額・最安値（面の中にラベルと金額）と丸いバッジ */
.detail-facts { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: center; margin: 18px 0 12px; }
.fact { display: flex; flex-direction: column; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); }
.fact span { font-size: 12px; color: var(--muted); }
.fact b { font-size: 24px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }
.fact small { font-size: 11px; color: var(--muted); }
/* 実質還元率のバッジ（詳細の数字の横。card.js の rateBadge） */
.badge { width: 84px; height: 84px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--rakuten); align-self: center; line-height: 1.1; }
.badge-label { font-size: 10px; font-weight: 700; }
.badge-value { font-size: 20px; font-weight: 800; margin: 1px 0; }
.badge small { font-size: 8px; opacity: 0.9; }
.detail-facts .badge { width: 104px; height: 104px; margin: 5px; }
.detail-facts .badge-value { font-size: 26px; }
/* 還元率の根拠（比べた製品・価格・取得日）。数字のすぐ下に置き、他サイトとの違いの説明へつなぐ */
.rate-basis { margin: 0 0 14px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.rate-basis a { white-space: nowrap; }
.detail-facts .badge-label { font-size: 11px; }
.detail-facts .badge small { font-size: 9px; }
/* 「自己負担 2,000 円で ◯◯円相当」（実売価格を自己負担額と並べて示す） */
.net { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 14px; padding: 12px 14px; border: 0; border-radius: var(--radius-sm); background: var(--soft); }
.net-label { font-size: 13px; font-weight: 700; color: var(--accent); }
.net b { font-size: 22px; font-weight: 800; line-height: 1.2; }
.net small { flex-basis: 100%; font-size: 11px; color: var(--muted); line-height: 1.5; }
/* 寄付（幅の広いボタン）・楽天市場・Amazon。スマホでは画面下に固定する */
.detail-actions { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.detail-actions .btn { min-height: 52px; padding: 12px 10px; font-size: 15px; }
.detail-actions .btn:only-child { grid-column: 1 / -1; }
.detail-actions .btn:nth-child(2):last-child { grid-column: span 2; }
.detail-sections { display: grid; gap: 16px; margin-top: 16px; }
.panel { background: var(--card); border: 0; border-radius: var(--radius); padding: 16px; }
.panel h2 { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
dl.facts { margin: 0; display: grid; gap: 8px; }
dl.facts div { display: grid; grid-template-columns: 7em 1fr; gap: 8px; font-size: 14px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
dl.facts small { display: block; color: var(--muted); font-size: 12px; }
.formula { font-weight: 700; background: var(--bg); padding: 12px 14px; border-radius: var(--radius-sm); margin: 0 0 12px; word-break: break-word; }
.notes { margin: 0; padding-left: 1.2em; font-size: 13px; color: var(--muted); }
.notes li { margin-bottom: 4px; }
.more { margin: 12px 0 0; font-size: 14px; }
.more a { color: var(--accent-dark); font-weight: 700; }
.shop-name { margin: 0; font-size: 18px; font-weight: 700; }
details.caption { font-size: 14px; }
details.caption summary { cursor: pointer; color: var(--accent-dark); font-weight: 700; }
details.caption pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; margin: 8px 0 0; font-size: 13px; }

/* 関連・ランキングの簡易一覧 */
.panel-wide { grid-column: 1 / -1; }
.rel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: rank; }
.rel { display: grid; grid-template-columns: auto 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rel:last-child { border-bottom: 0; }
.rel-rank { min-width: 26px; height: 26px; border-radius: 50%; background: var(--fg); color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
/* 上位 3 位は一覧のカードの順位の札と同じ金・銀・銅 */
.rel:nth-child(1) .rel-rank { background: #eab53c; color: #2a2107; }
.rel:nth-child(2) .rel-rank { background: #cdd3d8; color: #2a2107; }
.rel:nth-child(3) .rel-rank { background: #d49a6a; color: #2a2107; }
.rel-list:not(:has(.rel-rank)) .rel { grid-template-columns: 64px minmax(0, 1fr) auto; }
.rel-img { display: flex; width: 64px; height: 64px; border: 0; border-radius: var(--radius-sm); overflow: hidden; background: #fff; align-items: center; justify-content: center; }
.rel-img img { width: 100%; height: 100%; object-fit: contain; }
.rel-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rel-name { font-size: 14px; font-weight: 700; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rel-name:hover { text-decoration: underline; }
.rel-meta { font-size: 12px; color: var(--muted); }
.rel-rate { font-size: 18px; font-weight: 800; color: var(--accent-dark); white-space: nowrap; }
.rel-rate small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); text-align: right; line-height: 1.2; }
.rel-note { margin-left: 6px; color: var(--accent-dark); font-weight: 700; }
.rel-note::before { content: "・"; color: var(--muted); font-weight: 400; }
/* よく見られた・よく選ばれた返礼品（トップは一覧の中、ランキングは上部） */
/* よく見られた・よく選ばれた返礼品（トップとランキング）。昨日いちばん見られた返礼品は黄土色の面で目立たせ、回数はチップにする */
.popular { margin: 16px 0 0; padding: 18px 20px; }
.popular h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px; font-feature-settings: "palt"; }
.popular-range { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.results .popular-yesterday { margin: 0 0 20px; }
.popular-yesterday { background: var(--ochre-soft); }
.popular-yesterday .rel { border-bottom: 0; }
.popular .rel-note { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--soft); font-size: 11px; white-space: nowrap; }
.popular .rel-note::before { content: none; }
.popular-yesterday .rel-note { background: var(--card); }
.detail-views { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.ranking-nav { margin: 0 0 12px; }
.ranking-h2 { font-size: 20px; font-weight: 800; margin: 0 0 12px; }

/* 説明ページ */
.prose { max-width: 800px; margin: 0 auto; font-size: 15px; }
.prose h1 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.prose h2 { font-size: 17px; margin: 24px 0 8px; }
.prose p, .prose li { line-height: 1.75; }

/* フッター */
.site-footer { margin: 32px 0 0; padding: 24px 0; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: var(--well); }
.site-footer p { margin: 0 0 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; font-size: 13px; }
.footer-nav a { color: var(--fg); font-weight: 700; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.index-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.index-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.index-list a { color: var(--accent-dark); font-weight: 700; text-decoration: none; }
.index-list a:hover { text-decoration: underline; }
.index-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.credit a { font-weight: 700; color: var(--fg); }
.copyright { font-weight: 700; }

/* タブレット以下: ヘッダーは 2 段、絞り込みパネルは画面下から出るシート、カテゴリは結果の上に横スクロール */
@media (max-width: 899px) {
  .results { scroll-margin-top: 8px; }
  .toolbar .filters-toggle { display: inline-flex; }
  .toolbar { position: sticky; top: 0; z-index: 15; margin: 0 -16px; padding: 8px 16px; background: rgba(246, 243, 236, 0.96); border-bottom: 1px solid var(--line); }
  .chips.genre-bar { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 10px; padding: 2px 16px; }
  .genre-bar::-webkit-scrollbar { display: none; }
  .genre-bar .chip { flex: none; }
  /* 品目は 20 を超えるカテゴリがあるので、折り返さずに横へ送る（画面の上のほうを品目のチップで埋めない） */
  .leaf-genres { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 2px 16px; }
  .leaf-genres::-webkit-scrollbar { display: none; }
  .leaf-genres .chip, .leaf-genres .chips-label { flex: none; }
  .filters { position: fixed; inset: auto 0 0 0; max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; z-index: 30; border: 0; border-radius: 24px 24px 0 0; transform: translateY(100%); visibility: hidden; transition: transform 0.25s ease, visibility 0s 0.25s; box-shadow: 0 -4px 24px rgba(42, 32, 20, 0.2); }
  .filters.open { transform: none; visibility: visible; transition: transform 0.25s ease; }
  .filters-head { position: sticky; top: 0; z-index: 1; background: var(--card); margin: -16px -16px 0; padding: 18px 12px 8px 20px; border-bottom: 1px solid var(--line); }
  .filters-head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line-strong); }
  .filters-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: var(--radius-sm); }
  .filters .filter { padding: 16px 4px; }
  .filters .chip { padding: 8px 12px; font-size: 14px; }
  .filters select, .range input { padding: 10px 8px; }
  .filter-actions { position: sticky; bottom: 0; flex-direction: row-reverse; background: var(--card); margin: 0 -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .filter-actions .btn-primary { flex: 2; }
  .filter-actions .btn-ghost { flex: 1; }
  .filter-actions .btn { min-height: 48px; padding: 11px 8px; font-size: 15px; }
  body.filters-open { overflow: hidden; }
}

/* スマホ */
@media (max-width: 560px) {
  body { font-size: 14px; }
  .site-header .inner { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 27px; height: 36px; }
  .brand-name { font-size: 17px; }
  .brand-tag { font-size: 10px; }
  .site-nav a { height: 34px; padding: 0 12px; font-size: 13px; }
  .search { height: 44px; }
  .search input { font-size: 16px; }
  .range input, .filters select { font-size: 16px; }
  main { padding: 12px 12px 88px; }
  .results { scroll-margin-top: 8px; }
  .results-head { margin-bottom: 8px; }
  .page-title { font-size: 18px; }
  .lead { font-size: 12px; }
  .genre-bar { margin: 0 -12px 8px; padding: 2px 12px; }
  .leaf-genres { margin: 0 -12px 10px; padding: 2px 12px; }
  .toolbar { margin: 0 -12px; padding: 8px 12px; }
  .sort-select { flex: 1; min-width: 0; padding-left: 14px; }
  .sort-select select { flex: 1; font-size: 16px; }
  .count { margin: 8px 2px 6px; font-size: 13px; }
  /* カード: 画像と商品名を横に並べ、その下に寄付金額・最安値・還元率を 1 段にまとめる */
  .cards { gap: 10px; }
  .pager { gap: 6px; }
  .pg { min-width: 40px; padding: 9px 8px; }
  .pg-prev, .pg-next { padding: 9px 12px; }
  /* 詳細: 寄付・楽天市場のボタンを画面下に固定する */
  .crumbs { margin-bottom: 8px; }
  .detail { padding: 14px; gap: 14px; }
  .detail-media { padding: 4px; }
  .detail-media img { max-width: 240px; }
  .detail-name { font-size: 18px; }
  /* 寄付金額と最安値を左に 1 行ずつ（ラベルと金額）、右に丸いバッジ（一覧のカードと同じ形） */
  .detail-facts { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; margin: 12px 0 10px; }
  .fact { grid-column: 1; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 8px; padding: 8px 12px; }
  .fact b { font-size: 18px; margin-left: auto; }
  .fact small { flex-basis: 100%; text-align: right; }
  .detail-facts .badge { grid-column: 2; grid-row: 1 / span 2; width: 88px; height: 88px; }
  .detail-facts .badge-value { font-size: 21px; }
  .detail-facts .badge small { display: none; }
  .detail-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -2px 12px rgba(60, 45, 20, 0.12); }
  .detail-actions .btn { min-height: 48px; padding: 8px 4px; font-size: 12px; gap: 3px; white-space: normal; line-height: 1.25; }
  .detail-actions .btn-gift { font-size: 14px; }
  /* 固定バーの高さぶん下に余白を取り、フッター（アソシエイトの開示文や楽天のクレジット）が隠れないようにする */
  body.page-detail { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .detail-sections { gap: 12px; margin-top: 12px; }
  .panel { padding: 14px 12px; }
  dl.facts div { grid-template-columns: 1fr; gap: 0; }
  .prose { font-size: 14px; }
  .site-footer { margin-top: 24px; }
}
@media (min-width: 900px) {
  .list-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .filters { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  .detail { grid-template-columns: 400px 1fr; padding: 24px; gap: 32px; }
  .detail-sections { grid-template-columns: 1fr 1fr; }
  .detail-sections .panel:first-child { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .filters { top: 92px; max-height: calc(100vh - 108px); }
}
@media (min-width: 1280px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 控除上限額シミュレーター（/simulator/） */
.sim { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.sim label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.sim input[type="number"], .sim select { font: inherit; font-size: 16px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.sim .sim-check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; grid-column: 1 / -1; }
.sim .sim-check input { margin-top: 3px; }
/* 残りの寄付上限額と、その金額で選べる組み合わせ（combo.js） */
.sim-rest { margin-top: 4px; }
.sim-rest b { color: var(--ochre-ink); }
.combo-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 12px 0; }
.combo-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.combo-form select { font: inherit; font-size: 16px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.combo-form .btn { display: inline-flex; }
.combo-form .btn:disabled { opacity: .6; cursor: progress; }
.combo-result { display: grid; gap: 16px; margin-bottom: 12px; }
.combo { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); }
.combo-head { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.combo-head > b:first-child { display: inline-block; margin-right: 8px; padding: 1px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; }
.combo-price { color: var(--accent-dark); font-size: 16px; }
.combo .rel { border-bottom-color: var(--line-strong); }
.combo-best { background: var(--ochre-soft); box-shadow: inset 0 0 0 2px var(--star); }
.combo-pick { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 8px; font-size: 12px; color: var(--ochre-ink); }
.combo-pick span { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--star); color: #2a2107; font-size: 14px; font-weight: 800; }
.sim-result { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.sim-limit { margin: 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sim-limit span { font-size: 13px; color: var(--muted); }
.sim-limit b { font-size: 28px; color: var(--accent-dark); }
.sim-go { margin: 12px 0 8px; }
.sim-go .btn { display: inline-flex; }
.sim-detail, .sim-none { margin: 0; font-size: 12px; color: var(--muted); }
.sim-table-wrap { overflow-x: auto; }
.sim-table { border-collapse: collapse; width: 100%; font-size: 14px; white-space: nowrap; }
.sim-table th, .sim-table td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: right; }
.sim-table thead th { font-size: 12px; color: var(--muted); font-weight: 600; }
.sim-table tbody th { text-align: left; }
.sim-cta { display: flex; align-items: center; gap: 12px 20px; margin: 0 0 12px; padding: 16px 20px; border: 0; border-radius: var(--radius); background: var(--ochre-soft); }
.sim-cta-text { flex: 1; min-width: 0; }
.sim-cta-text p { margin: 0; font-size: 13px; line-height: 1.6; }
.sim-cta-text .sim-cta-title { margin-bottom: 2px; font-size: 17px; font-weight: 800; color: var(--accent-dark); }
.sim-cta-btn { flex: none; display: inline-flex; padding: 10px 18px; font-size: 15px; }
@media (max-width: 560px) {
  .sim-cta { flex-direction: column; align-items: stretch; padding: 12px; }
  .sim-cta-btn { justify-content: center; }
}

/* 受付終了が近い返礼品（/deadline/）への案内と、詳細ページの受付終了日 */
.deadline-cta { margin: 0 0 12px; }
.deadline-cta a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 16px; border: 0; box-shadow: inset 0 0 0 1px #f0cbc6; border-radius: var(--radius); background: #fff; color: var(--fg); text-decoration: none; font-size: 14px; font-weight: 600; }
.deadline-cta a:hover { background: var(--bg); }
.deadline-cta b, .deadline-note b { color: var(--danger); }
.deadline-note { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 14px; }
.deadline-note a { font-size: 13px; }

/* 型番ごとの比較ページ（/model/<型番>/）と詳細からのリンク */
.model-table td:last-child, .model-table th[scope="row"] { text-align: left; white-space: normal; }
.model-table tr.best { background: var(--soft); }
.best-label { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.model-link { margin: 0; font-size: 14px; font-weight: 600; }

/* 還元率の動き（/topics/ と /topics/<日付>/。src/lib/site/topics.ts） */
.topic-cta { margin: 0 0 12px; }
.topic-cta a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 16px; border: 0; border-radius: var(--radius); background: #fff; color: var(--fg); text-decoration: none; font-size: 14px; font-weight: 600; }
.topic-cta a:hover { background: var(--soft); }
.topic-cta b { color: var(--accent-dark); }
/* 列は minmax(0, 1fr)。指定しないと中の広い表（折り返さない）に合わせて記事ごと画面より広がり、スマホで横にはみ出す */
.topic { max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.topic-head .page-title { font-size: 24px; }
.topic-sub { margin: 6px 0 0; font-size: 16px; font-weight: 700; color: var(--accent-dark); }
.topic-meta { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.topic-eyecatch { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 0; background: #fff; }
.topic-section h2 { font-size: 17px; margin-bottom: 6px; }
.topic-lead { margin: 0 0 10px; font-size: 14px; line-height: 1.7; }
.topic-stats { width: 100%; border-collapse: collapse; font-size: 14px; }
.topic-stats th, .topic-stats td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.topic-stats th[scope="row"], .topic-stats thead th:first-child { text-align: left; }
.topic-stats thead th { font-size: 12px; color: var(--muted); font-weight: 600; }
.topic-move .rel-body { gap: 3px; }
.topic-change { font-size: 13px; }
.topic-change b { color: var(--accent-dark); }
.topic-change small { display: block; color: var(--muted); font-size: 12px; }
.topic-delta { font-size: 17px; font-weight: 800; white-space: nowrap; }
.topic-delta.up { color: var(--accent-dark); }
.topic-delta.down { color: var(--danger); }
.topic-delta.new { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: #fff; letter-spacing: 0.04em; }
/* 週のまとめ・データ分析の表（カテゴリ名などの列が長いので、狭い画面では表だけ横に送る） */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.topic-stats td small, .topic-stats th small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.analysis-table td small a { color: inherit; }
/* 「最高」の列の製品名は折り返す（表の幅を製品名で広げない） */
.analysis-table td:last-child { white-space: normal; min-width: 7em; }
.analysis .facts { margin: 8px 0 0; }
/* 金の返礼品の特集の一覧: 右端に寄付額と地金の割合を縦に並べる（「寄付 99万円 → 24.5%」と一緒に読めるように）。左は地金の価値 */
.gold-value { font-size: 13px; color: var(--accent-dark); font-weight: 600; }
.gold-share { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.gold-donation { font-size: 12px; color: var(--muted); white-space: nowrap; }
.gold-donation b { font-size: 15px; font-weight: 800; color: var(--fg); }
.gold-share small { font-size: 10px; color: var(--muted); white-space: nowrap; }
/* 金の価格の推移のチャート（src/lib/site/gold.ts の goldChart。インラインの SVG） */
.gold-chart { margin: 4px 0 14px; }
.gold-chart svg { display: block; width: 100%; height: auto; }
.gold-chart .grid { stroke: var(--line); stroke-width: 1; }
.gold-chart .axis { font-size: 12px; fill: var(--muted); }
.gold-chart .area { fill: #f5c542; opacity: 0.18; }
.gold-chart .line { fill: none; stroke: #c9971a; stroke-width: 3; stroke-linejoin: round; }
.gold-chart .latest-link { stroke: #c9971a; stroke-width: 2; stroke-dasharray: 4 4; }
.gold-chart .dot { fill: #c9971a; }
.gold-chart .dot.latest { fill: var(--accent-dark); }
.gold-chart .note { font-size: 13px; font-weight: 700; fill: var(--fg); }
.gold-chart .note.latest { fill: var(--accent-dark); }
.gold-chart figcaption { margin-top: 4px; font-size: 12px; color: var(--muted); }
.topic-links { display: grid; gap: 8px; font-size: 14px; }
.topic-links p { margin: 0; }
.topic-around { display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 560px) {
  .topic-head .page-title { font-size: 20px; }
  .topic-sub { font-size: 15px; }
  .topic-stats th, .topic-stats td { padding: 6px 4px; font-size: 13px; }
  .topic-delta { font-size: 15px; }
}

/* 特集（src/lib/site/features.ts）: カード、一覧、記事の下部の回遊枠、トップの特集枠 */
.feature-card { display: flex; flex-direction: column; background: var(--card); border: 0; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--fg); min-width: 0; }
.feature-card:hover { box-shadow: 0 4px 16px rgba(60, 45, 20, 0.1); }
.feature-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }
.feature-card-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.feature-card-body b { color: var(--fg); font-size: 15px; line-height: 1.4; }
.feature-meta { font-size: 12px; color: var(--accent-dark); font-weight: 600; }
.feature-large .feature-card-body b { font-size: 18px; }
.feature-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.feature-block { margin: 0 0 18px; }
.feature-block h2 { font-size: 17px; margin: 0 0 8px; }
.feature-footer { margin-top: 16px; }
.feature-footer .feature-block:last-of-type { margin-bottom: 8px; }
/* 節の見出し（トップの特集・カテゴリなど）: 左に見出し、右に「すべて見る」 */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.section-head h2 { font-size: 18px; font-weight: 800; font-feature-settings: "palt"; }
.section-head a { font-size: 14px; font-weight: 700; color: var(--accent); }
/*
 * トップの特集枠（features.ts の renderTopFeatures）: PC は左に注目（大）、右に小 2 件と寄付上限額のカード。スマホは縦に並べ、小 2 件は横に 2 つ。
 * 画像は 16:9 のまま（高さに合わせて引き伸ばすと cover で左右が切れ、アイキャッチの文字が欠ける）
 */
.top-features { margin: 4px 0 24px; }
.top-features-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.top-features-side { display: flex; flex-direction: column; gap: 14px; }
.top-features-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.top-features-pair .feature-card-body { padding: 8px 10px 10px; }
.top-features-pair .feature-card-body b { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.top-features-pair .feature-card-body span:not(.feature-meta) { display: none; }
.feature-large .feature-card-body { padding: 12px 16px 14px; }
.feature-large .feature-card-body span:not(.feature-meta) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 寄付上限額のカード（特集枠の右下） */
.top-sim { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--ochre-soft); color: var(--fg); text-decoration: none; }
.top-sim:hover { box-shadow: 0 4px 16px rgba(60, 45, 20, 0.1); }
.top-sim-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: var(--card); color: var(--ochre-ink); }
.top-sim-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.top-sim-text b { font-size: 16px; }
.top-sim-text span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.top-sim-go { flex: none; display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--fg); color: #fff; font-size: 13px; font-weight: 700; }
/* トップの「カテゴリから探す」（html.ts の renderCategoryTiles）。スマホは 2 段で横に送る */
.cat-tiles { margin: 0 0 24px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 104px; padding: 10px 6px; border-radius: 18px; background: var(--card); color: var(--fg); text-align: center; text-decoration: none; }
.cat-tile:hover { box-shadow: 0 4px 16px rgba(60, 45, 20, 0.1); }
.cat-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ochre-soft); color: var(--ochre-ink); }
.cat-name { font-size: 12px; font-weight: 700; line-height: 1.3; }
.cat-count { font-size: 11px; color: var(--muted); }
.chips.genre-bar[hidden] { display: none; }
@media (max-width: 899px) {
  .top-features-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .top-features-pair { gap: 10px; }
  .top-sim { flex-wrap: wrap; padding: 14px; }
  .top-sim-go { width: 100%; justify-content: center; }
  .cat-grid { grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-template-columns: none; grid-auto-columns: 96px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .cat-grid::-webkit-scrollbar { display: none; }
  .cat-tile { min-height: 96px; }
  .section-head h2 { font-size: 17px; }
}
