/*
 * LP（テンプレート page-lp）専用のスタイル。
 * 色・角丸・影は theme.json のプリセット（= LMSのトークン）だけを使う。濃色帯は本文色を背景にしたもの。
 * 動きは「状態の理解を助ける短い遷移」に限り、prefers-reduced-motion では止める。JSが無くても全内容が読める。
 */

.page-template-page-lp,
.editor-styles-wrapper {
  --lp-pad: clamp(16px, 4vw, 32px);
  --lp-section: clamp(96px, 12vw, 168px);
  --lp-ease: cubic-bezier(.2, .7, .2, 1);
  --lp-header: 69px;
  --lp-display: "Hiragino Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --lp-ink: var(--wp--preset--color--text);
  --lp-muted: var(--wp--preset--color--muted);
  --lp-line: var(--wp--preset--color--line);
  --lp-accent: var(--wp--preset--color--accent);
  --lp-on-dark: rgb(255 255 255 / 80%);
  --lp-on-dark-dim: rgb(255 255 255 / 60%);
  --lp-on-dark-line: rgb(255 255 255 / 14%);
}

/* テンプレート部品・本文ブロック間の既定の余白を消し、セクションを隙間なく並べる。 */
.page-template-page-lp .wp-site-blocks > * + * { margin-block-start: 0; }
.page-template-page-lp .wp-block-post-content > * { margin-block: 0; }
.page-template-page-lp :where(h1, h2, h3, .lp-number__value, .lp-price) { font-feature-settings: "palt"; }
.page-template-page-lp :where(h1, h2, h3, .lp-lead) { word-break: auto-phrase; }
.page-template-page-lp :where(section[id]) { scroll-margin-top: var(--lp-header); }

/* ---------- 共通部品 ---------- */
.wp-block-group.lp-section {
  padding: var(--lp-section) var(--lp-pad);
}
/* グリッドの子要素には、WordPressの縦積みレイアウトが付ける上余白を付けない。 */
:is(.lp-features__list, .lp-flow__grid, .lp-plan, .lp-hero__row, .lp-head--split) > * { margin-block-start: 0; }
.lp-section > *,
.lp-hero > *,
.lp-cta > * { margin-block: 0; }

.lp-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--lp-accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.5;
}
.lp-eyebrow::before {
  content: "";
  flex: none;
  width: 28px;
  height: 2px;
  background: currentColor;
}

.lp-title {
  margin: 24px 0 0;
  font-family: var(--lp-display);
  font-size: clamp(32px, 4.6vw, 64px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -.02em;
}
.lp-lead {
  max-width: 36em;
  margin: 0;
  color: var(--lp-muted);
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.95;
}
.lp-head > .lp-lead { margin-top: 28px; }
.lp-note {
  margin: 0;
  color: var(--lp-muted);
  font-size: 14px;
  line-height: 1.8;
}

.lp-head--center { display: flex; flex-direction: column; align-items: center; text-align: center; }
@media (min-width: 1024px) {
  .lp-head--split {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    column-gap: 64px;
    align-items: end;
  }
  .lp-head--split > .lp-eyebrow { grid-column: 1; }
  .lp-head--split > .lp-title { grid-column: 1; }
  .lp-head--split > .lp-lead { grid-column: 2; grid-row: 2; margin: 0 0 .5em; }
}

/* ボタン：主要操作は塗り＋矢印、補助は線。どちらも高さ56px。 */
.lp-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.lp-buttons .wp-block-button__link {
  min-height: 56px;
  padding: 0 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--lp-ease);
}
.lp-button-primary .wp-block-button__link { gap: 12px; }
.lp-button-primary .wp-block-button__link::after {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8h12M9 3l5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8h12M9 3l5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .3s var(--lp-ease);
}
.lp-button-primary .wp-block-button__link:hover::after { transform: translateX(4px); }
.lp-button-secondary .wp-block-button__link {
  border: 1px solid var(--wp--preset--color--accent-line);
  background: var(--wp--preset--color--paper);
  color: var(--lp-ink);
}
.lp-button-secondary .wp-block-button__link:hover {
  border-color: var(--lp-accent);
  background: var(--wp--preset--color--paper);
  color: var(--lp-accent);
}
.lp-button-wide,
.lp-button-wide .wp-block-button__link { width: 100%; }

/* ---------- ヒーロー ---------- */
.wp-block-group.lp-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(48px, 6vw, 88px) var(--lp-pad) 0;
  background: var(--wp--preset--gradient--hero);
  border-bottom: 1px solid var(--wp--preset--color--accent-line);
}
/* 方眼：ノートに下書きする場面を思わせる細い線。ヒーローと最後の呼びかけだけに使う。 */
.lp-hero::before,
.lp-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgb(23 92 211 / 7%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(23 92 211 / 7%) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, #000 25%, transparent 75%);
}
.lp-hero__title {
  margin: 28px 0 0;
  font-family: var(--lp-display);
  font-size: clamp(40px, 11.2vw, 124px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
}
.lp-line { display: block; overflow: hidden; padding: .02em 0 .14em; margin-bottom: -.1em; }
.lp-line__inner { position: relative; display: inline-block; }
/* 2行目の下線＝進捗バー。「ひとつ完成させる」を100%で描き切る。 */
.lp-line:last-child .lp-line__inner::after {
  content: "";
  position: absolute;
  left: .04em;
  right: .5em;
  bottom: -.04em;
  height: .07em;
  border-radius: 99px;
  background: var(--lp-accent);
  transform-origin: left center;
}
.lp-hero__row { margin-top: clamp(32px, 4vw, 48px); }
.lp-hero__row .lp-lead { color: var(--lp-ink); }
.lp-hero__actions { margin-top: 32px; }
.lp-hero__actions .lp-note { margin-top: 16px; }
@media (min-width: 1024px) {
  .lp-hero__row {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    column-gap: 80px;
    align-items: end;
  }
  .lp-hero__actions { margin-top: 0; }
}

/* 実際の学習画面を、ブラウザーの枠に入れて重ねる。下端はヒーローの境界で切る。 */
.lp-stage {
  position: relative;
  margin-top: clamp(48px, 5vw, 72px);
  transform-origin: 50% 100%;
}
.lp-stage > .wp-block-image { margin: 0; }
.lp-shot {
  position: relative;
  overflow: hidden;
  padding-top: 32px;
  border: 1px solid var(--lp-line);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: var(--wp--preset--color--paper);
  box-shadow: var(--wp--preset--shadow--card);
}
.lp-shot::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lp-line);
  box-shadow: 14px 0 var(--lp-line), 28px 0 var(--lp-line);
}
.lp-shot::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: min(36%, 320px);
  height: 16px;
  border-radius: 4px;
  background: var(--wp--preset--color--surface);
  transform: translateX(-50%);
}
.lp-shot img {
  display: block;
  width: 100%;
  border-radius: 0 !important;
  border-top: 1px solid var(--lp-line);
  aspect-ratio: 16 / 8.6;
  object-fit: cover;
  object-position: left top;
}
.lp-shot--main { width: 82%; margin-left: auto !important; z-index: 2; }
.lp-shot--back {
  position: absolute !important;
  left: 0;
  bottom: 0;
  width: 44%;
  z-index: 1;
}
.lp-shot--back img { aspect-ratio: 16 / 13; }
@media (max-width: 767px) {
  .lp-shot--main { width: 100%; }
  .lp-shot--back { display: none; }
  .lp-shot { padding-top: 24px; }
  .lp-shot::before { top: 9px; left: 12px; width: 6px; height: 6px; box-shadow: 10px 0 var(--lp-line), 20px 0 var(--lp-line); }
  .lp-shot::after { top: 6px; height: 12px; }
  /* 狭い画面では画面の左上（Lessonの見出しと本文）を拡大して、縮小しすぎで読めない状態を避ける。 */
  .lp-shot--main { height: calc(min(100vw - 32px, 9999px) * .66); }
  .lp-shot img { width: 165%; max-width: none; aspect-ratio: auto; }
}

/* ---------- 特徴 ---------- */
.lp-features__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 40px;
  margin-top: clamp(56px, 7vw, 96px) !important;
}
.lp-feature { position: relative; padding-top: 32px; }
.lp-feature > * { margin: 0; }
.lp-feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--lp-ink);
  transform-origin: left center;
}
.lp-feature h3 { font-size: clamp(21px, 1.9vw, 25px); line-height: 1.5; letter-spacing: -.01em; }
.lp-feature p { margin-top: 16px; color: var(--lp-muted); font-size: 16px; line-height: 1.95; }
@media (max-width: 1023px) {
  .lp-features__list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Lessonの進み方（濃色帯） ---------- */
.wp-block-group.lp-flow { background: var(--lp-ink); color: var(--wp--preset--color--paper); }
.lp-flow :focus-visible { outline-color: var(--wp--preset--color--accent-line); }
.lp-flow .lp-eyebrow { color: var(--wp--preset--color--accent-line); }
.lp-flow .lp-title,
.lp-flow h3 { color: var(--wp--preset--color--paper); }
.lp-flow .lp-lead { margin-top: 28px; color: var(--lp-on-dark); }
.lp-flow__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 64px clamp(48px, 7vw, 112px);
  align-items: start;
}
.lp-flow__aside { position: sticky; top: calc(var(--lp-header) + 48px); }
.lp-flow__aside > * { margin-block: 0; }
.lp-flow__shot { margin-top: 48px !important; }
.lp-flow__shot img { border: 1px solid var(--lp-on-dark-line); border-radius: 14px; }

.lp-steps { position: relative; counter-reset: lp-step; --lp-progress: 1; }
.lp-steps::before,
.lp-steps::after {
  content: "";
  position: absolute;
  top: 56px;
  bottom: 56px;
  left: 27px;
  width: 2px;
  background: var(--lp-on-dark-line);
}
.lp-steps::after {
  background: var(--wp--preset--color--accent-line);
  transform-origin: center top;
  transform: scaleY(var(--lp-progress));
}
.lp-step {
  counter-increment: lp-step;
  position: relative;
  z-index: 1;
  padding: 28px 0 28px 88px;
  min-height: 112px;
}
.lp-step + .lp-step { margin-top: clamp(16px, 4vw, 56px); }
.lp-step > * { margin: 0; }
.lp-step::before {
  content: counter(lp-step, decimal-leading-zero);
  position: absolute;
  top: 28px;
  left: 0;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 2px solid var(--wp--preset--color--accent-line);
  border-radius: 50%;
  background: var(--lp-ink);
  color: var(--wp--preset--color--paper);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background-color .4s var(--lp-ease), border-color .4s var(--lp-ease), color .4s var(--lp-ease);
}
.lp-step h3 { padding-top: 10px; font-size: clamp(21px, 2vw, 26px); line-height: 1.45; transition: color .4s var(--lp-ease); }
.lp-step p { margin-top: 12px; color: var(--lp-on-dark); font-size: 16px; line-height: 1.9; transition: color .4s var(--lp-ease); }
/* JSが現在の手順を判定できるときだけ、未到達の手順を控えめにする（文字のコントラストは4.5:1以上）。 */
.aimock-js .lp-step:not(.is-reached)::before { border-color: var(--lp-on-dark-line); color: var(--lp-on-dark-dim); }
.aimock-js .lp-step:not(.is-reached) :is(h3, p) { color: var(--lp-on-dark-dim); }
.aimock-js .lp-step.is-current::before {
  border-color: var(--wp--preset--color--accent-line);
  background: var(--wp--preset--color--accent-line);
  color: var(--lp-ink);
}
@media (max-width: 1023px) {
  .lp-flow__grid { grid-template-columns: minmax(0, 1fr); }
  .lp-flow__aside { position: static; }
}
@media (max-width: 599px) {
  .lp-step { padding-left: 64px; min-height: 0; }
  .lp-step::before { width: 44px; height: 44px; font-size: 14px; top: 26px; }
  .lp-steps::before, .lp-steps::after { left: 21px; top: 48px; bottom: 48px; }
  .lp-step h3 { padding-top: 6px; }
}

/* ---------- 料金 ---------- */
.lp-plan {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  max-width: 1040px;
  margin: clamp(48px, 6vw, 80px) auto 0 !important;
  overflow: hidden;
  border: 1px solid var(--lp-line);
  border-radius: 14px;
  background: var(--wp--preset--color--paper);
  box-shadow: var(--wp--preset--shadow--card);
}
.lp-plan > * { margin: 0; }
.lp-plan__price,
.lp-plan__detail { padding: clamp(32px, 5vw, 64px); }
.lp-plan__price {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--lp-line);
  background: var(--wp--preset--color--accent-soft);
  /* The price is sized by this column, not the viewport: the column is only 5/11 of the card. */
  container-type: inline-size;
}
.lp-plan__price > *,
.lp-plan__detail > * { margin: 0; }
.lp-plan__price h3 { font-size: 17px; line-height: 1.6; }
.lp-price {
  margin-top: auto !important;
  padding-top: 48px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", var(--lp-display);
  font-size: clamp(44px, 17cqi, 88px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
/* If the unit does not fit beside the amount, it moves to the next line instead of overflowing. */
.lp-price span {
  display: inline-block;
  white-space: nowrap;
  margin-left: 8px;
  font-family: var(--lp-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}
.lp-plan__price .lp-note { margin-top: 16px; }
.lp-checks { margin: 0; padding: 0; list-style: none; }
.lp-checks li {
  position: relative;
  padding: 16px 0 16px 40px;
  border-bottom: 1px solid var(--lp-line);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
}
.lp-checks li:first-child { padding-top: 0; }
.lp-checks li:first-child::before { top: 1px; }
.lp-checks li::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--lp-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.lp-plan__detail .lp-buttons { margin-top: 32px; }
.lp-plan__detail .lp-buttons .wp-block-button__link { min-height: 60px; font-size: 17px; }
.lp-plan__detail > .lp-note { margin-top: 20px; }
@media (max-width: 767px) {
  .lp-plan { grid-template-columns: minmax(0, 1fr); }
  .lp-plan__price { border-right: 0; border-bottom: 1px solid var(--lp-line); }
  .lp-price { padding-top: 32px; }
}

/* ---------- よくある質問 ---------- */
.wp-block-group.lp-faq { background: var(--wp--preset--color--surface); }
@media (min-width: 1024px) {
  .wp-block-group.lp-faq {
    display: grid;
    grid-template-columns: 1fr minmax(0, 420px) minmax(0, 820px) 1fr;
  }
  .lp-faq > * { margin-inline: 0 !important; }
  .lp-faq > .lp-head { grid-column: 2; align-self: start; position: sticky; top: calc(var(--lp-header) + 48px); padding-right: 64px; }
  .lp-faq > .lp-faq__list { grid-column: 3; max-width: none !important; }
}
.lp-faq .lp-head > .lp-note { margin-top: 24px; }
.lp-faq__list { margin-top: 48px !important; border-bottom: 1px solid var(--lp-line); }
@media (min-width: 1024px) { .lp-faq__list { margin-top: 0 !important; } }
.lp-faq .wp-block-details { margin: 0; padding: 0; border-top: 1px solid var(--lp-line); border-bottom: 0; }
.lp-faq .wp-block-details summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 20px 56px 20px 0;
  font-size: clamp(17px, 1.4vw, 19px);
  font-weight: 700;
  line-height: 1.6;
  list-style: none;
  transition: color .2s;
}
.lp-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.lp-faq .wp-block-details summary:hover { color: var(--lp-accent); }
.lp-faq .wp-block-details summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  border: 1px solid var(--wp--preset--color--accent-line);
  border-radius: 50%;
  background:
    linear-gradient(var(--lp-accent), var(--lp-accent)) center / 12px 2px no-repeat,
    linear-gradient(var(--lp-accent), var(--lp-accent)) center / 2px 12px no-repeat,
    var(--wp--preset--color--paper);
  transition: transform .35s var(--lp-ease);
}
.lp-faq .wp-block-details[open] summary::after { transform: rotate(135deg); }
.lp-faq .wp-block-details > :not(summary) { max-width: 40em; margin: 0; padding: 0 56px 28px 0; color: var(--lp-muted); line-height: 1.95; }

/* ---------- 最後の呼びかけ ---------- */
.wp-block-group.lp-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(112px, 15vw, 216px) var(--lp-pad);
  background: var(--wp--preset--gradient--hero);
  border-top: 1px solid var(--wp--preset--color--accent-line);
  text-align: center;
}
.lp-cta::before {
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 75%);
}
.lp-cta__title {
  font-family: var(--lp-display);
  font-size: clamp(40px, 7.4vw, 108px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.04em;
}
.lp-cta > .lp-lead { margin: 32px auto 0; color: var(--lp-ink); }
.lp-cta > .lp-buttons { justify-content: center; margin-top: 48px; }

/* ---------- 動き（JSが有効で、動きを減らす設定がないときだけ） ---------- */
@media (prefers-reduced-motion: no-preference) {
  .aimock-js .lp-r {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .9s var(--lp-ease), transform 1s var(--lp-ease);
    transition-delay: var(--lp-d, 0ms);
  }
  .aimock-js .lp-r.is-in { opacity: 1; transform: none; }

  .aimock-js .lp-feature::before { transform: scaleX(0); transition: transform 1.2s var(--lp-ease) var(--lp-d, 0ms); }
  .aimock-js .lp-feature.is-in::before { transform: scaleX(1); }

  .aimock-js .lp-hero .lp-line__inner { animation: lp-rise 1.1s var(--lp-ease) both; animation-delay: calc(var(--lp-i) * 110ms + 120ms); }
  .aimock-js .lp-hero .lp-line:last-child .lp-line__inner::after { animation: lp-fill 1.3s var(--lp-ease) 1s both; }
  .aimock-js .lp-hero .lp-eyebrow,
  .aimock-js .lp-hero__row { animation: lp-fade 1s var(--lp-ease) both; }
  .aimock-js .lp-hero__row { animation-delay: .45s; }
  .aimock-js .lp-stage { animation: lp-stage-in 1.4s var(--lp-ease) .55s both; }

  @supports (animation-timeline: view()) {
    .aimock-js .lp-stage > .wp-block-image {
      animation: lp-tilt linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
    .aimock-js .lp-stage > .lp-shot--back { animation-name: lp-tilt-back; }
  }
}
@keyframes lp-rise { from { transform: translateY(110%); } }
@keyframes lp-fill { from { transform: scaleX(0); } }
@keyframes lp-fade { from { opacity: 0; transform: translateY(20px); } }
@keyframes lp-stage-in { from { opacity: 0; transform: translateY(80px); } }
@keyframes lp-tilt { from { transform: perspective(1800px) rotateX(14deg) scale(.94); } }
@keyframes lp-tilt-back { from { transform: perspective(1800px) rotateX(14deg) translateY(48px) scale(.92); } }

/* LPのみ：ページの読了位置を、ヘッダー下端の細い線で示す（装飾。支援技術には出さない）。 */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .page-template-page-lp .aimock-site-header::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: -1px;
      height: 2px;
      background: var(--lp-accent);
      transform-origin: left center;
      animation: lp-fill linear both;
      animation-timeline: scroll(root);
    }
  }
}

/* スマートフォン：主要操作を指で押しやすい全幅にする。 */
@media (max-width: 599px) {
  .lp-hero .lp-buttons,
  .lp-cta .lp-buttons { flex-direction: column; align-items: stretch; }
  .lp-hero .lp-buttons .wp-block-button,
  .lp-cta .lp-buttons .wp-block-button { width: 100%; }
  .lp-hero .lp-buttons .wp-block-button__link,
  .lp-cta .lp-buttons .wp-block-button__link { width: 100%; }
}

/* ---------- カリキュラム：作りたいもの別のルート（aimock/routes ブロック） ---------- */
.wp-block-group.lp-curriculum { background: var(--wp--preset--color--surface); }
.lp-explorer { margin-top: clamp(40px, 5vw, 64px) !important; }

/* タブ：JSが有効なときだけ表示。無効なときは7ルートが縦に並ぶ。 */
.lp-explorer__tabs { display: none; }
.lp-explorer.is-tabbed .lp-explorer__tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}
.lp-explorer__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 12px 8px;
  border: 1px solid var(--lp-line);
  border-radius: 14px;
  background: var(--wp--preset--color--paper);
  color: var(--lp-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.lp-explorer__tab:hover { border-color: var(--lp-accent); color: var(--lp-accent); }
.lp-explorer__tab[aria-selected="true"] {
  border-color: var(--lp-accent);
  background: var(--lp-accent);
  color: var(--wp--preset--color--paper);
}
.lp-explorer__icon {
  width: 28px;
  height: 28px;
  background: currentColor;
  -webkit-mask: var(--lp-icon) center / contain no-repeat;
  mask: var(--lp-icon) center / contain no-repeat;
}
.lp-explorer__tab:not([aria-selected="true"]) .lp-explorer__icon { background: var(--lp-accent); }

/* ルートの中身：左に要約（所要量・100講座のうちの位置）、右に受ける順番と作るもの。 */
.lp-route-panel {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  border: 1px solid var(--lp-line);
  border-radius: 14px;
  background: var(--wp--preset--color--paper);
  box-shadow: var(--wp--preset--shadow--card);
}
.lp-route-panel + .lp-route-panel { margin-top: 24px; }
.lp-explorer.is-tabbed .lp-route-panel + .lp-route-panel { margin-top: 0; }
.lp-route-panel[hidden] { display: none; }
.lp-route-panel:focus-visible { outline-offset: 4px; }
.lp-route-panel > * { min-width: 0; }
.lp-route-panel__summary {
  padding: clamp(24px, 3.5vw, 48px);
  border-right: 1px solid var(--lp-line);
}
.lp-route-panel__summary > * { margin: 0; }
@media (min-width: 1024px) {
  .lp-route-panel__summary { position: sticky; top: calc(var(--lp-header) + 24px); align-self: start; border-right: 0; }
  .lp-route-panel__list { border-left: 1px solid var(--lp-line); }
}
.lp-route-panel__title { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.4; letter-spacing: -.015em; }
.lp-route-panel__goal { margin-top: 16px !important; color: var(--lp-ink); font-size: 16px; line-height: 1.8; }
.lp-route-panel__goal strong {
  display: inline-block;
  margin-right: 10px;
  padding: 0 8px;
  border: 1px solid var(--wp--preset--color--accent-line);
  border-radius: 4px;
  color: var(--lp-accent);
  font-size: 12px;
  line-height: 22px;
  vertical-align: 2px;
}
.lp-route-panel__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px !important;
  border-top: 1px solid var(--lp-line);
  border-bottom: 1px solid var(--lp-line);
}
.lp-route-panel__stats > div { padding: 16px 12px 16px 0; }
.lp-route-panel__stats > div + div { padding-left: 16px; border-left: 1px solid var(--lp-line); }
.lp-route-panel__stats dt { color: var(--lp-muted); font-size: 13px; font-weight: 700; line-height: 1.5; }
.lp-route-panel__stats dd {
  margin: 4px 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", var(--lp-display);
  font-size: clamp(32px, 3.2vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.lp-route-panel__stats dd span { margin-left: 4px; font-family: var(--lp-display); font-size: 14px; letter-spacing: 0; color: var(--lp-muted); }

.lp-route-map { margin: 32px 0 0 !important; }
.lp-route-map__grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; max-width: 320px; }
.lp-route-map__grid > span { aspect-ratio: 1; border-radius: 3px; background: var(--wp--preset--color--line); }
.lp-route-map__grid > .is-on { background: var(--lp-accent); }
.lp-route-map figcaption { max-width: 32em; margin-top: 12px; color: var(--lp-muted); font-size: 13px; line-height: 1.7; }

.lp-route-panel__list { padding: clamp(24px, 3.5vw, 48px); }
.lp-route-panel__listnote { margin: 0 0 8px; color: var(--lp-muted); font-size: 13px; font-weight: 700; }
.lp-flowlist, .lp-flowlist__courses { margin: 0; padding: 0; list-style: none; }
.lp-flowlist__group + .lp-flowlist__group { margin-top: 24px; }
.lp-flowlist__phase {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--lp-ink);
  font-size: 14px;
  line-height: 1.5;
}
.lp-flowlist__courses li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--lp-line);
}
.lp-flowlist__no { grid-row: 1 / span 2; color: var(--lp-muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-flowlist__title { font-size: 16px; font-weight: 600; line-height: 1.55; }
.lp-flowlist__output { grid-column: 2 / -1; color: var(--lp-muted); font-size: 14px; line-height: 1.6; }
.lp-flowlist__tag {
  grid-column: 3;
  grid-row: 1;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--wp--preset--color--accent-soft);
  color: var(--lp-accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  white-space: nowrap;
}
.lp-flowlist__courses .is-specific .lp-flowlist__no { color: var(--lp-accent); }
.lp-flowlist__courses .is-specific .lp-flowlist__title { font-weight: 800; }

/* 全講座の構成（補足）。 */
.lp-allsections { margin-top: 24px; border-top: 1px solid var(--lp-line); }
.lp-allsections summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.lp-allsections summary::-webkit-details-marker { display: none; }
.lp-allsections summary::before {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--lp-accent);
  border-bottom: 2px solid var(--lp-accent);
  transform: rotate(-45deg);
  transition: transform .25s var(--lp-ease);
}
.lp-allsections[open] summary::before { transform: rotate(45deg); }
.lp-allsections ol { margin: 8px 0 0; padding: 0; list-style: none; columns: 3; column-gap: 40px; }
.lp-allsections li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--lp-line); break-inside: avoid; }
.lp-allsections__title { font-size: 15px; font-weight: 600; line-height: 1.5; }
.lp-allsections__range { color: var(--lp-muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp-explorer__error { padding: 16px; border: 1px solid var(--wp--preset--color--line); border-radius: 8px; background: var(--wp--preset--color--paper); }

@media (max-width: 1023px) {
  .lp-explorer.is-tabbed .lp-explorer__tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lp-route-panel { grid-template-columns: minmax(0, 1fr); }
  .lp-route-panel__summary { border-right: 0; border-bottom: 1px solid var(--lp-line); }
  .lp-allsections ol { columns: 2; }
}
@media (max-width: 599px) {
  .lp-explorer.is-tabbed .lp-explorer__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-explorer__tab { flex-direction: row; justify-content: flex-start; min-height: 56px; padding: 8px 12px; text-align: left; }
  .lp-explorer__icon { flex: none; width: 24px; height: 24px; }
  .lp-route-panel__stats > div + div { padding-left: 12px; }
  .lp-flowlist__courses li { grid-template-columns: minmax(0, 1fr) auto; }
  .lp-flowlist__no { grid-row: auto; grid-column: 1; }
  .lp-flowlist__title { grid-column: 1 / -1; }
  .lp-flowlist__tag { grid-column: 2; grid-row: 1; justify-self: end; }
  .lp-flowlist__output { grid-column: 1 / -1; }
  .lp-allsections ol { columns: 1; }
}

/* ルートを切り替えたとき：中身を短く出し、受ける講座のマスを順に塗る。 */
@media (prefers-reduced-motion: no-preference) {
  .lp-route-panel.is-shown { animation: lp-fade .5s var(--lp-ease) both; }
  .lp-route-panel.is-shown .lp-route-map__grid > .is-on { animation: lp-cell .4s var(--lp-ease) both; animation-delay: calc(var(--n, 0) * 18ms + 150ms); }
}
@keyframes lp-cell { from { transform: scale(.2); opacity: 0; } }

/* 編集画面ではJSを使わないため、最初のルートだけを見本として表示する。 */
.editor-styles-wrapper .lp-route-panel + .lp-route-panel { display: none; }
