/* ============================================================
   おとなのナビ - 静的コンテンツページ専用スタイル
   kabuyohou.jp の実績CSSをベースに
   ブランドカラーをパープル系に適応（アダルトジャンル用）

   v1: 初期実装（kabuyohou static-pages.css v3相当）
   ============================================================ */

/* ── ページ基本レイアウト ── */
.static-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 16px 100px;
}

.page-updated {
  font-size: 0.8rem;
  color: #888;
  margin: -8px 0 24px;
}
.author-tag {
  background: #f5f3ff;
  color: #7c3aed;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* ── リード文 ── */
.lead-text {
  background: #f8f9fa;
  border-left: 4px solid #7c3aed;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 32px;
  line-height: 1.9;
}

/* ── ランキングカード ── */
.ranking-section { margin-bottom: 40px; }

.ranking-note {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 16px;
}

.ranking-cards { display: flex; flex-direction: column; gap: 20px; }

.ranking-card {
  border: 2px solid #e8ecf0;
  border-radius: 12px;
  padding: 20px;
  position: relative;
  background: #fff;
  contain: layout style;
}
.ranking-card.rank-1 { border-color: #f5a623; box-shadow: 0 2px 12px rgba(245,166,35,0.15); }
.ranking-card.rank-2 { border-color: #7c3aed; }
.ranking-card.rank-3 { border-color: #a78bfa; }

.rank-badge {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.ranking-name {
  font-size: 1.2rem;
  margin: 0 0 10px;
  color: #1a1a2e;
}

.ranking-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.stat {
  background: #f5f3ff;
  color: #7c3aed;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
}

.ranking-point {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 12px;
}

/* ── ななコメントボックス ── */
.miku-comment-box {
  background: #faf5ff;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.miku-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7c3aed;
  display: block;
  margin-bottom: 4px;
}
.miku-comment-box p { font-size: 0.87rem; margin: 0; line-height: 1.7; }

/* ── CTAボタン ── */
.cta-btn {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: #e67700;
  color: #fff;
  transition: background 0.2s;
}
.cta-btn:hover { background: #d46200; }
.cta-btn.cta-disabled {
  background: #adb5bd;
  cursor: default;
  pointer-events: none;
}
.cta-btn.cta-disabled::after {
  content: "（準備中）";
  font-size: 0.75rem;
  margin-left: 4px;
}

/* ── 比較表 ── */
.comparison-section { margin: 40px 0; }

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid #e8ecf0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.comparison-table th {
  background: #2d1b69;
  color: #fff;
  padding: 12px 10px;
  text-align: center;
  white-space: nowrap;
}
.comparison-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
  vertical-align: middle;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: #f8f9fa; }
.sec-name { font-weight: 700; text-align: left; white-space: nowrap; }

.table-cta {
  background: #7c3aed;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
  white-space: nowrap;
}
.table-cta.cta-disabled {
  background: #adb5bd;
  pointer-events: none;
}
.table-note { font-size: 0.75rem; color: #888; margin-top: 8px; }

/* ── なな結論コメント ── */
.miku-conclusion {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #f5f3ff;
  border-radius: 12px;
  padding: 20px;
  margin: 32px 0;
}
.miku-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: #f5f3ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #7c3aed;
}
.miku-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}
.miku-conclusion p { margin: 0; line-height: 1.8; font-size: 0.93rem; }

/* ── FAQセクション ── */
.faq-section { margin: 32px 0; }
.faq-section h2 { margin-bottom: 16px; }

.faq-item {
  border: 1px solid #e8ecf0;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  contain: layout style;
}
.faq-q {
  background: #f8f9fa;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #1a1a2e;
}
.faq-a {
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.8;
  color: #444;
}

/* ── 免責 ── */
.disclaimer {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  font-size: 0.75rem;
  color: #888;
  line-height: 1.7;
  margin-top: 32px;
}

/* ── アフィリエイトバナー ── */
.affiliate-banner {
  text-align: center;
  margin: 12px 0;
}

/* ── レスポンシブ ── */
@media (min-width: 768px) {
  .static-page { padding: 24px 24px 40px; }

  .ranking-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .ranking-stats { gap: 6px; }
  .stat { font-size: 0.72rem; }
  .miku-conclusion { flex-direction: column; }
  .comparison-table th,
  .comparison-table td { padding: 8px 6px; font-size: 0.78rem; }
}

/* ============================================================
   v2: Light theme, hamburger nav, header
   ============================================================ */

/* ── Body override for static pages ── */
body.static-body {
  background-color: #ffffff;
  color: #1a1a2e;
}

/* ── Header: light theme override ── */
body.static-body .site-header {
  background: #ffffff;
  border-bottom: 1px solid #e8ecf0;
  margin-bottom: 0;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

body.static-body .site-logo {
  color: #1a1a2e;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}

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

body.static-body .header-nav a {
  color: #444;
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
  padding: 4px 0;
}
body.static-body .header-nav a:hover {
  color: #7c3aed;
}
body.static-body .header-nav a.active {
  color: #7c3aed;
  font-weight: 700;
  border-bottom: 2px solid #7c3aed;
  padding-bottom: 2px;
}

/* ── Nav: horizontal on desktop ── */
body.static-body .header-nav {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 1;
  min-width: 0;
}
body.static-body .header-nav::-webkit-scrollbar {
  display: none;
}

/* ── Hamburger toggle (CSS-only) ── */
.hamburger-toggle {
  display: none;
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.hamburger-btn {
  display: none;
  cursor: pointer;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  position: relative;
  z-index: 60;
}
.hamburger-btn span,
.hamburger-btn span::before,
.hamburger-btn span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: #1a1a2e;
  position: absolute;
  left: 8px;
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger-btn span       { top: 17px; }
.hamburger-btn span::before { content: ''; top: -6px; }
.hamburger-btn span::after  { content: ''; top: 6px; }

@media (max-width: 767px) {
  .hamburger-btn {
    display: block;
  }

  body.static-body .header-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: -1.5rem;
    right: -1.5rem;
    background: #ffffff;
    flex-direction: column;
    padding: 8px 20px 16px;
    border-bottom: 1px solid #e8ecf0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    gap: 0;
    overflow-x: visible;
  }

  body.static-body .header-nav a {
    padding: 11px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    min-height: 44px; /* Apple HIG: タップターゲット最小44px */
    display: flex;
    align-items: center;
  }
  body.static-body .header-nav a:last-child {
    border-bottom: none;
  }

  /* Toggle open state via checkbox */
  .hamburger-toggle:checked ~ .hamburger-btn ~ .header-nav,
  .hamburger-toggle:checked + .hamburger-btn + .header-nav {
    display: flex;
  }
  .hamburger-toggle:checked ~ .hamburger-btn span,
  .hamburger-toggle:checked + .hamburger-btn span {
    background: transparent;
  }
  .hamburger-toggle:checked ~ .hamburger-btn span::before,
  .hamburger-toggle:checked + .hamburger-btn span::before {
    top: 0;
    transform: rotate(45deg);
  }
  .hamburger-toggle:checked ~ .hamburger-btn span::after,
  .hamburger-toggle:checked + .hamburger-btn span::after {
    top: 0;
    transform: rotate(-45deg);
  }
}

/* ── Footer light override ── */
body.static-body .site-footer {
  background: #f8f9fa;
  border-top: 1px solid #e8ecf0;
  color: #888;
  padding: 1.5rem 1.5rem;
}
body.static-body .site-footer a {
  color: #555;
}
body.static-body .site-footer a:hover {
  color: #1a1a2e;
}
body.static-body .footer-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}
body.static-body .footer-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
body.static-body .footer-nav a {
  font-size: 0.82rem;
  color: #555;
  text-decoration: none;
}
body.static-body .footer-nav a:hover {
  color: #1a1a2e;
}

/* ── Breadcrumb light override ── */
body.static-body .breadcrumb {
  color: #888;
  padding: 8px 0 12px;
}
body.static-body .breadcrumb a {
  color: #7c3aed;
  text-decoration: none;
}
body.static-body .breadcrumb ol {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  font-size: 0.78rem;
}
body.static-body .breadcrumb li + li::before {
  content: '›';
  margin-right: 4px;
  color: #bbb;
}

/* ── TOC styling ── */
.toc {
  background: #f8f9fa;
  border: 1px solid #e8ecf0;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 32px;
}
.toc-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1a1a2e;
  border: none;
  padding: 0;
}
.toc ol {
  padding-left: 1.4rem;
  margin: 0;
}
.toc li {
  margin-bottom: 4px;
  font-size: 0.88rem;
}
.toc a {
  color: #7c3aed;
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

/* ── Static page content typography (light theme) ── */
body.static-body .static-page h1 {
  color: #1a1a2e;
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: 8px;
}
body.static-body .static-page h2 {
  color: #1a1a2e;
  font-size: 1.15rem;
  border-bottom: 2px solid #7c3aed;
  padding-bottom: 8px;
  margin: 32px 0 16px;
}
body.static-body .static-page section p {
  color: #444;
  line-height: 1.9;
  font-size: 0.93rem;
}

/* ── Related articles ── */
.related-articles {
  margin: 32px 0;
}
.related-articles h2 {
  font-size: 1rem !important;
  margin-bottom: 8px !important;
}
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.related-list li {
  border-bottom: 1px solid #f0f0f0;
}
.related-list a {
  display: block;
  padding: 11px 4px;
  color: #7c3aed;
  text-decoration: none;
  font-size: 0.9rem;
}
.related-list a:hover {
  color: #6d28d9;
}

/* ============================================================
   v3: MobileUX強化 — CTA差別化・セーフエリア・テーブル改善
   ============================================================ */

/* ── 1位CTA: オレンジグラデーション + シャイン（CV実績ベース）── */
.ranking-card.rank-1 .cta-btn {
  background: linear-gradient(135deg, #e67700, #f59f00);
  box-shadow: 0 4px 16px rgba(230,119,0,0.35);
  position: relative;
  overflow: hidden;
}
.ranking-card.rank-1 .cta-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: rgba(255,255,255,0.15);
  transform: rotate(25deg);
  animation: btn-shine 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes btn-shine {
  0%, 75%, 100% { left: -60%; }
  85%           { left: 130%; }
}

/* ── 2〜3位CTA: パープル ── */
.ranking-card.rank-2 .cta-btn,
.ranking-card.rank-3 .cta-btn {
  background: #7c3aed;
}
.ranking-card.rank-2 .cta-btn:hover { background: #6d28d9; }
.ranking-card.rank-3 .cta-btn:hover { background: #6d28d9; }

/* ── 固定フッターCTA: safe-area対応 ── */
@media (max-width: 768px) {
  body.static-body {
    padding-bottom: max(80px, calc(60px + env(safe-area-inset-bottom)));
  }

  body.static-body .mobile-sticky-cta {
    background: rgba(255,255,255,0.97);
    border-top: 1px solid #e8ecf0;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }

  body.static-body .mobile-cta-btn {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border-radius: 10px;
    font-size: 1rem;
    padding: 14px 16px;
    min-height: 52px;
    animation: cta-pulse 3s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
  }
  body.static-body .mobile-cta-btn:active {
    transform: scale(0.97);
    opacity: 0.9;
  }

  @keyframes cta-pulse {
    0%, 90%, 100% { box-shadow: 0 2px 12px rgba(124,58,237,0.3); }
    95%           { box-shadow: 0 2px 20px rgba(124,58,237,0.55); }
  }
}

/* ── 比較表: スクロールヒント + sticky左列 ── */
.table-scroll-hint {
  display: none;
  font-size: 0.72rem;
  color: #888;
  text-align: right;
  margin-bottom: 4px;
}

@media (max-width: 767px) {
  .table-scroll-hint {
    display: block;
  }

  .table-wrapper {
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
  }
  .table-wrapper::-webkit-scrollbar { display: none; }

  .table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
    pointer-events: none;
    border-radius: 0 8px 8px 0;
  }

  .comparison-table {
    min-width: 520px;
  }

  .comparison-table .sec-name {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
    border-right: 1px solid #e8ecf0;
  }
  .comparison-table thead th:first-child {
    position: sticky;
    left: 0;
    background: #2d1b69;
    z-index: 2;
  }

  /* CTA全幅・16px以上でiOSズーム防止 */
  .ranking-card .cta-btn {
    font-size: 1rem;
    padding: 15px 12px;
    width: 100%;
    display: block;
  }
}

/* ── Ad notice badge (記事内に広告を含みます) ── */
.ad-notice {
  display: inline-block;
  font-size: 0.72rem;
  color: #888;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  padding: 3px 10px;
  border-radius: 4px;
  margin: 8px 0 12px;
  letter-spacing: 0.02em;
}

/* ── 比較表 評価記号・ハイライト ── */
.grade-s { color: #16a34a; font-weight: 700; font-size: 1.1rem; }
.grade-a { color: #2563eb; font-weight: 700; font-size: 1.1rem; }
.grade-b { color: #d97706; font-weight: 700; font-size: 1.1rem; }
.grade-c { color: #dc2626; font-weight: 700; font-size: 1.1rem; }
.highlight-row { background: #fef9c3; }
.highlight-row:hover { background: #fef08a; }
