﻿/* erabu-kurashi.com — 共通スタイルシート
   カテゴリ別アクセント色はページ側 <style>:root{--accent:#xxxxx;--accent-dark:#xxxxx}</style> で上書き
   デフォルト: メインブルー #2d7dd2 */

/* ===== CSS変数デフォルト ===== */
:root {
  --text: #2b2b2b;
  --sub: #666;
  --bg: #ffffff;
  --accent: #2d7dd2;
  --accent-dark: #7bbff5;
  --line: #e5e5e5;
  --win: #2e8b57;
  --warn: #b5651d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #ddd;
    --sub: #999;
    --bg: #191919;
    --accent: var(--accent-dark, #7bbff5);
    --line: #333;
    --win: #58c58a;
    --warn: #e0a060;
  }
}

/* ===== リセット ===== */
* { margin: 0; padding: 0; box-sizing: border-box; overflow-wrap: break-word; word-break: break-word; }

/* ===== ベース ===== */
html { overflow-x: clip; }
body {
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.9;
  overflow-x: hidden;
}

/* ===== レイアウト ===== */
main { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }
footer {
  max-width: 760px; margin: 0 auto; padding: 24px 20px 40px;
  font-size: 0.8rem; color: var(--sub); border-top: 1px solid var(--line);
}

/* ===== 記事ヘッダー ===== */
.pr-note,
.pr {
  font-size: 0.82rem; color: var(--text); font-weight: bold; border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 12px; margin-bottom: 24px; display: inline-block;
}
.hero { width: 100%; height: auto; border-radius: 10px; margin-bottom: 24px; }
h1 { font-size: 1.6rem; line-height: 1.5; margin-bottom: 8px; }
.meta { font-size: 0.85rem; color: var(--sub); margin-bottom: 28px; }

/* ===== 見出し ===== */
h2 {
  font-size: 1.25rem; margin: 44px 0 16px; padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}
h3 { font-size: 1.08rem; margin: 30px 0 10px; }

/* ===== 本文 ===== */
p { margin-bottom: 1.2em; }
ul, ol { margin: 0 0 1.2em 1.4em; }

/* ===== CTAボタン ===== */
.btn-amazon {
  display: inline-block; background: #ff9900; color: #111; font-weight: bold;
  padding: 14px 26px; border-radius: 8px; text-decoration: none; margin: 4px 8px 20px 0;
}
.btn-amazon:hover { opacity: 0.85; }
.btn-rakuten {
  display: inline-block; background: #bf0000; color: #fff; font-weight: bold;
  padding: 14px 26px; border-radius: 8px; text-decoration: none; margin: 4px 0 20px;
}
.btn-rakuten:hover { opacity: 0.85; }
.quickcta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 28px; }
.quickcta a {
  flex: 1 1 auto; text-align: center; font-size: 0.82rem; font-weight: bold;
  color: #111; background: #ff9900; border-radius: 999px; padding: 8px 14px; text-decoration: none;
}
.quickcta a:hover { opacity: 0.85; }

/* ===== purchase-guide CTA枠 ===== */
aside.purchase-guide {
  background: #eaf4f0;
  border-left: 3px solid var(--accent);
  padding: 20px 20px 12px;
  border-radius: 0 8px 8px 0;
  margin: 28px 0;
}
@media (prefers-color-scheme: dark) {
  aside.purchase-guide { background: #1a2f28; }
}

/* ===== インフォボックス ===== */
.point-box {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
  border-left: 4px solid var(--accent); padding: 14px 18px; margin: 20px 0;
  border-radius: 0 8px 8px 0;
}
.warn-box {
  background: color-mix(in srgb, var(--warn) 12%, var(--bg));
  border-left: 4px solid var(--warn); padding: 14px 18px; margin: 20px 0;
  border-radius: 0 8px 8px 0;
}

/* ===== 比較表 ===== */
.table-wrap { overflow-x: auto; margin: 20px 0; }
table { border-collapse: collapse; width: 100%; min-width: max-content; font-size: 0.83rem; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: color-mix(in srgb, var(--accent) 10%, var(--bg)); white-space: nowrap; }
td.num { text-align: right; white-space: nowrap; }
.note { font-size: 0.8rem; color: var(--sub); }

/* ===== 比較表 モバイルカード化 ===== */
@media (max-width: 700px) {
  h1 { font-size: 1.4rem; line-height: 1.45; }
  h2 { margin-top: 32px; }
  .table-wrap { overflow-x: visible; }
  .table-wrap table { min-width: 0; width: 100%; }
  .table-wrap table, .table-wrap table tr, .table-wrap table td { display: block; width: 100%; }
  .table-wrap table tr:first-child {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  .table-wrap table tr:not(:first-child) {
    border: 1px solid var(--line); border-radius: 8px; margin: 0 0 12px; padding: 4px 0;
  }
  .table-wrap table td {
    border: none; border-bottom: 1px solid var(--line);
    padding: 8px 10px 8px 42%; position: relative; min-height: 1.6em;
  }
  .table-wrap table tr td:last-child { border-bottom: none; }
  .table-wrap table td::before {
    content: attr(data-label); position: absolute; left: 10px; top: 8px;
    width: 38%; font-weight: bold; color: var(--sub); font-size: 0.78rem;
  }
}

/* ===== アクセシビリティ ===== */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* ===== パンくずリスト ===== */
nav.breadcrumb { font-size: 0.8rem; color: var(--sub); margin-bottom: 12px; }
nav.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; }
nav.breadcrumb li + li::before { content: "›"; margin-right: 4px; }
nav.breadcrumb a { color: var(--accent); text-decoration: none; }
nav.breadcrumb a:hover { text-decoration: underline; }

.season-banner{background:#e8f4f8;padding:12px;margin-bottom:16px;border-radius:4px;text-align:center;font-size:0.9rem}
.season-banner a{color:var(--accent);text-decoration:none;display:block}
.season-banner a:hover{text-decoration:underline}
.season-icon{font-size:1.2em}

@media (max-width:700px) {
  .season-banner{padding:12px 8px;font-size:0.85rem}
}

/* ===== TOC目次スタイル ===== */
.toc { border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; margin: 20px 0 28px; background: color-mix(in srgb, var(--accent) 5%, var(--bg)); }
.toc-list { list-style: none; margin: 8px 0 0; padding: 0; }
.toc-list li { margin: 6px 0; padding-left: 1em; }
.toc-list a { color: var(--accent); text-decoration: none; font-size: 0.92rem; }
.toc-list a:hover { text-decoration: underline; }

/* .pr-note と .pr は同一スタイル。 */

/* ===== color-mix() フォールバック (Safari 15.3以前) ===== */
.point-box { background: #edf4fe; }
.warn-box { background: #fdf0e0; }
th { background: #edf4fe; }
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .point-box { background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
  .warn-box { background: color-mix(in srgb, var(--warn) 12%, var(--bg)); }
  th { background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
}

/* ===== faq-search-terms ダークモード対応 ===== */
.faq-search-terms { background: color-mix(in srgb, var(--text) 5%, var(--bg)) !important; }

/* ===== カテゴリ一覧下部CTA ===== */
.category-cta-bottom { text-align: center; padding: 24px; background: #fafafa; }

/* ===== 共通CTAボタン ===== */
.btn-primary { background: #e05f30; color: #fff; padding: 12px 24px; border-radius: 4px; text-decoration: none; display: inline-block; }

/* Amazon deals CTA block */
.amazon-deals-cta { margin: 1.2em 0; }
.amazon-deals-cta a { display: inline-block; padding: 10px 20px; background: #ff9900; color: #111; font-weight: 700; text-decoration: none; border-radius: 4px; }
.amazon-deals-cta a:hover { background: #e68900; }
.amazon-deals-cta .note { font-size: 0.8em; color: #666; margin: 4px 0 0; }

/* R10: quick-pick block */
.quick-pick {
  background: #f0f8ff;
  border: 1px solid #2d7dd2;
  border-radius: 8px;
  padding: 16px;
  margin: 24px 0;
}
.quick-pick p { margin: 0; font-size: 0.95rem; }

/* R10: conclusion purchase CTA */
.conclusion-purchase-cta {
  background: #fff8e1;
  border: 2px solid #f5a623;
  border-radius: 8px;
  padding: 16px;
  margin: 24px 0;
  text-align: center;
}
.conclusion-purchase-cta a {
  color: #fff;
  background: #f5a623;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  margin-top: 8px;
}

/* R10: toc title */
.toc-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: #333;
}

/* R11: season-banner seasonal variant */
.season-banner.autumn-winter { background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%); border-color: #ff9800; }
.season-banner.spring-summer { background: linear-gradient(135deg, #e8f5e9 0%, #b2dfdb 100%); border-color: #4caf50; }

/* R12: last card orphan fix - center single orphan in grid */
@media (min-width: 601px) {
  .cards .card:last-child:nth-child(odd) { justify-self: center; max-width: 340px; }
}
