/* =========================================================
   共通スタイル（アフィリエイト情報サイト ひな型）
   デザイントークン（色・文字・余白）は UIキットの定義をそのまま採用
   ========================================================= */

/* ---- デザイントークン ---- */
:root {
  /* Base neutrals (cool-toned) */
  --white: #ffffff;
  --ink-900: oklch(0.27 0.02 220);
  --ink-700: oklch(0.42 0.02 220);
  --ink-500: oklch(0.55 0.015 220);
  --ink-400: oklch(0.66 0.012 220);
  --paper-0: #ffffff;
  --paper-1: oklch(0.985 0.004 200);
  --paper-2: oklch(0.965 0.006 200);
  --line-1: oklch(0.91 0.008 200);
  --line-2: oklch(0.95 0.006 200);

  /* Blue（メインアクセント／医療・クリニック感）
     ※変数名は --teal-* のままだが、色相を青(約252-256)に変更している */
  --teal-50: oklch(0.972 0.020 250);
  --teal-100: oklch(0.936 0.042 250);
  --teal-500: oklch(0.60 0.13 252);
  --teal-600: oklch(0.52 0.15 254);
  --teal-700: oklch(0.44 0.15 256);

  /* Coral pink（CTA専用） */
  --coral-50: oklch(0.958 0.028 18);
  --coral-500: oklch(0.66 0.17 18);
  --coral-600: oklch(0.59 0.17 18);

  /* Semantic aliases */
  --color-accent: var(--teal-600);
  --color-accent-strong: var(--teal-700);
  --color-accent-soft: var(--teal-50);
  --color-cta: var(--coral-500);
  --color-cta-hover: var(--coral-600);
  --color-cta-soft: var(--coral-50);

  --text-body: var(--ink-900);
  --text-secondary: var(--ink-700);
  --text-muted: var(--ink-500);
  --text-on-accent: #ffffff;
  --text-link: var(--teal-700);

  --surface-page: var(--paper-1);
  --surface-card: var(--paper-0);
  --surface-section: var(--paper-2);
  --border-default: var(--line-1);
  --border-subtle: var(--line-2);
  --border-accent: var(--teal-500);

  /* Typography */
  --font-jp: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-num: 'Manrope', 'Noto Sans JP', sans-serif;

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 28px;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  --leading-body: 1.9;
  --leading-heading: 1.5;
  --leading-tight: 1.3;

  --tracking-jp: 0.02em;
  --tracking-wide: 0.14em;

  /* Spacing (4px scale) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-card: 0 1px 2px oklch(0.27 0.02 220 / 0.05);
  --shadow-raised: 0 2px 8px oklch(0.27 0.02 220 / 0.08);

  /* Layout */
  --content-max: 720px;
  --page-max: 1080px;
  --page-pad: 16px;
  --tap-min: 44px;
}

/* ---- リセット & 基本 ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-jp);
  font-size: var(--text-base);
  line-height: var(--leading-body);
}
img { max-width: 100%; }
a { color: var(--text-link); }
.num { font-family: var(--font-num); font-weight: 600; }

/* PC では本文を少し大きく */
@media (min-width: 768px) {
  body { font-size: var(--text-md); }
}

/* ---- PR表記バー（全ページ最上部） ---- */
.pr-notice {
  background: var(--paper-2);
  border-bottom: 1px solid var(--border-subtle);
  padding: 5px var(--page-pad);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- ロゴ ---- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-body);
}
.logo svg { display: block; flex-shrink: 0; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name {
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.04em;
  color: var(--ink-900);
}
.logo__name em { color: var(--teal-600); font-style: normal; }
.logo__sub {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 8.5px;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-500);
  margin-top: 4px;
  text-transform: uppercase;
}
.logo--sm .logo__name { font-size: 16px; }
.logo--sm .logo__sub { font-size: 7px; }

/* ---- ヘッダー ---- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border-default);
}
.site-header__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 10px var(--page-pad) 0;
}
.site-nav {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  overflow-x: auto;
}
.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 12px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-700);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--teal-700); }
.site-nav a.is-active {
  font-weight: 700;
  color: var(--teal-700);
  box-shadow: inset 0 -2px 0 var(--teal-600);
}

/* ---- メインレイアウト ---- */
.page { min-height: 100%; }
.main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-6) var(--page-pad) 0;
}
.main--narrow { max-width: var(--content-max); }

/* ---- ボタン ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: var(--tap-min);
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-jp);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s;
}
.btn--full { display: flex; width: 100%; }
.btn--lg { padding: 15px 28px; font-size: 17px; }
.btn--sm { padding: 8px 14px; font-size: 13px; min-height: auto; }
.btn--accent { background: var(--teal-600); color: #fff; }
.btn--accent:hover { background: var(--teal-700); }
.btn--cta { background: var(--coral-500); color: #fff; }
.btn--cta:hover { background: var(--coral-600); }
.btn--ghost {
  background: transparent;
  color: var(--teal-700);
  border: 1px solid var(--teal-500);
}
.btn--ghost:hover { background: var(--teal-50); }
.btn .arrow { font-family: var(--font-num); font-weight: 700; }

/* ---- バッジ ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  line-height: 1.4;
  letter-spacing: 0.04em;
}
.badge--new { background: var(--teal-600); color: #fff; font-weight: 700; }
.badge--category { background: var(--teal-50); color: var(--teal-700); font-weight: 500; }
.badge--outline {
  background: transparent;
  color: var(--ink-700);
  border: 1px solid var(--line-1);
  font-weight: 500;
}

/* ---- 記事カード ---- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-body);
}
.card__media {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__new { position: absolute; top: 8px; left: 8px; }
.card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
}
.card__title {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: var(--tracking-jp);
  color: var(--ink-900);
  transition: color 0.15s;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card__title { color: var(--teal-700); }
.card__brand {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
}
.card__meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  column-gap: 12px;
}

/* 横並びカード（関連記事） */
.card--horizontal { flex-direction: row; gap: 12px; }
.card--horizontal .card__media { width: 110px; aspect-ratio: 1 / 1; }
.card--horizontal .card__body { padding: 10px 12px 10px 0; }
.card--horizontal .card__title { font-size: var(--text-sm); }

/* 記事一覧グリッド */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-3);
}

/* ---- 空の状態（記事準備中） ---- */
.empty-state {
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  padding: var(--space-12) var(--space-4);
  text-align: center;
  color: var(--text-muted);
}
.empty-state__title {
  margin: 0 0 6px;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-secondary);
}
.empty-state p { margin: 0; font-size: var(--text-sm); }

/* ---- パンくず ---- */
.breadcrumb {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-link); text-decoration: none; }

/* ---- 記事本体 ---- */
.article {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5) var(--space-4) var(--space-8);
}
.article__tags { display: flex; gap: 6px; margin-bottom: 10px; }
.article__title {
  margin: 0 0 10px;
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: var(--tracking-jp);
  line-height: var(--leading-heading);
  color: var(--ink-900);
}
.article__meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 4px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 20px;
}
.article p {
  margin: 0 0 16px;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--text-body);
}
.article h2 {
  margin: 40px 0 14px;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-jp);
  line-height: var(--leading-heading);
  color: var(--ink-900);
  border-left: 4px solid var(--teal-600);
  padding-left: 12px;
}
.article h3 {
  margin: 28px 0 12px;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-jp);
  color: var(--ink-900);
}
.article img.figure {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  display: block;
  margin: 0 0 8px;
}
.article .caption {
  font-size: var(--text-sm);
  color: var(--text-muted);
}
@media (min-width: 768px) {
  .article { padding: var(--space-8); }
  .article__title { font-size: var(--text-3xl); }
  .article p { font-size: var(--text-md); }
}

/* ---- 商品情報ボックス ---- */
.product-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.product-box img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  background: #fff;
}
.product-box dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 6px;
  flex: 1;
}
.product-box dt {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--teal-700);
  white-space: nowrap;
  line-height: 1.7;
}
.product-box dd {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink-900);
  line-height: 1.7;
}
.product-box dd.is-name { font-weight: 700; }
.product-box dd.is-num { font-family: var(--font-num); }

/* ---- スペック比較表 ---- */
.spec-table figure,
figure.spec-table { margin: 0; }
.spec-table__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.spec-table table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
}
.spec-table th {
  padding: 10px 14px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-900);
  background: var(--paper-2);
  border-bottom: 1px solid var(--border-default);
  text-align: left;
  white-space: nowrap;
}
.spec-table thead th:first-child,
.spec-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
}
.spec-table th.is-highlight {
  color: var(--teal-700);
  background: var(--teal-50);
}
.spec-table td {
  padding: 10px 14px;
  font-size: var(--text-sm);
  color: var(--ink-900);
  line-height: 1.7;
  min-width: 120px;
  background: #fff;
  border-bottom: 1px solid var(--border-subtle);
}
.spec-table td.is-num { font-family: var(--font-num); }
.spec-table td.is-highlight { background: var(--teal-50); }
.spec-table tbody tr:last-child th,
.spec-table tbody tr:last-child td { border-bottom: none; }
.spec-table .tag-this {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--teal-600);
  border-radius: var(--radius-sm);
  padding: 2px 5px;
  vertical-align: middle;
}
.spec-table figcaption {
  margin-top: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ---- キャンペーン枠 ---- */
.campaign {
  border: 2px solid var(--teal-500);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  overflow: hidden;
}
.campaign__title {
  margin: 0;
  padding: 10px 16px;
  background: var(--teal-600);
  color: #fff;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: var(--tracking-jp);
}
.campaign__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.campaign ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.campaign li {
  display: flex;
  gap: 8px;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--ink-900);
}
.campaign li::before {
  content: "✓";
  color: var(--teal-600);
  font-weight: 700;
  flex-shrink: 0;
}
.campaign__note {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- 医療情報の注意書き（医療広告ガイドライン対応） ---- */
.med-alert {
  border: 1px solid var(--teal-100);
  border-left: 4px solid var(--teal-600);
  background: var(--teal-50);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: 0 0 20px;
}
.med-alert__title {
  margin: 0 0 6px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--teal-700);
  letter-spacing: var(--tracking-jp);
}
.med-alert p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--text-secondary);
}
.med-alert p + p { margin-top: 8px; }

/* 確認リスト枠（キャンペーン枠の代替。中立的なチェック項目） */
.check-box {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  overflow: hidden;
}
.check-box__title {
  margin: 0;
  padding: 10px 16px;
  background: var(--teal-600);
  color: #fff;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: var(--tracking-jp);
}
.check-box__body { padding: var(--space-4); display: flex; flex-direction: column; gap: 10px; }
.check-box ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.check-box li { display: flex; gap: 8px; font-size: var(--text-base); line-height: 1.7; color: var(--ink-900); }
.check-box li::before { content: "☑"; color: var(--teal-600); font-weight: 700; flex-shrink: 0; }
.check-box__note { margin: 0; font-size: var(--text-xs); color: var(--text-muted); line-height: 1.6; }

/* ---- CTA 補足 ---- */
.cta-wrap { margin: 20px 0 8px; }
.cta-note {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}

/* ---- FAQ ---- */
.faq { margin-top: 40px; }
.faq__heading {
  margin: 0 0 12px;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-jp);
  color: var(--ink-900);
  line-height: var(--leading-heading);
}
.faq__list {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq details { background: #fff; border-top: 1px solid var(--border-subtle); }
.faq details:first-child { border-top: none; }
.faq summary {
  display: flex;
  gap: 10px;
  align-items: baseline;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  min-height: var(--tap-min);
  box-sizing: border-box;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.6;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q,
.faq .a-mark { font-family: var(--font-num); font-weight: 800; flex-shrink: 0; }
.faq summary .q { color: var(--teal-600); }
.faq__answer {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--text-secondary);
}
.faq .a-mark { color: var(--coral-500); line-height: 1.9; }

/* ---- 広告枠プレースホルダー ---- */
.ad-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ad-slot__label {
  font-size: 10px;
  color: var(--ink-400);
  letter-spacing: 0.08em;
}
.ad-slot__box {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-1);
  border-radius: var(--radius-sm);
  background: var(--paper-1);
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-400);
}
.ad-slot--rectangle .ad-slot__box { width: 300px; height: 250px; max-width: 100%; }
.ad-center { display: flex; justify-content: center; }

/* ---- セクション見出し（トップ等） ---- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: var(--space-4);
}
.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-jp);
  color: var(--ink-900);
}
.section-head .en {
  font-family: var(--font-num);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--teal-600);
}
.related-head {
  margin: 0 0 12px;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-jp);
  color: var(--ink-900);
}
.stack { display: flex; flex-direction: column; }

/* ---- 静的ページ（運営者情報・プライバシー・問い合わせ） ---- */
.doc {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-6) var(--space-4) var(--space-8);
}
.doc h1 {
  margin: 0 0 8px;
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: var(--tracking-jp);
  line-height: var(--leading-heading);
  color: var(--ink-900);
}
.doc .lead {
  margin: 0 0 24px;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.doc h2 {
  margin: 32px 0 12px;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-jp);
  color: var(--ink-900);
  border-left: 4px solid var(--teal-600);
  padding-left: 12px;
}
.doc p { margin: 0 0 14px; font-size: var(--text-base); line-height: var(--leading-body); }
.doc ul { margin: 0 0 14px; padding-left: 1.4em; line-height: var(--leading-body); }
.doc a { color: var(--text-link); }
.doc .info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
  font-size: var(--text-base);
}
.doc .info-table th,
.doc .info-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  line-height: 1.7;
}
.doc .info-table th {
  width: 34%;
  font-weight: 700;
  color: var(--teal-700);
  background: var(--teal-50);
  white-space: nowrap;
}
.doc .contact-mail {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--teal-700);
}
@media (min-width: 768px) {
  .doc { padding: var(--space-8); }
  .doc h1 { font-size: var(--text-3xl); }
}

/* ---- フッター ---- */
.site-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--border-default);
  margin-top: var(--space-12);
}
.site-footer__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-8) var(--page-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}
.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer nav a {
  font-size: var(--text-sm);
  color: var(--ink-700);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  transition: color 0.15s;
}
.site-footer nav a:hover { color: var(--teal-700); }
.site-footer__copy {
  margin: 0;
  font-family: var(--font-num);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ---- 汎用 ---- */
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.center { display: flex; justify-content: center; }
