/* ==========================================================================
   ご利用の流れ `/flow/`
   出典: docs/design-spec/03_flow.md（Zeplin 実測値）
   PC アートボード 1920×5564 / SP アートボード 375×5924

   画像のコピー元（design/assets/ → images/flow/）
     79__5058.png    → lead-photo.webp
     2__6008.png     → schedule-illust.webp
     staff__6282.svg → cta-staff.webp（PC rect x1098 y4854 271×196 を切り出し）
     1__6268.png     → cta-illust.webp
     layer__6408.svg / layer__6344.svg
       → wave-white-pc/sp.svg・wave-cream-pc/sp.svg
         （支給 SVG はフル画板の PNG が誤った箱に収められていてそのままでは
           使えないため、埋め込み PNG の境界を実測して波形だけを抜き出した。
           振れ幅は PC 84px / SP 30px で仕様書通り。work と同一形状）
   ========================================================================== */

/* --------------------------------------------------------------------
   セクション境界の波形
   -------------------------------------------------------------------- */
.p-flow__lead,
.p-flow__steps,
.p-flow__cond,
.p-flow__sched {
  position: relative;
  background-repeat: no-repeat;
  background-position: 0 var(--wave-h);
  background-size: 100% calc(100% - var(--wave-h));
}

/* 後続セクションの重なり順。数字が大きいほど手前。
   🚨 円形写真（.p-flow__lead-photo）はこの重なり順より**手前**に出す。
      デザイン（03_flow_pc.png）では写真の円がクリーム帯の波に重なって全部見えている。 */
.p-flow__steps { z-index: 1; }
.p-flow__cond  { z-index: 2; }
.p-flow__sched { z-index: 3; }
.p-flow__faq   { position: relative; z-index: 4; background: var(--c-white); }
.p-flow__cta   { position: relative; z-index: 5; background: var(--c-orange-light); }

/* 波の色 = そのセクションの地色。波形は components.css の [data-wave]。 */
.p-flow__lead  { --wave-fill: var(--c-white); background-image: linear-gradient(var(--c-white), var(--c-white)); }
.p-flow__steps { --wave-fill: var(--c-cream); background-image: linear-gradient(var(--c-cream), var(--c-cream)); }
/* 🚨 cond は「白のセクションが、クリームのセクションの次」に来る。上を透過させると
   白の上に白を描くことになり波が消える（2026-09-15 まで実際に消えていた）。
   ここだけ data-wave="b-up" にして、曲線より上を**前のセクションの色**で塗る。 */
.p-flow__cond  { --wave-fill: var(--c-cream); background: var(--c-white); }
.p-flow__sched { --wave-fill: var(--c-cream); background-image: linear-gradient(var(--c-cream), var(--c-cream)); }


/* --------------------------------------------------------------------
   セクション3 リード（PC y=409..986 / 03_flow.md 2章）
   -------------------------------------------------------------------- */
.p-flow__lead {
  margin-top: -91px;   /* 緑帯 120..500 の下端に 409 から重ねる */
  padding-block: 157px 77px;
}
.p-flow__lead-inner { position: relative; }

.p-flow__lead-title {
  max-width: 640px;
  font-size: 40px;
  line-height: 56px;
  color: var(--c-green);
}
.p-flow__lead-body {
  max-width: 630px;
  margin-top: 31px;
  font-size: 20px;
  font-weight: var(--fw-bold);
  line-height: 40px;
  text-align: justify;
  color: var(--c-text);
}
.p-flow__lead-photo {
  position: absolute;   /* 次セクションの波にかかるので高さには含めない */
  z-index: 6;           /* 次セクション（steps=1 / cond=2 / sched=3）より手前 */
  top: 10px;            /* 市川様の指定（2026-09-16） */
  right: 0;
  width: 480px;
  height: 480px;
}

/* --------------------------------------------------------------------
   セクション4 ご利用開始までの流れ（PC y=987..1758 / 3章）
   PC は横並び 5 カラム＋水平ライン。ドットは 1・5 が塗り、2〜4 が中抜き。
   -------------------------------------------------------------------- */
.p-flow__steps { padding-block: 213px 57px; }
.p-flow__steps-title { text-align: center; }

.p-flow__steps-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 40px;
  margin-top: 48px;
}
/* 水平ライン 970×2（先頭ドット中心 → 末尾ドット中心）。
   カラム幅 200px なので左右 100px がドット中心にあたる。
   ドット中心はカラム上端から 107px（STEP 18 + 6 + 数字 60 + 13 + 10）。 */
.p-flow__steps-list::before {
  content: "";
  position: absolute;
  top: 106px;
  left: 100px;
  right: 100px;
  height: 2px;
  background: var(--c-green);
}

.p-flow__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.p-flow__step-label {
  font-size: 18px;
  font-weight: var(--fw-bold);
  line-height: 1;
  color: var(--c-green);
}
.p-flow__step-num {
  margin-top: 6px;
  font-size: 60px;
  font-weight: var(--fw-bold);
  line-height: 1;
  color: var(--c-green);
}
.p-flow__step-dot {
  position: relative;
  z-index: 1;
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 13px;
  border: 3px solid var(--c-green);   /* 2〜4 は中抜き */
  border-radius: 50%;
  background: var(--c-white);
}
.p-flow__step:first-child .p-flow__step-dot,
.p-flow__step:last-child  .p-flow__step-dot { background: var(--c-green); }

.p-flow__step-title {
  margin-top: 46px;
  font-size: 28px;
  line-height: 1;
  color: var(--c-text);
}
.p-flow__step-text {
  align-self: stretch;
  margin-top: 23px;
  font-size: 16px;
  font-weight: var(--fw-medium);
  line-height: 24px;
  text-align: justify;
  color: #000000;   /* 03_flow.md 3章「説明文 #000000」。トークンに無い色 */
}

/* --------------------------------------------------------------------
   セクション5 ご利用の条件（PC y=1675..2712 / 4章）
   -------------------------------------------------------------------- */
.p-flow__cond { padding-block: 145px 36px; }
.p-flow__cond-title { text-align: center; }
.p-flow__cond-lead {
  margin-top: 35px;
  font-size: 20px;
  font-weight: var(--fw-bold);
  line-height: 40px;
  text-align: center;
  color: var(--c-text);
}

.p-flow__cond-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 52px;
}
.p-flow__cond-head--last { margin-top: 50px; }
.p-flow__cond-badge {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-green);
  color: var(--c-white);
  font-size: 30px;
  font-weight: var(--fw-bold);
  line-height: 1;
  padding-bottom: 4px;   /* 市川様の指定（2026-09-16）。数字の光学的な中央を取る */
}
.p-flow__cond-headtext {
  font-size: 30px;
  font-weight: var(--fw-bold);
  line-height: 1;
  color: var(--c-text);
}

.p-flow__cond-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  margin-top: 40px;
}
/* Zeplin の fills は #AEAEA7 だが書き出し画像は白。塗り白・枠線のみで実装
   （03_flow.md 4章の注記） */
.p-flow__cond-card {
  padding: 33px 40px 29px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-l);
  background: var(--c-white);
  color: var(--c-text);
}
.p-flow__cond-cardtitle {
  font-size: 22px;
  font-weight: var(--fw-bold);
  line-height: 34px;
}
.p-flow__cond-mark--a { color: var(--c-orange); }
.p-flow__cond-mark--b { color: var(--c-green); }

.p-flow__cond-list {
  margin-top: 18px;
  margin-left: 8px;
  font-size: 22px;
  font-weight: var(--fw-bold);
  line-height: 46px;
}
.p-flow__cond-list li {
  padding-left: 1em;
  text-indent: -1em;   /* 折り返しは「・」の右に揃える */
}
.p-flow__cond-note {
  margin-top: 26px;
  font-size: 16px;
  font-weight: var(--fw-bold);
  line-height: 24px;
}

/* --------------------------------------------------------------------
   セクション6 1日のスケジュール例（PC y=2629..3348 / 5章）
   右のイラストに合わせて表組みは左寄せ（ブロック中心 x≈726）
   -------------------------------------------------------------------- */
.p-flow__sched { padding-block: 159px 116px; }
.p-flow__sched-inner {
  display: flex;
  align-items: flex-start;
  gap: 42px;
}
.p-flow__sched-main { flex: 0 0 691px; }   /* x=381..1072 */
.p-flow__sched-title { text-align: center; }

.p-flow__sched-cols {
  display: grid;
  grid-template-columns: repeat(2, 330px);
  column-gap: 31px;
  margin-top: 40px;
}
.p-flow__sched-label {
  font-size: 26px;
  font-weight: var(--fw-bold);
  line-height: 39px;
  text-align: center;
  color: var(--c-orange);
}
.p-flow__sched-list {
  display: flex;
  flex-direction: column;
  gap: 21px;
  margin-top: 17px;
}
.p-flow__sched-row {
  display: flex;
  align-items: center;
  height: 56px;
  padding-left: 24px;
  border: 2px solid var(--c-orange);
  border-radius: var(--radius);
  background: var(--c-white);
}
.p-flow__sched-time {
  flex: none;
  width: 78px;
  font-size: 36px;
  font-weight: var(--fw-black);
  line-height: 1;
  text-align: right;
  color: var(--c-orange);
  padding-bottom: 4px;   /* 市川様の指定（2026-09-16）。右の作業名とベースラインを揃える */
}
.p-flow__sched-task {
  flex: 1 1 auto;
  font-size: 26px;
  font-weight: var(--fw-bold);
  line-height: 1;
  text-align: center;
  color: var(--c-text);
}
.p-flow__sched-illust {
  flex: none;
  width: 426px;
  height: 426px;
  margin-top: 52px;
}

/* --------------------------------------------------------------------
   セクション7 よくある質問（PC y=3349..4775 / 6章）
   部品仕様は /work/ と共通。背景色だけ白（03_flow.md 6章）
   -------------------------------------------------------------------- */
.p-flow__faq { padding-block: 110px 119px; }
.p-flow__faq-title { text-align: center; }

.p-flow__faq-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 47px;
}
.p-flow__faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-white);
}
.p-flow__faq-q {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 88px;
  padding: 10px 20px;
  text-align: left;
}
.p-flow__faq-mark {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--c-green);
  color: var(--c-white);
  font-size: 30px;
  font-weight: var(--fw-black);
  line-height: 1;
}
.p-flow__faq-text {
  flex: 1 1 auto;
  font-size: 20px;
  font-weight: var(--fw-bold);
  line-height: 1.4;
  color: var(--c-text);
}

/* 開閉アイコン: 緑の円 ＋ 白い横棒（常時）＋ 白い縦棒（閉じているときだけ） */
.p-flow__faq-icon {
  flex: none;
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-green);
}
.p-flow__faq-icon::before,
.p-flow__faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--c-white);
  transform: translate(-50%, -50%);
}
.p-flow__faq-icon::before { width: 18px; height: 2px; }
.p-flow__faq-icon::after  { width: 2px;  height: 18px; }
.p-flow__faq-item.is-open .p-flow__faq-icon::after { opacity: 0; }

.p-flow__faq-a {
  margin-inline: 20px;
  padding: 23px 0 26px;
  border-top: 1px solid var(--c-border);
  font-size: 20px;
  font-weight: var(--fw-bold);
  line-height: 40px;
  color: var(--c-text);
}

/* --------------------------------------------------------------------
   セクション8 CTA（PC y=4776..5283 / 7章・下層ページ共通）
   -------------------------------------------------------------------- */
.p-flow__cta { padding-block: 70px 89px; }
.p-flow__cta-inner { position: relative; }

.p-flow__cta-staff {
  position: absolute;
  top: 8px;
  left: 718px;
  width: 271px;
  height: 196px;
}
.p-flow__cta-text {
  padding-right: 230px;
  text-align: center;
  color: var(--c-text);
}
.p-flow__cta-title {
  font-size: 40px;
  line-height: 60px;
}
.p-flow__cta-body {
  margin-top: 34px;
  font-size: 20px;
  font-weight: var(--fw-bold);
  line-height: 40px;
}
.p-flow__cta-btnwrap {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}
.p-flow__cta-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 560px;
  height: 90px;
  padding-left: 92px;   /* 左のイラスト（x=703..774）を避けた領域の中央に文字を置く */
  border: 2px solid var(--c-orange);
  border-radius: var(--radius-l);
  background: var(--c-white);
  color: var(--c-text);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
/* hover: 白地＋橙枠 → 橙ベタ＋白文字（2026-09-16 市川様のご指定 / #F7B52C） */
.p-flow__cta-btn:hover {
  border-color: var(--c-cta-hover);
  background: var(--c-cta-hover);
  color: var(--c-white);
}
.p-flow__cta-illust {
  position: absolute;
  left: 23px;
  bottom: 0;
  width: 71px;
  height: 104px;
}
.p-flow__cta-btn-label {
  display: block;
  text-align: center;
  line-height: 1.2;
}
.p-flow__cta-btn-lg { font-size: 30px; font-weight: var(--fw-bold); }
.p-flow__cta-btn-sm { font-size: 20px; font-weight: var(--fw-bold); }

/* ====================================================================
   SP（375 アートボード / 波の振れ幅 30px）
   ==================================================================== */
@media (max-width: 1079px) {

  .p-flow__lead,
  .p-flow__steps,
  .p-flow__cond,
  .p-flow__sched {
    background-position: 0 30px;
    background-size: 100% calc(100% - 30px);
  }
  /* 波の深さは components.css（--wave-h 30px）。SP のご利用条件は形A に戻す。 */
  .p-flow__cond[data-wave]::before { --wave-shape: var(--wave-a-up); }

  /* --- リード（SP y=296..1126） --- */
  .p-flow__lead {
    margin-top: -145px;
    padding-block: 83px 23px;
  }
  .p-flow__lead-title { max-width: none; font-size: 26px; line-height: 36px; }
  .p-flow__lead-body {
    max-width: none;
    margin-top: 14px;
    font-size: 16px;
    line-height: 30px;
  }
  /* 🚨 レスポンシブでは PC 表示時より画像を大きくしない（2026-09-16 市川様の方針）。
     SP レイアウトは 1079px まで効くので、width:100% のままだと 1024px 幅などで
     PC の固定サイズを超えて巨大化する。PC の実寸を max-width で上限にし、
     余った幅は左右の auto マージンで振り分ける。 */
  .p-flow__lead-photo {
    position: static;
    display: block;
    width: 100%;
    max-width: 480px;   /* PC の実寸 */
    height: auto;
    margin: 32px auto 0;
  }

  /* --- ご利用開始までの流れ（SP y=1097..2094）縦並び＋垂直ライン --- */
  .p-flow__steps { padding-block: 72px 44px; }
  .p-flow__steps-list {
    display: block;
    margin-top: 21px;
  }
  .p-flow__steps-list::before { content: none; }

  .p-flow__step {
    position: relative;
    display: block;
    padding-left: 107px;   /* タイトル・説明文 x=130 */
    text-align: left;
  }
  .p-flow__step:not(:last-child) { margin-bottom: 36px; }
  /* 垂直ライン（ドット中心 → 次のドット中心） */
  .p-flow__step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 76px;
    top: 36px;
    bottom: -72px;
    width: 2px;
    background: var(--c-green);
  }
  .p-flow__step-label {
    position: absolute;
    left: 0;
    top: -2px;   /* 市川様の指定（2026-09-16 / 元 0） */
    width: 49px;
    font-size: 16px;
    text-align: center;
  }
  .p-flow__step-num {
    position: absolute;
    left: 0;
    top: 15px;   /* 市川様の指定（2026-09-16 / 元 26px） */
    width: 49px;
    margin-top: 0;
    font-size: 50px;
    text-align: center;
  }
  .p-flow__step-dot {
    position: absolute;
    left: 67px;
    top: 26px;
    margin-top: 0;
  }
  .p-flow__step-title {
    margin-top: 23px;
    font-size: 20px;
    text-align: left;
    padding-top: 25px;   /* 市川様の指定（2026-09-16） */
  }
  .p-flow__step-text { margin-top: 13px; }

  /* --- ご利用の条件（SP y=2065..3078） --- */
  .p-flow__cond { padding-block: 64px 20px; }
  .p-flow__cond-title { font-size: 24px; }
  .p-flow__cond-lead {
    margin-top: 16px;
    font-size: 16px;
    line-height: 24px;
    text-align: justify;
  }
  .p-flow__cond-head { gap: 14px; margin-top: 25px; }
  .p-flow__cond-head--last { margin-top: 30px; }
  .p-flow__cond-badge { width: 27px; height: 27px; font-size: 22px; }
  .p-flow__cond-headtext { font-size: 22px; }

  .p-flow__cond-cards {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
  }
  .p-flow__cond-card { padding: 15px 20px; }
  .p-flow__cond-cardtitle { font-size: 18px; line-height: 28px; }
  .p-flow__cond-list {
    margin-top: 12px;
    margin-left: 7px;
    font-size: 18px;
    line-height: 38px;
  }
  .p-flow__cond-note { margin-top: 12px; font-size: 16px; line-height: 24px; }

  /* --- 1日のスケジュール例（SP y=3049..4160） --- */
  .p-flow__sched { padding-block: 63px 59px; }
  .p-flow__sched-inner { display: block; }
  .p-flow__sched-main { flex: none; }
  .p-flow__sched-title { font-size: 26px; }
  .p-flow__sched-cols {
    display: block;
    margin-top: 0;
  }
  .p-flow__sched-col + .p-flow__sched-col { margin-top: 8px; }
  .p-flow__sched-label {
    margin-top: 17px;
    font-size: 20px;
    line-height: 30px;
  }
  .p-flow__sched-list { gap: 15px; margin-top: 14px; }
  .p-flow__sched-row {
    width: 280px;
    height: 46px;
    margin-inline: auto;
    padding-left: 25px;
  }
  .p-flow__sched-time { width: 65px; font-size: 30px; }
  .p-flow__sched-task { font-size: 20px; }
  .p-flow__sched-illust {
    display: block;
    width: 100%;
    max-width: 426px;   /* PC の実寸 */
    height: auto;
    margin: 30px auto 0;
  }

  /* --- よくある質問（SP y=4161..5105） --- */
  .p-flow__faq { padding-block: 53px 72px; }
  .p-flow__faq-list { gap: 30px; margin-top: 22px; }
  .p-flow__faq-q { min-height: 76px; padding: 10px 20px; }
  .p-flow__faq-mark {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    font-size: 24px;
  }
  .p-flow__faq-text { font-size: 16px; line-height: 24px; }
  .p-flow__faq-icon { width: 26px; height: 26px; }
  .p-flow__faq-icon::before { width: 16px; height: 2px; }
  .p-flow__faq-icon::after  { width: 2px;  height: 16px; }
  .p-flow__faq-a { padding: 13px 0 16px; font-size: 16px; line-height: 24px; }

  /* --- CTA（SP y=5106..5633） --- */
  .p-flow__cta { padding-block: 206px 38px; }
  /* 🚨 スタッフ写真はコンテナの中央に置く。left 固定のままだと SP レイアウトが
     効く 1079px まで幅が広がったとき左端に取り残される（2026-09-16 市川様のご指摘）。
     ボタンも PC の 560px を超えないよう上限を付ける（btnwrap が中央寄せ）。 */
  .p-flow__cta-staff {
    top: -219px;
    left: 50%;
    transform: translateX(-50%);
    width: 271px;
    height: 196px;
  }
  .p-flow__cta-text { padding-right: 0; }
  .p-flow__cta-title { font-size: 26px; line-height: 39px; }
  .p-flow__cta-body { margin-top: 15px; font-size: 16px; line-height: 24px; }
  .p-flow__cta-btnwrap { margin-top: 29px; }
  .p-flow__cta-btn { width: 100%; max-width: 560px; height: 80px; padding-left: 87px; }   /* 560 = PC の実寸 */
  .p-flow__cta-illust { left: 23px; width: 64px; height: 94px; }
  .p-flow__cta-btn-label { line-height: 1.25; }
  .p-flow__cta-btn-lg { font-size: 26px; }
  .p-flow__cta-btn-sm { font-size: 16px; }
}
