/* =========================================================
   サントータル愛媛 Instagram広告LP（8ステップ構成）
   スマートフォン優先（max-width 480px 中心）／オレンジ×グリーン×クリーム
   ========================================================= */
:root {
  --orange: #f97316;
  --orange-dark: #c2410c;
  --orange-light: #ffedd5;
  --green: #16a34a;
  --green-light: #dcfce7;
  --cream: #fffbeb;
  --white: #fff;
  --text: #3f2a1d;
  --text-sub: #4a3426;
  --radius: 20px;
  --shadow: 0 6px 20px rgba(194, 65, 12, .10);
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --font-round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif;
  /* ペルソナカード画像（差し替えはここだけ。none の場合は暖色グラデーション＋絵文字） */
  --persona-kids-img: url("../images/hero_A.webp");
  --persona-couple-img: url("../images/persona_couple_v2.webp");
  --persona-retire-img: url("../images/hero_C.webp");
  --persona-postfit-img: url("../images/persona_postfit_v2.webp");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); color: var(--text);
  background: var(--cream); line-height: 1.8; font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--orange-dark); }
.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; }

.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 20px; }
.section { position: relative; padding: 44px 0 48px; text-align: center; }
/* 場面のつながり：前セクションの終わりの色から次の色へ連続するグラデーション（急な色切替なし） */
#step02 { background: linear-gradient(180deg, #fff4e3 0%, var(--cream) 100%); }
#step03 { background: linear-gradient(180deg, var(--cream) 0%, #fff1dc 100%); }
#step04 { background: linear-gradient(180deg, #fff1dc 0%, var(--cream) 100%); }
#step05 { background: linear-gradient(180deg, var(--cream) 0%, #fff1dc 100%); }
#step06 { background: linear-gradient(180deg, #fff1dc 0%, #fff7ed 100%); }
#step07 { background: linear-gradient(180deg, #fff7ed 0%, #f0fdf4 100%); }
#step08 { background: linear-gradient(180deg, #f0fdf4 0%, #ffedd5 60%, #fed7aa 100%); }
/* 次の場面へ誘う小さな矢印 */
.section::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 16px; height: 16px; margin-left: -8px;
  border-right: 3px solid #fdba74; border-bottom: 3px solid #fdba74; transform: rotate(45deg); border-radius: 2px;
}
section[id] { scroll-margin-top: 56px; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 251, 235, .94); backdrop-filter: blur(6px);
  border-bottom: 1px solid #fde7c7;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.logo { font-family: var(--font-round); font-weight: 700; color: var(--orange-dark); font-size: 16px; }
.header-cta {
  font-size: 13px; font-weight: 700; text-decoration: none; color: var(--white);
  background: var(--orange); padding: 7px 16px; border-radius: 9999px;
}

/* ---------- 見出し・本文 ---------- */
.step-label { display: none; } /* STEP番号は表示しない */
.heading { font-family: var(--font-round); font-size: 23px; line-height: 1.55; font-weight: 700; margin: 22px 0 14px; }
.section > .container > .heading:first-child { margin-top: 0; }
.lead { font-size: 16px; color: var(--text-sub); }
.lead strong { color: var(--text); }
.marker { background: linear-gradient(transparent 62%, #fde68a 62%); }
.accent { color: var(--orange); }
.center { text-align: center; }

/* ---------- シーン画像（流れ図からの仮画像。差し替え前提） ---------- */
.scene { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.scene img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.scene-small { max-width: 320px; margin: 0 auto; }
.scene-small img { aspect-ratio: 4 / 3; }
#step07 .scene img { aspect-ratio: 704 / 252; } /* STEP07は従来どおり横長 */

/* ---------- ボタン ---------- */
.btn {
  display: inline-block; text-align: center; text-decoration: none; font-weight: 700;
  font-size: 17px; line-height: 1.4; padding: 18px 24px; border-radius: 9999px;
  transition: transform .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(2px); }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: 0 5px 0 var(--orange-dark); }
.btn-sub { background: var(--white); color: var(--orange-dark); border: 2px solid var(--orange); }
.btn-block { display: block; width: 100%; }
.btn-large { font-size: 19px; padding: 22px 24px; }
.btn:focus-visible, .chip input:focus-visible + span, .toggle input:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

/* ---------- STEP 01 ヒーロー ---------- */
.hero { position: relative; background: linear-gradient(180deg, var(--cream) 0%, #fff4e3 100%); padding: 0 0 24px; text-align: center; }
.hero-picture { display: block; max-width: 640px; margin: 0 auto; }
.hero-picture img { width: 100%; height: auto; }
/* 画像にコピーが描き込まれているため通常はテキストを視覚的に隠す */
.hero-overlay { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* 画像が読み込めない（SVGプレースホルダー）時だけ、半透明オーバーレイでコピーを表示 */
.hero.is-fallback .hero-overlay {
  position: absolute; left: 0; right: 0; top: 0; width: auto; height: auto; clip: auto; overflow: visible;
  padding: 28px 20px; background: linear-gradient(180deg, rgba(255, 251, 235, .92), rgba(255, 251, 235, 0));
}
.hero-copy { font-family: var(--font-round); font-size: 26px; line-height: 1.5; color: var(--text); }
.hero-sub { font-family: var(--font-round); font-size: 16px; margin-top: 10px; color: var(--orange-dark); font-weight: 700; }
.scroll-hint { font-size: 13px; color: var(--text-sub); margin-top: 14px; letter-spacing: .1em; }
.scroll-hint span { display: block; color: var(--orange); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

/* ---------- STEP 02 ---------- */
.life-icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 22px; }
.life-icons li { background: var(--white); border-radius: 16px; padding: 12px 2px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); }
.life-icons span { display: block; font-size: 30px; line-height: 1.3; }

/* ---------- STEP 03 ---------- */
.big-years { font-family: var(--font-round); font-weight: 700; color: var(--orange); font-size: 22px; margin-top: 18px; }
.big-years span { font-size: 72px; line-height: 1; letter-spacing: -.02em; }
.big-years small { font-size: 36px; color: var(--text-sub); margin: 0 6px; }

/* ---------- STEP 04 シミュレーター ---------- */
.sim-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 14px; margin-top: 20px; text-align: left; }
.amount-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: block; text-align: center; padding: 10px 2px; border-radius: 9999px;
  border: 2px solid #fed7aa; background: var(--white); font-weight: 700; font-size: 14px; line-height: 1.3; white-space: nowrap;
}
.chip input:checked + span { background: var(--orange); border-color: var(--orange); color: var(--white); }
.chip-wide { grid-column: 1 / -1; }
.chip-wide span { font-size: 14px; font-weight: 500; }
.other-wrap { margin-top: 14px; }
.other-wrap label { font-size: 14px; font-weight: 700; }
.other-input { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.other-input input {
  flex: 1; min-width: 0; font-size: 20px; padding: 10px 14px; border: 2px solid #fed7aa; border-radius: 12px; font-family: inherit;
}
.other-input input:focus { outline: none; border-color: var(--orange); }
.sim-error { color: #b91c1c; font-size: 13px; margin-top: 6px; }

.results { margin-top: 24px; background: var(--cream); border-radius: 16px; padding: 18px 14px; }
.results.is-empty .bar-row strong { color: var(--text-sub); }
.results-title { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.bar-row { margin-top: 12px; }
.bar-label { font-size: 15px; }
.bar-label strong { font-family: var(--font-round); font-size: 26px; color: var(--orange-dark); margin-left: 4px; }
.bar { height: 16px; background: #fde7c7; border-radius: 9999px; overflow: hidden; margin-top: 4px; }
.bar-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #fdba74, var(--orange)); border-radius: 9999px; transition: width .5s ease; }
.bar-fill.is-rise { background: linear-gradient(90deg, #86efac, var(--green)); }
.rise-result .bar-label strong { color: var(--green); }
.toggle { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 15px; cursor: pointer; line-height: 1.6; }
.toggle input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--green); }
.rise-result { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #fdba74; }
.sim-note { font-size: 13px; color: var(--text-sub); margin-top: 10px; line-height: 1.7; text-align: left; }
.sim-note.center { text-align: center; margin-top: 20px; }
.sim-caution { font-size: 13px; color: var(--text-sub); margin-top: 16px; line-height: 1.7; }
.mid-cta { margin-top: 24px; }

/* ---------- STEP 06：ペルソナカード ---------- */
.persona-list { display: grid; gap: 18px; margin-top: 20px; text-align: left; }
.persona-card { background: var(--white); border-radius: 22px; box-shadow: 0 8px 22px rgba(194, 65, 12, .12); overflow: hidden; border: 1px solid #fde7c7; }
.persona-visual {
  height: 200px; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-repeat: no-repeat; border-radius: 0 0 26px 26px;
}
.persona-visual span { font-size: 64px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(194, 65, 12, .18)); }
/* 画像内のキャッチコピーを避けて人物が見える位置に合わせる */
.persona-kids { background-image: var(--persona-kids-img), linear-gradient(135deg, #ffedd5, #fde68a); background-position: center 88%; }
.persona-retire { background-image: var(--persona-retire-img), linear-gradient(135deg, #fed7aa, #fbcfe8); background-position: 30% 95%; }
.persona-couple { background-image: var(--persona-couple-img), radial-gradient(circle at 30% 30%, #fff7ed 0 18%, transparent 19%), linear-gradient(135deg, #fde68a, #fdba74); background-position: center 15%; }
.persona-postfit { background-image: var(--persona-postfit-img), radial-gradient(circle at 78% 26%, #fff7c2 0 14%, transparent 15%), linear-gradient(160deg, #bae6fd, #fef3c7 70%); background-position: center 45%; }
.persona-body { padding: 16px 18px 20px; }
.persona-name {
  display: inline-block; font-family: var(--font-round); font-weight: 700; font-size: 14px;
  color: var(--white); background: var(--orange); padding: 2px 14px; border-radius: 9999px;
}
.persona-copy { font-family: var(--font-round); font-weight: 700; font-size: 18px; line-height: 1.6; margin: 10px 0 10px; color: var(--text); word-break: keep-all; overflow-wrap: anywhere; }
.persona-points li { position: relative; padding-left: 28px; font-size: 16px; line-height: 1.7; margin-top: 6px; color: var(--text-sub); }
.persona-points li::before {
  content: "✓"; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--orange-light); color: var(--orange-dark); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}

/* ---------- STEP 07 ---------- */
.solution-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; text-align: left; }
.solution-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.solution-card img { width: 100%; aspect-ratio: 10 / 7; object-fit: cover; border-radius: 14px; margin-bottom: 12px; }
.solution-card h3 { font-family: var(--font-round); font-size: 17px; color: var(--green); margin-bottom: 4px; }
.solution-card p { font-size: 14px; line-height: 1.7; color: var(--text-sub); }

/* ---------- STEP 08 ---------- */
.question-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.question-grid li {
  background: var(--white); border-radius: 18px; padding: 14px 6px; font-size: 15px; font-weight: 700; line-height: 1.5; box-shadow: var(--shadow);
}
.question-grid span { display: block; font-size: 26px; line-height: 1.3; }
.know-first { font-family: var(--font-round); font-weight: 700; font-size: 24px; color: var(--orange-dark); margin: 28px 0 8px; }
#step08 .lead { margin-bottom: 22px; }
.micro-note { font-size: 13px; color: var(--text-sub); margin-top: 14px; }

/* ---------- フッター ---------- */
.site-footer { background: #3f2a1d; color: #f5e9dc; text-align: center; padding: 32px 0 40px; font-size: 13px; }
.site-footer a { color: #fed7aa; }
.footer-name { font-weight: 700; margin-bottom: 6px; }
.privacy-note { text-align: left; margin: 20px auto 0; font-size: 12px; line-height: 1.7; color: #f1e4d6; }
.privacy-title { font-size: 13px; margin-bottom: 6px; color: #fff; }
.privacy-note p + p, .privacy-note ul { margin-top: 6px; }
.privacy-note ul { list-style: disc; padding-left: 1.4em; }
.copyright { margin-top: 16px; font-size: 12px; }

/* ---------- PC ---------- */
@media (min-width: 768px) {
  .container { max-width: 560px; }
  .heading { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
