/* SubPro LP v2 — Apple のプロダクトページの組み方 (2026-09-24)
   手本は DOJO CORE の LP (/Users/hf/dojo-core/src/components/Stages.astro)。
   🚨 1ステージ = 1つの絵 + 短い1行。説明を足したくなっても足さない。
   🚨 地は白と薄いグレーの交互。**色を持つのは指導者のサイトの画面の中だけ**。
      枠・図・見出し・ボタンは無彩色に留める (Codex 相談の結論)。 */
:root {
  --container: 1080px;
  --gutter: 24px;

  --ground: #ffffff;
  --ground-2: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --rule: #d2d2d7;
  --rule-soft: #e8e8ed;
  --frame: #1d1d1f;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* ヒーローの絵 (PC 画面 + スマホ) の合計の横幅。画面の高さから逆算する (最初の1枚に絵と見出しが両方入るように)。
     2面目以降の画像もこの幅を上限に揃える (これより小さい画像はそのまま、藤原さん 2026-09-26) */
  --art-w: min(980px, 100%, max(420px, calc((100svh - 480px) * 1.6)));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html:lang(ja) body { letter-spacing: 0.01em; line-height: 1.7; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip { position: fixed; left: 8px; top: -60px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 8px; }

/* ── ヘッダ (Apple の上の細い帯) ───────────── */
.gnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.gnav .inner { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 16px; }
.wm { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; }
.wm b { font-weight: 700; color: var(--muted); }
.gnav-r { display: flex; align-items: center; gap: 22px; font-size: 13px; }
.gnav-r a { text-decoration: none; color: var(--ink); opacity: 0.8; }
.gnav-r a:hover { opacity: 1; }
.gnav-r .lang { display: inline-flex; gap: 8px; color: var(--faint); }
.gnav-r .lang a[aria-current] { font-weight: 600; opacity: 1; }
.gnav-r .pill { opacity: 1; background: var(--ink); color: #fff; padding: 6px 14px; border-radius: 980px; font-weight: 500; }
@media (max-width: 640px) {
  .gnav-r .hide-sm { display: none; }
  .gnav-r { gap: 14px; }
}

/* ── ステージ ─────────────────────────── */
.stage { padding-block: clamp(80px, 10vw, 136px); background: var(--ground); overflow: hidden; }
.stage.alt { background: var(--ground-2); }
.stage > .inner { display: grid; justify-items: center; gap: clamp(36px, 5vw, 60px); }
.stage.hero { padding-top: clamp(28px, 4vw, 52px); }
.stage.hero > .inner { gap: clamp(24px, 3vw, 36px); }

.art { width: 100%; display: grid; justify-items: center; }
.words { display: grid; justify-items: center; gap: 16px; text-align: center; }
/* 絵の下に添える出典の一行 (実在のサイトを見せている時) */
.art-cap { margin-top: clamp(28px, 4vw, 44px); font-size: 13px; color: var(--faint); text-align: center; }

.eyebrow { font-size: clamp(17px, 1.8vw, 21px); font-weight: 600; color: var(--muted); }
.stage h1, .stage h2 {
  max-width: 22ch;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}
.stage h1 { font-size: clamp(40px, 6.4vw, 80px); }
.stage h2 { font-size: clamp(32px, 5vw, 56px); }
/* ⚠️ ch は欧文の「0」の幅が基準。日本語だと 22ch は約 11 文字にしかならず短い見出しが折れる */
html:lang(ja) .stage h1, html:lang(ja) .stage h2 { max-width: 30ch; letter-spacing: -0.01em; line-height: 1.22; word-break: auto-phrase; }
html:lang(ja) .stage h1 { font-size: clamp(30px, 5.6vw, 68px); }
html:lang(ja) .stage h2 { font-size: clamp(26px, 4.4vw, 50px); }
.hl { display: block; }
/* 日本語の見出しは読点で区切った句を1かたまりにする。入る幅なら1行、狭ければ句の切れ目で折れる */
html:lang(ja) .stage h2 .hl { display: inline-block; }

.note { max-width: 54ch; font-size: clamp(16px, 1.7vw, 19px); line-height: 1.55; color: var(--muted); }
html:lang(ja) .note { max-width: 40em; line-height: 1.8; }
.fine { font-size: 12px; color: var(--faint); max-width: 60ch; line-height: 1.6; text-align: center; }

/* ボタンとリンク。Apple の「黒い丸ボタン + 矢印付きの文字リンク」 */
.acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px 24px; border-radius: 980px;
  background: var(--ink); color: #fff; text-decoration: none;
  font-size: 17px; font-weight: 500;
  transition: background 0.2s var(--ease);
}
.btn:hover { background: #3a3a3c; }
.lnk { font-size: 17px; text-decoration: none; color: var(--ink); }
.lnk::after { content: " ›"; }
.lnk:hover { text-decoration: underline; }
.btn:focus-visible, .lnk:focus-visible, .chip:focus-visible, .play:focus-visible { outline: 2px solid #0071e3; outline-offset: 3px; }

/* ── 画面の枠 ─────────────────────────── */
.browser {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 30px 60px -20px rgba(0, 0, 0, 0.28), 0 12px 24px -12px rgba(0, 0, 0, 0.18);
}
.browser-bar { display: flex; align-items: center; gap: 12px; height: 34px; padding-inline: 14px; background: #ececee; border-bottom: 1px solid var(--rule-soft); }
.browser-bar .dots { display: flex; gap: 7px; }
.browser-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: #d0d0d4; }
.browser-bar .url { flex: 1; max-width: 340px; margin-inline: auto; transform: translateX(-26px); text-align: center; font-size: 12px; color: var(--muted); background: #fff; border-radius: 7px; padding: 3px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-view { position: relative; aspect-ratio: 16 / 10; background: #111; }
.browser-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.phone {
  width: 100%;
  border-radius: 46px;
  padding: 10px;
  background: var(--frame);
  box-shadow: 0 0 0 1px #3a3a3c inset, 0 30px 60px -18px rgba(0, 0, 0, 0.35);
}
.phone-view { position: relative; aspect-ratio: 390 / 844; border-radius: 37px; overflow: hidden; background: #000; }
.phone-view img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.phone-view::before { content: ""; position: absolute; top: 10px; left: 50%; width: 30%; height: 24px; transform: translateX(-50%); background: #000; border-radius: 20px; z-index: 1; }

/* ── 01 ヒーロー: PC とスマホを重ねる ─────── */
/* 🚨 最初の1枚は、開いた時点で絵と見出しの両方が画面に入るようにする (DOJO CORE と同じ決まり)。
   絵の幅を画面の高さから逆算して縮める */
.hero-art { position: relative; width: min(980px, 100%); padding-right: min(9%, 90px); }
.hero-art { width: var(--art-w); }
.hero-art .phone { position: absolute; right: 0; bottom: -6%; width: min(22%, 210px); }
@media (max-width: 640px) {
  .hero-art { padding-right: 0; padding-bottom: 24%; }
  .hero-art .phone { width: 30%; right: 4%; bottom: 0; border-radius: 26px; padding: 6px; }
  .hero-art .phone-view { border-radius: 21px; }
  .hero-art .phone-view::before { height: 12px; top: 6px; }
}

/* ── 02 デザインの切り替え ───────────────── */
.themes { width: min(980px, 100%); display: grid; gap: 22px; justify-items: center; }
.themes .browser-view img { opacity: 0; transition: opacity 0.7s var(--ease); }
.themes .browser-view img.on { opacity: 1; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { appearance: none; border: 1px solid var(--rule); background: #fff; color: var(--ink); font: inherit; font-size: 14px; padding: 7px 16px; border-radius: 980px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.wide { width: min(980px, 100%); }
.mid { width: min(820px, 100%); }

/* ── 04 カリキュラム ─────────────────────── */
.curric { width: min(640px, 100%); background: #fff; border-radius: 20px; padding: clamp(18px, 3vw, 28px); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 24px 48px -24px rgba(0, 0, 0, 0.22); text-align: left; }
.curric-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule-soft); }
.curric-h b { font-size: 19px; }
.curric-h span { font-size: 13px; color: var(--muted); }
.curric ol { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.curric li { display: grid; grid-template-columns: 28px 132px 1fr; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); counter-increment: step; }
.curric li:last-child { border-bottom: 0; padding-bottom: 0; }
.curric li::before { content: counter(step, decimal-leading-zero); font-size: 13px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.curric img { width: 132px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.curric li span { font-size: 15px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 520px) {
  .curric li { grid-template-columns: 22px 96px 1fr; gap: 10px; }
  .curric img { width: 96px; }
  .curric li span { font-size: 14px; }
}

/* ── 05 プレイヤー / 06 字幕 / 07 ノート ─── */
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.35); }
.video > img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.45)); cursor: pointer; color: #fff; font: inherit; }
.play .disc { width: clamp(64px, 9vw, 92px); aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.92); display: grid; place-items: center; transition: transform 0.25s var(--ease); }
.play:hover .disc { transform: scale(1.06); }
.play .disc svg { width: 34%; margin-left: 6%; fill: var(--ink); }
.play .cap { position: absolute; left: 20px; bottom: 16px; font-size: 14px; font-weight: 500; text-align: left; }
.play .cap small { display: block; font-size: 12px; opacity: 0.75; font-weight: 400; }
.feats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; font-size: 15px; color: var(--muted); }
.feats li { display: inline-flex; align-items: center; gap: 8px; }
.feats svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 1.6; }

.sub { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); max-width: 86%; padding: 6px 14px; border-radius: 6px; background: rgba(0, 0, 0, 0.72); color: #fff; font-size: clamp(14px, 2.2vw, 24px); font-weight: 500; text-align: center; line-height: 1.35; }
.sample { position: absolute; top: 14px; left: 14px; font-size: 11px; letter-spacing: 0.04em; color: #fff; background: rgba(0, 0, 0, 0.5); padding: 3px 9px; border-radius: 980px; }

.notes { position: relative; width: min(900px, 100%); padding-bottom: 8%; }
.notes .video { width: 82%; }
.notecard { position: absolute; right: 0; bottom: 0; width: min(46%, 380px); background: #fff; border-radius: 16px; padding: clamp(14px, 2vw, 22px); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 24px 48px -16px rgba(0, 0, 0, 0.3); text-align: left; }
.notecard .t { font-size: 12px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.notecard p { font-size: clamp(14px, 1.6vw, 17px); margin-top: 6px; line-height: 1.45; }
.notecard .who { display: block; margin-top: 10px; font-size: 12px; color: var(--faint); }
@media (max-width: 640px) {
  .notes { padding-bottom: 30%; }
  .notes .video { width: 100%; }
  .notecard { width: 78%; }
}

/* ── 08 スマホ2台 ───────────────────────── */
.phones { display: flex; justify-content: center; align-items: flex-end; gap: clamp(18px, 4vw, 48px); width: 100%; }
.phones .phone:nth-child(2) { transform: translateY(-8%); }
@media (max-width: 520px) {
  .phones .phone { border-radius: 30px; padding: 7px; }
  .phones .phone-view { border-radius: 24px; }
  .phones .phone-view::before { height: 14px; top: 7px; }
}

/* ── 09 プラン別レイヤー ────────────────── */
.layers { width: min(860px, 100%); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 20px); }
.layer { background: #fff; border-radius: 18px; padding: clamp(14px, 2.4vw, 24px); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); text-align: left; }
.layer h3 { font-size: clamp(16px, 2vw, 21px); font-weight: 600; letter-spacing: -0.015em; }
.layer .tag { font-size: 12px; color: var(--faint); margin-top: 2px; }
.layer ul { margin-top: 14px; display: grid; gap: 8px; }
.layer li { font-size: clamp(12px, 1.5vw, 15px); padding: 9px 11px; border-radius: 10px; background: var(--ink); color: #fff; }
.layer li.off { background: var(--ground-2); color: #b0b0b5; text-decoration: line-through; text-decoration-color: rgba(0,0,0,0.12); }
@media (max-width: 560px) {
  .layers { grid-template-columns: 1fr; width: min(360px, 100%); }
}

/* ── 10 売上の流れ ─────────────────────── */
.flow { width: min(900px, 100%); display: grid; gap: 22px; justify-items: center; }
.flow-line { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: clamp(8px, 2vw, 18px); }
.node { background: #fff; border-radius: 18px; padding: clamp(14px, 2.4vw, 24px) 12px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07); text-align: center; }
.node b { display: block; font-size: clamp(15px, 2vw, 20px); font-weight: 600; letter-spacing: -0.015em; }
.node span { display: block; margin-top: 4px; font-size: clamp(11px, 1.3vw, 13px); color: var(--muted); }
.node.you { background: var(--ink); color: #fff; box-shadow: none; }
.node.you span { color: #b0b0b5; }
.arrow { width: clamp(20px, 4vw, 44px); height: 2px; background: var(--ink); position: relative; }
.arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--ink); border-right: 0; }
.aside { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border: 1px dashed var(--rule); border-radius: 980px; font-size: 14px; color: var(--muted); background: #fff; }
.aside b { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) {
  .flow-line { grid-template-columns: 1fr; width: min(320px, 100%); }
  .arrow { width: 2px; height: 26px; justify-self: center; }
  .arrow::after { right: -4px; top: auto; bottom: -1px; border: 5px solid transparent; border-top: 7px solid var(--ink); border-bottom: 0; }
}

/* ── 12 申し込みの流れ ─────────────────── */
.steps { width: min(900px, 100%); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.steps::before { content: ""; position: absolute; left: 10%; right: 10%; top: 13px; height: 1px; background: var(--rule); }
.steps li { position: relative; display: grid; justify-items: center; gap: 12px; font-size: clamp(13px, 1.6vw, 17px); font-weight: 500; }
.steps li::before { content: ""; width: 27px; height: 27px; border-radius: 50%; background: var(--ground); border: 1.5px solid var(--ink); }
.steps li:last-child::before { background: var(--ink); }
.stage.alt .steps li::before { background: var(--ground-2); }
.stage.alt .steps li:last-child::before { background: var(--ink); }
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; width: min(260px, 100%); gap: 18px; }
  .steps::before { left: 13px; right: auto; top: 13px; bottom: 13px; width: 1px; height: auto; }
  .steps li { grid-template-columns: 27px 1fr; justify-items: start; align-items: center; gap: 14px; }
}

/* ── 管理: アップロードの流れ (スマホ → Dropbox → サイト) ── */
.upload { width: min(980px, 100%); display: grid; gap: 28px; justify-items: center; }
.upflow { width: min(820px, 100%); display: grid; gap: 12px; justify-items: center; }
.uptag { font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--rule); border-radius: 980px; padding: 3px 12px; background: #fff; }

/* ── 管理: 3つの管理画面を重ねる。手前が岩本さん ── */
.admins { position: relative; width: min(980px, 100%); aspect-ratio: 16 / 11.2; }
.admins .browser { position: absolute; width: 74%; }
.admins .a2 { left: 0; top: 0; }
.admins .a3 { right: 0; top: 7%; }
.admins .a1 { left: 13%; bottom: 0; box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 40px 80px -24px rgba(0,0,0,0.4); }

/* ── ほかの方法との比較 (ブログ Field Notes N°001 の表から3列) ── */
.cmp-wrap { width: min(980px, 100%); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp { width: 100%; min-width: 560px; border-collapse: collapse; font-size: clamp(13px, 1.4vw, 15px); text-align: left; }
.cmp th, .cmp td { padding: 14px 16px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.cmp thead th { font-size: 12px; font-weight: 600; color: var(--faint); border-bottom-color: var(--rule); }
.cmp tbody th { font-weight: 600; white-space: nowrap; }
.cmp td { color: var(--muted); }
.cmp tr.me th, .cmp tr.me td { background: var(--ink); color: #fff; border-bottom-color: var(--ink); }
.cmp tr.me th:first-child { border-radius: 12px 0 0 12px; }
.cmp tr.me td:last-child { border-radius: 0 12px 12px 0; }

/* ── 06 A-B ループ: 動画の下にシークバー。A と B の間だけを塗る ── */
.abloop { width: min(820px, 100%); display: grid; gap: 26px; }
.ab-bar { position: relative; height: 6px; margin-inline: 4%; border-radius: 3px; background: var(--rule); }
.ab-range { position: absolute; left: 38%; width: 21%; top: 0; bottom: 0; border-radius: 3px; background: var(--ink); }
.ab-mk { position: absolute; top: 14px; transform: translateX(-50%); font-size: 13px; font-weight: 600; }
.ab-mk::before { content: ""; position: absolute; left: 50%; top: -17px; width: 2px; height: 14px; margin-left: -1px; background: var(--ink); }
.ab-mk.a { left: 38%; }
.ab-mk.b { left: 59%; }
[data-motion="on"] .ab-range { transform-origin: left; transform: scaleX(0); }
[data-motion="on"] .reveal.in .ab-range { transform: none; transition: transform 1.2s 0.3s var(--ease); }

/* ── フッタ ─────────────────────────── */
.foot { background: var(--ground-2); border-top: 1px solid var(--rule-soft); padding: 28px 0 40px; font-size: 12px; color: var(--muted); }
.foot .inner { display: grid; gap: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 0; }
.foot-links a { text-decoration: none; color: var(--ink); opacity: 0.75; padding-right: 10px; margin-right: 10px; border-right: 1px solid var(--rule); }
.foot-links a:last-child { border-right: 0; }
.foot-links a:hover { opacity: 1; text-decoration: underline; }
.foot-beta { padding-bottom: 14px; border-bottom: 1px solid var(--rule); line-height: 1.6; }

/* プレイヤー (モーダル) の色を白/ニュートラルに (現行 LP と同じ上書き) */
.sp-overlay { --accent: #ffffff; --sp-chrome: #141417; }
.sp-overlay .sp-ab-btn.set { color: #fff !important; }
.sp-overlay .sp-btn.on { color: #0a0a0a !important; }

/* ── 動き ─────────────────────────────
   🚨 JS が動かなくても中身は必ず見える。data-motion="on" は lp2.js が監視を張る直前に付ける。
      JS が届かなければ属性が付かず、最初から全部見えている */
[data-motion="on"] .reveal { opacity: 0; transform: translateY(28px); }
[data-motion="on"] .reveal.in { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
[data-motion="on"] .reveal.d2.in { transition-delay: 0.12s; }
[data-motion="on"] .reveal.d3.in { transition-delay: 0.24s; }
[data-motion="on"] .hero-art .browser { animation: lp2-rise 1.1s var(--ease) both; }
[data-motion="on"] .hero-art .phone { animation: lp2-rise 1.1s 0.25s var(--ease) both; }
@keyframes lp2-rise { from { opacity: 0; transform: translateY(40px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ── 画像の横幅をヒーローの絵の横幅に揃える (上限だけ。小さい画像はそのまま) ── */
.stage .art > :is(.themes, .wide, .curric, .video, .abloop, .notes, .phones, .upload, .admins) { max-width: var(--art-w); }
.phones .phone { width: min(280px, 42vw, calc(50% - 24px)); }
