:root {
  color-scheme: light;
  --ink: #173b35;
  --muted: #66736f;
  --paper: #fffdf8;
  --sand: #f6f2e8;
  --green: #15584d;
  --green-2: #1e7464;
  --mint: #dff0e9;
  --coral: #f27a5c;
  --gold: #e5a93f;
  --line: #d9dfda;
  --shadow: 0 20px 50px rgba(23, 59, 53, .11);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--sand); overflow-x: hidden; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background:
  radial-gradient(circle at 8% 4%, rgba(242,122,92,.13), transparent 26rem),
  radial-gradient(circle at 95% 20%, rgba(30,116,100,.12), transparent 24rem), var(--sand); overflow-x: hidden; }
button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.app-shell { width: min(100%, 720px); min-height: 100vh; margin: 0 auto; padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: .04em; font-size: 14px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--green); color: white; font-family: Georgia, serif; }
.progress-wrap { width: min(44vw, 230px); font-size: 12px; color: var(--muted); text-align: right; }
.progress-track { height: 7px; background: rgba(21,88,77,.12); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.progress-track i { display: block; width: 14%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--gold)); transition: width .25s ease; }
main { outline: none; }
.question-card, .intro-card, .loading-card, .complete-card { background: rgba(255,253,248,.95); border: 1px solid rgba(23,59,53,.10); box-shadow: var(--shadow); border-radius: 30px; padding: clamp(24px, 6vw, 46px); margin: 12px 0 28px; }
.intro-card { position: relative; overflow: hidden; }
.intro-card::after { content: ""; position: absolute; width: 170px; height: 170px; border-radius: 50%; border: 40px solid rgba(223,240,233,.7); right: -85px; top: -80px; pointer-events: none; }
.hero-badge, .eyebrow { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 11px; border-radius: 999px; background: var(--mint); color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .07em; }
h1 { font-size: clamp(30px, 8vw, 52px); line-height: 1.16; letter-spacing: -.04em; margin: 18px 0; }
h1 span { color: var(--coral); }
h2 { line-height: 1.35; }
.hero-copy, .lead { font-size: clamp(16px, 4.2vw, 19px); line-height: 1.85; color: #475954; }
.benefit-list { display: grid; gap: 10px; margin: 26px 0; }
.benefit-list div { display: flex; gap: 12px; align-items: center; background: white; border: 1px solid var(--line); padding: 13px 15px; border-radius: 16px; }
.benefit-list b { display: grid; place-items: center; flex: 0 0 31px; height: 31px; border-radius: 50%; background: var(--green); color: white; }
.privacy-card { margin: 26px 0; padding: 20px; border-radius: 20px; background: #f1f5f1; border-left: 5px solid var(--green-2); }
.privacy-card h2 { font-size: 17px; margin: 0 0 12px; }
.privacy-card p { color: #53625e; font-size: 13px; line-height: 1.75; margin: 8px 0; }
.privacy-card strong { color: #304641; }
.primary, .secondary, .choice-button, .text-button, .link-button { border: 0; border-radius: 16px; min-height: 52px; padding: 13px 18px; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.primary { background: var(--green); color: white; box-shadow: 0 9px 20px rgba(21,88,77,.19); }
.primary:hover { background: #10493f; }
.primary:disabled { opacity: .55; cursor: wait; }
.secondary { background: white; border: 1px solid #b8c4bf; }
.full { width: 100%; }
.large { min-height: 60px; font-size: 17px; }
.tiny { text-align: center; color: #75807d; font-size: 12px; line-height: 1.6; }
footer { color: #71807b; font-size: 12px; text-align: center; padding: 4px 10px 28px; }
.voice-hint, .analysis-note { display: flex; align-items: flex-start; gap: 12px; background: var(--mint); padding: 15px; border-radius: 17px; margin: 20px 0; }
.voice-hint span, .analysis-note span { font-size: 22px; }
.voice-hint p, .analysis-note p { margin: 0; font-size: 14px; line-height: 1.65; }
textarea { display: block; width: 100%; resize: vertical; min-height: 130px; border: 2px solid #cfd8d3; border-radius: 18px; padding: 16px; background: white; color: var(--ink); font-size: 16px; line-height: 1.7; outline: none; }
textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(30,116,100,.10); }
.field-meta { display: flex; justify-content: space-between; gap: 12px; color: #75807d; font-size: 11px; margin: 8px 2px 18px; }
.notice { border-radius: 15px; padding: 13px 15px; line-height: 1.6; margin: 16px 0; font-size: 14px; }
.notice.error { background: #fff0ec; color: #8e3e2b; border: 1px solid #f5c3b5; }
.notice.info { background: #eef6f3; color: var(--green); }
.answer-list { margin: 22px 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.answer-list li { position: relative; padding: 14px 15px 14px 42px; background: white; border: 1px solid var(--line); border-radius: 15px; line-height: 1.6; }
.answer-list li::before { content: "✓"; position: absolute; left: 15px; color: var(--green-2); font-weight: 900; }
.choice-stack { display: grid; gap: 11px; margin-top: 20px; }
.choice-grid { display: grid; gap: 12px; margin-top: 24px; }
.choice-button { justify-content: space-between; background: white; border: 1px solid var(--line); text-align: left; font-size: 16px; }
.choice-button:hover { border-color: var(--green); background: #f4faf7; }
.choice-button i { color: var(--coral); font-size: 24px; font-style: normal; }
.review-list { border-top: 1px solid var(--line); margin: 22px 0; }
.review-list > div { display: flex; justify-content: space-between; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); padding: 15px 0; }
.review-list span { min-width: 0; }
.review-list small { display: block; color: var(--muted); margin-bottom: 4px; }
.review-list strong { display: block; line-height: 1.55; overflow-wrap: anywhere; }
.review-list button { flex: 0 0 auto; min-width: 54px; min-height: 42px; border: 1px solid #bdc8c3; border-radius: 12px; background: white; font-weight: 700; }
.loading-card { text-align: center; padding-top: 58px; padding-bottom: 58px; }
.loading-orbit { position: relative; width: 90px; height: 90px; margin: 0 auto 22px; }
.loading-orbit::before { content: "AI"; position: absolute; inset: 18px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 50%; font-family: Georgia, serif; font-weight: 800; }
.loading-orbit i { position: absolute; width: 15px; height: 15px; border-radius: 50%; background: var(--coral); animation: orbit 1.6s linear infinite; left: 37px; top: 0; transform-origin: 7px 45px; }
.loading-orbit i:nth-child(2) { animation-delay: -.53s; background: var(--gold); }
.loading-orbit i:nth-child(3) { animation-delay: -1.06s; background: var(--green-2); }
@keyframes orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-orbit i { animation: none; } * { scroll-behavior: auto !important; transition: none !important; } }
.loading-lines { display: grid; gap: 9px; width: min(100%, 350px); margin: 25px auto 0; }
.loading-lines span { height: 10px; background: linear-gradient(90deg, #edf1ee, #dceae4, #edf1ee); border-radius: 99px; }
.loading-lines span:nth-child(2) { width: 80%; justify-self: center; }.loading-lines span:nth-child(3) { width: 58%; justify-self: center; }
.result-hero { text-align: center; padding: 42px 18px 28px; }
.result-seal { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); color: white; font-size: 18px; font-weight: 900; margin: 0 auto; box-shadow: 0 12px 25px rgba(242,122,92,.25); }
.result-hero h1 { margin-bottom: 12px; }.result-hero > p:last-child { line-height: 1.85; color: #4c5e59; }
.result-section, .candidates, .consent-card { margin: 0 0 24px; }
.result-section > h2, .candidates > h2 { font-size: 20px; margin-left: 4px; }
.confirmation-summary { white-space: pre-wrap; background: var(--mint); border-radius: 18px; padding: 18px; color: var(--ink); line-height: 1.85; }
.diagnosis-summary { background: rgba(255,253,248,.95); border: 1px solid rgba(23,59,53,.10); border-radius: 22px; padding: 22px; }
.diagnosis-summary p, .diagnosis-summary li { line-height: 1.8; }.diagnosis-summary h3 { margin: 20px 0 8px; font-size: 17px; }.diagnosis-summary ul { margin: 0; padding-left: 1.4em; }
.answer-summary { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--line); }
.answer-summary div { background: var(--paper); padding: 17px; }.answer-summary small { color: var(--muted); }.answer-summary p { margin: 7px 0 0; line-height: 1.65; font-weight: 700; }
.candidates { display: grid; gap: 18px; }
.candidate-card { position: relative; background: var(--paper); border: 1px solid rgba(23,59,53,.11); border-radius: 26px; padding: 25px 20px 22px; box-shadow: 0 14px 35px rgba(23,59,53,.08); overflow: hidden; }
.candidate-card.rank-1 { border: 2px solid var(--coral); }.candidate-card h2 { padding-right: 70px; font-size: 23px; margin: 5px 0 12px; }.candidate-card > p { line-height: 1.75; color: #4e605b; }
.candidate-rank { position: absolute; right: 0; top: 0; width: 72px; height: 78px; display: grid; place-items: center; align-content: center; background: var(--green); color: white; border-radius: 0 0 0 24px; }
.candidate-rank small { font-size: 9px; }.candidate-rank b { font-size: 27px; line-height: 1; }
.score-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 20px 0; }
.score-grid div { min-width: 0; background: #f2f5f2; border-radius: 12px; padding: 10px 7px; text-align: center; }
.score-grid dt { color: var(--muted); font-size: 11px; }.score-grid dd { margin: 5px 0 0; color: var(--gold); font-size: clamp(10px, 2.9vw, 13px); letter-spacing: -.08em; white-space: nowrap; }
.time-box { background: var(--mint); border-radius: 17px; padding: 15px; }.time-box small, .time-box span { display: block; }.time-box strong { display: block; margin: 5px 0; font-size: 17px; }.time-box span { color: #4e665f; font-size: 13px; }
.reason { margin-top: 18px; }.reason b { font-size: 13px; }.reason p { margin: 7px 0; line-height: 1.7; }.disclaimer { font-size: 11px !important; color: #78837f !important; }
.consent-card { background: var(--ink); color: white; border-radius: 28px; padding: 28px 22px; }.consent-card .eyebrow { background: rgba(255,255,255,.12); color: #d9f1e7; }.consent-card h2 { font-size: 24px; }.consent-card > p { color: #dbe5e1; line-height: 1.75; font-size: 14px; }.consent-card .primary { background: var(--coral); }.consent-card .secondary { border-color: rgba(255,255,255,.38); background: transparent; color: white; }
.complete-card { text-align: center; }.complete-icon { display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; margin: 8px auto 20px; background: var(--green); color: white; font-size: 38px; font-weight: 900; }
.openchat-card { margin: 28px 0 20px; background: var(--mint); border-radius: 22px; padding: 22px; }.openchat-card > span { font-size: 12px; font-weight: 800; color: var(--green-2); }.openchat-card h2 { font-size: 28px; margin: 7px 0; }.openchat-card p { line-height: 1.7; }.link-button { margin-top: 12px; }.search-guide { padding: 15px; background: white; border-radius: 15px; }.search-guide small, .search-guide strong { display: block; }.search-guide strong { font-size: 22px; margin-top: 4px; }.text-button { background: transparent; text-decoration: underline; color: var(--green); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 600px) {
  .app-shell { padding-left: 24px; padding-right: 24px; }
  .question-card, .intro-card, .loading-card, .complete-card { margin-top: 24px; }
  .candidate-card { padding: 30px; }.consent-card { padding: 34px; }.answer-summary { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 370px) { .score-grid { grid-template-columns: 1fr; }.score-grid dd { font-size: 13px; }.brand > span:last-child { display: none; } }
