/* Web準備マップ（試作）
   色と字は 9web 新サイトの決まり（apps/9web-site/design/STYLE.md §2・§3）の値を写した。新しい色は足していない。 */
:root {
  --c-bg: #FFFFFF;
  --c-gray: #F4F3F0;
  --c-ink: #3A3534;
  --c-muted: #5C5856;
  --c-line: #E2E0DA;
  --c-accent: #1C305C;
  --c-accent-press: #223A70;
  --c-mark: #DCE3F0;
  --f-base: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --fs-body: 1.0625rem;
  --fs-small: 1rem;
  --gutter: 20px;
  --ease-io-cubic: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-base);
  font-size: var(--fs-body);
  line-height: 1.8;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  line-break: strict;
}
h1, h2, p, ol, ul { margin: 0; }
button { font: inherit; letter-spacing: inherit; }

.app { max-width: 480px; margin: 0 auto; padding: 32px var(--gutter) 48px; }
.screen { display: none; }
.screen.is-active { display: block; animation: screen-in 0.35s ease-out both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 文字 */
.eyebrow { color: var(--c-muted); font-size: 0.875rem; letter-spacing: 0.08em; }
.title { color: var(--c-accent); font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.25rem); line-height: 1.4; margin: 4px 0 16px; }
.lead { margin-bottom: 20px; }
.hint { color: var(--c-muted); font-size: var(--fs-small); margin: 8px 0 16px; }
.note { color: var(--c-muted); font-size: 0.9375rem; margin: 16px 0; }
.sec-title { color: var(--c-accent); font-size: 1.375rem; line-height: 1.45; }
.facts { list-style: none; padding: 16px 20px; background: var(--c-gray); border-radius: 12px; }
.facts li { position: relative; padding-left: 1.2em; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); }

/* ボタン */
.btn { display: block; width: 100%; min-height: 56px; padding: 14px 20px; border-radius: 999px; border: 2px solid var(--c-accent); font-weight: 700; cursor: pointer; margin-top: 20px; }
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover, .btn-primary:active { background: var(--c-accent-press); border-color: var(--c-accent-press); }
.btn-primary:disabled { opacity: 0.45; cursor: default; }
.btn-secondary { background: #fff; color: var(--c-accent); margin-top: 12px; }
.btn-text { display: block; margin: 16px auto 0; padding: 10px 12px; background: none; border: 0; color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }

/* ステップインジケーター（motion-prompt #068 を移植。丸の半径17→14・線4px・伸びは0.3秒の easeInOutCubic） */
.stepper { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; margin: 0 0 28px; }
.stepper-track { position: absolute; top: 14px; left: 12.5%; right: 12.5%; height: 4px; border-radius: 2px; background: #e3e1df; }
.stepper-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 2px; background: var(--c-accent); transition: width 0.3s var(--ease-io-cubic); }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 2px var(--c-line); color: #9a9896; font-weight: 700; font-size: 0.875rem; transition: background 0.2s, box-shadow 0.2s; }
.lab { font-size: 0.875rem; color: #8a8684; font-weight: 600; }
.step.is-current .dot, .step.is-done .dot { background: var(--c-accent); box-shadow: none; color: #fff; }
.step.is-current .lab, .step.is-done .lab { color: var(--c-accent); }
.step.is-done .num { display: none; }
.step.is-done .dot::after { content: ""; width: 10px; height: 6px; border-left: 2.6px solid #fff; border-bottom: 2.6px solid #fff; transform: translateY(-1px) rotate(-45deg); }

/* 質問 */
.q-no { color: var(--c-accent); font-weight: 700; font-size: 0.9375rem; }
.q-title { color: var(--c-accent); font-size: 1.375rem; line-height: 1.5; margin: 4px 0 20px; }
.choices { display: grid; gap: 12px; }
.choice { display: block; width: 100%; text-align: left; padding: 16px 18px; min-height: 60px; border-radius: 12px; border: 2px solid var(--c-line); background: #fff; color: var(--c-ink); cursor: pointer; line-height: 1.6; }
.choice:hover { border-color: var(--c-accent); }
.choice[aria-pressed="true"] { border-color: var(--c-accent); background: var(--c-mark); }

/* ひとこと */
.caution { padding: 12px 16px; border-left: 4px solid var(--c-accent); background: var(--c-gray); border-radius: 0 8px 8px 0; font-size: 0.9375rem; margin-bottom: 12px; }
.caution strong { display: block; color: var(--c-accent); }
textarea { display: block; width: 100%; padding: 12px 14px; border: 2px solid var(--c-line); border-radius: 12px; font: inherit; font-size: 1rem; line-height: 1.7; color: var(--c-ink); resize: none; }
textarea:focus { border-color: var(--c-accent); outline: none; }
.counter { text-align: right; font-size: 0.875rem; color: var(--c-muted); margin-top: 4px; }
.error { color: #A3332B; font-size: 0.9375rem; min-height: 1.5em; }

/* 作成中 */
.making { padding: 96px 0; text-align: center; color: var(--c-accent); font-weight: 700; }
.making-dots { display: inline-flex; gap: 8px; margin-bottom: 12px; }
.making-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--c-accent); animation: dot 1s infinite ease-in-out; }
.making-dots i:nth-child(2) { animation-delay: 0.15s; }
.making-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-8px); opacity: 1; } }

/* 結果 */
.badge { display: inline-block; font-size: 0.875rem; color: var(--c-accent); background: var(--c-mark); padding: 6px 12px; border-radius: 8px; margin-bottom: 12px; line-height: 1.6; }
.r-heading { color: var(--c-accent); font-size: 1.375rem; line-height: 1.5; margin-bottom: 16px; }
.r-card { padding: 18px 20px; border-radius: 12px; background: var(--c-gray); margin-top: 12px; }
.r-label { font-size: 0.875rem; font-weight: 700; color: var(--c-muted); margin-bottom: 6px; }
.r-copy { font-size: 1.25rem; font-weight: 700; color: var(--c-accent); line-height: 1.6; min-height: 1.6em; }
.r-lead { margin-top: 6px; min-height: 1.8em; }
.r-items { padding-left: 1.4em; }
.r-items li { min-height: 1.8em; }
.r-next { font-weight: 700; min-height: 1.8em; }
.r-notes { list-style: none; padding: 0; margin-top: 8px; color: var(--c-muted); font-size: 0.9375rem; }
.r-notes li + li { margin-top: 4px; }
.route { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; }
.route li { position: relative; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1.5px solid var(--c-accent); color: var(--c-accent); font-size: 0.9375rem; font-weight: 600; }
.route li + li::before { content: "→"; position: absolute; left: -21px; top: 50%; transform: translateY(-50%); color: var(--c-muted); }

/* タイプライター（motion-prompt #006 を移植） */
.tw-ch { display: inline-block; }
.tw-cursor { display: inline-block; width: 3px; height: 1.1em; margin-left: 2px; vertical-align: -0.15em; border-radius: 2px; background: var(--c-accent); }
.tw-cursor.is-idle { animation: tw-blink 0.94s step-end infinite; }
@keyframes tw-blink { 0% { opacity: 1; } 53.2% { opacity: 0; } }

/* スマホ画面風の見本 */
.phone { position: relative; width: min(100%, 320px); margin: 20px auto 8px; padding: 14px 10px; border-radius: 40px; background: #1d1b1b; box-shadow: 0 12px 32px rgba(28, 48, 92, 0.18); }
.phone-notch { width: 84px; height: 18px; margin: 0 auto 8px; border-radius: 10px; background: #000; }
.phone-screen { height: 560px; overflow-y: auto; border-radius: 28px; background: #fff; font-size: 0.875rem; line-height: 1.7; letter-spacing: 0.02em; }
.m-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
.m-logo { font-weight: 700; color: var(--c-accent); }
.m-menu { display: grid; gap: 4px; }
.m-menu i { display: block; width: 18px; height: 2px; background: var(--c-ink); }
.m-hero { padding: 28px 18px 8px; }
.m-copy { font-size: 1.25rem; font-weight: 700; line-height: 1.5; color: var(--c-accent); }
.m-lead { margin-top: 10px; color: var(--c-muted); }
.m-cta { padding: 8px 18px 20px; }
.m-btn { display: block; padding: 11px; border-radius: 999px; background: var(--c-accent); color: #fff; font-weight: 700; text-align: center; }
.m-photo { margin: 0 18px; height: 120px; border-radius: 12px; background: var(--c-gray); display: grid; place-items: center; color: #9a9896; font-size: 0.8125rem; }
.m-sec { padding: 24px 18px 8px; }
.m-sec-title { font-weight: 700; color: var(--c-accent); }
.m-items { list-style: none; padding: 0 18px; display: grid; gap: 8px; counter-reset: m; }
.m-items li { counter-increment: m; display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--c-line); }
.m-items li::before { content: counter(m, decimal-leading-zero); color: var(--c-accent); font-weight: 700; }
.m-flow { padding: 24px 18px 8px; }
.m-route { list-style: none; padding: 0; margin-top: 8px; display: grid; gap: 6px; }
.m-route li { padding: 6px 12px; border-radius: 8px; background: var(--c-gray); }
.m-route li + li::before { content: "↓ "; color: var(--c-muted); }
.m-footer { margin-top: 24px; padding: 16px 18px 24px; background: var(--c-gray); color: var(--c-muted); font-size: 0.75rem; }
.actions { margin-top: 12px; }

/* 相談の確認 */
.sheet { width: min(100% - 32px, 440px); border: 0; border-radius: 16px; padding: 24px 20px; color: var(--c-ink); }
.sheet::backdrop { background: rgba(58, 53, 52, 0.45); }
.sheet-title { color: var(--c-accent); font-size: 1.25rem; line-height: 1.5; margin-bottom: 8px; }
.sheet-box { background: var(--c-gray); border-radius: 12px; padding: 14px 16px; }
.sheet-label { font-size: 0.875rem; font-weight: 700; color: var(--c-muted); }
.sheet-label + p { margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
