/* =========================================================
   値下げナビ  — デザインの決まりごと
   - 色: 青緑(--accent)=サイト内の操作 / 朱(--cta)=楽天へのリンクだけ
   - 余白: 4 / 8 / 12 / 16 / 24 / 32 / 48 の段階だけを使う
   - 文字: 本文16px・補足13px・最小12px。価格は数字幅をそろえる
   ========================================================= */
:root {
  color-scheme: light dark;
  --bg: #f4f4f4;
  --surface: #ffffff;
  --surface-2: #f6f1f1;
  --text: #1a1d21;
  --muted: #4f565d;
  --faint: #5f666d;
  --line: #e2e2dc;
  --line-strong: #cfd2cd;
  --accent: #b5001a;
  --accent-ink: #ffffff;
  --accent-soft: #fdeced;
  --cta: #c4001a;
  --cta-ink: #ffffff;
  --cta-soft: #fdeced;
  --drop: #c4001a;
  --drop-bg: #fdeced;
  --low-bg: #e3f4ea;
  --point: #9a5b00;
  --point-bg: #fff1c9;
  --img-bg: #ffffff;
  --radius: 12px;
  --radius-s: 8px;
  --shadow: 0 1px 2px rgba(20, 30, 40, .05), 0 6px 18px rgba(20, 30, 40, .06);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Meiryo", system-ui, sans-serif;
  --good: #0a7c4a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121417;
    --surface: #1b1e22;
    --surface-2: #24292b;
    --text: #e9eaeb;
    --muted: #b3b9bf;
    --faint: #959ca3;
    --line: #2c3035;
    --line-strong: #3a3f45;
    --accent: #ff6b77;
    --accent-ink: #2a0508;
    --accent-soft: #3a1a1d;
    --cta: #ff5f6d;
    --cta-ink: #2a0508;
    --cta-soft: #3a1a1d;
    --drop: #ff7a85;
    --drop-bg: #3a1a1d;
    --low-bg: #16302a;
    --point: #f3c96a;
    --point-bg: #352a12;
    --img-bg: #e9e9e6;
    --shadow: none;
      --good: #5fd39a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121417;
  --surface: #1b1e22;
  --surface-2: #24292b;
  --text: #e9eaeb;
  --muted: #b3b9bf;
  --faint: #959ca3;
  --line: #2c3035;
  --line-strong: #3a3f45;
  --accent: #ff6b77;
  --accent-ink: #2a0508;
  --accent-soft: #3a1a1d;
  --cta: #ff5f6d;
  --cta-ink: #2a0508;
  --cta-soft: #3a1a1d;
  --drop: #ff7a85;
  --drop-bg: #3a1a1d;
  --low-bg: #16302a;
  --point: #f3c96a;
  --point-bg: #352a12;
  --img-bg: #e9e9e6;
  --shadow: none;
  --good: #5fd39a;
}

/* ---- 土台 */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; }
h1, h2, h3, .logo, .main-nav, .price, .big-price, .chips, .sale { font-feature-settings: "palt"; }
h1, h2, h3 { text-wrap: balance; }
.price, .big-price, .eff, .eff-big, .num, .chips strong, .kv dd, .sticky-buy { font-variant-numeric: tabular-nums; }
main.solo, .layout, .header-inner, .nav-scroll, .site-footer, .topbar-inner, .pt-panel { max-width: 1240px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
main { padding-bottom: 32px; min-width: 0; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: 0 0 8px 0; font-weight: 700; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---- ヘッダー */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 4px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: .02em; white-space: nowrap; }
.logo-mark { width: 28px; height: 28px; flex: none; }
.logo-mark rect { fill: var(--accent); }
.logo-mark path { stroke: var(--accent-ink); }
.tagline { color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools { margin-left: auto; display: flex; gap: 8px; flex: none; }
.tool { font: inherit; font-size: 13px; font-weight: 700; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; min-height: 36px; padding: 0 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tool.icon { width: 36px; padding: 0; justify-content: center; }
#pt-cur { color: var(--point); font-weight: 800; }
.t-light { display: none; }
:root[data-theme="dark"] .t-dark { display: none; }
:root[data-theme="dark"] .t-light { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-dark { display: none; }
  :root:not([data-theme="light"]) .t-light { display: inline; }
}
.main-nav { position: relative; }
.main-nav::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 32px; pointer-events: none; background: linear-gradient(to right, transparent, var(--bg)); }
.nav-scroll { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 2px; padding-bottom: 6px; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-scroll a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 700; color: var(--muted); }
.nav-scroll a:hover { color: var(--text); background: var(--surface); }
.nav-scroll a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }
.pt-panel { margin-top: 4px; margin-bottom: 12px; padding-top: 12px; padding-bottom: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 14px; }
.pt-panel[hidden] { display: none; }
.pt-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pt-row input { width: 96px; font: inherit; font-size: 16px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); }
.pt-row button { font: inherit; font-weight: 700; min-height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.pt-row button.sub { background: var(--surface-2); color: var(--text); }

/* ---- 見出し・本文 */
h1 { font-size: 28px; line-height: 1.35; margin: 24px 0 8px; letter-spacing: .01em; word-break: auto-phrase; }
h2 { font-size: 20px; line-height: 1.4; margin: 0; }
h3 { margin: 0; }
p { margin: 0 0 12px; }
.eyebrow { margin: 24px 0 0; font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.eyebrow + h1 { margin-top: 4px; }
.lead { color: var(--muted); max-width: 760px; }
.crumbs { font-size: 13px; color: var(--faint); margin-top: 16px; }
.crumbs a { color: var(--faint); }
.empty, .notice { color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; }
.note { font-size: 13px; color: var(--faint); }
.summary { color: var(--muted); max-width: 760px; }
.sec { margin-top: 40px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-head small { font-size: 13px; font-weight: 400; color: var(--faint); margin-left: 4px; }
.sec-more { flex: none; font-size: 14px; font-weight: 700; text-decoration: none; }
.sec-more:hover { text-decoration: underline; }
.more { text-align: right; margin: 12px 0 0; font-weight: 700; }

/* ---- 検索欄(検索ページ) */
.search-box { display: flex; gap: 8px; max-width: 640px; margin: 8px 0 0; }
.search-box input { flex: 1; min-width: 0; font: inherit; font-size: 16px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.search-box button { font: inherit; font-weight: 800; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }

/* ---- セール */
.sales { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 24px; }
.sale { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "tag name" "tag when" "tag count" "tag go"; column-gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.sale:hover { border-color: var(--line-strong); }
.sale.live { border-color: var(--cta); background: var(--cta-soft); }
.sale-tag { grid-area: tag; align-self: start; font-size: 12px; font-weight: 800; color: var(--cta); background: var(--cta-soft); border-radius: 6px; padding: 2px 8px; }
.sale.live .sale-tag { background: var(--cta); color: var(--cta-ink); }
.sale strong { grid-area: name; font-size: 16px; }
.sale-when { grid-area: when; font-size: 13px; color: var(--muted); }
.sale-count { grid-area: count; font-size: 13px; font-weight: 800; color: var(--cta); }

/* ---- 商品カード */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.grid.row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card-link { display: flex; flex-direction: column; flex: 1; color: var(--text); text-decoration: none; }
.thumb { background: var(--img-bg); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.thumb img, .noimg { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; display: block; }
.card-body { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.name { font-size: 14px; font-weight: 600; line-height: 1.5; min-height: 3em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.price { margin: auto 0 0; font-size: 13px; color: var(--faint); }
.eff { margin: 0; font-size: 13px; color: var(--muted); }
.eff .pt-y { font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: .01em; }
.pt-tag { font-size: 12px; font-weight: 800; color: var(--point); background: var(--point-bg); border-radius: 4px; padding: 1px 6px; margin-left: 6px; white-space: nowrap; }
.eff { white-space: nowrap; }
.nw { display: inline-block; }
.shop { margin: 2px 0 0; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-cta { display: block; padding: 8px 12px 12px; font-size: 13px; font-weight: 800; color: var(--cta); text-decoration: none; text-align: right; }
.card-cta:hover { text-decoration: underline; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.badge { font-size: 12px; font-weight: 800; padding: 1px 7px; border-radius: 4px; line-height: 1.6; }
.badge.drop { color: var(--drop); background: var(--drop-bg); }
.badge.low { color: var(--good); background: var(--low-bg); }
.badge.point { color: var(--point); background: var(--point-bg); }
.badge.warn { color: var(--drop); background: transparent; border: 1px solid currentColor; }
.badge.up, .badge.same { color: var(--muted); background: var(--surface-2); }
@media (hover: hover) {
  .card { transition: border-color .15s ease; }
  .card:hover { border-color: var(--line-strong); }
}
.card:focus-within { border-color: var(--accent); }

/* ---- ジャンル */
.genre-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.genre { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 14px; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 700; }
.genre:hover { border-color: var(--accent); }
.g-tag { flex: none; font-size: 12px; font-weight: 700; color: var(--faint); }

/* ---- 一覧の並べ替え */
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 8px 0 16px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.list-tools[hidden] { display: none; }
.list-tools select { font: inherit; font-size: 14px; min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); margin-left: 6px; }
.list-count { margin-left: auto; color: var(--faint); font-weight: 700; }
.more-wrap { text-align: center; margin: 24px 0; }
.more-btn { font: inherit; font-weight: 800; min-height: 44px; padding: 0 32px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent); cursor: pointer; }
.more-btn:hover { background: var(--accent); color: var(--accent-ink); }

/* ---- 商品ページ */
.item-head { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 32px; align-items: start; margin-top: 16px; }
.item-img { background: var(--img-bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item-img img { width: 100%; height: auto; display: block; aspect-ratio: 1; object-fit: contain; }
.item-main { min-width: 0; }
.item-main .eyebrow { margin-top: 0; }
.item-main h1 { font-size: 24px; margin: 4px 0 4px; }
.item-main > .shop { font-size: 13px; margin-bottom: 16px; }
.price-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px 18px; box-shadow: var(--shadow); }
.big-price { font-size: 34px; font-weight: 800; margin: 0; line-height: 1.2; }
.big-price small { font-size: 13px; font-weight: 400; color: var(--faint); margin-left: 8px; }
.eff-big { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.eff-big .pt-y { font-size: 15px; font-weight: 700; color: var(--muted); }
.eff-big small { font-size: 13px; color: var(--faint); margin-left: 4px; }
.pt-note { font-size: 12px; color: var(--faint); margin-left: 4px; }
.drop-line { margin: 10px 0 0; font-size: 14px; }
.lo-line { margin: 8px 0 0; font-size: 13px; }
.lo-line a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.lo-line b { color: var(--text); }
.drop-line strong { color: var(--drop); }
.buy { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: 16px; background: var(--cta); color: var(--cta-ink); border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 16px; }
.buy:hover { filter: brightness(1.06); }
.verdict { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius-s); background: var(--surface-2); font-size: 14px; }
.verdict strong { display: block; font-size: 15px; }
.verdict span { color: var(--muted); }
.verdict.good { background: var(--low-bg); }
.verdict.good strong { color: var(--good); }
.verdict.bad { background: var(--drop-bg); }
.verdict.bad strong { color: var(--drop); }
/* 判定の開始前: いつから出るかだけを控えめに */
.verdict.wait { background: transparent; border: 1px dashed var(--line-strong); }
.verdict.wait strong { font-size: 14px; color: var(--muted); }
.verdict.wait span { font-size: 13px; color: var(--faint); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 14px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.facts b { color: var(--point); font-weight: 700; }
.sub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.fav { font: inherit; font-size: 13px; font-weight: 700; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.fav.on { border-color: var(--point); color: var(--point); background: var(--point-bg); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--faint); }
.share a, .share button { font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; cursor: pointer; }
.history-note { margin-top: 24px; }
/* 価格推移のグラフ: 線はSVG(伸び縮み)、目盛りの文字と点はHTML(どの画面幅でも12px以上) */
.pchart { margin: 12px 0 0; padding: 14px 16px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pc-area { position: relative; height: 180px; margin: 0 0 0 64px; }
.pc-plot { position: absolute; inset: 0 8px 0 0; }
.pc-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pchart .series { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.pchart .grid-line { stroke: var(--line-strong); stroke-dasharray: 4 4; }
.pc-y { position: absolute; right: calc(100% + 8px); transform: translateY(-50%); font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pc-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.pc-dot.lo { background: var(--accent); }
.pc-dot.now { box-shadow: 0 0 0 4px var(--accent-soft); }
.pc-x { position: relative; height: 20px; margin: 6px 8px 0 64px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pc-x span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.pc-x span.first { transform: none; }
.pc-x span.last { right: -8px; transform: none; }
.pchart figcaption { margin: 6px 0 0; font-size: 12px; color: var(--faint); }
.pc-key { display: inline-block; width: 8px; height: 8px; margin: 0 4px 0 2px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
@media (max-width: 640px) { .pchart { padding: 12px 12px 10px; } .pc-area { height: 150px; margin-left: 58px; } .pc-x { margin-left: 58px; } }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.kv div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; }
.kv dt { font-size: 12px; color: var(--faint); }
.kv dd { margin: 0; font-size: 17px; font-weight: 800; }
.kv dd small { display: block; font-size: 12px; font-weight: 400; color: var(--faint); }
.records { margin-top: 24px; }
.records summary { cursor: pointer; font-weight: 700; color: var(--accent); min-height: 40px; display: flex; align-items: center; }
.fullname { font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.stats { border-collapse: collapse; width: 100%; }
.stats th, .stats td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.stats th { color: var(--faint); font-weight: 700; font-size: 13px; }
.stats td.num, .stats th.num { text-align: right; }
.stats.wide td, .stats.wide th { white-space: nowrap; }
.stats.wide td:last-child { white-space: normal; min-width: 180px; }
.sticky-buy { display: none; }

/* ---- お買い物チェック */
.check { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-top: 32px; }
.check-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.check-head h2 { margin-right: 4px; }
.c-sum { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 10px; color: var(--muted); background: var(--surface-2); }
.c-sum.ok { color: var(--good); background: var(--low-bg); }
.c-sum.warn { color: var(--drop); background: var(--drop-bg); }
.check-list { list-style: none; padding: 0; margin: 0 0 8px; }
.check-list li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.check-list strong { font-size: 15px; }
.check-list p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.c-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; margin-top: 1px; }
.c-ok .c-icon { color: var(--good); background: var(--low-bg); }
.c-warn .c-icon { color: var(--drop); background: var(--drop-bg); }
.c-info .c-icon { color: var(--faint); background: var(--surface-2); font-family: Georgia, serif; font-style: italic; }
.c-warn strong { color: var(--drop); }

/* ---- 今日のまとめ */
.digest { margin: 12px 0 0; padding: 16px 20px 16px 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 760px; }
.digest li { margin: 2px 0; }
.digest strong { color: var(--accent); }

/* ---- 検索 */
.hints { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 20px; font-size: 13px; color: var(--faint); }
.hints button { font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; min-height: 34px; padding: 0 12px; cursor: pointer; }
.hints button:hover { border-color: var(--accent); }

/* ---- お問い合わせ */
.contact-frame { width: 100%; height: 1150px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin: 8px 0 12px; }

/* ---- フッター */
.site-footer { margin-top: 64px; padding-top: 32px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 2fr 1fr; gap: 32px; }
.foot-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--text); }
.foot-brand .logo-mark { width: 22px; height: 22px; }
.foot-h { font-weight: 800; color: var(--text); margin-bottom: 8px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); text-decoration: underline; }
.site-footer nav[aria-label="サイト情報"] a { display: block; padding: 3px 0; }
.genres { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.foot-note { margin-top: 24px; color: var(--faint); font-size: 12px; }
.credit { font-size: 12px; }
.credit a { color: var(--faint); }

/* ---- スマホ */
@media (max-width: 900px) {
  .grid.row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .grid.row .card { scroll-snap-align: start; }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  .tagline { display: none; }
  .tool:not(.icon) { padding: 0 10px; }
  .hero { padding-top: 16px; }
  .hero h1 { font-size: 23px; }
  .hero-lead { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 12px -16px; padding: 0 16px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips li { flex: none; }
  .sec { margin-top: 32px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid.row { grid-auto-columns: 46%; }
  .card-body { padding: 8px 10px 2px; }
  .eff .pt-y { font-size: 17px; }
  .item-head { grid-template-columns: 1fr; gap: 16px; }
  .item-img { max-width: 300px; margin: 0 auto; width: 100%; }
  .item-main h1 { font-size: 20px; }
  .big-price { font-size: 30px; }
  .price-box { padding: 14px 16px 16px; }
  .check { padding: 12px 14px; }
  .contact-frame { height: 1250px; }
  .sticky-buy { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0, 0, 0, .08); }
  .sticky-buy > span { display: flex; flex-direction: column; line-height: 1.3; }
  .sticky-buy strong { font-size: 19px; }
  .sticky-buy small { font-size: 12px; color: var(--muted); font-weight: 400; }
  .sticky-buy a { background: var(--cta); color: var(--cta-ink); text-decoration: none; font-weight: 800; min-height: 44px; padding: 0 20px; border-radius: 999px; display: inline-flex; align-items: center; }
  body:has(.sticky-buy) .site-footer { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }


/* =========================================================
   楽天市場に寄せたレイアウト(赤・左ジャンル・検索中央)
   ========================================================= */
.topbar { background: #2b2b2b; color: #e6e6e6; font-size: 12px; }
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; padding-top: 5px; padding-bottom: 5px; }
.topbar strong { color: #ffd34d; font-weight: 800; }
.topbar .pr { color: #d6d6d6; font-size: 12px; }
.tb-short { display: none; }
.site-header { background: var(--surface); border-bottom: 3px solid var(--accent); backdrop-filter: none; }
.header-inner { gap: 20px; padding-top: 10px; padding-bottom: 10px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-size: 22px; }
.logo-sub { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.logo-mark { width: 34px; height: 34px; }
.h-search { flex: 1; display: flex; max-width: 640px; }
.h-search input { flex: 1; min-width: 0; font: inherit; font-size: 16px; min-height: 42px; padding: 0 14px; border: 2px solid var(--accent); border-right: 0; border-radius: 8px 0 0 8px; background: var(--surface); color: var(--text); }
.h-search button { flex: none; width: 52px; border: 0; border-radius: 0 8px 8px 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.main-nav { border-top: 1px solid var(--line); }
.main-nav::after { background: linear-gradient(to right, transparent, var(--surface)); }
.nav-scroll a { color: var(--text); }
.nav-scroll a:hover { background: var(--accent-soft); color: var(--accent); }
.nav-scroll a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

/* 左のジャンル一覧(PC) */
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
.side { position: sticky; top: 12px; margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 0; max-height: calc(100vh - 24px); overflow-y: auto; }
.side-h { margin: 0 0 4px; padding: 4px 16px 8px; font-size: 14px; font-weight: 800; border-bottom: 1px solid var(--line); }
.side-genres a { display: flex; align-items: center; gap: 10px; padding: 6px 14px; font-size: 13.5px; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-genres a:hover { background: var(--accent-soft); color: var(--accent); }
.side-genres a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 800; box-shadow: inset 3px 0 0 var(--accent); }
.g-ico { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex: none; background: var(--surface-2); border-radius: 7px; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.genre-strip { display: none; }

/* 新しいトップ: 赤いバナー + 今日の注目 */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-top: 20px; padding: 0; }
.hero-banner { position: relative; overflow: hidden; border-radius: 16px; padding: 28px 28px 22px; color: #fff;
  background: radial-gradient(circle at 85% 20%, rgba(255, 210, 80, .35), transparent 40%), linear-gradient(135deg, #d4001f 0%, #b0001a 55%, #7d0013 100%); }
.hero-banner::after { content: "%"; position: absolute; right: -10px; bottom: -60px; font-size: 220px; font-weight: 900; color: rgba(255, 255, 255, .08); line-height: 1; pointer-events: none; }
.hero-kicker { display: inline-block; margin: 0 0 10px; font-size: 12px; font-weight: 800; background: #ffd34d; color: #5a3400; border-radius: 999px; padding: 3px 12px; }
.hero h1 { font-size: 30px; line-height: 1.35; margin: 0 0 10px; color: #fff; max-width: none; }
.hero-lead { color: rgba(255, 255, 255, .92); font-size: 14px; max-width: 520px; }
.hero .chips { margin: 14px 0 0; }
.hero .chips li { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: rgba(255, 255, 255, .92); }
.hero .chips strong { color: #fff; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.chips li { display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font-size: 13px; }
.chips strong { font-size: 17px; font-weight: 800; }
.hero-picks { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.picks-h { margin: 0 0 10px; font-weight: 800; }
.picks-h small { font-size: 12px; font-weight: 400; color: var(--faint); margin-left: 6px; }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pick { position: relative; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); }
.pick-img { background: var(--img-bg); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.pick-img img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; display: block; }
.pick-rate { position: absolute; top: 6px; left: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 900; font-size: 13px; border-radius: 6px; padding: 2px 7px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.pick-name { font-size: 13px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-eff { font-size: 12px; color: var(--muted); }
.pick-eff b { font-size: 12px; font-weight: 700; color: var(--muted); }
.sec-head h2 { display: flex; align-items: center; gap: 10px; }
.sec-head h2::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--accent); flex: none; }
.eff .pt-y { color: var(--muted); }
.logo-mark rect { fill: var(--accent); }
.logo-mark path { stroke: #fff; }

@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .genre-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 14px -16px 0; padding: 2px 16px 4px; }
  .genre-strip::-webkit-scrollbar { display: none; }
  .genre-strip a { flex: none; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; width: 74px; padding: 8px 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--text); text-decoration: none; text-align: center; line-height: 1.3; }
  .genre-strip a[aria-current="page"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
  .genre-strip .g-ico { font-size: 24px; width: 40px; height: 40px; border-radius: 12px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .topbar-inner { flex-direction: column; gap: 0; }
  .site-header { position: static; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .logo-name { font-size: 19px; }
  .logo-sub { font-size: 12px; }
  .h-search { order: 3; flex-basis: 100%; max-width: none; }
  .tool .tool-label { display: none; }
  .hero-banner { padding: 20px 18px 18px; }
  .hero h1 { font-size: 22px; }
  .hero-lead { display: block; font-size: 13px; }
  .hero .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .hero .chips li { flex: none; }
  .picks { gap: 8px; }
}

/* ---- 関連商品(画像と商品名だけの小さなカード) */
.mini { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mini .name { margin: 0 10px 10px; padding: 0; min-height: 0; font-size: 13px; }  /* padding だと3行目が下の余白に少し見える */
.mini:hover { border-color: var(--line-strong); }

/* ---- カードの補足(レビュー評価・送料込み) */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.stars { color: var(--point); font-weight: 700; }
.stars small { color: var(--faint); font-weight: 400; margin-left: 1px; }
.ship { color: var(--good); font-weight: 700; }

/* ---- トップの「今日のおすすめ」: 価格を主役、ポイント差引の目安は補足 */
.pick-price { font-size: 17px; font-weight: 800; line-height: 1.2; }
.pick-eff b { font-size: 12px; }

/* ---- 予算から探す(タブ)。JavaScript がないときは見出し付きで縦に並ぶ */
.sec-note { font-size: 13px; color: var(--faint); }
.budget-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding-bottom: 2px; }
.budget-tabs::-webkit-scrollbar { display: none; }
.budget-tabs[hidden] { display: none; }
.budget-tabs button { flex: none; font: inherit; font-size: 14px; font-weight: 700; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.budget-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.budget-tabs button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.budget-h { font-size: 15px; margin: 18px 0 10px; }
.budget.tabbed .budget-h { display: none; }
.budget-panel[hidden] { display: none; }

/* ---- 一覧の絞り込み */
.list-tools .chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.list-tools .chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.more-btn { min-width: 240px; }

/* ---- 数字のチップはリンク */
.chips a { display: inline-flex; align-items: baseline; gap: 6px; color: inherit; text-decoration: none; }
.chips a:hover strong { text-decoration: underline; }

/* ---- スマホ: 最初の画面に商品が見えるよう、上の帯と赤いバナーを小さく */
@media (max-width: 640px) {
  .topbar-inner { flex-direction: row; justify-content: space-between; font-size: 11px; padding-top: 4px; padding-bottom: 4px; }
  .tb-long { display: none; }
  .tb-short { display: inline; }
  .topbar-inner { flex-wrap: wrap; column-gap: 12px; font-size: 12px; }
  .pt-long { display: none; }
  .hero { margin-top: 12px; gap: 12px; }
  .hero-banner { padding: 16px 16px 14px; }
  .hero-banner::after { font-size: 140px; bottom: -40px; }
  .hero-kicker, .hero-lead { display: none; }
  .hero h1 { font-size: 20px; margin-bottom: 0; }
  .hero .chips { margin-top: 10px; }
  .hero .chips li { padding: 4px 11px; }
  .hero .chips strong { font-size: 15px; }
  .hero-picks { padding: 12px; }
  .picks-h small { display: block; margin: 2px 0 0; }
  .genre-strip { margin-top: 10px; }
  .genre-strip a { width: 70px; padding: 6px 4px; font-size: 12px; }
  .genre-strip .g-ico { width: 34px; height: 34px; font-size: 20px; }
}

/* ---- 第3回の改善 */
.price .from, .big-price .from { font-size: .8em; font-weight: 700; margin-left: 1px; }
.coupon { color: var(--drop); font-weight: 700; }
.buy-note { margin: 6px 0 0; font-size: 12px; color: var(--faint); text-align: center; }
.sale-note { margin-top: 20px; padding: 12px 16px; border-radius: var(--radius); background: var(--point-bg); color: var(--text); font-size: 14px; }
.sale-note[hidden] { display: none; }
.sale-note p { margin: 0; }
.sec-lead { margin: -8px 0 14px; font-size: 13px; color: var(--muted); }
.empty-box { margin: 16px 0 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.empty-box p { margin: 0 0 12px; font-weight: 700; }
.empty-box .note { margin: 12px 0 0; font-weight: 400; }
.drop-progress { margin: 8px 0; padding: 8px 12px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.hero-note { margin: 10px 0 0; font-size: 13px; color: rgba(255, 255, 255, .92); }
.nav-scroll a span[aria-hidden] { margin-left: 2px; font-size: 12px; }
.empty-links { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); font-weight: 700; text-decoration: none; font-size: 14px; }
.empty-links a:hover { background: var(--accent-soft); }
.moves { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 16px; }
.moves li { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--line); font-size: 14px; }
.moves a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.moves small { flex: none; font-size: 12px; color: var(--faint); }
.chips li, .chips a { white-space: nowrap; }
/* 左のジャンル一覧: 中にスクロールバーを出さず、全部を表示する */
.side { position: static; max-height: none; overflow: visible; }
.side-genres a { padding: 5px 14px; }

@media (max-width: 640px) {
  .sec-head { flex-wrap: wrap; row-gap: 4px; }
  .sec-head h2 { font-size: 18px; }
  .hero-kicker { display: inline-block; margin-bottom: 6px; font-size: 12px; }
  /* 商品ページ: 画像を小さくして、価格と購入ボタンを最初の画面に入れる */
  .item-head { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
  .item-img { max-width: none; margin: 0; }
  .item-main { display: contents; }
  .item-main > .eyebrow, .item-main > h1, .item-main > .shop { grid-column: 2; }
  .item-head > .item-img { grid-row: 1 / span 3; align-self: start; }
  .item-main > .eyebrow { grid-row: 1; margin: 0; }
  .item-main > h1 { grid-row: 2; font-size: 19px; line-height: 1.4; margin: 2px 0; }
  .item-main > .shop { grid-row: 3; margin: 0; }
  .item-main > .price-box, .item-main > .facts, .item-main > .notice, .item-main > .sub-actions,
  .item-main > .tk-box, .item-main > .tk-line { grid-column: 1 / -1; }
}
/* 横に流す1行の一覧(ジャンル別 売れ筋1位など)。PCでも縦に長くしない */
.grid.row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 180px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.grid.row > .card { scroll-snap-align: start; }
@media (max-width: 640px) { .grid.row { grid-auto-columns: 46%; } }

/* ---- 第4回: 買いまわり・最近見た商品・購入ボタン */
.card-cta { margin: 4px 12px 12px; padding: 7px 10px; border: 1.5px solid var(--cta); border-radius: 999px; text-align: center; }
.card-cta:hover { background: var(--cta); color: var(--cta-ink); text-decoration: none; }
.km-add { margin: -4px 12px 12px; min-height: 36px; font: inherit; font-size: 13px; font-weight: 700; border-radius: 999px; border: 1px dashed var(--line-strong); background: var(--surface); color: var(--muted); cursor: pointer; }
.km-add .km-on, .km-add.on .km-off { display: none; }
.km-add.on .km-on { display: inline; }
.km-add.on { border-style: solid; border-color: var(--good); color: var(--good); background: var(--low-bg); }
.km-add[hidden] { display: none; }
.km-event { margin: 16px 0; padding: 16px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.km-event.live { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.km-ev-tag { display: inline-block; margin: 0 0 4px; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 800; background: var(--accent-soft); color: var(--accent); }
.km-ev-name { margin: 0; font-size: 18px; font-weight: 800; }
.km-ev-when { margin: 2px 0 10px; color: var(--muted); font-size: 14px; }
.km-entry { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--cta); color: var(--cta-ink); font-weight: 800; text-decoration: none; }
/* 画面に固定するのは「買ったショップ 3/10・3倍・あと1店で+1倍」の1行だけ(説明とリセットは固定しない) */
.km-counter { position: sticky; top: 8px; z-index: 5; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 16px; padding: 8px 16px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--good); box-shadow: var(--shadow); white-space: nowrap; }
.km-counter[hidden], .km-detail[hidden] { display: none; }
.km-count { margin: 0; font-weight: 700; }
.km-count strong { font-size: 20px; color: var(--good); }
.km-rate { margin: 0; font-size: 14px; font-weight: 700; }
.km-detail { margin: 16px 0 0; }
.km-detail .note { margin: 0 0 4px; font-size: 12px; }
.km-list { margin: 0 0 6px; padding-left: 1.4em; font-size: 13px; color: var(--muted); columns: 2; }
.km-list:empty { display: none; }
.km-reset, .link-btn { font: inherit; font-size: 13px; background: none; border: none; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 4px 0; min-height: 40px; }
.km-add .km-off { white-space: nowrap; }
.km-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.km-chips a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); text-decoration: none; font-size: 13px; }
.tips li { margin-bottom: 6px; }
.sale.kaimawari { border-color: var(--good); }
.sale.kaimawari .sale-tag { background: var(--low-bg); color: var(--good); }
.mini-price { margin: -4px 10px 10px; font-size: 13px; font-weight: 700; }
@media (max-width: 640px) { .km-counter { top: 4px; padding: 6px 12px; } .km-count strong { font-size: 18px; } .km-rate { font-size: 13px; } .km-add .km-long { display: none; } }

/* ---- 日用品の単価比較(/tanka/) ---- */
.tk-best { padding: 10px 14px; border-radius: var(--radius-s); background: var(--low-bg); }
.tk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 12px 0; }
.tk-tools .chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tk-tools select { font: inherit; padding: 4px 6px; min-height: 44px; }
.tk-tools .chk { min-height: 44px; }
.tk-count { margin: -4px 0 8px; font-size: 13px; color: var(--muted); }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-chips button { font: inherit; font-size: 13px; padding: 4px 12px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.tk-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tk-list { list-style: none; margin: 0; padding: 0; counter-reset: tk; }
.tk-row { display: grid; grid-template-columns: 2.2em 96px 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); counter-increment: tk; }
.tk-row::before { content: counter(tk); font-weight: 700; font-size: 18px; color: var(--muted); text-align: center; }
.tk-row:nth-child(-n+3)::before { color: var(--accent); }
.tk-row[hidden] { display: none; }
.tk-img img, .tk-img .noimg { display: block; width: 96px; height: 96px; object-fit: contain; background: var(--img-bg); border-radius: var(--radius-s); }
.tk-body p { margin: 0 0 2px; }
.tk-name { font-size: 14px; line-height: 1.4; }
.tk-name a { color: var(--text); }
.tk-unit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.tk-unit > span:first-child { font-size: 12px; color: var(--muted); }
.tk-unit strong { font-size: 22px; color: var(--accent); }
.tk-unit strong small { font-size: 13px; }
.tk-eff { font-size: 13px; color: var(--point); }
.tk-qty, .tk-facts { font-size: 13px; color: var(--muted); }
.tk-facts > * { margin-right: 6px; }
.tk-var { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--text); font-size: 12px; }
.noship { color: var(--muted); }
.tk-cta { white-space: nowrap; padding: 8px 12px; border-radius: 999px; background: var(--cta); color: var(--cta-ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.tk-method { margin: 20px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.tk-method summary { cursor: pointer; font-weight: 700; }
.tk-method li { font-size: 13px; margin: 4px 0; }
.tk-calc-link { margin: 16px 0; }
.tk-others { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tk-others a, .tk-mini { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; }
.tk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.tk-tile { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.tk-tile:hover, .tk-mini:hover, .tk-others a:hover { border-color: var(--accent); }
.tk-ico { font-size: 28px; }
.tk-tname { font-weight: 700; }
.tk-tbest strong { color: var(--accent); font-size: 18px; }
.tk-tn { font-size: 13px; color: var(--muted); }
.tk-minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tk-mini { flex-direction: column; align-items: flex-start; gap: 2px; }
.tk-mini small { font-size: 12px; color: var(--accent); font-weight: 700; }
.tk-line { margin: 8px 0; font-size: 14px; }
.tk-line strong { color: var(--accent); }
@media (max-width: 640px) {
  .tk-row { grid-template-columns: 1.6em 72px 1fr; }
  .tk-img img, .tk-img .noimg { width: 72px; height: 72px; }
  .tk-cta { grid-column: 3; justify-self: start; padding: 6px 12px; }
  .tk-unit strong { font-size: 20px; }
}

/* ---- 計算ツール(/keisan/) ---- */
.calc { margin: 12px 0 20px; }
.calc input, .calc select { font: inherit; font-size: 16px; color: var(--text); background: var(--surface); }
.calc .chk { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 44px; font-size: 15px; cursor: pointer; }
.calc .chk small { color: var(--muted); font-size: 12px; }
.calc .chk input { width: 20px; height: 20px; }
.cu-in { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); padding: 0 8px; min-height: 44px; }
.cu-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cu-in input { border: 0; outline: 0; padding: 8px 0; width: 100%; min-width: 0; background: transparent; }
.cu-in > span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.cu-in select { border: 0; padding: 6px 2px; font-size: 15px; background: transparent; }
.calc .link-btn { font: inherit; font-size: 14px; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 8px 4px; min-height: 44px; }
.sub-btn { font: inherit; padding: 10px 16px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
/* 単価計算 */
.cu-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.cu-grp { display: flex; flex-wrap: wrap; gap: 5px; }
.cu-grp button, .cp-spu-chips button { font: inherit; font-size: 14px; min-height: 40px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.cu-grp button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cu-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.cu-card { border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px 12px; }
.cu-card[hidden] { display: none; }
.cu-card.best { border-color: var(--good); }
.cu-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cu-tag { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--surface); font-weight: 700; }
.cu-card.best .cu-tag { background: var(--good); }
.cu-name { flex: 1; min-width: 0; border: 0; border-bottom: 1px dashed var(--line-strong); padding: 6px 2px; font-size: 15px !important; }
.cu-del { flex: none; width: 36px; height: 36px; border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; }
.cu-fields { display: grid; grid-template-columns: 1fr 1.35fr 0.75fr; gap: 6px; }
.cu-fields .cu-in { padding: 0 6px; }
.cu-fields label[hidden] { display: none; }
.cu-fields:has(.cu-f-cnt[hidden]) { grid-template-columns: 1fr 1.5fr; }
.cu-fields label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.cu-f-rate { display: none !important; }
.with-pts .cu-f-rate { display: grid !important; }
.cu-out { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; min-height: 48px; }
.cu-res { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.cu-per, .cu-tot { font-size: 12px; color: var(--muted); }
.cu-res strong { font-size: 26px; line-height: 1.1; }
.cu-res strong small { font-size: 14px; }
.cu-wait { font-size: 13px; color: var(--faint); }
.cu-badge:empty { display: none; }
.cu-badge { flex: none; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--line); color: var(--muted); }
.cu-badge.win { background: var(--good); color: #fff; }
.cu-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 12px 0; }
.cu-result, .cp-result { margin: 12px 0; padding: 14px 16px; border-radius: var(--radius); background: var(--low-bg); }
.cu-win { margin: 0 0 6px; font-size: 20px; font-weight: 700; color: var(--good); }
.cu-win strong { font-size: 22px; }
.cu-detail { margin: 4px 0 0; }
.cu-hint, .cp-hint { margin: 0; color: var(--muted); }
.cu-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--text); color: var(--surface); font-weight: 700; text-align: center; transform: translateY(110%); transition: transform .2s; }
.cu-bar.show { transform: none; }
.cu-bar b { color: #ffd34d; }
/* ポイント計算 */
.cp-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; margin-bottom: 14px; }
.cp-tabs button { font: inherit; font-size: 15px; min-height: 44px; border: 0; background: var(--surface); color: var(--text); cursor: pointer; }
.cp-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cp-panel[hidden] { display: none; }
.cp-field { display: grid; gap: 6px; margin: 0 0 16px; font-weight: 700; }
.cp-field > small, .cp-field small { font-weight: 400; color: var(--muted); }
.cp-field > .cu-in { max-width: 280px; }
.cp-stepper { display: flex; align-items: center; gap: 8px; }
.cp-stepper button { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 26px; cursor: pointer; }
.cp-stepper input { width: 64px; text-align: center; font-size: 24px !important; font-weight: 700; border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 6px; }
.cp-warn { color: var(--drop); }
.cp-rows { list-style: none; padding: 0; margin: 0 0 8px; }
.cp-row { display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto 36px; gap: 6px; align-items: center; margin-bottom: 8px; }
.cp-rate-in { display: none; width: 88px; }
.with-rate .cp-rate-in { display: flex; }
.cp-ok { grid-column: 2 / 4; grid-row: 2; font-size: 12px; color: var(--muted); margin-top: -4px; }
.cp-ok:empty { display: none; }
.cp-row.counted .cp-ok { color: var(--good); }
.cp-no { font-weight: 700; color: var(--muted); text-align: center; }
.cp-del { grid-column: 4; grid-row: 1; width: 36px; height: 36px; border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; }
.cp-row-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.cp-sum-line { margin: 8px 0 18px; font-weight: 700; }
.cp-spu-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cp-spu-in { width: 110px; min-height: 40px; font-weight: 400; }
.cp-spu-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cp-checks { display: grid; gap: 0; margin-bottom: 8px; }
.cp-big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-bottom: 10px; }
.cp-big p { margin: 0; display: grid; }
.cp-big span { font-size: 12px; color: var(--muted); }
.cp-big strong { font-size: 30px; line-height: 1.15; }
.cp-big p:first-child strong { color: var(--point); }
.cp-big strong small { font-size: 15px; }
.cp-pct { font-size: 13px; color: var(--muted); }
.cp-bars { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.cp-bars li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; }
.cp-bv { font-weight: 700; }
.cp-bb { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.cp-bb i { display: block; height: 100%; background: var(--point); }
.cp-tips { margin: 10px 0 0; padding-left: 1.2em; }
.cp-tips li { margin: 6px 0; }
.cp-foot { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.cp-adv { margin: 8px 0; }
.cp-adv summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.cp-adv label { display: grid; gap: 2px; margin: 8px 0; max-width: 320px; font-size: 14px; }
.cp-adv select { padding: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); }
@media (min-width: 641px) { .cu-bar { display: none; } }
@media (max-width: 640px) {
  .cu-cards { grid-template-columns: 1fr; }
  .cp-big strong { font-size: 24px; }
  main.solo { padding-bottom: 64px; }
}
.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; }
.cu-err { margin: 6px 0 0; font-size: 13px; color: var(--drop); }
.cu-err:empty { display: none; }
.cu-in select[hidden] { display: none; }
.cu-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.cu-go { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; font-size: 15px; border-radius: 999px; background: var(--cta); color: var(--cta-ink); font-weight: 700; text-decoration: none; }
.cu-go.sub { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); font-weight: 400; }
.cu-bottom { display: flex; gap: 12px; align-items: center; margin-top: 24px; }
.cp-hint.ex { margin-top: 6px; font-size: 13px; }
.cp-field-h { margin: 0 0 8px; font-weight: 700; display: grid; }
.cp-field-h small { font-weight: 400; color: var(--muted); }
.cp-steps-h { margin: 12px 0 4px; font-size: 12px; color: var(--muted); }
.cp-steps { list-style: none; padding: 0 0 4px; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(58px, 1fr); gap: 4px; overflow-x: auto; }
.cp-steps li { display: grid; text-align: center; padding: 6px 2px; border-radius: var(--radius-s); background: var(--surface); font-size: 12px; }
.cp-steps li b { font-size: 14px; }
.cp-steps li small { color: var(--muted); }
.cp-steps li.now { background: var(--point); color: var(--surface); }
.cp-steps li.now small { color: var(--surface); }
@media (min-width: 900px) {
  .cp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
  .cp-side { position: sticky; top: 12px; }
  .cp-side .cp-result { margin-top: 0; }
}

/* ---- 姉妹サイト(ふるさとコスパ)への案内 ---- */
.sister-banner { display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 6px solid #0b6e4f; background: var(--surface); color: var(--text); text-decoration: none; }
.sister-banner:hover { border-color: #0b6e4f; }
.sb-tag { flex: none; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #0b6e4f; color: #fff; }
.sb-main { display: grid; flex: 1; }
.sb-main span { font-size: 13px; color: var(--muted); }
.sb-go { font-size: 20px; color: #0b6e4f; }
/* スマホ: 「姉妹サイト」のタグは見出しの上に置き、見出しを狭くしない */
@media (max-width: 640px) {
  .sister-banner { flex-wrap: wrap; row-gap: 6px; }
  .sb-main { flex: 1 1 calc(100% - 40px); }
  .sb-main strong { white-space: nowrap; }
}
.tk-sister { margin: 8px 0 16px; padding: 10px 14px; border-radius: var(--radius-s); background: var(--surface); border: 1px dashed var(--line-strong); font-size: 14px; }

/* 値下がり系の一覧のタブ */
.drop-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 8px 0 4px; scrollbar-width: none; }
.drop-tabs::-webkit-scrollbar { display: none; }
.drop-tabs a { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 700; }
.drop-tabs a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* 景表法への配慮: 実際に払う価格を主役に、「ポイント差引の目安」は補足として小さく */
.card .price { font-size: 19px; font-weight: 800; color: var(--text); }
.card .eff { font-size: 12px; color: var(--muted); }
.card .eff .pt-y { font-size: 13px; font-weight: 700; color: var(--muted); }
@media (max-width: 640px) { .card .price { font-size: 17px; } .card .eff .pt-y { font-size: 12px; } }

/* 単価ランキングの補足 */
.tk-plus { font-size: 12px; font-weight: 700; color: var(--drop); }
.warn-note { padding: 8px 12px; border-left: 4px solid var(--drop); background: var(--surface); color: var(--text); }
.tk-var.warn { border-color: var(--drop); color: var(--drop); }
.tk-pair, .tk-km { margin: 8px 0; font-size: 14px; }
.tk-tbest strong, .tk-mini small { white-space: nowrap; }
.stars small, .tk-facts .stars small { font-size: 12px; }
.cu-cnt-note:empty { display: none; }
.cu-cnt-note { margin: 4px 0 0; }
.norev { color: var(--faint); }
.sale-go { grid-area: go; justify-self: start; display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--cta); }
.pr-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line-strong); font-size: 12px; color: var(--muted); }

/* カレンダーに追加: セールのカードの中(右下)に重ねて置く */
.sale-wrap { position: relative; display: grid; }
.sale-wrap[hidden], .sale[hidden] { display: none; }
.sale-wrap > .sale { padding-bottom: 40px; }
.sale-ics { position: absolute; right: 12px; bottom: 6px; display: inline-flex; align-items: center; min-height: 32px; padding: 0 4px; font-size: 13px; font-weight: 700; color: var(--accent); }
.pt-tag.base { color: var(--muted); background: var(--surface-2); font-weight: 700; }
.pt-tag.ended { text-decoration: line-through; opacity: .6; }
.sec-head h2 { flex-wrap: wrap; row-gap: 0; }
.sec-head h2 small { display: block; flex-basis: 100%; margin: 2px 0 0 16px; }
.sec-head h2 small, .picks-h small { text-wrap: pretty; }
.fav-export { margin: 16px 0; }

/* 同じ運営者のサイト一覧(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: 0 16px; margin: 2px 0 0 6px; font-size: 13px; }
.fam-links a { display: inline-flex; align-items: center; min-height: 40px; }
:root[data-theme="dark"] .fam-neusage { --fam-c: #ff7b7b; } :root[data-theme="dark"] .fam-furusato { --fam-c: #3fbf8c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fam-neusage { --fam-c: #ff7b7b; } :root:not([data-theme="light"]) .fam-furusato { --fam-c: #3fbf8c; } }
.tk-box { min-width: 0; }
.tk-furu { margin: -4px 0 12px; font-size: 13px; color: var(--muted); }

/* =========================================================
   トップページ 2026-11-03 改: 最初の画面で「何ができるか」と「今日の数字」を見せる
   ========================================================= */
.hk-sub { font-weight: 700; opacity: .85; }
/* 数字のタイル: 折り返さず、スマホでも横にはみ出さない3列 */
.hero-stats { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; padding: 0; max-width: 520px; }
.hero-stats a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); color: #fff; text-decoration: none; }
.hero-stats a:hover { background: rgba(255, 255, 255, .22); }
.hero-stats a:focus-visible { outline: 3px solid #ffd34d; outline-offset: 2px; }
.hero-stats strong { font-size: 20px; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-stats span { font-size: 12px; line-height: 1.35; color: rgba(255, 255, 255, .92); }
/* 判定が始まるまでの記録の進み具合 */
.hero-progress { margin: 14px 0 0; max-width: 520px; }
.hero-progress p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .95); }
.hero-progress strong { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 6px; background: rgba(0, 0, 0, .22); font-size: 12px; }
.hp-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.hp-bar span { display: block; height: 100%; border-radius: inherit; background: #ffd34d; }
/* 目的から探す */
.quick { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.q-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 92px; padding: 10px 4px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; text-align: center; box-shadow: var(--shadow); }
.q-tile:hover { border-color: var(--accent); }
.q-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.q-ico { font-size: 26px; line-height: 1.1; }
.q-name { font-size: 14px; font-weight: 800; line-height: 1.3; }
.q-sub { font-size: 12px; font-weight: 700; color: var(--accent); line-height: 1.3; font-variant-numeric: tabular-nums; }
/* 今日のおすすめ: 価格帯の名前 */
.pick-band { font-size: 12px; font-weight: 700; color: var(--muted); }
/* 見出しへのジャンプ(ヘッダーが上に固定されるPCでは、その分だけ下げて止める) */
.home-sec, .budget, .home-genres, .howto, #tanka-home { scroll-margin-top: 150px; }
.home-genres { display: none; }
/* 値下げナビの見方 */
.howto-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; }
.howto-list li { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-content: start; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.howto-list .hw-n { grid-row: span 2; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 900; }
.howto-list strong { font-size: 15px; color: var(--text); }
/* ヘッダーの倍率設定: よく使う倍率のボタンと、画面の端に付かない余白 */
.pt-panel { margin-left: max(16px, calc((100% - 1240px) / 2)); margin-right: max(16px, calc((100% - 1240px) / 2)); }
.pt-h { margin: 0; font-weight: 800; }
.pt-panel .note { margin: 4px 0 8px; font-size: 13px; color: var(--muted); }
.pt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.pt-chips button { font: inherit; font-size: 14px; min-height: 40px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.pt-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pt-panel label { font-size: 13px; color: var(--muted); }
/* フッター: 「便利な機能」と「このサイトについて」を分け、リンクは下線で見分けられるように */
.foot-grid { grid-template-columns: 1.2fr 1.6fr 1fr 1fr; }
.site-footer nav[aria-label="便利な機能"] a { display: block; padding: 3px 0; }
.site-footer nav a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.site-footer nav a:hover { text-decoration-color: currentColor; }
/* ページの先頭へ戻るボタン(長いページだけ、少しスクロールしてから出す) */
.to-top { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 15; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, .15); font-size: 20px; line-height: 1; cursor: pointer; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

@media (max-width: 1024px) {
  .home-genres { display: block; }
  .home-genres .sec-head { margin-bottom: 8px; }
  .home-genres .genre-strip { margin-top: 0; }
  .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  /* 順番: 赤いバナー → 目的から探す → 今日のおすすめ */
  .hero-banner { order: 1; }
  .quick { order: 2; gap: 6px; }
  .hero-picks { order: 3; }
  .hero-stats { margin-top: 12px; gap: 6px; }
  .hero-stats a { padding: 6px 8px; }
  .hero-stats strong { font-size: 17px; }
  .hero-progress { margin-top: 10px; }
  .hero-progress p { font-size: 12px; }
  .q-tile { min-height: 76px; padding: 8px 2px; }
  .q-ico { font-size: 22px; }
  .q-name { font-size: 12px; }
  .q-sub { font-size: 12px; font-weight: 600; }
  /* 商品の枠は横にスワイプする1行(縦に長い一覧を短く) */
  .grid.swipe { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; margin: 0 -16px; padding: 0 16px 10px; scrollbar-width: thin; }
  .grid.swipe > .card { scroll-snap-align: start; }
  .grid.row { margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-padding: 0 16px; }
  .home-sec, .budget, .home-genres, .howto, #tanka-home { scroll-margin-top: 12px; }
  .sec.home-sec, .sec.budget, .sec.howto, .sec.home-genres { margin-top: 32px; }
  /* セールのカードも横にスワイプ(3枚を縦に積むと最初の画面が埋まるため) */
  .sales { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 20px -16px 0; padding: 0 16px 8px; scroll-padding: 0 16px; }
  .sales > * { scroll-snap-align: start; }
  .howto-list { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .pick-band { font-size: 12px; }
}
@media (max-width: 640px) {
  /* 見出しの補足は見出しの下に、「すべて見る」は右上に残す(1行目が見出しとリンクだけになる) */
  .sec-head { flex-wrap: nowrap; align-items: flex-start; }
  .sec-head h2 { flex-wrap: wrap; row-gap: 0; min-width: 0; }
  .sec-head h2 small { flex-basis: 100%; margin-left: 16px; }
  .sec-more { margin-top: 3px; white-space: nowrap; font-size: 13px; }
}
/* 商品ページ: 固定の購入バーは、本体の購入ボタンが画面から外れたときだけ出す */
.sticky-buy { transition: transform .2s ease; }
.sticky-buy.hide { transform: translateY(110%); visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .sticky-buy { transition: none; } }
.fact-note { font-size: 12px; color: var(--faint); }
/* ダークモード: 今日のおすすめのバッジは明るい赤の上に暗い文字(白い文字だとコントラストが足りない) */
.pick-rate { color: var(--accent-ink); }
/* 単価計算: 「比べる単位」の見出し。スマホでは内容量の欄を1行全部に広げる(「500ml×24」が切れないように) */
.cu-grp-h { flex-basis: 100%; font-size: 12px; font-weight: 700; color: var(--muted); }
@media (max-width: 640px) {
  .cu-fields, .cu-fields:has(.cu-f-cnt[hidden]) { grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; }
  .cu-fields .cu-f-qty { grid-column: 1 / -1; }
}
/* 単価ランキングの行: 順位は画像の左上のバッジに(順位だけの列をやめて商品名の幅を広げる。姉妹サイトと同じ作り) */
.tk-row { position: relative; grid-template-columns: 96px 1fr auto; }
.tk-row::before { position: absolute; top: 8px; left: -4px; z-index: 1; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 800; line-height: 26px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.tk-row:nth-child(-n+3)::before { background: var(--accent); color: var(--accent-ink); }
.tk-name a { text-decoration: none; }
.tk-name a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .tk-row { grid-template-columns: 72px 1fr; }
  .tk-cta { grid-column: 2; }
  .tk-row::before { min-width: 22px; height: 22px; line-height: 22px; font-size: 12px; padding: 0 5px; }
}
.tk-row > .tk-img { align-self: start; }
.tk-row:nth-child(-n+3)::before { background: var(--surface-2); color: var(--muted); }
.tk-row.top3::before { background: var(--accent); color: var(--accent-ink); }

/* ==== 2026-11-04 品質の見直し(商品ページ・ジャンル・一覧) ==== */
/* 記録の日付(いつのデータか)。見出しのすぐ下に小さく */
.asof { margin: -2px 0 0; font-size: 12px; color: var(--faint); }
.asof::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--good); vertical-align: 1px; }
/* ジャンルの概況: 文章の数字を4〜5つのタイルに */
.g-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 16px 0 0; }
.g-stats dd { font-size: 18px; white-space: nowrap; }
.g-stats dd small { white-space: normal; }
@media (max-width: 640px) { .g-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-stats dd { font-size: 16px; } }
/* 値下がり・最安値の判定状況(枠が空の理由) */
.judge { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-s); border-left: 4px solid var(--line-strong); background: var(--surface); }
.judge ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.judge li { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 14px; }
.judge li b { min-width: 8em; }
.judge li span { color: var(--muted); }
.judge .note { margin: 6px 0 0; font-size: 12px; }
.judge .note a { white-space: nowrap; }
/* 見出しの左の帯: 見出しが2行になっても帯だけが1行目に取り残されないように */
.sec-head h2 { display: grid; grid-template-columns: 6px minmax(0, 1fr); column-gap: 10px; align-items: center; }
.sec-head h2::before { grid-row: 1; align-self: stretch; height: auto; min-height: 1.1em; }
.sec-head h2 small { grid-column: 2; margin-left: 0; }
/* 値下がり系のタブ: スマホでは3つを等分(3つ目が画面の外に切れない) */
@media (max-width: 640px) {
  .drop-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .drop-tabs a { display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px 4px; font-size: 13px; line-height: 1.3; border-radius: 12px; min-height: 44px; word-break: auto-phrase; text-wrap: balance; }
}
/* 指で押すところは44px以上(スマホ・タブレット) */
@media (pointer: coarse) {
  .tool { min-height: 44px; }
  .tool.icon { width: 44px; }
}
@media (pointer: coarse) and (max-width: 640px) {
  /* ボタンを44pxにした分、ロゴと同じ1行に収まるよう間を詰める(390pxで右端まで約8px残る) */
  .header-inner { column-gap: 6px; }
  .tools { gap: 6px; }
  .tool:not(.icon) { padding: 0 9px; }
}
@media (pointer: coarse) {
  .fav, .share a, .share button, .hints button, .empty-links a, .drop-tabs a { min-height: 44px; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .crumbs { margin-top: 4px; }
  .crumbs + h1 { margin-top: 12px; }
  .records summary { min-height: 44px; }
  .card-cta, .list-tools select, .more-btn { min-height: 44px; }
  .card-cta { display: flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0; }
  .list-tools label.chk { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
  .site-footer nav a, .credit a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer nav[aria-label] a[href] { padding: 0; }
  .site-footer nav[aria-label="便利な機能"] a, .site-footer nav[aria-label="サイト情報"] a { display: flex; }
  .genres { row-gap: 0; }
}
/* 検索後の入力例は1行に(結果を最初の画面に入れる) */
.hints.compact { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 12px; padding: 0 16px; }
.hints.compact::-webkit-scrollbar { display: none; }
.hints.compact > * { flex: none; }
@media (min-width: 641px) { .hints.compact { flex-wrap: wrap; margin-left: 0; margin-right: 0; padding: 0; } }
/* 一覧ページの下の「ジャンルから探す」: PCは左にジャンル一覧があるので出さない */
.strip-sec { display: none; }
@media (max-width: 1024px) { .strip-sec { display: block; } .strip-sec .genre-strip { margin-top: 0; } }
/* 商品ページ内のリンク(記録上の最安値 → 価格推移、判定方法など)で見出しが固定ヘッダーに隠れないように */
.item .sec[id], .check[id] { scroll-margin-top: 130px; }
@media (max-width: 640px) { .item .sec[id], .check[id] { scroll-margin-top: 12px; } }
/* 404: ジャンルはどの画面幅でも表示(PCは折り返して全部見せる) */
.nf-sec .nf-genres { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; overflow: visible; }
.nf-sec .sec-head { margin-bottom: 10px; }
.search-box + .nf-sec { margin-top: 28px; }
@media (max-width: 1024px) { .nf-sec .nf-genres { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; } }
@media (min-width: 1025px) {
  .nf-sec .nf-genres a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 700; }
  .nf-sec .nf-genres a:hover { border-color: var(--accent); color: var(--accent); }
}

/* ---- 2026-11-04 改善(round2) */
/* カードの「ポイント差引の目安」: 6桁の価格でもカードの端で切れないよう、ラベルと金額の間で折り返す */
.eff { white-space: normal; }
.eff .pt-y { white-space: nowrap; }
/* ジャンルの概況: 「¥3,579〜¥29,480」のような価格の幅は「〜」の後ろで折り返す */
.g-stats dd { white-space: normal; overflow-wrap: anywhere; }
.g-stats dd .nw { white-space: nowrap; }
/* 画像のない商品: 空白の箱ではなく「画像なし」と出す */
.noimg { display: flex; align-items: center; justify-content: center; background: var(--surface-2); }
.noimg::after { content: "画像なし"; font-size: 12px; color: var(--faint); }
.item-img .noimg { width: 100%; aspect-ratio: 1; }
/* 商品ページ下の固定バー: 広告リンクの横にも PR 表記(12px) */
.sticky-buy a { margin-left: auto; }
.sticky-buy .sb-pr { flex: none; font-size: 12px; color: var(--muted); }
/* ダークモード: 姉妹サイトの帯の矢印(濃い緑のままだと暗い背景で読みにくい) */
:root[data-theme="dark"] .sb-go { color: #3fbf8c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sb-go { color: #3fbf8c; } }
/* 買いまわり(/kaimawari/): 行カード(画像・名前・価格を横に並べて縦の長さを抑える)+ジャンルごとに2点を見せ、残りは <details> */
.grid.km-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.km-grid .card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr auto; }
.km-grid .card-link { grid-column: 1 / -1; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 12px 12px 10px; }
.km-grid .thumb { align-self: start; border-radius: var(--radius-s); overflow: hidden; }
.km-grid .card-body { padding: 0; }
.km-grid .name { min-height: 0; margin-bottom: 2px; }
.km-grid .price { margin: 2px 0 0; }
.km-grid .card-cta, .km-grid .km-add { display: flex; align-items: center; justify-content: center; min-height: 40px; margin: 0 6px 12px 12px; padding: 0 8px; }
.km-grid .km-add { margin: 0 12px 12px 6px; }
.km-grid .card:has(.km-add[hidden]) .card-cta { grid-column: 1 / -1; margin-right: 12px; }
.km-more { margin-top: 12px; }
.km-more > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; list-style: none; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; }
.km-more > summary::-webkit-details-marker { display: none; }
.km-more > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .15s ease; }
.km-more[open] > summary { margin-bottom: 12px; }
.km-more[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.km-more-on, .km-more[open] .km-more-off { display: none; }
.km-more[open] .km-more-on { display: inline; }
.km-more > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.km-chips a { display: inline-flex; align-items: center; min-height: 40px; }
.km-chips .km-chip-tips { border-style: dashed; color: var(--muted); }
.km-sec, #km-tips { scroll-margin-top: 64px; }
@media (max-width: 640px) {
  .grid.km-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .km-grid .card-link { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 10px 10px 8px; }
  .km-grid .card-cta, .km-grid .km-add { margin: 0 5px 10px 10px; }
  .km-grid .km-add { margin: 0 10px 10px 5px; }
  .km-grid .card:has(.km-add[hidden]) .card-cta { margin-right: 10px; }
  .km-sec { margin-top: 28px; }
  .km-sec .sec-head { margin-bottom: 10px; }
  .km-more { margin-top: 10px; }
  .km-more[open] > summary { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { .km-more > summary::after { transition: none; } }

/* ---- 売れ筋ランキングの推移(/rank/)・レビュー条件で絞る(/review/)。行は単価比較の行(.tk-row)を使う ---- */
.rk-row::before { display: none; }
.rk-row .price { margin: 2px 0 0; font-size: 19px; font-weight: 800; color: var(--text); }
.rk-row .eff { font-size: 12px; color: var(--muted); }
.rk-row .eff .pt-y { font-size: 13px; font-weight: 700; color: var(--muted); }
.rk-rank { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13px; color: var(--muted); }
.rk-rank strong { font-size: 18px; color: var(--accent); }
.rk-up { font-weight: 700; color: var(--good); }
.rk-pr { margin: 0 0 4px; }
.rk-jump a { min-height: 40px; }
.tk-others a[aria-current] { border-color: var(--accent); font-weight: 700; }
.rk-trend td.rk-name { white-space: normal; min-width: 200px; }
.rk-trend td.rk-name small { display: block; font-size: 12px; color: var(--faint); }
.rk-trend .rk-out, .rk-trend .rk-na { color: var(--faint); }
.rk-trend .num { white-space: nowrap; }
.rv-table th.num { white-space: normal; min-width: 7em; }
@media (max-width: 640px) {
  .rk-row .price { font-size: 17px; }
  .rk-trend td.rk-name { min-width: 140px; }
}
