/*
 * 褒め手帳 (えらいTODO / Praisedone List) — マーケティングページ + 規約ページ
 *
 * 配色はアプリ本体の ColorAssets.xcassets をそのまま持ってきている。
 * 生成りクリームの地に、スカイブルーを主役、ゴールド/ミント/ピンク/ラベンダーを差し色。
 * 端末モックは太い黒枠を付けず、細い線と影だけにしてストア用ポスターと絵を揃える。
 */

:root {
  --cream:     #FFF9F0;
  --cream-2:   #FDF2E4;
  --surface:   #FFFDF8;
  --ink:       #313E4A;
  --ink-soft:  #73828E;
  --sky:       #5CBDEA;
  --sky-deep:  #2F97C9;
  --sky-soft:  #DFEBF3;
  --gold:      #FFC940;
  --mint:      #5AC9A6;
  --pink:      #FA9AB5;
  --lilac:     #9F8FF2;

  --shell:  min(1120px, 100% - 2.5rem);
  --radius: 28px;

  --shadow-soft: 0 2px 6px rgba(49, 62, 74, .04), 0 12px 30px -14px rgba(49, 62, 74, .16);
  --shadow-lift: 0 4px 10px rgba(49, 62, 74, .06), 0 26px 50px -20px rgba(49, 62, 74, .22);
}

/* ── 下地 ───────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  /* Google Fonts が来る前でもガタつかないよう、丸ゴシックを先に並べる */
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN",
               "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* 日本語は単語で折れないので、句読点まわりで自然に折る */
  line-break: strict;
  overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--sky-deep); }

h1, h2, h3 { font-weight: 800; line-height: 1.4; letter-spacing: .01em; margin: 0; }

/* ── 地に散らす肉球 ────────────────────────────────── */

.paw-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.paw-field .p {
  position: absolute;
  fill: var(--sky);
  opacity: .06;
}

.paw-field .p1 { width: 84px;  height: 84px;  top: 6%;   left: 4%;   transform: rotate(-18deg); }
.paw-field .p2 { width: 52px;  height: 52px;  top: 18%;  right: 7%;  transform: rotate(22deg); }
.paw-field .p3 { width: 66px;  height: 66px;  top: 42%;  left: 8%;   transform: rotate(12deg); }
.paw-field .p4 { width: 44px;  height: 44px;  top: 55%;  right: 5%;  transform: rotate(-26deg); }
.paw-field .p5 { width: 72px;  height: 72px;  top: 72%;  left: 3%;   transform: rotate(8deg); }
.paw-field .p6 { width: 56px;  height: 56px;  top: 86%;  right: 9%;  transform: rotate(-14deg); }
.paw-field .p7 { width: 38px;  height: 38px;  top: 30%;  right: 18%; transform: rotate(30deg); }
.paw-field .p8 { width: 46px;  height: 46px;  top: 64%;  left: 16%;  transform: rotate(-8deg); }

@media (max-width: 860px) {
  /* 狭い画面では本文に重なって読みにくくなるので、端の数枚だけ残す */
  .paw-field .p3, .paw-field .p7, .paw-field .p8 { display: none; }
  .paw-field .p { opacity: .05; }
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

/* ── ヘッダー ───────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .7rem max(1.25rem, calc((100% - var(--shell)) / 2));
  background: rgba(255, 249, 240, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(49, 62, 74, .07);
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand img { border-radius: 10px; }

.site-nav { display: flex; gap: 1.5rem; }

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
  transition: color .2s;
}

.site-nav a:hover { color: var(--sky-deep); }

@media (max-width: 720px) { .site-nav { display: none; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .7rem 1.5rem;
  border-radius: 999px;
  background: var(--sky);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px -8px rgba(47, 151, 201, .8);
  transition: transform .2s, box-shadow .2s, background .2s;
}

.btn:hover {
  background: var(--sky-deep);
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -10px rgba(47, 151, 201, .9);
}

.btn-sm { padding: .5rem 1.15rem; font-size: .88rem; white-space: nowrap; }

.badge-link {
  display: inline-block;
  transition: transform .2s;
}

.badge-link:hover { transform: translateY(-2px); }
.badge-link img { width: 163px; height: auto; }

/* Google Play の公式バッジは周囲に余白が入っているぶん、
   同じ指定だと Apple のものより小さく見える。少し大きめに出して高さを揃える */
.badge-play img { width: 184px; }

.store-badges {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.store-badges-center { justify-content: center; }

/* ── スクロールで浮き上がる ───────────────────────── */

/*
 * スクロールで浮き上がる演出。
 *
 * **隠すのは JS がある場合だけ** にしている (`.js` を head で付ける)。
 * IntersectionObserver が何かの理由で発火しないと、opacity:0 のまま
 * 本文がまるごと消えるため。ヒーローは観測に頼らず CSS だけで出す。
 */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1);
}

.js .reveal.is-in { opacity: 1; transform: none; }

.intro { animation: intro-rise .8s cubic-bezier(.22, 1, .36, 1) both; }
.intro-late { animation-delay: .12s; }

@keyframes intro-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .intro { animation: none; }
}

/* ── ヒーロー ───────────────────────────────────────── */

.hero {
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 8vw, 7rem);
  display: grid;
  grid-template-columns: 1fr minmax(0, 460px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.25rem;
  padding: .35rem 1rem .35rem .8rem;
  border-radius: 999px;
  background: var(--sky-soft);
  color: var(--sky-deep);
  font-size: .82rem;
  font-weight: 800;
}

.eyebrow .dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--sky);
}

.hero h1 {
  font-size: clamp(2.15rem, 5.6vw, 3.5rem);
  line-height: 1.32;
  letter-spacing: -.01em;
  margin-bottom: 1.5rem;
}

/* 「ぜんぶ褒めて」だけ手描きのマーカーで引いたように見せる */
.hero h1 em {
  font-style: normal;
  position: relative;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: -.1em;
  right: -.1em;
  bottom: .12em;
  height: .3em;
  border-radius: .2em;
  background: linear-gradient(90deg, rgba(255, 201, 64, .5), rgba(255, 201, 64, .78));
  z-index: -1;
}

.lead {
  margin: 0 0 2.25rem;
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--ink-soft);
  line-height: 2.1;
}

.hero-cta { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }

.hero-note {
  margin: 0;
  font-size: .8rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ── ヒーローの端末とまわりの動物 ─────────────────── */

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: .55;
  z-index: 0;
}

.blob.b1 { width: 340px; height: 340px; top: -6%;  left: -18%;  background: var(--sky); }
.blob.b2 { width: 280px; height: 280px; bottom: 2%; right: -14%; background: var(--pink); }
.blob.b3 { width: 240px; height: 240px; top: 32%;  right: 10%;  background: var(--gold); }

.phone { position: relative; z-index: 2; }

.phone img {
  border-radius: 40px;
  border: 1px solid rgba(49, 62, 74, .14);
  box-shadow: var(--shadow-lift);
}

.phone-hero { width: min(300px, 78%); }

/* 端末より奥に置いて、うしろから覗いているように見せる (ストア用ポスターと同じ考え方) */
.float {
  position: absolute;
  z-index: 1;
  width: clamp(72px, 15%, 118px);
  filter: drop-shadow(0 10px 16px rgba(49, 62, 74, .16));
  animation: bob 6s ease-in-out infinite;
}

/* 端末の縁に少しかぶせて、うしろから顔を出しているように見せる */
.float.f1 { top: 15%;    left: 2%;   animation-delay: -.4s; }
.float.f2 { top: 5%;     right: 1%;  animation-delay: -2.1s; scale: -1 1; }
.float.f3 { bottom: 13%; right: 0%;  animation-delay: -3.4s; }
.float.f4 { bottom: 4%;  left: 5%;   animation-delay: -1.3s; width: clamp(58px, 11%, 92px); }

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -12px; }
}

@media (prefers-reduced-motion: reduce) { .float { animation: none; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { justify-content: center; }
  .eyebrow { margin-inline: auto; }
  .hero-stage { order: 2; }
  .phone-hero { width: min(280px, 68%); }
}

/* ── 見出し共通 ─────────────────────────────────────── */

.section-title {
  font-size: clamp(1.6rem, 3.6vw, 2.35rem);
  text-align: center;
  margin-bottom: .75rem;
}

.section-lead {
  max-width: 34rem;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--ink-soft);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
  padding: .3rem .9rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .04em;
  background: var(--sky-soft);
  color: var(--sky-deep);
}

.kicker[data-tone="gold"]  { background: #FFF1CE; color: #B07B00; }
.kicker[data-tone="mint"]  { background: #DBF4EB; color: #1F8567; }
.kicker[data-tone="pink"]  { background: #FEE4EC; color: #C4517A; }
.kicker[data-tone="lilac"] { background: #EAE6FD; color: #6A56D6; }

.ai-badge {
  padding: .05rem .45rem;
  border-radius: 999px;
  background: var(--lilac);
  color: #fff;
  font-size: .68rem;
  letter-spacing: .06em;
}

/* ── 3 ステップ ─────────────────────────────────────── */

.steps {
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.step-list {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.step-list li {
  position: relative;
  padding: 2.5rem 1.75rem 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.step-num {
  position: absolute;
  top: -1.05rem;
  left: 50%;
  translate: -50% 0;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sky);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 16px -8px rgba(47, 151, 201, .9);
}

.step-list li:nth-child(2) .step-num { background: var(--gold); box-shadow: 0 8px 16px -8px rgba(255, 201, 64, .9); }
.step-list li:nth-child(3) .step-num { background: var(--pink); box-shadow: 0 8px 16px -8px rgba(250, 154, 181, .9); }

.step-list h3 { font-size: 1.2rem; margin-bottom: .5rem; }

.step-list p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* ── 機能 ───────────────────────────────────────────── */

.features {
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(1rem, 3vw, 2rem) 0;
  display: grid;
  gap: clamp(3.5rem, 7vw, 6rem);
}

.feature {
  display: grid;
  grid-template-columns: 1fr minmax(0, 380px);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.feature.reverse { grid-template-columns: minmax(0, 380px) 1fr; }
.feature.reverse .feature-text { order: 2; }
.feature.reverse .feature-shot { order: 1; }

.feature h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  margin-bottom: 1.1rem;
}

.feature-text > p {
  margin: 0;
  color: var(--ink-soft);
}

.feature-shot { display: grid; place-items: center; }
.feature-shot .phone { width: min(280px, 82%); }

.ticks {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: .7rem;
}

.ticks li {
  position: relative;
  padding-left: 1.9rem;
  font-size: .93rem;
  font-weight: 700;
}

/* 肉球の代わりに、押した「はんこ」っぽい丸チェック */
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / .72rem no-repeat;
}

@media (max-width: 860px) {
  .feature,
  .feature.reverse { grid-template-columns: 1fr; text-align: center; }
  .feature.reverse .feature-text { order: 1; }
  .feature.reverse .feature-shot { order: 2; }
  .kicker { margin-inline: auto; }
  .ticks { justify-items: center; }
  .ticks li { text-align: left; }
  .feature-shot .phone { width: min(260px, 70%); }
}

/* ── 仲間 ───────────────────────────────────────────── */

.friends {
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

/* 16 匹をきれいに割り切れる 8 / 4 列で組む。
   auto-fit だと 5 列になって最後の 1 匹が余る */
.friend-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1rem;
}

@media (max-width: 940px) { .friend-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .friend-grid { gap: .55rem; } }

.friend-grid li {
  padding: clamp(.6rem, 2vw, 1.1rem) .4rem clamp(.5rem, 1.6vw, .9rem);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s;
}

.friend-grid li:hover { transform: translateY(-6px) rotate(-1.5deg); box-shadow: var(--shadow-lift); }

@media (prefers-reduced-motion: reduce) { .friend-grid li:hover { transform: none; } }

/* 白い動物 (白猫・白クマ) がカードに埋もれるので、淡い丸を敷いて輪郭を立てる */
.friend-grid img {
  width: clamp(46px, 7vw, 72px);
  margin: 0 auto .45rem;
  padding: 4px;
  border-radius: 50%;
  background: var(--cream);
}

.friend-grid span {
  display: block;
  font-size: clamp(.68rem, 1.6vw, .8rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink-soft);
}

.teacher-card {
  margin-top: 2.5rem;
  padding: 1.75rem clamp(1.5rem, 4vw, 2.75rem);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #F3F0FE, #FFF7EC);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.teacher-card img { width: clamp(84px, 16vw, 124px); flex: none; }
.teacher-card h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.teacher-card p { margin: 0; font-size: .93rem; color: var(--ink-soft); }

@media (max-width: 620px) {
  .teacher-card { flex-direction: column; text-align: center; }
}

/* ── Pro ────────────────────────────────────────────── */

.pro {
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(3.5rem, 8vw, 6rem);
}

.pro-inner {
  padding: clamp(2.25rem, 6vw, 4rem);
  border-radius: clamp(28px, 5vw, 40px);
  background: linear-gradient(150deg, #FFFDF8, #F6F1FF 55%, #FFF3E2);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.pro h2 {
  font-size: clamp(1.55rem, 3.6vw, 2.3rem);
  margin-bottom: 2.25rem;
}

.pro-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  text-align: left;
}

.pro-list li {
  padding: 1.1rem 1.25rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  font-size: .9rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

.pro-list b {
  display: block;
  margin-bottom: .15rem;
  color: var(--ink);
  font-size: .98rem;
}

.pro-note { margin: 0; font-size: .82rem; color: var(--ink-soft); line-height: 1.9; }

/* ── 最後の一押し ───────────────────────────────────── */

.closing {
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(4rem, 9vw, 7rem);
  text-align: center;
}

.closing-cat {
  width: clamp(120px, 24vw, 180px);
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 14px 20px rgba(49, 62, 74, .14));
}

.closing h2 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); margin-bottom: .85rem; }

.closing > p { margin: 0 0 2rem; color: var(--ink-soft); }

/* ── フッター ───────────────────────────────────────── */

.site-footer {
  border-top: 1px solid rgba(49, 62, 74, .08);
  background: var(--cream-2);
  padding: clamp(2.25rem, 5vw, 3.25rem) max(1.25rem, calc((100% - var(--shell)) / 2));
  display: grid;
  gap: 1.5rem;
}

.foot-brand { display: flex; align-items: center; gap: .85rem; }
.foot-brand img { border-radius: 12px; }
.foot-brand b { display: block; font-size: 1rem; line-height: 1.5; }
.foot-brand span { font-size: .78rem; color: var(--ink-soft); }

.foot-links { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }

.foot-links a {
  font-size: .86rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .2s;
}

.foot-links a:hover { color: var(--sky-deep); text-decoration: underline; }

.copyright { margin: 0; font-size: .78rem; color: var(--ink-soft); }

/* ── 規約・プライバシーの本文ページ ─────────────────── */

.container {
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 5rem;
}

.container h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 1.5rem; }
.container h2 { font-size: 1.2rem; margin: 2.5rem 0 .75rem; }
.container h3 { font-size: 1.02rem; margin: 1.75rem 0 .5rem; }
.container p, .container li { color: var(--ink-soft); }
.container ul, .container ol { padding-left: 1.4rem; }
.container li { margin-bottom: .4rem; }

/* 規約ページ上部の「← ホーム / English」 */
.container > nav {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2rem;
  font-size: .88rem;
  font-weight: 700;
}

.container > nav a { text-decoration: none; }
.container > nav a:hover { text-decoration: underline; }

.contact {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.contact p:last-child { margin-bottom: 0; }

.doc-list { list-style: none; padding: 0; display: grid; gap: .6rem; }

.doc-list a {
  display: block;
  padding: .9rem 1.25rem;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  transition: transform .2s, box-shadow .2s;
}

.doc-list a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }

/* ── 言語切替 ─────────────────────────────────────── */

.lang-switch {
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(49, 62, 74, .16);
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s, color .2s;
}

.lang-switch:hover { border-color: var(--sky); color: var(--sky-deep); }

/* 狭い画面ではダウンロードボタンを優先する */
@media (max-width: 520px) { .lang-switch { display: none; } }
