/* Section-specific styles */

/* HERO */
.hero {
  padding: 28px 0 40px;
  background:
    linear-gradient(180deg, var(--bg-blue-tint) 0%, transparent 80%);
}
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 36px;
  align-items: stretch;
}

.hero-card {
  background: white;
  border-radius: var(--r-lg);
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--brand-50) 0%, transparent 65%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--ff-en);
  margin-bottom: 18px;
  position: relative;
}
.hero-eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--brand);
}
.hero-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--ink);
  position: relative;
}
.hero-title .accent { color: var(--brand); }
.hero-sub {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-3);
  margin: 0 0 28px;
  position: relative;
}
.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
  position: relative;
}
.hero-feat {
  background: var(--bg-tint-2);
  border: 1px solid var(--line);
  padding: 12px 10px;
  border-radius: var(--r-sm);
  text-align: center;
}
.hero-feat .ic {
  width: 26px; height: 26px;
  margin: 0 auto 4px;
  color: var(--brand);
}
.hero-feat .lbl {
  font-size: 11.5px; font-weight: 600; color: var(--ink-2);
  line-height: 1.3;
}
.hero-feat .sub {
  font-size: 10px; color: var(--ink-4);
  margin-top: 2px;
}
.hero-cta {
  display: flex; gap: 10px; position: relative;
}

.hero-image {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(180deg, #fafbfc 0%, #f1f4f8 100%);
  border: 1px solid var(--line);
  min-height: 480px;
}
.hero-image img.fit {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-dots {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
}
.hero-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  transition: all 0.15s;
  cursor: pointer;
}
.hero-dot.active { background: var(--brand); border-color: var(--brand); width: 24px; border-radius: 4px; }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink-3);
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.hero-arrow:hover { color: var(--brand); border-color: var(--brand); }
.hero-arrow.left { left: 14px; }
.hero-arrow.right { right: 14px; }
.hero-banner .hero-arrow { top: 50%; }

.hero-badge {
  position: absolute;
  top: 22px; left: 22px;
  background: var(--ink);
  color: white;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-badge .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  position: relative;
}
.hero-badge .pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #4ade80;
  opacity: 0.4;
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}

/* CATEGORY CHIPS (横スクロール・矢印付き) */
.section--catnav {
  position: relative;
  background:
    radial-gradient(1200px 240px at 20% 0%, rgba(42, 91, 215, 0.06), transparent 70%),
    radial-gradient(1000px 220px at 100% 100%, rgba(42, 91, 215, 0.05), transparent 70%),
    linear-gradient(180deg, #F7FAFF 0%, #EEF3FC 100%);
  padding-top: 36px;
  padding-bottom: 36px;
  margin: 12px 0;
}
.section--catnav::before,
.section--catnav::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(42, 91, 215, 0.22), transparent);
  pointer-events: none;
}
.section--catnav::before { top: 0; }
.section--catnav::after  { bottom: 0; }

.catchip-wrap {
  position: relative;
  margin-top: 6px;
}
.catchip-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 6px 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%);
}
.catchip-scroll::-webkit-scrollbar { display: none; }
.catchip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 0 22px 0 18px;
  border: 1.5px solid rgba(42, 91, 215, 0.14);
  border-radius: 999px;
  background: white;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 4px 12px rgba(42, 91, 215, 0.05);
  transition: all 0.18s ease;
}
.catchip-emoji {
  font-size: 22px;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.catchip:hover {
  border-color: var(--brand);
  background: white;
  color: var(--brand-700);
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.05),
    0 10px 24px rgba(42, 91, 215, 0.18);
}
.catchip-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  color: var(--ink-2);
  transition: all 0.15s ease;
}
.catchip-arrow:hover {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 4px 12px rgba(42, 91, 215, 0.15);
}
.catchip-arrow.prev { left: 0; }
.catchip-arrow.next { right: 0; }
.catchip-arrow svg { width: 22px; height: 22px; }

/* === 静的版（ヤマダ展開）専用: 1行ぐるぐるマルキー === */
.catchip-scroll.catchip-scroll--static {
  display: block;
  overflow: hidden;
  padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}
.catchip-scroll--static .catchip-track {
  display: flex;
  width: max-content;
  animation: catchip-marquee 80s linear infinite;
}
.catchip-scroll--static .catchip-track .catchip {
  margin-right: 10px;
}
.catchip-scroll--static:hover .catchip-track {
  animation-play-state: paused;
}
@keyframes catchip-marquee {
  to { transform: translateX(-50%); }
}
/* ヤマダの a { text-decoration: underline } 等のグローバルCSSを上書き */
a.catchip,
a.catchip:link,
a.catchip:visited,
a.catchip:hover,
a.catchip:active {
  text-decoration: none !important;
}
a.catchip:hover { color: var(--brand-700) !important; }

/* === MEGA MENU (大→中→小カテゴリ・PCホバー＋モバイルタップ) === */
.mega {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}
.mega-group {
  position: relative;
  list-style: none;
}
/* <details>のデフォルト矢印を消す */
.mega-trigger {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 52px;
  padding: 0 16px;
  background: white;
  border: 1.5px solid rgba(42, 91, 215, 0.18);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 4px 12px rgba(42, 91, 215, 0.05);
  transition: all 0.18s ease;
  user-select: none;
}
.mega-trigger::-webkit-details-marker { display: none; }
.mega-trigger::marker { content: ''; display: none; }
.mega-trigger-emoji {
  font-size: 20px;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.mega-trigger-caret {
  font-size: 10px;
  color: var(--ink-3);
  margin-left: 1px;
  transition: transform 0.2s ease;
}
.mega-group:hover > .mega-trigger {
  border-color: var(--brand);
  color: var(--brand-700);
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.05),
    0 10px 24px rgba(42, 91, 215, 0.18);
}
/* タッチ端末（ホバー無し）でだけ、開いた状態のトリガーを強調 */
@media (hover: none) {
  .mega-group[open] > .mega-trigger {
    border-color: var(--brand);
    color: var(--brand-700);
  }
}
.mega-group[open] > .mega-trigger > .mega-trigger-caret { transform: rotate(180deg); }

.mega-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  z-index: 30;
  min-width: 280px;
  max-width: min(900px, calc(100vw - 24px));
  padding: 20px 22px;
  background: white;
  border: 1px solid rgba(42, 91, 215, 0.14);
  border-radius: 14px;
  box-shadow:
    0 4px 8px rgba(15, 23, 42, 0.06),
    0 20px 40px rgba(15, 23, 42, 0.12);
  /* グリッドで中カテゴリを並べる */
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 22px;
}
/* PCはホバー時のみ開く（クリックでピン留めしない） */
@media (hover: hover) {
  .mega-group:hover > .mega-panel { display: grid; }
}
/* タッチ端末（ホバー不可）では <details> がopenの間だけ開く */
@media (hover: none) {
  .mega-group[open] > .mega-panel { display: grid; }
}

/* ▼ 小さな三角の吹き出し風アクセント */
.mega-panel::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: white;
  border-left: 1px solid rgba(42, 91, 215, 0.14);
  border-top: 1px solid rgba(42, 91, 215, 0.14);
}
/* ★ トリガーとパネルの隙間を覆う透明ブリッジ（hover連続性を確保） */
.mega-panel::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 12px;       /* 隙間 10px をカバー（誤差耐性で 12px） */
  pointer-events: auto;
}
.mega-section-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.04em;
}
.mega-section-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mega-section-list li { margin: 0; padding: 0; }
.mega-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none !important;
  border-radius: 8px;
  white-space: nowrap;
  line-height: 1.3;
  transition: background 0.12s ease, color 0.12s ease;
}
.mega-link:hover {
  background: var(--brand-50);
  color: var(--brand-700) !important;
}
.mega-link-emoji {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
/* ヤマダの a { text-decoration: underline } 上書き */
a.mega-link,
a.mega-link:link,
a.mega-link:visited,
a.mega-link:hover,
a.mega-link:active {
  text-decoration: none !important;
}

/* スマホでパネルが画面外にはみ出さないように、パネル幅を画面幅に追従 */
@media (max-width: 720px) {
  .mega-panel {
    position: static;
    transform: none;
    margin-top: 8px;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .mega-panel::before { display: none; }
  .mega-group { width: 100%; }
  .mega-trigger { width: 100%; justify-content: space-between; }
  .mega { flex-direction: column; align-items: stretch; }
}

/* PICKUP（横スクロール商品カルーセル） */
.pickup-marquee {
  overflow: hidden;
  width: 100%;
  padding: 4px 0 8px;
  border-radius: var(--r-md);
}
.pickup-track {
  display: flex;
  gap: 16px;
  animation: pickup-scroll 60s linear infinite;
  width: max-content;
}
.pickup-marquee:hover .pickup-track { animation-play-state: paused; }
@keyframes pickup-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.pickup-card {
  flex-shrink: 0;
  width: 180px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 12px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  display: block;
}
.pickup-card:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.pickup-thumb {
  aspect-ratio: 1;
  background: var(--bg-tint);
  border-radius: var(--r-sm);
  margin-bottom: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pickup-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pickup-noimg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink-5);
  font-family: var(--ff-en);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.pickup-noimg svg {
  width: 36px;
  height: 36px;
  opacity: 0.55;
}
.pickup-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}
.pickup-price {
  font-family: var(--ff-num);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  margin-top: 6px;
  line-height: 1.2;
}
.pickup-price small {
  font-size: 9.5px;
  color: var(--ink-4);
  margin-left: 2px;
  font-weight: 500;
}

/* RANKING TOP5 */
.ranking-block {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 28px 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: stretch;
}
.ranking-head h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.ranking-head .en {
  font-family: var(--ff-en);
  font-weight: 700;
  font-size: 36px;
  color: var(--brand);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 8px 0 14px;
  display: block;
}
.ranking-head p { color: var(--ink-3); font-size: 12.5px; margin: 0 0 18px; }
.ranking-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.rank-item {
  display: flex; flex-direction: column;
  cursor: pointer;
  position: relative;
  padding: 8px;
  border-radius: var(--r-md);
  transition: background 0.15s;
}
.rank-item:hover { background: var(--bg-tint-2); }
.rank-medal {
  position: absolute;
  top: 0; left: 0;
  width: 28px; height: 32px;
  background: var(--ink-5);
  color: white;
  font-family: var(--ff-en);
  font-weight: 800;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  z-index: 2;
}
.rank-item:nth-child(1) .rank-medal { background: linear-gradient(180deg, #F4C752 0%, #C99523 100%); }
.rank-item:nth-child(2) .rank-medal { background: linear-gradient(180deg, #C7CCD3 0%, #8E96A1 100%); }
.rank-item:nth-child(3) .rank-medal { background: linear-gradient(180deg, #D4906E 0%, #A66042 100%); }
/* ページ2/3 では金銀銅メダル色を解除（rankは6-15なので灰色固定） */
.ranking-list.no-medal .rank-item .rank-medal {
  background: var(--ink-5);
}

/* === RANKING ラジオボタンHack によるページ送り（JS不要） === */
.rank-content {
  /* ranking-block の grid column 2 を占める。デフォルトの auto-flow に乗る */
  display: flex;
  flex-direction: column;
}
.rank-page-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.rank-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.rank-tab {
  cursor: pointer;
  padding: 6px 14px;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  user-select: none;
  transition: all 0.15s ease;
  font-family: var(--ff-num);
  letter-spacing: 0.02em;
}
.rank-tab:hover {
  border-color: var(--brand);
  color: var(--brand);
}
/* ラジオが checked のとき、対応するラベルを強調 */
#rank-p1:checked ~ .rank-tabs label[for="rank-p1"],
#rank-p2:checked ~ .rank-tabs label[for="rank-p2"],
#rank-p3:checked ~ .rank-tabs label[for="rank-p3"] {
  background: var(--brand);
  color: white !important;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(42, 91, 215, 0.25);
}
/* ラジオが checked のとき、対応するページだけ表示 */
.rank-page { display: none; }
#rank-p1:checked ~ .rank-page--1,
#rank-p2:checked ~ .rank-page--2,
#rank-p3:checked ~ .rank-page--3 {
  display: grid;
}
.rank-thumb {
  aspect-ratio: 1;
  background: var(--bg-tint);
  border-radius: var(--r-sm);
  margin-bottom: 10px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.rank-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}
.rank-spec { font-size: 11px; color: var(--ink-4); margin-bottom: 6px; }
.rank-price {
  font-family: var(--ff-num);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.rank-price small { font-size: 10px; color: var(--ink-4); margin-left: 2px; font-weight: 500; }

/* BIZ banner */
.biz {
  background: linear-gradient(135deg, #1A3D8F 0%, #2A5BD7 60%, #3A6EE8 100%);
  border-radius: var(--r-lg);
  padding: 36px 36px 32px;
  color: white;
  position: relative;
  overflow: hidden;
}
.biz::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15), transparent 40%),
    radial-gradient(circle at 20% 100%, rgba(255,255,255,0.06), transparent 40%);
  pointer-events: none;
}
.biz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  position: relative;
}
.biz-left h3 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 14px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.biz-left h3 .small { font-size: 16px; opacity: 0.9; font-weight: 600; display: block; margin-bottom: 4px;}
.biz-left p {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.7;
  opacity: 0.92;
  max-width: 360px;
}
.biz-cases {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 22px;
}
.biz-case {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 500;
}
.biz-case .dot { width: 4px; height: 4px; border-radius: 50%; background: #88f0a8; }
.biz-cta { display: flex; gap: 10px; }
.biz-cta .btn-primary {
  background: white; color: var(--brand);
  font-weight: 700;
}
.biz-cta .btn-primary:hover { background: var(--brand-50); color: var(--brand); }
.biz-cta .btn-ghost {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.3);
}
.biz-cta .btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }

.biz-right {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.biz-feat {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--r-md);
  padding: 22px 18px 18px;
  backdrop-filter: blur(4px);
  transition: all 0.18s;
  text-align: center;
}
.biz-feat:hover {
  background: rgba(255,255,255,0.16);
  transform: translateY(-2px);
}
.biz-feat .ic {
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  color: #fff;
  opacity: 0.95;
  display: block;
}
.biz-feat .lbl {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.biz-feat .desc {
  font-size: 11.5px;
  opacity: 0.88;
  line-height: 1.6;
  text-align: left;
}

/* RECOMMENDED CATEGORIES */
.reco-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.reco-card {
  background: white;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.18s;
  display: flex; flex-direction: column;
}
.reco-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-100);
}
.reco-thumb {
  aspect-ratio: 4/3;
  background: var(--bg-tint);
  overflow: hidden;
}
.reco-thumb img { transition: transform 0.5s ease; }
.reco-card:hover .reco-thumb img { transform: scale(1.06); }
.reco-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.reco-name {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
}
.reco-desc {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.reco-arrow {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
}
.reco-card:hover .reco-arrow { gap: 8px; }

/* TRUST BAR */
.trust {
  background: var(--bg-tint-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.trust-pill {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 72px;
  transition: all 0.18s;
}
.trust-pill:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* trust-pill 用の吹き出し（上向き） */
.trust-pill.has-tip {
  position: relative;
  cursor: help;
}
.trust-pill.has-tip .tt-popover {
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateY(4px);
}
.trust-pill.has-tip:hover .tt-popover,
.trust-pill.has-tip:focus-within .tt-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.trust-pill.has-tip .tt-popover::before {
  top: auto;
  bottom: -6px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-item {
  display: flex; align-items: center; gap: 14px;
}
.trust-ic {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}
.trust-ic svg { width: 22px; height: 22px; }
.trust-text .lbl {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.trust-text .desc {
  font-size: 11.5px;
  color: var(--ink-4);
  line-height: 1.4;
}

/* LINE / SDGs combined band */
.dual-band {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
.line-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.line-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(6, 199, 85, 0.06);
}
.line-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  background: var(--line-green);
  color: white;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-bottom: 14px;
  font-weight: 800;
  position: relative;
}
.line-icon svg { width: 30px; height: 30px; }
.line-card h4 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.line-card h4 .pct {
  color: var(--line-green);
  font-family: var(--ff-en);
  font-size: 28px;
}
.line-card p {
  margin: 0 0 14px;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.6;
}
.line-cta {
  display: inline-flex;
  align-items: center; gap: 8px;
  height: 40px; padding: 0 18px;
  background: var(--line-green); color: white;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700;
  border: none;
}
.line-cta:hover { background: #05b04b; }
.line-qr {
  width: 110px; height: 110px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px;
  flex-shrink: 0;
  position: relative;
}

.sdgs-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
}
.sdgs-card .badges {
  display: flex; gap: 6px; margin-bottom: 12px;
  flex-wrap: wrap;
}
.sdgs-badge {
  width: 28px; height: 28px;
  border-radius: 4px;
  font-family: var(--ff-en);
  font-weight: 800;
  font-size: 11px;
  color: white;
  display: flex; align-items: center; justify-content: center;
}
.sdgs-card h4 {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.sdgs-card p {
  margin: 0 0 12px;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.6;
}
.sdgs-card .more {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--brand);
  font-weight: 600;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.sdgs-card .more:hover { gap: 8px; text-decoration: underline; }
.sdgs-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  margin-top: 4px;
}

/* SDGs宣言証 サムネイル＋本文の2カラム */
.sdgs-grid {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 18px;
  align-items: start;
}
.sdgs-cert-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--bg-tint-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: zoom-in;
  transition: all 0.18s ease;
}
.sdgs-cert-thumb:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.sdgs-cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sdgs-cert-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 0;
  letter-spacing: 0.04em;
  text-align: center;
}
.sdgs-cert-zoom {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.sdgs-body { min-width: 0; }

/* SDGs宣言証 拡大モーダル */
.cert-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 32px;
  animation: news-fade 0.18s ease;
  cursor: zoom-out;
}
.cert-modal-img {
  max-width: min(92vw, 720px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  cursor: default;
  animation: news-pop 0.2s ease;
}
.cert-modal-close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 301;
  transition: all 0.15s;
}
.cert-modal-close:hover {
  background: #fff;
  transform: scale(1.05);
}

/* News strip */
.news {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.news-tag {
  background: var(--brand);
  color: white;
  padding: 3px 10px;
  border-radius: var(--r-xs);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.news-marquee {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.news-track {
  display: flex;
  gap: 56px;
  animation: marquee 50s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.news-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.news-item .date {
  font-family: var(--ff-num);
  color: var(--ink-4);
  font-size: 11px;
}
.news-item .label-mini {
  background: var(--bg-tint);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
  padding: 2px 6px;
  border-radius: 3px;
}
.news-item {
  cursor: pointer;
  transition: color 0.15s;
}
.news-item:hover { color: var(--brand); }
.news-item:hover .label-mini {
  background: var(--brand-50);
  color: var(--brand);
}
.news:hover .news-track { animation-play-state: paused; }

/* NEWSモーダル（CSS-only :target 切替） */
.news-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: none;            /* デフォルト非表示。:targetでflex に */
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 24px;
  animation: news-fade 0.18s ease;
}
.news-modal-backdrop:target {
  display: flex;
}
/* 背景クリックで閉じる用の透明リンク（モーダル全面） */
.news-modal-bg-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}
/* news-item は <div> に戻したのでリンク色対策は不要だが、念のため */
.news-item, .news-item * { color: var(--ink); }
.news-item-tip-cta,
.news-item-tip-cta:link,
.news-item-tip-cta:visited,
.news-item-tip-cta:hover,
.news-item-tip-cta:active { text-decoration: none !important; }

/* === ホバー型ニュース詳細ツールチップ（portal 方式 + :has()） ===
   マルキーは transform を使うので、その内側に置いた要素は transform context に閉じ込められる。
   ツールチップを .news-marquee の「外側」=「.news の直下」に置くことで脱出する。
*/
.news { position: relative; }
.news-tips-portal {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0;
  pointer-events: none;
}
.news-tips-portal .news-item-tip { pointer-events: auto; }

.news-item-tip {
  position: absolute !important;
  top: 12px !important;            /* news帯の直下12px */
  left: 50% !important;
  transform: translateX(-50%) !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0s linear 0.25s;
  z-index: 200;
  width: 360px;
  max-width: calc(100vw - 48px);
  padding: 16px 20px 18px;
  background: white;
  border: 1px solid rgba(42, 91, 215, 0.14);
  border-radius: 12px;
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.08),
    0 16px 32px rgba(15, 23, 42, 0.12);
  white-space: normal;
  text-align: left;
  cursor: default;
  animation: news-tip-pop 0.18s ease;
}
@keyframes news-tip-pop {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* 三角の吹き出しアクセント */
.news-item-tip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: white;
  border-left: 1px solid rgba(42, 91, 215, 0.14);
  border-top: 1px solid rgba(42, 91, 215, 0.14);
}
/* 上方向の透明ブリッジ（hover 連続性確保） */
.news-item-tip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: -40px;
  right: -40px;
  height: 24px;
}

/* :has() でホバーされた news-item-N に対応する news-tip-N を可視化
   item:hover でもtip:hover でも有効。display ではなく opacity+visibility を使う
   ことで、item から tip へカーソル移動中の 250ms はvisibleが維持される */
.news:has(.news-item--1:hover) .news-tip--1,
.news:has(.news-tip--1:hover)  .news-tip--1,
.news:has(.news-item--2:hover) .news-tip--2,
.news:has(.news-tip--2:hover)  .news-tip--2,
.news:has(.news-item--3:hover) .news-tip--3,
.news:has(.news-tip--3:hover)  .news-tip--3,
.news:has(.news-item--4:hover) .news-tip--4,
.news:has(.news-tip--4:hover)  .news-tip--4,
.news:has(.news-item--5:hover) .news-tip--5,
.news:has(.news-tip--5:hover)  .news-tip--5 {
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 0.15s ease, visibility 0s !important;
}

.news-item-tip-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.news-item-tip-head .label-mini {
  background: var(--brand);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.news-item-tip-head .date {
  font-family: var(--ff-en);
  font-size: 11px;
  color: var(--ink-4);
}
.news-item-tip-title {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 8px;
}
.news-item-tip-body {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.7;
  margin: 0 0 10px;
}
.news-item-tip-cta {
  display: inline-block;
  background: var(--brand);
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.news-item-tip-cta:hover { background: var(--brand-700); }
@keyframes news-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.news-modal {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 28px 32px 26px;
  max-width: 560px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;             /* bg-linkより上 */
  animation: news-pop 0.2s ease;
}
@keyframes news-pop {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.news-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.15s;
}
.news-modal-close:hover {
  background: var(--bg-tint);
  color: var(--ink);
}
.news-modal-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding-right: 32px;
}
.news-modal-head .label-mini {
  background: var(--brand);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--r-xs);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.news-modal-head .date {
  font-family: var(--ff-en);
  font-size: 12px;
  color: var(--ink-4);
}
.news-modal-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0 0 14px;
  color: var(--ink);
}
.news-modal-body {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.85;
  margin: 0 0 18px;
  white-space: pre-line;
}
.news-modal-cta {
  width: 100%;
}

/* ============================================================
 * BUTTONS: ヤマダのグローバルCSS（a の下線・青字）に負けないよう強制
 * ============================================================ */
a.btn,
a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:active { text-decoration: none !important; }

a.btn-primary,
a.btn-primary:link,
a.btn-primary:visited,
a.btn-primary:hover,
a.btn-primary:active,
.btn-primary {
  background: var(--brand) !important;
  color: #fff !important;
  border: none !important;
}
a.btn-primary:hover,
.btn-primary:hover { background: var(--brand-700) !important; color: #fff !important; }

a.btn-secondary,
a.btn-secondary:link,
a.btn-secondary:visited,
.btn-secondary {
  background: white !important;
  color: var(--brand) !important;
  border: 1.5px solid var(--brand) !important;
}
a.btn-secondary:hover,
.btn-secondary:hover {
  background: var(--brand-50) !important;
  color: var(--brand-700) !important;
}

a.btn-ghost,
a.btn-ghost:link,
a.btn-ghost:visited,
.btn-ghost {
  background: transparent !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
}

/* ============================================================
 * MOBILE LAYOUT (max-width: 720px)
 * ============================================================ */
@media (max-width: 720px) {
  /* ----- TopBar: 情報量過多なのでモバイルでは非表示 ----- */
  .topbar { display: none !important; }

  /* ----- Header: 上段=ロゴ+アクション、下段=検索バー全幅 ----- */
  .header-inner {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px 12px !important;
    padding: 10px 12px !important;
    grid-template-columns: none !important;
    align-items: center !important;
  }
  .header-inner > .logo {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
  }
  .logo-img { height: 36px !important; flex-shrink: 0; }
  .logo-text { flex-direction: column !important; min-width: 0; }
  .logo-text .tag {
    font-size: 10px !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .header-inner .search {
    flex: 1 0 100%;
    width: 100%;
    height: 42px;
    order: 99;          /* 強制で最下段 */
  }
  /* 検索バー下の人気タグはスマホでは非表示（はみ出し防止） */
  .search-tags { display: none !important; }
  /* マイページ・カートはロゴと同じ行の右側にコンパクト配置 */
  .header-actions {
    flex-shrink: 0;
    gap: 6px !important;
    position: static !important;
  }
  .header-actions .action {
    flex-direction: column !important;
    align-items: center !important;
    font-size: 10px !important;
    padding: 4px 6px !important;
    gap: 2px !important;
  }
  .header-actions .action svg { width: 18px !important; height: 18px !important; }
  .header { padding: 0 !important; position: relative; }

  /* ----- News帯 ----- */
  .news { padding: 8px 10px !important; }
  .news-tag { font-size: 10px !important; padding: 3px 8px !important; }
  .news-item {
    font-size: 12px !important;
    gap: 8px !important;
  }
  .news-item-tip {
    width: calc(100vw - 24px) !important;
    max-width: none !important;
    left: 12px !important;
    transform: none !important;
  }
  .news-item-tip::before { display: none; }

  /* ----- Hero: 横並び → 縦積み ----- */
  .hero-inner {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 16px 12px !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .hero-card { padding: 0 !important; }
  .hero-title { font-size: 24px !important; }
  .hero-sub { font-size: 13px !important; }
  .hero-features {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .hero-feat { padding: 10px 12px !important; }
  .hero-cta {
    flex-direction: column !important;
    align-items: stretch;
  }
  .hero-cta .btn { justify-content: center; }
  .hero-image {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 10 !important;
    overflow: hidden !important;
    border-radius: var(--r-md);
    position: relative;
  }
  .hero-image img,
  .hero-image .fit {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    display: block;
  }

  /* ----- Section共通 ----- */
  .section, .section-tight { padding: 28px 0 !important; }
  .container { padding: 0 16px !important; }
  .section-title { font-size: 18px !important; }
  .section-title .en { display: block; margin-left: 0; margin-top: 4px; font-size: 10px; }

  /* ----- Pickup: カード幅縮小 ----- */
  .pickup-card { width: 140px !important; min-width: 140px; }
  .pickup-thumb { height: 140px !important; }
  .pickup-name { font-size: 11px !important; }
  .pickup-price { font-size: 13px !important; }

  /* ----- Ranking: 横並び → 縦積み ----- */
  .ranking-block {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .ranking-head h3 { font-size: 18px !important; }
  .ranking-list {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .rank-item { padding: 8px !important; }
  .rank-name { font-size: 11px !important; -webkit-line-clamp: 2; }
  .rank-spec { display: none; }
  .rank-thumb { height: 100px !important; }

  /* ----- Bizバナー: 横並び → 縦積み ----- */
  .biz-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .biz { padding: 24px 18px !important; }
  .biz h3 { font-size: 18px !important; }
  .biz-cases { flex-direction: column; align-items: flex-start; }
  .biz-cta { flex-direction: column; align-items: stretch; }
  .biz-cta .btn { justify-content: center; }
  .biz-right { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .biz-feat { padding: 12px !important; }
  .biz-feat .lbl { font-size: 12px !important; }
  .biz-feat .desc { font-size: 11px !important; }

  /* ----- LINE/SDGs: 横並び → 縦積み ----- */
  .dual-band {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .line-card, .sdgs-card { padding: 18px !important; }
  .line-card { grid-template-columns: 1fr !important; }
  .line-card .line-qr { max-width: 160px; margin: 0 auto; }
  .sdgs-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .sdgs-cert-thumb { width: 100% !important; max-width: 240px; margin: 0 auto; }

  /* ----- TrustBar: 4列 → 2列 ----- */
  .trust-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .trust-pill { padding: 10px !important; }
  .trust-pill .lbl { font-size: 12px !important; }
  .trust-pill .desc { font-size: 10.5px !important; }

  /* ----- Footer: 4カラム → 1カラム ----- */
  .footer { padding: 32px 0 24px !important; }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .footer-bottom {
    flex-direction: column !important;
    gap: 10px;
    align-items: flex-start !important;
    font-size: 11px !important;
  }
  .footer-bottom .links { flex-wrap: wrap; gap: 12px !important; }

  /* ----- カテゴリチップ（旧版が残っていた場合） ----- */
  .catchip-scroll { padding: 6px 16px !important; }
}

