/* ============================================================
   けいさんカード — LP(/)専用スタイル
   アプリ本体(style.css)・静的ページ(doc.css)とデザイントークンを共有。
   LPはJSなし。動きはCSSのみで、reduced-motionでは止める。
   ============================================================ */

:root {
  --paper: #fff6e9;
  --ink: #453a2f;
  --grid: rgba(69, 58, 47, 0.08);
  --white: #fffdf8;
  --add: #ff8a5c;
  --add-soft: #ffe3d6;
  --sub: #62b6e8;
  --sub-soft: #ddf0fc;
  --sun: #ffd34e;
  --sun-soft: #fff3c4;
  --sun-deep: #c99a2e;
  --shadow: 0 5px 0 var(--ink);
  --font-ui: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
  --font-num: 'M PLUS Rounded 1c', var(--font-ui);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grid) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  line-height: 1.9;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
.num { font-family: var(--font-num); }

/* 見出しは語の途中で改行させない(「す/ぐ まるつけ」のような割れ方を防ぐ)。
   keep-allにすると読点・空白・<wbr>だけが改行位置になるので、
   長い見出しにはHTML側で読点か<wbr>を入れて折り返し位置を用意しておく。 */
h1, h2, h3 {
  word-break: keep-all;
  text-wrap: balance;
}

/* ---- ヘッダー ---- */
.lp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 0;
}
.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.05rem;
}
.lp-brand img { width: 1.7em; height: 1.7em; border-radius: 6px; }
.lp-login {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 16px;
  box-shadow: 0 3px 0 var(--ink);
}
.lp-login:active { transform: translateY(3px); box-shadow: none; }

/* ---- セクション共通 ---- */
main section {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 20px 0;
}
main section:last-of-type { padding-bottom: 72px; }
main h2 {
  font-size: 1.5rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 12px;
}
/* 見出しの下にクレヨン風の線 */
main h2::after {
  content: '';
  display: block;
  width: 64px;
  height: 6px;
  margin: 10px auto 0;
  border-radius: 3px;
  background: var(--sun);
}
.section-lead { text-align: center; font-size: 0.95rem; margin-bottom: 20px; }

/* ---- スマホフレーム ---- */
.phone {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 34px;
  padding: 10px;
  box-shadow: var(--shadow);
  width: min(64vw, 260px);
  margin: 0 auto;
}
.phone img { border-radius: 22px; border: 1.5px solid var(--grid); }
figure.phone figcaption {
  text-align: center;
  font-size: 0.8rem;
  padding-top: 8px;
}

/* ---- ヒーロー ---- */
.hero {
  display: grid;
  gap: 32px;
  padding-top: 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.7rem, 6.4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.5;
}
.hero-sub { font-size: 0.95rem; margin-top: 14px; }
.cta {
  display: inline-block;
  margin-top: 22px;
  background: var(--sun);
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.15rem;
  padding: 14px 44px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.cta:active { transform: translateY(5px); box-shadow: none; }
.cta-note { font-size: 0.78rem; opacity: 0.75; margin-top: 14px; line-height: 1.8; }

/* ヒーローだけ、ふわっと出す */
.hero-copy > *, .hero-phone {
  animation: rise 0.6s ease-out backwards;
}
.hero-copy > :nth-child(2) { animation-delay: 0.1s; }
.hero-copy > :nth-child(3) { animation-delay: 0.2s; }
.hero-copy > :nth-child(4) { animation-delay: 0.3s; }
.hero-phone { animation-delay: 0.25s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-phone { animation: none; }
}

/* ---- Before / After ---- */
.compare { overflow-x: auto; }
.compare table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  line-height: 1.6;
}
.compare th, .compare td {
  padding: 12px 12px;
  text-align: left;
  vertical-align: top;
  width: 50%;
}
.compare thead th {
  font-weight: 900;
  border-bottom: 2px solid var(--ink);
  background: rgba(69, 58, 47, 0.06);
}
.compare thead th.th-app { background: var(--sun-soft); }
.compare tbody td:first-child { opacity: 0.65; }
.compare tbody td:last-child { background: var(--sun-soft); font-weight: 900; }
.compare tbody tr + tr td { border-top: 1.5px dashed var(--grid); }
.pain-close { margin-top: 20px; font-size: 0.95rem; }
.pain-close strong { background: linear-gradient(transparent 60%, var(--sun-soft) 60%); }

/* ---- 実話コラム ---- */
.story-card {
  position: relative;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px 22px 22px;
  transform: rotate(-0.6deg);
}
/* マスキングテープ風 */
.story-card::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 110px;
  height: 24px;
  transform: translateX(-50%) rotate(-2deg);
  background: var(--sun);
  opacity: 0.85;
  border-radius: 3px;
}
.story-card h2 { font-size: 1.2rem; }
.story-card p { font-size: 0.92rem; margin-top: 8px; }

/* ---- 特徴 ---- */
.feature-grid { display: grid; gap: 16px; margin-top: 8px; }
.feature-card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px 18px;
}
.feature-card h3 { font-size: 1.05rem; font-weight: 900; margin-top: 6px; }
.feature-card p { font-size: 0.88rem; margin-top: 6px; }
.feature-emoji {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  border-radius: 12px;
  border: 2px solid var(--ink);
}
.f-input .feature-emoji { background: var(--sub-soft); }
.f-auto .feature-emoji { background: var(--add-soft); }
.f-growth .feature-emoji { background: var(--sun-soft); }
.f-clock .feature-emoji { background: var(--white); }
.growth-shots {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.growth-shots .phone { width: min(40vw, 220px); margin: 0; }

/* ---- つかいかた ---- */
.step-list { list-style: none; display: grid; gap: 28px; margin-top: 8px; }
.step-list li { text-align: center; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--sun);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--ink);
}
.step-list h3 { font-size: 1.1rem; font-weight: 900; margin-top: 10px; }
.step-list p { font-size: 0.88rem; margin: 6px auto 14px; max-width: 34em; }
.step-phone { width: min(52vw, 210px); }

/* ---- モード ---- */
.mode-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}
.mode-list li {
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--ink);
  padding: 14px;
  background: var(--white);
}
.mode-list h3 { font-size: 0.98rem; font-weight: 900; }
.mode-list p { font-size: 0.78rem; margin-top: 4px; line-height: 1.7; }
.mode-add { background: var(--add-soft); }
.mode-sub { background: var(--sub-soft); }
.mode-clock { background: var(--sun-soft); }

/* ---- 保護者向け ---- */
.assure-list { list-style: none; display: grid; gap: 14px; margin-top: 8px; }
.assure-list li {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
}
.assure-list h3 { font-size: 0.98rem; font-weight: 900; }
.assure-list h3::before { content: '✅ '; }
.assure-list p { font-size: 0.85rem; margin-top: 2px; }
.parents-link { text-align: center; font-size: 0.85rem; margin-top: 16px; }
.parents-link a { color: var(--ink); font-weight: 900; }

/* ---- FAQ ---- */
.faq details {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 12px 16px;
  margin-top: 12px;
}
.faq summary {
  cursor: pointer;
  font-weight: 900;
  font-size: 0.92rem;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: 'Q. '; color: var(--sun-deep); }
.faq summary::after {
  content: '＋';
  position: absolute;
  right: 0;
  top: 0;
}
.faq details[open] summary::after { content: '−'; }
.faq details p { font-size: 0.85rem; padding-top: 8px; }

/* ---- 締めのCTA ---- */
.cta-final {
  text-align: center;
  padding-bottom: 72px;
}
.cta-final h2::after { display: none; }

/* ---- フッター ---- */
.lp-footer {
  border-top: 2px solid var(--grid);
  padding: 24px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.lp-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 0.8rem;
}
.lp-footer a { color: var(--ink); opacity: 0.7; text-decoration: none; padding: 4px 2px; }
.lp-copyright { font-size: 0.72rem; opacity: 0.5; margin-top: 10px; }

/* ---- 広い画面 ---- */
@media (min-width: 720px) {
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    text-align: left;
    padding-top: 56px;
  }
  .hero-phone { margin: 0 0 0 auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .step-list { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .mode-list { grid-template-columns: repeat(3, 1fr); }
  .assure-list { grid-template-columns: repeat(2, 1fr); }
  .compare table { font-size: 0.95rem; }
}
