/* =========================================================
   sections.css ― セクションごとのレイアウト
   スマホを基本に書き、@media (min-width: …) で広い画面用を足していく
   （＝モバイルファースト）
   ========================================================= */

/* =========================================================
   ローディング
   ========================================================= */
.loader { display: none; }          /* JSが動かないときは出さない */
html.js .loader {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100;
}
/* 上下2枚の黄色い幕。演出の最後に、上の幕は上へ、下の幕は下へ開く */
.loader__panel {
  position: absolute;
  left: 0;
  right: 0;
  height: 50.5%; /* 0.5%重ねて、真ん中にすき間ができないようにする */
  background-color: var(--yellow);
  background-image:
    linear-gradient(rgba(11, 35, 88, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 35, 88, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}
.loader__panel--top { top: 0; }
.loader__panel--bottom { bottom: 0; }

.loader__center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.loader__ball {
  width: 88px;
  height: 88px;
  margin-inline: auto;
}
/* 回転はCSSアニメーションで。GSAPの読み込み前から回り始められる */
.loader__ball svg {
  width: 100%;
  height: 100%;
  animation: spin 1.1s linear infinite;
}
.loader__shadow {
  width: 60px;
  height: 10px;
  margin: 10px auto 0;
  background: rgba(11, 35, 88, 0.2);
  border-radius: 50%;
}
.loader__text {
  margin-top: 14px;
  font-family: var(--font-led);
  letter-spacing: 0.35em;
  color: var(--navy);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   スクロール進捗（画面上端の軌道）
   ========================================================= */
.progress {
  position: fixed;
  top: 6px;
  left: 12px;
  right: 12px;
  height: 30px;
  z-index: 50;
  pointer-events: none; /* 下のボタンなどを押すじゃまをしない */
  transition: opacity 0.4s;
}
html.is-loading .progress { opacity: 0; }
.progress__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.progress__guide,
.progress__path {
  fill: none;
  /* preserveAspectRatio="none" で横に引き伸ばしても、線の太さは変えない */
  vector-effect: non-scaling-stroke;
}
.progress__guide {
  stroke: rgba(11, 35, 88, 0.2);
  stroke-width: 2;
  stroke-dasharray: 3 6;
}
.progress__path {
  stroke: var(--navy);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.progress__ball {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  /* 位置はJSが決める。中心を合わせるため半分ずらす */
  transform: translate(-50%, -50%);
}
.progress__ball svg { width: 100%; height: 100%; }

/* =========================================================
   1. TOP（ヒーロー）
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;  /* 古いブラウザ用（svh を知らないブラウザはこちらを使う） */
  min-height: 100svh; /* svh = スマホのアドレスバーを除いた画面の高さ */
  display: grid;
  place-items: center;
  padding: 64px var(--gutter) 110px;
  background: var(--yellow);
  overflow: hidden;
  text-align: center;
}
/* 横断幕の「斜めの紺ライン」を、疑似要素の帯で再現 */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  left: -30%;
  width: 160%;
  background: var(--navy);
  transform: rotate(-12deg);
}
.hero::before {
  top: 4%;
  height: 26px;
  box-shadow: 0 18px 0 -8px var(--white); /* 下にもう1本、白い細線 */
}
.hero::after {
  bottom: 6%;
  height: 18px;
  box-shadow: 0 -16px 0 -6px var(--white);
}

.hero__swoosh {
  position: absolute;
  top: 8%;
  right: -40px;
  width: min(62vw, 360px);
  opacity: 0.9;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__logo {
  width: clamp(110px, 30vw, 170px);
  height: auto;
  margin-bottom: 4px;
  border-radius: 50%;
}
.hero__en {
  font-family: var(--font-display);
  font-size: clamp(1rem, 4.6vw, 1.6rem);
  color: var(--navy);
  transform: rotate(-4deg);
  --outline: 0.24em; /* 白フチの太さ（.outlined の仕組みで描く） */
}
.hero__title { margin: 0.02em 0 0.08em; }
.hero__team {
  margin-top: 14px;
  padding: 0.2em 1em;
  font-weight: 900;
  font-size: clamp(0.9rem, 3.8vw, 1.15rem);
  color: var(--white);
  background: var(--navy);
  transform: skewX(-8deg);
}

/* スクロールの案内 */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  text-decoration: none;
  color: var(--navy);
}
.scroll-hint__ball {
  width: 30px;
  height: 30px;
  animation: bounce 1.1s cubic-bezier(0.3, 0, 0.7, 1) infinite;
}
.scroll-hint__ball svg { width: 100%; height: 100%; }
.scroll-hint__text {
  font-family: var(--font-led);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
}
/* 床に当たる瞬間（50%）に少しつぶれて、跳ね返る */
@keyframes bounce {
  0%, 100% { transform: translateY(-22px) rotate(0deg); }
  50%      { transform: translateY(0) scale(1.18, 0.82) rotate(180deg); }
}

/* =========================================================
   2. ストーリー
   ========================================================= */
.story {
  padding-top: 64px;
  /* 第5章で弾けるボールが画面の横にはみ出すと、スマホで横スクロールが出て
     ページが左右にぶれる。セクションの中で切り取っておく */
  overflow: hidden;
}

.chapter {
  display: grid;
  gap: 48px;
  max-width: 1080px;
  margin-inline: auto;
  padding: 48px var(--gutter) 40px;
}
.chapter__title {
  margin: 18px 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  line-height: 1.35;
  color: var(--navy);
}
.chapter__text { line-height: 2; }

.chapter__figure {
  position: relative;
  margin-top: 8px;
}
.chapter__art {
  width: 100%;
  height: auto;
  border: 3px solid var(--navy);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 8px 8px 0 var(--yellow);
}

/* 第5章で弾けるボールと星 */
.burst-piece {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  pointer-events: none;
  z-index: 3;
}
.burst-piece svg { width: 100%; height: 100%; }

/* PC：テキストとイラストを左右に並べ、章ごとに左右を入れ替える */
@media (min-width: 768px) {
  .chapter {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 56px;
    padding-block: 72px 56px;
  }
  .chapter:nth-of-type(even) .chapter__figure { order: -1; }
}

/* =========================================================
   3. エンディング
   ========================================================= */
.ending {
  position: relative;
  overflow: hidden;
}
.ending__stage {
  position: relative;
  /* 固定(pin)中は画面いっぱいに黄色を広げたいので、アドレスバーが
     隠れたときの高さ（lvh）に合わせる。未対応ブラウザ用に vh も書いておく */
  min-height: 100vh;
  min-height: 100lvh;
  display: grid;
  place-items: center;
  padding: 80px var(--gutter);
  text-align: center;
}
/* 黄色の背景。最初は半径0%の円で隠しておき、JSで円を広げる */
.ending__bg {
  position: absolute;
  inset: 0;
  background: var(--yellow);
  clip-path: circle(0% at 50% 50%);
}
/* 決めゼリフ：プラカードのように少しずつ傾けて積み重ねる */
.ending__lines {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  justify-items: center;
}
.ending__line span {
  display: inline-block;
  padding: 0.15em 0.7em;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6.6vw, 2.8rem);
  line-height: 1.4;
  color: var(--navy);
  background: var(--white);
  border: 3px solid var(--navy);
  box-shadow: 5px 5px 0 var(--yellow);
}
.ending__line:nth-child(odd) span  { transform: rotate(-2deg); }
.ending__line:nth-child(even) span { transform: rotate(2deg) translateX(12px); }

/* フィナーレ（「拾って〜」と「笑顔」）は、決めゼリフと同じ場所に重ねる */
.ending__finale {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 var(--gutter);
}

/* 動きを使わないとき（動きを減らす設定 or GSAPが読み込めないとき）は、
   重ねずに縦に並べて、全部が見えるようにする */
.ending--static .ending__stage { display: block; }
.ending--static .ending__finale { position: static; margin-top: 48px; }
.ending--static .ending__bg { display: none; }

/* =========================================================
   4. メンバー（ゼッケン型カード）
   ========================================================= */
.member-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* スマホ2列 */
  gap: 14px;
}
@media (min-width: 768px)  { .member-list { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .member-list { grid-template-columns: repeat(4, 1fr); } }  /* PC4列 */

.member-card {
  position: relative;
  padding: 22px 12px 14px;
  background: var(--white);
  border: 3px solid var(--navy);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--navy);
  text-align: center;
}
/* 上の左右の丸＝ゼッケンを留める安全ピン */
.member-card::before,
.member-card::after {
  content: '';
  position: absolute;
  top: 8px;
  width: 10px;
  height: 10px;
  background: #D5DAE3;
  border: 2px solid #8A93A6;
  border-radius: 50%;
}
.member-card::before { left: 8px; }
.member-card::after  { right: 8px; }

.member-card__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.member-card__head .avatar { width: 52px; height: 52px; }
/* 背番号を大きく（ゼッケンの主役） */
.member-card__number {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 13vw, 3.6rem);
  line-height: 1;
  color: var(--navy);
}
.member-card__pos {
  display: inline-block;
  margin-top: 10px;
  padding: 0.15em 0.9em;
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--white);
  background: var(--pos-color, var(--navy)); /* render.js がカードごとに色を渡す */
  border-radius: 999px;
}
.member-card__name {
  margin-top: 6px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.4;
}
.member-card__name small {
  margin-left: 0.4em;
  font-size: 0.75rem;
  color: var(--ink);
}
.member-card__comment {
  margin-top: 8px;
  padding: 0.6em 0.7em;
  font-size: 0.82rem;
  line-height: 1.6;
  background: var(--paper);
  border-radius: 10px;
  text-align: left;
}

/* =========================================================
   5. 監督・コーチ（作戦ボード型カード）
   ========================================================= */
.coach-list {
  display: grid;
  gap: 36px;
  max-width: 400px;
  margin-inline: auto;
}
@media (min-width: 768px) {
  .coach-list { grid-template-columns: repeat(3, 1fr); max-width: none; gap: 24px; }
}
.coach-card {
  position: relative;
  padding: 26px 12px 12px;
  background: #D9B37A;            /* ボードの木の色 */
  border: 3px solid var(--navy);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--navy);
}
/* 上の金具（クリップ） */
.coach-card::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 90px;
  height: 26px;
  transform: translateX(-50%);
  background: var(--navy);
  border-radius: 8px 8px 4px 4px;
  box-shadow: inset 0 -6px 0 #2E4A8A;
}
/* 紙：罫線をグラデーションで描く */
.coach-card__paper {
  padding: 18px 14px;
  text-align: center;
  background-color: var(--white);
  background-image: repeating-linear-gradient(transparent 0 27px, #E3E8F0 27px 28px);
  border-radius: 8px;
}
.coach-card__role {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-top: 12px;
  padding: 0.15em 0.9em;
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--navy);
  background: var(--yellow);
  border: 2px solid var(--navy);
  border-radius: 999px;
}
.coach-card__name {
  margin-top: 6px;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--navy);
}
.coach-card__comment {
  margin-top: 6px;
  font-size: 0.9rem;
  line-height: 1.75;
}

/* =========================================================
   6. 練習日（スコアボード）
   ========================================================= */
.scoreboard {
  padding: 16px 16px 6px;
  color: var(--white);
  background: var(--navy-deep);
  border: 6px solid #1B2C55;
  border-radius: 18px;
  box-shadow: 0 8px 0 var(--yellow);
}
.scoreboard__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  font-family: var(--font-led);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--yellow);
}
.scoreboard__head span:last-child { margin-left: auto; opacity: 0.7; }
/* 点滅するランプ */
.scoreboard__lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FF5A4E;
  box-shadow: 0 0 8px #FF5A4E;
  animation: blink 1.6s steps(2, start) infinite;
}
@keyframes blink { to { opacity: 0.25; } }

.practice-row {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.25);
}
.practice-row__days { display: flex; gap: 8px; }
.day-chip {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  font-family: var(--font-led);
  font-size: 1.6rem;
  color: var(--yellow);
  background: #000;
  border: 2px solid #333;
  border-radius: 8px;
  text-shadow: 0 0 8px rgba(255, 229, 0, 0.8);
}
.practice-row__time {
  display: flex;
  align-items: baseline;
  gap: 0.25em;
  font-family: var(--font-led);
  font-size: clamp(2rem, 10vw, 2.8rem);
  line-height: 1.2;
  color: var(--yellow);
  text-shadow: 0 0 10px rgba(255, 229, 0, 0.6);
}
.practice-row__dash { opacity: 0.6; }
.practice-row__place {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-weight: 700;
}
/* 広い画面では「曜日｜時間｜場所」を横一列に */
@media (min-width: 640px) {
  .practice-row {
    grid-template-columns: 120px 1fr auto;
    align-items: center;
  }
}

.practice-notes {
  margin-top: 28px;
  font-size: 0.92rem;
}
.practice-notes li {
  padding-left: 1.2em;
  text-indent: -1.2em; /* 2行目以降を「※」の後ろにそろえる */
}
.practice-notes li::before { content: '※ '; color: var(--navy); font-weight: 900; }
.practice-map {
  margin-top: 24px;
  text-align: center;
}

/* =========================================================
   7. CTA
   ========================================================= */
.cta {
  position: relative;
  overflow: hidden;
  color: var(--white);
  text-align: center;
  background: var(--navy);
}
/* 背景に、横断幕と同じ斜めの黄色ライン */
.cta::before {
  content: '';
  position: absolute;
  top: 40px;
  left: -20%;
  width: 140%;
  height: 14px;
  background: var(--yellow);
  transform: rotate(-8deg);
  box-shadow: 0 22px 0 -4px rgba(255, 229, 0, 0.35);
}
.cta .container { position: relative; }
.cta__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 10vw, 3.8rem);
  line-height: 1.3;
  color: var(--white);
}
.cta__title span { color: var(--yellow); }
.cta__lead { margin-top: 16px; }

.cta__btn-wrap {
  position: relative;
  display: inline-block;
  margin: 32px 0 36px;
}
/* 黄色地×紺文字のメインボタン（押しやすいよう高さ64px以上） */
.cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 64px;
  padding: 1em 1.6em;
  font-weight: 900;
  font-size: clamp(1rem, 4.4vw, 1.25rem);
  line-height: 1.4;
  color: var(--navy);
  text-decoration: none;
  background: var(--yellow);
  border: 4px solid var(--white);
  border-radius: 999px;
  box-shadow: 0 6px 0 var(--yellow-deep), 0 12px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.cta__btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--yellow-deep), 0 6px 12px rgba(0, 0, 0, 0.3);
}
/* スパイクされて飛んでくるボール（普段は透明） */
.cta__spike-ball {
  position: absolute;
  top: -6px;
  left: 18px;
  width: 34px;
  height: 34px;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.cta__spike-ball svg { width: 100%; height: 100%; }

.cta__card {
  padding: 22px 18px;
  color: var(--ink);
  text-align: left;
  background: var(--white);
  border-radius: 18px;
  border: 3px solid var(--yellow);
}
.cta__card-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--navy);
}
.checklist {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 700;
}
.checklist .icon {
  width: 1.6em;
  height: 1.6em;
  padding: 0.25em;
  color: var(--navy);
  background: var(--yellow);
  border-radius: 50%;
}
.cta__example-label {
  margin-top: 20px;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--navy);
}
.cta__example {
  margin-top: 6px;
  padding: 0.9em 1em;
  font-size: 0.95rem;
  line-height: 1.8;
  white-space: pre-line; /* data.js の \n を改行として表示する */
  background: var(--paper);
  border: 2px dashed #B9C3D6;
  border-radius: 10px;
}
.btn-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  font-weight: 900;
  color: var(--white);
  background: var(--navy);
  border: 0;
  border-radius: 999px;
}
.btn-copy:active { transform: translateY(2px); }

.cta__note {
  margin-top: 28px;
  font-size: 0.9rem;
}
/* 「〇〇」など、まだ決まっていない部分を目立たせる */
.placeholder {
  padding: 0 0.3em;
  color: var(--navy);
  background: var(--yellow);
  font-weight: 900;
}

/* =========================================================
   8. フッター
   ========================================================= */
.footer {
  padding: 56px var(--gutter) 110px; /* 下は追従ボタンの分あけておく */
  text-align: center;
  color: var(--white);
  background: var(--navy-deep);
}
.footer__logo {
  width: 120px;
  height: auto;
  margin: 0 auto;
  border-radius: 50%;
}
.footer__copy {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--yellow);
  transform: rotate(-4deg);
}
.footer__ig {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 18px;
  padding: 0.6em 1.4em;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--white);
  border-radius: 999px;
}
.footer__small {
  margin-top: 20px;
  font-size: 0.78rem;
  opacity: 0.7;
}
@media (min-width: 768px) {
  .footer { padding-bottom: 56px; }
}

/* =========================================================
   追従する申し込みボタン（スマホ用）
   ========================================================= */
.float-cta {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  /* env(safe-area-inset-bottom) = iPhoneの画面下のバー（ホームインジケーター）の高さ。
     ボタンがバーに重ならないよう、その分だけ上げる */
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: block;
  padding: 14px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  color: var(--navy);
  background: var(--yellow);
  border: 3px solid var(--navy);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(160%); /* 普段は画面の外に隠しておく */
  transition: transform 0.35s ease;
}
.float-cta.is-visible { transform: translateY(0); }
@media (min-width: 768px) {
  .float-cta { left: auto; right: 24px; bottom: 24px; padding: 14px 28px; }
}
