:root {
  color-scheme: light;
  --blue: #06479d;
  --blue-dark: #003777;
  --blue-focus: #69a8ff;
  --ink: #15243a;
  --muted: #5a6879;
  --surface: #ffffff;
  --line: rgba(6, 71, 157, 0.18);
  font-family:
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Meiryo",
    system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #fff;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #fff;
}

a {
  color: inherit;
}

button {
  color: inherit;
  font: inherit;
}

.page-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 29%, rgba(255, 255, 255, 0.86) 0 2px, transparent 3px) 0 0 / 34px 34px,
    linear-gradient(145deg, #cbd5e2 0%, #e9eef4 42%, #f8fafc 75%, #fff 100%);
}

.page-shell::before,
.page-shell::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.page-shell::before {
  top: -12vw;
  left: -18vw;
  width: 52vw;
  height: 128%;
  min-width: 420px;
  background: rgba(255, 255, 255, 0.42);
  transform: rotate(-14deg);
}

.page-shell::after {
  right: -12vw;
  bottom: -42vw;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
  filter: blur(2px);
}

.diagnosis-brand {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 20px 20px 0;
}

.diagnosis-brand img {
  display: block;
  width: min(100%, 360px);
  height: auto;
}

.diagnosis-main {
  display: grid;
  min-height: calc(100vh - 178px);
  place-items: center;
  padding: 16px 20px 72px;
}

.diagnosis-screen {
  width: min(100%, 1040px);
}

.diagnosis-screen[hidden] {
  display: none;
}

.diagnosis-title {
  width: clamp(270px, 31vw, 350px);
  margin: 0 auto clamp(20px, 3vw, 36px);
  filter: drop-shadow(0 8px 12px rgba(28, 48, 74, 0.18));
}

.diagnosis-title img {
  display: block;
  width: 100%;
  height: auto;
}

.entry-lead {
  margin: 0 auto clamp(28px, 4vw, 48px);
  color: var(--blue-dark);
  font-size: clamp(16px, 1.7vw, 19px);
  font-weight: 700;
  line-height: 1.8;
  text-align: center;
}

.diagnosis-action {
  width: min(100%, 520px);
  margin: 0 auto;
}

.diagnosis-choice {
  position: relative;
  display: flex;
  min-height: 132px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 68px 20px 34px;
  border: 2px solid rgba(255, 255, 255, 0.56);
  border-radius: 72px;
  color: #fff;
  background: linear-gradient(145deg, #0753b0, var(--blue));
  box-shadow:
    0 8px 16px rgba(24, 47, 78, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  text-align: center;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
  width: 100%;
  cursor: pointer;
}

.diagnosis-choice:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow:
    0 12px 24px rgba(24, 47, 78, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.diagnosis-choice:focus-visible {
  outline: 4px solid var(--blue-focus);
  outline-offset: 5px;
}

.diagnosis-choice:active {
  transform: translateY(1px);
}

.diagnosis-choice.is-selected {
  background: linear-gradient(145deg, var(--blue-dark), #002f68);
}

.choice-main {
  font-size: clamp(24px, 2.7vw, 34px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.choice-arrow {
  position: absolute;
  top: 50%;
  right: 34px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 17px solid #fff;
  transform: translateY(-50%);
}

.diagnosis-choice:hover .choice-arrow {
  animation: arrow-nudge 720ms ease-in-out 1;
}

.quiz-card,
.result-card {
  width: min(100%, 680px);
  margin: 20px auto;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 18px 44px rgba(20, 51, 84, 0.14),
    inset 0 1px 0 #fff;
}

.progress-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  margin-bottom: 42px;
}

.progress-count {
  color: var(--blue);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

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

.progress-value {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0753b0, #0e70d8);
  transition: width 240ms ease;
}

.question-kicker,
.result-kicker {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
}

.question-title {
  margin: 0 0 34px;
  color: var(--ink);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.45;
  text-align: center;
}

.question-title:focus,
.result-heading:focus {
  outline: none;
}

.answer-list {
  display: grid;
  gap: 16px;
}

.answer-button {
  position: relative;
  display: grid;
  min-height: 82px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 20px 28px;
  border: 2px solid #d7e4f2;
  border-radius: 18px;
  color: var(--blue-dark);
  background: #fff;
  box-shadow: 0 4px 12px rgba(24, 47, 78, 0.07);
  cursor: pointer;
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 800;
  line-height: 1.65;
  text-align: left;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.answer-button:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 8px 20px rgba(24, 71, 126, 0.14);
  transform: translateY(-2px);
}

.answer-button:focus-visible,
.back-button:focus-visible {
  outline: 4px solid var(--blue-focus);
  outline-offset: 4px;
}

.answer-arrow {
  width: 12px;
  height: 12px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: rotate(45deg);
}

.back-button {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 26px auto 0;
  padding: 8px 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.back-button:hover {
  color: var(--blue);
}

.back-button[hidden] {
  visibility: hidden;
}

.back-button span {
  font-size: 26px;
  line-height: 0.7;
}

.result-card {
  text-align: center;
}

.result-heading {
  margin: 0;
  color: var(--ink);
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.5;
}

.result-photo {
  width: 168px;
  aspect-ratio: 1;
  margin: 20px auto 12px;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #edf5fc;
  box-shadow: 0 12px 28px rgba(18, 68, 119, 0.18);
}

.result-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-type {
  margin: 0;
  color: var(--blue);
  font-size: clamp(31px, 5vw, 46px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.result-tagline {
  margin: 10px 0 22px;
  color: var(--ink);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 800;
  line-height: 1.7;
}

.result-detail {
  display: grid;
  gap: 11px;
  text-align: left;
}

.result-detail section {
  padding: 16px 18px;
  border: 1px solid #dce7f2;
  border-radius: 15px;
  background: #f9fbfe;
}

.result-detail h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  color: var(--blue-dark);
  font-size: 16px;
}

.result-detail h3::before {
  width: 5px;
  height: 19px;
  border-radius: 8px;
  background: var(--blue);
  content: "";
}

.result-detail p {
  margin: 0;
  color: #31445b;
  font-size: 14px;
  line-height: 1.7;
}

.sinzero-recommendation {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  text-align: center;
}

.sinzero-recommendation h3 {
  grid-column: 1 / -1;
  justify-content: flex-start;
  text-align: left;
}

.sinzero-recommendation-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  color: #9b0d21;
  text-align: left;
}

.sinzero-recommendation-brand strong {
  font-size: 21px;
  letter-spacing: 0.08em;
}

.sinzero-recommendation-visual {
  grid-row: 2 / 4;
  margin: 0;
  overflow: hidden;
  background: transparent;
}

.sinzero-recommendation-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 94px;
  padding: 5px;
  aspect-ratio: 1;
  object-fit: contain;
}

.sinzero-recommendation p {
  align-self: start;
  text-align: left;
}

.first-step {
  padding: 6px 2px !important;
  border: 0 !important;
  background: transparent !important;
}

.result-note {
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.result-video-preview {
  margin: 0;
  overflow: hidden;
  border: 1px solid #d7e6f2;
  border-radius: 18px 18px 0 0;
  background: #edf5fc;
}

.result-video-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.result-line-bridge {
  margin: 0 0 18px;
  padding: 17px 16px 18px;
  border-radius: 0 0 18px 18px;
  background: #f2fbf5;
}

.result-line-bridge p {
  margin: 0 0 11px;
  color: #244032;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.result-line-cta {
  display: grid;
  min-height: 68px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 22px;
  border: 2px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  color: #fff;
  background: #06c755;
  box-shadow:
    0 9px 20px rgba(6, 140, 63, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.result-line-cta:hover {
  background: #05b84d;
  box-shadow:
    0 12px 26px rgba(6, 140, 63, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
}

.result-line-cta:focus-visible {
  outline: 4px solid var(--blue-focus);
  outline-offset: 4px;
}

.result-line-arrow {
  font-size: 24px;
  line-height: 1;
}

.route-notice {
  width: min(100%, 620px);
  margin: 28px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 16px rgba(24, 47, 78, 0.1);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
}

.route-notice:focus {
  outline: none;
}

.route-notice--static {
  display: block;
}

.site-footer {
  padding: 24px 20px 30px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 8px;
}

.site-footer a:hover {
  color: var(--blue);
}

.site-footer a:focus-visible {
  border-radius: 3px;
  outline: 3px solid var(--blue-focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@keyframes arrow-nudge {
  0%,
  100% {
    transform: translate(0, -50%);
  }
  50% {
    transform: translate(6px, -50%);
  }
}

@media (max-width: 700px) {
  .diagnosis-main {
    min-height: auto;
    padding: 8px 20px 54px;
  }

  .diagnosis-brand {
    padding: 16px 16px 4px;
  }

  .diagnosis-brand img {
    width: min(78vw, 300px);
  }

  .diagnosis-title {
    width: min(82vw, 310px);
    margin-bottom: 18px;
  }

  .entry-lead {
    margin-bottom: 28px;
    font-size: 15px;
  }

  .diagnosis-choice {
    min-height: 94px;
    padding: 14px 56px 14px 28px;
    border-radius: 50px;
  }

  .choice-main {
    font-size: clamp(22px, 6vw, 26px);
  }

  .choice-arrow {
    right: 26px;
    border-top-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 14px;
  }

  .quiz-card,
  .result-card {
    margin: 8px auto;
    padding: 28px 20px;
    border-radius: 24px;
  }

  .progress-row {
    gap: 12px;
    margin-bottom: 30px;
  }

  .question-title {
    margin-bottom: 26px;
    font-size: 24px;
  }

  .answer-button {
    min-height: 76px;
    gap: 14px;
    padding: 17px 20px;
    border-radius: 15px;
    font-size: 16px;
  }

  .result-photo {
    width: 142px;
    border-width: 4px;
  }

  .result-detail section {
    padding: 14px 15px;
  }

  .sinzero-recommendation {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 5px 10px;
  }

  .sinzero-recommendation-brand strong {
    font-size: 20px;
  }

  .sinzero-recommendation-visual img {
    min-height: 88px;
  }

  .result-line-bridge {
    padding: 15px 12px 14px;
  }

  .result-line-cta {
    min-height: 64px;
    padding-inline: 18px;
    font-size: 16px;
  }
}

@media (max-width: 370px) {
  .diagnosis-main {
    padding-inline: 15px;
  }

  .diagnosis-choice {
    padding-left: 20px;
    padding-right: 48px;
  }

  .choice-main {
    font-size: 21px;
  }

  .quiz-card,
  .result-card {
    padding-inline: 16px;
  }

  .answer-button {
    padding-inline: 16px;
  }
}

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