/* ふるさと納税LIVE 一覧・詳細などのページ。トップ(観測日報)と同じ紙面の見た目にそろえる */

:root {
  /* トップ(観測日報)・一覧・詳細と同じ紙面の色。明るい/暗いは color-scheme(紙面の切り替えで保存した設定)に従う */
  color-scheme: light dark;
  --paper: light-dark(#f5f1e7, #1b1914);
  --paper-2: light-dark(#ebe6d8, #26231b);
  --ink: light-dark(#252721, #e9e3d6);
  --muted: light-dark(#666457, #b6ad9c);
  --rule: light-dark(#b6b4a5, #655e50);
  --rule-2: light-dark(#d7d1c1, #403b30);
  --photo: var(--paper-2);
  --red: light-dark(#9b3727, #e4a28b);
  --red-strong: light-dark(#772d22, #f0bda8);
  --blue: light-dark(#3e5744, #b6cba9);
  --blue-soft: light-dark(#e2e6da, #262d24);
  --warn: light-dark(#9a4f12, #e0a05f);
  --warn-soft: light-dark(#f3e6d6, #33271a);
  --down: var(--blue);
  --up: var(--warn);
  --live: #d33a2c;
  --star: light-dark(#b8801f, #e0b25f);
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); line-height: 1.75; font-size: 15px; }
/* 横にはみ出す要素があっても、スマホで右側に余白ができて横に動かないようにする(sticky を壊さない clip を使う) */
html, body { overflow-x: clip; }
a { color: var(--red); }
a:hover { color: var(--red-strong); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 800; line-height: 1.4; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; padding-top: 48px; padding-bottom: 64px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--paper-2); padding: 8px 12px; z-index: 50; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
/* 入力欄(検索ボックス・選択欄など)は赤い枠を出さず、下線を少し太くして入力中であることだけを示す */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus-visible,
select:focus, select:focus-visible, textarea:focus, textarea:focus-visible { outline: none; box-shadow: inset 0 -2px 0 var(--ink); }
.pr {
  display: inline-block; font-size: 10.5px; font-weight: 700; border: 1px solid currentColor;
  padding: 0 4px; margin-right: 6px; line-height: 1.5; vertical-align: 1px;
}
.env-banner {
  background: repeating-linear-gradient(135deg, #7a1d1d 0 12px, #8f2424 12px 24px); color: #fff;
  font-size: 13px; font-weight: 700; text-align: center; padding: 6px 16px;
}

/* ヘッダー(題字を小さくした形) */
.site-header { background: var(--paper); border-bottom: 4px double var(--ink); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink) !important; flex-shrink: 0; }
.brand-name { font-family: var(--serif); font-weight: 800; font-size: 22px; letter-spacing: 0.04em; white-space: nowrap; }
.brand-sub { font-family: var(--serif); font-weight: 700; font-size: 12px; letter-spacing: 0.3em; color: var(--muted); }
.header-search { flex: 1; max-width: 420px; }
.header-search input {
  width: 100%; height: 40px; border: 1px solid var(--ink); border-radius: 0; padding: 0 14px;
  background: var(--paper-2); color: var(--ink); font-size: 14px; font-family: inherit;
}
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 14px; }
.header-nav a { text-decoration: none; color: var(--ink); white-space: nowrap; }
.header-nav a:hover { color: var(--red); }
@media (max-width: 719px) {
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 8px 14px; }
  .brand-name { font-size: 19px; }
  .brand-sub { display: none; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .header-nav { gap: 6px 14px; font-size: 13px; flex-wrap: wrap; margin-left: 0; width: 100%; }
  .site-header { position: static; }
}

.fetched { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex-shrink: 0; }

/* 見出しつきの段 */
.section { padding-top: 32px; padding-bottom: 8px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 14px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.section-title { font-size: 24px; margin: 0; }
.section-note { margin: 0; color: var(--muted); font-size: 13px; flex-basis: 100%; }
.more { margin-left: auto; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }

/* 返礼品カード */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
@media (max-width: 519px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.card { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper); }
.card:hover { background: var(--paper-2); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink) !important; padding: 12px; gap: 8px; }
.card-img { position: relative; aspect-ratio: 1; background: var(--photo); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.img-none { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.is-soldout .card-img img { opacity: .45; }
.soldout-badge { position: absolute; left: 8px; top: 8px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 700; padding: 2px 8px; }
.soldout-badge.lg { font-size: 14px; padding: 4px 12px; left: 12px; top: 12px; }
.card-body { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card-muni { margin: 0; font-size: 12px; color: var(--muted); }
.card-name { margin: 0; font-family: var(--sans); font-size: 13.5px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-link:hover .card-name { text-decoration: underline; }
.card-prices { display: flex; flex-direction: column; gap: 3px; margin-top: auto; padding-top: 4px; }

.donation { display: inline-flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.donation-val { font-family: var(--serif); font-weight: 800; font-size: 19px; }
.donation-range { font-size: 12px; color: var(--muted); }
.donation-lg .donation-val { font-size: 34px; }
.donation-lg .donation-range { font-size: 15px; }

.unit-price {
  display: inline-flex; align-items: baseline; gap: 5px; flex-wrap: wrap; font-variant-numeric: tabular-nums;
  color: var(--blue); border: 1px solid var(--blue); padding: 1px 6px; font-size: 12px; width: fit-content; background: var(--blue-soft);
}
.unit-price .val { font-weight: 700; }
.unit-price.is-estimated { background: transparent; border-style: dashed; color: var(--muted); border-color: var(--muted); }
.unit-price .est { font-size: 10.5px; font-weight: 700; background: var(--muted); color: var(--paper); padding: 0 4px; }
.unit-price-lg { font-size: 15px; padding: 6px 12px; }
.unit-price-lg .val { font-family: var(--serif); font-size: 28px; font-weight: 800; }

.flags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.flag { font-size: 11px; color: var(--warn); background: var(--warn-soft); padding: 1px 6px; }

.stars { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stars-bar { font-size: 12px; letter-spacing: 1px; background: linear-gradient(90deg, var(--star) var(--rating), var(--rule) var(--rating)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars-avg { font-weight: 700; color: var(--ink); }

/* 一覧 */
.list-layout { display: grid; grid-template-columns: 250px 1fr; gap: 32px; padding-top: 24px; padding-bottom: 48px; align-items: start; }
@media (max-width: 859px) { .list-layout { grid-template-columns: 1fr; gap: 16px; } }
.filters { border: 1px solid var(--ink); background: var(--paper-2); padding: 16px; position: sticky; top: 84px; }
@media (max-width: 859px) { .filters { position: static; } }
.filter-form { display: flex; flex-direction: column; gap: 14px; }
/* 一品の予算(検索一覧の絞り込みの上) */
.budget-box { display: grid; gap: 8px; margin: 0 0 16px; padding: 0 0 14px; border-bottom: 1px solid var(--rule); font-size: 13px; }
.budget-box > span { font-weight: 700; }
.budget-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.budget-choices a { padding: 5px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); text-decoration: none; background: var(--paper); }
.budget-choices a.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 5px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0; margin-bottom: 5px; }
.field input, .field select, .price-range select {
  height: 40px; border: 1px solid var(--rule); border-radius: 0; padding: 0 10px; background: var(--paper); color: var(--ink); font-size: 14px; width: 100%; font-family: inherit;
}
.price-range { display: flex; align-items: center; gap: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border: 0; border-radius: 0;
  background: var(--ink); color: var(--paper) !important; font-weight: 700; font-size: 15px; font-family: inherit; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--red); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; }
.reset { text-align: center; font-size: 13px; color: var(--muted); }

.results-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.results-head h1 { font-size: 28px; margin: 0; }
.count { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.sort-tabs { display: flex; gap: 2px; overflow-x: auto; margin: 12px 0 16px; border-bottom: 1px solid var(--rule); }
.sort-tabs a { text-decoration: none; padding: 8px 12px; font-size: 14px; color: var(--muted); white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.sort-tabs a:hover { color: var(--ink); }
.sort-tabs a.is-active { color: var(--ink); font-weight: 700; border-bottom-color: var(--red); }

.unit-bar { border: 1px solid var(--rule); background: var(--paper-2); padding: 12px 14px; margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.unit-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.unit-choices a { text-decoration: none; font-size: 13px; padding: 4px 12px; border: 1px solid var(--rule); color: var(--ink); display: inline-flex; gap: 6px; align-items: baseline; }
.unit-choices a small { color: var(--muted); font-size: 11px; }
.unit-choices a.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.unit-choices a.is-active small { color: var(--rule); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; text-decoration: none; margin-left: auto; color: var(--ink); }
.toggle-knob { width: 34px; height: 20px; background: var(--rule); position: relative; }
.toggle-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--paper); transition: left .15s; }
.toggle.is-on .toggle-knob { background: var(--blue); }
.toggle.is-on .toggle-knob::after { left: 16px; }
.unit-note { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted); }
.empty { border: 1px dashed var(--rule); padding: 32px; text-align: center; color: var(--muted); }
.empty p { margin: 4px 0; }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 10px; display: grid; place-items: center; font-size: 14px; text-decoration: none; font-variant-numeric: tabular-nums; }
.pager a { border: 1px solid var(--rule); color: var(--ink); }
.pager a:hover { border-color: var(--ink); }
.pager .is-current { background: var(--ink); color: var(--paper); font-weight: 700; }
.pager .is-disabled { color: var(--rule); }
.pager .gap { color: var(--muted); }

/* 詳細 */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); padding: 16px 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs a + a::before { content: "›"; margin-right: 6px; color: var(--rule); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; align-items: start; border-bottom: 1px solid var(--ink); padding-bottom: 32px; }
@media (max-width: 859px) { .detail { grid-template-columns: 1fr; gap: 20px; } }
.detail-img { position: relative; background: var(--photo); border: 1px solid var(--rule); aspect-ratio: 1; }
.detail-img img { width: 100%; height: 100%; object-fit: contain; }
.detail-info { display: flex; flex-direction: column; gap: 12px; }
.detail-muni { margin: 0; font-size: 14px; }
.detail-muni a { font-weight: 700; text-decoration: none; }
.detail-name { font-size: 28px; margin: 0; line-height: 1.4; }
.catch { margin: 0; color: var(--muted); font-size: 14px; }

.price-panel, .unit-panel { border: 1px solid var(--ink); background: var(--paper-2); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.price-row { display: flex; align-items: baseline; gap: 14px; }
.price-row .label { font-size: 13px; color: var(--muted); font-weight: 700; }
.note { margin: 0; font-size: 13px; color: var(--muted); }
.price-fetched { margin: 0; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cta { display: flex; align-items: center; justify-content: center; height: 56px; background: var(--red); color: #fff !important; font-weight: 700; font-size: 17px; text-decoration: none; }
.cta:hover { background: var(--red-strong); }
.cta.is-soldout { background: var(--photo); color: var(--muted) !important; }
.pr-note { margin: 0; font-size: 12px; color: var(--muted); }
.unit-panel { align-items: flex-start; }
.unit-panel h2 { font-size: 16px; margin: 0; }
.basis { margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.compare { margin: 0; font-size: 14px; }
.compare strong { margin-left: 6px; }
.compare.is-cheaper strong { color: var(--down); }
.compare.is-higher strong { color: var(--up); }
.flag-block { display: flex; flex-direction: column; gap: 6px; }
.flag-title { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.flag-block .flag { font-size: 12.5px; padding: 2px 8px; }
.recent-change { margin: 0; font-size: 13.5px; font-weight: 700; padding: 6px 10px; font-variant-numeric: tabular-nums; border: 1px solid currentColor; }
.recent-change.is-down { color: var(--down); }
.recent-change.is-up { color: var(--up); }

.caption details { border: 1px solid var(--rule); background: var(--paper-2); }
.caption summary { cursor: pointer; padding: 14px 18px; font-weight: 700; font-size: 14px; }
.caption-body { padding: 0 18px 16px; font-size: 14px; color: var(--muted); max-height: 520px; overflow: auto; }
.caption-body p { margin: 0 0 4px; overflow-wrap: anywhere; }

/* 観測の記録 */
.log-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0; align-items: start; }
@media (max-width: 859px) { .log-grid { grid-template-columns: 1fr; } }
.log-card { padding: 0 24px; border-left: 1px solid var(--rule); }
.log-card:first-child, .log-card-solo { padding-left: 0; border-left: 0; }
@media (max-width: 859px) { .log-card { padding: 16px 0 0; border-left: 0; } .log-card + .log-card { border-top: 1px solid var(--rule); margin-top: 16px; } }
.log-card h3 { margin: 0 0 10px; font-size: 18px; }
.log-table { margin-top: 10px; font-size: 13px; }
.log-table summary { cursor: pointer; color: var(--muted); }
.log-table table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.log-table th, .log-table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--rule-2); }
.log-table th { color: var(--muted); font-weight: 700; font-size: 12px; }
.log-table td + td, .log-table th + th { text-align: right; }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.ev { display: grid; grid-template-columns: 92px 1fr; gap: 2px 10px; padding: 9px 0 9px 14px; border-bottom: 1px solid var(--rule-2); position: relative; font-size: 13.5px; }
.ev:last-child { border-bottom: 0; }
.ev::before { content: ""; position: absolute; left: 0; top: 16px; width: 7px; height: 7px; background: var(--muted); }
.ev time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; grid-row: span 2; }
.ev-label { font-weight: 700; }
.ev-detail { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ev-down::before { background: var(--down); } .ev-down .ev-label { color: var(--down); }
.ev-up::before { background: var(--up); } .ev-up .ev-label { color: var(--up); }
.ev-warn::before { background: var(--warn); }
.ev-good::before { background: var(--blue); }

/* 値下がり・値上がり */
.changes { padding-top: 24px; padding-bottom: 48px; }
.lead { color: var(--muted); font-size: 14px; margin: 8px 0 16px; }
.change-controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 18px; }
.seg { display: inline-flex; border: 1px solid var(--ink); }
.seg a { text-decoration: none; font-size: 14px; padding: 6px 14px; color: var(--ink); white-space: nowrap; }
.seg a + a { border-left: 1px solid var(--ink); }
.seg a.is-active { background: var(--ink); color: var(--paper); font-weight: 700; }
.change-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.change-filter input, .change-filter select { height: 38px; border: 1px solid var(--rule); border-radius: 0; padding: 0 10px; background: var(--paper); color: var(--ink); font-size: 14px; font-family: inherit; }
.change-filter input { width: 160px; }
@media (max-width: 719px) { .change-filter { margin-left: 0; width: 100%; } .change-filter input { flex: 1; width: auto; } }
.rate-badge { position: absolute; right: 8px; top: 8px; font-weight: 700; font-size: 13px; padding: 2px 8px; font-variant-numeric: tabular-nums; color: #fff; }
.rate-badge.is-down { background: #1d5f91; }
.rate-badge.is-up { background: #9a4f12; }
.change-line { margin: 2px 0 0; display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.change-when { color: var(--muted); font-size: 12px; }
.change-vals s { color: var(--muted); }
.change-card .card-prices { flex-direction: row; align-items: baseline; gap: 6px; }
.now-label { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--rule); padding: 0 5px; }
.change-card .fetched { font-size: 11.5px; color: var(--muted); }

/* エラーページ */
.error-actions { display: flex; align-items: center; gap: 18px; margin-top: 20px; }

/* フッター */
.site-footer { margin-top: 56px; border-top: 4px double var(--ink); font-size: 13px; color: var(--muted); }
.footer-inner { display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px; padding-top: 24px; padding-bottom: 12px; }
@media (max-width: 719px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand { color: var(--ink); font-family: var(--serif); font-weight: 800; margin: 0 0 6px; font-size: 17px; }
.footer-inner p { margin: 0 0 6px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 12px; padding-bottom: 24px; border-top: 1px solid var(--rule); }
.site-footer a { color: var(--muted); }

/* 単価順の「比べる品目」と「単位」 */
.unit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; flex-basis: 100%; padding-bottom: 10px; border-bottom: 1px solid var(--rule-2); }
.unit-row-label { font-size: 12px; font-weight: 700; color: var(--muted); }

/* 控除上限額のかんたん試算 */
.sim { padding-top: 24px; padding-bottom: 32px; }
.sim .lead strong { color: var(--ink); font-weight: 700; }
.sim-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 8px; }
@media (max-width: 859px) { .sim-grid { grid-template-columns: 1fr; gap: 20px; } }
.sim-form { display: flex; flex-direction: column; gap: 18px; border: 1px solid var(--ink); background: var(--paper-2); padding: 20px; }
.sim-form small { font-size: 12px; color: var(--muted); line-height: 1.6; }
.sim-input { display: flex; align-items: center; gap: 8px; }
.sim-input input { flex: 1; height: 48px; font-size: 18px; }
.sim-input em { font-style: normal; font-size: 14px; color: var(--muted); }
.sim-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sim-counts label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.sim-counts input { height: 44px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); padding: 0 10px; font-size: 16px; font-family: inherit; }
.sim-result { border: 1px solid var(--ink); padding: 20px; position: sticky; top: 84px; background: var(--paper); }
@media (max-width: 859px) { .sim-result { position: static; } }
.sim-label { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.sim-value { margin: 4px 0 0; font-family: var(--serif); font-weight: 800; line-height: 1.1; }
.sim-value span { font-size: 56px; font-variant-numeric: tabular-nums; }
.sim-value small { font-size: 20px; margin-left: 4px; }
.sim-sub { margin: 10px 0 0; font-size: 14px; }
.sim-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.sim-actions[hidden] { display: none; }
.sim-copy { background: transparent; color: var(--ink) !important; border: 1px solid var(--ink); }
.sim-copy:hover { background: var(--paper-2); }
.sim-detail { margin-top: 18px; border-top: 1px solid var(--rule); padding-top: 10px; font-size: 13px; }
.sim-detail summary { cursor: pointer; font-weight: 700; }
.sim-detail table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.sim-detail th, .sim-detail td { text-align: left; padding: 6px 0; border-bottom: 1px solid var(--rule-2); font-weight: 400; }
.sim-detail td { text-align: right; }
.sim-formula { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.sim-notes ul { margin: 0; padding-left: 1.2em; line-height: 1.9; }
.sim-notes li + li { margin-top: 6px; }
.field input[type="checkbox"], .field input[type="radio"] { width: 20px; height: 20px; padding: 0; flex-shrink: 0; accent-color: var(--red); }
.sim-form .check { align-items: flex-start; gap: 10px; line-height: 1.5; }

/* 詳細ページ: 相場(同じ品目の単価の分布)と、この返礼品の位置 */
/* この返礼品の色(橙)。紙面の明るい・暗いの切り替え(color-scheme)に合わせる */
:root { --bm-item: light-dark(#b4540c, #f29a52); }
.bm { margin: 6px 0 0; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.bm-title { font-size: 13px; font-weight: 700; }
.bm-chart { width: 100%; height: auto; display: block; overflow: visible; }
.bm-iqr { fill: var(--blue-soft); }
.bm-dot { fill: var(--muted); opacity: 0.75; }
.bm-bar { fill: var(--muted); opacity: 0.6; }
.bm-axis { stroke: var(--ink); stroke-width: 1; }
.bm-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.bm-median { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 3; }
.bm-item { stroke: var(--bm-item); stroke-width: 2; }
.bm-item-dot { fill: var(--bm-item); stroke: var(--paper); stroke-width: 2; }
.bm-tag rect { fill: var(--paper); stroke-width: 1.2; }
.bm-tag text { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bm-tag-item rect { stroke: var(--bm-item); stroke-width: 1.5; }
.bm-tag-item text { fill: var(--bm-item); }
.bm-tag-median rect { stroke: var(--ink); stroke-dasharray: 4 3; }
.bm-tag-median text { fill: var(--ink); }
.bm-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: 11.5px; color: var(--muted); }
.bm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bm-legend i { display: inline-block; }
.bm-key-item { width: 10px; height: 10px; border-radius: 50%; background: var(--bm-item); }
.bm-key-median { width: 14px; border-top: 1.5px dashed var(--ink); }
.bm-key-iqr { width: 14px; height: 10px; background: var(--blue-soft); }
.bm-key-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.bm-rank { margin: 0; font-size: 13.5px; }
.bm-rank strong { color: var(--bm-item); margin: 0 2px; }
.bm-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.bm-table th, .bm-table td { padding: 5px 0; border-bottom: 1px solid var(--rule-2); text-align: left; font-weight: 400; }
.bm-table th { color: var(--muted); }
.bm-table td { text-align: right; }

/* ベンチマーク比較の動き(重ねたときの反応と、表示したときの立ち上がり) */
.bm { position: relative; }
.bm-chart { touch-action: pan-y; cursor: crosshair; }
.bm-tip {
  position: absolute; z-index: 5; pointer-events: none; display: flex; flex-direction: column; gap: 1px;
  background: var(--ink); color: var(--paper); padding: 6px 10px; font-size: 12px; line-height: 1.5;
  border-radius: 3px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.bm-tip[hidden] { display: none; }
.bm-tip b { font-variant-numeric: tabular-nums; font-size: 13px; }
.bm-guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; pointer-events: none; }
.bm-dot, .bm-bar, .bm-tag { transform-box: fill-box; }
.bm-dot { transform-origin: center; transition: opacity 0.15s, transform 0.15s, fill 0.15s; }
.bm-bar { transform-origin: center bottom; transition: opacity 0.15s, transform 0.15s, fill 0.15s; }
.bm-tag { transform-origin: center; transition: transform 0.15s; }
.bm-dot.is-hover { fill: var(--ink); opacity: 1; transform: scale(1.7); }
.bm-bar.is-hover { fill: var(--ink); opacity: 0.85; }
.bm-tag.is-hover { transform: scale(1.06); }
@media (prefers-reduced-motion: no-preference) {
  .bm.js-anim:not(.is-ready) .bm-dot { opacity: 0; transform: translateY(10px); }
  .bm.js-anim:not(.is-ready) .bm-bar { transform: scaleY(0); }
  .bm.js-anim:not(.is-ready) .bm-tag { opacity: 0; }
  .bm .bm-item { stroke-dasharray: 220; stroke-dashoffset: 0; transition: stroke-dashoffset 0.6s ease 0.35s; }
  .bm.js-anim:not(.is-ready) .bm-item { stroke-dashoffset: 220; }
  .bm:not(.is-settled) .bm-dot { transition: opacity 0.4s ease calc(var(--i) * 8ms), transform 0.4s ease calc(var(--i) * 8ms); }
  .bm:not(.is-settled) .bm-bar { transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i) * 12ms); }
  .bm:not(.is-settled) .bm-tag { transition: opacity 0.35s ease 0.8s; }
}

/* 分布の点: 自分の点は橙、ほかの点はその品のページへのリンク */
.bm-dot.is-self { fill: var(--bm-item); opacity: 1; }
.bm-chart a { cursor: pointer; }
.bm-chart a:focus-visible .bm-dot { fill: var(--ink); opacity: 1; stroke: var(--bm-item); stroke-width: 2; }
.bm-chart.is-pointing { cursor: pointer; }
.bm-tip .bm-tip-name { font-weight: 700; max-width: 18em; white-space: normal; }
.bm-tip .bm-tip-sub { opacity: 0.85; }

/* 点に重ねたときの表示: 左に商品画像の縮小版、右に文字 */
.bm-tip { flex-direction: row; align-items: flex-start; gap: 10px; }
.bm-tip-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bm-tip-img { width: 64px; height: 64px; object-fit: cover; border-radius: 2px; background: var(--paper); flex-shrink: 0; align-self: center; }
.bm-tip.has-img .bm-tip-name { max-width: 16em; }

/* 品の情報(品名あり)の表示: 文字の欄を一定の幅にして、すべての行をその幅で折り返す(右側に空きを作らない)。
   長すぎる品名は5行目の末尾を「…」で終える */
.bm-tip.has-name { white-space: normal; }
.bm-tip.has-name .bm-tip-body { width: 19em; max-width: calc(100vw - 140px); }
.bm-tip.has-name .bm-tip-name {
  max-width: none; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}

/* 品目のポジションマップ(縦: 内容量、横: 寄付額) */
.pm-page { padding-bottom: 40px; }
.pm { position: relative; margin: 16px 0 0; }
.pm-chart { width: 100%; max-width: 960px; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.pm-chart.is-pointing { cursor: pointer; }
.pm-grid { stroke: var(--rule-2); stroke-width: 1; }
.pm-axis { stroke: var(--ink); stroke-width: 1; }
.pm-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.pm-axis-label { fill: var(--muted); font-size: 12px; font-weight: 700; }
.pm-region { fill: var(--muted); font-size: 12px; opacity: 0.85; }
.pm-band { fill: var(--blue-soft); opacity: 0.8; }
.pm-median { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; }
.pm-median-label { fill: var(--ink); font-size: 12px; font-weight: 700; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.pm-dot { fill: var(--muted); opacity: 0.7; transition: transform 0.15s, fill 0.15s, opacity 0.15s; transform-box: fill-box; transform-origin: center; }
.pm-dot.is-soldout { opacity: 0.3; }
.pm-dot.is-hover { fill: var(--ink); opacity: 1; transform: scale(1.8); }
.pm-chart a:focus-visible .pm-dot { fill: var(--ink); opacity: 1; stroke: var(--bm-item); stroke-width: 2; }
.pm-self-ring { fill: var(--paper); stroke: var(--bm-item); stroke-width: 3; }
.pm-self-fill { fill: var(--bm-item); }
.pm-self-tag rect { fill: var(--paper); stroke: var(--bm-item); stroke-width: 1.5; }
.pm-self-tag text { fill: var(--bm-item); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* 番号の印を付けた品(トップの特集で比べる品) */
.pm-dot.pm-mark { fill: var(--bm-item); opacity: 1; stroke: var(--paper); stroke-width: 2; }
.pm-dot.pm-mark.is-hover { fill: var(--bm-item); transform: scale(1.2); }
.pm-mark-label { fill: #fff; font-size: 13px; font-weight: 700; pointer-events: none; }
.pm-key-mark { width: 12px; height: 12px; border-radius: 50%; background: var(--bm-item); }
.pm-key-median { width: 14px; border-top: 1.5px dashed var(--ink); }
.pm-key-band { width: 14px; height: 10px; background: var(--blue-soft); }
.pm-note, .pm-foot { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.pm-self-note { border: 1px solid var(--bm-item); padding: 10px 14px; margin: 12px 0 0; font-size: 14px; }
.pm-self-note a { margin-left: 8px; font-weight: 700; }
.pm-filter { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin: 14px 0 4px; padding: 12px 14px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pm-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; font-size: 12px; color: var(--muted); font-weight: 700; }
/* グループ名(例: カニ(姿(丸ごと)・ボイル・…))は長いので、幅を抑えて末尾を省く */
.pm-field select { min-width: 10em; max-width: min(100%, 30em); text-overflow: ellipsis; padding: 6px 28px 6px 10px; font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px; }
.pm-filter button { padding: 7px 16px; font: inherit; font-size: 14px; color: var(--paper); background: var(--ink); border: 0; border-radius: 3px; cursor: pointer; }
@media (max-width: 560px) { .pm-field { flex: 1 1 100%; } .pm-field select { width: 100%; } }

/* 詳細ページの寄付額の推移(申し込む前に、三つの視点 の上) */
.price-trend .section-note { margin: 0; }
.trend-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 14px 0 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.trend-stat { padding: 12px 14px; border-left: 1px solid var(--rule-2); }
.trend-stat:first-child { border-left: 0; padding-left: 0; }
.trend-stat dt { font-size: 12px; color: var(--muted); font-weight: 700; }
.trend-stat dd { margin: 4px 0 0; display: flex; flex-direction: column; }
.trend-stat strong { font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.trend-stat small { font-size: 11.5px; color: var(--muted); }
.trend-stat.is-current strong { color: var(--bm-item); }
.trend-stat.is-low.is-now small { color: var(--blue); font-weight: 700; }
.trend-summary { margin: 12px 0 0; font-size: 14px; }
.trend { position: relative; margin: 12px 0 0; }
.trend-chart { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.trend-grid { stroke: var(--rule-2); stroke-width: 1; stroke-dasharray: 3 3; }
.trend-base { stroke: var(--ink); stroke-width: 1; }
.trend-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.trend-area { fill: color-mix(in srgb, var(--red) 9%, transparent); }
.trend-line { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linejoin: round; }
.trend-change { fill: var(--red); stroke: var(--paper); stroke-width: 2; }
.trend-now { fill: var(--paper); stroke: var(--bm-item); stroke-width: 3; }
.trend-label { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.trend-label.is-now { fill: var(--bm-item); }
.trend-label.is-low { fill: var(--blue); }
.trend-guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
@media (max-width: 560px) { .trend-stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule-2); } .trend-stat:first-child { border-top: 0; } }

/* RSS フィードの案内 */
.feed-card { margin: 22px 0 0; padding: 16px 0 0; border-top: 1px solid var(--ink); }
.feed-card h2 { margin: 0 0 6px; font-size: 19px; }
.feed-card p { margin: 0 0 10px; font-size: 14px; }
.feed-url { display: flex; gap: 8px; }
.feed-url input { flex: 1; min-width: 0; padding: 9px 11px; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px; }
.feed-url button { flex: none; padding: 9px 16px; font: 700 14px/1.4 var(--sans); color: var(--paper); background: var(--ink); border: 0; border-radius: 3px; cursor: pointer; }
.feeds-page .note { margin-top: 26px; font-size: 12.5px; color: var(--muted); }
/* 商品説明: 基本情報・説明・注意事項・寄付金の使い道 */
.caption h3 { margin: 22px 0 8px; font-size: 16px; }
.caption-spec dl { margin: 0; border-top: 1px solid var(--ink); }
.caption-spec dl > div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--rule-2); font-size: 14px; }
@media (max-width: 560px) { .caption-spec dl > div { grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; } }
.caption-spec dt { color: var(--muted); font-weight: 700; font-size: 13px; }
.caption-spec dd { margin: 0; overflow-wrap: anywhere; }
.caption-preview ul, .caption-body ul { margin: 0 0 12px; padding-left: 1.2em; break-inside: avoid; }
.caption-notes ul { margin: 0; padding-left: 1.2em; font-size: 13px; line-height: 1.8; color: var(--muted); }
.caption-notes li + li { margin-top: 4px; }
.caption-usage { margin-top: 14px; font-size: 13px; }
.caption-usage summary { cursor: pointer; }
.caption-usage p { margin: 8px 0 0; color: var(--muted); }
.caption-original { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.caption-original summary { cursor: pointer; }
.caption-original p { margin: 8px 0 0; white-space: pre-line; overflow-wrap: anywhere; }

/* 詳細ページ: 相場の中での位置(グラフを左、表を右に横一列) */
.bench-section .bm { margin: 0; position: relative; }
.bench-section .bm-title { font-size: inherit; font-weight: inherit; }
.bench-section .bm-title .section-title { margin: 0 0 12px; }
.bm-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 32px; align-items: start; }
.bm-main, .bm-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bm-side .bm-rank { margin: 0 0 4px; }
.bm-side .more { margin-top: 10px; }
@media (max-width: 859px) { .bm-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ポジションマップ: 後から読み込む部分と読み込み中の表示 */
.pm-summary { margin: 14px 0 6px; font-size: 15px; color: var(--muted); }
.pm-summary strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.pm-empty { margin: 18px 0; padding: 16px; border: 1px solid var(--rule); font-size: 14px; }
.pm-retry { padding: 8px 16px; font: 700 14px/1.4 var(--sans); color: var(--paper); background: var(--ink); border: 0; border-radius: 3px; cursor: pointer; }
.pm-filter-skeleton { min-height: 74px; }
.pm-filter-skeleton span { display: block; width: 11em; height: 34px; margin-top: 18px; border-radius: 3px; background: var(--paper-2); animation: pm-shimmer 1.4s ease-in-out infinite; }
.pm-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; aspect-ratio: 720 / 470; max-width: 960px; margin: 14px 0 0; border: 1px solid var(--rule-2); background: color-mix(in srgb, var(--paper-2) 60%, transparent); }
.pm-loading p { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; }
.pm-loading-art { position: relative; width: min(260px, 60%); aspect-ratio: 1.6; border-left: 2px solid var(--rule); border-bottom: 2px solid var(--rule); }
.pm-loading-art i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); opacity: 0.25; animation: pm-dot 1.8s ease-in-out infinite; animation-delay: calc(var(--i) * 0.11s); }
.pm-loading-art b { position: absolute; left: 0; bottom: 0; width: 118%; border-top: 2px dashed var(--ink); transform: rotate(-32deg); transform-origin: left bottom; opacity: 0.35; }
@keyframes pm-dot { 0%, 100% { opacity: 0.2; transform: translateY(0); } 40% { opacity: 0.9; transform: translateY(-6px); } }
@keyframes pm-shimmer { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pm-loading-art i, .pm-filter-skeleton span { animation: none; opacity: 0.5; } }

/* ポジションマップ: スマホ・タブレットだけの、タップで選んだ品の情報(PC では出さない) */
.pm-stage { position: relative; }
/* 拡大・縮小: 軸・文字・点の大きさはそのまま、見る範囲を狭めて描き直す(posmap.js)。
   拡大中は地図をドラッグ(スマホは指)で動かせる */
.pm-viewport { position: relative; width: 100%; max-width: 960px; overflow: hidden; }
.pm-viewport .pm-chart { max-width: none; }
.pm-viewport.is-zoomed .pm-chart { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.pm-viewport.is-zoomed .pm-chart.is-pointing { cursor: pointer; }
.pm-viewport.is-dragging .pm-chart, .pm-viewport.is-dragging .pm-chart.is-pointing { cursor: grabbing; }
.pm-grid, .pm-axis, .pm-median, .pm-pick, .pm-dot { vector-effect: non-scaling-stroke; }
.pm-zoom { position: absolute; top: 6px; right: 6px; z-index: 2; display: flex; gap: 2px; padding: 2px; border: 1px solid var(--rule); border-radius: 6px; background: color-mix(in srgb, var(--paper) 88%, transparent); }
.pm-zoom[hidden] { display: none; }
/* 初めて見たときの「ピンチで拡大・縮小」の案内(posmap.js)。地図の中央に出して、触らせる邪魔はしない */
.pm-hint { position: absolute; left: 50%; top: 50%; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 18px 12px; border-radius: 12px; background: rgba(18, 18, 18, 0.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); color: #fff; pointer-events: none; transform: translate(-50%, -50%); animation: pm-hint-in 0.3s ease-out; transition: opacity 0.3s; }
.pm-hint.is-out { opacity: 0; }
.pm-hint p { margin: 0; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pm-hint-art { position: relative; width: 72px; height: 72px; }
.pm-hint-f { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.28); }
.pm-hint-f.is-a { animation: pm-pinch-a 1.6s ease-in-out 2; }
.pm-hint-f.is-b { animation: pm-pinch-b 1.6s ease-in-out 2; }
@keyframes pm-pinch-a { 0%, 12%, 100% { transform: translate(-7px, 7px); } 45%, 62% { transform: translate(-24px, 24px); } }
@keyframes pm-pinch-b { 0%, 12%, 100% { transform: translate(7px, -7px); } 45%, 62% { transform: translate(24px, -24px); } }
@keyframes pm-hint-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pm-hint, .pm-hint-f { animation: none !important; }
  .pm-hint-f.is-a { transform: translate(-18px, 18px); }
  .pm-hint-f.is-b { transform: translate(18px, -18px); }
}
.pm-zoom button { min-width: 36px; height: 36px; padding: 0 8px; font: 700 18px/1 var(--sans); color: var(--ink); background: transparent; border: 0; border-radius: 4px; cursor: pointer; font-variant-numeric: tabular-nums; }
.pm-zoom .pm-zoom-level { font-size: 12px; min-width: 44px; }
.pm-zoom button:hover:not(:disabled) { background: var(--paper-2); }
.pm-zoom button:disabled { opacity: 0.35; cursor: default; }
.pm-touch, .bm-legend .pm-only-touch { display: none; }
.pm-pick { fill: none; stroke: var(--bm-item); stroke-width: 3; }
.pm-dot.is-picked { fill: var(--bm-item); opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .bm-legend .pm-only-pc { display: none; }
  .bm-legend .pm-only-touch { display: inline-flex; }
  .pm-touch { display: block; margin-top: 8px; }
  .pm-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 2px solid var(--bm-item); border-radius: 6px; background: var(--paper-2); }
  .pm-card[hidden] { display: none; }
  .pm-card img { width: 84px; height: 84px; object-fit: cover; border-radius: 4px; flex: none; }
  .pm-card div { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.5; }
  .pm-card-self { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: var(--bm-item); color: var(--paper); font-size: 11px; font-weight: 700; }
  .pm-card-muni { color: var(--muted); font-size: 12px; }
  .pm-card-name { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .pm-card-spec { font-variant-numeric: tabular-nums; }
  .pm-card-unit { font-weight: 700; color: var(--bm-item); }
  .pm-card-link { align-self: flex-start; margin-top: 6px; padding: 8px 14px; border-radius: 4px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
}

/* プライバシーポリシー・利用規約 */
.legal { font-size: 15px; line-height: 1.9; }
.legal-intro p { margin: 0 0 16px; }
.legal-toc { margin: 8px 0 28px; padding: 14px 18px; border: 1px solid var(--rule); background: var(--paper-2); font-size: 14px; }
.legal-toc ol { margin: 0; padding-left: 1.6em; columns: 2; column-gap: 24px; }
.legal-toc a { color: var(--ink); }
.legal-section { margin: 0 0 30px; }
.legal-section h2 { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); font-size: 18px; }
.legal-section ol { margin: 0 0 12px; padding-left: 1.6em; }
.legal-section li + li { margin-top: 6px; }
.legal-section p { margin: 0 0 12px; }
.legal-table { overflow-x: auto; margin: 0 0 14px; }
.legal-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13.5px; line-height: 1.7; }
.legal-table th, .legal-table td { padding: 8px 10px; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.legal-table th { background: var(--paper-2); }
.legal-date { margin-top: 36px; text-align: right; color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .legal-toc ol { columns: 1; } }

/* お問い合わせ */
.contact-note { font-size: 13px; color: var(--muted); padding: 10px 14px; border-left: 3px solid var(--rule); background: var(--paper-2); }
.contact-form { display: flex; flex-direction: column; gap: 18px; margin-top: 20px; }
.contact-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.contact-field > span { font-weight: 700; }
.contact-field b, .contact-field i { margin-left: 8px; padding: 1px 6px; border-radius: 3px; font-size: 11px; font-style: normal; font-weight: 700; }
.contact-field b { background: var(--red); color: var(--paper); }
.contact-field i { border: 1px solid var(--rule); color: var(--muted); }
.contact-field input, .contact-field select, .contact-field textarea { width: 100%; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px; }
.contact-field textarea { resize: vertical; line-height: 1.7; }
.contact-field small { color: var(--muted); font-size: 12px; }
.contact-field [aria-invalid="true"] { border-color: var(--red); }
.contact-error { margin: 0; color: var(--red); font-size: 13px; font-weight: 700; }
.contact-error-top { margin-top: 16px; padding: 10px 14px; border: 1px solid var(--red); }
.contact-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-agree { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.contact-agree input { width: 18px; height: 18px; accent-color: var(--ink); }
.contact-submit { align-self: flex-start; padding: 12px 32px; font: 700 15px/1.4 var(--sans); color: var(--paper); background: var(--ink); border: 0; border-radius: 3px; cursor: pointer; }

/* AIで使う(公開APIの案内) */
.forai { max-width: 960px; padding-top: 48px; padding-bottom: 64px; }
.forai-hero { margin: 18px 0 8px; padding: 22px 24px; background: var(--ink); color: var(--paper); }
.forai-hero h2 { margin: 0 0 10px; font-size: 20px; color: var(--paper); }
.forai-steps { margin: 0 0 14px; padding-left: 1.4em; line-height: 1.9; }
.forai-url { display: flex; gap: 8px; max-width: 640px; }
.forai-url input { flex: 1; min-width: 0; padding: 10px 12px; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--paper); background: color-mix(in srgb, var(--paper) 10%, transparent); border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent); border-radius: 3px; }
.forai-url button { flex: none; padding: 10px 18px; font: 700 14px/1.4 var(--sans); color: var(--ink); background: var(--paper); border: 0; border-radius: 3px; cursor: pointer; }
.forai-fine { margin: 10px 0 0; font-size: 12px; opacity: 0.8; }
.forai code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; overflow-wrap: anywhere; }
.forai-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; margin: 12px 0 0; }
.forai-facts > div { padding: 10px 0; border-bottom: 1px solid var(--rule-2); }
.forai-facts dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.forai-facts dd { margin: 2px 0 0; font-size: 14px; }
.forai-endpoint { padding: 18px 0 22px; border-bottom: 1px solid var(--rule); }
.forai-endpoint h3 { margin: 0 0 6px; font-size: 18px; }
.forai-path { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.forai-path span { padding: 2px 8px; border-radius: 3px; background: var(--blue); color: var(--paper); font: 700 12px/1.6 var(--sans); }
.forai-path code { font-size: 15px; font-weight: 700; }
.forai-table { overflow-x: auto; margin: 8px 0; }
.forai-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13.5px; line-height: 1.7; }
.forai-table th, .forai-table td { padding: 7px 10px; border-bottom: 1px solid var(--rule-2); text-align: left; vertical-align: top; }
.forai-table th { border-bottom: 1px solid var(--ink); font-size: 12px; color: var(--muted); }
.forai-table td:first-child { white-space: nowrap; }
.forai-example { margin: 8px 0 0; font-size: 13px; }
.forai-example code { padding: 2px 6px; background: var(--paper-2); border: 1px solid var(--rule-2); border-radius: 3px; }
.forai-notes, .forai-rules { margin: 8px 0 0; padding-left: 1.3em; font-size: 14px; line-height: 1.8; }
.forai-example a, .forai-quick a { overflow-wrap: anywhere; }
.forai-quick { margin: 8px 0 0; padding-left: 1.3em; font-size: 14px; line-height: 1.7; }
.forai-quick li + li { margin-top: 10px; }
.forai-quick code { font-size: 12.5px; overflow-wrap: anywhere; }
.forai-json { margin-top: 10px; }
.forai-json summary { cursor: pointer; font-size: 14px; }
.forai-json pre { margin: 10px 0 0; padding: 14px; overflow-x: auto; background: var(--paper-2); border: 1px solid var(--rule-2); border-radius: 4px; font-size: 12.5px; line-height: 1.6; white-space: pre; }


/* 紙面の明るい・暗いを選んだとき(html の data-theme)は、light-dark() に頼らず色をそのまま指定する。
   iPhone の Safari では、押して切り替えても light-dark() の色が変わらないことがあった(2026-09-28)。
   色は上の light-dark() の値と同じ(このブロックは変数の一覧から作ったもの) */
html[data-theme="light"] { color-scheme: light; --paper: #f5f1e7; --paper-2: #ebe6d8; --ink: #252721; --muted: #666457; --rule: #b6b4a5; --rule-2: #d7d1c1; --red: #9b3727; --red-strong: #772d22; --blue: #3e5744; --blue-soft: #e2e6da; --warn: #9a4f12; --warn-soft: #f3e6d6; --star: #b8801f; --bm-item: #b4540c; }
html[data-theme="dark"] { color-scheme: dark; --paper: #1b1914; --paper-2: #26231b; --ink: #e9e3d6; --muted: #b6ad9c; --rule: #655e50; --rule-2: #403b30; --red: #e4a28b; --red-strong: #f0bda8; --blue: #b6cba9; --blue-soft: #262d24; --warn: #e0a05f; --warn-soft: #33271a; --star: #e0b25f; --bm-item: #f29a52; }

/* 返礼品のページの会員のボタン(お気に入り・寄付の記録) */
.member-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.member-actions[hidden] { display: none; }
.member-actions form { margin: 0; }
.member-actions button { padding: 9px 14px; font: inherit; font-size: 14px; font-weight: 700; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; }
.member-actions .member-fav.is-on { background: var(--ink); color: var(--paper); }
.member-actions-note { flex-basis: 100%; font-size: 13px; color: var(--down); margin: 4px 0 0; }
.sim-save { background: var(--paper) !important; color: var(--ink) !important; border: 1px solid var(--ink); }

/* ヘッダーの表示の明るさの切り替え */
.theme-toggle { font: inherit; font-size: 13px; padding: 4px 10px; border: 1px solid var(--rule); background: transparent; color: inherit; cursor: pointer; border-radius: 999px; white-space: nowrap; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle[hidden] { display: none; }

/* レビューの評価の★(stars.tsx)。灰色の星5つの上に、平均点の割合だけ色の付いた星を重ねる */
.stars { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; font-size: 13px; line-height: 1.4; }
.stars-bg { position: relative; display: inline-block; color: color-mix(in srgb, var(--star, #b8801f) 25%, transparent); letter-spacing: 1px; font-size: 14px; }
.stars-fg { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; color: var(--star, #b8801f); }
.stars b { font-weight: 700; }
.stars small { font-size: 12px; color: var(--muted, #666457); }
.stars.is-compact .stars-bg { font-size: 12px; }
.stars.is-compact small { font-size: 11px; }
.stars-none { color: var(--muted, #666457); font-size: 12px; }

/* 出典を確認した少数商品の比較。既存の相場マップとは範囲を分ける。 */
.verified-comparison { margin: 20px 0 36px; padding: clamp(18px, 3vw, 32px); border: 1px solid var(--rule); border-top: 4px solid var(--blue); background: var(--paper-2); scroll-margin-top: 24px; }
.verified-comparison h2 { font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); line-height: 1.5; margin: 4px 0 16px; }
.vc-eyebrow { color: var(--blue); font-weight: 700; font-size: 13px; letter-spacing: .1em; margin: 0; }
.vc-conditions { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.vc-conditions li { border: 1px solid var(--rule); background: var(--paper); padding: 5px 12px; font-size: 14px; }
.vc-ad, .vc-note { font-size: 13px; color: var(--muted); }
.vc-empty { background: var(--paper); border: 1px solid var(--rule); padding: 18px 22px; margin: 20px 0; }
.vc-empty h3 { margin-top: 0; font-size: 18px; }
.vc-empty p { margin-bottom: 0; }
.vc-scroll { overflow-x: auto; max-width: 100%; margin: 16px 0; }
.vc-scroll:focus-visible, .verified-comparison a:focus-visible, .verified-comparison summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.vc-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); font-size: 14px; }
.vc-table caption { text-align: left; padding: 0 0 10px; font-size: 13px; }
.vc-table th, .vc-table td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); padding: 12px 16px; min-width: 230px; max-width: 320px; overflow-wrap: anywhere; }
.vc-table th[scope="row"], .vc-table thead td { min-width: 125px; width: 140px; position: sticky; left: 0; background: var(--paper-2); border-right: 1px solid var(--rule); }
.vc-table thead th { border-top: 2px solid var(--ink); }
.vc-table td > span, .vc-municipality { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.vc-table details { margin-top: 12px; }
.vc-table summary { cursor: pointer; }
.vc-map-link { display: inline-block; font-weight: 700; padding: 10px 0; }
@media (max-width: 519px) {
  .verified-comparison { padding: 16px; }
  .vc-table th[scope="row"], .vc-table thead td { min-width: 92px; width: 92px; padding: 10px; }
  .vc-table th, .vc-table td { min-width: 200px; padding: 10px 12px; }
}
