/* かぞくえらび design v2 — 静かな配色・強い見出し・商品写真が主役
   置き換え前提の提案CSS。Webフォントは読み込まない（日本語は端末の書体）。 */

/* ===== 1. トークン ===== */
:root {
  color-scheme: light dark;
  /* 色：無彩色＋行動色ひとつ（青）。オレンジ・ベージュ・緑は使わない */
  --bg: #ffffff;
  --bg-2: #f5f5f7;          /* 交互セクション・商品の台座 */
  --tile: #ffffff;          /* bg-2 上のタイル */
  --text: #1d1d1f;
  --text-2: #6e6e73;        /* 補足・注記（白地で 4.6:1） */
  --line: #d2d2d7;
  --hair: rgba(0,0,0,.12);
  --link: #0066cc;
  --action: #0071e3;        /* 「楽天市場で見る」だけに使う */
  --action-hover: #0077ed;
  --on-action: #ffffff;
  --caution: #b64400;       /* 「注意」ラベルの文字色だけ */
  --mat: #ffffff;           /* 商品画像の台紙（白地画像と地続きにする） */

  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
          "Noto Sans JP", "BIZ UDPGothic", "Yu Gothic", YuGothic, Meiryo, sans-serif;

  /* 文字サイズ（スマホ） */
  --fs-display: 32px;  /* トップの見出し（「ふるさと納税のお米、」10字が375px幅で1行に入る上限） */
  --fs-h1: 26px;       /* 記事タイトル（343px幅に13字＝「発送時期と袋の分け方を比較」が1行に入る） */
  --fs-h2: 24px;
  --fs-h3: 21px;
  --fs-lead: 18px;
  --fs-body: 16px;
  --fs-sub: 15px;
  --fs-note: 13px;
  --fs-label: 13px;
  --fs-num-l: 30px;    /* 寄附額・評価の大きな数字 */
  --fs-num-m: 19px;

  --radius-l: 20px;
  --radius-m: 14px;
  --gutter: 20px;
  --measure: 640px;    /* 本文の最大幅（PCで1行約38字） */
}
@media (min-width: 734px) {
  :root {
    --fs-display: 56px; --fs-h1: 40px; --fs-h2: 32px; --fs-h3: 24px;
    --fs-lead: 21px; --fs-body: 17px; --fs-note: 14px; --fs-num-l: 34px; --fs-num-m: 21px;
    --gutter: 32px;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --bg-2: #161617; --tile: #1d1d1f;
    --text: #f5f5f7; --text-2: #a1a1a6; --line: #424245; --hair: rgba(255,255,255,.14);
    --link: #2997ff; --action: #0071e3; --action-hover: #147ce5; --caution: #ff9f0a;
    --mat: #ffffff; /* 商品画像は白地なので台紙は白のまま。加工しない */
  }
}

/* ===== 2. 基本の文字組 ===== */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--fs-body); line-height: 1.9;
  font-kerning: normal; line-break: strict; overflow-wrap: anywhere;
  text-spacing-trim: trim-start;   /* 行頭の括弧を詰める（対応ブラウザのみ）。text-autospaceは日付が間延びするので使わない */
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; border-radius: 6px; }
p { margin: 0 0 1em; text-wrap: pretty; }

h1, h2, h3, .display, .name, .tile-name, .nm, .faq summary {
  font-feature-settings: "palt"; word-break: auto-phrase; text-wrap: balance; margin: 0;
}
/* 商品名・自治体名は固有名詞。BudouXが「ふく/きらり」のように割るので文節改行を切る */
/* テンプレート側で「・」「（」の前後に<wbr>を入れ、そこだけで折り返す。入らない長さはanywhereで逃がす */
.name, .tile-name, .nm { word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
.display { font-size: var(--fs-display); font-weight: 700; line-height: 1.18; letter-spacing: .01em; }
h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.3; letter-spacing: .02em; }
h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.35; letter-spacing: .02em; }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.4; letter-spacing: .02em; }
@media (min-width: 734px) { .display { letter-spacing: 0; } h1 { letter-spacing: .01em; } }
.lead { font-size: var(--fs-lead); line-height: 1.65; color: var(--text-2); }
.note { font-size: var(--fs-note); line-height: 1.6; color: var(--text-2); }
.label {
  display: block; font-size: var(--fs-label); font-weight: 600; line-height: 1.4;
  letter-spacing: .06em; color: var(--text-2); font-feature-settings: "palt";
}
.pr { font-size: var(--fs-body); line-height: 1.6; color: var(--text-2); margin: 0; }  /* 本文と同じ大きさ */

/* 数字：数字は大きく・単位は小さく（Apple比較ページの 7.6インチ と同じ考え方） */
.num, .yen, .score { font-variant-numeric: tabular-nums; font-feature-settings: "palt"; white-space: nowrap; }
.yen b, .score b { font-weight: 600; letter-spacing: -.01em; }
.yen span, .yen i, .score span { font-style: normal; font-weight: 600; font-size: max(11px, .55em); margin-left: .08em; }
.yen.l span, .yen.l i { font-size: 15px; }
.yen.m span, .yen.m i { font-size: 12px; }
.yen i { font-weight: 400; color: var(--text-2); }
.yen.l b, .score.l b { font-size: var(--fs-num-l); line-height: 1.1; }
.yen.m b, .score.m b { font-size: var(--fs-num-m); line-height: 1.2; }

/* ===== 3. 枠組み ===== */
.wrap { max-width: 980px; margin: 0 auto; padding: 0 var(--gutter); }
.col { max-width: calc(var(--measure) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.band { padding: 64px 0; }
.band.alt { background: var(--bg-2); }
@media (min-width: 734px) { .band { padding: 96px 0; } }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.more { font-size: var(--fs-sub); white-space: nowrap; }
.more::after { content: "\00a0›"; }

.site-header {
  position: sticky; top: 0; z-index: 10; height: 48px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { color: var(--text); font-size: 17px; font-weight: 700; letter-spacing: .04em; font-feature-settings: "palt"; }
.logo:hover { text-decoration: none; }
.site-header nav { display: flex; gap: 20px; font-size: 14px; }
.site-header nav a { color: var(--text); display: inline-flex; align-items: center; min-height: 44px; }

.site-footer { background: var(--bg-2); color: var(--text-2); font-size: 13px; line-height: 1.7; padding: 32px 0 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 12px 0; }
.site-footer a { color: var(--text-2); display: inline-flex; min-height: 32px; align-items: center; }

/* ボタン：行動色は1色。太らせすぎない */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px; padding: 10px 22px; border-radius: 980px;
  background: var(--action); color: var(--on-action);
  font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: .02em; font-feature-settings: "palt";
}
.btn:hover { background: var(--action-hover); text-decoration: none; }
.btn.block { display: flex; width: 100%; min-height: 50px; border-radius: 14px; }
.btn .ext { width: .8em; height: .8em; opacity: .8; }

/* 商品画像の台紙：画像は加工せずcontainで置くだけ。角丸は台紙側だけ */
.mat { background: var(--mat); display: grid; place-items: center; overflow: hidden; }
.mat img { width: 100%; height: 100%; object-fit: contain; }

/* ===== 4. トップ ===== */
.hero { text-align: center; padding: 28px 0 40px; }
.hero .pr { margin-bottom: 24px; }
.band.first { padding-top: 40px; }
.hero .label { margin-bottom: 12px; }
.hero .display { margin: 0 auto 16px; text-wrap: wrap; }
.nb { display: inline-block; }  /* 意味の切れ目でしか改行しない */
.hero .lead { max-width: 24em; margin: 0 auto 28px; }
.hero .actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
@media (min-width: 734px) { .hero { padding: 64px 0 72px; } .band.first { padding-top: 64px; } .hero .actions { flex-direction: row; justify-content: center; gap: 28px; } }

/* 棚：横スクロールで商品写真を並べる */
.shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  padding: 4px var(--gutter) 8px; margin: 0 calc(var(--gutter) * -1); scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
@media (min-width: 734px) { .shelf { grid-auto-columns: calc((100% - 14px * 3) / 3.3); } }
@media (min-width: 1068px) { .shelf { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; margin: 0; padding: 0; } }
.tile {
  scroll-snap-align: start; display: flex; flex-direction: column;
  background: var(--tile); border-radius: var(--radius-l); overflow: hidden; color: var(--text);
}
.tile:hover { text-decoration: none; }
.tile .mat { aspect-ratio: 1; padding: 20px; }
.tile .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tile .where { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.tile-name { font-size: var(--fs-sub); font-weight: 600; line-height: 1.45; }
.tile .price { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tile .price small { font-size: 12px; color: var(--text-2); }

/* 記事カード */
.stories { display: grid; gap: 20px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 734px) { .stories { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.story { display: block; color: var(--text); background: var(--tile); border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--hair); }
.band.alt .story { border-color: transparent; }
.story:hover { text-decoration: none; }
.story .thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair); }
.story .thumbs .mat { aspect-ratio: 1; padding: 10px; }
.story .body { padding: 20px 20px 22px; }
.story .label { margin-bottom: 6px; }
.story h3 { font-size: 19px; line-height: 1.45; margin-bottom: 10px; }
.story time { font-size: var(--fs-note); color: var(--text-2); }

.genres { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.genres li { border-bottom: 1px solid var(--line); }
.genres a, .genres span.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; color: var(--text); font-weight: 600; }
.genres a::after { content: "›"; color: var(--text-2); font-weight: 400; font-size: 20px; }
.genres small { font-weight: 400; color: var(--text-2); font-size: var(--fs-note); margin-left: 8px; }
.genres span.row.soon { color: var(--text-2); font-weight: 400; }

/* ===== 5. 記事 ===== */
.article-head { padding: 24px 0 8px; }
.article-head .pr { padding: 12px 0; border-bottom: 1px solid var(--hair); margin-bottom: 28px; }
.article-head .label { margin-bottom: 10px; }
.article-head .label a { color: inherit; }
.article-head h1 { margin-bottom: 14px; }
.article-head time { font-size: var(--fs-note); color: var(--text-2); }

/* 記事内の商品の棚（小さめ・各カードへのジャンプ） */
.picks-nav { margin: 28px 0 8px; }
.picks-nav .shelf { grid-auto-columns: 34%; gap: 10px; }
@media (min-width: 734px) { .picks-nav .shelf { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; margin: 0; padding: 0; } }
.picks-nav a { color: var(--text); font-size: 12px; line-height: 1.45; display: block; }
.picks-nav a:hover { text-decoration: none; }
.picks-nav .mat { aspect-ratio: 1; border-radius: var(--radius-m); padding: 8px; border: 1px solid var(--hair); margin-bottom: 8px; }
.picks-nav .nm { display: block; font-weight: 600; font-feature-settings: "palt"; }

/* 要点 */
.keypoints { margin: 40px 0; padding-top: 20px; border-top: 2px solid var(--text); }
.keypoints .label { color: var(--text); margin-bottom: 12px; }
.keypoints ol { list-style: none; margin: 0; padding: 0; counter-reset: k; }
.keypoints li { counter-increment: k; display: grid; grid-template-columns: 1.6em 1fr; padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: 17px; line-height: 1.75; }
.keypoints li::before { content: counter(k); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.keypoints .more { display: inline-block; margin-top: 14px; }

.notice { background: var(--bg-2); border-radius: var(--radius-m); padding: 16px 18px; font-size: 14px; line-height: 1.75; color: var(--text-2); margin: 0 0 8px; }
.notice b { color: var(--text); font-weight: 600; margin-right: .5em; }

.section { margin-top: 72px; }
.section > h2 { margin-bottom: 10px; }
.section > .note { margin-bottom: 24px; }
@media (min-width: 734px) { .section { margin-top: 96px; } }

/* 比較リスト（スマホ・PC共通。表はやめる） */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.rows a.row { display: grid; grid-template-columns: 56px 1fr auto; gap: 4px 14px; align-items: center; padding: 14px 0; color: var(--text); }
.rows a.row:hover { text-decoration: none; background: var(--bg-2); }
.rows .mat { width: 56px; height: 56px; border-radius: 10px; padding: 3px; border: 1px solid var(--hair); grid-row: span 2; }
.rows .nm { grid-column: 2 / 4; font-size: var(--fs-sub); font-weight: 600; line-height: 1.4; align-self: end; }
.rows .opt { grid-column: 2; font-size: 12px; line-height: 1.55; color: var(--text-2); align-self: start; }
.rows .yen { grid-column: 3; grid-row: 2; align-self: start; text-align: right; }
@media (min-width: 734px) {
  .rows a.row { grid-template-columns: 64px 1fr auto; padding: 16px 12px; margin: 0 -12px; border-radius: 12px; }
  .rows .mat { width: 64px; height: 64px; }
  .rows .nm { grid-column: 2; }
  .rows .opt { font-size: 13px; }
  .rows .yen { grid-row: 1 / 3; align-self: center; }
}
.rows-more summary {
  list-style: none; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: .3em;
  min-height: 52px; color: var(--link); font-size: var(--fs-sub); border-bottom: 1px solid var(--line);
}
.rows-more summary::-webkit-details-marker { display: none; }
.rows-more summary::after { content: ""; width: .45em; height: .45em; margin-left: .35em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-.15em) rotate(45deg); }
.rows-more[open] summary { display: none; }
.rows-more .rows { border-top: 0; }

/* 商品カード：カード枠・影はやめ、区切り線と余白で区切る */
.pick { padding: 40px 0 48px; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.pick:first-of-type { border-top: 0; padding-top: 8px; }
.pick .label { margin-bottom: 8px; }
.pick .label .no { color: var(--text); margin-right: .6em; font-variant-numeric: tabular-nums; }
.pick h3.name { font-size: var(--fs-h3); margin-bottom: 8px; }
.pick .tagline { font-size: var(--fs-sub); line-height: 1.7; color: var(--text-2); margin-bottom: 20px; }
.pick .stage { background: var(--bg-2); border-radius: var(--radius-l); padding: 28px; display: grid; place-items: center; margin-bottom: 24px; }
.pick .stage a { display: block; width: min(100%, 260px); }
.pick .stage .mat { aspect-ratio: 1; }  /* 台座(灰)の上に白い商品写真をそのまま置く */
.spec { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 6px; }
.spec > div { padding: 2px 16px 2px 0; }
.spec > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.spec dt { font-size: 12px; line-height: 1.5; color: var(--text-2); margin-bottom: 4px; font-feature-settings: "palt"; }
.spec dd { margin: 0; }
.spec dd small { display: block; font-size: 12px; color: var(--text-2); line-height: 1.5; margin-top: 4px; }
.pick .basis { font-size: 12px; line-height: 1.6; color: var(--text-2); margin: 12px 0 24px; }
.points { list-style: none; margin: 0 0 20px; padding: 0; }
.points li { position: relative; padding: 0 0 0 1.1em; margin: 0 0 10px; line-height: 1.8; }
.points li::before { content: ""; position: absolute; left: .15em; top: .82em; width: 5px; height: 5px; border-radius: 50%; background: var(--text-2); }
.caution { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: var(--fs-sub); line-height: 1.75; margin: 0 0 24px; padding: 14px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.caution b { font-size: 12px; font-weight: 600; color: var(--caution); letter-spacing: .06em; line-height: 2.2; white-space: nowrap; }
@media (min-width: 734px) {
  .pick .body { display: grid; grid-template-columns: 280px 1fr; gap: 0 40px; align-items: start; }
  .pick .stage { margin: 0; position: sticky; top: 72px; }
}

/* 本文セクション */
.prose h2 { margin-bottom: 20px; }
.prose p { margin-bottom: 1.1em; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; min-height: 60px; padding: 14px 0; font-weight: 600; line-height: 1.6; font-feature-settings: "palt"; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 300; color: var(--text-2); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text); margin: 0 0 .8em; }
.faq details > div { padding-bottom: 16px; }

/* 末尾 */
.closing { background: var(--bg-2); margin-top: 80px; padding: 56px 0 64px; text-align: center; }
.closing .label { margin-bottom: 10px; }
.closing h2 { margin-bottom: 12px; }
.closing .lead { max-width: 26em; margin: 0 auto 28px; font-size: 17px; }
.closing .mat { width: 200px; aspect-ratio: 1; margin: 0 auto 20px; border-radius: var(--radius-m); padding: 12px; }
.closing .nm { font-weight: 600; margin-bottom: 2px; }
.closing .btn { margin-top: 20px; min-width: 240px; }
.closing .back { margin: 16px 0 0; }
.shelf-note { margin: -12px 0 20px; }

/* ===== 6. 一般ページ（運営者情報・ジャンル・まとめ・404） ===== */
.page { padding-top: 40px; padding-bottom: 80px; }
.page > h1, .page .article-head h1 { margin-bottom: 16px; }
.page > h2, .page .section > h2 { margin: 56px 0 16px; font-size: var(--fs-h3); }
.page .section { margin-top: 0; }
.page ul, .page ol { padding-left: 1.3em; margin: 0 0 1em; }
.page li { margin-bottom: .4em; }
.page .points, .page .list { padding-left: 0; }
.page .lead { margin-bottom: 32px; }
.page .intro { margin-top: 24px; color: var(--text-2); }
.info { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; margin: 0; }
.info dt { color: var(--text-2); }
.info dd { margin: 0; }

.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); margin: 0; }
.list a { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; color: var(--text); }
.list a:hover { text-decoration: none; }
.list a:hover .nm { color: var(--link); }
.list .nm { font-weight: 600; line-height: 1.5; }
.list time { font-size: var(--fs-note); color: var(--text-2); }

/* 出典つきの事実の一覧 */
.facts .points small { display: block; font-size: var(--fs-note); color: var(--text-2); }
.facts .more { display: inline-block; margin-top: 4px; }

/* 説明文は文節で折り返す（日付・金額の途中で切らない）。商品名は上の keep-all のまま */
.lead, .note, .basis, .notice, .tagline { word-break: auto-phrase; }
.site-footer { border-top: 1px solid var(--line); }
