/* 冷凍宅食ノート 共通スタイル
   方針：Apple風（白×薄グレー、アクセント青1色、標準フォント、角丸カード）
   スマホ最優先 → 画面が広いときだけ min-width で上書きする */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --text-sub: #6e6e73;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-text: #ffffff;
  --link: #0066cc;
  --good: #1d7d3a;
  --warn-bg: #fff8e5;
  --warn-line: #f5d58a;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius: 18px;
  --radius-s: 12px;
  --max: 980px;
  --max-text: 692px;
  /* 日本語フォントを先頭に置く。-apple-system / system-ui を先にすると、
     環境によって漢字が中国語フォント（PingFang等）で表示されるため。
     Apple端末はヒラギノ、それ以外は Noto Sans JP（Googleフォント）で表示 */
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #161617;
    --card: #1d1d1f;
    --text: #f5f5f7;
    --text-sub: #a1a1a6;
    --line: #424245;
    --accent: #2997ff;
    --accent-hover: #47a6ff;
    --accent-text: #000000;
    --link: #2997ff;
    --good: #4cd964;
    --warn-bg: #2a2410;
    --warn-line: #6b5a21;
    --shadow: none;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  font-kerning: normal;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-bottom: 76px; /* 下の固定ボタンぶん */
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.wrap-text { max-width: var(--max-text); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-text); padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- PR表記バー（ステマ規制対応：全ページ最上部） ---------- */
.pr-bar {
  background: var(--bg-alt);
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  padding: 6px 16px;
}
.pr-bar a { color: inherit; text-decoration: underline; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  color: var(--text); font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
}
.logo:hover { text-decoration: none; }
.logo svg { width: 24px; height: 24px; }

.nav-toggle {
  appearance: none; border: 0; background: transparent; color: var(--text);
  width: 44px; height: 44px; margin-right: -10px; cursor: pointer;
  display: grid; place-items: center;
}
.nav-toggle svg { width: 20px; height: 20px; }
.site-nav { display: none; }
.site-nav.is-open {
  display: block;
  position: absolute; left: 0; right: 0; top: 52px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 8px 20px 20px;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 12px 0; color: var(--text); font-size: 17px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open {
    display: block; position: static; background: none; border: 0; padding: 0;
  }
  .site-nav ul { display: flex; gap: 24px; }
  .site-nav a { padding: 0; border: 0; font-size: 13px; color: var(--text-sub); }
  .site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
}

/* ---------- セクション ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: 28px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em;
  margin: 0 0 12px; text-align: center;
}
.section-lead { color: var(--text-sub); text-align: center; margin: 0 auto 32px; max-width: 34em; }
@media (min-width: 768px) {
  .section { padding: 88px 0; }
  .section-title { font-size: 40px; }
}

/* ---------- ヒーロー（キャッチコピー最優先） ---------- */
.hero { padding: 48px 0 40px; text-align: center; }
.hero-eyebrow { color: var(--accent); font-weight: 600; font-size: 15px; margin: 0 0 8px; }
.hero-title {
  font-size: clamp(36px, 10vw, 72px);
  line-height: 1.15; font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.hero-title .nowrap { white-space: nowrap; }
.hero-lead { font-size: 19px; color: var(--text-sub); margin: 0 auto 28px; max-width: 26em; }
@media (min-width: 768px) { .hero { padding: 96px 0 64px; } .hero-lead { font-size: 22px; } }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 12px 24px; border-radius: 980px;
  background: var(--accent); color: var(--accent-text);
  font-size: 17px; font-weight: 600; line-height: 1.2; border: 0; cursor: pointer;
  text-decoration: none; transition: background 0.2s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--link); border: 1px solid currentColor; }
.btn-ghost:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.link-more::after { content: " ›"; }

/* 公式サイトへのアフィリエイトボタン：近くに必ず（PR） */
.btn-official { flex-direction: column; gap: 2px; }
.btn-official small { font-size: 11px; font-weight: 400; opacity: 0.85; }
.aff-pixel { position: absolute; width: 1px; height: 1px; border: 0; opacity: 0; }

/* ---------- カード ---------- */
.cards { display: grid; gap: 16px; }
@media (min-width: 640px) { .cards-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
}
.section-alt .card { background: var(--card); }
.section:not(.section-alt) .card { border: 1px solid var(--line); box-shadow: none; }
.card h3 { font-size: 21px; line-height: 1.35; margin: 0 0 8px; }
.card p { margin: 0 0 12px; color: var(--text-sub); }
.card-icon { width: 48px; height: 48px; margin-bottom: 12px; color: var(--accent); }
a.card { display: block; color: inherit; }
a.card:hover { text-decoration: none; transform: translateY(-2px); transition: transform 0.2s; }

/* ---------- 記事 ---------- */
.breadcrumb { font-size: 12px; color: var(--text-sub); padding: 12px 0 0; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; }
.breadcrumb a { color: var(--text-sub); }

.article-head { padding: 20px 0 8px; }
.article-head h1 {
  font-size: 30px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; margin: 8px 0 12px;
}
@media (min-width: 768px) { .article-head h1 { font-size: 44px; } }

.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--text-sub); }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; line-height: 1;
  padding: 4px 8px; border-radius: 6px; border: 1px solid var(--text-sub); color: var(--text-sub);
}
.badge-pr { letter-spacing: 0.08em; }

.article { padding-bottom: 40px; }
.article h2 {
  font-size: 26px; line-height: 1.35; margin: 48px 0 16px; padding-top: 8px; letter-spacing: -0.01em;
}
.article h3 { font-size: 20px; line-height: 1.4; margin: 32px 0 12px; }
.article p { margin: 0 0 1.2em; }
.article ul, .article ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.article li { margin-bottom: 0.4em; }
.article strong { font-weight: 700; }
.marker { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 22%, transparent) 62%); }

.toc { background: var(--bg-alt); border-radius: var(--radius-s); padding: 16px 20px; margin: 24px 0; font-size: 15px; }
.toc p { font-weight: 700; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 1.3em; }

/* 要点ボックス・注意ボックス */
.point { background: var(--bg-alt); border-radius: var(--radius-s); padding: 20px; margin: 24px 0; }
.point-title { font-weight: 700; margin: 0 0 8px; }
.point ul { margin: 0; }
.notice {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius-s);
  padding: 14px 16px; margin: 20px 0; font-size: 14px; line-height: 1.7;
}
.notice p:last-child { margin-bottom: 0; }

/* 確認日（価格は変わるので必ず表示） */
.checked { font-size: 13px; color: var(--text-sub); }
.checked::before { content: "🗓 "; }

/* ---------- 比較表（スマホ：横スクロール＋1列目固定） ---------- */
.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 20px -20px; padding: 0 20px;
}
.table-hint { font-size: 12px; color: var(--text-sub); margin: 0 0 4px; }
@media (min-width: 900px) { .table-hint { display: none; } .table-scroll { margin: 20px 0; padding: 0; } }
table.compare {
  border-collapse: separate; border-spacing: 0; min-width: 640px; width: 100%;
  font-size: 14px; line-height: 1.5; background: var(--card);
}
table.compare th, table.compare td {
  padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top;
}
table.compare thead th {
  font-size: 12px; color: var(--text-sub); font-weight: 600; white-space: nowrap; background: var(--bg-alt);
}
table.compare th[scope="row"], table.compare thead th:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--card); min-width: 7.5em; width: 9em; max-width: 9em; font-weight: 700; font-size: 13px;
  box-shadow: 1px 0 0 var(--line);
}
table.compare thead th:first-child { background: var(--bg-alt); }
table.compare td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.compare .best { color: var(--good); font-weight: 700; }
table.compare caption { caption-side: bottom; text-align: left; font-size: 12px; color: var(--text-sub); padding-top: 8px; }

/* ---------- 計算ツールの入力欄 ---------- */
.tool {
  background: var(--card); border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow);
  text-align: left; max-width: 560px; margin: 0 auto;
}
.section:not(.section-alt) .tool { border: 1px solid var(--line); box-shadow: none; }
.field { margin-bottom: 18px; }
.field label, .field .label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field select, .field input[type="number"] {
  width: 100%; min-height: 48px; font: inherit; font-size: 17px; color: var(--text);
  background: var(--bg-alt); border: 1px solid transparent; border-radius: var(--radius-s); padding: 10px 14px;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; padding-right: 36px;
}
.field select:focus, .field input:focus { border-color: var(--accent); outline: none; }
.segmented { display: flex; background: var(--bg-alt); border-radius: var(--radius-s); padding: 3px; }
.segmented label { flex: 1; margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block; text-align: center; padding: 10px 6px; border-radius: 9px; font-weight: 600; font-size: 15px;
  cursor: pointer; color: var(--text-sub); min-height: 44px;
}
.segmented input:checked + span { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); }
.field-help { font-size: 13px; color: var(--text-sub); margin-top: 4px; }

/* 計算結果 */
.results { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.result {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 10px; align-items: baseline;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px 16px;
}
.result-rank { font-weight: 700; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.result-name { font-weight: 700; }
.result-price { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.result-price small { font-size: 12px; font-weight: 400; color: var(--text-sub); }
.result-detail { grid-column: 2 / 4; font-size: 13px; color: var(--text-sub); line-height: 1.6; }
.result-detail a { font-weight: 600; }
.result.is-top { border-color: var(--accent); border-width: 2px; }
.result.is-na { opacity: 0.6; }

/* ---------- 出典リスト ---------- */
.sources { font-size: 13px; color: var(--text-sub); line-height: 1.7; }
.sources li { word-break: break-all; }

/* ---------- 下に固定の「計算してみる」ボタン（スマホ） ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.sticky-cta .btn { width: 100%; max-width: 420px; margin: 0 auto; display: flex; }
@media (min-width: 900px) { .sticky-cta { display: none; } body { padding-bottom: 0; } }

/* ---------- フッター ---------- */
.site-footer { background: var(--bg-alt); color: var(--text-sub); font-size: 12px; line-height: 1.7; padding: 32px 0 24px; }
.site-footer p { margin: 0 0 12px; }
.footer-nav ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { color: var(--text); }
.footer-note { border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- 小物 ---------- */
.center { text-align: center; }
.muted { color: var(--text-sub); }
.small { font-size: 13px; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* 計算ツールのページでは下の固定ボタンを出さない */
.no-sticky .sticky-cta { display: none; }
.no-sticky { padding-bottom: 0; }

/* 「表示価格」と「送料込み」の違いの図 */
.diagram { max-width: 520px; margin: 0; color: var(--text); }
.diagram .bar-base { fill: var(--accent); }
.diagram .bar-ship { fill: color-mix(in srgb, var(--accent) 35%, var(--bg-alt)); }
.diagram text { fill: currentColor; font-family: var(--font); }
.diagram .sub { fill: var(--text-sub); }


/* ---------- 日本語の見出しをきれいに（Apple Store風） ---------- */
/* palt：かな・約物の余白を詰めて、見出しを引き締める */
h1, h2, h3, .hero-title, .section-title, .logo, .btn, .site-nav, .result-name, .result-price, .card h3 {
  font-feature-settings: "palt" 1;
}
/* 見出しは文節で改行（「1食いくら？」の途中で切れないように） */
h1, h2, h3 {
  word-break: auto-phrase;
  text-wrap: balance;
}
p, li { text-wrap: pretty; }
h1, h2, h3 { letter-spacing: 0.02em; }
.hero-title { font-weight: 700; letter-spacing: 0.01em; line-height: 1.2; }
.article-head h1 { font-weight: 700; letter-spacing: 0.02em; }
.result-price { font-weight: 700; }
.logo { font-weight: 700; letter-spacing: 0.06em; }

/* Apple Store風：左寄せの大見出し＋グレーの続き文 */
.hero-store { text-align: left; }
.hero-store .hero-lead { margin-left: 0; }
.headline-gray { color: var(--text-sub); }
.section-title.left { text-align: left; }
.section-lead.left { text-align: left; margin-left: 0; }

/* 横にスワイプできるカードの棚（Apple Storeの商品棚） */
.shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(80%, 320px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  margin: 0 -20px; padding: 8px 20px 28px; scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf > * { scroll-snap-align: start; }
@media (min-width: 900px) { .shelf { grid-auto-columns: calc((100% - 32px) / 3); margin: 0; padding: 8px 0 28px; } }
.shelf .card {
  border: 0 !important; border-radius: 18px; padding: 28px 24px;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08) !important; transition: box-shadow 0.3s, transform 0.3s;
}
.shelf a.card:hover { box-shadow: 2px 4px 16px rgba(0, 0, 0, 0.16) !important; transform: scale(1.01); }
.card-eyebrow { font-size: 12px; font-weight: 700; color: var(--text-sub); letter-spacing: 0.06em; margin: 0 0 6px; }
.card .card-title { font-size: 24px; line-height: 1.3; font-weight: 700; color: var(--text); margin: 0 0 10px; }
@media (prefers-color-scheme: dark) { .shelf .card { background: var(--card); box-shadow: none !important; } }

/* 計算ツールのカードもApple Store風の柔らかい影 */
.hero .tool { box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08); border: 0; }
@media (prefers-color-scheme: dark) { .hero .tool { box-shadow: none; } }
.shelf { scroll-padding-inline: 20px; }
a.card .link-more { color: var(--link); font-weight: 500; }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.field-row input { text-align: center; }
.results-plain .result { grid-template-columns: 1fr auto; }
.results-plain .result-detail { grid-column: 1 / 3; }

/* 事実の一覧（解約・支払いなど） */
.facts { margin: 16px 0 24px; border-top: 1px solid var(--line); }
.facts dt { font-weight: 700; font-size: 15px; padding-top: 14px; }
.facts dd { margin: 4px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 15px; line-height: 1.7; }
.article .card h3 { margin-top: 0; }
.article .card ul { margin-bottom: 0; }
table.compare-vs { min-width: 0; }
table.compare-vs th[scope="row"], table.compare-vs thead th:first-child { width: 5.5em; min-width: 5.5em; max-width: 5.5em; }
table.compare-vs td { min-width: 7em; }
table.compare-vs thead th { white-space: normal; }
table.compare-vs td.num { white-space: normal; }
.compare .best .small { color: var(--text-sub); font-weight: 400; }

/* ---------- 3問診断 ---------- */
.q { border: 0; margin: 0 0 24px; padding: 0; }
.q legend { font-weight: 700; font-size: 18px; margin-bottom: 12px; padding: 0; font-feature-settings: "palt" 1; }
.q-num { color: var(--accent); margin-right: 8px; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choices label { display: block; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span {
  display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-s); font-weight: 600; font-size: 15px; line-height: 1.4;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.choices small { font-weight: 400; font-size: 12px; color: var(--text-sub); }
.choices input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.choices input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.choices-3 { grid-template-columns: repeat(3, 1fr); } .choices-3 span { padding: 10px; font-size: 14px; }
.choices span { word-break: auto-phrase; }
table.compare-wide { min-width: 860px; } table.compare-wide td { min-width: 14em; font-size: 13px; }
