/* =========================================================
   紹介ページ・料金ページ（app/views/layouts/landing.html.erb）
   このフォルダの CSS はどの画面でも読みこまれるので、ここのセレクタは
   すべて .lp（紹介ページの body）の中だけに効くようにしてあります。
   文字の色は、背景とのコントラスト比 4.5:1 以上になる組み合わせだけを使っています。
   ========================================================= */
.lp {
  --lp-ink: #1f2937;          /* 本文 */
  --lp-sub: #4b5563;          /* 補足の文（白の上で 7.5:1） */
  --lp-primary: #4f46e5;      /* ボタン・リンク（白文字で 6.3:1） */
  --lp-primary-deep: #4338ca;
  --lp-tint: #eef2ff;
  --lp-warm: #fff7ed;
  --lp-line: #e5e7eb;
  --lp-focus: #1e1b4b;
  background: #fff;
  color: var(--lp-ink);
  font-size: 1rem;
  line-height: 1.8;
}
.lp-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.lp-main { display: block; overflow-x: clip; }
.lp-main:focus { outline: none; }
.lp-center { text-align: center; }
.lp-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* リンクとキーボードのフォーカス */
.lp a { color: var(--lp-primary); text-decoration: underline; text-underline-offset: 3px; }
.lp a:hover { color: var(--lp-primary-deep); }
.lp a:focus-visible,
.lp summary:focus-visible,
.lp .lp-btn:focus-visible {
  outline: 3px solid var(--lp-focus);
  outline-offset: 3px;
  border-radius: 8px;
}
.lp-skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: #fff; font-weight: 700;
  box-shadow: 0 4px 16px rgba(31, 41, 55, .2);
}
.lp-skip:focus { top: 12px; }

/* ---------- 見出しと文 ---------- */
.lp h1, .lp h2, .lp h3 { color: var(--lp-ink); line-height: 1.4; margin: 0 0 .5em; overflow-wrap: anywhere; }
.lp h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: .01em; }
.lp h1, .lp h2, .lp h3 { word-break: auto-phrase; }  /* 対応しているブラウザでは、文節で折り返す */
.lp h2, .lp h3 { text-wrap: balance; }
.lp-nb { display: inline-block; max-width: 100%; }  /* 見出しを、ことばの切れ目で折り返す */
.lp h2 { font-size: 1.5rem; font-weight: 800; }
.lp h3 { font-size: 1.08rem; font-weight: 800; }
.lp-main :where(p) { margin: 0 0 1em; }
.lp-lead { font-size: 1.05rem; color: var(--lp-ink); max-width: 40em; }
.lp-section-lead { color: var(--lp-sub); max-width: 44em; margin-bottom: 1.6em; }
.lp-note { font-size: .9rem; color: var(--lp-sub); }
.lp-eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 4px 14px; border-radius: 999px;
  background: #e0e7ff; color: var(--lp-primary-deep); font-size: .88rem; font-weight: 700; line-height: 1.6;
}

/* ---------- ボタン ---------- */
.lp .lp-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 22px; border-radius: 14px; border: 2px solid var(--lp-primary);
  font-weight: 800; font-size: 1rem; line-height: 1.35; text-align: center; text-decoration: none;
  cursor: pointer;
}
.lp .lp-btn-primary { background: var(--lp-primary); color: #fff; }
.lp .lp-btn-primary:hover { background: var(--lp-primary-deep); border-color: var(--lp-primary-deep); color: #fff; }
.lp .lp-btn-outline { background: #fff; color: var(--lp-primary-deep); }
.lp .lp-btn-outline:hover { background: var(--lp-tint); color: var(--lp-primary-deep); }
.lp .lp-btn-sm { min-height: 44px; padding: 8px 14px; font-size: .92rem; border-radius: 12px; }
.lp .lp-btn-lg { min-height: 64px; padding: 12px 28px; border-radius: 18px; }
.lp .lp-btn-block { display: flex; width: 100%; }
.lp-btn-main { font-size: 1.12rem; }
.lp-btn-sub { font-size: .85rem; font-weight: 700; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 14px; }
.lp-cta .lp-btn { flex: 1 1 220px; max-width: 340px; }

/* ---------- 上のバー ---------- */
.lp-top { background: #fff; border-bottom: 1px solid var(--lp-line); }
.lp-top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.lp .lp-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--lp-ink); font-weight: 800; font-size: 1.1rem; text-decoration: none; }
.lp .lp-brand:hover { color: var(--lp-ink); }
.lp-brand-mark {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; overflow: hidden;
  border-radius: 12px; background: var(--lp-tint); font-size: 22px; line-height: 1;
}
.lp-brand-mark .illust-icon { width: 40px; height: 40px; vertical-align: top; }
.lp-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.lp .lp-nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 10px;
  color: var(--lp-ink); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.lp .lp-nav-link:hover { background: var(--lp-tint); color: var(--lp-primary-deep); }
.lp .lp-nav-link[aria-current="page"] { color: var(--lp-primary-deep); box-shadow: inset 0 -3px 0 var(--lp-primary); border-radius: 10px 10px 0 0; }
.lp-nav .lp-btn { white-space: nowrap; margin-left: 4px; }
.lp-flash { padding-top: 16px; }

/* ---------- はじめに ---------- */
.lp-hero { background: linear-gradient(160deg, #eef2ff, #fdf2f8); padding: 36px 0 56px; }
.lp-hero-slim { padding: 40px 0 36px; }
.lp-hero-slim .lp-lead { margin-bottom: 0; }
.lp-hero-grid { display: grid; gap: 32px; align-items: center; }
.lp-hero-grid > * { min-width: 0; }
.lp-hero-visual { position: relative; width: 100%; max-width: 640px; margin: 0 auto; padding-bottom: 28px; }
.lp-hero-char { position: absolute; bottom: -18px; width: 96px; height: 96px; pointer-events: none; }
.lp-hero-char-a { left: -6px; }
.lp-hero-char-b { right: -6px; transform: scaleX(-1); }
.lp-char { object-fit: contain; max-width: none; }

/* 画面の写真 */
.lp-shot { margin: 0; }
.lp-shot img {
  display: block; width: 100%; height: auto; border-radius: 16px; background: #fff;
  border: 1px solid var(--lp-line); box-shadow: 0 10px 30px rgba(79, 70, 229, .12);
}
.lp-shot figcaption { margin-top: 10px; font-size: .9rem; line-height: 1.7; color: var(--lp-sub); }
.lp-hero-visual .lp-shot figcaption { text-align: center; padding: 0 88px; min-height: 3.4em; }
.lp-shots { display: grid; gap: 28px 24px; margin: 36px 0; }
.lp-shots > * { min-width: 0; }

/* ---------- 区切り ---------- */
.lp-section { padding: 56px 0; }
.lp-section-tint { background: #f5f7ff; }
.lp-section-warm { background: var(--lp-warm); }
.lp-section [id], .lp-section { scroll-margin-top: 16px; }
.lp-title-row { display: flex; align-items: flex-start; gap: 16px; }
.lp-title-row > div { min-width: 0; flex: 1; }
.lp-title-char { width: 72px; height: 72px; flex: none; }

/* ---------- 1→5 の流れ ---------- */
.lp-steps { list-style: none; margin: 0; padding: 0; counter-reset: lp-step; display: grid; gap: 14px; }
.lp-steps > li {
  counter-increment: lp-step; position: relative; min-width: 0;
  padding: 16px 18px 16px 68px; border-radius: 16px; background: #fff; border: 1px solid var(--lp-line);
}
.lp-steps > li::before {
  content: counter(lp-step); position: absolute; left: 16px; top: 16px;
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: var(--lp-primary); color: #fff; font-weight: 800; font-size: 1.05rem; line-height: 1;
}
.lp-steps h3 { margin-bottom: .3em; }
.lp-steps p { margin: 0; font-size: .95rem; color: var(--lp-sub); }
.lp-steps + .lp-cta { justify-content: center; margin-top: 32px; }

/* ---------- カード ---------- */
.lp-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.lp-card { min-width: 0; padding: 20px; border-radius: 16px; background: #fff; border: 1px solid var(--lp-line); }
.lp-card h3 { display: flex; align-items: flex-start; gap: 8px; }
.lp-card p { margin: 0; font-size: .95rem; color: var(--lp-sub); }
.lp-ico { flex: none; font-size: 1.3rem; line-height: 1.2; }
.lp-split { display: grid; gap: 28px; align-items: center; }
.lp-split > * { min-width: 0; }

/* 数字 */
.lp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.lp-stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 16px 12px; border-radius: 16px; background: #fff; border: 1px solid #dfe3fb; text-align: center; }
.lp-stats dt { font-size: .85rem; font-weight: 700; color: var(--lp-sub); line-height: 1.5; }
.lp-stats dd { margin: 0 0 4px; font-size: 1.9rem; font-weight: 800; color: var(--lp-primary-deep); line-height: 1.25; }
.lp-stat { display: inline-block; white-space: nowrap; }
.lp-stat small { font-size: .95rem; margin-left: 2px; color: inherit; }
.lp-subjects { padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid #dfe3fb; margin-bottom: 20px; }

/* チェックのついた箇条書き */
.lp-checks { list-style: none; margin: 0 0 1em; padding: 0; }
.lp-checks li { position: relative; padding: 4px 0 4px 30px; }
.lp-checks li::before { content: "✓"; position: absolute; left: 4px; top: 4px; color: #047857; font-weight: 800; }
.lp-checks-lg { max-width: 800px; }
.lp-checks-lg li { padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--lp-line); font-weight: 700; }
.lp-checks-lg li::before { top: 10px; }
.lp-privacy { margin-top: 28px; padding: 22px 20px; border-radius: 16px; background: #f0fdf4; border: 1px solid #bbf7d0; }
.lp-privacy .lp-links { margin: 0; }

/* 教室プランの案内 */
.lp-classroom-plan {
  display: grid; gap: 20px; align-items: center; margin-top: 28px; padding: 22px 20px;
  border-radius: 16px; background: #fff; border: 2px solid #fed7aa;
}
.lp-classroom-plan > * { min-width: 0; }
.lp-classroom-plan .lp-checks { margin-bottom: 0; }
.lp-classroom-actions .lp-btn { width: 100%; }
.lp-classroom-actions .lp-note { margin: 12px 0 0; }

/* ---------- 料金のカード ---------- */
.lp-plans { display: grid; gap: 16px; margin-bottom: 24px; }
.lp-plan {
  display: flex; flex-direction: column; min-width: 0; padding: 24px 20px;
  border-radius: 18px; background: #fff; border: 2px solid #c7d2fe;
}
.lp-plan-classroom { border-color: #fed7aa; }
.lp .lp-plan-name { font-size: 1.1rem; margin-bottom: .2em; }
.lp-plan-price { margin: 0 0 .4em; font-size: 1.45rem; font-weight: 800; color: var(--lp-primary-deep); line-height: 1.4; overflow-wrap: anywhere; }
.lp-plan-badge { align-self: flex-start; margin: 0 0 .8em; padding: 4px 12px; border-radius: 10px; background: #ffedd5; color: #7c2d12; font-size: .88rem; font-weight: 700; line-height: 1.6; }
.lp-plan-summary { color: var(--lp-sub); font-size: .95rem; }
.lp-plan-points { margin: 0 0 18px; padding-left: 1.2em; font-size: .95rem; }
.lp-plan .lp-btn { margin-top: auto; }

/* 人数ごとの料金の表 */
.lp-table-wrap { overflow-x: auto; margin-bottom: 14px; border-radius: 16px; border: 1px solid var(--lp-line); background: #fff; }
.lp-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.lp-table caption { padding: 12px 14px 4px; text-align: left; font-weight: 800; }
.lp-table th, .lp-table td { padding: 10px 14px; text-align: left; border-top: 1px solid var(--lp-line); }
.lp-table thead th { border-top: 0; font-size: .85rem; color: var(--lp-sub); }
.lp-table td, .lp-table tbody th { white-space: nowrap; }
.lp-table-total { font-weight: 800; }

/* ---------- よくある質問（<details>。JavaScript なしで開閉できる） ---------- */
.lp-faq { max-width: 860px; }
.lp-faq details { background: #fff; border: 1px solid var(--lp-line); border-radius: 14px; margin-bottom: 10px; }
.lp-faq summary {
  position: relative; display: block; min-height: 52px; padding: 14px 52px 14px 18px;
  font-weight: 800; cursor: pointer; list-style: none; border-radius: 14px;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after {
  content: "＋"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--lp-primary); font-weight: 800; line-height: 1;
}
.lp-faq details[open] summary::after { content: "−"; }
.lp-faq summary:hover { background: #f8f9ff; }
.lp-faq-a { padding: 0 18px 16px; color: var(--lp-sub); font-size: .97rem; }
.lp-faq-a p:last-child, .lp-faq-a ul:last-child { margin-bottom: 0; }
.lp-faq-a ul { margin: 0 0 1em; padding-left: 1.3em; }

/* ---------- さいごに ---------- */
.lp-final { background: linear-gradient(160deg, #eef2ff, #fdf2f8); text-align: center; }
.lp-final .lp-section-lead { margin-left: auto; margin-right: auto; }
.lp-final .lp-cta { justify-content: center; }
.lp-final-chars { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 6px; margin-bottom: 16px; }
.lp-final-chars .lp-char { width: 96px; height: 96px; }
.lp-avatar { width: 52px; height: 52px; border-radius: 16px; object-fit: cover; background: #fff; }

/* ---------- 下 ---------- */
.lp-foot { padding: 32px 0 calc(40px + env(safe-area-inset-bottom)); background: #f5f7fb; border-top: 1px solid var(--lp-line); color: var(--lp-sub); font-size: .92rem; }
.lp-foot-nav ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.lp-foot a { display: inline-flex; align-items: center; min-height: 44px; }
.lp-foot-legal { margin-bottom: 8px; }
/* 共通の部品（shared/_legal_links）を、この下の帯の見た目に合わせる */
.lp-foot .legal-links { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0 20px; padding: 0; font-size: .92rem; }
.lp-foot .legal-links a { color: var(--lp-primary); padding: 0; }
.lp-foot .legal-links a:hover { color: var(--lp-primary-deep); }
.lp-foot-copy { margin: 12px 0 0; }
.lp-foot-operator { margin-left: 12px; }

/* ---------- 広い画面 ---------- */
@media (min-width: 600px) {
  .lp-wrap { padding: 0 28px; }
  .lp h1 { font-size: 2rem; }
  .lp h2 { font-size: 1.7rem; }
  .lp-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-cards-2, .lp-cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lp-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-plans > .lp-plan:last-child:nth-child(odd) { grid-column: 1 / -1; }  /* 3つめ（教室プラン）は横いっぱいに */
  .lp-plans-2 { max-width: 760px; margin-left: auto; margin-right: auto; }
  .lp-hero-char { width: 120px; height: 120px; }
  .lp-hero-visual .lp-shot figcaption { padding: 0 116px; }
  .lp-title-char { width: 96px; height: 96px; }
  .lp-avatar { width: 64px; height: 64px; }
}
@media (min-width: 768px) {
  .lp-top { position: sticky; top: 0; z-index: 30; }
  .lp-section [id], .lp-section { scroll-margin-top: 84px; }
  .lp-section { padding: 72px 0; }
  .lp-hero { padding: 48px 0 64px; }
  .lp-steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-cards-3 .lp-card { padding: 18px 16px; }
  .lp-classroom-plan { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); padding: 28px; }
  .lp-privacy { padding: 28px; }
}
@media (min-width: 900px) {
  .lp-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; }
  .lp h1 { font-size: 2.2rem; }
  .lp-split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
  .lp-split-top { align-items: start; }
  .lp-hero-visual { max-width: none; }
}
@media (min-width: 1024px) {
  /* 5つの流れを横1列に */
  .lp-steps:not(.lp-steps-4) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lp-steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lp-steps > li { padding: 62px 16px 18px; }
  .lp-steps > li::before { left: 16px; top: 14px; }
  .lp-plans { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .lp-plans > .lp-plan:last-child:nth-child(odd) { grid-column: auto; }
}
/* ---------- 動き（動きをへらす設定の人には出さない） ---------- */
@media (prefers-reduced-motion: no-preference) {
  .lp .lp-btn { transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
  .lp .lp-btn:active { transform: translateY(1px); }
  .lp-hero-char-a { animation: lp-bob 3.2s ease-in-out infinite; }
  .lp-hero-char-b { animation: lp-bob-flip 3.2s ease-in-out -1.6s infinite; }
}
@keyframes lp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes lp-bob-flip { 0%, 100% { transform: scaleX(-1) translateY(0); } 50% { transform: scaleX(-1) translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .lp *, .lp *::before, .lp *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 印刷 ---------- */
@media print {
  .lp-top, .lp-skip, .lp-hero-char { display: none; }
  .lp-faq details > .lp-faq-a { display: block; }
}
