/* トップページ「留学・トライアウトの流れ」（2026-10-28）
   以前の画像（img_flow.png／img_flow_sp.png）と同じ見た目を HTML＋CSS で再現。
   PC：横に5つ並べ、間に右向きの三角／スマホ（1000px以下）：縦に並べ、間に下向きの三角 */

#toppage .flow .flowInner {
  max-width: 1250px;
  margin: 0 auto;
  padding: 40px 15px 0;
}
#toppage .flow .flowSteps {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
#toppage .flow .flowStep {
  position: relative;
  flex: 1 1 0;
  max-width: 210px;
  min-height: 300px;
  margin: 0;
  padding: 40px 14px 20px;
  border: 1px solid #a0a0a0;
  border-radius: 4px;
  background: #fff;
  list-style: none;
  box-sizing: border-box;
}
/* ステップ間の三角（右向き） */
#toppage .flow .flowStep + .flowStep::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 50%;
  margin-top: -11px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #d1d1d1;
}
/* 「STEP.1」のタブ（左上にはみ出し、下に折り返しの影） */
#toppage .flow .flowStep__label {
  position: absolute;
  top: 12px;
  left: -7px;
  padding: 4px 9px 4px 10px;
  background: #23262e;
  border-radius: 0 3px 3px 0;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
#toppage .flow .flowStep__label::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  border-style: solid;
  border-width: 0 7px 6px 0;
  border-color: transparent #000 transparent transparent;
}
#toppage .flow .flowStep__icon {
  display: block;
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
}
#toppage .flow .flowStep__icon svg { display: block; width: 100%; height: 100%; }
#toppage .flow .flowStep__title {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: none;
  color: #1f1f1f;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
#toppage .flow .flowStep__title::before,
#toppage .flow .flowStep__title::after { content: none; }
/* 説明文は「サルウェブの3つの特徴」の説明文（.solArtPara）と同じ書式（2026-10-28 ユーザー指示） */
#toppage .flow .flowStep__text {
  margin: 0;
  color: #000;
  font-size: 16px;
  line-height: 27px;
  letter-spacing: normal;
}

/* 「STEP.1〜3は完全無料」：STEP.1〜3 の3枠をごく薄いオレンジの面（パネル）に載せてまとめる。グレーはセクション背景（solution 等）と同じに見えるため不採用（2026-10-28）
   線で囲むと安っぽく見えるため、面で区切る。オレンジはラベルの文字だけ */
#toppage .flow .flowInner { position: relative; }
#toppage .flow .flowFree {
  position: relative;
  max-width: 1210px;
  height: 58px;
  margin: 0 auto;
  z-index: 1;
}
#toppage .flow .flowFree span {
  position: absolute;
  left: 2px;
  top: 18px;
  color: #c2400f; /* 薄いオレンジの面の上で読みやすさの基準（コントラスト比4.5以上）を満たす濃さ */
  font-size: 16px;
  font-weight: bold;
  line-height: 22px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
#toppage .flow .flowSteps { position: relative; isolation: isolate; }
#toppage .flow .flowSteps::before {
  /* STEP.1〜3 の3枠ぶん（5枠＋間隔4つ＝100% のうち、3枠＋間隔2つ）＋左右18pxの余白 */
  content: '';
  position: absolute;
  z-index: -1;
  left: -18px;
  top: -58px;
  bottom: -18px;
  width: calc(60% - 16px + 36px);
  background: #fdf0e8;
  border-radius: 10px;
}
#toppage .flow .flowSteps { max-width: 1210px; margin: 0 auto; }
#toppage .flow .flowNote {
  max-width: 1210px;
  margin: 34px auto 0;
  font-size: 14px;
  line-height: 1.8;
  color: #000;
  text-align: center;
}

/* スマホ・タブレット：縦並び */
@media screen and (max-width: 1000px) {
  /* グレーの面が画面幅いっぱいになると単なる背景色に見えるため、左右に余白を残す（2026-10-28 ユーザー指摘） */
  #toppage .flow .flowInner { padding-left: 30px; padding-right: 30px; }
  #toppage .flow .flowSteps {
    flex-direction: column;
    gap: 38px;
    max-width: 500px;
    margin: 0 auto;
  }
  #toppage .flow .flowStep {
    flex: none;
    max-width: none;
    min-height: 0;
    display: grid;
    grid-template-columns: 64px 1fr;
    grid-template-areas:
      "label title"
      "icon  text";
    column-gap: 14px;
    row-gap: 10px;
    align-items: start;
    padding: 12px 14px 16px 16px;
  }
  #toppage .flow .flowStep + .flowStep::before {
    left: 50%;
    top: -28px;
    margin: 0 0 0 -13px;
    border-width: 17px 13px 0 13px;
    border-color: #d1d1d1 transparent transparent transparent;
  }
  #toppage .flow .flowStep__label {
    grid-area: label;
    position: relative;
    top: auto;
    left: -23px;
    justify-self: start;
    align-self: center;
    white-space: nowrap;
  }
  #toppage .flow .flowStep__title {
    grid-area: title;
    align-self: center;
    margin: 0 0 0 -24px;
    font-size: 16px;
  }
  #toppage .flow .flowStep__icon {
    grid-area: icon;
    width: 58px;
    height: 58px;
    margin: 2px 0 0 4px;
  }
  /* 「STEP.1〜3は完全無料」：STEP.1〜3 を薄いグレーの面でつなぎ、面の上端の内側にラベル */
  #toppage .flow .flowFree { max-width: 500px; height: auto; margin: 0 auto; padding: 0; z-index: 0; }
  /* ラベルはタブにせず、グレーの面の上端の内側に置く（面の幅いっぱいに広げて、下のカード部分とひと続きに見せる） */
  #toppage .flow .flowFree span {
    position: static;
    display: block;
    margin: 0 -14px -20px;
    padding: 16px 14px 22px;
    background: #fdf0e8;
    border-radius: 10px 10px 0 0;
    font-size: 15px;
  }
  #toppage .flow .flowSteps::before { content: none; }
  #toppage .flow .flowStep.is-free { box-shadow: 0 0 0 14px #fdf0e8; }
  #toppage .flow .flowStep.is-free:first-child { margin-top: 10px; }
  #toppage .flow .flowStep.is-free + .flowStep.is-free::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: -15px;
    right: -15px;
    top: -39px;
    height: 40px;
    background: #fdf0e8;
  }
  #toppage .flow .flowNote { max-width: 500px; margin-top: 18px; text-align: left; }
  #toppage .flow .flowStep:not(.is-free):nth-child(4) { margin-top: 14px; }
  #toppage .flow .flowStep__text {
    grid-area: text;
    font-size: 16px;
    line-height: 30px;
  }
}
