:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-body: #1e293b;
  --text-muted: #475569;
  --border-light: #e2e8f0;
  --border-strong: #cbd5e1;
  --brand-primary: #1d4ed8;
  --brand-dark: #0f172a;
  --brand-soft: #eff6ff;
  --amazon-orange: #FF9900;
  --amazon-orange-hover: #e68a00;
  --rakuten-crimson: #BF0000;
  --rakuten-crimson-hover: #9e0000;
  --pros-bg: #f0fdf4;
  --pros-border: #86efac;
  --pros-text: #166534;
  --cons-bg: #fffbeb;
  --cons-border: #fcd34d;
  --cons-text: #92400e;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius-md: 10px;
  --radius-lg: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body.site-body {
  margin: 0;
  padding: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-dark);
  color: #ffffff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.main-container {
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

.article-container {
  max-width: 860px;
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

/* Header */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-main);
  text-decoration: none;
}

.brand-logo:hover {
  text-decoration: none;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #ffffff;
  font-size: 1.05rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text-main);
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-body);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background-color: var(--bg-subtle);
  color: var(--brand-primary);
  text-decoration: none;
}

/* Hero Banner */
.hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 3rem 0 2.75rem;
}

.hero-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #93c5fd;
  margin: 0 0 0.5rem;
}

.hero-title {
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 0.9rem;
}

.hero-lead {
  max-width: 780px;
  font-size: 0.98rem;
  color: #e2e8f0;
  line-height: 1.75;
}

.hero-lead p {
  margin: 0;
}

/* PR Disclosure Banner (Stealth Marketing Law / Keihinhyojihou Compliance) */
.pr-disclosure-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background-color: #f8fafc;
  border: 1px solid var(--border-strong);
  border-left: 4px solid #475569;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.pr-badge {
  display: inline-block;
  flex-shrink: 0;
  background-color: #334155;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* Section & Archive Headers */
.section-header,
.archive-header {
  margin-bottom: 1.5rem;
}

.section-title,
.archive-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brand-primary);
}

.archive-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-primary);
  margin: 0 0 0.25rem;
}

/* Post Card Grid */
.post-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.post-card-image-link {
  display: block;
  aspect-ratio: 1200 / 630;
  background: var(--bg-subtle);
  overflow: hidden;
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
}

.post-card-body {
  padding: 1.15rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.post-card-category {
  background: var(--brand-soft);
  color: var(--brand-primary);
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.post-card-title {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 0.6rem;
}

.post-card-title a {
  color: var(--text-main);
}

.post-card-title a:hover {
  color: var(--brand-primary);
}

.post-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  flex-grow: 1;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-chip {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.12rem 0.48rem;
  border-radius: 4px;
}

/* Breadcrumb */
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.breadcrumb li + li::before {
  content: ">";
  margin-right: 0.45rem;
  color: #94a3b8;
}

/* Single Article */
.single-article {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.category-badge {
  background: var(--brand-soft);
  color: var(--brand-primary);
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
}

.article-title {
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  font-weight: 800;
  line-height: 1.45;
  color: var(--text-main);
  margin: 0 0 1rem;
}

.article-lead {
  font-size: 0.98rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  margin: 0 0 1.25rem;
}

.article-eyecatch {
  margin: 0 0 1.25rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag-link {
  font-size: 0.8rem;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

/* Table of Contents */
.toc-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.35rem;
  margin: 1.5rem 0 2rem;
}

.toc-title {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.toc-box nav ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  line-height: 1.75;
}

/* Article Typography */
.article-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%);
  border-left: 5px solid var(--brand-primary);
  padding: 0.6rem 0.95rem;
  margin: 2.4rem 0 1.1rem;
  border-radius: 0 6px 6px 0;
}

.article-body h3 {
  font-size: 1.14rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.35rem;
  margin: 1.9rem 0 0.85rem;
}

.article-body p {
  margin: 0 0 1.15rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

/* Responsive Comparison Tables */
.comparison-table-section {
  margin: 1.75rem 0;
}

.comparison-table-caption {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.comparison-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 1.5rem 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table-wrapper table {
  margin: 0;
  display: table;
  min-width: 580px;
}

.article-body th,
.article-body td {
  border: 1px solid var(--border-light);
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background-color: #1e293b;
  color: #ffffff;
  font-weight: 700;
  white-space: nowrap;
}

.article-body tr:nth-child(even) td {
  background-color: #f8fafc;
}

/* Staged Affiliate Box & Buttons (CRITICAL Phase 1 & Phase 2 Layout) */
.affiliate-box {
  background: #ffffff;
  border: 2px solid #dbeafe;
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  margin: 1.85rem 0;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.06);
}

.affiliate-box-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.affiliate-title-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.affiliate-pick-badge {
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
}

.affiliate-product-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.affiliate-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-pill {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.price-pill {
  background: #f1f5f9;
  color: #0f172a;
}

.rating-pill {
  background: #fef3c7;
  color: #92400e;
}

.affiliate-pros-cons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.pros-card,
.cons-card {
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
  font-size: 0.88rem;
}

.pros-card {
  background: var(--pros-bg);
  border: 1px solid var(--pros-border);
}

.cons-card {
  background: var(--cons-bg);
  border: 1px solid var(--cons-border);
}

.pc-heading {
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.pros-heading {
  color: var(--pros-text);
}

.cons-heading {
  color: var(--cons-text);
}

.pc-list {
  margin: 0;
  padding-left: 1.15rem;
}

.pc-list li {
  margin-bottom: 0.2rem;
}

/* Affiliate Button Grids */
.affiliate-btn-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

/* Phase 1: Rakuten Only (clean centered full-width button, zero empty slot) */
.affiliate-btn-grid.single-button {
  grid-template-columns: minmax(0, 460px);
  justify-content: center;
}

/* Phase 2: Amazon + Rakuten Side-by-Side */
.affiliate-btn-grid.two-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.affiliate-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

.affiliate-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.btn-amazon {
  background-color: var(--amazon-orange);
  color: #111827;
  border: 1px solid #d97706;
}

.btn-amazon:hover {
  background-color: var(--amazon-orange-hover);
  color: #111827;
}

.btn-rakuten {
  background-color: var(--rakuten-crimson);
  color: #ffffff;
  border: 1px solid #991b1b;
}

.btn-rakuten:hover {
  background-color: var(--rakuten-crimson-hover);
  color: #ffffff;
}

.btn-main-text {
  font-size: 1.02rem;
  line-height: 1.3;
}

.btn-sub-text {
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0.92;
  margin-top: 0.15rem;
}

.affiliate-price-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0.65rem 0 0;
}

/* Article Footer & Related */
.article-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.article-policy-note {
  font-size: 0.84rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
}

.related-section {
  margin-top: 2.75rem;
}

.empty-state-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* Pagination */
.pagination-wrap {
  margin-top: 2.25rem;
  display: flex;
  justify-content: center;
}

.pagination {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.page-item a,
.page-item span {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-body);
}

.page-item.active span {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  font-weight: 700;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 3rem 0 1.75rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #1e293b;
}

.footer-heading {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.85rem;
}

.footer-desc {
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.footer-disclosure {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.65;
  margin: 0;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.55rem;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: #94a3b8;
}

@media (max-width: 720px) {
  .affiliate-btn-grid.two-buttons {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
