:root {
  --navy: #102b3f;
  --navy-deep: #092131;
  --teal: #0f8b8d;
  --teal-dark: #087376;
  --teal-pale: #e9f7f5;
  --amber: #e3a43a;
  --ink: #183342;
  --muted: #5e7180;
  --line: #d7e3e8;
  --paper: #ffffff;
  --canvas: #f3f8f8;
  --danger: #a94c45;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(15, 139, 141, 0.1), transparent 26rem),
    radial-gradient(circle at 92% 88%, rgba(227, 164, 58, 0.1), transparent 25rem),
    var(--canvas);
  font-family:
    "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP",
    system-ui, sans-serif;
}

button,
a {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible + .option-letter {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.site-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.brand-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(16, 43, 63, 0.11);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}

.brand-link img {
  display: block;
  width: 198px;
  height: auto;
}

.brand-label {
  padding: 9px 15px;
  color: var(--teal-dark);
  background: var(--teal-pale);
  border: 1px solid rgba(15, 139, 141, 0.24);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.intro-panel {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  align-items: center;
  gap: clamp(30px, 7vw, 92px);
  padding: 72px 30px 66px;
}

.eyebrow,
.category-label {
  margin: 0 0 16px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.intro-copy h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.18;
}

.lead {
  max-width: 670px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 600;
  line-height: 1.9;
}

.test-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.test-facts li {
  min-width: 116px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(16, 43, 63, 0.05);
}

.test-facts strong {
  color: var(--navy);
  font-size: 27px;
  line-height: 1;
}

.test-facts span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.intro-actions {
  margin-top: 34px;
}

.primary-button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 28px;
  color: white;
  background: var(--teal-dark);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(8, 115, 118, 0.2);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.primary-button:hover {
  background: var(--navy);
  box-shadow: 0 15px 34px rgba(16, 43, 63, 0.21);
  transform: translateY(-2px);
}

.primary-button:disabled {
  background: #9fb2ba;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.primary-button span {
  font-size: 23px;
  line-height: 1;
}

.intro-actions p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.mascot-card {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(233, 247, 245, 0.9));
  border: 1px solid rgba(15, 139, 141, 0.2);
  border-radius: 34px 34px 110px 34px;
  box-shadow: 0 28px 80px rgba(16, 43, 63, 0.12);
}

.mascot-card::before {
  position: absolute;
  inset: 36px;
  content: "";
  border: 1px dashed rgba(15, 139, 141, 0.27);
  border-radius: 50%;
}

.mascot-card img {
  position: relative;
  z-index: 2;
  width: min(84%, 390px);
  max-height: 465px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 20px 18px rgba(16, 43, 63, 0.16));
}

.mascot-bubble {
  position: absolute;
  z-index: 3;
  top: 32px;
  left: 26px;
  padding: 12px 17px;
  color: var(--navy);
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 3px;
  box-shadow: 0 8px 24px rgba(16, 43, 63, 0.09);
  font-size: 14px;
  font-weight: 800;
}

.orbit {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
}

.orbit-one {
  top: 96px;
  right: 35px;
  width: 34px;
  height: 34px;
  background: var(--amber);
}

.orbit-two {
  top: 154px;
  right: 78px;
  width: 13px;
  height: 13px;
  background: var(--teal);
}

.quiz-panel {
  flex: 1;
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 52px 0 74px;
}

.progress-area {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: end;
  gap: 28px;
  margin-bottom: 24px;
}

.progress-copy {
  display: flex;
  flex-direction: column;
}

.progress-copy > span {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.progress-copy strong {
  color: var(--navy);
  font-size: 34px;
  line-height: 1.2;
}

.progress-copy small {
  color: var(--muted);
  font-size: 15px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: #dce8eb;
  border-radius: 999px;
}

.progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #30a8a5);
  border-radius: inherit;
  transition: width 240ms ease;
}

.question-card {
  padding: clamp(28px, 5vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(16, 43, 63, 0.09);
}

.question-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.48;
}

.question-card h2:focus,
.result-copy h2:focus {
  outline: none;
}

.option-list {
  display: grid;
  gap: 12px;
  margin: 34px 0 0;
  padding: 0;
  border: 0;
}

.option-card {
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: #fbfdfd;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.6;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.option-card:hover {
  background: var(--teal-pale);
  border-color: rgba(15, 139, 141, 0.46);
  transform: translateX(3px);
}

.option-card.selected {
  background: var(--teal-pale);
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.option-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.option-letter {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  background: white;
  border: 1px solid #bad7d7;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.selected .option-letter {
  color: white;
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.question-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
}

.primary-button.compact {
  min-height: 52px;
}

.back-button,
.text-button {
  min-height: 48px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.back-button:hover,
.text-button:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}

.back-button:disabled {
  color: #afbdc4;
  cursor: not-allowed;
  text-decoration: none;
}

.result-panel {
  flex: 1;
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: center;
  gap: clamp(34px, 7vw, 74px);
  margin: 0 auto;
  padding: 70px 0;
}

.score-ring {
  position: relative;
  width: 250px;
  height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  border: 12px solid var(--teal);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 4px white,
    0 24px 60px rgba(16, 43, 63, 0.14);
}

.review .score-ring {
  border-color: var(--amber);
}

.score-ring span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.score-ring strong {
  color: var(--navy);
  font-size: 78px;
  line-height: 1;
}

.score-ring small {
  color: var(--muted);
  font-weight: 800;
}

.result-status {
  display: inline-block;
  margin: 0 0 13px;
  padding: 7px 13px;
  color: white;
  background: var(--teal-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.review .result-status {
  color: var(--navy);
  background: #f4dcae;
}

.result-copy h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(30px, 4vw, 45px);
  letter-spacing: -0.035em;
  line-height: 1.3;
}

.result-copy > p:not(.result-status) {
  margin: 22px 0 0;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.9;
}

.review-terms {
  margin-top: 24px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.82);
  border-left: 4px solid var(--amber);
  border-radius: 4px 12px 12px 4px;
}

.review-terms > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.review-terms ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.review-terms li {
  padding: 6px 10px;
  color: var(--navy);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.link-button {
  min-height: 56px;
}

footer {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  border-top: 1px solid rgba(16, 43, 63, 0.11);
  font-size: 12px;
  font-weight: 700;
}

footer a {
  color: var(--teal-dark);
}

.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 (max-width: 820px) {
  .site-shell {
    width: min(100% - 28px, 700px);
  }

  .intro-panel {
    grid-template-columns: 1fr;
    padding: 50px 0 58px;
  }

  .mascot-card {
    min-height: 390px;
    order: -1;
  }

  .mascot-card img {
    max-height: 360px;
  }

  .result-panel {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .result-actions,
  .review-terms ul {
    justify-content: center;
  }

  .review-terms {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 22px, 520px);
  }

  .brand-header {
    min-height: 76px;
  }

  .brand-link img {
    width: 156px;
  }

  .brand-label {
    padding: 7px 10px;
    font-size: 11px;
  }

  .intro-panel {
    padding-top: 32px;
  }

  .intro-copy h1 br {
    display: none;
  }

  .mascot-card {
    min-height: 330px;
    border-radius: 24px 24px 70px 24px;
  }

  .mascot-card img {
    width: 82%;
    max-height: 310px;
  }

  .mascot-bubble {
    top: 18px;
    left: 16px;
    font-size: 12px;
  }

  .test-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .test-facts li {
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 11px 12px;
  }

  .test-facts strong {
    font-size: 23px;
  }

  .primary-button {
    width: 100%;
  }

  .quiz-panel {
    padding-top: 34px;
  }

  .progress-area {
    grid-template-columns: 86px 1fr;
    gap: 16px;
  }

  .question-card {
    padding: 25px 18px;
    border-radius: 18px;
  }

  .option-card {
    grid-template-columns: 34px 1fr;
    padding: 11px 12px;
    font-size: 14px;
  }

  .question-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .back-button {
    width: 100%;
  }

  .result-panel {
    padding: 48px 0;
  }

  .score-ring {
    width: 210px;
    height: 210px;
  }

  .score-ring strong {
    font-size: 66px;
  }

  .result-actions {
    width: 100%;
    flex-direction: column;
  }

  .result-actions .text-button {
    width: 100%;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
  }
}

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