/* 紙の世界観・共通コンテンツCSS（汎用ページ page-content / 個別記事 single 共用）
   トップ・ブログと同じトーン。ビルド不要の自己完結（トークン内包） */

:root {
  --paper: #F4EFE3;
  --paper2: #EDE6D4;
  --ink: #1A1712;
  --vermilion: #E8391B;
  --acid: #DDF247;
  --mut: #8E8674;
  --mut-dark: #6B6455;
  --dot-grid: 22px;
  --font-mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-jp: -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}
@font-face {
  font-family: "Shippori Mincho B1";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("assets/fonts/ShipporiMinchoB1-Bold.subset.woff2") format("woff2");
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.mds-page {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 55%, var(--paper2) 100%);
  color: var(--ink);
  font-family: var(--font-jp);
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
body.mds-page::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(26, 23, 18, .05) 1px, transparent 1px);
  background-size: var(--dot-grid) var(--dot-grid);
}

/* ===== 共通ヘッダー ===== */
.mds-nav { position: relative; z-index: 2; border-bottom: 1px solid rgba(26, 23, 18, .12); }
.mds-nav__inner {
  max-width: 1080px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.mds-nav__brand { font-weight: 900; letter-spacing: .22em; font-size: 15px; color: var(--ink); text-decoration: none; }
.mds-nav__links { display: flex; align-items: center; gap: 20px; }
.mds-nav__links a { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 800; }
.mds-nav__links a:hover { color: var(--vermilion); }
.mds-nav__cta {
  background: var(--ink); color: var(--paper) !important; padding: 9px 18px; border-radius: 100px;
}
.mds-nav__cta:hover { background: var(--vermilion); }
@media (max-width: 560px) {
  .mds-nav__links { gap: 12px; }
  .mds-nav__links a:not(.mds-nav__cta) { display: none; } /* 狭い画面はLINEだけ残す */
}

/* ===== 本文ラッパ ===== */
.mds-main { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 64px 24px 88px; }
.mds-article__eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--vermilion); }
.mds-article__title {
  font-family: var(--font-mincho); font-feature-settings: "palt";
  font-size: clamp(28px, 4.6vw, 44px); font-weight: 700; line-height: 1.35;
  letter-spacing: .03em; margin: 12px 0 16px;
}
.mds-article__meta { font-size: 12.5px; color: var(--mut); font-weight: 700; margin-bottom: 40px; }
.mds-article__meta time { font-variant-numeric: tabular-nums; }

/* ===== prose（the_content 出力の紙タイポ） ===== */
.mds-prose { font-size: 16px; line-height: 1.95; color: #2A251E; font-weight: 600; }
.mds-prose > * + * { margin-top: 1.5em; }
.mds-prose h2 {
  font-family: var(--font-mincho); font-size: clamp(22px, 3.2vw, 30px); font-weight: 700;
  line-height: 1.5; letter-spacing: .02em; margin-top: 2.2em;
  padding-bottom: .35em; border-bottom: 2px solid rgba(26, 23, 18, .14);
}
.mds-prose h3 {
  font-family: var(--font-mincho); font-size: clamp(18px, 2.4vw, 22px); font-weight: 700;
  margin-top: 1.8em; padding-left: 14px; border-left: 4px solid var(--vermilion);
}
.mds-prose h4 { font-size: 16px; font-weight: 800; margin-top: 1.6em; }
.mds-prose p { margin-top: 1.4em; }
.mds-prose a { color: var(--vermilion); text-decoration: underline; text-underline-offset: 2px; }
/* 本文中のLINE(診断)リンクは自動でボタン化＝CV導線を目立たせる */
.mds-prose a[href*="lin.ee"] {
  display: inline-block; margin-top: .4em; padding: 15px 34px; border-radius: 100px;
  background: var(--acid); color: var(--ink); font-weight: 900; text-decoration: none;
  box-shadow: 0 8px 24px rgba(221, 242, 71, .3);
}
.mds-prose a[href*="lin.ee"]:hover { transform: translateY(-2px); }
.mds-prose strong, .mds-prose b { font-weight: 800; }
.mds-prose ul, .mds-prose ol { margin-top: 1.3em; padding-left: 1.4em; }
.mds-prose li { margin-top: .5em; }
.mds-prose ul li::marker { color: var(--vermilion); }
.mds-prose blockquote {
  margin-top: 1.6em; padding: 16px 20px; background: rgba(221, 242, 71, .18);
  border-left: 4px solid var(--acid); border-radius: 0 8px 8px 0; font-weight: 700;
}
.mds-prose img { max-width: 100%; height: auto; border-radius: 10px; display: block; }
.mds-prose figure { margin-top: 1.6em; }
.mds-prose table {
  width: 100%; border-collapse: collapse; margin-top: 1.6em; font-size: 14px;
  background: #FFFDF6; border-radius: 8px; overflow: hidden;
}
.mds-prose th, .mds-prose td { padding: 12px 14px; border: 1px solid rgba(26, 23, 18, .12); text-align: left; }
.mds-prose th { background: var(--ink); color: var(--paper); font-weight: 800; }
.mds-prose hr { border: none; border-top: 1px solid rgba(26, 23, 18, .18); margin: 2.4em 0; }
.mds-prose code {
  background: rgba(26, 23, 18, .07); padding: 2px 6px; border-radius: 4px;
  font-size: .92em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ===== 著者ボックス（E-E-A-T） ===== */
.mds-author {
  margin-top: 56px; padding: 24px; background: #FFFDF6; border-radius: 12px;
  box-shadow: 0 14px 32px rgba(26, 23, 18, .1);
}
.mds-author__label { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--mut); margin-bottom: 10px; }
.mds-author__name { font-family: var(--font-mincho); font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.mds-author__bio { font-size: 13.5px; line-height: 1.85; color: var(--mut-dark); }
.mds-author__bio a { color: var(--vermilion); font-weight: 800; }

/* ===== 記事末CTA ===== */
.mds-cta-block {
  margin-top: 56px; background: var(--ink); color: var(--paper2);
  border-radius: 16px; padding: 44px 28px; text-align: center;
}
.mds-cta-block h2 { font-family: var(--font-mincho); font-size: clamp(20px, 3.2vw, 28px); font-weight: 700; color: var(--paper); margin-bottom: 12px; }
.mds-cta-block p { font-size: 13.5px; line-height: 1.9; color: var(--mut); margin-bottom: 22px; }
.mds-cta-block a {
  display: inline-block; padding: 16px 40px; border-radius: 100px;
  background: var(--acid); color: var(--ink); font-weight: 900; font-size: 16px; text-decoration: none;
}
.mds-cta-block a:focus-visible { outline: 3px solid var(--paper); outline-offset: 4px; }

/* ===== 関連記事 ===== */
.mds-related { margin-top: 56px; }
.mds-related__h { font-family: var(--font-mincho); font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.mds-related__grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .mds-related__grid { grid-template-columns: repeat(2, 1fr); } }
.mds-related__item {
  display: block; padding: 16px 18px; background: #FFFDF6; border-radius: 10px;
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; line-height: 1.6;
  box-shadow: 0 8px 20px rgba(26, 23, 18, .08); transition: transform .2s ease;
}
.mds-related__item:hover { transform: translateY(-2px); }

/* ===== 共通フッター ===== */
.mds-footer { position: relative; z-index: 1; background: var(--ink); margin-top: 72px; }
.mds-footer__inner { max-width: 760px; margin: 0 auto; padding: 40px 24px 56px; }
.mds-footer__brand { font-weight: 900; letter-spacing: .28em; font-size: 13px; margin-bottom: 16px; color: var(--paper); }
.mds-footer__nav { display: flex; flex-wrap: wrap; gap: 18px; }
.mds-footer__nav a { color: var(--mut); font-size: 12.5px; text-decoration: none; font-weight: 700; }
.mds-footer__nav a:hover { color: var(--paper); }
