/* ふるさと量くらべ — 2026-11-04 見た目の作り直し(計量シールと目盛り)
   方針: 目立たせるのは「返礼品ごとの1万円あたりの量」=計量シール(黄色地・黒い数字)だけ。ほかは静かに。
   黄色はシールとフォーカスだけ。若竹色(緑)はロゴ・リンク・姉妹サイト欄だけ。角丸は シール2px / 操作4px / 箱6px。 */
/* BIZ UDPゴシックは数字が等幅にならない(tabular-nums が効かない)ので、数字(0-9)だけ同じデザインの BIZ UDゴシック(等幅)を端末から使う。
   ダウンロードはしない(local だけ)。入っていない端末では次のフォントへ進む */
@font-face { font-family: "UD Digits"; src: local("BIZ UDGothic"), local("BIZUDGothic-Regular"); font-weight: 400; unicode-range: U+0030-0039; }
@font-face { font-family: "UD Digits"; src: local("BIZ UDGothic Bold"), local("BIZUDGothic-Bold"); font-weight: 700; unicode-range: U+0030-0039; }
:root {
  --paper: #f7f8f6; --surface: #fff; --surface-2: #eef1ef; --ink: #1e2421; --muted: #4f5953; --faint: #5c6660;
  --rule: #d6dcd8; --rule-strong: #8c9690; --tick: #59645e;
  --green: #0b6e4f; --green-strong: #08583f; --hit: #e6f0ea;
  --seal: #f2c200; --seal-ink: #1e2421;
  --meter: #75837b; --meter-top: #1e2421; --warn: #b42318; --gold: #8a5300;
  --r-seal: 2px; --r-ctl: 4px; --r-card: 6px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  /* 本文はWebフォントを読まず端末の日本語ゴシック(BIZ UDPゴシックが入っているPCはそれを使う。数字だけは等幅の UD Digits) */
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "UD Digits", "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", sans-serif;
  --serif: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #121614; --surface: #1a1f1c; --surface-2: #232a26; --ink: #e6eae7; --muted: #b0bab4; --faint: #a0aba5;
    --rule: #2f3833; --rule-strong: #66726b; --tick: #a0aba5;
    --green: #5cc79c; --green-strong: #86d8b6; --hit: #1d2c25;
    --meter: #8d9a93; --meter-top: #e6eae7; --warn: #ff8a80; --gold: #e3ab4f; }
}

/* ---------- 基本 ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
a { color: var(--green); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--green-strong); text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
/* 見出し: h1・h2 だけ明朝(産地の箱の文字の声)。本文と数字は端末のゴシック */
h1, h2 { font-family: var(--serif); font-feature-settings: "palt"; letter-spacing: .03em; }
/* 見出しの最後の1〜2文字だけが次の行に落ちる(「比べ / る」)のを防ぐ。本文は行末の孤立を減らす(対応していないブラウザは今までどおり) */
h1, h2, h3, .others-h, figcaption { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
h1 { font-size: 28px; font-weight: 900; line-height: 1.35; margin: var(--s2) 0 var(--s3); }
h2 { font-size: 21px; font-weight: 700; line-height: 1.45; margin: 0 0 var(--s3); }
h2 small { display: block; margin-top: 2px; font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
h3 { font-size: 16px; line-height: 1.5; margin: var(--s5) 0 var(--s2); }
p { margin: 0 0 var(--s3); }
main p, .prose li, .tips li, .guide li, .method li, .result li { max-width: 40em; }   /* 1行は全角40字まで */
ul { padding-left: 1.3em; }
li { margin-bottom: var(--s1); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; display: inline-flex; align-items: center; min-height: 44px; background: var(--surface); padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* フォーカス: シールと同じ黄色+墨の縁(明るい背景でも見える) */
:focus-visible { outline: 3px solid var(--seal); outline-offset: 2px; box-shadow: 0 0 0 5px #1e2421; border-radius: 2px; }
.nw { display: inline-block; }
.note { font-size: 13px; color: var(--faint); line-height: 1.65; }
.lead { color: var(--muted); }
.eyebrow { margin: 0; color: var(--muted); font-weight: 700; font-size: 14px; }
.sec { margin: var(--s7) 0; }
.warn { color: var(--warn); }
.empty { color: var(--muted); }
.hint { margin: 0; color: var(--muted); }
.pc-only { display: none; }

/* ボタン: 四角く、動詞で。主=墨の塗り、副=枠線 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: var(--r-ctl); background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--green-strong); color: #fff; text-decoration: none; }
.btn .n { font-weight: 400; font-size: 13px; opacity: .85; font-variant-numeric: tabular-nums; }
.btn-sub { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 8px 18px; border-radius: var(--r-ctl); border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-sub:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- ヘッダー ---------- */
.topbar { padding: 3px 16px; font-size: 12px; line-height: 1.6; background: #1e2421; color: #e3e8e5; }
.topbar strong { color: var(--seal); }
.wrap { max-width: 1040px; margin: 0 auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); padding: 10px 16px 0; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 4px 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); text-decoration: none; }
.logo-mark { width: 36px; height: 36px; flex: none; }
.logo-mark rect { fill: var(--green); }
.logo-mark path { fill: #fff; }
.logo-name { display: block; font-size: 21px; font-weight: 700; line-height: 1.25; font-feature-settings: "palt"; letter-spacing: .04em; white-space: nowrap; }
.logo-sub { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
.deadline { margin: 0; font-size: 14px; white-space: nowrap; text-align: right; }
.deadline strong { color: var(--ink); }
.dl-short { display: none; }
.dl-days { display: inline-block; margin-left: 6px; padding: 0 8px; border: 1px solid var(--ink); border-radius: var(--r-seal); font-weight: 700; font-variant-numeric: tabular-nums; }
.deadline.soon .dl-days { background: var(--warn); border-color: var(--warn); color: #fff; }
.main-nav { margin: 6px -16px 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
.main-nav::-webkit-scrollbar { display: none; }
.nav-scroll { display: flex; gap: 2px; padding: 0 32px 0 10px; white-space: nowrap; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; border-bottom: 3px solid transparent; }
.main-nav a:hover { color: var(--green); }
.main-nav a[aria-current] { border-color: var(--green); color: var(--green); }

main { max-width: 1040px; margin: 0 auto; padding: var(--s3) 16px var(--s5); }
.crumbs { margin: -7px 0 -5px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }   /* 押せる高さ44px(上下は負の余白で詰める) */

/* ---------- 計量シール(返礼品1つの「寄付額1万円あたりの量」) ----------
   黄色地・黒い数字。右に罫で区切った小さな欄(単位/「/1万円」)。スーパーの計量ラベルの形 */
.seal { display: inline-grid; grid-template-columns: auto auto; grid-template-areas: "v u" "v p"; vertical-align: middle;
  background: var(--seal); color: var(--seal-ink); border: 1.5px solid var(--seal-ink); border-radius: var(--r-seal);
  line-height: 1; font-variant-numeric: tabular-nums; }
.seal-v { grid-area: v; align-self: center; padding: 5px 8px 4px 9px; font-size: 27px; font-weight: 700; letter-spacing: -.01em; border-right: 1px solid var(--seal-ink); }
.seal-u { grid-area: u; display: flex; align-items: center; padding: 4px 7px 3px; font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--seal-ink); }
.seal-p { grid-area: p; display: flex; align-items: center; padding: 3px 7px 4px; font-size: 12px; font-weight: 700; }
.seal.s-m .seal-v { font-size: 30px; padding: 6px 9px 5px 10px; }
.seal.s-s .seal-v { font-size: 20px; padding: 4px 7px 3px 8px; }
.seal.s-s .seal-u { font-size: 13px; padding: 2px 6px; }
.seal.s-s .seal-p { font-size: 12px; padding: 2px 6px; }

/* ---------- 目盛り(ランキングの各行) ----------
   上の帯 = この返礼品の量(いちばん多いもの=100%)。下 = 10%ごとの目盛り、50%と100%は長い目盛り。縦の線 = 中央値 */
.r-bar { position: relative; display: block; max-width: 260px; height: 15px; margin: 9px 0 3px; }
.r-bar i { position: absolute; left: 0; top: 0; height: 6px; background: var(--meter); }
.row.top .r-bar i { background: var(--meter-top); }
.r-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 9px; border-top: 1px solid var(--tick);
  background:
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 10%) 0 0 / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 50%) 0 0 / 100% 8px no-repeat,
    linear-gradient(var(--tick), var(--tick)) 100% 0 / 1px 8px no-repeat; }
.list[style*="--mid"] .r-bar::after { content: ""; position: absolute; left: var(--mid); top: -3px; height: 18px; width: 2px; margin-left: -1px; background: var(--ink); box-shadow: 0 0 0 1px var(--paper); }

/* ---------- カテゴリページ: 見出し ---------- */
.cat-head { margin-bottom: var(--s3); }
.cat-h1 { font-size: clamp(22px, 6.6vw, 26px); margin: 0 0 var(--s2); }
.cat-h1 .nw { max-width: 100%; }  /* 狭い画面では「1万円あたりの量ランキング」の中でも折り返せるように */
.cat-sub { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.65; }
.upd { display: block; margin-top: 2px; font-size: 12px; color: var(--faint); }
.upd span { margin-left: .6em; padding-left: .6em; border-left: 1px solid var(--rule-strong); }
.cat-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 16px; margin-top: var(--s3); padding: 8px 12px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--rule); }
.cat-stats p { margin: 0; }
.cs-k { flex-basis: 100%; font-size: 12px; color: var(--muted); font-weight: 700; line-height: 1.5; }
.cs-nums { display: flex; margin: 0; }
.cs-nums div { padding: 0 14px; border-left: 1px solid var(--rule); }
.cs-nums div:first-child { padding-left: 0; border-left: 0; }
.cs-nums div { display: flex; align-items: baseline; gap: 6px; }
.cs-nums dt { font-size: 12px; color: var(--muted); line-height: 1.4; }
.cs-nums dd { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.cs-nums div + div dd { font-weight: 400; color: var(--muted); }
.cs-note { font-size: 12px; color: var(--faint); line-height: 1.6; }
.cs-nums + .cs-note { flex-basis: auto; }
.cs-note a { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0; font-weight: 700; }

.cat-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 var(--s3); font-size: 13px; line-height: 1.6; color: var(--muted); }
.cat-note .i { flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 2px; border-radius: var(--r-seal); border: 1.5px solid var(--gold); color: var(--gold); font: 700 11px/1 var(--sans); }

/* ---------- 絞り込み ---------- */
.tools { display: grid; gap: var(--s2); margin: 0 0 var(--s3); }
.tools[hidden] { display: none; }
.js .tools[hidden] { display: grid; }   /* JavaScriptが動く環境では最初から場所を取っておく(表示のずれを防ぐ) */
.chips { display: flex; gap: 6px; margin: 0 -16px; padding: 2px 16px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; font: inherit; font-size: 14px; min-height: 44px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); white-space: nowrap; cursor: pointer; }
.chips button:hover { border-color: var(--ink); }
.chips .n { margin-left: 6px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700; }
.chips button[aria-pressed="true"] .n { color: inherit; opacity: .8; }
.filters { border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--surface); }
.filters summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 700; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary::before { content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 0 2px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
.filters[open] summary::before { transform: rotate(45deg); margin-top: -4px; }
.f-state { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; font-size: 13px; color: var(--green); }
.f-panel { padding: 0 12px 12px; border-top: 1px solid var(--rule); }
.tool-row { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; padding-top: 8px; font-size: 14px; }
.tools select { font: inherit; font-size: 14px; min-height: 44px; max-width: 100%; padding: 6px 8px; border-radius: var(--r-ctl); border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); }
.chk { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; line-height: 1.5; cursor: pointer; }
.chk input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }
.chk small { display: block; font-size: 12px; color: var(--faint); }

/* ---------- ランキングの行 ---------- */
.list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: var(--s5) 0 4px; }
.list-h { margin: 0; font-size: 18px; letter-spacing: .01em; }
.count { margin: 0; font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.pr-line { margin: 0 0 4px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.jump + .pr-line { margin-top: var(--s3); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin: 0 0 var(--s2); font-size: 12px; color: var(--faint); line-height: 1.7; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { position: relative; flex: none; display: inline-block; width: 30px; height: 12px; }
.lg-bar i { position: absolute; left: 0; top: 0; width: 70%; height: 5px; background: var(--meter); }
.lg-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 7px; border-top: 1px solid var(--tick);
  background: repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 10%) 0 0 / 100% 4px no-repeat, linear-gradient(var(--tick), var(--tick)) 100% 0 / 1px 7px no-repeat; }
.lg-mid { flex: none; display: inline-block; width: 2px; height: 14px; background: var(--ink); }
.list { list-style: none; margin: 0; padding: 0; counter-reset: r; border-top: 1px solid var(--ink); }
/* 画面の外の行は、見えるところまで来てから描く(191行あるページでも最初の表示と絞り込みの反応を軽く。高さは一度描いた値を覚える) */
.list > .row:nth-child(n+5) { content-visibility: auto; contain-intrinsic-size: auto 260px; }
@media (min-width: 641px) { .list > .row:nth-child(n+5) { contain-intrinsic-size: auto 150px; } }
.row { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto;
  grid-template-areas: "img pm pm" "img name name" "meta meta meta" "facts facts facts" "badges badges cta";
  column-gap: 12px; padding: 16px 0 12px; border-bottom: 1px solid var(--rule); counter-increment: r; scroll-margin-top: 16px; }
.row[hidden] { display: none; }
/* 順位: 小さな四角の番号。上位3つは墨の塗り */
.row::before { content: counter(r); position: absolute; left: -6px; top: 10px; z-index: 1; min-width: 24px; height: 24px; padding: 0 5px; border-radius: var(--r-seal); display: grid; place-items: center; font-size: 13px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); }
.row.top::before { background: var(--ink); color: var(--paper); }
.row.hit { background: var(--hit); box-shadow: -16px 0 0 var(--hit), 16px 0 0 var(--hit); }
.r-img { grid-area: img; align-self: start; }
.r-img img, .r-img .noimg { display: grid; place-items: center; width: 76px; height: 76px; object-fit: contain; border-radius: var(--r-card); background: #fff; border: 1px solid var(--rule); font-size: 30px; }
.r-pm { grid-area: pm; min-width: 0; }
.r-name { grid-area: name; margin: 0; font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r-name a { color: var(--ink); text-decoration: none; }
.r-name a:hover { text-decoration: underline; color: var(--ink); }
.r-meta { grid-area: meta; margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.stars { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.rc { margin-left: 2px; font-weight: 400; color: var(--muted); }
.stars.thin { color: var(--faint); font-weight: 400; }
.norev { color: var(--faint); }
/* 表示ラベル(産地・寄付額・内容量・1kgあたり): 産地の箱の印刷欄のような罫の表 */
.r-facts { grid-area: facts; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 6px 0 0; border: 1px solid var(--rule-strong); border-radius: var(--r-seal); background: var(--rule-strong); overflow: hidden; }
.r-facts div { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 8px; padding: 4px 8px; background: var(--surface); }
.r-facts dt { font-size: 12px; color: var(--muted); line-height: 1.45; white-space: nowrap; }
.r-facts dd { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.4; text-align: right; font-variant-numeric: tabular-nums; }
.r-facts .f-town dd { font-weight: 400; }
.r-facts dd small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.badges { grid-area: badges; display: flex; flex-wrap: wrap; align-content: center; gap: 4px; margin: 8px 0 0; min-width: 0; }
.bd { font-size: 12px; line-height: 1.6; padding: 0 6px; border-radius: var(--r-seal); background: var(--surface); border: 1px solid var(--rule-strong); color: var(--muted); white-space: nowrap; }
.bd.var { color: var(--ink); border-color: var(--ink); }
.bd.ship { border-color: var(--gold); color: var(--gold); }
.bd.ship.ok { border-color: var(--green); color: var(--green); font-weight: 700; }
.bd.warn { border-color: var(--warn); color: var(--warn); }
.r-cta { grid-area: cta; justify-self: end; align-self: end; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: 8px 0 0 8px; padding: 0 12px; border: 1px solid var(--green); border-radius: var(--r-ctl); background: var(--surface); color: var(--green); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.r-cta:hover { background: var(--green); color: #fff; text-decoration: none; }
.more-box { margin: var(--s4) 0; text-align: center; }
.more-box[hidden] { display: none; }
.more-box .btn-sub { min-width: 240px; }
#more-n { font-weight: 400; color: var(--muted); font-size: 13px; }
/* 右下だと各行の「楽天で見る」に重なるため、画像の列(押す所なし)がある左下に置く */
.to-filter { position: fixed; left: 12px; right: auto; bottom: 12px; z-index: 20; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px; border-radius: var(--r-ctl); background: var(--ink); color: var(--paper); font-weight: 700; font-size: 13px; text-decoration: none; border: 1px solid var(--paper); }
.to-filter:hover { color: var(--paper); background: var(--green-strong); }
.to-filter[hidden] { display: none; }
.f-clear { margin: 6px 0 0; }
.f-clear .link-btn { min-height: 40px; padding: 4px 0; border: 0; background: none; color: var(--green-strong); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.k-quick { margin: 4px 0 0; font-size: 15px; }
.k-quick[hidden] { display: none; }
.k-quick a { display: inline-flex; align-items: center; min-height: 40px; }
.empty-box { margin: var(--s4) 0; padding: var(--s5) var(--s4); border-radius: var(--r-card); background: var(--surface); border: 1px dashed var(--rule-strong); text-align: center; }
.empty-box[hidden] { display: none; }
.empty-box p { margin-left: auto; margin-right: auto; }
.empty-box small { color: var(--muted); }

/* ランキングの下 */
.guide { scroll-margin-top: 12px; }
.guide ul { margin: 0; padding: var(--s3) var(--s4) var(--s3) 2.2em; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--rule); }
.guide li { margin-bottom: 6px; }
.sister-line { margin: var(--s4) 0; padding: 10px 14px; border-left: 3px solid var(--rule-strong); background: var(--surface); font-size: 14px; line-height: 1.65; }
.method { margin: var(--s5) 0; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--surface); }
.method[open] { padding-bottom: 6px; }
.method summary, .adv summary, .faq summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; }
.method summary::-webkit-details-marker, .adv summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.method summary::after, .adv summary::after, .faq summary::after { content: "＋"; flex: none; color: var(--ink); font-weight: 700; }
.method[open] summary::after, .adv[open] summary::after, .faq[open] summary::after { content: "−"; }
.method li { font-size: 14px; }
.others { margin: var(--s6) 0 0; }
.others-h { margin: 0 0 var(--s2); font-size: 17px; }
.others-list { display: flex; flex-wrap: wrap; gap: 6px; }
.others a, .others-list a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--rule); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; }
.others-list a.same { border-color: var(--rule-strong); font-weight: 700; }
.others a:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- トップ ---------- */
.hero { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); padding: var(--s2) 0 0; }
.hero h1 { margin: 0 0 var(--s3); font-size: 27px; letter-spacing: .01em; }
.hero .lead { margin: 0 0 var(--s3); font-size: 15px; line-height: 1.75; max-width: 30em; }
/* 更新日と件数: 小さな罫の欄 */
.fresh { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; margin: 0; padding: 6px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 13px; line-height: 1.5; max-width: 30em; }
.fresh div { display: contents; }
.fresh dt { color: var(--muted); }
.fresh dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.fresh dd small { margin-left: 4px; font-weight: 400; color: var(--muted); }
.hero-km { margin: var(--s2) 0 0; font-size: 14px; }
.ye { margin: var(--s2) 0 0; }
.ye-k { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ye-l { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; counter-reset: ye; }
.ye-l li { margin: 0; counter-increment: ye; }
.ye-l a { display: grid; align-content: center; min-height: 52px; height: 100%; padding: 6px 8px 6px 28px; position: relative; border: 1px solid var(--rule-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); text-decoration: none; line-height: 1.35; }
.ye-l a::before { content: counter(ye); position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 10px; font-weight: 700; }
.ye-l a:hover { border-color: var(--ink); }
.ye-l b { font-size: 14px; }
.ye-l small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media print { .ye { display: none; } }
.hero-km a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
/* 最初の画面の比較: 同じ目盛りの上に「いちばん多い」と「中央値」 */
.spread { margin: 0; padding: var(--s4); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--rule); color: var(--ink); }
.spread figcaption { margin-bottom: var(--s3); font-size: 14px; color: var(--muted); line-height: 1.5; }
.spread figcaption b { font-family: var(--serif); font-size: 19px; color: var(--ink); margin-right: 6px; }
.spread figcaption small { display: block; font-size: 12px; color: var(--faint); }
.meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 12px; }
.m-l { font-size: 14px; color: var(--muted); line-height: 1.3; }
.m-t { grid-column: 1 / -1; position: relative; display: block; height: 12px; margin-bottom: 10px; }
.m-t i { display: block; height: 100%; background: var(--meter); }
.m-t.top i { background: var(--meter-top); }
.m-v { justify-self: end; padding-right: 2px; font-size: 21px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-scale { grid-column: 1 / -1; position: relative; height: 30px; margin: -8px 0 0; border-top: 1px solid var(--tick);
  background: repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px var(--minor)) 0 0 / 100% 4px no-repeat; }
.m-scale span { position: absolute; top: 0; transform: translateX(-50%); padding-top: 10px; font-size: 12px; line-height: 1.2; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-scale span::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 8px; background: var(--tick); }
.m-scale small { font-size: 12px; margin-left: 1px; }
.m-scale span:first-child { transform: none; }   /* 単位は物差しのように0の横に書く */
.m-scale span:first-child::before { left: 0; }
.sp-x { margin: var(--s3) 0; font-size: 15px; line-height: 1.6; }
.sp-x strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.sp-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 12px; align-items: start; padding-top: var(--s3); border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.sp-item:hover { color: var(--ink); text-decoration: none; }
.sp-item img { width: 64px; height: 64px; object-fit: contain; border-radius: var(--r-card); background: #fff; border: 1px solid var(--rule); }
.sp-name { font-size: 14px; font-weight: 700; line-height: 1.5; }
.sp-k { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.sp-item:hover .sp-name { text-decoration: underline; }
.sp-lab { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .8fr); gap: 1px; border: 1px solid var(--rule-strong); border-radius: var(--r-seal); background: var(--rule-strong); overflow: hidden; }
.sp-lab > span { display: grid; padding: 3px 8px 4px; background: var(--surface); font-size: 13px; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; min-width: 0; }
.sp-lab small { font-size: 12px; font-weight: 400; color: var(--muted); }
.sp-go { margin: var(--s3) 0 0; }
.sp-go .btn { width: 100%; }
/* 人気のカテゴリ: 罫で区切った一覧(カードを並べない) */
.hero-chips { min-width: 0; }
.hc-h { margin: 0 0 var(--s2); font-size: 17px; }
.hc-h small { font-size: 12px; }
.hc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--rule); overflow: hidden; }
.hchip { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; align-items: center; min-height: 56px; padding: 6px 10px; background: var(--surface); color: var(--ink); text-decoration: none; line-height: 1.3; }
.hchip:hover { color: var(--ink); background: var(--hit); text-decoration: none; }
.hc-i { grid-row: span 2; font-size: 19px; }
.hc-n { font-size: 13px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.hchip b { font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hchip b small { font-size: 12px; font-weight: 400; color: var(--muted); margin-right: 3px; }
.hchip.all { grid-column: 1 / -1; min-height: 44px; display: flex; justify-content: center; color: var(--green); font-weight: 700; font-size: 14px; }
.hchip.all:hover { color: var(--green-strong); }
@media (max-width: 400px) { .hchip { padding: 6px 8px; column-gap: 4px; } .hc-i { font-size: 16px; } .hc-n { font-size: 12px; } .hchip b { font-size: 14px; } .hchip b small { display: none; } }
/* 見方(3ステップ。順番があるので番号つき) */
.step-list { list-style: none; margin: 0; padding: 0; display: grid; counter-reset: st; border-top: 1px solid var(--rule); }
.step-list li { position: relative; display: grid; margin: 0; padding: 12px 0 12px 44px; border-bottom: 1px solid var(--rule); counter-increment: st; line-height: 1.55; }
.step-list li::before { content: counter(st); position: absolute; left: 0; top: 12px; width: 28px; height: 28px; border-radius: var(--r-seal); display: grid; place-items: center; border: 1px solid var(--ink); font-weight: 700; font-size: 14px; }
.step-list b { font-size: 15px; }
.step-list span { font-size: 13px; color: var(--muted); }
/* ピックアップ */
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pick-w { display: grid; grid-template-rows: 1fr auto; gap: 6px; min-width: 0; }
.pick-w .p-go { grid-area: auto; justify-self: stretch; align-self: end; justify-content: center; margin: 0; }
.pick { display: grid; align-content: start; gap: 4px; padding: 12px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.pick:hover { color: var(--ink); border-color: var(--ink); text-decoration: none; }
.pick:hover .p-name { text-decoration: underline; }
.p-img img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: var(--r-ctl); background: #fff; }
.p-cat { font-size: 12px; color: var(--muted); font-weight: 700; }
.p-rank { margin-left: 6px; padding: 0 5px; border: 1px solid var(--rule-strong); border-radius: var(--r-seal); color: var(--ink); font-weight: 400; }
.p-name { font-weight: 700; line-height: 1.5; }
.p-pm { margin: 2px 0; }
.p-meta { display: flex; flex-wrap: wrap; gap: 0 14px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.p-meta small { margin-right: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.p-rev { font-size: 12px; }
.pick .bd { justify-self: start; margin-top: 2px; }
/* 控除上限(かんたん版) */
.kojo-mini { padding: var(--s4); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--rule); }
.km[hidden], .km-static[hidden] { display: none; }
.km-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.km-l { font-weight: 700; }
.km .in { flex: 1 1 180px; }
.km-res { margin-top: 8px; padding: 12px; border-radius: var(--r-ctl); background: var(--surface-2); }
.km-res .big { margin: 0; font-weight: 700; }
.km-res .big strong { font-size: 28px; margin-left: 4px; font-variant-numeric: tabular-nums; }
.km-res .sub { margin: 4px 0; font-size: 14px; }
.km-res .warn { margin: 0; }
.go-l { margin: 6px 0 4px; font-size: 13px; font-weight: 700; }
.km-more { margin: 12px 0 0; }
.km-static { margin: 0; }
/* カテゴリの早見表: 罫で区切った表 */
.g-h { margin: 24px 0 8px; font-size: 15px; scroll-margin-top: 12px; }
.crows { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--rule); overflow: hidden; }
.crows li { margin: 0; background: var(--surface); }
.crow { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 4px 14px; align-items: center; min-height: 62px; padding: 6px 14px 6px 6px; color: var(--ink); text-decoration: none; }
.crow:hover { color: var(--ink); background: var(--hit); text-decoration: none; }
.crow:hover .c-name { text-decoration: underline; }
.crow img, .c-ico { width: 48px; height: 48px; object-fit: contain; border-radius: var(--r-ctl); background: #fff; }
.c-ico { display: grid; place-items: center; font-size: 26px; background: var(--surface-2); }
.c-name { font-weight: 700; line-height: 1.35; min-width: 0; }
.c-name small { display: block; font-size: 12px; font-weight: 400; color: var(--faint); }
.c-top, .c-mid { display: grid; text-align: right; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-top small, .c-mid small { font-size: 12px; color: var(--faint); }
.c-top strong { font-size: 17px; }
.c-mid { font-size: 14px; color: var(--muted); padding-left: 14px; border-left: 1px solid var(--rule); }
.tips { padding-left: 1.3em; }
.tips li { margin-bottom: 10px; }
.days-left b { color: var(--warn); }
.facts-grid { display: grid; gap: 1px; margin: 0 0 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--rule); overflow: hidden; }
.facts-grid > div { padding: 10px 12px; background: var(--surface); }
.facts-grid dt { font-size: 12px; color: var(--muted); }
.facts-grid dd { margin: 0; font-weight: 700; }
.facts-grid dd small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }

/* ---------- 控除上限シミュレーター ---------- */
.calc { margin: 12px 0 20px; padding: var(--s4); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--rule); }
.field { display: grid; gap: 6px; margin-bottom: 16px; font-weight: 700; }
.field small { font-weight: 400; color: var(--muted); }
.in { display: flex; align-items: center; gap: 6px; max-width: 280px; min-height: 52px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: var(--r-ctl); background: var(--surface); }
.in:focus-within { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.in input { flex: 1; align-self: stretch; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 22px; font-weight: 700; background: transparent; color: var(--ink); font-variant-numeric: tabular-nums; }
.in input:focus-visible { box-shadow: none; }
.in span { color: var(--muted); font-weight: 400; }
.steps-row { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; font-weight: 400; max-width: 480px; }
.steps-row > span:first-child { flex: 1 1 auto; min-width: 0; line-height: 1.4; }
.steps-row small { display: block; font-size: 12px; color: var(--muted); }
.steps-row + .steps-row { margin-top: 6px; }
.stepper { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 44px; height: 44px; border-radius: var(--r-ctl); border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.stepper button:hover { border-color: var(--ink); }
.stepper input { width: 52px; min-height: 44px; text-align: center; font: inherit; font-size: 18px; font-weight: 700; padding: 6px; border: 1px solid var(--rule-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); }
.adv { margin-bottom: 12px; }
.adv .in input { font-size: 18px; }
#k-err { margin: -8px 0 12px; font-size: 13px; }
#k-err:empty { display: none; }
.result { padding: var(--s4); border-radius: var(--r-ctl); background: var(--surface-2); border-top: 2px solid var(--ink); }
.result .big { margin: 0; font-size: 18px; font-weight: 700; }
.result .big strong { display: block; font-size: 36px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.result .sub { margin: 6px 0; }
.result .facts { margin: 8px 0; padding-left: 1.2em; font-size: 14px; }
/* 金額以内の「カテゴリ|1万円あたり最大◯」: 罫で区切った早見表(行ごとにランキングへ) */
.bud { list-style: none; padding: 0; margin: 4px 0 8px; border-top: 1px solid var(--rule-strong); }
.bud li { margin: 0; border-bottom: 1px solid var(--rule); }
.bud a.b-c { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 8px 4px 2px; color: var(--ink); text-decoration: none; }
.bud .b-n { flex: none; font-weight: 700; white-space: nowrap; }   /* 「牛 / 肉」と折れないように */
.bud a.b-c:hover .b-n { color: var(--green); text-decoration: underline; }
/* 札 → 返礼品名(2行まで全幅) → ボタン の順に縦に並べる(横に並べると、390px で名前が8〜10字で切れていた) */
.bud .b-i { margin: 0; padding: 0 4px 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.bud .b-bds { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 2px; }
.bud .b-it { margin: 0 0 6px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.b-more { margin: 0 0 8px; }
.b-more > summary { min-height: 44px; display: flex; align-items: center; padding: 0 4px; font-size: 14px; font-weight: 700; color: var(--green); cursor: pointer; }
/* 控除上限の結果: 計算の内訳と「上限内で選ぶなら」の一覧を線で分ける(一覧が内訳の中身に見えないように) */
.result .go { margin-top: var(--s4); padding-top: var(--s3); border-top: 2px solid var(--rule-strong); }
.go-k { display: block; font-size: 16px; color: var(--ink); }
.km-res .go-k { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule-strong); font-size: 14px; }
.k-next-in { margin: var(--s2) 0; }
.bud .b-go { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border: 1px solid var(--green); border-radius: var(--r-ctl); color: var(--green); font-weight: 700; font-size: 12px; text-decoration: none; white-space: nowrap; }
.bud .b-go:hover { background: var(--green); color: #fff; }
.go-l small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
@media (prefers-color-scheme: dark) { .bud .b-go:hover { color: #0b1a13; } }
@media print { .bud .b-go { display: none; } }
.bud .b-v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.bud .b-v small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
@media (min-width: 760px) { .result .bud { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; } }
/* position: relative = 表の中の読み上げ用の文字(.sr-only は absolute)が、横スクロールの箱の外の基準で置かれてページ全体を横に広げないように(カテゴリの「金額ごとの1位」の表で 390px のページが 569px に広がっていた) */
.tbl-wrap { position: relative; overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--surface); }
.tbl { border-collapse: collapse; width: 100%; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 7px 10px; border-bottom: 1px solid var(--rule); text-align: right; }
.tbl tbody tr:nth-child(even) td { background: var(--surface-2); }
.tbl thead th { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--ink); text-align: center; font-size: 12px; white-space: normal; min-width: 88px; }
.tbl tbody th { text-align: left; background: var(--surface); position: sticky; left: 0; }
/* 見出しの行は左に固定した列より手前に(縦にスクロールしたとき、行の見出しが見出しの行の上に重ならないように)。左上のマスは両方向に固定 */
.tbl thead th { z-index: 2; }
.tbl thead th:first-child { left: 0; z-index: 3; }
.scroll-hint { margin: 0 0 4px; text-align: right; }
/* 画面に収まる表は、はみ出しを切るだけにする(横スクロールの箱にしない)。見出しの行が画面の上に貼り付く(長い早見表で列の意味を見失わない) */
.tbl-wrap.fit { overflow: clip; }
/* 横にも縦にも長い早見表(控除上限・7列×55行)は、表の中で縦にもスクロールさせて見出しの行と年収の列を残す */
.tbl-wrap:not(.fit):has(> .kojo-tbl) { max-height: min(75vh, 720px); overflow: auto; }
.tbl-wrap[tabindex]:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
/* カテゴリ名は単語の途中で折らない(折る位置は <wbr>) */
.c-name, .hc-n, .others-list a, .y-cat { word-break: keep-all; overflow-wrap: anywhere; }
.faq { border-bottom: 1px solid var(--rule); }
.faq p { margin: 0 0 12px; }

/* ---------- 文章のページ(このサイトについて・プライバシー・404) ---------- */
.prose { max-width: 40em; }
.prose h2 { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--rule); font-size: 20px; }
.prose h1 + p, .prose h1 + h2 { margin-top: 0; }
.prose li { margin-bottom: 6px; }
.nf { padding: var(--s5) 0; }
.nf-code { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s4) 0 var(--s5); }

/* ---------- フッター ---------- */
.site-footer { margin-top: var(--s7); padding: var(--s5) 16px var(--s6); background: var(--surface); border-top: 1px solid var(--rule); font-size: 14px; color: var(--muted); }
.site-footer .wrap > * { max-width: none; }
.site-footer p { line-height: 1.7; max-width: 44em; }
.foot-brand { display: flex; align-items: center; gap: 8px; margin-bottom: var(--s2); font-weight: 700; color: var(--ink); }
.foot-brand .logo-mark { width: 24px; height: 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: var(--s2) 0; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
.credit { font-size: 12px; }
.credit a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
/* 同じ運営者のサイト一覧(family.py)。両サイト共通。色は各サイトの色 */
.family { margin: 20px 0 8px; }
.fam-h { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.fam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; align-items: start; }
.fam-card { position: relative; display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-card); border: 1px solid var(--rule); border-left: 6px solid var(--fam-c, var(--fam-default, #8a8a8a)); background: var(--surface); color: var(--ink); text-decoration: none; }
a.fam-card:hover { color: var(--ink); border-color: var(--fam-c, var(--fam-default, #8a8a8a)); text-decoration: none; }
a.fam-card:hover .fam-name { text-decoration: underline; }
/* 各サイトの色(--fam-c)は作成時に family.color_css() から足す(サイトを足しても、ここを直さなくてよい) */
.fam-name { font-weight: 700; font-size: 15px; }
.fam-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }
.fam-here, .fam-go { font-size: 12px; font-weight: 700; color: var(--fam-c); }
.fam-card.here { background: transparent; }
.fam-links { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 2px 0 0 6px; font-size: 13px; }
.fam-links a { display: inline-flex; align-items: center; min-height: 40px; }
.fam-by { margin: var(--s3) 0 0; font-size: 12px; color: var(--muted); }
.fam-by a { color: inherit; }

/* ---------- スマホ ---------- */
@media (max-width: 640px) {
  /* 数字の表は列の幅を中身に合わせる(見出しの最小幅で横にはみ出し、右端の列が切れていた) */
  .facts-tbl thead th, .d-tbl thead th, .kojo-tbl thead th { min-width: 0; padding: 6px 6px; }
  .facts-tbl th, .facts-tbl td { padding: 7px 8px; }
  .facts-tbl thead th, .d-tbl thead th, .kojo-tbl thead th { word-break: keep-all; }   /* 「中央 / 値」と切らない */
  .facts-tbl tbody th { white-space: normal; min-width: 5.5em; }   /* 長い種類名(すき焼き・しゃぶしゃぶ)は折り返して、数字の列を画面に入れる */
  h1 { font-size: 24px; }
  /* 見出しの区切りごとに改行を決めておく(明朝フォントが届く前後で1行⇔2行が変わり、下の入力欄がずれるのを防ぐ。控除上限ページで CLS 0.113 だった) */
  h1:not(.cat-h1) > .nw { display: block; }
  h2 { font-size: 20px; }
  .site-header { padding-top: 8px; }
  .logo { gap: 8px; }
  .logo-mark { width: 32px; height: 32px; }
  .logo-name { font-size: 19px; }
  .logo-sub { display: none; }
  .deadline { display: grid; justify-items: end; font-size: 12px; line-height: 1.3; }
  .dl-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dl-short { display: block; color: var(--muted); }
  .dl-days { margin: 3px 0 0; font-size: 13px; }
  .main-nav { margin-top: 4px; }
  .main-nav a { padding: 0 8px; }
  .hero h1 { font-size: min(23px, 6vw); }  /* 幅360px以下でも2行に収め、明朝フォントの到着で3行に増えて下がずれるのを防ぐ */
  .picks { grid-template-columns: 1fr; gap: 8px; }
  .pick { grid-template-columns: 88px minmax(0, 1fr); column-gap: 12px; padding: 10px; }
  .pick .p-img { grid-row: 1 / span 6; }
  .p-img img { width: 88px; height: 88px; }
  .pick .p-name { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 370px) {
  .crow { grid-template-columns: 40px minmax(0, 1fr) auto; } .crow img, .c-ico { width: 40px; height: 40px; } .c-mid { display: none; }
  .row { grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: 10px; }
  .r-img img, .r-img .noimg { width: 64px; height: 64px; }
  .seal-v { font-size: 24px; }
  .r-facts div { padding: 4px 6px; gap: 4px; }
  .r-facts dd { font-size: 13px; }
  .logo-name { font-size: 17px; }
  .seal.s-m .seal-v { font-size: 26px; }
}

/* ---------- 広い画面 ---------- */
@media (min-width: 641px) {
  .pc-only { display: inline; }
  main { padding-top: var(--s4); }
  .chips { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
}
@media (min-width: 760px) {
  /* 行: 画像 | シールと目盛り | 名前・表示ラベル | 楽天で見る */
  .row { grid-template-columns: 96px 188px minmax(0, 1fr) auto;
    grid-template-areas: "img pm name cta" "img pm meta cta" "img pm facts facts" "img pm badges badges";
    grid-template-rows: auto auto auto 1fr; column-gap: 20px; padding: 18px 0 16px 8px; align-items: start; }
  .row::before { left: -4px; top: 12px; }
  .r-img img, .r-img .noimg { width: 96px; height: 96px; }
  .r-bar { max-width: none; }
  .r-name { font-size: 15px; }
  .r-meta { margin-top: 2px; }
  .r-facts { grid-template-columns: 1.5fr 1fr 1fr 1fr; margin-top: 8px; }
  .r-facts div { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 3px 8px 4px; }
  .r-facts dd { text-align: left; }
  .r-cta { align-self: start; margin: 0 0 0 8px; }
  .row.hit { box-shadow: none; }
}
@media (min-width: 820px) {
  h1 { font-size: 32px; }
  h2 { font-size: 23px; }
  .cat-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 24px; align-items: end; }   /* 右の数字の欄を380pxまでにして、見出しが語の途中で折れないように */
  .cat-h1 { font-size: 32px; }
  .cat-sub { font-size: 15px; }
  .cat-stats { margin-top: 0; min-width: 300px; padding: 10px 16px; }
  .cs-nums dd { font-size: 22px; }
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "text spread" "chips spread"; column-gap: 40px; row-gap: var(--s5); padding-top: var(--s4); align-items: start; }
  .hero-text { grid-area: text; }
  .hero h1 { font-size: 30px; }
  .seal.s-m .seal-v { font-size: 36px; }
  .seal.s-m .seal-u { font-size: 17px; }
  .hero .lead { font-size: 16px; }
  .spread { grid-area: spread; padding: 20px 22px; }
  .hero-chips { grid-area: chips; }
  .sp-item { grid-template-columns: 80px minmax(0, 1fr); }
  .sp-item img { width: 80px; height: 80px; }
  .sp-lab { grid-column: 2; }
  .sp-go .btn { width: auto; }
  .step-list { grid-template-columns: repeat(3, 1fr); column-gap: 24px; border-top: 0; }
  .step-list li { border-top: 1px solid var(--ink); border-bottom: 0; }
  .crows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crows li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- ダーク ---------- */
@media (prefers-color-scheme: dark) {
  .logo-mark path { fill: #0b1a13; }
  .r-img img, .sp-item img, .p-img img, .crow img { border-color: transparent; }
  .btn:hover { color: #0b1a13; background: var(--green-strong); }
  .r-cta:hover { color: #0b1a13; }
  :focus-visible { box-shadow: none; }
}

/* ---------- 印刷 ---------- */
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .main-nav, .tools, .to-filter, .more-box, .family, .r-cta, .skip, .others, .kojo-link, .sister-line, .hero-chips, .km, .km-more { display: none !important; }
  .site-header { border: 0; padding: 0; }
  .topbar { background: none; color: #000; padding: 0; }
  .row { break-inside: avoid; }
  .seal, .r-bar, .r-bar i, .row::before, .r-facts { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .method { border: 0; padding: 0; }
  a { color: inherit; }
}
.nf + .others { margin-top: var(--s2); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* SEO(950〜): 見出しの前の「ふるさと納税」と、カテゴリの数字のまとめ */
.h1-k { display: block; font-size: 14px; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.facts p { max-width: 40em; }
.facts .tbl-wrap { max-width: 40em; }
.facts-tbl thead th { min-width: 0; }
.facts-tbl th, .facts-tbl td { padding: 7px 8px; }
.facts-tbl tbody th a { display: inline-block; min-height: 24px; }
.facts-tbl tbody tr:nth-child(even) th { background: var(--surface-2); }
/* /about/ の h1 の下の説明(ゴシック・小さく) */
h1 + .h1-sub { margin: calc(-1 * var(--s2)) 0 var(--s3); font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.src { margin: var(--s2) 0 0; font-size: 13px; color: var(--muted); }

/* ---------- 2026-11-05 ブラッシュアップ: 新しいページ(/yosan/・/data/・/kojo/keisan/)と表 ---------- */
/* JavaScript が動くときだけの説明(早見表に色を付ける説明など) */
.js-only { display: none; }
.js .js-only { display: block; }
/* ページ内の移動(金額の見出しへ) */
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s4) 0 0; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.jump a:hover { border-color: var(--ink); }
/* 見出しへ飛んだとき、上に詰まりすぎないように */
.sec[id], h3[id] { scroll-margin-top: 12px; }
/* 表の中の補足(産地・税率など) */
.tbl td small, .tbl th small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.tbl tr.k-total th, .tbl tr.k-total td { border-top: 2px solid var(--ink); font-weight: 700; }
.tbl tr.k-total td { font-size: 16px; }
.k-tbl tbody th { white-space: normal; min-width: 9em; }
.d-tbl td.d-pref { text-align: left; white-space: normal; min-width: 10em; }
/* 縞模様の行で、横に固定した見出しの列だけ白く残らないように */
.tbl tbody tr:nth-child(even) th { background: var(--surface-2); }
/* 寄付額の上限から探す: 返礼品名は折り返す */
.y-tbl td.y-name { text-align: left; white-space: normal; min-width: 14em; max-width: 22em; }
.y-tbl td.y-pm { text-align: left; }
.y-tbl .y-name a { color: var(--ink); }
.y-tbl .y-name a:hover { color: var(--green); }
.y-same-line { margin: var(--s3) 0 0; padding: var(--s3) var(--s4); border: 1px dashed var(--rule-strong); border-radius: var(--r-card); font-size: 14px; }
.y-same-line p { margin: 0 0 4px; }
.y-same-line ul { margin: 0; padding-left: 1.2em; line-height: 1.9; }
.y-tbl .seal { vertical-align: middle; }
/* 式 */
.formula { margin: var(--s3) 0; padding: var(--s3) var(--s4); border-left: 4px solid var(--ink); background: var(--surface); font-weight: 700; line-height: 1.7; }
.dl, .k-back { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s4) 0 0; }
/* 控除上限シミュレーター: 自己負担・計算の内訳・早見表の自分のマス */
.result .plan { margin: var(--s2) 0; padding: var(--s2) var(--s3); border-left: 3px solid var(--ink); background: var(--surface); }
.result .plan b { font-size: 18px; font-variant-numeric: tabular-nums; }
.k-detail { margin: var(--s2) 0; }
.k-detail summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.k-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 0 6px; border: 1px solid var(--rule); background: var(--rule); border-radius: var(--r-ctl); overflow: hidden; }
.k-dl div { padding: 8px 10px; background: var(--surface); }
.k-dl dt { font-size: 12px; color: var(--muted); }
.k-dl dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.kojo-tbl tr.me th, .kojo-tbl tbody tr.me:nth-child(even) th { box-shadow: inset 4px 0 0 var(--ink); background: var(--hit); }
.kojo-tbl tr.me td, .kojo-tbl tr.me:nth-child(even) td { background: var(--hit); }
.kojo-tbl td.me { outline: 2px solid var(--ink); outline-offset: -2px; font-weight: 700; }
/* スマホ: 「寄付額の上限から探す」の表は横スクロールではなく、1カテゴリ1枚のカードにする */
@media (max-width: 640px) {
  .y-tbl, .y-tbl tbody, .y-tbl tr, .y-tbl th, .y-tbl td { display: block; white-space: normal; }
  .y-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .y-tbl tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 12px; border-bottom: 1px solid var(--rule); }
  .y-tbl tbody tr:nth-child(even) td, .y-tbl tbody tr:nth-child(even) th { background: none; }
  .y-tbl tbody tr:nth-child(even) { background: var(--surface-2); }
  .y-tbl th, .y-tbl td { padding: 0; border: 0; text-align: left; position: static; background: none; }
  .y-tbl th { grid-column: 1 / -1; font-size: 15px; }
  .y-tbl td.y-name { grid-column: 1 / -1; max-width: none; min-width: 0; }
  .y-tbl td.y-pm { grid-row: span 3; }
  .y-tbl td[data-l]::before { content: attr(data-l); margin-right: 6px; font-size: 12px; color: var(--muted); }
}
/* 印刷(控除上限の早見表・計算の例を紙で見る人向け): 操作の部品と広告の一覧は出さない */
@media print {
  .topbar, .site-header .main-nav, .deadline, .skip, .tools, .to-filter, .more-box, .family, .foot-links, .credit, .k-back, .jump, .hero-km, .km-more, .dl { display: none !important; }
  body { background: #fff; color: #000; }
  .tbl-wrap, .tbl-wrap:not(.fit):has(> .kojo-tbl) { overflow: visible; border: 0; max-height: none; }
  .tbl { white-space: normal; }
  .tbl thead th { position: static; }
  a { color: inherit; text-decoration: none; }
  .sec { margin: 16px 0; break-inside: avoid-page; }
}
/* トップの「金額や数字から探す」 */
.guides { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.guide-card { display: flex; flex-direction: column; gap: 4px; padding: var(--s3) var(--s4); border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--surface); color: var(--ink); text-decoration: none; }
.guide-card:hover { border-color: var(--ink); text-decoration: none; }
.guide-card b { color: var(--green); }
.guide-card span { font-size: 14px; color: var(--muted); line-height: 1.6; }
/* 表の中の小さな棒(寄付額の帯・産地ごとの中央値) */
.mbar { display: inline-block; width: 56px; height: 6px; margin-left: 8px; vertical-align: middle; background: var(--rule); border-radius: 1px; overflow: hidden; }
.mbar i { display: block; height: 100%; background: var(--meter); }
/* 寄付額の上限から探す: 前に計算した上限の案内 */
.mine { margin: var(--s3) 0 0; padding: var(--s2) var(--s3); border-left: 3px solid var(--green); background: var(--surface); }
.mine[hidden] { display: none; }
/* ---------- 2026-11-05 3周目: 期限(/kigen/)と締め切りの表 ---------- */
/* ヘッダーの残り日数は期限のページへのリンク(見た目は今までどおり。押せることは下線で) */
.deadline a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0; min-height: 24px; }
.deadline a:hover .dl-days, .deadline a:focus-visible .dl-days { background: var(--ink); color: var(--paper); }
.deadline a[aria-current] .dl-days { background: var(--ink); color: var(--paper); }
.dl-tbl td.left { font-weight: 700; font-variant-numeric: tabular-nums; }
.dl-tbl td.left.soon { color: var(--warn); }
.dl-tbl td:last-child { white-space: normal; min-width: 16em; font-size: 14px; color: var(--muted); }
.os-tbl th { white-space: nowrap; vertical-align: top; }
.os-tbl td { white-space: normal; min-width: 14em; text-align: left; }
.upd-line { margin: 0 0 var(--s4); font-size: 12px; color: var(--faint); }
/* スマホ: 締め切りの表は1行1枚(手続き → 期限・残り → 内容)。横スクロールさせない */
@media (max-width: 640px) {
  .dl-tbl, .dl-tbl tbody, .dl-tbl tr, .dl-tbl th, .dl-tbl td { display: block; white-space: normal; }
  .dl-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dl-tbl tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
  .dl-tbl tr[hidden] { display: none; }
  .dl-tbl tbody tr:nth-child(even) td, .dl-tbl tbody tr:nth-child(even) th { background: none; }
  .dl-tbl tbody tr:nth-child(even) { background: var(--surface-2); }
  .dl-tbl th, .dl-tbl td { padding: 0; border: 0; text-align: left; position: static; background: none; min-width: 0; }
  .dl-tbl th { grid-column: 1 / -1; font-size: 13px; color: var(--muted); font-weight: 400; }
  .dl-tbl td:first-of-type { font-weight: 700; }
  .dl-tbl td:last-child { grid-column: 1 / -1; min-width: 0; font-size: 13px; }
  .os-tbl th { white-space: normal; min-width: 5em; }
  .os-tbl td { min-width: 0; }
}
/* カテゴリページ: 記録元の行は項目ごとに折り返す(「楽天ウェブサービ / スで記録」と切らない) */
.upd > span { margin-left: 0; padding-left: 0; border-left: 0; }
.upd > span + span::before { content: "・"; color: var(--rule-strong); }
/* 見出しの横の箱: 種類別の中央値(白米・玄米・無洗米 など) */
.cs-types { flex-basis: 100%; margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.cs-types b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cs-types a { font-weight: 700; }
/* 年末(10〜12月)だけ: 年内に発送されそうなものだけ */
.soon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: var(--s2) 0 0; font-size: 14px; }
.soon-bt { font: inherit; font-size: 14px; min-height: 44px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px dashed var(--rule-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.soon-bt:hover { border-color: var(--ink); }
.soon-bt .n { margin-left: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.soon-bt[aria-pressed="true"] { background: var(--ink); border: 1px solid var(--ink); color: var(--paper); font-weight: 700; }
.soon-bt[aria-pressed="true"] .n { color: inherit; }
@media (max-width: 640px) {
  .deadline a { display: grid; justify-items: end; }
}
.tbl-wrap + .note { margin-top: var(--s2); }
/* このサイトについて: 言葉の説明 */
.terms { margin: 0; }
.terms dt { margin-top: var(--s3); font-weight: 700; }
.terms dd { margin: 2px 0 0; color: var(--muted); }
/* 絞り込みを開いているとき(PCは最初から開いている)は、同じチェックが下に見えているので「年内に発送」のボタンを出さない */
.tools:has(.filters[open]) .soon-row { display: none; }
/* カテゴリページ: 最初の画面に1位の返礼品と楽天ふるさと納税へのボタン(一覧は1画面以上下にあるため) */
.top1 { margin: var(--s3) 0; padding: 10px 12px 12px; border: 1px solid var(--rule); border-left: 4px solid var(--seal); border-radius: var(--r-card); background: var(--surface); }
.t1-k { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.t1-k small { margin-left: 4px; font-weight: 400; color: var(--muted); font-size: 12px; }
.t1-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: start; }
.t1-row img, .t1-row .noimg { display: grid; place-items: center; width: 64px; height: 64px; object-fit: contain; border-radius: var(--r-card); background: #fff; border: 1px solid var(--rule); font-size: 26px; }
.t1-main p { margin: 0; }
.t1-name { font-size: 14px; line-height: 1.5; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t1-name a { color: var(--ink); }
.t1-facts { display: flex; flex-wrap: wrap; gap: 0 10px; margin-top: 2px !important; font-size: 12px; color: var(--muted); line-height: 1.7; }
.t1-facts b { color: var(--ink); font-variant-numeric: tabular-nums; }
.t1-facts .bd { align-self: center; }
.t1-go { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 10px 0 0; }
.t1-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-ctl); background: var(--green); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; }
.t1-cta:hover { background: var(--green-strong); color: #fff; text-decoration: none; }
.t1-pr { font-size: 12px; color: var(--muted); }
.top1 + .top1 { margin-top: calc(-1 * var(--s2)); }
.t1-soon { border-left-color: var(--green); }
.t1-soon .t1-row img, .t1-soon .t1-row .noimg { width: 48px; height: 48px; font-size: 20px; }
.t1-soon .t1-row { grid-template-columns: 48px minmax(0, 1fr); }
.t1-soon .t1-go { margin-top: 6px; }
.t1-soon .t1-cta { flex: 0 1 auto; min-height: 40px; font-size: 14px; background: var(--surface); color: var(--green); border: 1px solid var(--green); }
.t1-soon .t1-cta:hover { background: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { .t1-soon .t1-cta { color: var(--green); } .t1-soon .t1-cta:hover { color: #0b1a13; } }
@media (max-width: 640px) { .t1-cta { flex: 1 1 100%; } }
@media (min-width: 820px) { .top1 { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: center; } .t1-k { grid-column: 1 / -1; } .t1-go { margin: 0; flex-direction: column; align-items: stretch; text-align: center; } }
@media (prefers-color-scheme: dark) { .t1-cta { color: #0b1a13; } .t1-cta:hover { color: #0b1a13; } .t1-row img { border-color: transparent; } }
@media print { .t1-go { display: none; } }
/* トップの最初の画面: ランキングへのボタンと、いちばん多い返礼品を楽天ふるさと納税で見るボタン */
.sp-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sp-go .t1-cta { width: 100%; font-size: 14px; }
@media (min-width: 820px) { .sp-go .t1-cta { width: auto; } }
/* 年内発送の返礼品(/nennai/): カテゴリごとに5件の短い行 */
.nn-list { list-style: none; margin: 0; padding: 0; }
.nn-row { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "img main" "cta cta"; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.nn-row > img, .nn-row > .noimg { grid-area: img; display: grid; place-items: center; width: 64px; height: 64px; object-fit: contain; border-radius: var(--r-card); background: #fff; border: 1px solid var(--rule); font-size: 26px; }
.nn-n { position: absolute; left: 4px; top: 16px; z-index: 1; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; font-weight: 700; border-radius: var(--r-seal); background: var(--paper); border: 1px solid var(--ink); }
.nn-main { grid-area: main; min-width: 0; }
.nn-main p { margin: 0; }
.nn-name { font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nn-name a { color: var(--ink); }
.nn-facts { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.nn-facts b { color: var(--ink); font-variant-numeric: tabular-nums; }
.nn-main .badges { margin-top: 4px; }
.nn-cta { grid-area: cta; justify-self: end; margin: 4px 0 0; }
.nn-cat { display: block; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.5; }
.nn-tagged .nn-n { font-size: 14px; min-width: 26px; height: 26px; border-color: var(--rule-strong); }
.kg-picks .nn-list { margin-top: var(--s2); border-top: 1px solid var(--rule-strong); }
.nn-more { margin: var(--s2) 0 0; font-size: 14px; }
.nn-more a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
@media (min-width: 760px) { .nn-row { grid-template-columns: 80px minmax(0, 1fr) auto; grid-template-areas: "img main cta"; column-gap: 16px; align-items: center; }
  .nn-row > img, .nn-row > .noimg { width: 80px; height: 80px; } .nn-cta { margin: 0; } }
@media (prefers-color-scheme: dark) { .nn-row > img { border-color: transparent; } }
@media print { .nn-cta { display: none; } }
.nn-jump a { padding: 0 10px; font-size: 14px; }
.nn-jump .n { margin-left: 6px; font-weight: 400; color: var(--muted); font-size: 12px; }
.nn-g { margin: var(--s3) 0 0; font-size: 14px; }
.nn-g small { margin-left: 6px; font-weight: 400; color: var(--muted); }
.nn-sec { scroll-margin-top: 12px; }
@media (max-width: 640px) { .nn-jump { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; } .nn-jump a { flex: none; } }
.soon-row a { display: inline-flex; align-items: center; min-height: 44px; }

.k-budgets { font-size: 14px; line-height: 2.2; }
.k-budgets a { display: inline-block; min-height: 24px; font-weight: 700; }
.y-goc .y-go { display: inline-flex; min-height: 40px; margin: 0; font-size: 13px; }
@media print { .y-go { display: none !important; } }
.k-next { margin: var(--s2) 0 0; padding: 10px 14px; border-left: 3px solid var(--green); background: var(--surface); font-size: 14px; line-height: 1.8; }
.k-next a { font-weight: 700; }
.facts-tbl td.b-item { min-width: 12em; max-width: 18em; font-size: 13px; line-height: 1.5; text-align: left; }
.facts-tbl td.b-item a { display: inline-block; min-height: 24px; }
.facts-tbl td.b-item small { display: block; font-size: 12px; color: var(--muted); }   /* 定期便の回数ごとの表: 「10kg×6回・¥108,000・5.6kg」
.sp-item > .bd { grid-column: 1 / -1; justify-self: start; }

/* 1位の箱の下の「玄米なら」「3万円以内なら」・トップの「発送時期が年内の中の1位」(写真なしの1行) */
.t1-alt { margin: 6px 0 0 !important; font-size: 13px; line-height: 1.6; color: var(--muted); }
.t1-alt a { font-weight: 700; }
.sp-soon { margin: var(--s2) 0 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.sp-soon .bd { margin-right: 2px; }
.sp-soon a { font-weight: 700; }
.kg-next { margin: var(--s3) 0; }
/* 寄付額の上限から探す: 札の間をあける・ボタンは量と寄付額の後ろの列 */
.y-tbl .y-bds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.y-tbl td.y-goc { text-align: left; }
@media (max-width: 640px) { .y-tbl td.y-goc { grid-column: 1 / -1; } .y-tbl .y-goc .r-cta { margin: 4px 0 0; width: 100%; justify-content: center; } }
.qa-q { margin: var(--s4) 0 4px; font-size: 16px; line-height: 1.5; }
/* 控除上限の結果の「組み合わせの例」(6周目): 1位を合計が上限の9割以内に収まるまで足した例と、寄付先の自治体の数 */
.b-combo { margin: 4px 0 12px; padding: 8px 12px; border-left: 3px solid var(--green); background: var(--surface); font-size: 13px; line-height: 1.6; color: var(--ink); }
.b-combo b { display: block; font-size: 12px; color: var(--green); }
@media print { .b-combo { border-left-color: #000; } }
/* お米 ⇔ お米の定期便の行き来(6周目) */
.pair-line { margin: var(--s2) 0 var(--s3); font-size: 14px; color: var(--muted); }
.pair-line a { font-weight: 700; }
@media print { .pair-line { display: none; } }

/* ---------- 7周目(見た目): 自作のカテゴリのアイコンと「量の絵」 ----------
   アイコンは墨1色の切り絵(currentColor)。量の絵は「カテゴリの絵1つ = きりのいい量」の列で、
   薄い枠 = 目盛りの最大まで、濃い絵 = その量。黄色はこれまでどおりシールとフォーカスだけ。 */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ci { display: inline-block; flex: none; width: 1.15em; height: 1.15em; vertical-align: -.2em; fill: currentColor; color: var(--ink); }
.others-list a .ci, .nn-jump a .ci { width: 18px; height: 18px; margin-right: 2px; }
.h-ci { width: 26px; height: 26px; vertical-align: -.25em; margin-right: 4px; }
.noimg .ci, .c-ico .ci { width: 58%; height: 58%; color: var(--muted); }
.nn-tagged .nn-n .ci { width: 16px; height: 16px; }
.b-n .ci { margin-right: 2px; }
/* 量の絵 */
.pk { display: block; width: 100%; height: auto; color: var(--meter-top); overflow: visible; }
.pk.mid { color: var(--meter); }
.pk-e { opacity: .16; }
.m-t.m-pk { height: auto; margin-bottom: 6px; }
.pk-key { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; justify-self: end; font-size: 12px; color: var(--muted); line-height: 1.4; }
.pk-key .ci { width: 16px; height: 16px; color: var(--muted); }
.spread .pk-key { margin-top: -6px; }
/* カテゴリページ: 数字の箱の量の絵 */
.cs-pk { flex-basis: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 10px; margin: 8px 0 4px; padding-top: 8px; border-top: 1px dashed var(--rule); }
.cs-pl { font-size: 12px; color: var(--muted); line-height: 1.3; white-space: nowrap; }
.cs-pk .pk { max-width: 340px; }
.cs-pk .pk-key { justify-self: start; grid-column: 2; }
/* カテゴリページの見出しの紋(カテゴリの入口の印) */
.ch-emb { float: right; display: grid; place-items: center; width: 64px; height: 64px; margin: 2px 0 8px 12px; border: 1px solid var(--rule-strong); border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 5px var(--rule); }
.ch-emb .ci { width: 40px; height: 40px; }
@media (min-width: 820px) { .ch-emb { width: 80px; height: 80px; } .ch-emb .ci { width: 50px; height: 50px; } }
/* 1位の箱: 写真を大きく */
.top1:not(.t1-soon) .t1-row { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
.top1:not(.t1-soon) .t1-row img, .top1:not(.t1-soon) .t1-row .noimg { width: 112px; height: 112px; }
/* トップの人気のカテゴリ: 1位の写真つきの札 */
.hchip { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; align-content: start; row-gap: 2px; padding: 8px 8px 10px; }
.hc-img { display: block; margin-bottom: 4px; }
.hc-img img, .hc-noimg { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: var(--r-ctl); background: #fff; }
.hc-noimg { display: grid; place-items: center; background: var(--surface-2); }
.hc-noimg .ci { width: 50%; height: 50%; color: var(--muted); }
.hc-n { display: flex; align-items: center; gap: 3px; }
.hc-n .ci { width: 15px; height: 15px; }
.hchip:hover .hc-n { text-decoration: underline; }
@media (max-width: 400px) { .hchip { padding: 6px 6px 8px; } }
@media (prefers-color-scheme: dark) { .hc-img img { border: 0; } }
/* 年末の区画: カテゴリ別の1位の写真の列(押すと楽天ふるさと納税) */
.ys-box { margin: 0 0 var(--s5); }
.ys-k { margin: 0 0 2px; font-size: 14px; font-weight: 700; }
.ys-row { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 136px; gap: 10px; margin: 8px -16px 0; padding: 2px 16px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
.ys-row li { position: relative; margin: 0; scroll-snap-align: start; }   /* 読み上げ用の文字が横の箱の外に出てページが横に広がらないように */
.ys { display: grid; align-content: start; gap: 3px; height: 100%; padding: 8px; border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--surface); color: var(--ink); text-decoration: none; line-height: 1.35; }
.ys:hover { color: var(--ink); border-color: var(--ink); text-decoration: none; }
.ys img, .ys-noimg { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: var(--r-ctl); background: #fff; }
.ys-noimg { display: grid; place-items: center; background: var(--surface-2); }
.ys-noimg .ci { width: 50%; height: 50%; color: var(--muted); }
.ys-c { display: flex; align-items: center; gap: 3px; margin-top: 2px; font-size: 13px; font-weight: 700; }
.ys-c .ci { width: 15px; height: 15px; }
.ys .seal { justify-self: start; }
.ys-p { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ys .bd { justify-self: start; }
.ys:hover .ys-c { text-decoration: underline; }
@media (min-width: 760px) { .ys-row { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin: 8px 0 0; padding: 2px 0 0; overflow: visible; } }
@media print { .ys-box { display: none; } }

/* ---------- 強化8周目: 最初の画面の写真の列・近道・1位のまとめ・寄付額と内容量の範囲 ---------- */
/* 写真の列: 1位の返礼品の写真に、量の札(計量シールと同じ黄色)を貼る。スマホは横に流す */
.hero { row-gap: var(--s3); }
.hero .lead { margin-bottom: var(--s2); }
.fresh { display: flex; flex-wrap: wrap; gap: 0 16px; padding: 4px 0; }
.fresh div { display: flex; gap: 6px; align-items: baseline; }
.cstrip { min-width: 0; }
.cs-h { margin: 0 0 6px; font-family: var(--sans); font-size: 15px; font-weight: 700; line-height: 1.4; }
.cs-h small { display: block; margin: 0; font-size: 12px; font-weight: 400; color: var(--muted); }
.cs-row { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 92px; gap: 8px; margin: 0 -16px; padding: 2px 16px 6px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: 16px; scrollbar-width: thin; }
.cs-row li { position: relative; margin: 0; scroll-snap-align: start; }   /* 読み上げ用の文字(position: absolute)が横の箱の外に出て、ページが横に揺れないように */
.cs-card { display: grid; align-content: start; color: var(--ink); text-decoration: none; }
.cs-card:hover { color: var(--ink); text-decoration: none; }
.cs-card:hover .cs-n { text-decoration: underline; }
.cs-ph { position: relative; display: block; width: 92px; height: 92px; border: 1px solid var(--rule); border-radius: var(--r-card); background: #fff; overflow: hidden; }
.cs-ph img, .cs-noimg { display: block; width: 100%; height: 100%; object-fit: contain; }
.cs-noimg { display: grid; place-items: center; background: var(--surface-2); }
.cs-noimg .ci { width: 50%; height: 50%; color: var(--muted); }
.cs-tag { position: absolute; left: -1px; bottom: -1px; display: grid; justify-items: start; padding: 1px 6px 1px 5px; border: 1px solid var(--seal-ink); border-radius: 0 var(--r-seal) 0 var(--r-card); background: var(--seal); color: var(--seal-ink); font-size: 11px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.cs-tag b { font-size: 16px; letter-spacing: -.01em; }
.cs-tag small { font-size: 10px; line-height: 1.1; padding-bottom: 1px; }
.cs-n { display: flex; align-items: center; gap: 3px; margin-top: 4px; font-size: 13px; font-weight: 700; line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
.cs-n .ci { width: 14px; height: 14px; }
.cs-all { width: 92px; height: 92px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; padding: 6px; border: 1px dashed var(--rule-strong); border-radius: var(--r-card); color: var(--green); font-size: 13px; font-weight: 700; text-align: center; line-height: 1.35; }
.cs-all:hover { color: var(--green-strong); border-color: var(--green); }
/* よく探される条件(近道) */
.qk-h { margin: 2px 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.qk { list-style: none; display: flex; gap: 6px; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
.qk li { position: relative; margin: 0; flex: none; }
.qk a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid var(--rule-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.qk a:hover { border-color: var(--ink); background: var(--hit); }
.qk .n { font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.hero-ye:empty { display: none; }
.hero-ye .ye { margin: 0; }
@media (min-width: 820px) {
  .hero { grid-template-areas: "text spread" "chips spread" "ye spread"; grid-template-rows: auto auto 1fr; row-gap: var(--s4); }
  .cstrip { grid-area: chips; }
  .hero-ye { grid-area: ye; }
  .cs-row { margin: 0; padding: 2px 0 8px; grid-auto-columns: 100px; }
  .cs-ph, .cs-all { width: 100px; height: 100px; }
  .qk { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
}
@media print { .cstrip { display: none; } }

/* 早見表の各行の1位(返礼品名・自治体・寄付額・楽天へのボタン) */
.crows .c-1 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; margin: 0; padding: 0 14px 8px 62px; font-size: 13px; line-height: 1.45; }
.c-1n { min-width: 0; overflow-wrap: anywhere; }
.c-1n b { font-size: 12px; color: var(--muted); margin-right: 2px; }
.c-1n small { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.c-go { display: inline-flex; align-items: center; gap: 3px; min-height: 40px; padding: 0 10px; border: 1px solid var(--green); border-radius: var(--r-ctl); color: var(--green); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; background: var(--surface); }
.c-go:hover { background: var(--green); color: #fff; text-decoration: none; }
@media (prefers-color-scheme: dark) { .c-go:hover { color: #0b1a13; } }
@media (max-width: 370px) { .crows .c-1 { padding-left: 54px; } }
@media print { .c-go { display: none; } }

/* 寄付額・内容量の「下限〜上限」 */
.f-range { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.f-range > span[aria-hidden] { color: var(--muted); }
.cs-pop b { color: var(--ink); }
/* スマホ: 量の図の中で、1位の返礼品(写真・寄付額・楽天へのボタン)を図より先に(最初の画面に入れる)。リンクの順は変わらない */
@media (max-width: 819px) {
  .spread { display: flex; flex-direction: column; padding: var(--s3) var(--s4) var(--s4); }
  .spread figcaption { order: 0; margin-bottom: var(--s2); }
  .spread .sp-item { order: 1; padding-top: 0; border-top: 0; }
  .spread .sp-go { order: 2; margin: var(--s2) 0 var(--s3); }
  .spread .meter { order: 3; padding-top: var(--s3); border-top: 1px solid var(--rule); }
  .spread .sp-x { order: 4; margin-bottom: 0; }
  .spread .sp-soon { order: 5; }
  .cs-row, .qk { scrollbar-width: none; }
  .cs-row::-webkit-scrollbar, .qk::-webkit-scrollbar { display: none; }
}
/* 横に流れる箱は、中の読み上げ用の文字(position: absolute)の基準にする(基準が箱の外だと、箱で切られずにページの幅が広がり、スマホで縮んで表示されていた) */
.main-nav, .chips, .ys-row, .cs-row, .qk, .nn-jump { position: relative; }
@media (max-width: 640px) {
  .crows .c-1 { grid-template-columns: minmax(0, 1fr); padding-right: 12px; }
  .c-1 .c-go { justify-self: start; }
}

/* ---------- 控除上限: 年収の例・内訳の積み上げ・残りの金額・列の決まり ---------- */
.k-pre { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 4px; }
.k-pre[hidden] { display: none; }
.k-pre button { min-height: 36px; padding: 0 9px; border: 1px solid var(--rule-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.k-pre button:hover { border-color: var(--ink); background: var(--hit); }
.k-split { margin: var(--s3) 0; }
.k-split-h { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.k-bar { display: flex; height: 18px; border: 1px solid var(--ink); border-radius: var(--r-seal); overflow: hidden; background: var(--surface); }
.k-bar span { display: block; min-width: 2px; }
.k-bar span + span { border-left: 1px solid var(--surface); }
.k-s1 { background: var(--meter); }
.k-s2 { background: var(--green); }
.k-s3 { background: var(--ink); }
.k-s4 { background: var(--seal); }
.k-parts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 1px; border: 1px solid var(--rule); border-radius: var(--r-ctl); background: var(--rule); overflow: hidden; }
.k-parts li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 0; padding: 6px 10px; background: var(--surface); font-size: 14px; line-height: 1.4; }
.k-parts i { width: 12px; height: 12px; border-radius: 2px; border: 1px solid var(--ink); }
.k-parts small { display: block; font-size: 12px; color: var(--muted); }
.k-parts b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: var(--s2) 0; font-size: 13px; color: var(--green); }
.k-rest { margin: var(--s2) 0; font-size: 14px; line-height: 1.7; }
.k-rest b { font-variant-numeric: tabular-nums; }
.k-legend { display: grid; gap: 2px 12px; grid-template-columns: auto minmax(0, 1fr); margin: 8px 0; font-size: 13px; line-height: 1.5; }
.k-legend div { display: contents; }
.k-legend dt { font-weight: 700; white-space: nowrap; }
.k-legend dd { margin: 0; color: var(--muted); }
.km .k-pre { margin: 6px 0; }
@media print { .k-pre, .k-copy { display: none !important; } }

/* 期限: カレンダーに追加 */
.cal-add { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.cal-add a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 700; }
@media print { .cal-add { display: none; } }

/* family.color_css(): 同じ運営者のサイトの色 */
.fam-neusage { --fam-c: #b5001a; } .fam-furusato { --fam-c: #0b6e4f; } .fam-kisetsu { --fam-c: #22507c; } .fam-yoyaku { --fam-c: #5226c9; } .fam-youryou { --fam-c: #1f4fd1; } .fam-yado { --fam-c: #8a4b14; } .fam-portal { --fam-c: #5b6573; }
@media (prefers-color-scheme: dark) { .fam-neusage { --fam-c: #ff7b7b; } .fam-furusato { --fam-c: #5cc79c; } .fam-kisetsu { --fam-c: #8db8e4; } .fam-yoyaku { --fam-c: #b7a2ff; } .fam-youryou { --fam-c: #7aa2ff; } .fam-yado { --fam-c: #e3a868; } .fam-portal { --fam-c: #a3a9b3; } }
