/* =========================
   Design Tokens（Soft Blue + コントラスト調整）
========================= */
:root{
  --bg:#F6FAFF; --paper:#FFFFFF; --ink:#1F2A37; --muted:#667085;
  --accent:#3A8DFF; --accent-600:#2563EB;
  --brand-grad:linear-gradient(135deg,#80BFFF 0%,#3A8DFF 55%,#2563EB 100%);
  --shadow:0 8px 24px rgba(31,42,55,.08);
  --radius:16px; --maxw:1120px;

  /* Section tones（はっきり差をつける） */
  --tone-hero:#EAF2FF;
  --tone-features:#F0F7FF;
  --tone-flow:#EFFAF3;
  --tone-voices:#FFF5EC;
  --tone-faq:#F4F0FF;
  --tone-cta:#FFFFFF;
  --tone-footer:#EEF5FF;

  /* LINE CTA */
  --cta-green:#06C755;
  --cta-green-600:#059B3A;
  --cta-grad:linear-gradient(135deg,#63E691 0%,#06C755 55%,#059B3A 100%);
  --cta-focus:rgba(6,199,85,.25);
}

/* =========================
   Base / Utilities
========================= */
*{box-sizing:border-box}
html,body{
  margin:0;padding:0;background:var(--bg);color:var(--ink);
  font-family:'Noto Sans JP',system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif;
  line-height:1.6
}
img{max-width:100%;height:auto;display:block}
a{color:var(--accent);text-decoration:none}
a:hover{opacity:.9}
.container{max-width:var(--maxw);margin:0 auto;padding:0 16px}
.paper{background:var(--paper);box-shadow:var(--shadow);border-radius:var(--radius);padding:16px}
.cta{
  display:inline-flex;gap:.6em;align-items:center;border:none;border-radius:999px;
  padding:14px 20px;font-weight:700;cursor:pointer;transition:.2s;
  background:var(--cta-grad);color:#fff
}
.cta--ghost{background:#fff;color:var(--accent);border:2px solid var(--accent)}
.cta:active{transform:translateY(1px)}
.tag{display:inline-block;padding:.25em .6em;border-radius:999px;background:#EAF3FF;border:1px solid #BFD7FF;color:#1E40AF;font-size:.85rem}
.small{font-size:.88rem;color:#817d7b}
.only-pc{display:none}
.link-hero-about{display:block;text-align:center;font-size:1.1em;font-weight:700;color:#1E88E5;margin-bottom:16px}

/* フォーカス可視（アクセシビリティ） */
.cta:focus-visible,
.to-top:focus-visible,
.nav__links a:focus-visible,
.burger:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(58,141,255,.35), 0 0 0 6px rgba(58,141,255,.18);
  border-radius:12px;
}

/* スキップリンク */
.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:16px; top:16px; width:auto; height:auto; padding:10px 14px;
  background:#fff; color:#000; z-index:1001; border-radius:10px; box-shadow:0 6px 18px rgba(0,0,0,.12);
}

/* =========================
   Header / Navigation
========================= */
header{position:sticky;top:0;z-index:50;background:rgba(240,247,255,.8);backdrop-filter:blur(6px);border-bottom:1px solid #E1ECF8}
.nav{display:flex;align-items:center;justify-content:space-between;height:60px}
.brand{display:flex;align-items:center;gap:.6rem;font-weight:800}
.brand__logo{width:28px;height:28px;border-radius:8px;background:var(--brand-grad);box-shadow:0 4px 12px rgba(58,141,255,.35)}
.nav__links{display:none;gap:16px;align-items:center}
.burger{width:42px;height:42px;border:none;border-radius:10px;background:#fff;box-shadow:var(--shadow);display:grid;place-items:center}
.burger span{width:20px;height:2px;background:var(--ink);position:relative}
.burger span::before,.burger span::after{content:"";position:absolute;left:0;width:20px;height:2px;background:var(--ink)}
.burger span::before{top:-6px}.burger span::after{top:6px}
/* mobile drawer */
.drawer{display:none;z-index:1000}
.drawer.open{display:block;border-top:1px solid #E1ECF8;background:#fff}
.drawer a{display:block;padding:14px 16px;border-bottom:1px solid #EAF1FA}

/* =========================
   Hero
========================= */
.hero{padding:56px 0 40px; background:var(--tone-hero)}
.hero__wrap{display:grid;gap:24px}
.headline{font-size:clamp(1.6rem,4vw,2.6rem);line-height:1.25;font-weight:800;letter-spacing:.02em;margin:.2em 0}
.sub{color:var(--muted);margin:0 0 10px}
.hero__cta{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}
.trust{display:grid;gap:12px}
.hero .award-title{margin:22px 0 10px;font-weight:800;text-align:center;color:#1E40AF;letter-spacing:.02em}
.hero .badges{display:flex;justify-content:center;gap:20px;flex-wrap:wrap}
.hero .badges img{ width:clamp(72px,28vw,240px);height:auto;display:block }

/* Header Visual */
.header-visual { width:100%; aspect-ratio: 21 / 9; overflow:hidden; position:relative }
.header-visual img { width:100%; height:100%; object-fit:cover; display:block; margin:0 }
@media (max-width: 599.98px){
  .header-visual { aspect-ratio: auto; overflow:visible }
  .header-visual picture, .header-visual img{ width:100%; height:auto; display:block }
  .header-visual img{ object-fit:contain; object-position:center top }
}

/* =========================
   Sections / Cards / Grid
========================= */
section{padding:28px 0}
.sec__title{
  font-size:1.4rem;font-weight:800;margin:0 0 16px;text-align:center;position:relative
}
.sec__title::after{
  content:"";display:block;width:72px;height:4px;border-radius:4px;margin:10px auto 0;
  background:linear-gradient(90deg,var(--accent),var(--accent-600));
}
.grid{display:grid;gap:14px}
.card{padding:16px;border:1px solid #D8E6F8;border-radius:14px;background:#fff}
.card h3{margin:.2em 0 .4em;font-size:1.05rem}

/* =========================
   Media Mentions
========================= */
#media-mentions{ background:var(--tone-features) }
#media-mentions .media-links{ display:flex; gap:20px; justify-content:center; flex-wrap:wrap }
#media-mentions .media-card{
  background:#EAF3FF; padding:20px; border-radius:12px; text-align:center; 
  box-shadow:0 4px 12px rgba(58,141,255,.08); max-width:420px;
}
#media-mentions .media-card img{ width:50px; height:50px; margin:0 auto 10px }

/* =========================
   Features
========================= */
#features{ background:var(--tone-features) }
#features .onebox{padding:20px 16px}
#features .checklist{list-style:none;margin:0;padding:0;column-count:1;column-gap:32px}
#features .checklist li{ position:relative;padding-left:1.4em;margin:.35em 0;break-inside:avoid }
#features .checklist li::before{ content:"◆";position:absolute;left:0;top:.1em;color:var(--accent);font-weight:700 }

/* =========================
   Content Introduction（ミント）
========================= */
#content-introduction{ background:var(--tone-flow) }
#content-introduction .content-grid{ display:grid; gap:20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) }
#content-introduction .content-card{
  background:#FFFFFF; padding:20px; border-radius:12px; text-align:center; box-shadow:0 4px 12px rgba(58,141,255,.08);
}
#content-introduction .content-card img{ width:50px; height:50px; margin:0 auto 10px }
#content-introduction .legal-note{ margin-top:20px; text-align:center; font-size: .9em; color:#667085 }

/* =========================
   Flow（ミント）
========================= */
/* #flow の既存ルールに追記（背景はそのまま） */
/* 10/17修正 */
#flow{
  background: var(--tone-flow);
  overflow-x: hidden; /* フォールバック */
  overflow-x: clip;   /* 10/17修正: iOS含む最新ブラウザで横スクロール抑止 */
}
#flow .steps, #flow .step { min-width: 0; } /* 10/17修正 */
#flow .steps{
  counter-reset:s;
  display:grid;
  gap:14px;
  overflow:hidden; /* 10/17修正: 余剰1pxをカット */
}
#flow .step{
  position:relative;display:grid;gap:12px;align-items:start;
  background:#fff;border:1px solid #D8E6F8;border-radius:14px;padding:16px;text-align:center; /* ← セミコロン追加 */
  min-width:0; /* 10/17修正 */
}

/* ステップバッジ：transform を使わず margin 中央寄せ／親の余白ぶんだけ控えめ幅 */
/* 10/17修正 */
#flow .step::before{
  counter-increment:s;content:"STEP " counter(s);
  display:block;
  height:36px;margin:0 auto 8px;padding:0 10px;
  border-radius:999px;background:var(--accent);color:#fff;
  font-weight:700;letter-spacing:.02em;place-items:center;

  /* 中央寄せ（サブピクセル誤差を避ける） */
  margin-inline:auto;

  /* 親幅に追従しつつ、パディング 16px × 2 = 32px だと余白が小さい端末で窮屈なので
     12px相当を安全マージンに採用（合計 24px 控えめ） */
  width:auto;
  max-width:calc(100% - 24px);        /* 10/17修正 */
  inline-size:min(100%,480px);        /* 10/17修正 */
  box-sizing:border-box;
}

/* 画像（丸アイコン） */
#flow .step img{
  width:60px;height:60px;margin:0 auto 10px;border-radius:50%;background-color:var(--accent);padding:10px;
  box-shadow:0 4px 12px rgba(58,141,255,.35);
}
#flow .step img:hover{ transform: scale(1.05); transition: transform .2s ease-in-out }

/* Flow のバナー画像を中央・レスポンシブで（10/17微調整含む） */
#flow .step .step__banner{
  justify-self:center;
  display:inline-block;
  margin-top:10px;
  max-width:100%;                /* 10/17修正 */
  overflow:hidden;               /* 10/17修正 */
}
#flow .step .step__banner img{
  display:block;
  width:100%; max-width:320px;   /* 10/17修正: 親幅に追従＋上限 */
  height:auto;
}

/* 念のため：#flow セクション内の画像は必ずコンテナ内に収める */
#flow img{
  max-width:100%;
  height:auto;
}

/* 端末回転直後のズレ吸収（iOS対策の軽いレイアウト再計算） */
@supports (contain: inline-size){
  #flow .step{ contain:inline-size; } /* 10/17修正 */
}

/* =========================
   FAQ（ラベンダー）
========================= */
#faq{ background:var(--tone-faq) }
.faq-grid{ display:grid; gap:20px; grid-template-columns: 1fr }
@media (min-width: 769px){ .faq-grid{ grid-template-columns: repeat(3, 1fr) } }

/* =========================
   Community Introduction
   モバイル：薄ブルー背景 + 白カード
   PC：セクション背景を白でフルブリード
========================= */
#community-introduction{ background:#F0F7FF; padding:40px 0 }
#community-introduction .community-content{
  background:#FFFFFF; padding:20px; border-radius:12px; box-shadow:0 4px 12px rgba(31,42,55,.08);
}
#community-introduction .community-columns{
  display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap;
}
#community-introduction .community-col{
  flex:1 1 240px; background:#EAF3FF; padding:20px; border-radius:8px; text-align:center;
}
#community-introduction .community-col:nth-child(2){ background:#DFF6FF }
#community-introduction .muted{ margin-top:20px; color:#667085 }
#community-introduction .note-warm{ background:#FFF9F3; padding:20px; border-radius:8px; color:#3C2D27 }
#community-introduction .note-cool{ background:#EAF3FF; padding:20px; border-radius:8px; color:#1F2A37 }
#community-introduction .cta-center{ text-align:center; margin-top:20px }
#community-introduction .cta--line{ background:var(--cta-grad); color:#fff }
#community-introduction .community-slogan{ margin-top:20px; text-align:center; color:#1F2A37; font-weight:700 }

@media (min-width:1024px){
  #community-introduction{ background:#FFFFFF }
  #community-introduction .community-content{ background:transparent; box-shadow:none; padding:0 }
}

/* =========================
   CTA band
========================= */
.cta-band{ background:#1E88E5; color:#FFFFFF; text-align:center; padding:40px; font-size:1.4em; font-weight:700 }

/* =========================
   Footer
========================= */
footer{padding:36px 0;border-top:1px solid #E1ECF8;color:#6b6765;background:var(--tone-footer)}
.footer__cols{display:grid;gap:14px}

/* =========================
   Section Divider
========================= */
section + section{ border-top:1px solid #E1ECF8 }

/* =========================
   “全部のセクションに”薄いインセット影
========================= */
main > section{ box-shadow: inset 0 10px 18px rgba(31,42,55,.06) }

/* スムーススクロール（OSが軽減設定ならオフ） */
html{ scroll-behavior:smooth }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto } }

/* ── Back to Top ボタン ── */
.to-top{
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 1000;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31,42,55,.18);
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
  opacity: 0;
  pointer-events: none;
}
.to-top:hover{ transform: translateY(-2px); box-shadow: 0 14px 28px rgba(31,42,55,.22) }
.to-top:active{ transform: translateY(0) }
.to-top.is-show{ opacity:1; pointer-events:auto }

/* モバイルはタップ面積を少し大きく */
@media (max-width: 599.98px){
  .to-top{ right: 12px; bottom: 16px; width: 56px; height: 56px }
}

/* =========================
   Media Queries
========================= */
@media(min-width:768px){
  .only-pc{display:inline}
  .nav__links{display:flex}
  .burger{display:none}

  .hero__wrap{grid-template-columns:1.15fr .85fr;align-items:center}
  .footer__cols{grid-template-columns:2fr 1fr 1fr}
  #features .checklist{column-count:2}
}
@media(min-width:1024px){
  .hero{padding:72px 0 56px}
  .hero__wrap{ grid-template-columns:1fr !important; justify-items:center; text-align:center }
  .hero__copy{grid-column:1/-1;margin-inline:auto;max-width:840px}
  .headline,.sub{text-align:center}
  .hero__cta{justify-content:center}
  .trust{justify-items:center}
  .hero .badges{gap:18px}
}

/* モバイル最適化 CTA（任意の全体微調整） */
@media (max-width: 767px){
  .cta{
    padding: 10px 14px;
    font-size: 0.7rem;
    min-height: 44px;
    gap: .4em;
  }
}

/* 追加：タブレット単列 */
@media (min-width:768px) and (max-width:1023.98px){
  .hero__wrap{ grid-template-columns: 1fr; }
}

/* 最終保険：横スクロール抑止（根本解決後も念のため） */
html, body { overflow-x: hidden; } /* 10/16修正: はみ出し時の最終ガード */

/* =========================
   CTAボタンの中央寄せ復旧
   10/17修正
========================= */

/* 親がテキスト整形 or grid の場合に効く */
#flow .cta,
.section-cta{
  text-align:center;      /* 10/17修正 */
  justify-self:center;    /* 10/17修正 */
}

/* 親がflexのときでも確実に中央 */
#flow .cta{
  display:flex;           /* 10/17修正 */
  justify-content:center; /* 10/17修正 */
}

/* ボタン自身で“自分を中央寄せ”にする（親の影響を受けにくい） */
#flow .cta > a,
#flow .cta > button{
  display:block;          /* 10/17修正 */
  width:fit-content;      /* 10/17修正：内容幅に縮む */
  margin-inline:auto;     /* 10/17修正：左右オートで中央 */
}

/* スマホでだけ中央寄せを強制したい場合（任意） */
@media (max-width: 767px){
  #flow .cta{
    display:flex;
    justify-content:center;
    text-align:center;
  }
  #flow .cta > a,
  #flow .cta > button{
    width:fit-content;
    margin-inline:auto;
  }
}

/* Flow 補足：バナーや画像の共通ルール（重複防止のため最後に保持） */
#flow .step .step__banner{ justify-self:center; display:inline-block; margin-top:10px; }
#flow .step .step__banner img{ display:block; width:100%; max-width:320px; height:auto; }

/* ヒーロー重ねCTA */
.hero-cta{
  position: absolute;
  left: clamp(48px,12vw, 180px); /* 10/16修正 */
  bottom: clamp(16px, 3vw, 48px);
  z-index: 2;
  padding: 20px 28px;
  box-shadow: 0 12px 28px rgba(31,42,55,.22);
  backdrop-filter: saturate(110%);
}
.hero-cta:hover{ transform: translateY(-2px) }
.hero-cta:active{ transform: translateY(0) }
@media (max-width: 767px){
  .hero-cta{
    left: 20%;                 /* 10/16修正 */
    transform: translateX(-50%);
    bottom: 12px;
    padding: 12px 16px;        /* 10/16修正 */
    font-size: 0.95rem;        /* 10/16修正 */
    min-height: 44px;          /* 10/16修正 */
    box-shadow: 0 8px 20px rgba(31,42,55,.18); /* 10/16修正 */
  }
}

/* community-introduction の横長画像 */
#community-introduction .community-hero{ margin: 12px 0 22px; }
#community-introduction .community-hero img{
  display:block;
  width:100%;
  height:auto;
  border-radius:12px;
  box-shadow:0 8px 24px rgba(31,42,55,.08);
}

/* PCは3カラム（既存）・各カードの高さを均す */
#faq .faq-grid > *{
  height:100%;
  display:flex;
  flex-direction:column;
}

/* --- #community-introduction：一部だけ2カラム化する共通ブロック --- */
#community-introduction .community-split{
  display: grid;
  gap: 16px;
  margin-block: 20px;
}
#community-introduction .community-split__body{ display: grid; gap: 12px; }
#community-introduction .community-split__visual img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  object-fit: cover;
}
/* PCで2カラム化（右カラム幅は調整OK） */
@media (min-width: 1024px){
  #community-introduction .community-split{
    grid-template-columns: 1fr 400px;
    align-items: start;
    gap: 24px;
  }
}

/* 見出し（ヒーロー文言）の安全対策 */
.headline{
  text-align: center;
  line-height: 1.25;
  font-weight: 700;
  font-size: clamp(28px, 4.2vw, 44px);
  margin: 0.2em auto 0;
  text-wrap: balance;           /* 10/16修正 */
  overflow-wrap: anywhere;      /* 10/16修正 */
}
/* 2行目：nowrapを禁止して折り返し許可 */
.headline .hl-line2{
  display: inline;              /* 10/16修正 */
  white-space: normal;          /* 10/16修正 */
}

/* =========================
   Media Mentions（左右同じサイズで揃える）
========================= */
#media-mentions { background: var(--tone-features); }

/* スマホ：1列 & カード自体を中央寄せ */
#media-mentions .media-links{
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: stretch;
}
#media-mentions .media-card{
  width: 100%;
  max-width: 420px;
}
#media-mentions .media-card img{ width: 50px; height: 50px; margin: 0 auto 10px; }
#media-mentions .media-card h3{ margin: .2em 0 .2em; font-weight: 800; }
#media-mentions .media-card p{ margin: 0 0 12px; }
#media-mentions .media-card .cta{ justify-self: center; }
/* タブレット以上は「2列」かつ中央寄せ */
@media (min-width: 768px){
  #media-mentions .media-links{
    grid-template-columns: repeat(2, minmax(320px, 420px));
    justify-content: center;
    justify-items: stretch;
  }
  #media-mentions .media-card{ max-width: none; }
}
/* =========================
   #flow 最終リカバリ（Step3以降の中央寄せ/はみ出し）
   10/17最終パッチ
========================= */

/* 1) 各STEPカードの幅を安定化（親コンテナ内で中央・上限あり） */
#flow .step{
  width: min(100%, 720px);   /* 端末回転後もカード幅が暴れない基準を作る */
  margin-inline: auto;       /* セクション内でカード自体を中央に */
}

/* 2) ステップバッジはカード幅基準で“確定幅”＋パディング込みで収める */
#flow .step::before{
  width: min(480px, calc(100% - 32px));  /* 親の padding:16px×2 を正確に控える */
  box-sizing: border-box;
  margin-inline: auto;                    /* 変換を使わず中央寄せ */
  line-height: 36px;                      /* テキスト上下中央 */
}

/* 3) 見出し・本文の横幅を適度に絞って中央に */
#flow .step h3,
#flow .step p{
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* 4) CTA の“display上書き”をロールバックして素直に中央へ
      （inline-flex のまま margin: auto が効くように） */
#flow .cta{
  display: inline-flex !important; /* 既存の .cta と同じ表示方式に戻す */
  margin-inline: auto;             /* 要素自身を中央に */
}
#flow .step .cta{ justify-content: center; } /* 中身のアイコン/テキストも中央 */

/* 5) 念のため：#flow 内の横はみ出しをもう一段ガード */
#flow,
#flow .steps{
  overflow-x: clip;
}
