/* モグの診断ページ。色・角丸・余白はアプリの DESIGN.md トークンに合わせる。 */
:root {
  color-scheme: light dark;
  --ink: #3B3A3E;
  --ink-soft: #67646F;
  --surface: #FBF7EE;
  --accent: #4F5D8C;
  --blush: #F2A9A0;
  --bg-top: #EAE3F7;
  --bg-bottom: #F8F1EA;
  --radius: 24px;
  --line: rgba(79, 93, 140, .14);

  /* モーション。DESIGN.md の motion トークン(Spring は使わない) */
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
  --ease-gentle: cubic-bezier(.33, 0, .15, 1);
  --ease-breath: cubic-bezier(.45, 0, .55, 1);
  --dur-tap: .15s;
  --dur-standard: .35s;
  --dur-gentle: .7s;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E3DFEC;
    --ink-soft: #A8A4B8;
    --surface: #2E2E3E;
    --accent: #9AA6D8;
    --bg-top: #1D1D2C;
    --bg-bottom: #2B2540;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0 20px 64px;
  font-family: "Zen Maru Gothic", -apple-system, BlinkMacSystemFont, "Hiragino Maru Gothic ProN", sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 520px; margin: 0 auto; }
.screen { padding-top: 40px; text-align: center; }
.hidden { display: none; }

/* 導入のモグ。LP と同じ「呼吸」と「光だまり」で、同じ生きものだと分かるように */
.baku-figure { position: relative; display: grid; place-items: center; }
.baku-figure::before {
  content: ''; position: absolute; width: min(420px, 88vw); aspect-ratio: 1;
  background: radial-gradient(circle, var(--surface) 0%, transparent 66%);
  opacity: .8;
}
.baku {
  position: relative; width: 168px; height: auto; margin-bottom: 8px;
  animation: breathe 5.5s var(--ease-breath) infinite;
}
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.025); }
}
.baku-small { width: 72px; height: auto; }
h1 { font-size: clamp(1.9rem, 6vw, 2.4rem); font-weight: 900; line-height: 1.36; letter-spacing: -.025em; margin: 8px 0 14px; }
.lead { color: var(--ink-soft); margin: 0 0 28px; }
.note { color: var(--ink-soft); font-size: .78rem; margin-top: 24px; }

button, .link {
  display: block; width: 100%; border: 0; border-radius: 18px;
  min-height: 48px;
  font-size: 1rem; font-weight: 600; font-family: inherit;
  padding: 17px 20px; cursor: pointer; text-decoration: none;
}
.primary { background: var(--accent); color: #fff; }
.primary:active { opacity: .85; }
.ghost { background: transparent; color: var(--ink-soft); font-weight: 500; }

/* 設問 */
.progress { height: 4px; background: rgba(128,128,128,.2); border-radius: 2px; overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--accent); transition: width .5s var(--ease-gentle); }
.count { color: var(--ink-soft); font-size: .8rem; margin: 12px 0 0; }
.question { font-size: clamp(1.2rem, 4.4vw, 1.42rem); font-weight: 700; margin: 8px 0 24px; line-height: 1.55; letter-spacing: -.015em; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  background: var(--surface); color: var(--ink); border-radius: 18px;
  padding: 18px 20px; text-align: left; font-weight: 500; line-height: 1.6;
  transition: transform .18s cubic-bezier(.4,0,.2,1), opacity .18s;
}
.choice:active { transform: scale(.98); opacity: .92; }
/* 選んだ手応え。押したものだけが残り、ひと呼吸おいて次の問いへ */
.choice.chosen {
  background: var(--accent); color: #FDFBF6;
  transform: scale(.985);
  transition: background .12s var(--ease-standard), color .12s var(--ease-standard), transform .12s var(--ease-standard);
}
.choices.locked .choice:not(.chosen) { opacity: .4; transition: opacity .12s var(--ease-standard); }
.choices.locked { pointer-events: none; }
@media (hover: hover) {
  .choice:hover { transform: translateX(3px); background: color-mix(in srgb, var(--surface) 88%, var(--accent)); }
  .primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px -10px rgba(79,93,140,.6); }
  .ghost:hover { color: var(--ink); }
}
button:focus-visible, .link:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
/* 設問が入れ替わるたび、選択肢を上から順に置く(一斉に出ると「早く選べ」の圧になる) */
@keyframes choice-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.choices .choice { animation: choice-in .5s var(--ease-gentle) both; }
.choices .choice:nth-child(2) { animation-delay: .07s; }
.choices .choice:nth-child(3) { animation-delay: .14s; }
.choices .choice:nth-child(4) { animation-delay: .21s; }

/* 結果 */
@keyframes result-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
/* 結果は一斉に出さず、上から順に。モグが読み上げているように見せる */
#result:not(.hidden) > * { animation: result-in .65s var(--ease-gentle) both; }
#result:not(.hidden) > *:nth-child(1) { animation-delay: .05s; }
#result:not(.hidden) > *:nth-child(2) { animation-delay: .13s; }
#result:not(.hidden) > *:nth-child(3) { animation-delay: .21s; }
#result:not(.hidden) > *:nth-child(4) { animation-delay: .29s; }
#result:not(.hidden) > *:nth-child(5) { animation-delay: .37s; }
#result:not(.hidden) > *:nth-child(6) { animation-delay: .45s; }
#result:not(.hidden) > *:nth-child(7) { animation-delay: .53s; }
#result:not(.hidden) > *:nth-child(8) { animation-delay: .61s; }
#result:not(.hidden) > *:nth-child(9) { animation-delay: .69s; }
#result:not(.hidden) > *:nth-child(10) { animation-delay: .77s; }

.eyebrow { color: var(--ink-soft); font-size: .85rem; margin: 0; }
.emoji { font-size: 3rem; margin: 4px 0 0; }
.type-name { font-size: clamp(1.8rem, 6.4vw, 2.3rem); font-weight: 900; letter-spacing: -.02em; margin: 4px 0 6px; }
.catch { color: var(--ink-soft); margin: 0 0 24px; }
.card {
  background: var(--surface); border-radius: var(--radius);
  padding: 20px; margin-bottom: 14px; text-align: left;
}
.card p { margin: 0 0 10px; }
.card ul { margin: 0; padding-left: 1.2em; color: var(--ink-soft); }
.card li { margin-bottom: 4px; }
.care-title, .app-title { font-weight: 700; color: var(--accent); }
.app { text-align: center; margin-top: 28px; }
.app-body { color: var(--ink-soft); font-size: .9rem; }

/* ウェイトリスト */
.waitlist { margin-top: 18px; text-align: left; }
.waitlist-label { display: block; font-size: .9rem; color: var(--ink); margin-bottom: 8px; }
.waitlist-row { display: flex; gap: 8px; }
.waitlist-input {
  flex: 1; min-width: 0; border: 0; border-radius: 14px; padding: 14px 14px;
  font-size: 1rem; font-family: inherit; background: rgba(128,128,128,.12); color: var(--ink);
}
.waitlist-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.waitlist-button { width: auto; padding: 14px 18px; border-radius: 14px; white-space: nowrap; }
.waitlist-note { margin-top: 8px; }
.waitlist.done .waitlist-row { display: none; }
.waitlist.done .waitlist-label { color: var(--accent); font-weight: 600; }

footer { text-align: center; color: var(--ink-soft); font-size: .8rem; padding: 24px 0 8px; }
footer a { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .bar, .choice, .primary, .ghost { transition: none; }
  .baku, .choices .choice, #result:not(.hidden) > * { animation: none; }
  .choice:hover, .primary:hover { transform: none; }
  .choice.chosen { transition: none; }
}
