:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --text: #111827;
  --muted: #5b6675;
  --subtle: #d8e0ea;
  --line: #e5eaf0;
  --blue: #075985;
  --cyan: #0891b2;
  --cyan-soft: #dff7fb;
  --dark: #0b1220;
  --danger: #b42318;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(229, 234, 240, 0.9);
  backdrop-filter: blur(14px);
}

.brand,
.header-cta {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
}

.brand {
  gap: 10px;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: var(--dark);
  border-radius: 8px;
}

.header-cta {
  min-height: 38px;
  padding: 0 16px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-size: 0.9rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100svh - 68px);
  padding: clamp(48px, 8vw, 92px) clamp(18px, 5vw, 72px) 38px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.94), rgba(245, 247, 250, 0.82)),
    url("data:image/svg+xml,%3Csvg width='1600' height='1000' viewBox='0 0 1600 1000' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1600' height='1000' fill='%23f5f7fa'/%3E%3Cg opacity='0.38'%3E%3Cpath d='M0 735 C180 650 270 702 430 598 C590 494 684 522 810 450 C1000 342 1135 290 1600 350' fill='none' stroke='%230891b2' stroke-width='8'/%3E%3Cpath d='M0 790 C210 710 310 760 492 660 C676 558 738 612 890 518 C1040 426 1176 410 1600 480' fill='none' stroke='%23075985' stroke-width='5'/%3E%3Cg fill='%23ffffff' stroke='%23d8e0ea'%3E%3Ccircle cx='422' cy='599' r='13'/%3E%3Ccircle cx='808' cy='451' r='13'/%3E%3Ccircle cx='1150' cy='294' r='13'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  max-width: 720px;
  font-size: clamp(2.2rem, 5.2vw, 4.9rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.65rem, 3.3vw, 2.65rem);
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.45;
}

.hero-copy {
  max-width: 670px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
}

.hero-actions,
.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(7, 89, 133, 0.18);
}

.secondary-button {
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--subtle);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.button {
  cursor: pointer;
  border: 0;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.meta {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.disclaimer {
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-note {
  max-width: 720px;
  margin-top: 22px;
  margin-bottom: 0;
}

.hero-visual {
  min-height: 410px;
}

.visual-panel {
  position: relative;
  width: min(100%, 520px);
  min-height: 410px;
  margin-left: auto;
  padding: 22px;
  overflow: hidden;
  background: rgba(11, 18, 32, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.visual-top {
  display: flex;
  gap: 8px;
}

.visual-top span {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.chart-lines {
  position: absolute;
  inset: 78px 30px 132px 30px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.12), rgba(255, 255, 255, 0.03));
  border-radius: 8px;
}

.chart-lines span {
  display: block;
  min-height: 44px;
  background: linear-gradient(180deg, #7dd3fc, #0e7490);
  border-radius: 7px 7px 3px 3px;
}

.type-radar {
  position: absolute;
  right: 30px;
  bottom: 28px;
  left: 30px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: center;
  padding: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.type-radar strong,
.type-radar small {
  display: block;
}

.type-radar small {
  color: rgba(255, 255, 255, 0.62);
}

.type-radar ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.type-radar li {
  height: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.type-radar li span {
  display: block;
  height: 100%;
  background: #22d3ee;
  border-radius: inherit;
}

.section {
  padding: clamp(56px, 8vw, 92px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 740px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.info-grid,
.type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-card,
.type-card,
.diagnosis-card,
.quiz-card,
.result-card,
.cta-panel,
.notice-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.info-card,
.type-card {
  padding: 24px;
}

.info-card p,
.type-card p,
.diagnosis-card p,
.cta-panel p,
.notice-section p {
  margin-bottom: 0;
  color: var(--muted);
}

.card-number,
.type-card span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--cyan);
  font-weight: 800;
}

.muted-section {
  background: #edf2f7;
}

.type-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.diagnosis-section {
  background: var(--bg);
}

.diagnosis-card,
.quiz-card,
.result-card {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 36px);
}

.diagnosis-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.hidden {
  display: none !important;
}

.quiz-status {
  display: grid;
  grid-template-columns: minmax(120px, 0.25fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.quiz-status p {
  margin-bottom: 0;
  font-weight: 800;
}

.quiz-status small {
  color: var(--muted);
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: inherit;
  transition: width 220ms ease;
}

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

.question-card {
  padding: 18px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.question-card.has-error {
  border-color: rgba(180, 35, 24, 0.45);
  background: #fff8f7;
}

.question-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.question-number {
  flex: 0 0 auto;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: var(--dark);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.question-text {
  margin-bottom: 0;
  font-weight: 700;
  line-height: 1.65;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.option {
  position: relative;
}

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

.option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--subtle);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  cursor: pointer;
}

.option input:focus-visible + span,
.option input:checked + span {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 10px 18px rgba(7, 89, 133, 0.16);
}

.question-error,
.form-error {
  margin: 10px 0 0 44px;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 700;
}

.form-error {
  min-height: 1.5em;
  margin: 16px 0 0;
}

.quiz-actions {
  justify-content: space-between;
  margin-top: 18px;
}

.result-section {
  max-width: 980px;
  margin: 0 auto;
}

.result-card {
  display: grid;
  gap: 24px;
}

.result-hero {
  padding: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--dark), var(--blue));
  border-radius: 8px;
}

.result-hero p {
  color: rgba(255, 255, 255, 0.76);
}

.result-hero h3 {
  margin-bottom: 8px;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.match-number {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 12px;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.match-number small {
  font-size: 0.9rem;
  font-weight: 700;
}

.result-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-tag {
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--subtle);
  border-radius: 8px;
}

.result-tag span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.result-tag strong {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
}

.score-list {
  display: grid;
  gap: 12px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.28fr) minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
}

.score-row strong {
  font-size: 0.94rem;
}

.score-track {
  height: 10px;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: 999px;
}

.score-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: inherit;
}

.result-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.result-box {
  padding: 20px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-box.full {
  grid-column: 1 / -1;
}

.result-box ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
}

.result-box p {
  margin-bottom: 0;
  color: var(--muted);
}

.line-box {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: var(--cyan-soft);
  border: 1px solid #a5e7f0;
  border-radius: 8px;
}

.line-box p {
  margin-bottom: 0;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-section {
  background: #0b1220;
}

.cta-panel {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 44px);
}

.notice-section {
  max-width: 980px;
  margin: 0 auto;
}

.notice-section h2 {
  font-size: 1.45rem;
}

.site-footer {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    min-height: 330px;
  }

  .visual-panel {
    min-height: 330px;
    margin-left: 0;
  }

  .info-grid,
  .type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-inline: 16px;
  }

  .brand {
    font-size: 0.92rem;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-visual {
    display: none;
  }

  .info-grid,
  .type-grid,
  .diagnosis-card,
  .quiz-status,
  .result-tags,
  .result-body {
    grid-template-columns: 1fr;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .option span {
    justify-content: flex-start;
    min-height: 44px;
    padding-inline: 14px;
  }

  .question-error {
    margin-left: 0;
  }

  .score-row {
    grid-template-columns: 1fr 48px;
  }

  .score-row .score-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .quiz-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
