/* ふるさと量くらべ */
:root {
  --bg: #f5f6f3; --surface: #fff; --text: #1d2420; --muted: #59625d; --faint: #5a625d; --line: #e2e6e2; --line-strong: #c4ccc6;
  --accent: #0b6e4f; --accent-ink: #fff; --accent-soft: #e2f1ea; --cta: #bf0000; --cta-ink: #fff; --gold: #9a5b00; --warn: #b42318;
  --radius: 12px; --radius-s: 8px; --shadow: 0 1px 3px rgba(0,0,0,.06);
  --font: "BIZ UDPGothic", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121614; --surface: #1b211e; --text: #e6ebe8; --muted: #a5b0aa; --faint: #9aa59f; --line: #2c3530; --line-strong: #46524b;
    --accent: #3fbf8c; --accent-ink: #08130e; --accent-soft: #1d3329; --cta: #b3261e; --gold: #e0a84a; --warn: #ff8a80; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.7; font-size: 16px; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--surface); padding: 8px; }
.nw { display: inline-block; }
.topbar { padding: 4px 16px; font-size: 12px; background: #1d2420; color: #dfe7e2; }
.topbar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; }
.wrap { max-width: 1040px; margin: 0 auto; }
.topbar strong { color: #ffd34d; }
.site-header { background: var(--surface); border-bottom: 3px solid var(--accent); padding: 8px 16px 0; }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-mark { width: 36px; height: 36px; flex: none; }
.logo-mark rect { fill: var(--accent); }
.logo-mark path { fill: #fff; }
.logo-name { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.logo-sub { display: block; font-size: 12px; color: var(--muted); }
.deadline { margin: 4px 0 0; font-size: 14px; }
.deadline strong { color: var(--text); }
.dl-days { display: inline-block; margin-left: 6px; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); font-weight: 700; }
.deadline.soon .dl-days { background: var(--cta); color: #fff; }
.main-nav { margin: 6px -16px 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.main-nav::-webkit-scrollbar { display: none; }
.nav-scroll { display: flex; gap: 4px; padding: 0 28px 0 12px; white-space: nowrap; }
.main-nav a { display: inline-block; padding: 10px 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.main-nav a[aria-current] { border-color: var(--accent); color: var(--accent); }
main { max-width: 1040px; margin: 0 auto; padding: 16px; }
h1 { font-size: 26px; line-height: 1.35; margin: 8px 0 10px; }
h2 { font-size: 20px; margin: 0 0 10px; }
h2 small { font-size: 13px; color: var(--muted); font-weight: 400; }
.lead { color: var(--muted); }
.eyebrow { margin: 0; color: var(--accent); font-weight: 700; font-size: 14px; }
.sec { margin: 28px 0; }
.note { font-size: 13px; color: var(--faint); }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.hero { padding: 14px 16px; border-radius: var(--radius); background: var(--accent); color: #fff; }
.hero .eyebrow, .hero .lead { color: #e6f4ee; }
.hero h1 { margin-top: 4px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 20px; border-radius: 999px; background: #ffd34d; color: #1d2420; font-weight: 700; text-decoration: none; }
.btn.sub { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tile { display: grid; gap: 2px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.tile:hover { border-color: var(--accent); }
.t-ico { font-size: 28px; }
.t-name { font-weight: 700; }
.t-best { font-size: 13px; color: var(--muted); }
.t-best strong { display: block; font-size: 18px; color: var(--accent); }
.t-n { font-size: 12px; color: var(--faint); }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pick { display: grid; gap: 2px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.p-img img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: var(--radius-s); background: #fff; }
.p-cat { font-size: 12px; color: var(--accent); font-weight: 700; }
.p-name { font-weight: 700; line-height: 1.4; }
.p-pm strong { margin-left: 6px; font-size: 20px; color: var(--accent); }
.p-meta { font-size: 12px; color: var(--muted); }
.tips li { margin-bottom: 8px; }
.best { padding: 10px 14px; border-radius: var(--radius-s); background: var(--accent-soft); }
.tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 12px 0; }
.tools[hidden] { display: none; }
.tools select { font: inherit; min-height: 44px; padding: 6px 8px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: inherit; font-size: 14px; min-height: 40px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.list { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.row { position: relative; display: grid; grid-template-columns: 88px 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); counter-increment: r; }
.row[hidden] { display: none; }
.row::before { content: counter(r); position: absolute; left: -4px; top: 8px; z-index: 1; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 13px; display: grid; place-items: center; font-size: 14px; font-weight: 700; background: var(--surface); color: var(--muted); border: 1px solid var(--line-strong); }
.list:not(.filtered) .row:nth-child(-n+3)::before { background: var(--accent); color: #fff; border-color: var(--accent); }
.r-img img, .r-img .noimg { display: block; width: 88px; height: 88px; object-fit: contain; border-radius: var(--radius-s); background: #fff; }
.r-body p { margin: 0 0 2px; }
.r-name { font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r-name a { color: var(--text); text-decoration: none; }
.r-name a:hover, .r-name a:focus-visible { text-decoration: underline; }
.r-town { font-size: 13px; color: var(--muted); }
.r-pm span { font-size: 13px; color: var(--muted); margin-left: 2px; }
.r-pm strong { font-size: 22px; color: var(--accent); }
.r-facts { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 10px; }
.r-facts b { color: var(--text); }
.rc { font-size: 13px; color: var(--muted); }
.norev { color: var(--faint); }
.var { padding: 0 6px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--text); }
.pt { color: var(--gold); font-weight: 700; }
.stars { color: var(--gold); }
.r-cta { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--cta); color: var(--cta); font-weight: 700; font-size: 14px; text-decoration: none; }
.r-cta.main { background: var(--cta); color: var(--cta-ink); }
@media (prefers-color-scheme: dark) { .r-cta:not(.main) { color: #ff8a80; border-color: #ff8a80; } }
.method { margin: 20px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.method summary, .adv summary, .faq summary { cursor: pointer; font-weight: 700; min-height: 44px; 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: "＋"; color: var(--accent); font-weight: 700; }
.method[open] summary::after, .adv[open] summary::after, .faq[open] summary::after { content: "−"; }
.method li { font-size: 14px; }
.others { display: flex; flex-wrap: wrap; gap: 8px; }
.others a { padding: 8px 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; }
.empty { color: var(--muted); }
/* 控除上限シミュレーター */
.calc { margin: 12px 0 20px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.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: 2px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); }
.in:focus-within { border-color: var(--accent); }
.in input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 22px; font-weight: 700; background: transparent; color: var(--text); }
.in span { color: var(--muted); font-weight: 400; }
.chk { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 400; cursor: pointer; }
.chk input { width: 24px; height: 24px; accent-color: var(--accent); }
.steps-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-weight: 400; max-width: 480px; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 22px; cursor: pointer; }
.stepper input { width: 52px; text-align: center; font: inherit; font-size: 18px; font-weight: 700; padding: 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); color: var(--text); }
.adv { margin-bottom: 12px; }
.adv .in input { font-size: 18px; }
.warn { color: var(--warn); }
.result { padding: 16px; border-radius: var(--radius); background: var(--accent-soft); }
.result .big { margin: 0; font-size: 18px; font-weight: 700; }
.result .big strong { display: block; font-size: 36px; color: var(--accent); line-height: 1.2; }
.result .sub { margin: 6px 0; }
.result .facts { margin: 8px 0; padding-left: 1.2em; font-size: 14px; }
.result .go a { display: inline-block; margin: 4px 6px 0 0; padding: 6px 12px; border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 700; }
.hint { margin: 0; color: var(--muted); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.tbl { border-collapse: collapse; width: 100%; font-size: 14px; white-space: nowrap; }
.tbl th, .tbl td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: right; }
.tbl thead th { position: sticky; top: 0; background: var(--accent-soft); 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; }
.faq { border-bottom: 1px solid var(--line); }
.faq p { margin: 0 0 12px; }
.site-footer { margin-top: 40px; padding: 24px 16px; background: var(--surface); border-top: 1px solid var(--line); font-size: 14px; }
.site-footer > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.foot-brand .logo-mark { width: 24px; height: 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.credit { font-size: 12px; }
@media (max-width: 640px) {
  h1 { font-size: 22px; }
  .row { grid-template-columns: 72px 1fr; align-items: start; }
  .r-img img, .r-img .noimg { width: 72px; height: 72px; }
  .r-cta { grid-column: 2; justify-self: start; min-height: 40px; padding: 6px 14px; font-size: 13px; }
  .r-pm strong { font-size: 20px; }
  .topbar { flex-wrap: wrap; font-size: 11px; }
}
@media (max-width: 640px) {
  .picks { grid-template-columns: 1fr; gap: 8px; }
  .pick { grid-template-columns: 88px 1fr; column-gap: 12px; align-items: start; }
  .pick .p-img { grid-row: 1 / span 5; }
  .p-img img { width: 88px; height: 88px; }
}

/* 姉妹サイト */
.sister { margin: 16px 0; }
.sister-h { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.sister-card { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid var(--line); border-left: 6px solid #bf0000; background: var(--bg); color: var(--text); text-decoration: none; }
.sister-card span { font-size: 13px; color: var(--muted); }
.sister-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 13px; }
.sister-line { margin: 16px 0; padding: 10px 14px; border-radius: var(--radius-s); border: 1px dashed var(--line-strong); background: var(--surface); font-size: 14px; }

.r-pm small { margin-left: 6px; font-size: 12px; color: var(--faint); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px !important; }
.bd { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line-strong); color: var(--muted); }
.bd.ship { border-color: var(--gold); color: var(--gold); }
.bd.ship.ok { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.tools .chk { min-height: 40px; }
.guide ul { padding-left: 1.2em; }
.guide li { margin-bottom: 6px; }
.result .go ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 6px 0; }
.result .go li { padding: 6px 12px; border-radius: 999px; background: var(--surface); font-size: 14px; }
.result .go li a { font-weight: 700; margin-right: 4px; text-decoration: none; }
.g-h { margin: 18px 0 8px; font-size: 16px; color: var(--accent); scroll-margin-top: 12px; }

/* 夜間改善 第2弾 */
.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 #ffd34d; outline-offset: 2px; box-shadow: 0 0 0 5px #1d2420; }
.tool-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; width: 100%; }
.tools { gap: 8px; }
.count { width: 100%; margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.empty-box { padding: 16px; border-radius: var(--radius-s); background: var(--surface); border: 1px dashed var(--line-strong); }
.btn-sub { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.cat-note { padding: 8px 12px; border-left: 4px solid var(--gold); background: var(--surface); font-size: 14px; }
.rel { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 8px 0; font-size: 14px; }
.rel span:first-child { color: var(--muted); }
.rel a { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.bd.warn { border-color: var(--warn); color: var(--warn); }
.scroll-hint { margin: 0 0 4px; text-align: right; }
.site-footer .wrap > * { max-width: none; }
@media (min-width: 1000px) {
  .list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .row { grid-template-columns: 88px 1fr; }
  .r-cta { grid-column: 2; justify-self: start; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 20px; }
  .hero .lead { font-size: 14px; }
  .deadline { font-size: 13px; }
  .logo-sub { font-size: 11px; }
  .topbar { font-size: 12px; }
}
.filters { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); padding: 0 12px; }
.filters summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary::before { content: "▸"; margin-right: 6px; color: var(--accent); }
.filters[open] summary::before { content: "▾"; }
.filters[open] { padding-bottom: 10px; }
.f-state { font-weight: 400; color: var(--accent); margin-left: 4px; }

/* 夜間改善 第7弾 */
.cat-h1 { font-size: 22px; margin: 4px 0 6px; }
.cat-h1 small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.list.filtered .r-cta.main { background: transparent; color: var(--cta); }
@media (prefers-color-scheme: dark) { .list.filtered .r-cta.main { color: #ff8a80; border-color: #ff8a80; } }
.logo-sub { font-size: 12px !important; }
#k-err { margin: -8px 0 12px; font-size: 13px; }
#k-err:empty { display: none; }
.town-note { width: 100%; margin: 0; }
.pick .bd { justify-self: start; }
@media (max-width: 640px) { .cat-h1 { font-size: 19px; } .main-nav a { padding: 8px 8px; } }
.list-h { font-size: 16px; margin: 10px 0 2px; }
.pr-line { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .logo-sub { display: none !important; }
  .pc-only { display: none; }
  .lead { font-size: 14px; margin: 4px 0 8px; }
  .crumbs { font-size: 12px; }
  .count { font-size: 13px; }
}

/* 同じ運営者のサイト一覧(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; }
.fam-card { position: relative; display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid var(--line);
  border-left: 6px solid var(--fam-c); background: var(--surface); color: var(--text); text-decoration: none; }
a.fam-card:hover { border-color: var(--fam-c); }
a.fam-card:hover .fam-name { text-decoration: underline; }
.fam-neusage { --fam-c: #b5001a; }
.fam-furusato { --fam-c: #0b6e4f; }
.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-grid { align-items: start; }
.fam-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0 6px; font-size: 13px; }
@media (prefers-color-scheme: dark) { .fam-neusage { --fam-c: #ff7b7b; } .fam-furusato { --fam-c: #3fbf8c; } }
