/* ============================================================
   くらし得ノート テーマ
   基調: ウォームオフホワイト / アクセント: ディープグリーン
   ============================================================ */
:root {
  --bg: #faf7f1;
  --surface: #ffffff;
  --ink: #37332c;
  --ink-soft: #5c564c;
  --muted: #978d7d;
  --line: #e9e2d4;
  --accent: #2f6b4e;
  --accent-dark: #22503a;
  --accent-soft: #e9f1ec;
  --accent-pale: #f3f7f3;
  --star: #eda93c;
  --star-bg: #e3dac6;
  --gold-1: #e3b83c;
  --gold-2: #bd8f1c;
  --silver-1: #c6cbcd;
  --silver-2: #969ea1;
  --bronze-1: #d09a5f;
  --bronze-2: #a96f3c;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(74, 62, 38, 0.06);
  --shadow-hover: 0 12px 28px rgba(47, 107, 78, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
::selection { background: var(--accent-soft); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.logo {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.13rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.logo:hover { color: var(--ink); }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-right: 9px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.genre-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.genre-nav a {
  padding: 5px 13px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.genre-nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- トップ: ヒーロー ---------- */
.hero {
  background: linear-gradient(155deg, var(--accent-soft) 0%, #f7efdd 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px 20px 40px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: 1.75rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
}
.hero .hero-desc {
  margin: 0 auto;
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 0.97rem;
}
.hero .pr-tag { justify-content: center; margin-top: 18px; }

/* ---------- トップ: 記事一覧 ---------- */
.site-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 20px 56px;
}
.genre-section { margin-top: 40px; scroll-margin-top: 84px; }
.genre-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  font-size: 1.28rem;
  letter-spacing: 0.04em;
}
.genre-heading .genre-count {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
}
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.card-link {
  display: block;
  height: 100%;
  padding: 20px 20px 16px;
  color: inherit;
  text-decoration: none;
}
.card-link:hover { color: inherit; }
.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.genre-chip {
  display: inline-block;
  padding: 2px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.badge-new {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--gold-1);
  color: #4a3803;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.card-title {
  margin: 0 0 8px;
  font-size: 1.06rem;
  line-height: 1.55;
}
.card-desc {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-date { margin: 0; color: var(--muted); font-size: 0.8rem; }

/* ---------- 記事ページ ---------- */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 26px 20px 52px;
}
.breadcrumb {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.83rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-dark); text-decoration: underline; }
.breadcrumb-sep { margin: 0 7px; }
.article h1 {
  margin: 12px 0 6px;
  font-size: 1.55rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.article-meta { margin: 0 0 14px; color: var(--muted); font-size: 0.83rem; }
.article p { margin: 0 0 1.15em; }
.article h2 {
  margin: 1.6em 0 0.7em;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--accent-pale);
  border-left: 5px solid var(--accent);
  font-size: 1.18rem;
  line-height: 1.5;
}
.article h3 { line-height: 1.55; }

/* PR表記タグ（記事冒頭に必須表示） */
.pr-tag {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.6;
}
.pr-label {
  flex: none;
  padding: 1px 9px;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* 価格・データの注記 */
.data-note {
  margin-top: 30px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold-1);
  border-radius: 10px;
  background: #fdfaf2;
  color: var(--ink-soft);
  font-size: 0.83rem;
  line-height: 1.7;
}

/* ---------- 商品カード ---------- */
.item {
  margin: 22px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.item-thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, #f4f0e5 0%, var(--accent-soft) 100%);
}
.item-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.item-thumb--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(47, 107, 78, 0.38);
}
.thumb-note { font-size: 0.68rem; letter-spacing: 0.28em; font-weight: 700; }
.item-body { padding: 18px 20px 20px; }
.item-rankrow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.rank-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}
.rank-badge.rank-1 { background: linear-gradient(145deg, var(--gold-1), var(--gold-2)); color: #fff; }
.rank-badge.rank-2 { background: linear-gradient(145deg, var(--silver-1), var(--silver-2)); color: #fff; }
.rank-badge.rank-3 { background: linear-gradient(145deg, var(--bronze-1), var(--bronze-2)); color: #fff; }
.rating { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.rating-num { font-weight: 700; }
.rating-count { color: var(--muted); font-size: 0.83rem; }
.item h3 { margin: 4px 0 6px; font-size: 1.07rem; }
.item h3 a { color: var(--ink); text-decoration: none; }
.item h3 a:hover { color: var(--accent-dark); text-decoration: underline; }
.item-shop { margin: 0 0 8px; color: var(--muted); font-size: 0.85rem; }
.item-price { margin: 0 0 6px; display: flex; align-items: baseline; gap: 10px; }
.price-label {
  padding: 1px 9px;
  border-radius: 6px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
}
.price-value { font-size: 1.5rem; color: var(--accent-dark); letter-spacing: 0.02em; }
.item-note { margin: 0 0 14px; color: var(--ink-soft); font-size: 0.88rem; }
.item-cta { margin: 0; }
.btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(47, 107, 78, 0.28);
  transition: background 0.2s, transform 0.2s;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
@media (max-width: 559px) {
  .item-cta .btn { display: block; text-align: center; }
}
@media (min-width: 640px) {
  .item { display: flex; }
  .item-thumb { flex: 0 0 208px; aspect-ratio: auto; min-height: 208px; }
  .item-body { flex: 1; }
}

/* 星評価 */
.stars {
  position: relative;
  display: inline-block;
  font-size: 1.02rem;
  line-height: 1;
  letter-spacing: 0.14em;
  color: var(--star-bg);
  white-space: nowrap;
}
.stars-fg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  color: var(--star);
  white-space: nowrap;
}
.stars--sm { font-size: 0.78rem; letter-spacing: 0.08em; }

/* ---------- 比較表 ---------- */
.table-wrap {
  margin: 20px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
table.compare {
  border-collapse: collapse;
  width: 100%;
  min-width: 580px;
  font-size: 0.9rem;
  line-height: 1.6;
}
table.compare th, table.compare td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
table.compare thead th {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
table.compare tbody tr { border-top: 1px solid var(--line); }
table.compare tbody tr:nth-child(even) { background: #fbf9f4; }
table.compare td.price-cell { font-weight: 700; color: var(--accent-dark); white-space: nowrap; }
table.compare td a { color: var(--ink); text-decoration: none; }
table.compare td a:hover { color: var(--accent-dark); text-decoration: underline; }

/* ---------- フッター ---------- */
.site-footer {
  margin-top: 24px;
  background: #234434;
  color: #e8efe9;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 20px 28px;
}
.footer-logo {
  display: flex;
  align-items: center;
  margin: 0 0 14px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}
.footer-logo .logo-mark { background: #3d8563; }
.site-footer .genre-nav { margin: 0 0 16px; }
.site-footer .genre-nav a { color: #cfe0d4; }
.site-footer .genre-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.footer-note { margin: 0 0 10px; color: #b7cdbb; font-size: 0.8rem; line-height: 1.7; }
.footer-copy { margin: 0; color: #93ac97; font-size: 0.78rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
  .card:hover, .btn:hover { transform: none; }
}
