/* 色はブランド資料 v2.1 の色番号で固定する。白地を基本にし、暗い配色は持たない。
   選択状態（札、下部ナビ）はティール、進むボタン（販売サイトで見る、詳しく見る）はコーラルに濃紺の文字（ブランド資料の btn-c）。
   画面の形はデザイン案（GPT image/ の10枚）に合わせる */
:root {
  color-scheme: light;
  --teal: #008f91;
  --teal-deep: #00777a;
  --coral: #f66b5d;
  --yellow: #ffc928;
  --navy: #14243b;
  --bg: #ffffff;
  --bg-sub: #f5f7fa;
  --band: #eef4f4;
  --ink: var(--navy);
  --muted: #4f5b6b;
  --line: #d9dee6;
  --link: var(--teal-deep);
  --teal-tint: #d9f0f0;
  --coral-tint: #fde4e1;
  --yellow-tint: #fff1c2;
  --navy-tint: #e3e8f0;
  --accent: var(--teal-deep);
  --accent-tint: var(--teal-tint);
  --gold: #d4a017;
  --silver: #9aa3ad;
  --bronze: #b87333;
  --page-max: 1040px;
  --gutter: 16px;
  --radius: 14px;
  --tabbar: 60px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-feature-settings: "palt" 1;
  overflow-x: hidden;
  /* 下部ナビが最下部の内容を隠さないよう、ナビの高さとセーフエリアの分を空ける */
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
}
a { color: var(--link); }
h1 { font-size: 1.7rem; font-weight: 700; line-height: 1.3; margin: 0 0 8px; overflow-wrap: anywhere; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; font-weight: 700; margin: 28px 0 12px; line-height: 1.3; }
h2.h-bar { padding-left: 12px; border-left: 5px solid var(--teal); }
h2.h-bar.yellow { border-left-color: var(--yellow); }
h2.plain { font-size: 1.15rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0 0 4px; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---- ヘッダー（全画面で共通）---- */
.top { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 8px; height: 54px; padding: 0 var(--gutter); padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { flex: none; display: block; line-height: 0; }
.logo { display: block; width: 184px; height: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: -8px; border-radius: 50%; color: var(--ink); text-decoration: none; }
.icon-btn svg { width: 26px; height: 26px; stroke-width: 2; }
.icon-btn:hover { background: var(--bg-sub); }
.pr-notice { margin: 0; padding: 2px var(--gutter); font-size: .62rem; line-height: 1.5; color: #8a94a3; background: var(--bg); border-bottom: 1px solid var(--line); text-align: right; }
.pr { display: inline-block; margin-right: 4px; padding: 0 4px; font-size: .58rem; font-weight: 600; line-height: 1.5; color: #8a94a3; background: transparent; border: 1px solid #c9d0da; border-radius: 3px; vertical-align: middle; }
.post .pr, .pbrand .pr { margin-left: 6px; margin-right: 0; }
.ad-cap .pr { margin-right: 4px; }
.crumb { background: var(--band); }
.crumb-in { display: flex; align-items: center; gap: 4px; max-width: var(--page-max); margin: 0 auto; padding: 8px var(--gutter); font-size: .85rem; font-weight: 500; color: var(--ink); white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.crumb-in a { display: inline-flex; align-items: center; color: var(--teal-deep); text-decoration: none; font-weight: 700; }
.crumb-in a svg { width: 22px; height: 22px; color: var(--ink); }
.crumb-sep { display: inline-flex; color: var(--muted); }
.crumb-sep svg { width: 16px; height: 16px; }
.page { max-width: var(--page-max); margin: 0 auto; padding: 12px var(--gutter) 24px; }
.is-narrow .page { max-width: 760px; }
.foot { max-width: var(--page-max); margin: 32px auto 0; padding: 20px var(--gutter); font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); text-align: center; }
.foot p { margin: 4px 0; }
.note { color: var(--muted); font-size: .82rem; margin: 12px 0; }
.lead { margin: 0 0 12px; color: var(--muted); line-height: 1.7; }
.flash { background: var(--yellow-tint); border-left: 4px solid var(--yellow); border-radius: 8px; padding: 8px 16px; margin: 0 0 16px; }
.empty { margin: 24px 0; padding: 20px 16px; text-align: center; color: var(--muted); background: var(--bg-sub); border-radius: var(--radius); }
.loading { color: var(--muted); font-size: .9rem; text-align: center; }
.page-head { padding: 4px 0 8px; }
.page-head h1 { font-size: 2rem; margin: 0 0 10px; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.head-row h1 { margin: 0; }
.count-badge { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; background: var(--bg-sub); border-radius: 999px; font-weight: 700; color: var(--teal-deep); }
.count-badge svg { width: 20px; height: 20px; }
.num { display: inline-block; padding: 2px 10px; font-size: .9rem; font-weight: 700; color: var(--teal-deep); background: var(--teal-tint); border-radius: 8px; font-variant-numeric: tabular-nums; }
.label-yellow { display: inline-block; padding: 3px 12px 3px 10px; font-size: .85rem; font-weight: 700; color: var(--ink); background: var(--band); border-left: 4px solid var(--yellow); border-radius: 4px 8px 8px 4px; }

/* ---- 下部ナビ（ホーム・ジャンル・人気・保存）---- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar-in { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 600px; margin: 0 auto; height: var(--tabbar); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink); text-decoration: none; font-size: .72rem; font-weight: 500; }
.tab svg { width: 26px; height: 26px; }
.tab.on { color: var(--accent); font-weight: 700; }
.tab.on svg { stroke-width: 2.2; }
.tab.on::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }

/* ---- 札（チップ）、区切りタブ、並び順 ---- */
.chips { display: flex; gap: 8px; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 20px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font-size: .95rem; font-weight: 700; line-height: 1.3; cursor: pointer; white-space: nowrap; }
.chips.outline .chip { border-color: var(--teal-deep); color: var(--teal-deep); }
.chip.on, .chips.outline .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chip-link { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .85rem; color: var(--ink); }
.seg { display: flex; margin: 0 0 14px; padding: 0; background: var(--bg-sub); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg-btn { flex: 1; padding: 11px 6px; border: 0; border-right: 1px solid var(--line); background: transparent; font-size: 1rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.seg-btn:last-child { border-right: 0; }
.seg-btn.on { background: var(--accent); color: #fff; }
.filter-row { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.sort-tabs { display: flex; justify-content: flex-end; gap: 2px; }
.sort { padding: 6px 10px; border: 0; background: none; font-size: .85rem; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.sort.on { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }

/* ---- ボタン（コーラル、進む）---- */
.btn-coral { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 48px; padding: 10px 20px; border: 0; border-radius: 12px; background: var(--coral); color: var(--navy); font-size: 1.05rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-coral svg { width: 20px; height: 20px; stroke-width: 2.4; }
.btn-coral.cta { display: flex; width: 100%; min-height: 56px; margin: 20px 0; font-size: 1.15rem; }
.btn-coral.cta svg { margin-left: auto; }
.btn-coral.small { min-height: 40px; padding: 6px 16px; font-size: .95rem; border-radius: 10px; align-self: flex-start; }

/* ---- 検索欄 ---- */
.search-form { display: flex; gap: 10px; margin: 0 0 14px; }
.search-box { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; border: 1.5px solid var(--teal-deep); border-radius: 12px; background: var(--bg); }
.search-box > svg { position: absolute; left: 14px; color: var(--ink); width: 22px; height: 22px; stroke-width: 2; }
.search-box input { width: 100%; height: 50px; padding: 0 44px 0 46px; border: 0; border-radius: 12px; background: transparent; font: inherit; font-size: 1.1rem; font-weight: 500; color: var(--ink); }
.search-box input::placeholder { color: #7b8794; font-weight: 400; font-size: 1rem; }
.search-box input:focus { outline: none; }
.search-box:focus-within { box-shadow: 0 0 0 3px var(--accent-tint); }
.search-box .clear { position: absolute; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.search-box .clear svg { width: 20px; height: 20px; }
.search-btn { flex: none; min-height: 50px; padding: 0 22px; }

/* ---- 写真のない商品のマス（店名と商品名）---- */
.ph-text { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; height: 100%; padding: 6%; text-align: center; font-size: .62rem; line-height: 1.25; color: var(--navy); overflow: hidden; }
.ph-text b { font-size: .55rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; width: 100%; }
.ph-text span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; width: 100%; }
.t0 { background: var(--teal-tint); } .t1 { background: var(--yellow-tint); } .t2 { background: var(--coral-tint); } .t3 { background: var(--navy-tint); }

/* ---- ① ホーム：ヒーロー、ジャンルの札、写真グリッド、新しい記事 ---- */
.hero { position: relative; display: flex; align-items: center; min-height: 200px; margin: -12px calc(-1 * var(--gutter)) 14px; padding: 28px var(--gutter); background: linear-gradient(135deg, var(--yellow-tint) 0%, var(--band) 45%, var(--coral-tint) 100%); background-size: cover; background-position: center; }
.hero.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, .78) 0%, rgba(255, 255, 255, .45) 55%, rgba(255, 255, 255, 0) 100%); }
.hero-title { position: relative; margin: 0; font-size: 2rem; line-height: 1.3; letter-spacing: -.01em; }
.spark { position: absolute; left: -4px; top: -22px; width: 22px; height: 22px; background: linear-gradient(var(--yellow), var(--yellow)) 50% 0 / 3px 10px no-repeat, linear-gradient(var(--yellow), var(--yellow)) 0 30% / 3px 10px no-repeat, linear-gradient(var(--yellow), var(--yellow)) 100% 30% / 3px 10px no-repeat; transform: rotate(-20deg); }
.spark::before { content: ""; position: absolute; left: 2px; top: 6px; width: 3px; height: 10px; background: var(--yellow); transform: rotate(-40deg); }
.spark::after { content: ""; position: absolute; right: 2px; top: 6px; width: 3px; height: 10px; background: var(--yellow); transform: rotate(40deg); }
.pills { display: flex; gap: 10px; margin: 0 calc(-1 * var(--gutter)) 14px; padding: 0 var(--gutter) 2px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 10px 14px 10px 18px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font-size: .95rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.pill svg { width: 18px; height: 18px; stroke-width: 2.4; }
.pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* 100マスの盤面：どの幅でも 10×10。マスの一辺は順位で 3・2・1（src/board.js）。空きは薄いマス、収まらない商品（.over）は出さない */
.photo-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-auto-rows: 1fr; grid-auto-flow: dense; gap: 3px; }
.tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--bg-sub); color: inherit; text-decoration: none; }
.tile img, .card-img img, .gcard-img img, .detail-img img, .arow-img img, .acard-img img, .rank-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-2x { grid-column: span 2; grid-row: span 2; }
.tile-2x .ph-text { font-size: .8rem; }
.tile-2x .ph-text b { font-size: .65rem; }
.tile-3x { grid-column: span 3; grid-row: span 3; }
.tile-3x .ph-text { font-size: 1.05rem; }
.tile-3x .ph-text b { font-size: .8rem; }
.tile.blank { background: var(--bg-sub); opacity: .55; pointer-events: none; }
.tile.hide, .tile.over { display: none; }
.board-timer { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; margin: 6px 0 8px; font-size: .78rem; color: var(--muted); }
.board-timer .bt-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.board-timer .bt-time:empty { display: none; }
/* 狭い画面の 1×1 のマスは一辺が 30px ほどなので、文字は商品名を 2 行だけ（店名は出さない） */
@media (max-width: 639px) {
  .tile:not(.tile-2x):not(.tile-3x) .ph-text { padding: 2px; font-size: .5rem; line-height: 1.15; gap: 0; }
  .tile:not(.tile-2x):not(.tile-3x) .ph-text b { display: none; }
  .tile:not(.tile-2x):not(.tile-3x) .ph-text span { -webkit-line-clamp: 2; }
}
/* バナーのマス：もしもの正方形バナーを切り抜かずに縮小表示（object-fit: contain）。押し先は計測リンク */
.tile.ad-tile { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); }
.tile.ad-tile .ad-img { flex: 1 1 0; min-height: 0; width: 100%; height: auto; object-fit: contain; object-position: center; }
.tile.ad-tile .imp { width: 1px; height: 1px; }
.tile:hover, .tile:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
@media (min-width: 640px) { .photo-grid { gap: 4px; } .tile-2x .ph-text { font-size: 1rem; } .tile-2x .ph-text b { font-size: .8rem; } .tile-3x .ph-text { font-size: 1.3rem; } .tile-3x .ph-text b { font-size: 1rem; } }
@media (min-width: 1040px) { .ph-text { font-size: .8rem; } .ph-text b { font-size: .68rem; } }
.latest { margin-top: 28px; }

/* 記事の横長カード */
.arows { display: grid; gap: 14px; }
.arow { display: grid; grid-template-columns: 120px minmax(0, 1fr) 28px; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); text-decoration: none; box-shadow: 0 1px 2px rgba(20, 36, 59, .04); }
.arow-img { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg-sub); }
.arow-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.arow-title { font-size: 1.05rem; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arow-desc { font-size: .85rem; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arow-chev { display: inline-flex; color: var(--ink); }
.arow:has(.btn-coral) { grid-template-columns: 150px minmax(0, 1fr); }
.arow:has(.btn-coral) .arow-img { aspect-ratio: auto; align-self: stretch; height: 100%; min-height: 140px; }
.arow:has(.btn-coral) .arow-title { font-size: 1.15rem; }
.ph-article { font-size: .78rem; }
.ph-article b { font-size: .66rem; }
.garticles { margin-top: 24px; }
.garticles .label-yellow { margin-bottom: 12px; }
.garticles .arows { margin-top: 12px; }
/* 記事の縦カード（2列） */
.acards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.acard { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); color: var(--ink); text-decoration: none; }
.acard-img { display: block; aspect-ratio: 4 / 3; background: var(--bg-sub); }
.acard-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 10px 12px 2px; font-size: 1rem; font-weight: 700; line-height: 1.45; }
.acard-genre { display: block; padding: 0 12px 12px; font-size: .8rem; color: var(--teal-deep); font-weight: 500; }

/* ---- ② ジャンル一覧：写真つきの2列カード ---- */
.gcards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gcard { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); background: var(--bg); }
.gcard:hover, .gcard:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.gcard-img { position: relative; display: block; aspect-ratio: 1; background: var(--bg-sub); overflow: hidden; }
.gcard-img .ph-text { font-size: .9rem; }
.gcard-img .num { position: absolute; left: 8px; top: 8px; background: rgba(255, 255, 255, .9); }
.gcard-name { display: block; padding: 10px 10px 2px; text-align: center; font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.gcard-n { display: block; padding: 0 10px 10px; text-align: center; font-size: .75rem; color: var(--muted); }
@media (min-width: 640px) { .gcards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .gcards { grid-template-columns: repeat(4, 1fr); } }

/* ---- ③ ジャンル詳細：番号と見出しの帯 ---- */
.band { margin: -12px calc(-1 * var(--gutter)) 0; padding: 22px var(--gutter) 16px; background: var(--band); }
.band-in { max-width: var(--page-max); margin: 0 auto; }
.band-title { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; }
.band-title h1 { margin: 0; font-size: 1.9rem; }
.band-title .num { font-size: 1.1rem; padding: 4px 12px; }
.band .lead { margin: 0; color: var(--ink); font-size: 1.05rem; }
.band-gray { margin: 24px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter) 20px; background: var(--band); }

/* 商品のカード（関連アイテム、検索、保存：2列、写真と名前） */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 12px; }
.card { position: relative; display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); color: var(--ink); text-decoration: none; }
.card.hide { display: none; }
.card-img { display: block; aspect-ratio: 1; background: var(--bg-sub); }
.card-img .ph-text { font-size: .85rem; }
.card-img .ph-text b { font-size: .7rem; }
.card-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 10px 12px 12px; font-size: 1rem; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.card:hover, .card:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.alist { list-style: none; padding: 0; margin: 0; }
.alist li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.alist small { color: var(--muted); white-space: nowrap; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(3, 1fr); } .acards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(4, 1fr); } .acards { grid-template-columns: repeat(4, 1fr); } }

/* ---- ④ 商品詳細 ---- */
.detail { margin: -12px calc(-1 * var(--gutter)) 0; }
.detail-img { position: relative; margin: 0; aspect-ratio: 1; background: var(--bg-sub); overflow: hidden; }
.detail-img.no-img { aspect-ratio: 4 / 3; }
.detail-img .ph-text { font-size: 1.3rem; }
.detail-img .ph-text b { font-size: 1rem; }
.detail-img figcaption { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; font-size: .7rem; color: var(--navy); background: rgba(255, 255, 255, .85); border-radius: 999px; }
.detail-body { padding: 16px var(--gutter) 4px; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 10px; }
.detail-head h1 { font-size: 1.75rem; margin: 0; flex: 1; min-width: 0; }
.save-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: none; width: 50px; height: 50px; border: 0; border-radius: 12px; background: var(--bg-sub); color: var(--ink); cursor: pointer; }
.save-btn svg { width: 26px; height: 26px; }
.save-btn .save-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.save-btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-tint); }
.save-btn[aria-pressed="true"] svg { fill: var(--accent); }
/* 「いいな」（順位に数える。押せるのは1回） */
.like-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: none; height: 50px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--bg-sub); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.like-btn svg { width: 24px; height: 24px; }
.like-btn[aria-pressed="true"] { color: var(--coral-deep, #c4462f); background: var(--coral-tint); }
.like-btn[aria-pressed="true"] svg { fill: var(--coral); stroke: var(--coral); }
.tint-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.tint-chips li { padding: 6px 14px; border-radius: 999px; background: var(--teal-tint); color: var(--teal-deep); font-size: .9rem; font-weight: 700; }
.detail-summary { margin: 0 0 6px; font-size: 1.1rem; line-height: 1.7; }
.detail-meta { margin: 0 0 16px; font-size: .9rem; color: var(--muted); }
.detail-meta small { font-size: .78rem; }
.buy { margin: 0 0 12px; }
.buy-btn { display: flex; width: 100%; min-height: 58px; font-size: 1.3rem; }
.buy-btn svg { width: 24px; height: 24px; }
.buy-btn.sub { min-height: 46px; margin-top: 8px; background: var(--bg); color: var(--teal-deep); border: 1.5px solid var(--teal-deep); font-size: 1rem; }
.buy-note { display: block; margin: 8px 0 0; font-size: .75rem; color: var(--muted); }
.buy-sub { margin: 0; }
.official { margin: 0 0 12px; font-size: .9rem; }
.official a { display: inline-flex; align-items: center; gap: 2px; }
.official svg { width: 18px; height: 18px; }
.why { margin: 12px 0 0; padding: 0 0 8px; border-top: 1px solid var(--line); font-size: .9rem; }
.why summary { padding: 12px 0; font-weight: 700; cursor: pointer; }
.why p { margin: 0 0 8px; }
.why ul { padding-left: 1.2em; margin: 0 0 8px; }
.why small { color: var(--muted); }
.imp { position: absolute; width: 1px; height: 1px; opacity: 0; }
.related h2 { margin-top: 20px; }
@media (min-width: 640px) {
  .detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; margin: 0; }
  .detail-img, .detail-img.no-img { aspect-ratio: 1; border-radius: 16px; }
  .detail-body { padding: 0; }
  .band-gray { margin-left: 0; margin-right: 0; padding-left: var(--gutter); padding-right: var(--gutter); border-radius: 16px; }
}

/* ---- ⑤ 人気ランキング ---- */
.rank-list { list-style: none; margin: 8px 0 0; padding: 0; }
.rank-row { display: grid; grid-template-columns: 44px 1fr 1.2fr; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.rank-no { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.rank-no svg { width: 26px; height: 20px; margin-bottom: 2px; stroke: none; }
.rank-no.r1 svg { fill: var(--gold); } .rank-no.r2 svg { fill: var(--silver); } .rank-no.r3 svg { fill: var(--bronze); }
.rank-img { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--bg-sub); }
.rank-img .ph-text { font-size: .75rem; }
.rank-name { font-size: 1.1rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rank-name small { display: block; margin-top: 2px; font-size: .75rem; font-weight: 400; color: var(--muted); }
@media (min-width: 640px) { .rank-row { grid-template-columns: 56px 200px 1fr; } }

/* ---- 保存の一覧（保存の印、外すボタン）---- */
.card .mark { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .92); color: var(--accent); }
.card .mark svg { fill: var(--accent); width: 22px; height: 22px; }
.card .underline { display: block; width: 56px; height: 4px; margin: -6px 12px 12px; background: var(--yellow); border-radius: 2px; }
.card-remove { position: absolute; top: 10px; left: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.card-remove svg { width: 18px; height: 18px; }
.card-wrap { position: relative; }
.saved-articles { margin-top: 20px; padding: 16px; background: var(--bg-sub); border-radius: var(--radius); }
.saved-articles .arow { padding: 8px; }

/* ---- 記事の中の商品カード ---- */
.product { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 64px; }
.product .pimg { margin: 0; }
.product .pimg img { width: 100%; border-radius: 8px; }
.product .cap { display: block; font-size: .72rem; color: var(--muted); }
.pbrand { margin: 0; font-size: .78rem; color: var(--muted); font-weight: 700; }
.pname { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.pname a { color: var(--ink); }
.pprice { margin: 0 0 6px; font-weight: 700; }
.pprice small { font-weight: 400; color: var(--muted); }
.psummary { margin: 0 0 4px; }
.pwhy { margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.ptags { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.psrc { margin: 0 0 10px; font-size: .75rem; color: var(--muted); }
.tag { font-size: .72rem; padding: 1px 8px; background: var(--bg-sub); border-radius: 999px; color: var(--muted); }
.pbtns { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: .9rem; }
.btn-rakuten { background: #bf0000; color: #fff; }
.btn-amazon { background: #ff9900; color: var(--navy); }
.btn-other, .btn-sample { background: var(--accent); color: #fff; }
.btn-detail { background: var(--bg-sub); color: var(--ink); border: 1px solid var(--line); }
@media (min-width: 640px) {
  .product { grid-template-columns: 200px 1fr; }
  .product:not(:has(.pimg)) { grid-template-columns: 1fr; }
}

/* ---- 記事 ---- */
.post .ahero { margin: -12px calc(-1 * var(--gutter)) 16px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-sub); }
.post .ahero img { width: 100%; height: 100%; object-fit: cover; }
.post .ahero figcaption { position: absolute; font-size: .72rem; color: var(--muted); }
.post-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 10px; }
.post h1 { font-size: 1.9rem; }
.post .lead { color: var(--ink); font-size: 1.05rem; }
.post .meta { font-size: .8rem; color: var(--muted); margin: 0 0 16px; }
.points { padding: 14px 16px; margin: 0 0 16px; background: var(--band); border-radius: var(--radius); }
.points-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; }
.points-title svg { color: var(--yellow); stroke: var(--navy); fill: var(--yellow); width: 26px; height: 26px; }
.points .answer p { margin: 0 0 6px; }
.toc { margin: 0 0 20px; padding: 14px 16px 6px; background: var(--bg-sub); border-radius: var(--radius); }
.toc-title { margin: 0 0 6px; font-size: 1.1rem; font-weight: 700; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { border-top: 1px solid var(--line); }
.toc a { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--ink); text-decoration: none; font-size: 1.05rem; font-weight: 500; }
.toc a svg:first-child { color: var(--teal-deep); }
.toc a span { flex: 1; }
.toc a svg:last-child { width: 20px; height: 20px; }
.post p { margin: 0 0 1em; }
.post h2 { padding-left: 12px; border-left: 5px solid var(--teal); scroll-margin-top: 64px; }
.post ul, .post ol { padding-left: 1.4em; }
.post li { margin-bottom: .4em; }
.post .aimg { margin: 0 0 16px; }
.post .aimg img { border-radius: 8px; }
.post .aimg figcaption { font-size: .75rem; color: var(--muted); }
.post .editor { padding: 14px 16px; background: var(--yellow-tint); border-radius: var(--radius); }
.post .editor h2 { border: 0; padding: 0; margin: 0 0 8px; font-size: 1rem; }
.sources ul { padding-left: 1.2em; font-size: .85rem; }
.sources small { color: var(--muted); }
.related-articles { margin-top: 8px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.legal-table th, .legal-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.legal-table th { font-weight: 700; background: var(--bg-sub); }
.legal-table thead th { background: var(--navy-tint); }
.post .legal-table { margin: 0 0 16px; border-radius: 10px; overflow: hidden; }
.post .legal-table th { background: var(--teal-tint); }
@media (max-width: 639px) { .post .legal-table { font-size: .8rem; } .post .legal-table th, .post .legal-table td { padding: 6px; } }
/* 2026-11-08：列の多い表がスマホ幅で1文字ずつ折れていたので、表の中だけ横にスクロールできるようにする（ページ全体ははみ出さない） */
@media (max-width: 639px) { .post .legal-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } .post .legal-table th, .post .legal-table td { min-width: 7.5em; overflow-wrap: break-word; } }

/* ---- もしもの広告バナー（src/materials.js。置き場所は src/content/banners.js）---- */
.ad-row { margin: 20px 0 4px; }
.ad-cap { margin: 0 0 8px; font-size: .78rem; color: var(--muted); }
.ad-row-in { display: flex; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.ad-row-in::-webkit-scrollbar { display: none; }
.ad-unit { display: inline-block; flex: none; line-height: 0; scroll-snap-align: start; }
.ad-unit a { display: inline-block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-sub); }
.ad-unit img { display: block; max-width: min(100%, calc(100vw - 2 * var(--gutter))); max-height: 280px; width: auto; height: auto; }
.ad-product { margin: 4px 0 14px; text-align: center; }
.ad-product .ad-unit img { max-width: 100%; }
.ad-text { font-weight: 700; }
.post .ad-unit { display: block; margin: 16px auto; text-align: center; }
@media (min-width: 1040px) { .ad-row-in { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; } }
/* 素材のカタログ（/_draft/materials、手元の確認だけ） */
.mat-program { margin: 24px 0; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.mat-program h2 small { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
.mats { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.mat { margin: 0; max-width: 100%; }
.mat img { max-width: min(100%, 480px); height: auto; border: 1px solid var(--line); }
.mat figcaption, .mat-texts { font-size: .75rem; color: var(--muted); }
.mat code, .mat-program code { font-size: .75rem; background: var(--bg-sub); padding: 1px 4px; border-radius: 4px; user-select: all; }

/* 2026-11-08：変な改行を減らす（オーナー「変な改行とかボタンのはみ出しとか」）。見出し・文字のマス・ボタン・札は日本語の文節で折り返し、行の長さをそろえる。
   本文は最後の行に1〜2文字だけ残りにくくする。対応していないブラウザは今までどおりの折り返し */
h1, h2, h3, h4, .ph-text b, .ph-text span, .card-name, figcaption, th, .pill, .chip, .tag, .tab, [class*="btn"] { word-break: auto-phrase; text-wrap: balance; overflow-wrap: anywhere; }
p, li, dd, .buy-note, .answer { text-wrap: pretty; }
/* 2026-11-08：スマホ幅の小さいマスは高さが足りず、文字の3行目が枠で半分切れていたので2行までにする（大きいマスは3行のまま） */

