/* ─────────────────────────────────────────────
   解説ページ共通スタイル
   LP (index.html) のデザイントークンを踏襲した軽量版。
   アニメーションライブラリには依存しない。
   ───────────────────────────────────────────── */
:root{
  --accent: #FF9500;
  --accent-soft: #FFF1DE;
  --accent-deep: #E07F00;
  --bg: #FBF8F4;
  --bg-alt: #F4EFE7;
  --bg-card: #FFFFFF;
  --ink: #1F1A14;
  --ink-2: #4A4036;
  --ink-3: #7A7060;
  --rule: #EBE3D5;
  --shadow-sm: 0 1px 2px rgba(31,26,20,.04), 0 2px 8px rgba(31,26,20,.04);
  --shadow-md: 0 4px 12px rgba(31,26,20,.06), 0 12px 32px rgba(31,26,20,.06);
  --radius-sm: 12px;
  --radius: 18px;
  --maxw: 760px;
  --gutter: clamp(20px, 5vw, 40px);
  --font-sans: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
}

*{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .01em;
}

.container{ width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ── ヘッダー ── */
.nav{
  position: sticky; top: 0; z-index: 10;
  background: rgba(251,248,244,.86);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner{ display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }
.brand{ display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand__icon{ width: 27px; height: 27px; }
.brand__name{ font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand__name em{ font-style: normal; color: var(--accent); }

/* ── ボタン ── */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 14px; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.btn--accent{ background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--accent:hover{ background: var(--accent-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--ghost{ border: 1px solid var(--rule); color: var(--ink-2); background: var(--bg-card); }
.btn--ghost:hover{ border-color: var(--accent); color: var(--accent-deep); }

/* ── 本文 ── */
.article{ padding: clamp(36px, 7vw, 68px) 0 24px; }
.eyebrow{
  display: inline-block; margin-bottom: 14px; padding: 5px 13px;
  background: var(--accent-soft); color: var(--accent-deep);
  border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
h1{
  margin: 0 0 18px; font-size: clamp(27px, 5.4vw, 40px);
  line-height: 1.38; letter-spacing: -.02em; font-weight: 700;
}
h2{
  margin: 52px 0 16px; font-size: clamp(20px, 3.4vw, 25px);
  line-height: 1.5; letter-spacing: -.01em; font-weight: 700;
  padding-bottom: 11px; border-bottom: 1px solid var(--rule);
}
h3{ margin: 32px 0 10px; font-size: 17px; font-weight: 700; line-height: 1.6; }
p{ margin: 0 0 18px; color: var(--ink-2); }
.lede{ font-size: 17px; color: var(--ink-2); }
a{ color: var(--accent-deep); }
a:hover{ opacity: .78; }

ul, ol{ margin: 0 0 20px; padding-left: 1.35em; color: var(--ink-2); }
li{ margin-bottom: 9px; }
li::marker{ color: var(--accent); }

/* ── パンくず ── */
.crumb{ font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.crumb a{ color: var(--ink-3); text-decoration: none; }
.crumb a:hover{ color: var(--accent-deep); text-decoration: underline; }

/* ── カード ── */
.card{
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: clamp(20px, 4vw, 28px);
  box-shadow: var(--shadow-sm); margin: 22px 0;
}
.card h3{ margin-top: 0; }
.card p:last-child, .card ul:last-child, .card ol:last-child{ margin-bottom: 0; }

.note{
  background: var(--bg-alt); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); padding: 16px 20px;
  font-size: 14px; color: var(--ink-2); margin: 22px 0;
}
.note strong{ color: var(--ink); }

/* ── 手順 ── */
.steps{ list-style: none; padding: 0; counter-reset: step; }
.steps li{
  position: relative; padding-left: 44px; margin-bottom: 18px; counter-increment: step;
}
.steps li::before{
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; line-height: 1;
}

/* ── CTA ── */
.cta{
  margin: 48px 0 8px; padding: clamp(24px, 5vw, 36px);
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow-md); text-align: center;
}
.cta h2{ margin: 0 0 10px; border: 0; padding: 0; font-size: clamp(19px, 3.2vw, 23px); }
.cta p{ margin-bottom: 20px; font-size: 15px; }
.cta .appstore img{ height: 52px; width: auto; }
.cta__price{ margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* ── FAQ ── */
.faq details{
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); padding: 15px 20px; margin-bottom: 11px;
}
.faq summary{
  cursor: pointer; font-weight: 700; font-size: 15px;
  list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq summary::-webkit-details-marker{ display: none; }
.faq summary::after{ content: "＋"; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.faq details[open] summary::after{ content: "−"; }
.faq details p{ margin: 12px 0 0; font-size: 14.5px; }

/* ── 関連リンク ── */
.related{ display: grid; gap: 12px; margin: 22px 0; }
@media (min-width: 620px){ .related{ grid-template-columns: 1fr 1fr; } }
.related a{
  display: block; padding: 16px 20px; text-decoration: none;
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  color: var(--ink); font-weight: 700; font-size: 14.5px;
  transition: border-color .16s ease, transform .16s ease;
}
.related a:hover{ border-color: var(--accent); transform: translateY(-1px); opacity: 1; }
.related span{ display: block; margin-top: 4px; font-weight: 400; font-size: 13px; color: var(--ink-3); }

/* ─────────────────────────────────────────────
   改稿分の追加スタイル（純追加。上の既存クラスは変更しない）
   ───────────────────────────────────────────── */

/* ── アンカー移動時に sticky ヘッダー（62px）へ潜り込ませない ── */
:target{ scroll-margin-top: 78px; }

/* ── 結論ブロック ── */
.answer{
  background: var(--accent-soft); border: 1px solid #FFE2B8;
  border-radius: var(--radius); padding: clamp(18px, 4vw, 26px); margin: 24px 0;
}
.answer p{ color: #7A4A00; margin-bottom: 12px; }
.answer p:last-child{ margin-bottom: 0; }
.answer strong{ color: #5C3700; }

/* ── 本文中の注釈付き図版 ── */
.fig{ margin: 26px 0; }
.fig img{
  display: block; width: 100%; height: auto;
  border-radius: 14px; border: 1px solid var(--rule);
}
.fig figcaption{
  margin: 12px 0 0; font-size: 12.5px; line-height: 1.75; color: var(--ink-3);
}

/* ── Before / After ── */
.ba{ margin: 26px 0; }
.ba__grid{ display: grid; grid-template-columns: 1fr; gap: 18px; justify-items: center; }
.ba__item{ min-width: 0; width: 100%; max-width: 260px; }
.ba__label{
  display: inline-block; margin-bottom: 8px; padding: 4px 11px;
  border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  background: var(--bg-alt); color: var(--ink-2); border: 1px solid var(--rule);
}
.ba__item--after .ba__label{ background: var(--accent); color: #fff; border-color: transparent; }
.ba__frame{
  border-radius: 18px; overflow: hidden; background: #0D0A07;
  padding: 5px; box-shadow: var(--shadow-md);
}
.ba__frame img{ display: block; width: 100%; height: auto; border-radius: 14px; }
/* Before だけ彩度を落として「濁り」を出す */
.ba__item--before .ba__frame img{ filter: saturate(.85) contrast(.95); }
.ba__cap{ margin: 16px 0 0; font-size: 12.5px; line-height: 1.75; color: var(--ink-3); }
/* 横幅があるときだけ2カラム。狭い画面では縦積み */
@media (min-width: 560px){
  .ba__grid{ grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .ba__item{ max-width: none; }
}

/* ── 機能ブロック（2階建て） ── */
.fx{ border-top: 1px solid var(--rule); padding-top: 24px; margin-top: 24px; }
.fx:first-of-type{ border-top: 0; padding-top: 0; margin-top: 20px; }
.fx h3{ margin: 0 0 10px; display: flex; gap: 10px; align-items: flex-start; }
.fx h3::before{
  content: ""; flex: 0 0 7px; height: 7px; margin-top: 11px;
  border-radius: 50%; background: var(--accent);
}
.fx p{ margin-bottom: 0; }
.fx__result{
  margin: 12px 0 0; padding: 13px 17px; font-size: 14.5px;
  background: var(--bg-alt); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.fx__result strong{ color: var(--ink); }

/* ── インライン CTA ── */
.cta-inline{
  margin: 28px 0; padding: 18px 20px;
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.cta-inline p{ margin: 0; flex: 1 1 220px; font-size: 14.5px; }
.cta-inline .appstore img{ display: block; height: 44px; width: auto; }

/* ── テキスト CTA ── */
.cta-link{
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; text-decoration: none; color: var(--accent-deep);
}
.cta-link:hover{ opacity: 1; text-decoration: underline; }
.cta__micro{ margin-top: 12px; font-size: 12.5px; line-height: 1.7; color: var(--ink-3); }
.cta .cta__micro{ margin-bottom: 0; }

/* ── 一覧へ戻る ── */
.back{ margin: 18px 0 0; font-size: 14px; }
.back a{ text-decoration: none; font-weight: 700; }
.back a:hover{ text-decoration: underline; }

/* ── スクリーンリーダー専用 ── */
.sr-only{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── フッター ── */
.footer{
  margin-top: 60px; padding: 30px 0 40px;
  border-top: 1px solid var(--rule); background: var(--bg-alt);
  font-size: 13px; color: var(--ink-3);
}
.footer__links{ display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.footer a{ color: var(--ink-3); text-decoration: none; }
.footer a:hover{ color: var(--accent-deep); text-decoration: underline; }
