/* 配色は Android ui/theme/Color.kt に合わせる。アプリがライト固定なので LP もライト固定 */
/* 文字サイズは rem で書く。ブラウザの文字サイズ設定（既定 16px）を大きくした人にも効かせるため */
:root {
  color-scheme: light;
  --primary: #006C3C;
  --bg: #F7F5F1;
  --text: #1A1C1A;
  --text-sub: #4F5752;
  --border: #D9DED9;
  --surface: #FFFFFF;
  --primary-soft: #E3EFE7;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* 固定ボタンでページの最後が隠れないようにする。360px 幅では主文が 2 行に折り返し、ボタンが約 102px になる
     （102px + 上下の余白 20px + 枠 1px ≒ 123px、CDP で実測） */
  padding-bottom: calc(128px + env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 1.125rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

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

a { color: var(--primary); text-underline-offset: 0.2em; }

a:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

/* 見出しを文節で折り返し、「こ / と」のような 1 文字だけの行を作らない（未対応ブラウザは通常の折返し） */
h1, h2, h3 { line-height: 1.4; margin: 0; word-break: auto-phrase; }

p { margin: 0; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header { padding-top: 24px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__icon { border-radius: 14px; }

.brand__name { font-size: 1.5rem; font-weight: 800; }

.hero { padding: 24px 0 48px; }

.hero__inner { display: grid; gap: 32px; }

.hero__title { font-size: 2.125rem; font-weight: 800; }

.hero__lead { margin: 16px 0 28px; font-size: 1.25rem; }

.badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }

.badges__label { font-size: 1.125rem; line-height: 1.5; margin-bottom: 8px; }

/*
 * バッジの見た目の高さを 64px にそろえる（ユーザー依頼で 56px から拡大。Apple の「主役にしない」に収まる大きさ）。
 * Google Play の PNG は上下に透明な余白を持つ（646x250 のうち本体は y=29〜220、実測）ので、
 * 画像を 84px にすると本体が約 64px になる。App Store の SVG は余白が無いので 64px で、84px の箱の中央に置く。
 * こうすると上下の余白（各 10px）とラベルの間隔 8px で、ガイドラインの「高さの 1/4 = 16px 以上」の余白が取れる。
 */
.badges__link { display: flex; align-items: center; height: 84px; width: max-content; }

.badges__link:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

.badge--apple { width: auto; height: 64px; }

.badge--play { width: auto; height: 84px; }

/* 押せない導線。色だけに頼らず、点線枠と「近日公開」の文言でも区別する。高さはバッジ本体にそろえる */
.soon {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-sub);
  border: 2px dashed var(--border);
  font-weight: 800;
}

.app-name { margin-top: 16px; color: var(--text-sub); }

/* ストアの画像は端末の枠と見出しを含むので、枠を足さず角丸と細い線だけにする */
.shot { margin: 0 auto; max-width: 300px; }

.shot img, .gallery__item img { border-radius: 16px; border: 1px solid var(--border); }

/* 次の画像の端を見せて、横に送れることを伝える */
.gallery {
  list-style: none;
  margin: 0 -16px;
  padding: 4px 16px 16px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  overscroll-behavior-x: contain;
}

.gallery:focus-visible { outline: 3px solid var(--text); outline-offset: -3px; }

.gallery__item { flex: 0 0 min(72%, 260px); scroll-snap-align: start; }

.note--lead { margin: 0 0 16px; }

/* 画面下に常に出すダウンロードボタン。白い背景と上向きの影で本文と分ける */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(26, 28, 26, 0.16);
}

.sticky-cta__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 72px;
  padding: 8px 16px;
  border-radius: 14px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}

.sticky-cta__link:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

.sticky-cta__icon {
  flex: none;
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 幅が足りず折り返すとき「ダウ / ンロード」のように語の途中で切らず、空白の位置（「App Store / でダウンロード」）で切る */
.sticky-cta__text { display: flex; flex-direction: column; word-break: keep-all; }

.sticky-cta__sub { font-size: 1.125rem; font-weight: 700; }

.sticky-cta__sub[hidden] { display: none; }

.sticky-cta__pc { display: none; }

.section { padding: 56px 0; }

.section--surface { background: var(--surface); }

.section__title { font-size: 1.625rem; font-weight: 800; margin-bottom: 28px; }

.cards, .talk { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
}

.card h3, .faq h3 { font-size: 1.3125rem; margin-bottom: 8px; }

.card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.note { margin: 20px 0 32px; color: var(--text-sub); }

.talk { counter-reset: step; }

.talk__step {
  counter-increment: step;
  position: relative;
  padding: 20px 20px 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.talk__step::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 40px;
  text-align: center;
}

/* 番号は見出しの横だけに置き、吹き出しと説明は 360px でも幅いっぱいに使う */
.talk__step h3 {
  font-size: 1.3125rem;
  margin-bottom: 8px;
  min-height: 40px;
  padding-left: 52px;
  display: flex;
  align-items: center;
}

/* 入力例は押せる部品と誤解されないよう、ボタン風の影を付けず会話の吹き出しにする。左右はアプリと同じく AI が左、利用者が右 */
.bubble {
  max-width: min(34em, 88%);
  margin: 12px 0 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
}

.bubble--ai {
  border-radius: 4px 18px 18px 18px;
  background: var(--primary-soft);
}

.bubble--user {
  margin-left: auto;
  border-radius: 18px 4px 18px 18px;
  background: var(--surface);
}

.bubble__who { display: block; font-size: 0.9375rem; font-weight: 700; color: var(--text-sub); }

.faq { display: grid; gap: 28px; max-width: 46em; }

.faq h3, .faq p { position: relative; padding-left: 2.5rem; }

.faq h3::before, .faq p::before {
  position: absolute;
  left: 0;
  font-weight: 800;
}

.faq h3::before { content: "Q"; color: var(--primary); }

.faq p::before { content: "A"; color: var(--text-sub); }

.section--cta { background: var(--surface); border-top: 1px solid var(--border); }

.footer { padding: 40px 0 48px; border-top: 1px solid var(--border); }

.footer__list { margin: 0 0 12px; display: grid; gap: 8px; }

.footer__list div { display: flex; align-items: center; flex-wrap: wrap; gap: 0 16px; }

.footer__list dt { color: var(--text-sub); }

.footer__list dd { margin: 0; }

/* 文中リンクより押しやすくするため、上下の余白で高さを 48px 以上にする（10px×2 + 行の高さ 1.125rem×1.8 ≒ 52px。line-height を下げると割り込む） */
.footer a { display: inline-block; padding: 10px 0; }

.footer__legal { margin-top: 16px; font-size: 0.875rem; line-height: 1.7; color: var(--text-sub); }

.footer__copy { margin-top: 16px; color: var(--text-sub); }

/* PC 幅: 2 カラムにして間延びを防ぐ */
@media (min-width: 768px) {
  .hero { padding: 40px 0 72px; }
  .hero__inner { grid-template-columns: 1fr 300px; align-items: center; gap: 56px; }
  .hero__title { font-size: 3rem; }
  .section { padding: 80px 0; }
  .section__title { font-size: 2.125rem; }
}

/* 横に並べるのは 1024px 以上から。それより狭いと 1 列の幅が足りず、説明文が細切れになる。相談の 3 コマは PC 幅でも語の途中で改行されるので常に縦並び */
@media (min-width: 1024px) {
  .features-layout { display: grid; grid-template-columns: 1fr 260px; gap: 40px; align-items: start; }
  .shot--side { margin: 0; }
  .gallery { margin: 0; padding: 4px 0 16px; scroll-padding: 0; }
  .gallery__item { flex-basis: 220px; }
  /* PC 幅では、どの端末で使うか分からないので 2 つのストアを並べて中央に寄せる */
  .sticky-cta__link--mobile { display: none; }
  .sticky-cta__pc { display: flex; justify-content: center; gap: 24px; }
  .sticky-cta__pc .sticky-cta__link { width: 360px; min-height: 64px; font-size: 1.25rem; }
  /* 固定バー（64px + 上下の余白 20px + 枠 1px）でページの最後が隠れないようにする */
  body { padding-bottom: calc(85px + env(safe-area-inset-bottom)); }
  .badges--row { grid-template-columns: repeat(3, max-content); gap: 20px 48px; align-items: end; }
}
