/* 暮らしの準備リスト — 記事サイト
 *
 * Pinterest からの流入が前提。滞在が短いので、ファーストビューに
 * 見出し・PR表記・早見表を収める。画像は置かない（LCPを守る）。
 *
 * 設計の芯:
 *   ページ全体をモノクロで組み、彩度のある色はボタン1色だけに絞る。
 *   「この色＝押せる」がサイト内で学習されることが本体なので、
 *   --cta はボタン以外に絶対に使わない。楽天の赤には寄せない
 *   （公式ボタンだと誤認させる態様を避けるため）。
 *   見せ場は早見表のカード1枚に集中させ、他は静かに保つ。
 */

:root {
  /* ピン画像と同じ紙色。config/pin_style.yaml の base.paper と一致させている。
     Pinterestで生成りのピンを見た人が灰緑のページに着地すると、
     同じ持ち主に見えない */
  --bg:        #fbf7f0;
  /* 構造マーク専用（h2の帯・早見表アイコン・★）。ボタンにも箱にも使わない。
     ピンの金 #b8913a は白地2.94:1で非テキストの3:1に足りないので、
     同じ色相のまま濃くして3.48:1にしてある */
  --accent:    #a8843a;
  --accent-tint: #f6eeda;
  --star-off:  #ddd8cc;
  --card:      #fff;
  --ink:       #12171a;
  --ink-2:     #59636b;
  --ink-3:     #656c70;   /* 白地5.34:1・地色4.58:1。旧#8b949aはAA不合格 */
  --line:      #e2e6e2;
  --line-2:    #eef1ee;
  --cta:       #0d6e63;   /* ボタン専用。他では使わない */

  --wrap: 42rem;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
               "BIZ UDPGothic", Meiryo, sans-serif;
  font-size: 16.5px;
  line-height: 1.8;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ── ヘッダー ───────────────────────────── */
.site-head { padding: 22px 0 0; }
.site-head a {
  color: inherit; text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 9px;
}
.site-name {
  font-size: 15px; font-weight: 800; letter-spacing: .02em;
}
.site-tagline {
  font-size: 12px; color: var(--ink-3); letter-spacing: .04em;
}

/* ── 記事カード ─────────────────────────────
 * モバイルではカードにしない。地色との差が1.17:1でほぼ知覚できないのに、
 * 左右のパディングで本文幅を40px削っていた。幅を本文に回す。
 * カードは700px以上でだけ有効にする。
 */
.sheet { padding: 24px 0 34px; }

/* ── パンくず ───────────────────────────── */
.crumb {
  font-size: 12px; color: var(--ink-3);
  letter-spacing: .05em; margin-bottom: 12px;
}
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--ink-2); }

/* ── 見出し ─────────────────────────────── */
h1 {
  font-size: 30px;
  line-height: 1.34;
  letter-spacing: -.035em;
  margin: 0 0 14px;
  font-weight: 800;
}
h2 {
  font-size: 20px;
  line-height: 1.55;
  letter-spacing: -.02em;
  margin: 52px 0 16px;
  font-weight: 800;
}
/* 斜線の帯。folk-media の実測を再現し、色だけ 3:1 を満たすまで濃くした */
h2 { position: relative; padding-bottom: 13px; }
h2::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 9px;
  background-image: repeating-linear-gradient(
    -45deg, var(--accent), var(--accent) 1px,
    transparent 2px, transparent 5px);
}
h3 {
  font-size: 17.5px;
  line-height: 1.6;
  letter-spacing: -.02em;
  margin: 40px 0 10px;
  font-weight: 800;
  display: flex; align-items: baseline; gap: 10px;
  scroll-margin-top: 16px;
}
/* 早見表の 01..07 と本文の見出しを対応させる番号 */
.h3-no {
  flex: none;
  font-size: 12px; font-weight: 800; letter-spacing: .06em;
  color: #fff; background: var(--ink-2);
  border-radius: 4px; padding: 3px 6px 2px;
  font-variant-numeric: tabular-nums;
  transform: translateY(-2px);
}

p { margin: 0 0 1.35em; }
/* 本文の強調。実測した比較サイトはどれも黄色のマーカーを多用していた。
   下線でも太字でもなく、地に色を敷くのが日本語だと読みを止めない */
article strong {
  font-weight: 800;
  background: linear-gradient(transparent 58%, #ffe9a8 58%);
  padding: 0 1px;
}
a { color: var(--ink); text-underline-offset: 3px; }

/* ── PR表記 ─────────────────────────────
 * 景表法の運用基準が「小さく」「薄い色」「末尾」をNGとしているので、
 * 本文と同じ濃さで H1 の直下に置く。灰色のボックスにはしない。
 */
.pr {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
  margin: 0 0 20px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}
.pr b {
  display: inline-block;
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em;
  color: var(--ink); border: 1.5px solid var(--ink);
  border-radius: 3px; padding: 1px 6px; margin-right: 8px;
  vertical-align: 1.5px;
}

/* 圏点。著者の判断に打つ。
 * 現状ページ上の強調はすべてデータ由来（価格・★・必要数）で、
 * 判断が視覚化されていない。それが「味気ない」の中身だった。
 * イタリックは日本語の字面枠と合わないので、W3C JLReq の圏点を使う。
 * 記事全体で3〜5箇所だけ。数の少なさが判断の証拠になる。
 */
article em {
  /* 太字を足さない。圏点と太字を重ねると二重強調になる（実機で確認） */
  font-style: normal; font-weight: inherit;
  -webkit-text-emphasis: filled dot currentColor;
  text-emphasis: filled dot currentColor;
  text-emphasis-position: over right;
}

/* ④ ★の半分塗り。色数を増やさずに華やかさを足す */
.stars { white-space: nowrap; letter-spacing: .04em; }
.stars span { color: var(--star-off); }
.stars .on { color: var(--accent); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .stars .half {
    background-image: linear-gradient(90deg, var(--accent) 50%, var(--star-off) 50%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}

/* ── 数値サマリ ─────────────────────────── */
.summary {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
  margin: 0 0 20px;
}
.summary b {
  font-size: 27px; font-weight: 800; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.summary span { font-size: 12.5px; color: var(--ink-3); letter-spacing: .03em; }

/* ── 早見表 ─────────────────────────────
 * 4列のテーブルは幅390pxで破綻した（品目名が5行に折り返し、最終列が切れた）。
 * 1品目1ブロックにして横スクロールを消す。
 * 品目名はリンクにしない。「まだ読みたい」と「もう買いたい」が
 * 同じ場所で衝突して誤タップを生むため。
 */
.quick { list-style: none; counter-reset: q; padding: 0; margin: 0; }
.q-item {
  counter-increment: q;
  padding: 13px 0 13px 34px;
  position: relative;
}
.q-item + .q-item { border-top: 1px solid var(--line-2); }
.q-item::before {
  content: counter(q, decimal-leading-zero);
  position: absolute; left: 0; top: 15px;
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.q-head { display: flex; align-items: baseline; gap: 12px; }
.q-name {
  font-weight: 800; font-size: 16.5px; line-height: 1.4; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
}
a.q-name { text-decoration: underline; text-decoration-color: #cfd6d2;
           text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
a.q-name:hover { text-decoration-color: var(--ink-2); }
.q-price {
  margin-left: auto; font-weight: 800; font-size: 15.5px;
  white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.q-sub {
  display: flex; gap: 12px;
  font-size: 12.5px; color: var(--ink-3); line-height: 1.6; margin-top: 1px;
}
.q-sub span:last-child:not(:only-child) {
  margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* 品目のアイコン。写真が使えないので視覚要素はここで作る。
   ピン画像と同じ Lucide（ISC）を使い、見た目の一貫性を持たせる */
.q-icon {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-right: 2px;
}
.q-item { padding-left: 0; }
.q-item::before { display: none; }

/* トピックのまとまり。記事が増えたときに効く */
.topic { margin-top: 40px; }
.topic h2 { display: flex; align-items: baseline; gap: 10px; }
.topic .count {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  letter-spacing: .04em;
}
.related { margin-top: 54px; }
.related h2 { font-size: 18px; }

/* 本文中に表が残っていた場合の保険 */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line-2); }
th { font-weight: 800; }

/* ── ボタン ─────────────────────────────
 * 高さ56px以上。グラデーションと強い影は広告に見えて逆効果なので付けない。
 */
.cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  width: 100%; min-height: 76px;
  padding: 14px 18px;
  margin: 24px 0 0;
  background: var(--cta);
  color: #fff;
  text-decoration: none;
  font-weight: 800; font-size: 16.5px; line-height: 1.4;
  letter-spacing: -.01em;
  text-align: center;
  border-radius: 10px;
  transition: background .15s ease;
}
.cta:hover { background: #0a5a51; }
.cta-main { display: block; }
/* 「…を楽天市場で見る」が「見／る」、「ベッド下の収納ボックス 4／個組」で割れていた。
   text-wrap: balance は商品名の途中（「収納ボック／ス」）で折り、
   word-break: auto-phrase は未対応環境で「楽天市／場」に割れた。実測して両方却下。
   末尾だけ nowrap にすると、改行できる位置が商品名と末尾のあいだだけになる。
   **商品名側は nowrap にしない**（長い商品名がボタンからあふれる） */
.cta-tail { white-space: nowrap; }
/* 価格はボタンの外。楽天は禁止例に「商品名に含まれない情報（値段など）を
   追加する」を挙げている。争う価値がないので外に出す */
.cta-price {
  margin: 7px 0 0; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.cta-price + .cta-note { margin-top: 3px; }
/* 早見表の直後にボタンを置くと、近接則で「最後の品目のボタン」に見える。
   何のボタンかを言い直す */
.cta-lead {
  margin: 30px 0 -14px; font-size: 13.5px; font-weight: 700;
  color: var(--ink-2); letter-spacing: .04em;
}
.cta-note {
  font-size: 11.5px; color: var(--ink-3);
  margin: 8px 0 30px; text-align: center; letter-spacing: .02em;
}

/* ボタンの直上に出す判断材料。英語圏のA/Bで最も一貫して効いた形。
   レビューは数値のみ（本文の転載・要約は楽天が明示的に禁止） */
.cta-facts {
  margin: 24px 0 -18px;
  font-size: 13px; color: var(--ink-2); font-weight: 600;
  letter-spacing: .01em;
}
.cta-lead + .cta-facts { margin-top: 10px; }

/* 早見表に戻る導線。モバイルのみ。商品CTAは入れない */
.backbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 9px 16px calc(9px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  text-align: center;
  transform: translateY(105%);
  transition: transform .22s ease;
  z-index: 20;
}
.backbar.is-on { transform: none; }
.backbar a {
  display: inline-block; padding: 6px 18px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-2);
  text-decoration: none; letter-spacing: .03em;
}
.backbar a::before { content: "↑ "; }
@media (min-width: 700px) { .backbar { display: none; } }
@media (prefers-reduced-motion: reduce) { .backbar { transition: none; } }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .stars .half {
    background-image: linear-gradient(90deg, var(--accent) 50%, var(--star-off) 50%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}

/* ── 数値サマリ ─────────────────────────
 * 数値はすべてデータから導いたもの。文章を作っていない。
 * 匿名運営で信頼を作る手段は、検証できる数字を出すことしかない
 */
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; margin: 0 0 22px; padding: 0;
  background: var(--line); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden;
}
.stats > div { background: var(--card); padding: 10px 14px; }
.stats dt {
  font-size: 11.5px; color: var(--ink-3); letter-spacing: .06em; margin: 0 0 2px;
}
.stats dd {
  margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* ── 品目のスペック表 ───────────────────
 * 楽天APIから取っているのに出していなかったデータを出す
 */
table.spec {
  width: 100%; border-collapse: collapse; margin: 0 0 20px;
  font-size: 13.5px; line-height: 1.6;
}
table.spec th, table.spec td {
  text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line-2);
}
table.spec th {
  width: 5.6em; font-weight: 600; color: var(--ink-3); background: #f7f8f7;
  white-space: nowrap; font-size: 12.5px;
}
table.spec td { font-weight: 600; font-variant-numeric: tabular-nums; }
table.spec tr:last-child th, table.spec tr:last-child td { border-bottom: none; }

/* ── 上部のタブ ─────────────────────────
 * 長い記事の中で今どこにいるかを示す。実測した比較サイトが共通して持っていた
 */
.tabs { border-bottom: 1px solid var(--line); background: var(--bg); }
.tabs .wrap { display: flex; gap: 0; }
.tabs a {
  flex: 1; text-align: center; padding: 12px 4px 11px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-2);
  text-decoration: none; letter-spacing: .04em;
  border-bottom: 3px solid transparent;
}
.tabs a:hover { color: var(--ink); border-bottom-color: var(--line); }
.tabs.is-stuck {
  position: sticky; top: 0; z-index: 18;
  box-shadow: 0 1px 8px rgba(18, 23, 26, .07);
}

/* ── ラベル付きの囲みボックス ─────────────
 * 実サイト10本を数えたら、囲みボックスが348個で装飾として最多だった
 * （バッジ866個・比較表162個・吹き出しは10個だけ）。
 * 実物の構造は「ラベル＋箇条書き」で、写真が要らない。
 *
 * 色は config/decoration.yaml が CSS変数として差し込む。
 * --cta（ボタン専用色）は使わない。「この色＝押せる」の学習を壊すため。
 */
.box {
  margin: 30px 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--box-tint);
}
.box-label {
  display: flex; align-items: center; gap: 7px;
  margin: 0; padding: 9px 15px 8px;
  background: var(--box-label-bg);
  color: #fff;
  font-size: 13.5px; font-weight: 800; letter-spacing: .04em;
  line-height: 1.4;
}
.box-icon { display: flex; flex: none; }
.box-body { padding: 15px 17px 4px; font-size: 15.5px; line-height: 1.85; }
.box-body > *:last-child { margin-bottom: 12px; }
.box-body p { margin: 0 0 .9em; }
.box-body ul, .box-body ol { margin: 0 0 .9em; padding-left: 1.35em; }
.box-body li { margin-bottom: .35em; }
.box-body li::marker { color: var(--box-label-bg); }

.box--point    { --box-label-bg: #1f5f52; --box-tint: #eef5f2; }
.box--caution  { --box-label-bg: #a8563a; --box-tint: #f9efe9; }
.box--source   { --box-label-bg: #4a6285; --box-tint: #eef1f6; }
.box--order    { --box-label-bg: #8a6a2f; --box-tint: #f7f1e4; }
.box--note     { --box-label-bg: #5c625f; --box-tint: #f2f4f2; }

/* ラベルの無い引用は出典などに使う。装飾しない */
blockquote {
  margin: 26px 0; padding: 2px 0 2px 16px;
  border-left: 3px solid var(--line);
  color: var(--ink-2); font-size: 15.5px;
}

/* ── 記事一覧 ───────────────────────────── */
.posts { list-style: none; padding: 0; margin: 0; }
.posts li + li { border-top: 1px solid var(--line-2); }
.posts li { padding: 20px 0; }
.posts a {
  text-decoration: none; font-weight: 800; font-size: 18px;
  line-height: 1.5; letter-spacing: -.025em;
}
.posts a:hover { text-decoration: underline; }
.posts .meta {
  font-size: 12px; color: var(--ink-3); margin-top: 6px;
  letter-spacing: .03em; font-variant-numeric: tabular-nums;
}

/* ── フッター ───────────────────────────── */
.site-foot {
  margin-top: 26px;
  padding: 4px 0 44px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .03em;
}
.site-foot nav { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.credit { margin-top: 8px; }

/* ── 固定ページ ─────────────────────────── */
.page h2 { font-size: 18px; margin-top: 40px; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: .45em; }

@media (min-width: 700px) {
  body { font-size: 17.5px; background: var(--bg); }
  .sheet {
    background: var(--card); border-radius: var(--radius);
    padding: 44px 48px 54px; margin: 22px 0 0;
    box-shadow: 0 1px 2px rgba(18, 23, 26, .04),
                0 14px 34px -22px rgba(18, 23, 26, .28);
  }
  h1 { font-size: 40px; line-height: 1.28; }
  h2 { font-size: 23px; }
  h3 { font-size: 19px; }
  .summary b { font-size: 31px; }
  .q-name { font-size: 17.5px; }
}
