@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=M+PLUS+Rounded+1c:wght@400;500;700;800&display=swap');

:root {
  --bg: #fff7f0;
  --bg-card: #ffffff;
  --bg-subtle: #fff0e3;
  --cream: #fff3e8;
  --text-primary: #4a3528;
  --text-secondary: #8c7163;
  --text-muted: #b8a596;
  --accent: #ff5663;
  --accent-dark: #ec3b50;
  --accent-soft: #ffe6e3;
  --orange: #ff8a4c;
  --gold: #f4a608;
  --gold-soft: #fff2d6;
  --silver: #9aa7b4;
  --bronze: #c08552;
  --header-grad: linear-gradient(120deg, #ff9a5a 0%, #ff6b6b 48%, #ff5e8a 100%);
  --hero-grad: linear-gradient(135deg, #ffb86c 0%, #ff7a8a 55%, #f96d9b 100%);
  --header-text: #ffffff;
  --border: #f4e4d6;
  --border-subtle: #faeee2;
  --header-border: transparent;
  --shadow-sm: 0 2px 6px rgba(214,135,90,0.10), 0 1px 2px rgba(214,135,90,0.08);
  --shadow-md: 0 6px 20px rgba(214,120,90,0.14), 0 2px 6px rgba(214,120,90,0.08);
  --shadow-lg: 0 12px 36px rgba(230,110,80,0.20), 0 4px 12px rgba(230,110,80,0.10);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
}

/* ─── Dark mode (system preference) — 暖色系の暗色 ─── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1611;
    --bg-card: #281f19;
    --bg-subtle: #332821;
    --cream: #332821;
    --text-primary: #f6ece3;
    --text-secondary: #c8b6a8;
    --text-muted: #93806f;
    --accent: #ff7d87;
    --accent-dark: #ff5663;
    --accent-soft: #3c211f;
    --orange: #ff9a5e;
    --gold: #f6bb45;
    --gold-soft: #352a16;
    --silver: #a7b3c0;
    --bronze: #cf9460;
    --header-grad: linear-gradient(120deg, #c96535 0%, #c8434f 48%, #b94070 100%);
    --hero-grad: linear-gradient(135deg, #c07a3e 0%, #c14f5c 55%, #b34d76 100%);
    --header-text: #fff6ef;
    --border: #423429;
    --border-subtle: #352a21;
    --header-border: rgba(255,255,255,0.06);
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.35);
    --shadow-lg: 0 12px 36px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'M PLUS Rounded 1c', -apple-system, sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,180,120,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 10%, rgba(255,140,170,0.12) 0%, transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

/* ─── Header ─── */
header {
  background: var(--header-grad);
  padding: 1.1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(255,107,107,0.25);
  border-bottom: 1px solid var(--header-border);
}

.header-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

header h1 {
  font-family: 'Baloo 2', 'M PLUS Rounded 1c', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--header-text);
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(200,60,60,0.25);
}

header h1 .site-subtitle {
  display: block;
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 0.1rem;
  text-shadow: none;
}

header h1 a,
header h1 a:hover {
  color: var(--header-text);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.header-nav a {
  color: var(--header-text);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
  transition: all 0.2s;
  white-space: nowrap;
}

.header-nav a:hover {
  background: rgba(255,255,255,0.32);
  color: var(--header-text);
  transform: translateY(-1px);
}

.header-nav a.active {
  background: #fff;
  color: var(--accent-dark);
}

/* ─── Main ─── */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ─── Affiliate Notice ─── */
.affiliate-notice {
  background: var(--bg-subtle);
  border-radius: 20px;
  padding: 0.55rem 1.1rem;
  margin-bottom: 1.75rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
}

/* ─── Section Headings ─── */
.section-title {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 1.3rem;
  height: 1.3rem;
  background: var(--accent);
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(255,86,99,0.4);
  transform: rotate(8deg);
}

/* ─── Cospa King Card ─── */
/* ─── コスパ王（縦中央レイアウト）─── */
.cospa-king-card {
  background: var(--hero-grad);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1.5rem 0;
  position: relative;
}

.cospa-king-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cospa-king-label {
  font-family: 'Baloo 2', 'M PLUS Rounded 1c', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.22);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  position: relative;
}

.cospa-king-image {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 4px solid rgba(255,255,255,0.6);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  position: relative;
}

.cospa-king-info {
  width: 100%;
  padding: 1rem 0 0.25rem;
  position: relative;
}

.cospa-king-genre {
  font-size: 0.74rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.25rem;
}

.cospa-king-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cospa-king-shop {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.78);
  margin-bottom: 0.3rem;
}

.cospa-king-price {
  font-family: 'Baloo 2', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.cospa-king-review {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.6rem;
}

.cospa-king-score {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.cospa-king-body {
  padding: 1rem 1.5rem 1.5rem;
  width: 100%;
  position: relative;
}

.cospa-king-card .product-button {
  background: #fff;
  color: var(--accent-dark);
  width: 100%;
  justify-content: center;
}

.cospa-king-card .product-button:hover {
  background: var(--cream);
  color: var(--accent-dark);
}

/* ─── Budget Banner (top page) ─── */
.budget-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(120deg, var(--gold) 0%, var(--orange) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 20px rgba(244,166,8,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.budget-banner:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(244,166,8,0.4);
}

.budget-banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.budget-banner-text {
  flex: 1;
  min-width: 0;
}

.budget-banner-title {
  font-family: 'Baloo 2', 'M PLUS Rounded 1c', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.budget-banner-sub {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.92);
  margin-top: 0.15rem;
}

.budget-banner-arrow {
  font-size: 1.8rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.budget-banner:hover .budget-banner-arrow {
  transform: translateX(4px);
}

/* ─── Genre Grid ─── */
.genre-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.genre-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.25s;
}

.genre-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.genre-card a {
  display: flex;
  align-items: stretch;
  color: inherit;
}

.genre-card-image {
  width: 96px;
  height: 96px;
  object-fit: cover;
  flex-shrink: 0;
}

.genre-card-content {
  padding: 0.9rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.genre-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.genre-card-count {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.genre-card-count::before {
  content: '🛍';
  font-size: 0.85rem;
}

/* ─── Product List ─── */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.25s;
  animation: fadeUp 0.4s ease both;
}

.product-card:hover { color: inherit; }

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.09s; }
.product-card:nth-child(3) { animation-delay: 0.13s; }
.product-card:nth-child(n+4) { animation-delay: 0.16s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.product-card[data-rank="1"] { box-shadow: 0 0 0 2px var(--gold), var(--shadow-md); }
.product-card[data-rank="2"] { box-shadow: 0 0 0 2px var(--silver), var(--shadow-sm); }
.product-card[data-rank="3"] { box-shadow: 0 0 0 2px var(--bronze), var(--shadow-sm); }

.product-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem;
}

.product-rank {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-radius: 50%;
}

.product-card[data-rank="1"] .product-rank { color: #fff; background: var(--gold); box-shadow: 0 3px 10px rgba(244,166,8,0.5); }
.product-card[data-rank="2"] .product-rank { color: #fff; background: var(--silver); }
.product-card[data-rank="3"] .product-rank { color: #fff; background: var(--bronze); }

.product-image {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.product-info {
  flex: 1;
  min-width: 0;
}

.product-name-with-badges {
  margin-bottom: 0.4rem;
}

.product-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.product-shop {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

.product-review {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.product-card-header {
  padding-bottom: 0.75rem;
}

.product-card-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

.product-card-cta .cta-arrow {
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.2s;
}

.product-card:hover .product-card-cta {
  background: var(--accent-soft);
}

.product-card:hover .cta-arrow {
  transform: translateX(3px);
}

/* ─── Badges ─── */
.cospa-score-badge {
  display: inline-block;
  background: linear-gradient(120deg, var(--accent) 0%, var(--orange) 100%);
  color: #fff;
  padding: 0.22rem 0.7rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}

.official-rank-badge {
  display: inline-block;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 0.22rem 0.7rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}

.rank-change-badge {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}

.rank-change-new  { background: #e7f8ee; color: #1f9d54; }
.rank-change-up   { background: #fff1de; color: #e8820a; }
.rank-change-down { background: var(--bg-subtle); color: var(--text-muted); }

/* ─── Buttons ─── */
.product-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.9rem;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 14px rgba(255,86,99,0.35);
}

.product-button::after {
  content: '→';
  font-size: 0.95em;
  transition: transform 0.2s;
}

.product-button:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255,86,99,0.45);
  filter: brightness(1.03);
}

.product-button:hover::after {
  transform: translateX(3px);
}

/* ─── Score Explanation ─── */
.score-explanation {
  background: var(--gold-soft);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.score-explanation strong {
  color: var(--text-primary);
  font-weight: 800;
}

/* ─── Budget Section ─── */
.budget-section {
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.budget-section-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent-dark);
  margin-bottom: 0.85rem;
}

.budget-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.75rem;
}

.budget-product-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  background: var(--bg);
}

.budget-product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.budget-product-image {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.budget-product-info {
  padding: 0.45rem 0.4rem 0.55rem;
}

.budget-product-name {
  font-size: 0.66rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.budget-product-price {
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.78rem;
  color: var(--accent-dark);
  font-weight: 800;
  margin-bottom: 0.15rem;
}

.budget-product-score {
  font-size: 0.63rem;
  color: var(--text-muted);
}

/* ─── View Cospa Link ─── */
.view-cospa-link-wrapper {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  text-align: center;
}

.view-cospa-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.65rem 1.5rem;
  background: var(--accent-soft);
  border-radius: 20px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.view-cospa-link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ─── Page Header ─── */
.page-header {
  margin-bottom: 1.25rem;
}

.page-header h2 {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.35rem;
}

.page-header .updated-date {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.page-header .summary-text {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--accent-dark);
  font-weight: 700;
  margin-top: 0.6rem;
  background: var(--accent-soft);
  padding: 0.35rem 0.9rem;
  border-radius: 16px;
}

/* ─── Footer ─── */
footer {
  background: var(--header-grad);
  color: rgba(255,255,255,0.92);
  padding: 2.25rem 1.5rem;
  margin-top: 3rem;
  font-size: 0.78rem;
  text-align: center;
  line-height: 1.85;
}

footer p + p {
  margin-top: 0.35rem;
}

footer a {
  color: #fff;
  font-weight: 700;
  transition: opacity 0.2s;
}

footer a:hover {
  color: #fff;
  opacity: 0.8;
}

/* ─── Responsive ─── */
@media (min-width: 480px) {
  .genre-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .genre-card-image {
    width: 100px;
    height: 100px;
  }
}

@media (min-width: 640px) {
  .genre-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .genre-card a {
    flex-direction: column;
  }

  .genre-card-image {
    width: 100%;
    height: 140px;
  }

  .cospa-king-price {
    font-size: 2rem;
  }

  .cospa-king-image {
    width: 200px;
    height: 200px;
  }

  .product-rank {
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1.55rem;
  }

  .product-image {
    width: 96px;
    height: 96px;
  }
}

/* ─── PC / Desktop ─── */
@media (min-width: 1024px) {
  .header-inner {
    max-width: 1080px;
  }

  main {
    max-width: 1080px;
    padding: 2rem 1.5rem 4rem;
  }

  .genre-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .product-card:nth-child(odd)  { animation-delay: 0.06s; }
  .product-card:nth-child(even) { animation-delay: 0.1s; }

  .cospa-king-inner {
    padding: 2.25rem 2.5rem;
  }

  .cospa-king-image {
    width: 240px;
    height: 240px;
  }

  .cospa-king-price {
    font-size: 2.2rem;
  }

  .cospa-king-body {
    padding: 0 2.5rem 2.25rem;
    max-width: 340px;
  }

  .budget-products {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
}

@media (min-width: 1280px) {
  .header-inner,
  main {
    max-width: 1160px;
  }
}

/* ─── ウィジェットグリッド（外枠）─── */
.widget-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-top: 0.2rem;
}

@media (min-width: 768px) {
  .widget-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── ホームウィジェット ─── */
.home-widget {
  background: var(--w-bg, var(--bg-card));
  border: 1.5px solid var(--w-border, var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.home-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem 0.55rem;
  background: var(--w-head, linear-gradient(90deg, var(--accent-soft) 0%, var(--cream) 100%));
  border-bottom: 1.5px solid var(--w-border, var(--border-subtle));
}

.home-widget-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--w-accent, var(--accent-dark));
  letter-spacing: 0.02em;
}

.home-widget-more {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--w-accent, var(--accent-dark));
  opacity: 0.75;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.home-widget-more:hover { opacity: 1; }

.home-widget-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  padding: 0.5rem 0.9rem 0.3rem;
  background: var(--w-bg, var(--bg-card));
}

/* ─── 商品カードグリッド（ウィジェット内）─── */
.home-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--w-bg, var(--bg-card));
}

.home-widget-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 5px rgba(0,0,0,0.10);
}

.home-widget-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.16);
}


.home-widget-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg-subtle);
  display: block;
}

.home-widget-card-body {
  padding: 0.45rem 0.55rem 0.55rem;
  flex: 1;
  border-top: 2px solid var(--w-border, var(--border-subtle));
}

.home-widget-card-meta {
  font-size: 0.64rem;
  color: var(--w-accent, var(--text-muted));
  font-weight: 700;
  margin-bottom: 0.12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-widget-card-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-widget-card-price {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--w-accent, var(--accent-dark));
  margin-top: 0.22rem;
}

/* ─── 定価取り消し線 ─── */
.list-price {
  display: block;
  font-size: 0.75em;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: line-through;
  line-height: 1.2;
}

.home-widget-card-price .list-price {
  display: inline;
  font-size: 0.78rem;
  margin-right: 0.25em;
}

/* ─── ウィジェット ジャンル別カラー（CSS変数）─── */
.home-widget[data-genre="xtrend"] {
  --w-bg: #fff5f5; --w-border: #ffc8c8;
  --w-head: linear-gradient(90deg, #ffc8c8 0%, #fff0f0 100%);
  --w-accent: #b80018; --w-card: rgba(255,255,255,0.78);
}
.home-widget[data-genre="trending"] {
  --w-bg: #fff6ee; --w-border: #ffd4a0;
  --w-head: linear-gradient(90deg, #ffd4a0 0%, #fff4e8 100%);
  --w-accent: #b85200; --w-card: rgba(255,255,255,0.78);
}
.home-widget[data-genre="kaden"] {
  --w-bg: #eef4ff; --w-border: #b0ccff;
  --w-head: linear-gradient(90deg, #b0ccff 0%, #e8f2ff 100%);
  --w-accent: #1246a8; --w-card: rgba(255,255,255,0.78);
}
.home-widget[data-genre="cosme"] {
  --w-bg: #fff0f9; --w-border: #ffb3e0;
  --w-head: linear-gradient(90deg, #ffb3e0 0%, #ffe8f8 100%);
  --w-accent: #ab005e; --w-card: rgba(255,255,255,0.78);
}
.home-widget[data-genre="pet"] {
  --w-bg: #f0faf1; --w-border: #96dfa0;
  --w-head: linear-gradient(90deg, #96dfa0 0%, #e4f8e7 100%);
  --w-accent: #196b2a; --w-card: rgba(255,255,255,0.78);
}
.home-widget[data-genre="drink"] {
  --w-bg: #edfafc; --w-border: #80d8e8;
  --w-head: linear-gradient(90deg, #80d8e8 0%, #e0f7fb 100%);
  --w-accent: #00687a; --w-card: rgba(255,255,255,0.78);
}
.home-widget[data-genre="interior"] {
  --w-bg: #fdf4ec; --w-border: #f0c090;
  --w-head: linear-gradient(90deg, #f0c090 0%, #faeadb 100%);
  --w-accent: #7a3d00; --w-card: rgba(255,255,255,0.78);
}
.home-widget[data-genre="smartphone"] {
  --w-bg: #f4f0ff; --w-border: #c8b4ff;
  --w-head: linear-gradient(90deg, #c8b4ff 0%, #ede8ff 100%);
  --w-accent: #4a20b0; --w-card: rgba(255,255,255,0.78);
}
.home-widget[data-genre="health"] {
  --w-bg: #edfaf7; --w-border: #7ed5c8;
  --w-head: linear-gradient(90deg, #7ed5c8 0%, #dff5f1 100%);
  --w-accent: #006358; --w-card: rgba(255,255,255,0.78);
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto;
  }
}
