/* ====== Reset & Base ====== */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --accent: #f59e0b;
  --rakuten: #bf0000;
  --yahoo: #ff0033;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #f9fafb;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --success: #10b981;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ====== Header ====== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}
.logo .accent { color: var(--accent); }
.nav { display: flex; gap: 24px; }
.nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}
.nav a:hover { color: var(--primary); text-decoration: none; }

/* ====== Hero ====== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 50%, #8b5cf6 100%);
  color: #fff;
  padding: 80px 24px 60px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hero p { font-size: 18px; opacity: 0.95; max-width: 720px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* おすすめ特集の上に置くトップ用の圧縮ヒーロー (背の高い帯にしない) */
.hero.hero-compact {
  padding: 28px 24px 24px;
}
.hero.hero-compact h1 {
  font-size: clamp(20px, 3vw, 26px);
  margin-bottom: 6px;
}
.hero.hero-compact p {
  font-size: 14px;
  margin-bottom: 14px;
  max-width: 600px;
}
.hero.hero-compact .btn { padding: 8px 18px; font-size: 13px; }
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none !important;
}
.btn-primary { background: #fff; color: var(--primary); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-outline:hover { background: #fff; color: var(--primary); }

/* ====== Container ====== */
.container { max-width: 1200px; margin: 0 auto; padding: 48px 24px; }
.section-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 32px;
}

/* ====== Tabs ====== */
.tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 20px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 24px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ====== Filter Panel ====== */
.filter-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
}
.filter-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 4px;
}
.result-count {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
}
.btn-reset {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-light);
  transition: all 0.2s;
}
.btn-reset:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
}
.filter-group input,
.filter-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
}
.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ====== Product Grid ====== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card .img-wrap {
  aspect-ratio: 4/3;
  background: #f3f4f6;
  overflow: hidden;
}
.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-cover {
  aspect-ratio: 16/7;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.card-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.18) 100%);
  pointer-events: none;
}
.cover-brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.cover-name {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.product-card .body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-card .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--primary);
  margin-bottom: 8px;
  align-self: flex-start;
}
.product-card .badge.mobile { background: #fef3c7; color: #92400e; }
.product-card h3 { font-size: 16px; margin-bottom: 4px; }
.product-card .brand { color: var(--text-light); font-size: 13px; margin-bottom: 8px; }
.product-card .rating {
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 8px;
}
.product-card .price {
  font-size: 20px;
  font-weight: 800;
  color: var(--rakuten);
  margin-bottom: 12px;
}
.product-card .key-specs {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.5;
}
.card-specs {
  margin: 0 0 12px 0;
  font-size: 12px;
  line-height: 1.5;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 4px 10px;
  color: var(--text);
}
.card-specs dt {
  font-weight: 700;
  color: var(--text-light);
  font-size: 11px;
  padding-top: 1px;
}
.card-specs dd {
  margin: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.mini-badge.curved { background: #fed7aa; color: #9a3412; }
.mini-badge.battery { background: #d1fae5; color: #065f46; }
.price-asof {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-light);
  margin-left: 6px;
  vertical-align: middle;
}
.price-unknown {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
}
.official-link {
  display: inline-block;
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--primary);
}
.official-link:hover {
  color: var(--primary-dark);
  text-decoration: none;
  border-bottom-style: solid;
}

.mini-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}
.mini-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f3f4f6;
  color: var(--text);
}
.mini-badge.hdr { background: #fce7f3; color: #be185d; }
.mini-badge.vrr { background: #dcfce7; color: #15803d; }
.mini-badge.pd  { background: #dbeafe; color: #1e40af; }

.product-card .actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.btn-affiliate {
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: #fff !important;
  text-decoration: none !important;
  transition: opacity 0.2s;
}
.btn-affiliate:hover { opacity: 0.88; }
.btn-rakuten { background: var(--rakuten); }
.btn-rakuten-item {
  background: #bf0000;
  font-size: 14px;
  position: relative;
}
.btn-rakuten-item::before {
  content: "★ ";
}
.btn-yahoo { background: var(--yahoo); }
.compare-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 8px;
  cursor: pointer;
  user-select: none;
}
.compare-check input { cursor: pointer; }

/* ====== Ranking ====== */
.ranking-section { margin-bottom: 56px; }
.ranking-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.rank-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
}
.rank-card .rank {
  font-size: 28px;
  font-weight: 900;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.rank-card:nth-child(1) .rank { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank-card:nth-child(2) .rank { background: linear-gradient(135deg, #94a3b8, #64748b); }
.rank-card:nth-child(3) .rank { background: linear-gradient(135deg, #d97706, #b45309); }
.rank-card .info { flex: 1; min-width: 0; }
.rank-card h4 { font-size: 15px; margin-bottom: 4px; }
.rank-card .rank-price { color: var(--rakuten); font-weight: 700; font-size: 14px; }

/* ====== Floating Compare Bar ====== */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 2px solid var(--primary);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  padding: 12px 24px;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s;
}
.compare-bar.show { transform: translateY(0); }
.compare-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.compare-items {
  display: flex;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
}
.compare-item {
  background: #eef2ff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.compare-item .remove {
  cursor: pointer;
  color: var(--text-light);
  font-weight: bold;
}
.compare-bar .btn { padding: 10px 20px; font-size: 14px; }
.btn-compare {
  background: var(--primary);
  color: #fff;
}
.btn-compare:disabled { background: #cbd5e1; cursor: not-allowed; }
.btn-clear {
  background: transparent;
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
  border: none;
}

/* ====== Compare Table ====== */
.compare-table-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  margin-bottom: 24px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare-table th {
  background: #f9fafb;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-light);
  width: 180px;
  position: sticky;
  left: 0;
}
.compare-table td { font-size: 13px; line-height: 1.5; }
.compare-table tr.section-header th {
  position: static;
}
.compare-table .product-head {
  text-align: center;
  padding: 20px 16px;
}
.compare-table .product-head img {
  width: 120px;
  margin: 0 auto 8px;
  border-radius: 8px;
}
.compare-table .product-head h3 { font-size: 15px; margin-bottom: 4px; }
.compare-table .product-head .price {
  color: var(--rakuten);
  font-weight: 800;
  font-size: 18px;
}
.compare-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.compare-empty {
  background: #fff;
  border-radius: var(--radius);
  padding: 60px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.compare-empty p { color: var(--text-light); margin-bottom: 16px; }

/* ====== Pros / Cons ====== */
.proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.proscons ul { list-style: none; font-size: 13px; }
.proscons ul li { padding: 3px 0; }
.proscons .pros li::before { content: "○ "; color: var(--success); font-weight: bold; }
.proscons .cons li::before { content: "△ "; color: var(--text-light); font-weight: bold; }

/* ====== Footer ====== */
.site-footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 40px 24px 24px;
  text-align: center;
  margin-top: 80px;
}
.site-footer p { font-size: 14px; margin-bottom: 8px; }
.site-footer .disclaimer {
  font-size: 12px;
  color: #9ca3af;
  max-width: 700px;
  margin: 12px auto 0;
}
.site-footer .footer-nav {
  max-width: 900px;
  margin: 0 auto 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #374151;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  font-size: 13px;
}
.site-footer .footer-nav a {
  color: #d1d5db;
  text-decoration: none;
}
.site-footer .footer-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ====== Legal pages (about / privacy / disclaimer / terms / shotorihiki / contact) ====== */
.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 44px 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Page title block */
.legal-page h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.legal-page .meta {
  color: var(--text-light);
  font-size: 13px;
  margin: 0 0 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* Section headings — make hierarchy obvious */
.legal-page h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 48px 0 18px;
  padding: 12px 0 12px 16px;
  border-left: 4px solid var(--primary);
  background: linear-gradient(to right, rgba(37, 99, 235, 0.04), transparent 80%);
  line-height: 1.4;
}
.legal-page h2:first-of-type { margin-top: 8px; }

.legal-page h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 32px 0 12px;
  padding-left: 14px;
  color: var(--text);
  border-left: 3px solid var(--border);
  line-height: 1.5;
}

/* Paragraphs — generous breathing room */
.legal-page p {
  margin: 0 0 18px;
  line-height: 1.9;
  font-size: 15px;
  color: #374151;
}
.legal-page p + p { margin-top: -4px; }
.legal-page h2 + p,
.legal-page h3 + p { margin-top: 0; }

/* Lists — clear indentation and item spacing */
.legal-page ul,
.legal-page ol {
  margin: 6px 0 22px;
  padding-left: 28px;
}
.legal-page li {
  margin-bottom: 10px;
  line-height: 1.85;
  font-size: 15px;
  color: #374151;
  padding-left: 4px;
}
.legal-page li::marker { color: var(--primary); }
.legal-page li > strong:first-child {
  color: var(--text);
  margin-right: 4px;
}

/* Tables (shotorihiki) */
.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.legal-page table th,
.legal-page table td {
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  line-height: 1.75;
}
.legal-page table tr:last-child th,
.legal-page table tr:last-child td { border-bottom: none; }
.legal-page table th {
  background: #f9fafb;
  font-weight: 700;
  width: 32%;
  white-space: nowrap;
  color: var(--text);
  border-right: 1px solid var(--border);
}
.legal-page table td { color: #374151; }

/* Links */
.legal-page a { color: var(--primary); }
.legal-page a:hover { text-decoration: underline; }

/* Highlighted email box */
.legal-page .email {
  display: inline-block;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  margin: 4px 0 12px;
  letter-spacing: 0.02em;
}
.legal-page .email:hover { background: #dbeafe; text-decoration: none; }

/* Strong emphasis */
.legal-page strong { color: var(--text); font-weight: 700; }

/* Mobile adjustments */
@media (max-width: 700px) {
  .legal-page {
    padding: 24px 20px 16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }
  .legal-page h1 { font-size: 22px; }
  .legal-page h2 {
    font-size: 17px;
    margin: 36px 0 14px;
    padding: 10px 0 10px 12px;
  }
  .legal-page h3 { font-size: 15px; margin: 24px 0 10px; }
  .legal-page p, .legal-page li { font-size: 14.5px; }
  .legal-page ul, .legal-page ol { padding-left: 22px; }
  .legal-page table { font-size: 13px; }
  .legal-page table th,
  .legal-page table td { padding: 10px 12px; }
  .legal-page table th { width: 40%; white-space: normal; }
}

/* ====== Empty state ====== */
.empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  color: var(--text-light);
  background: #fff;
  border-radius: var(--radius);
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 12px; }
  .nav { gap: 16px; }
  .hero { padding: 60px 20px 40px; }
  .container { padding: 32px 16px; }
  .filter-panel { grid-template-columns: 1fr 1fr; }
  .compare-bar-inner { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .filter-panel { grid-template-columns: 1fr; }
  .proscons { grid-template-columns: 1fr; }
}


/* product-image placeholder */
.product-card img[src=""], .product-card img:not([src]) {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  display: block;
  width: 100%;
  min-height: 120px;
  position: relative;
}
.product-card img[src=""]::after,
.product-card img:not([src])::after {
  content: "📷 No Image";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #9ca3af;
  font-size: 12px;
}



/* 商品カードの楽天画像 (詳細度UP) */
.product-card .card-cover.has-image {
  padding: 0 !important;
  background: #fff !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.product-card .card-cover.has-image .card-cover-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #fff !important;
  display: block !important;
  padding: 8px;
  box-sizing: border-box;
}


/* 商品カード画像付き時のブランド+モデル名オーバーレイ */
.product-card .card-cover.has-image {
  position: relative;
}
.product-card .card-cover.has-image .card-cover-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0) 100%);
  color: #fff;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}
.product-card .card-cover.has-image .card-cover-overlay .cover-brand {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 2px;
  position: static;
}
.product-card .card-cover.has-image .card-cover-overlay .cover-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  position: static;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ====== トップページ おすすめ特集枠 (.recommend-section) ====== */
.recommend-section {
  margin-top: 40px;
  margin-bottom: 64px;
}
.recommend-section .section-title { margin-bottom: 4px; }
.recommend-section .section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 28px;
  font-size: 15px;
}
.recommend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
}
.recommend-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  text-decoration: none !important;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
}
.recommend-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  text-decoration: none !important;
}
.recommend-card .badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 999px;
  margin-bottom: 12px;
  width: max-content;
}
.recommend-card .badge.series { background: var(--accent); }
.recommend-card h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text);
}
.recommend-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 14px;
  flex: 1;
}
.recommend-card .cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}
.recommend-card .cta::after { content: " →"; }

/* 集合知シリーズカードだけは div + 内部に複数リンク (a の入れ子回避) */
.recommend-card-series {
  cursor: default;
}
.recommend-card-series:hover {
  transform: none;
  box-shadow: var(--shadow);
  border-color: var(--border);
}
.recommend-card-series h3 a {
  color: var(--text);
  text-decoration: none;
}
.recommend-card-series h3 a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.recommend-card-series p a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.35);
  text-underline-offset: 2px;
}
.recommend-card-series p a:hover {
  text-decoration-color: var(--primary);
  color: var(--primary-dark);
}
.recommend-card-series .cta {
  display: inline-block;
  text-decoration: none;
}
.recommend-card-series .cta:hover {
  text-decoration: underline;
}

/* ====== テーマ記事ページ ====== */
.theme-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; opacity: 0.5; }

.theme-hero {
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.theme-hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 12px;
  text-transform: uppercase;
}
.theme-hero h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.theme-hero .lead {
  font-size: 16px;
  color: var(--text);
  line-height: 1.85;
}
.theme-hero .meta {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 16px;
}

.theme-article h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 40px;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}
.theme-article h3 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
}
.theme-article p {
  margin-bottom: 14px;
  line-height: 1.95;
}
.theme-article ul, .theme-article ol {
  margin: 8px 0 18px 24px;
  line-height: 1.85;
}
.theme-article li { margin-bottom: 6px; }
.theme-article blockquote {
  margin: 16px 0;
  padding: 14px 18px;
  background: #f3f4f6;
  border-left: 4px solid var(--text-light);
  border-radius: 6px;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.75;
}

/* テーマ機種カード */
.theme-product-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 22px 0 32px;
}
.theme-product-card.product-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.theme-product-card .tpc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.theme-product-card .cover-brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
}
.theme-product-card .cover-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text);
}
.theme-product-card .cover-name-link {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s;
}
.theme-product-card .cover-name-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}
.theme-product-card .tpc-spec {
  font-size: 12.5px;
  color: var(--text-light);
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
  white-space: nowrap;
}
.theme-product-card .tpc-reco {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text);
  margin: 6px 0 14px;
}
.theme-product-card .tpc-price {
  display: inline-block;
  font-size: 13px;
  color: var(--text-light);
  margin-right: 12px;
}
.theme-product-card .tpc-price strong {
  color: var(--rakuten);
  font-size: 16px;
  font-weight: 700;
  margin: 0 2px;
}
.theme-product-card .tpc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.theme-product-card .tpc-actions .btn-affiliate {
  flex: 0 1 auto;
  min-width: 160px;
}
.theme-product-card .tpc-detail {
  font-size: 12.5px;
  color: var(--text-light);
  text-decoration: underline;
  margin-left: auto;
}
.theme-product-card .tpc-detail:hover { color: var(--primary); }

/* シリーズ目次・関連特集 */
.theme-series-toc {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 28px 0;
}
.theme-series-toc h3 {
  font-size: 16px;
  color: #92400e;
  margin: 0 0 12px;
}
.theme-series-toc ol {
  margin: 0 0 0 22px;
  padding: 0;
}
.theme-series-toc li {
  margin-bottom: 8px;
  font-size: 14.5px;
}
.theme-related {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.theme-related h3 {
  font-size: 16px;
  margin-bottom: 14px;
  color: var(--text);
}
.theme-related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.theme-related-card {
  display: block;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.theme-related-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  text-decoration: none !important;
}
.theme-related-card .small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-light);
  margin-top: 4px;
}

@media (max-width: 560px) {
  .theme-product-card .tpc-spec { margin-left: 0; }
  .theme-product-card .tpc-actions .btn-affiliate { width: 100%; min-width: 0; }
  .theme-product-card .tpc-detail { margin-left: 0; margin-top: 4px; }
}

/* テーマカード - ステータス表示 (発売予定 / 流通薄) */
.tpc-status {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 4px;
  margin-left: 6px;
}
.tpc-status-preorder {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.tpc-status-note {
  font-size: 12.5px;
  color: var(--text-light);
  background: #f3f4f6;
  border-left: 3px solid var(--text-light);
  padding: 8px 12px;
  margin: 8px 0 12px;
  border-radius: 4px;
  line-height: 1.6;
}
.btn-official {
  background: #1f2937 !important;
}
.btn-official:hover { background: #111827 !important; }

/* 代替品ブロック */
.tpc-alt {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.tpc-alt-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.tpc-alt-card {
  background: #f9fafb;
  border-radius: 8px;
  padding: 14px 16px;
}
.tpc-alt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 6px;
}
.tpc-alt-head .cover-brand {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
}
.tpc-alt-head .cover-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.tpc-alt-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  margin: 4px 0 8px;
}
.tpc-alt-meta { margin-bottom: 8px; }

/* 本文中の機種名リンク (アフィリエイト) */
.text-product-link {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(37, 99, 235, 0.45);
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.15s, text-decoration-style 0.15s;
}
.text-product-link:hover {
  color: var(--rakuten);
  text-decoration-style: solid;
  text-decoration-color: var(--rakuten);
}
