/* FLAT UP WebOS — Gentle Adventure（モバイルファースト）
 * 優しさ > 未来感 > 派手さ。黒赤の格闘技配色は使わない。
 * v2: 白い「説明書」から、温かい「優しい冒険」へ。色・影・光・小さな動きだけで変える。
 */
:root {
  --bg: #faf5ea;
  --bg2: #f3eddc;
  --glow-pink: rgba(255, 143, 184, .14);
  --glow-green: rgba(111, 174, 125, .16);
  --panel: #fffdf8;
  --panel-border: #ece3cf;
  --ink: #2b2a26;
  --muted: #6b6a60;
  --green: #6fae7d;
  --green-d: #4f8a5f;
  --pink: #ff5fa2;
  --peach: #ffb37a;
  --yellow: #ffd23f;
  /* 白文字とのコントラスト比 4.5:1 以上を保つ、読みやすいLINE系グリーン。 */
  --line: #07833a;
  --shadow: 0 2px 14px rgba(96, 82, 50, .08);
  --radius: 20px;
  --maxw: 560px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140e; --bg2: #1d1912;
    --glow-pink: rgba(255, 143, 184, .07);
    --glow-green: rgba(111, 174, 125, .09);
    --panel: #221d15; --panel-border: #37301f;
    --ink: #f5f1e6; --muted: #b0a992;
    --shadow: 0 2px 14px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
/* iPhoneで勢いよくスクロールした時、上下にはみ出す部分が白く光らないようにする。
   （body の背景は画面に固定しているため、html 側にも同じ色を敷いておく） */
html { background: var(--bg); }
:root { color-scheme: light dark; }
body {
  /* 温かいアイボリーの空気に、ピンクとグリーンの淡い光 */
  background:
    radial-gradient(60% 40% at 15% 0%, var(--glow-pink), transparent 70%),
    radial-gradient(70% 45% at 90% 100%, var(--glow-green), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

header.site {
  padding: 14px 20px;
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
header.site .dot { color: var(--green); }

main#app {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 20px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 画面の切り替え（柔らかいフェード + わずかな浮上） */
.screen { animation: rise .26s cubic-bezier(.22, .9, .3, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
}

/* ===== Welcome: FLAT UP GYMで撮影した実写が主役 ===== */
.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 0 0 20px;
}
img.welcome-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 26, 20, 0) 42%, rgba(20, 26, 20, .62) 100%);
  pointer-events: none;
}
.hero-copy {
  position: absolute;
  left: 18px; right: 18px; bottom: 14px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}
.hero-eyebrow {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  opacity: .92;
  margin: 0 0 4px;
}
.hero-title {
  display: block;
  /* 小さめのiPhoneでも句点だけ次の行へ落ちないサイズにする */
  font-size: clamp(18px, 5.4vw, 23px);
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  white-space: nowrap;
}

/* 画面が切り替わるたび、見出しへフォーカスを移して読み上げの位置を合わせている。
   その時に黒い枠が出ないようにする（キーボード操作の :focus-visible は残す）。 */
[tabindex="-1"]:focus { outline: none; }

h1.q {
  font-size: 24px;
  line-height: 1.6;
  margin: 0 0 8px;
  font-weight: 700;
}
p.welcome-lead {
  font-size: 17px;
  line-height: 2;
  margin: 0 0 22px;
  color: var(--muted);
}
p.note {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}

/* 現在位置（長さを意識させすぎない小さな点） */
.dots { display: flex; gap: 6px; margin: 0 0 18px; }
.dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--panel-border);
  transition: background .3s ease;
}
.dots span.on { background: var(--green); }

/* 選択肢: 温かいカード。親指1本・1タップ */
.options { display: flex; flex-direction: column; gap: 12px; margin: 0 0 20px; }
button.opt, a.cta, button.cta {
  display: block;
  width: 100%;
  text-align: center;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  padding: 16px 18px;
  min-height: 56px;
  border-radius: var(--radius);
  border: 1.5px solid var(--panel-border);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
button.opt:hover { border-color: var(--green); }
button.opt:active { transform: scale(.98); }
button.opt:focus-visible, a.cta:focus-visible, button.cta:focus-visible,
button.ghost:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}
/* タップした瞬間の小さな返事（選んだことが伝わる） */
button.opt.chosen {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(111, 174, 125, .22), var(--shadow);
  animation: chosen .18s ease;
}
@keyframes chosen {
  0% { transform: scale(1); }
  45% { transform: scale(.965); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  button.opt.chosen { animation: none; }
}

/* CTA */
a.cta.primary, button.cta.primary {
  background: var(--line);
  border-color: var(--line);
  color: #fff;
  box-shadow: 0 4px 16px rgba(6, 199, 85, .28);
}
a.cta.secondary { border-color: var(--green); color: var(--green-d); }
@media (prefers-color-scheme: dark) {
  a.cta.secondary { color: var(--green); }
}
/* Welcomeの一歩目は、日なたのような緑 */
button.cta.start {
  /* 17pxの白文字が屋外や弱視でも読めるよう、両端とも4.5:1以上にする。 */
  background: linear-gradient(135deg, #4b8159 0%, #376c45 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(111, 174, 125, .35);
}

/* 戻る・スキップ（控えめに） */
.subactions { display: flex; justify-content: space-between; gap: 12px; }
button.ghost {
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: none;
  border: none;
  padding: 12px 8px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 結果画面 */
.result h1.q { color: var(--green-d); }
@media (prefers-color-scheme: dark) { .result h1.q { color: var(--green); } }
.result p.welcome-lead { color: var(--ink); }
.result ul.hints { padding: 0 0 0 2px; margin: 0 0 20px; list-style: none; }
.result ul.hints li { margin: 0 0 10px; padding-left: 1.4em; position: relative; }
.result ul.hints li::before { content: "🌱"; position: absolute; left: 0; }
.result .reassurance {
  background: var(--panel);
  border: 1.5px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
}
/* CTA直前の、最後のひと押しではなく「最後の安心」 */
.result p.final-nudge {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--green-d);
  margin: 0 0 12px;
}
@media (prefers-color-scheme: dark) { .result p.final-nudge { color: var(--green); } }

footer.site {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 16px 20px 28px;
}
/* 途中でやめた人にも、静かに相談先だけは残しておく（主役のCTAとは競合させない） */
footer.site a.footer-line {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}
footer.site a.footer-line:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

/* iPhone SE相当では、写真内にも出る長いコピーを省いて店名を1行に保つ。 */
@media (max-width: 360px) {
  header.site {
    padding-inline: 12px;
  }
  header.site .brand-tagline { display: none; }
}

@media (min-width: 720px) {
  h1.q { font-size: 28px; }
  .hero-title { font-size: 28px; }
}
