:root {
  --navy: #16364a;
  --navy-deep: #102b3c;
  --teal: #2f7873;
  --teal-light: #dcebe7;
  --cream: #f6f2e8;
  --paper: #fffdf8;
  --coral: #e48166;
  --gold: #dfaf5e;
  --ink: #173342;
  --muted: #60727a;
  --line: #cbd7d5;
  --white: #fff;
  --shadow: 0 18px 50px rgba(20, 52, 69, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.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; }
.skip-link { position: fixed; top: 10px; left: 20px; z-index: 100; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); background: var(--white); color: var(--navy); }
.skip-link:focus { width: auto; height: auto; padding: 10px 16px; overflow: visible; clip-path: none; }

.page-shell { min-height: 100vh; overflow: hidden; }
.site-header, .site-footer, .screen { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.site-header { height: 104px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(22, 54, 74, .18); }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--navy); text-decoration: none; font-family: Georgia, "Yu Mincho", serif; font-size: 22px; font-weight: 700; letter-spacing: .04em; }
.brand small { font: 600 11px/1 sans-serif; letter-spacing: .08em; opacity: .65; }
.brand-mark { width: 42px; height: 42px; border: 1.5px solid var(--teal); border-radius: 50%; position: relative; display: grid; place-items: center; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.brand-mark::before { top: 7px; right: 4px; }
.brand-mark::after { bottom: 6px; left: 4px; width: 3px; height: 3px; }
.brand-mark span { width: 17px; height: 17px; border: 5px solid var(--teal); border-top-color: transparent; border-right-color: transparent; border-radius: 50%; transform: rotate(-25deg); }
.event-label { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .16em; }

.hero { min-height: calc(100vh - 180px); display: grid; grid-template-columns: 1.18fr .82fr; gap: 64px; align-items: center; padding: 72px 0 54px; position: relative; }
.hero-copy { padding: 24px 0 72px; position: relative; z-index: 2; }
.eyebrow { margin: 0 0 15px; color: var(--teal); font-size: 13px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; color: var(--navy-deep); font-family: Georgia, "Yu Mincho", serif; font-size: clamp(42px, 5vw, 72px); line-height: 1.3; letter-spacing: .01em; }
h1 em { color: var(--teal); font-style: normal; position: relative; }
h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='8'%3E%3Cpath d='M0 5 Q60 0 125 5 T250 4' fill='none' stroke='%23dfaF5e' stroke-width='2'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
.lead { max-width: 630px; margin: 32px 0 34px; color: #4c626d; font-size: 18px; }
.button { min-height: 58px; padding: 14px 26px; border-radius: 5px; border: 1px solid transparent; font-weight: 800; letter-spacing: .03em; transition: transform .18s, background .18s, box-shadow .18s; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, .option input:focus-visible + span, .goal-option input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 3px; }
.button-primary { color: var(--white); background: var(--teal); box-shadow: 0 10px 24px rgba(47, 120, 115, .25); }
.button-primary:hover { background: #276964; }
.button-primary span { margin-left: 22px; }
.button-secondary { color: var(--white); background: var(--coral); }
.button-ghost { color: var(--navy); background: transparent; border-color: var(--line); }
.button-outline { color: var(--teal); background: var(--white); border-color: var(--teal); }
.trust-list { list-style: none; display: flex; gap: 25px; margin: 34px 0 0; padding: 0; }
.trust-list li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.trust-list span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--teal); font-weight: 800; }
.trust-list strong { color: var(--navy); font-size: 14px; }

.hero-visual { min-height: 520px; position: relative; display: grid; place-items: center; }
.hero-visual::before { content: ""; position: absolute; width: 390px; height: 390px; border-radius: 50%; background: var(--teal-light); }
.moon { width: 200px; height: 200px; border-radius: 50%; background: var(--gold); position: relative; z-index: 1; box-shadow: 0 20px 50px rgba(130, 99, 40, .13); }
.moon-cutout { position: absolute; width: 190px; height: 190px; border-radius: 50%; background: var(--teal-light); left: 62px; top: -28px; }
.orbit { position: absolute; border: 1px solid rgba(47, 120, 115, .35); border-radius: 50%; }
.orbit-one { width: 470px; height: 330px; transform: rotate(-18deg); }
.orbit-two { width: 320px; height: 480px; transform: rotate(42deg); }
.star { position: absolute; z-index: 2; color: var(--coral); font-size: 30px; }
.star-one { top: 90px; right: 62px; }
.star-two { bottom: 130px; left: 50px; color: var(--gold); font-size: 20px; }
.hero-visual > p { position: absolute; right: 0; bottom: 72px; margin: 0; color: var(--navy); font: 13px/1.45 Georgia, serif; letter-spacing: .18em; }
.hero-visual > p strong { font-size: 21px; }
.sleep-wave { position: absolute; left: 10px; top: 130px; display: flex; align-items: center; gap: 4px; transform: rotate(-20deg); }
.sleep-wave i { display: block; width: 3px; height: 18px; border-radius: 2px; background: var(--teal); }
.sleep-wave i:nth-child(2), .sleep-wave i:nth-child(4) { height: 32px; }
.sleep-wave i:nth-child(3) { height: 46px; }
.notice-card { position: absolute; left: 0; bottom: 8px; display: flex; gap: 14px; max-width: 650px; padding: 15px 18px; border-left: 3px solid var(--coral); background: rgba(255,255,255,.56); color: var(--muted); font-size: 13px; line-height: 1.6; }
.notice-card p { margin: 0; }
.notice-card strong { color: var(--navy); }
.notice-icon { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--coral); border-radius: 50%; color: var(--coral); font: 700 14px Georgia, serif; }

.content-screen { padding: 72px 0 90px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section-heading.compact { max-width: 760px; }
h2 { margin: 0; color: var(--navy); font: 700 clamp(32px, 4vw, 50px)/1.35 Georgia, "Yu Mincho", serif; }
.section-heading p:not(.eyebrow), .result-intro > p:last-child { margin: 12px 0 0; color: var(--muted); }
.progress-badge { flex: 0 0 auto; width: 112px; height: 112px; display: grid; place-content: center; text-align: center; border: 1px solid var(--teal); border-radius: 50%; color: var(--teal); }
.progress-badge span { font: 700 36px/1 Georgia, serif; }
.progress-badge small { font-size: 12px; }
.questions { display: grid; gap: 22px; }
.question-card { margin: 0; padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.56); transition: border-color .2s, box-shadow .2s; }
.question-card.has-error { border: 2px solid #b74635; box-shadow: 0 0 0 4px rgba(183,70,53,.08); }
.question-meta { display: grid; grid-template-columns: 38px 55px 1fr; align-items: center; gap: 18px; margin-bottom: 24px; }
.question-number { align-self: start; color: var(--coral); font: 700 16px Georgia, serif; }
.question-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-light); }
.question-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--teal); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.question-meta p { margin: 0; color: var(--teal); font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.question-meta h3 { margin: 2px 0 0; color: var(--navy); font-size: 20px; line-height: 1.5; }
.option-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.option-grid.five-options { grid-template-columns: repeat(5, 1fr); }
.option input, .goal-option input { position: absolute; opacity: 0; pointer-events: none; }
.option span { min-height: 68px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: #4b626d; font-size: 15px; font-weight: 700; text-align: center; transition: .18s; }
.option span i { width: 17px; height: 17px; flex: 0 0 auto; border: 1.5px solid #97aaa9; border-radius: 50%; }
.option:hover span { border-color: var(--teal); background: #f7fbf9; }
.option input:checked + span { border-color: var(--teal); background: var(--teal-light); color: var(--navy); box-shadow: inset 0 0 0 1px var(--teal); }
.option input:checked + span i { border: 5px solid var(--teal); background: var(--white); }
.form-error { margin-top: 22px; padding: 14px 18px; border-left: 4px solid #b74635; background: #fff0ed; color: #8f3125; font-weight: 700; }
.button-row { display: flex; justify-content: space-between; gap: 14px; margin-top: 35px; }

.review-list { max-width: 840px; border-top: 1px solid var(--line); }
.review-item { display: grid; grid-template-columns: 42px 1fr auto; gap: 16px; align-items: center; padding: 22px 8px; border-bottom: 1px solid var(--line); }
.review-item > span { color: var(--coral); font: 700 16px Georgia, serif; }
.review-item div { display: flex; flex-direction: column; }
.review-item small { color: var(--muted); font-size: 13px; }
.review-item strong { color: var(--navy); font-size: 18px; }
.review-item button { border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--teal); font-size: 14px; font-weight: 800; }
#review-screen .button-row { max-width: 840px; }

.result-intro { max-width: 750px; margin-bottom: 45px; }
.result-intro .method-note { display: flex; align-items: center; gap: 9px; margin-top: 18px; color: var(--navy); font-size: 13px; font-weight: 700; }
.method-note span { width: 23px; height: 23px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--teal); border-radius: 50%; color: var(--teal); font-family: Georgia, serif; }
.score-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.score-card { min-width: 0; padding: 25px 24px 28px; border-radius: 8px; background: var(--white); box-shadow: var(--shadow); text-align: center; }
.score-top { display: flex; justify-content: space-between; padding-bottom: 13px; border-bottom: 1px solid #e5eae7; color: var(--muted); font-size: 12px; letter-spacing: .12em; }
.score-top p { margin: 0; }
.score-ring { --color: var(--teal); width: 150px; height: 150px; margin: 26px auto 18px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--color) calc(var(--score) * 1%), #e7ece8 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--white); }
.score-ring > div { position: relative; display: flex; flex-direction: column; }
.score-ring strong { color: var(--navy); font: 700 44px/1 Georgia, serif; }
.score-ring small { color: var(--muted); font-size: 11px; }
.score-card.watch .score-ring { --color: var(--gold); }
.score-card.care .score-ring { --color: var(--coral); }
.score-card h3 { margin: 0; color: var(--navy); font-size: 20px; }
.score-label { margin: 5px 0 0; color: var(--teal); font-size: 14px; font-weight: 800; }
.score-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.suggestion-panel, .goal-panel { display: grid; grid-template-columns: 70px 1fr; gap: 30px; margin-top: 26px; padding: 42px; border-radius: 8px; }
.suggestion-panel { background: var(--navy); color: var(--white); }
.panel-number { color: rgba(255,255,255,.35); font: 700 22px Georgia, serif; }
.suggestion-panel .eyebrow { color: #84c4bd; }
.suggestion-panel h3, .goal-panel h3 { margin: 0 0 22px; font: 700 30px/1.4 Georgia, "Yu Mincho", serif; }
.suggestion-panel .rule-note { margin: -12px 0 20px; color: #b8d2d4; font-size: 13px; }
.suggestions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.suggestion { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 20px; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; background: rgba(255,255,255,.06); }
.suggestion > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--navy); font: 700 14px Georgia, serif; }
.suggestion h4 { margin: 0 0 6px; font-size: 17px; }
.suggestion p { margin: 0; color: #d5e0e5; font-size: 14px; line-height: 1.7; }
.medical-notice { display: flex; gap: 18px; margin-top: 26px; padding: 24px 30px; border: 1px solid #dccfb6; border-radius: 8px; background: #fffaf0; }
.medical-notice > span { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: #a27429; font-weight: 800; }
.medical-notice h3 { margin: 0 0 4px; color: var(--navy); font-size: 17px; }
.medical-notice p { margin: 0; color: var(--muted); font-size: 14px; }
.medical-notice.is-urgent { border-color: var(--coral); background: #fff1ed; }
.goal-panel { background: var(--teal-light); }
.goal-panel .panel-number { color: rgba(22,54,74,.35); }
.goal-content > p:not(.eyebrow) { margin: -12px 0 20px; color: var(--muted); font-size: 15px; }
.goal-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.goal-option span { min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid #aac8c3; border-radius: 5px; background: rgba(255,255,255,.65); color: var(--navy); font-size: 15px; font-weight: 700; }
.goal-option span i { width: 18px; height: 18px; flex: 0 0 auto; border: 1.5px solid var(--teal); border-radius: 50%; }
.goal-option input:checked + span { border-color: var(--teal); background: var(--white); box-shadow: inset 0 0 0 1px var(--teal); }
.goal-option input:checked + span i { border: 5px solid var(--teal); }
.goal-confirmation { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 16px; border-radius: 5px; background: var(--white); color: var(--navy); }
.goal-confirmation > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: white; }
.goal-confirmation strong { display: block; font: 700 clamp(21px, 2.5vw, 30px)/1.4 Georgia, "Yu Mincho", serif; }
.goal-confirmation p { margin: 5px 0 0; color: var(--teal); font-size: 17px; font-weight: 800; }
.goal-confirmation small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.goal-confirmation.is-error { border-left: 4px solid #b74635; color: #8f3125; }
.result-footer { margin-top: 34px; padding-top: 25px; border-top: 1px solid var(--line); }
.result-footer > p { color: var(--muted); font-size: 13px; text-align: center; }
.site-footer { display: flex; justify-content: space-between; padding: 28px 0; border-top: 1px solid rgba(22,54,74,.18); color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.site-footer p { margin: 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { padding-bottom: 20px; }
  .hero-visual { min-height: 430px; transform: scale(.9); }
  .notice-card { position: relative; grid-column: 1; bottom: auto; }
  .option-grid, .option-grid.five-options { grid-template-columns: repeat(2, 1fr); }
  .score-cards { grid-template-columns: 1fr; }
  .score-card { display: grid; grid-template-columns: 1fr 170px 1fr; align-items: center; text-align: left; }
  .score-top { display: none; }
  .score-ring { grid-row: 1 / 4; grid-column: 2; }
  .score-card h3, .score-label, .score-note { grid-column: 1; }
  .score-card h3 { align-self: end; }
  .suggestions { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .site-header, .site-footer, .screen { width: min(100% - 30px, 1180px); }
  .site-header { height: 82px; }
  .brand { font-size: 17px; gap: 9px; }
  .brand-mark { width: 35px; height: 35px; }
  .event-label { display: none; }
  .hero { padding: 42px 0 35px; }
  .hero-copy { padding-top: 0; }
  h1 { font-size: clamp(36px, 11.5vw, 52px); }
  .lead { font-size: 16px; margin-top: 25px; }
  .button { width: 100%; }
  .trust-list { gap: 12px; flex-wrap: wrap; }
  .hero-visual { min-height: 330px; transform: none; }
  .hero-visual::before { width: 270px; height: 270px; }
  .moon { width: 145px; height: 145px; }
  .moon-cutout { width: 140px; height: 140px; left: 45px; top: -20px; }
  .orbit-one { width: 330px; height: 230px; }
  .orbit-two { width: 230px; height: 340px; }
  .star-one { top: 48px; right: 18px; }
  .star-two { bottom: 72px; left: 20px; }
  .hero-visual > p { bottom: 30px; right: 5px; }
  .sleep-wave { left: 2px; top: 80px; }
  .content-screen { padding: 45px 0 65px; }
  .section-heading { align-items: start; }
  .progress-badge { width: 78px; height: 78px; }
  .progress-badge span { font-size: 28px; }
  .progress-badge small { font-size: 9px; }
  .question-card { padding: 22px 16px; }
  .question-meta { grid-template-columns: 30px 46px 1fr; gap: 10px; }
  .question-icon { width: 44px; height: 44px; }
  .question-meta h3 { font-size: 17px; }
  .option-grid, .option-grid.five-options { grid-template-columns: 1fr; }
  .option span { min-height: 56px; justify-content: flex-start; text-align: left; padding-inline: 16px; }
  .button-row { flex-direction: column-reverse; }
  .review-item { grid-template-columns: 30px 1fr auto; padding-block: 17px; }
  .score-card { display: block; text-align: center; }
  .score-ring { width: 140px; height: 140px; }
  .suggestion-panel, .goal-panel { grid-template-columns: 1fr; gap: 8px; padding: 28px 20px; }
  .suggestion-panel h3, .goal-panel h3 { font-size: 25px; }
  .goal-options { grid-template-columns: 1fr; }
  .medical-notice { padding: 20px 18px; }
  .site-footer { flex-direction: column; gap: 4px; }
}

@media (max-width: 360px) {
  .site-header, .site-footer, .screen { width: calc(100% - 24px); }
  .brand { font-size: 15px; }
  .brand small { font-size: 9px; }
  h1 { font-size: 34px; }
  h2 { font-size: 29px; }
  .section-heading { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
  .progress-badge { width: 64px; height: 64px; }
  .progress-badge span { font-size: 24px; }
  .question-card { padding: 18px 12px; }
  .question-meta { grid-template-columns: 24px 40px 1fr; gap: 8px; }
  .question-icon { width: 40px; height: 40px; }
  .question-icon svg { width: 25px; height: 25px; }
  .question-meta h3 { font-size: 16px; }
  .option span, .goal-option span { min-height: 54px; padding-inline: 12px; font-size: 14px; }
  .suggestion { grid-template-columns: 31px 1fr; padding: 16px 12px; }
  .medical-notice { gap: 12px; padding-inline: 14px; }
  .goal-confirmation { align-items: flex-start; padding: 14px 12px; }
}

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