@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@500;700;900&display=swap');

:root {
  color-scheme: light;
  line-break: strict;
  --paper: #faf8f0;
  --ink: #353330;
  --green: #5c9979;
  --dark-green: #396c54;
  --pink: #a9556a;
  --soft-pink: #fae9ed;
  --white: #fff;
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  font-weight: 700;
  color: var(--ink);
  background: #ededed;
}

* { box-sizing: border-box; }
body, h1, h2, p, ol, ul, fieldset { margin: 0; }
ol, ul, fieldset { padding: 0; border: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--dark-green); outline-offset: 3px; }
#app { position: relative; container-type: inline-size; max-width: 420px; min-height: 100dvh; margin-inline: auto; background: var(--paper); outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.fv { text-align: center; padding-bottom: 10px; }
.fv-heading { position: relative; padding: 16px 12px 12px; }
.sponsor { color: #625e59; font-size: 11px; font-weight: 500; letter-spacing: .1em; }
.lead { margin: 12px 0 26px; font-size: 17px; line-height: 1.5; font-weight: 900; }
.lead em { font-style: normal; background: linear-gradient(transparent 60%, var(--soft-pink) 60%); }
.fv h1 { margin-bottom: 12px; color: var(--dark-green); font-size: clamp(32px, 10.6vw, 46px); line-height: 1.12; font-weight: 900; }
.time-badge {
  display: inline-block;
  max-width: 100%;
  padding: 6px 17px 8px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--white);
  font-size: clamp(13px, 3.8vw, 16px);
  line-height: 1.2;
  font-weight: 900;
}
.time-badge strong { color: var(--pink); font-size: 24px; }
.hero { position: relative; height: 380px; isolation: isolate; }
.hero img, .result-background, .video-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero img { object-position: center 75%; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(var(--paper), transparent 24%, transparent 75%, var(--paper)); }
.hero-badge {
  position: absolute;
  max-width: 55%;
  padding: 8px 13px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 3px 10px #55453b19;
  text-align: left;
  font-size: 13px;
  font-weight: 900;
}
.hero-badge strong { color: var(--pink); font-size: 17px; }
.hero-badge-top { top: 42px; right: 14px; background: var(--soft-pink); }
.hero-badge-bottom { bottom: 49px; left: 14px; }
.hero-decoration { position: absolute; right: 22px; top: 17px; font-size: 20px; }
.start-button, .line-cta {
  position: relative;
  display: block;
  width: min(calc(100% - 40px), 356px);
  min-height: 70px;
  margin: -24px auto 0;
  padding: 12px 30px 14px 16px;
  border: 0;
  border-radius: 99px;
  color: var(--white);
  background: var(--green);
  box-shadow: 0 5px 0 #3e765b;
  font-size: clamp(16px, 5vw, 21px);
  font-weight: 900;
}
.start-button span, .line-cta span { position: absolute; right: 17px; }
.registration-note { margin-top: 13px; color: #625e59; font-size: 12px; }
.diagnosis-flow { display: flex; justify-content: space-between; gap: 10px; padding: 18px 12px 21px; background: #eaf2e9; text-align: center; }
.diagnosis-flow li { position: relative; flex: 1; font-size: 11px; }
.diagnosis-flow li + li::before { position: absolute; top: 10px; left: -6px; content: '›'; color: var(--green); }
.flow-step { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 5px; border-radius: 50%; background: var(--green); color: var(--white); font-size: 16px; }

.flow-phrase { display: inline-block; }

.question-header { padding: 13px 12px 10px; background: var(--white); text-align: center; color: var(--dark-green); font-size: 20px; font-weight: 900; }
.question-view { padding: 20px 18px 24px; }
.question-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 11px; letter-spacing: .09em; }
.question-count { color: #666; }
.question-count strong { color: var(--dark-green); font-size: 28px; font-weight: 900; }
.progress { height: 8px; margin: 8px 0 20px; border-radius: 99px; background: #e3ebe4; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #a2caa8); }
.question-lead, .question-note { text-align: center; font-size: 12px; }
.question-title { margin: 6px 0 7px; text-align: center; font-size: min(clamp(19px, 5.25cqi, 23px), calc((100cqi - 38px) / var(--question-length))); white-space: nowrap; line-height: 1.3; font-weight: 900; outline: none; }
.answer-group { display: grid; gap: 10px; min-inline-size: 0; }
.answer-choice {
  display: grid;
  grid-template-columns: 28px 26px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 12px 16px;
  border: 2px solid transparent;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 3px 9px #5a4a3910;
  text-align: left;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
}
.answer-choice[aria-checked="true"] { border-color: var(--green); background: #eaf2e9; }
.choice-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: var(--white); font-size: 12px; }
.choice-icon { font-size: 22px; }
.choice-arrow, .question-note { color: #686460; }
.question-note { margin-top: 16px; }

.loading-view { display: grid; justify-items: center; padding: clamp(52px, 12vh, 110px) 16px 42px; text-align: center; font-size: 13px; }
.loading-callout { position: relative; margin: 16px 0 14px; padding: 6px 12px; border: 2px solid var(--green); border-radius: 99px; background: var(--white); color: var(--dark-green); font-weight: 900; }
.loading-callout::after { position: absolute; top: 100%; left: calc(50% - 6px); border: 6px solid transparent; border-top-color: var(--green); content: ""; }
.result-progress { width: min(100%, 322px); }
.race-track { position: relative; height: 88px; margin: 0 4px 18px; border-bottom: 8px solid #dfe8df; border-radius: 6px; }

.race-fill { position: absolute; left: 0; bottom: -8px; height: 8px; border-radius: 6px; }
.race-fill { width: 0; background: linear-gradient(90deg, var(--green), #a2caa8); }
.runner {
  position: absolute;
  z-index: 1;
  left: 0;
  bottom: -4px;
  width: 84px;
  height: 101px;
  background: url("assets/pm-runner.svg") center / contain no-repeat;
}
.finish-flag { z-index: 2; }
.finish-flag { position: absolute; right: 0; bottom: 3px; font-size: 24px; }
.percentage { display: block; color: var(--dark-green); font-size: 24px; font-weight: 900; }
.percentage strong { font-size: 62px; line-height: 1.1; }
.loading-view h1 { margin: 5px 0 2px; font-size: 21px; }
.loading-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: min(100%, 274px); margin: 25px 0 24px; }
.loading-step { display: grid; padding: 10px 4px; border-radius: 14px; color: #726c67; background: var(--white); font-size: 11px; }
.loading-step b { font-size: 16px; }
.loading-step.is-active, .loading-step.is-done { color: var(--dark-green); background: #e4efe4; }

.result-page { text-align: center; padding-bottom: 24px; }
.type-result { position: relative; isolation: isolate; min-height: 200px; text-align: left; }
.result-background { z-index: -2; object-position: center; }
.type-result::before { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(90deg, #fffaf3f7, #fffaf3e6 36%, #fffaf300 66%); }
.result-copy { padding: 10px 0 10px 16px; width: 80%; }
.result-label { display: inline-block; padding: 4px 10px; border-radius: 3px; background: var(--green); color: var(--white); font-size: 15px; font-weight: 900; }
.result-title { width: fit-content; margin-top: 8px; color: var(--dark-green); font-size: clamp(16px, 5.45cqi, 23px); line-height: 1.2; font-weight: 900; }
.you-are { display: block; margin-bottom: 2px; color: var(--pink); font-size: clamp(15px, 4.3cqi, 18px); }
.result-type-name { display: block; padding-bottom: 2px; border-bottom: 2px solid #ebc3cb; white-space: nowrap; }
@media (max-width: 767px) {
  .result-type-name {
    font-size: clamp(16px, 5.1cqi, 21.5px);
    letter-spacing: -.035em;
    text-shadow: 0 0 3px #fffaf3, 0 0 6px #fffaf3;
  }
}
.result-description { margin-top: 8px; font-size: clamp(12px, 4.15cqi, 15px); line-height: 1.5; }
.result-description span { display: block; white-space: nowrap; }
.result-offer, .video-offer { padding: 10px 18px 0; }
.offer-caption { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; color: #736b64; }
.offer-caption::before, .offer-caption::after { content: ""; flex: 1; height: 1px; background: #ded8d1; }
.offer-brand { margin-top: 6px; }
.offer-logo { display: block; width: min(144px, 100%); height: auto; margin-inline: auto; }
.video-invitation { margin-bottom: 6px; font-size: 16px; line-height: 1.3; font-weight: 900; text-wrap: balance; }
.video-invitation strong { display: block; color: var(--pink); font-size: clamp(20px, 6vw, 27px); }
.video-preview { position: relative; isolation: isolate; display: grid; place-content: center; width: min(100%, 320px); aspect-ratio: 16 / 9; margin-inline: auto; overflow: hidden; border-radius: 16px; color: var(--white); background: #625e59; }
.video-preview img { z-index: -2; object-position: center 64%; filter: blur(5px); transform: scale(1.06); }
.video-preview::before { position: absolute; inset: 0; z-index: -1; content: ""; background: #251d1a54; }
.video-lock { font-size: 26px; line-height: 1.2; }
.video-placeholder-label, .video-limited { font-size: 16px; font-weight: 900; }
.video-limited { margin: 6px 0 5px; color: var(--dark-green); }
.line-cta { width: 100%; min-height: 60px; margin: 0; background: #008440; box-shadow: 0 4px 0 #006330; font-size: clamp(14px, 4vw, 17px); }
.mock-note { margin-top: 12px; color: #625e59; font-size: 12px; }
.result-restart { margin-top: 17px; padding: 7px; border: 0; background: transparent; color: var(--dark-green); text-decoration: underline; }
dialog { width: min(calc(100% - 32px), 390px); padding: 20px; border: 0; border-radius: 16px; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #0007; }
dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.lead, .time-badge, .start-button {
  text-wrap: balance;
}

.answer-choice {
  word-break: auto-phrase;
}
