/* ヨナトーク 基本スタイル / モバイルファースト
 * ブレイクポイント: sm (>=480), md (>=768), lg (>=1024)
 */

:root {
  --c-bg: #ffffff;
  --c-fg: #1a1f2e;
  --c-muted: #5b6577;
  --c-subtle: #e6e9ef;
  --c-accent: #0b1e3a;
  --c-accent-dark: #081428;
  --c-link: #0b1e3a;
  --c-cta: #c00;
  --c-orange: #f5a623;
  --c-border: #e6e9ef;
  --c-alt-bg: #f7f9fc;
  --wrap-max: 960px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(11, 30, 58, .06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--c-bg); color: var(--c-fg); }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--c-link); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration: none; }

.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 16px; }

/* ---------- ヘッダー ---------- */
.site-header {
  border-bottom: 1px solid var(--c-border);
  background: #fff;
  position: sticky; top: 0; z-index: 100;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 12px;
  padding-top: 10px; padding-bottom: 10px;
  flex-wrap: wrap;
}
.site-header .logo {
  font-weight: bold; color: var(--c-accent);
  font-size: 18px; text-decoration: none;
  flex-shrink: 0;
}
.site-header nav {
  display: flex; gap: 4px 16px; flex-wrap: wrap; flex: 1;
  font-size: 14px;
}
.site-header nav a { color: var(--c-fg); text-decoration: none; padding: 6px 0; }
.site-header nav a:hover { color: var(--c-cta); }

/* ---------- 見出し・本文 ---------- */
main { padding: 24px 0 48px; }
h1 { font-size: 24px; line-height: 1.35; margin: 0 0 20px; }
h2 { font-size: 20px; line-height: 1.4; margin: 32px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--c-accent); }
h3 { font-size: 17px; line-height: 1.5; margin: 20px 0 8px; }
p { margin: 0 0 16px; }
ul, ol { padding-left: 1.4em; margin: 0 0 16px; }
li { margin: 4px 0; }

/* ---------- セクション ---------- */
.section { padding: 32px 0; }
.section.alt { background: var(--c-alt-bg); }
.section-cta { text-align: right; margin-top: 16px; }

/* ---------- ヒーロー ---------- */
.hero {
  padding: 40px 0 32px;
  background: linear-gradient(135deg, #0b1e3a 0%, #081428 100%);
  color: #fff;
}
.hero h1 { color: #fff; font-size: 26px; }
.hero-lead { color: #c9d4e8; font-size: 15px; }
.hero .pr-notice { color: #c9d4e8; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- CTA / ボタン ---------- */
.cta, .cta-secondary {
  display: inline-block; padding: 12px 20px; border-radius: var(--radius);
  font-weight: bold; text-decoration: none; text-align: center;
  min-height: 44px; line-height: 1.4;   /* タップターゲット 44px 以上 */
}
.cta { background: var(--c-cta); color: #fff; }
.cta:hover { opacity: .9; }
.cta-secondary { background: #fff; color: var(--c-accent); border: 2px solid var(--c-accent); }
.cta-secondary:hover { background: var(--c-accent); color: #fff; }

/* ---------- PR 表記 ---------- */
.pr-label {
  display: inline-block; padding: 3px 8px; background: var(--c-orange); color: #000;
  font-size: 11px; font-weight: bold; border-radius: 3px; letter-spacing: 0.05em;
  margin-right: 6px; vertical-align: middle;
}
.pr-notice {
  display: inline-block; padding: 6px 12px; background: #fff4e0;
  border-left: 3px solid var(--c-orange);
  font-size: 13px; color: var(--c-fg); font-weight: 500;
  margin: 12px 0; border-radius: 3px;
}
.affiliate-link-wrap { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------- カード ---------- */
.card-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
.link-card {
  display: block; padding: 20px;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  text-decoration: none; color: var(--c-fg); background: #fff;
  transition: box-shadow .15s;
}
.link-card:hover { box-shadow: var(--shadow); }
.link-card h3 { margin: 0 0 8px; color: var(--c-accent); }
.link-card p { margin: 0; color: var(--c-muted); font-size: 14px; }

/* ---------- サービスカード / ランキング ---------- */
.ranking-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 20px;
}
.ranking-item {
  background: #fff;
}
.ranking-reason {
  background: var(--c-alt-bg); padding: 12px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--c-border); border-bottom: 0;
  font-size: 14px;
}
.ranking-reason .reason { margin: 0; }
.ranking-item .service-card { border-radius: 0 0 var(--radius) var(--radius); border-top: 0; }

.service-card {
  position: relative;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 16px; background: #fff;
}
.service-card.compact { padding: 12px; }
.service-card-head h3 { margin: 0 0 4px; font-size: 18px; }
.service-card-head h3 a { color: var(--c-accent); text-decoration: none; }
.service-card-head h3 a:hover { text-decoration: underline; }
.service-card .tagline { color: var(--c-muted); font-size: 14px; margin: 0 0 12px; }
.service-features { list-style: disc; padding-left: 20px; margin: 0 0 12px; font-size: 14px; }
.service-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.badge {
  display: inline-block; padding: 3px 8px; background: var(--c-subtle);
  color: var(--c-fg); border-radius: 3px; font-size: 12px;
}
.badge.provisional { background: #fff4e0; color: #5a4200; }
.service-cta {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.service-cta.primary { margin: 20px 0; }
.rank-badge {
  position: absolute; top: -8px; left: -8px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-orange); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  box-shadow: var(--shadow);
}

/* ---------- 比較表 (PC は table、モバイルは下の comparison-cards に切替) ---------- */
.comparison-table-wrap {
  display: none;               /* mobile default: 非表示 (>=768px で有効化) */
  overflow-x: auto;
  margin: 20px 0;
}
.comparison-table {
  width: 100%; border-collapse: collapse; min-width: 640px;
  background: #fff;
}
.comparison-table th, .comparison-table td {
  border: 1px solid var(--c-border); padding: 12px;
  vertical-align: top; text-align: left; font-size: 14px;
}
.comparison-table thead th { background: var(--c-accent); color: #fff; }
.comparison-table tbody th { background: var(--c-alt-bg); width: 20%; }
/* 左端「項目」列を横スクロール中も固定 (列数が多い場合の可読性保険) */
.comparison-table thead th:first-child,
.comparison-table tbody th {
  position: sticky;
  left: 0;
}
.comparison-table thead th:first-child { z-index: 2; }
.comparison-table tbody th { z-index: 1; }

.mini-list { list-style: disc; padding-left: 18px; margin: 0; }
.mini-list li { margin: 2px 0; }

/* ---------- 比較カード (モバイル用の代替表示・>=768px で非表示) ---------- */
.comparison-cards {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}
.comparison-card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}
.comparison-card-header {
  background: var(--c-accent);
  color: #fff;
  margin: 0;
  padding: 12px 16px;
  font-size: 18px;
}
.comparison-card-body { margin: 0; }
.comparison-card-body dt {
  background: var(--c-alt-bg);
  padding: 8px 16px;
  font-weight: bold;
  font-size: 13px;
  color: var(--c-muted);
  border-top: 1px solid var(--c-border);
}
.comparison-card-body dt:first-of-type { border-top: 0; }
.comparison-card-body dd {
  margin: 0;
  padding: 12px 16px;
  font-size: 14px;
}

/* ---------- 記事 ---------- */
.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li { border-bottom: 1px solid var(--c-border); }
.article-list li a {
  display: block; padding: 14px 0;
  text-decoration: none; color: var(--c-fg);
}
.article-list li a:hover { background: var(--c-alt-bg); }
.article-type { color: var(--c-cta); font-size: 12px; font-weight: bold; margin-right: 8px; }
.article-title { font-weight: 600; }
.article-list time { display: block; font-size: 12px; color: var(--c-muted); margin-top: 4px; }

.article-list.large li a { padding: 20px 12px; }
.article-list.large .article-title { font-size: 18px; display: block; margin: 4px 0 6px; }
.article-list.large .article-desc { font-size: 14px; color: var(--c-muted); margin: 0 0 8px; }

.article-body { max-width: 720px; }
.article-meta { font-size: 13px; color: var(--c-muted); margin: 0 0 12px; }
.article-lead { font-size: 16px; color: var(--c-muted); }
.article-content { margin: 24px 0; }
.article-content h2 { margin-top: 40px; }

/* 記事本文の Markdown テーブル (モバイル: 1文字ずつ縦崩れ防止) */
.article-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
  font-size: 14px;
}
.article-content table th,
.article-content table td {
  border: 1px solid var(--c-border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.article-content table thead th {
  background: var(--c-alt-bg);
  font-weight: bold;
}
/* 1列目 (項目ラベル) は 1 文字ごとに折り返さない ように 最小幅 + nowrap */
.article-content table th:first-child,
.article-content table tbody td:first-child {
  white-space: nowrap;
  min-width: 5em;
}

/* 記事本文の figure (スクリーンショット埋め込み等) */
.article-content .article-figure {
  margin: 24px 0;
  text-align: center;
}
.article-content .article-figure img {
  max-width: 360px;
  width: 100%;
  height: auto;
  border: 1px solid var(--c-border);
  border-radius: 6px;
}
.article-content .article-figure figcaption {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 8px;
  text-align: center;
}

/* 記事本文の CTA (アフィリエイトリンクボタンの目立たせ) */
.article-content .article-cta {
  text-align: center;
  margin: 32px 0;
}

.breadcrumb { font-size: 13px; color: var(--c-muted); margin: 0 0 12px; }
.breadcrumb a { color: var(--c-muted); }

.related-services { margin-top: 40px; padding-top: 24px; border-top: 2px solid var(--c-border); }
.related-list { display: grid; gap: 12px; }
.related-item {
  display: flex; gap: 12px; padding: 12px;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.related-item h3 { margin: 0 0 4px; font-size: 16px; }
.related-item p { margin: 0; font-size: 13px; color: var(--c-muted); }

/* ---------- サービス詳細ページ ---------- */
.service-header { margin-bottom: 24px; }
.service-header h1 { margin-bottom: 4px; }
.service-header .tagline { color: var(--c-muted); font-size: 16px; margin: 0 0 12px; }
.service-detail-grid {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
  margin: 24px 0;
}
.def-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; }
.def-list dt { font-weight: 600; color: var(--c-muted); font-size: 14px; }
.def-list dd { margin: 0; font-size: 14px; }
.warning-box {
  background: #fff8f0; border-left: 4px solid var(--c-orange);
  padding: 12px 16px; margin: 20px 0; border-radius: 3px;
}
.warning-box strong { display: block; margin-bottom: 4px; }

.provisional-notice {
  background: #fff8e6; border-left: 4px solid var(--c-orange);
  padding: 12px 16px; margin: 20px 0; border-radius: 3px; font-size: 14px;
}
.provisional-notice strong { display: block; margin-bottom: 4px; }

/* =====================================================
   >= 480px (小型スマホ横〜大型スマホ)
   ===================================================== */
@media (min-width: 480px) {
  h1 { font-size: 28px; }
  .hero h1 { font-size: 32px; }
  .hero-lead { font-size: 16px; }
}

/* =====================================================
   >= 768px (タブレット)
   ===================================================== */
@media (min-width: 768px) {
  :root { font-size: 17px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  h3 { font-size: 19px; }
  .hero { padding: 60px 0 48px; }
  .hero h1 { font-size: 38px; }
  main { padding: 32px 0 64px; }
  .section { padding: 48px 0; }

  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .service-detail-grid { grid-template-columns: 1fr 1fr; }
  .related-list { grid-template-columns: repeat(2, 1fr); }

  /* 比較表: >=768px で table 表示、カード非表示 */
  .comparison-table-wrap { display: block; }
  .comparison-cards { display: none; }
}

/* =====================================================
   >= 1024px (デスクトップ)
   ===================================================== */
@media (min-width: 1024px) {
  .site-header .wrap { padding: 12px 16px; }
  .site-header nav { gap: 20px; font-size: 15px; }
}
