:root {
  --ink: #132033;
  --muted: #657080;
  --paper: #f7f7f4;
  --line: #dde1e5;
  --gold: #a57a28;
  --red: #c73d4a;
  --yellow: #c8a126;
  --blue: #2f6ea8;
  --green: #35854a;
  --coral: #df6d55;
  --mint: #4aa880;
  --sky: #4c8ec7;
  --type: var(--gold);
  --type-soft: #f4ead6;
  --type-pale: #fff8ea;
  --white: #ffffff;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 247, 244, 0.94)),
    linear-gradient(135deg, #fff7e4 0%, #eef7f4 42%, #f8eef0 100%);
}

button,
a {
  font: inherit;
}

.app {
  min-height: 100vh;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: 100vh;
  padding: clamp(20px, 4vw, 64px);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 249, 235, 0.82) 48%, rgba(232, 247, 242, 0.9) 100%),
    linear-gradient(45deg, rgba(199, 61, 74, 0.08), rgba(47, 110, 168, 0.08));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(135deg, rgba(165, 122, 40, 0.12) 0 1px, transparent 1px 100%),
    linear-gradient(45deg, rgba(76, 142, 199, 0.1) 0 1px, transparent 1px 100%);
  background-size: 84px 84px;
  opacity: 0.34;
}

.hero__visual,
.hero__body {
  position: relative;
}

.hero__visual img,
.result__image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  box-shadow: 0 20px 52px rgba(19, 32, 51, 0.16);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--type);
  background: color-mix(in srgb, var(--type) 13%, #ffffff);
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero h1 {
  text-align: center;
}

.lead {
  margin: 22px 0 32px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero .primary-button {
  min-width: 210px;
  font-size: 17px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.primary-button {
  position: relative;
  overflow: hidden;
  min-height: 56px;
  color: var(--white);
  background: linear-gradient(135deg, #ff8a4c 0%, #f25d4f 56%, #de4658 100%);
  box-shadow:
    0 14px 26px rgba(242, 93, 79, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.primary-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.34) 42%, transparent 68%);
  transform: translateX(-110%);
  transition: transform 0.45s ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  outline: 3px solid rgba(242, 93, 79, 0.2);
  box-shadow:
    0 18px 34px rgba(242, 93, 79, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  filter: saturate(1.08);
  transform: translateY(-2px);
}

.primary-button:hover::after,
.primary-button:focus-visible::after {
  transform: translateX(110%);
}

.primary-button:active {
  transform: translateY(0);
  box-shadow:
    0 9px 18px rgba(242, 93, 79, 0.26),
    inset 0 2px 4px rgba(19, 32, 51, 0.18);
}

.secondary-button {
  color: var(--ink);
  background: #f5f0e5;
  border: 1px solid rgba(165, 122, 40, 0.22);
}

.diagnosis,
.result,
.contact {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.progress {
  margin-bottom: 20px;
}

.progress span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--type);
  font-weight: 700;
}

.progress__bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e5e8;
}

.progress__bar span {
  display: block;
  height: 100%;
  width: 0;
  margin: 0;
  background: linear-gradient(
    90deg,
    #ff6b6b 0%,
    #ff9f43 20%,
    #ffd166 38%,
    #6ee7b7 58%,
    #4dabf7 78%,
    #9775fa 100%
  );
  transition: width 0.25s ease;
}

.question-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    linear-gradient(135deg, rgba(223, 109, 85, 0.08), rgba(74, 168, 128, 0.08));
  box-shadow: 0 14px 36px rgba(19, 32, 51, 0.08);
}

.question-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--blue), var(--green));
}

.question-card__number {
  margin: 0 0 10px;
  color: var(--type);
  font-weight: 800;
}

.question-card h2 {
  margin: 0 0 24px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.45;
}

.choices {
  display: grid;
  gap: 12px;
}

.choice {
  position: relative;
  width: 100%;
  padding: 18px 20px 18px 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  text-align: left;
  cursor: pointer;
  line-height: 1.6;
  box-shadow: 0 6px 16px rgba(19, 32, 51, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.choice::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in srgb, var(--type) 58%, #ffffff);
  border-radius: 50%;
  transform: translateY(-50%);
  background: #ffffff;
}

.choice:hover,
.choice:focus-visible {
  border-color: var(--type);
  outline: 3px solid color-mix(in srgb, var(--type) 18%, transparent);
  box-shadow: 0 10px 22px rgba(19, 32, 51, 0.1);
  transform: translateY(-1px);
}

.result {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}

.result__image {
  position: sticky;
  top: 24px;
}

.result__content {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid color-mix(in srgb, var(--type) 24%, #ffffff);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92)),
    linear-gradient(135deg, var(--type-pale), #ffffff);
  box-shadow: 0 16px 42px rgba(19, 32, 51, 0.1);
}

.result__content h2 {
  margin: 0 0 18px;
  padding-bottom: 18px;
  border-bottom: 3px solid color-mix(in srgb, var(--type) 36%, #ffffff);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.15;
  color: color-mix(in srgb, var(--type) 32%, var(--ink));
}

.score-list {
  display: grid;
  gap: 8px;
  margin: 20px 0 30px;
  padding: 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--type) 8%, #ffffff);
}

.score-item {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  color: #4d5968;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.72);
}

.score-item__bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e5e8;
}

.score-item__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--type) 72%, #ffffff), var(--type));
}

.result-block {
  position: relative;
  margin-top: 12px;
  padding: 20px 20px 20px 24px;
  border: 1px solid color-mix(in srgb, var(--type) 14%, var(--line));
  border-left: 6px solid var(--type);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.result-block h3 {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--type) 54%, var(--ink));
  background: color-mix(in srgb, var(--type) 12%, #ffffff);
  font-size: 16px;
}

.result-block p,
.result-block li,
.contact p {
  color: var(--muted);
  line-height: 1.85;
  white-space: pre-line;
}

.result-block ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.result-block li {
  position: relative;
  padding-left: 20px;
}

.result-block li + li {
  margin-top: 6px;
}

.result-block li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.85em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--type);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 24px;
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--type) 16%, #ffffff), #fff8ea);
  border: 1px solid color-mix(in srgb, var(--type) 22%, #ffffff);
  box-shadow: 0 12px 28px rgba(19, 32, 51, 0.08);
}

.cta p {
  flex-basis: 100%;
  margin: 0 0 4px;
  font-weight: 700;
  line-height: 1.7;
}

.consultation-button,
.cta .primary-button {
  min-width: 220px;
  color: #fff8e7;
  background:
    linear-gradient(135deg, #132033 0%, #203b5c 58%, #a57a28 100%);
  box-shadow:
    0 16px 30px rgba(19, 32, 51, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.consultation-button:hover,
.consultation-button:focus-visible,
.cta .primary-button:hover,
.cta .primary-button:focus-visible {
  outline-color: rgba(165, 122, 40, 0.26);
  box-shadow:
    0 20px 38px rgba(19, 32, 51, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.contact {
  border-top: 1px solid var(--line);
}

.contact h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.is-red .eyebrow,
.is-red .question-card__number {
  color: var(--red);
}

.is-red {
  --type: var(--red);
  --type-soft: #f8e1e4;
  --type-pale: #fff2f3;
}

.is-yellow .eyebrow,
.is-yellow .question-card__number {
  color: var(--yellow);
}

.is-yellow {
  --type: var(--yellow);
  --type-soft: #f7efd1;
  --type-pale: #fff9e5;
}

.is-blue .eyebrow,
.is-blue .question-card__number {
  color: var(--blue);
}

.is-blue {
  --type: var(--blue);
  --type-soft: #dceaf7;
  --type-pale: #f0f7ff;
}

.is-green .eyebrow,
.is-green .question-card__number {
  color: var(--green);
}

.is-green {
  --type: var(--green);
  --type-soft: #ddf0e4;
  --type-pale: #effaf3;
}

@media (max-width: 820px) {
  .hero,
  .result {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero__body,
  .contact {
    text-align: center;
  }

  .hero h1 {
    text-align: center;
  }

  .hero .primary-button,
  .cta .primary-button,
  .cta .secondary-button,
  .contact .primary-button {
    width: min(100%, 320px);
  }

  .cta {
    justify-content: center;
    text-align: center;
  }

  .result__image {
    position: static;
  }

  .score-item {
    grid-template-columns: 1fr auto;
  }

  .score-item__bar {
    grid-column: 1 / -1;
    order: 3;
  }
}
