:root {
  --primary: #ff5a5f;
  --secondary: #f8f8f8;
  --dark: #333;
  --brand: var(--primary);
  --header-h: 70px;
  /* FAB (BackToTop) */
  --fab-gap: 16px;
  --fab-size: clamp(56px, 6.5vw, 72px);

  /* sticky-cta の実測高さは JS で --cta-height にセット（未設定時は 0 扱い） */
}

/* Reset-ish */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
body {
  line-height: 1.6;
  color: var(--dark);
}

/* ---------- ヘッダー ---------- */
header {
  background: #fff;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}
nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
nav a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
}
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  user-select: none;
}

/* ---------- ヒーロー ---------- */
.hero {
  background: url('https://msv-life.com/img/hero.jpg') center/cover no-repeat;
  height: 90vh;
  display: flex;
  align-items: center;
  color: #fff;
  margin-top: 70px; /* ヘッダーの高さ分 */
}
.hero .content {
  max-width: 600px;
  background: rgba(0,0,0,0.5);
  padding: 2rem;
  border-radius: 1rem;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero p  { font-size: 1.2rem; margin-bottom: 2rem; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: bold;
  transition: opacity .2s ease;
}
.btn:hover { opacity: .85; }

/* ---------- 特徴 ---------- */
.features {
  padding: 4rem 0;
  background: var(--secondary);
}
.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 2rem;
}
.feature {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  text-align: center;
}
.feature img { width: 80px; margin-bottom: 1rem; }

/* ---------- 口コミ ---------- */
.testimonials { padding: 4rem 0; }
.testimonials h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}
.testimonial-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 2rem;
  padding: 1rem;
}
.testimonial {
  flex: 0 0 300px;
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  scroll-snap-align: start;
  text-align: center;
}
/* アバター */
.testimonial img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
}

/* ---------- CTA セクション ---------- */
.cta {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 4rem 1rem;
}
.cta h2 { font-size: 2rem; margin-bottom: 1rem; }

/* ---------- フッター ---------- */
footer {
  background: #222;
  color: #aaa;
  padding: 2rem 0;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}
footer a {
  color: #aaa;
  text-decoration: none;
  font-size: .9rem;
}
footer p {
  text-align: center;
  font-size: .8rem;
}

/* ---------- レスポンシブ（ヘッダー） ---------- */
@media (max-width: 768px) {
  nav ul {
    display: none;
    position: absolute;
    top: 70px;
    right: 10px;
    flex-direction: column;
    background: #fff;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
  }
  nav ul.open { display: flex; }
  .menu-toggle { display: block; }
  .hero h1 { font-size: 2rem; }
}

/* ===== 使い方（3STEP） ===== */
.howto { background:#fafafa; padding:60px 0; }
.howto h2 { font-size:2rem; text-align:center; margin-bottom:48px; }
.howto h2 .accent { color:#e94e77; }

/* カード */
.step-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.step {
  flex: 1 1 calc(33.333% - 24px);
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  padding: 40px 24px 32px;
  text-align: center;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
}
.step:hover { transform: translateY(-6px); box-shadow: 0 10px 25px rgba(0,0,0,.08); }
.step-number {
  width: 64px; height: 64px; line-height: 64px;
  margin: 0 auto 16px; border-radius: 50%;
  background: linear-gradient(135deg,#ff7e5f,#feb47b);
  color:#fff; font-size:24px; font-weight:700;
}
.step img {
  width: 92px; height: 92px; object-fit: cover;
  border-radius: 50%; margin-bottom: 16px;
}
.step h3 { font-size:1.25rem; margin-bottom:8px; }
.step p { font-size:.95rem; line-height:1.6; color:#555; }
/* 矢印 */
.step:not(:last-child)::after{
  content:''; position:absolute; top:50%; right:-12px; transform:translateY(-50%);
  border-top:16px solid transparent; border-bottom:16px solid transparent; border-left:16px solid #e6e6e6;
}
@media (max-width:768px){
  .step { flex:1 1 100%; }
  .step:not(:last-child)::after{ display:none; }
}

/* ===== 安心・安全 ===== */
.safety { background:#fff; padding:60px 0; }
.safety h2 { text-align:center; font-size:2rem; margin-bottom:16px; }
.safety .lead { text-align:center; margin-bottom:48px; color:#555; font-size:1rem; }
.safety-grid {
  display:flex; flex-wrap:wrap; gap:24px; justify-content:space-between;
}
.safety-item{
  flex:1 1 calc(25% - 24px);
  background:#fafafa; border:1px solid #e6e6e6; border-radius:16px;
  padding:32px 16px; text-align:center;
  transition: transform .3s ease, box-shadow .3s ease;
}
.safety-item:hover{ transform: translateY(-6px); box-shadow:0 10px 25px rgba(0,0,0,.08); }
.safety-item img{
  width:88px; height:88px; object-fit:cover; border-radius:50%; margin-bottom:16px;
}
.safety-item h3{ font-size:1rem; line-height:1.4; color:#333; }
@media (max-width:768px){ .safety-item{ flex:1 1 100%; } }

/* ===== Back to Top（FAB） ===== */
.back-to-top{
  width: var(--fab-size);
  height: var(--fab-size);
  right: var(--fab-gap);
  bottom: calc(var(--fab-gap) + var(--cta-height, 0px) + 12px) !important; /* CTA を避ける */
  position: fixed;
  border: none;
  border-radius: 50%;
  background: var(--line-green);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(6,199,85,.25);
  cursor: pointer;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s .25s;
  touch-action: manipulation;
}
.back-to-top.is-show{ opacity:1; visibility:visible; transform:translateY(0); }
.back-to-top svg{ width:clamp(24px,3vw,36px); height:clamp(24px,3vw,36px); }
/* フォーカス可視化（アクセシビリティ） */
.back-to-top:focus-visible{
  outline: 3px solid var(--line-green-dark);
  outline-offset: 3px;
}
@media (max-width:768px){ .back-to-top{ right:14px; } } /* bottomは再定義しない */


/* ちょい明るく：ホバー */
@media (hover:hover){
  .back-to-top:hover{ filter: brightness(1.06); }
}

/* ===== Sticky CTA（最下部固定CV） ===== */
.sticky-cta{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: grid; place-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); /* safe-area を内側で吸収 */
  z-index: 9999;
  background: rgba(255,255,255,0.9);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  backdrop-filter: saturate(1.2) blur(8px);
  border-top: 1px solid rgba(0,0,0,.06);
}
.sticky-cta__btn{
  min-width: 240px;
  height: var(--cta-btn-height, 64px);
  line-height: calc(var(--cta-btn-height, 64px) - 4px);
  padding: 0 20px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: var(--brand);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(233,78,119,.25);
}
@media (min-width:992px){ .sticky-cta{ display:none; } }

/* フッターが隠れないよう、CTA実測高さぶんだけ下余白を予約（safe-areaはCTA内で吸収済） */
body.has-sticky-cta-padding{
  padding-bottom: calc(var(--cta-height, 0px) + 16px) !important;
}
@media (min-width:992px){
  body.has-sticky-cta-padding{ padding-bottom: 0 !important; }
}
/* ===== LINEデザイン ===== */
:root{
  --line-green: #06C755;
  --line-green-dark: #0a7d3f;
}

/* 共通のLINEボタン */
.btn-line{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  height: 56px;
  line-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--line-green);
  color: #fff;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(6,199,85,.25);
  transition: filter .2s ease, transform .08s ease;
}
.btn-line:hover{ filter: brightness(1.06); }
.btn-line:active{ transform: translateY(1px); }
.btn-line:focus-visible{ outline:3px solid #0a7d3f; outline-offset:3px; }
.btn-line__icon{ display:inline-flex; width:24px; height:24px; }
.btn-line__label{ font-size:1rem; white-space:nowrap; }

/* ヒーロー用（少し大きめに） */
.btn-line--hero{
  min-width: 260px;
  height: 64px;
  line-height: 60px;
  padding: 0 24px;
  font-size: 1.05rem;
}
.btn-line--hero .btn-line__icon{ width:28px; height:28px; }

/* ===== 法務ページ共通 ===== */
.legal-section { background:#fff; padding:60px 0; }
.legal-section h2 { font-size:2rem; margin-bottom:16px; text-align:left; }
.legal-updated { color:#666; font-size:.9rem; margin-bottom:24px; }
.legal-section h3 { font-size:1.15rem; margin:28px 0 12px; }
.legal-section p { margin-bottom:12px; }
.legal-list { padding-left:1.2em; margin:8px 0 12px; }
.legal-list li { list-style: disc; margin-left: .4em; margin-bottom: .4em; }

/* 特商法テーブル（DL表示） */
.law-table { display:grid; grid-template-columns: 1fr; gap:10px; }
.law-table > div { display:grid; grid-template-columns: 160px 1fr; gap:16px; align-items:flex-start;
  padding:12px 14px; background:#fafafa; border:1px solid #eee; border-radius:8px; }
.law-table dt { font-weight:700; color:#333; }
.law-table dd { margin:0; color:#444; }

@media (max-width:768px){
  .legal-section { padding:48px 0; }
  .law-table > div { grid-template-columns: 1fr; }
}

/* （任意）コンタクト簡易フォーム */
.contact-form { display:grid; gap:12px; margin-top:16px; }
.contact-form label { display:grid; gap:6px; font-weight:600; }
.contact-form input, .contact-form textarea {
  padding:10px 12px; border:1px solid #ddd; border-radius:8px; font-size:1rem;
}
.contact-form button { align-self:start; }
.contact-form .form-note { font-size:.85rem; color:#777; margin-top:6px; }

main > .legal-section:first-child{
  /* 既存の .legal-section の padding-top:60px にヘッダー分を足す */
  padding-top: calc(60px + var(--header-h));
}

.legal-section h1, .legal-section h2, .legal-section h3{
  scroll-margin-top: calc(var(--header-h) + 12px);
}