/* マチアプのミカタ - 共通スタイル */
:root {
  --accent: #d94f70;
  --accent-dark: #b83a5a;
  --accent-light: #fdf0f3;
  --text: #2f3a4a;
  --text-sub: #5b6a7d;
  --border: #e5dde0;
  --bg: #fffcfd;
  --card-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
}

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

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ヘッダー */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.site-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--accent-dark);
  text-decoration: none;
}

.site-title small {
  display: block;
  font-size: 0.72rem;
  font-weight: normal;
  color: var(--text-sub);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ヒーロー */
.hero {
  background: var(--accent-light);
  padding: 48px 0 40px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 2rem;
  line-height: 1.4;
}

.hero p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--text-sub);
}

/* セクション */
.section {
  padding: 36px 0 8px;
}

.section h2 {
  font-size: 1.35rem;
  border-left: 5px solid var(--accent);
  padding-left: 12px;
  margin: 0 0 16px;
}

.section h3 {
  font-size: 1.1rem;
  margin: 24px 0 8px;
}

/* カード */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.card h3 {
  margin-top: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.policy-list {
  margin: 0;
  padding-left: 1.2em;
}

.policy-list li {
  margin-bottom: 8px;
}

/* PR表記ボックス */
.pr-note {
  background: #fff8e6;
  border: 1px solid #e8d48b;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin: 20px 0;
}

.pr-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: bold;
  border-radius: 4px;
  padding: 1px 8px;
  margin-right: 8px;
  vertical-align: middle;
}

/* 比較表 */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0 24px;
}

table.compare {
  border-collapse: collapse;
  width: 100%;
  min-width: 760px;
  background: var(--card-bg);
  font-size: 0.92rem;
}

table.compare th,
table.compare td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

table.compare thead th {
  background: var(--accent-light);
  text-align: center;
  font-size: 1rem;
}

table.compare tbody th {
  background: #faf5f6;
  width: 130px;
  white-space: nowrap;
}

table.compare td .yen {
  font-weight: bold;
}

/* 目的別おすすめ */
.purpose {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.purpose h3 {
  margin: 0 0 6px;
}

.purpose .app-name {
  color: var(--accent-dark);
  font-weight: bold;
  font-size: 1.05rem;
}

.purpose p {
  margin: 6px 0;
}

.basis {
  font-size: 0.88rem;
  color: var(--text-sub);
}

/* 出典 */
.sources {
  font-size: 0.88rem;
  color: var(--text-sub);
}

.sources li {
  margin-bottom: 6px;
  word-break: break-all;
}

/* 記事メタ情報 */
.article-meta {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.note {
  font-size: 0.9rem;
  color: var(--text-sub);
}

/* フッター */
.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  padding: 24px 0 32px;
  font-size: 0.9rem;
  color: var(--text-sub);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.site-footer a {
  color: var(--text-sub);
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.55rem;
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* サービス名・アイコンのリンク（公式サイト／広告リンク） */
a.app-link {
  color: inherit;
  text-decoration: none;
}

a.app-link:hover {
  text-decoration: underline;
}

/* サービスアイコン・記事画像 */
.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  vertical-align: -14px;
  margin-right: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.app-icon-sm {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: block;
  margin: 0 auto 6px;
  border: 1px solid var(--border);
  background: #fff;
}

.card-thumb {
  display: block;
  width: calc(100% + 48px);
  max-width: none;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: -20px -24px 14px;
  border-radius: 10px 10px 0 0;
}

.eyecatch {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 6px 0 18px;
  border: 1px solid var(--border);
}

@media (max-width: 600px) {
  .app-icon {
    width: 40px;
    height: 40px;
    vertical-align: -11px;
  }
}

/* 記事タイトル（h1）: .section h2 と同じ見た目にする */
.section h1 {
  font-size: 1.35rem;
  border-left: 5px solid var(--accent);
  padding-left: 12px;
  margin: 0 0 16px;
  line-height: 1.5;
}

.section h1 .app-icon {
  vertical-align: -14px;
}

/* CTAボタン（提携サービスの公式サイト導線） */
.cta-wrap {
  margin: 16px 0 4px;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(217, 79, 112, 0.25);
}

.cta-btn:hover {
  background: var(--accent-dark);
}

/* CTAボタン下の補足文（クリックの不安を下げるマイクロコピー） */
.cta-sub {
  display: block;
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-top: 6px;
}

/* CTA直下の手続きガイド (登録後の年齢確認など、離脱・否認を防ぐ案内) */
.cta-guide {
  background: var(--card-bg);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  margin: 8px 0 16px;
  font-size: 0.9rem;
  color: var(--text-sub);
}

/* 記事末尾の診断導線ボックス */
.shindan-box {
  background: linear-gradient(135deg, #d94f70, #b83a5a);
  border-radius: 14px;
  padding: 26px 24px;
  color: #fff;
  text-align: center;
}

.shindan-box h2 {
  border: none;
  padding: 0;
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.3rem;
}

.shindan-box p {
  margin: 0 auto 18px;
  max-width: 620px;
}

.shindan-box .shindan-btn {
  display: inline-block;
  background: #fff;
  color: #b83a5a;
  font-weight: bold;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 32px;
  font-size: 1.02rem;
}

/* 目次 */
.toc-list {
  margin: 0;
  padding-left: 1.2em;
}

.toc-list li {
  margin-bottom: 6px;
}

/* 口コミページ等の節末リンク */
.section-links {
  font-size: 0.92rem;
  margin: 12px 0 0;
}

/* 比較表の横スクロール案内 */
.scroll-hint {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin: 0 0 6px;
  text-align: right;
}

/* 比較表の先頭列（項目列）を横スクロール時に固定する */
table.compare thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
}

table.compare tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
}

/* ナビリンクのタップ領域を広げる */
.site-nav a {
  display: inline-block;
  padding: 6px 2px;
}

/* ===== STEP1 CVR改修: 共通パーツ ===== */

/* 3秒サマリー表（モバイルで横スクロールなしに収まる設計） */
table.summary {
  border-collapse: collapse;
  width: 100%;
  background: var(--card-bg);
  font-size: 0.88rem;
  margin: 12px 0 8px;
}

table.summary th,
table.summary td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

table.summary thead th {
  background: var(--accent-light);
  font-size: 0.85rem;
}

table.summary tbody th {
  background: #faf5f6;
  white-space: nowrap;
}

table.summary .s-sub {
  display: block;
  font-weight: normal;
  font-size: 0.78rem;
  color: var(--text-sub);
  white-space: normal;
}

table.summary .yen {
  font-weight: bold;
  white-space: nowrap;
}

/* 用途別ラベル（チップ） */
.tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid #f0c9d4;
  border-radius: 999px;
  font-size: 0.76rem;
  padding: 1px 9px;
  margin: 0 4px 4px 0;
  line-height: 1.6;
}

/* 診断への内部導線ボタン（広告CTAと区別するアウトライン型） */
.diag-btn {
  display: inline-block;
  border: 2px solid var(--accent);
  color: var(--accent-dark);
  background: #fff;
  font-weight: bold;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 26px;
  font-size: 0.98rem;
  line-height: 1.5;
}

.diag-btn:hover {
  background: var(--accent-light);
}

.summary-cta {
  margin: 10px 0 4px;
}

.summary-cta .cta-sub {
  display: block;
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-top: 6px;
}

/* 18歳・届出の共通注記 */
.age-note {
  font-size: 0.85rem;
  color: var(--text-sub);
  background: #faf5f6;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
}

/* Sticky比較バー（モバイルのみ・閉じるボタン付き・内部導線のみ） */
.sticky-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sticky-bar {
  display: none;
}

@media (max-width: 768px) {
  body.has-sticky {
    padding-bottom: 56px;
  }

  body:has(> .sticky-toggle:checked) {
    padding-bottom: 0;
  }

  .sticky-bar {
    display: flex;
    align-items: stretch;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    background: rgba(255, 252, 253, 0.98);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(47, 58, 74, 0.08);
    padding: 8px 100px 8px 12px;
  }

  .sticky-toggle:checked + .sticky-bar {
    display: none;
  }

  .sticky-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--accent);
    color: var(--accent-dark);
    background: #fff;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    text-decoration: none;
    padding: 6px 4px;
    line-height: 1.35;
    min-height: 38px;
  }

  .sticky-link.main {
    background: var(--accent);
    color: #fff;
  }

  .sticky-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    flex: none;
    font-size: 1.1rem;
    color: var(--text-sub);
    cursor: pointer;
    user-select: none;
  }
}

/* 白書: 引用ボックス */
.quote-box {
  background: #fff8e6;
  border: 1px solid #e8d48b;
  border-left: 5px solid #d9a441;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 0.95rem;
}

.quote-box .q-source {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-sub);
}

/* 白書: SVGグラフ */
.wp-chart {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
}

.wp-chart svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.wp-chart .chart-note {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin: 8px 0 0;
}
