:root {
  --main: #2C7C79;
  --main-dark: #215F5D;
  --main-soft: #E7F2F1;

  --accent: #E89B3E;
  --accent-dark: #D0842C;
  --accent-soft: #FFF3E2;

  --background: #F9FAFB;
  --surface: #FFFFFF;

  --text: #374151;
  --text-dark: #1F2937;
  --text-light: #6B7280;

  --border: #E5E7EB;

  --shadow-sm:
    0 3px 12px rgba(31, 41, 55, 0.05);

  --shadow-md:
    0 12px 34px rgba(31, 41, 55, 0.08);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;

  --max-width: 960px;
}


/* =====================================
   RESET
===================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;

  background: var(--background);
  color: var(--text);

  font-family:
    "Noto Sans JP",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Meiryo",
    sans-serif;

  line-height: 1.75;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 3px solid rgba(232, 155, 62, 0.35);
  outline-offset: 3px;
}

.container {
  width: min(calc(100% - 28px), var(--max-width));
  margin-inline: auto;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}


/* =====================================
   BUTTON
===================================== */

.primary-button,
.secondary-button {
  min-height: 56px;
  padding: 14px 30px;

  border-radius: 999px;

  font-weight: 700;

  cursor: pointer;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease,
    opacity 0.15s ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;

  border: 0;

  background: var(--accent);
  color: #FFFFFF;

  box-shadow:
    0 8px 20px rgba(232, 155, 62, 0.24);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  background: #D1D5DB;
  color: #FFFFFF;
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid var(--main);
  background: #FFFFFF;
  color: var(--main);
}

.secondary-button:hover {
  background: var(--main-soft);
}

.large-button {
  min-width: 260px;
}


/* =====================================
   TOP
===================================== */

.hero {
  min-height: 100vh;

  display: flex;
  align-items: center;

  padding: 70px 0;

  background:
    radial-gradient(
      circle at 8% 12%,
      rgba(44, 124, 121, 0.10),
      transparent 34%
    ),
    radial-gradient(
      circle at 92% 86%,
      rgba(232, 155, 62, 0.10),
      transparent 34%
    ),
    var(--background);
}

.hero-inner {
  text-align: center;
}

.eyebrow {
  display: inline-block;

  margin-bottom: 18px;
  padding: 6px 14px;

  border-radius: 999px;

  background: var(--main-soft);
  color: var(--main);

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hero-title {
  margin: 0;

  color: var(--main);

  font-size: clamp(34px, 7vw, 56px);
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.hero-subtitle {
  margin: 14px 0 38px;

  color: var(--text-dark);

  font-size: clamp(18px, 4vw, 24px);
  font-weight: 600;
  line-height: 1.7;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;

  max-width: 760px;
  margin: 0 auto 30px;
}

.concept-card {
  padding: 22px 14px;

  border: 1px solid rgba(44, 124, 121, 0.13);
  border-radius: var(--radius-md);

  background: rgba(255, 255, 255, 0.82);

  display: flex;
  flex-direction: column;
  align-items: center;
}

.concept-step {
  margin-bottom: 8px;

  color: var(--accent);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.concept-card strong {
  color: var(--main);
  font-size: 15px;
}

.concept-card > span:last-child {
  margin-top: 4px;

  color: var(--text-light);
  font-size: 13px;
}

.intro-card {
  max-width: 690px;
  margin: 0 auto 30px;
  padding: 28px;

  border-radius: var(--radius-lg);

  background: #FFFFFF;
  box-shadow: var(--shadow-md);
}

.intro-card p {
  margin: 0;
}

.meta-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;

  margin-top: 22px;
}

.meta-list span {
  padding: 5px 12px;

  border-radius: 999px;

  background: var(--background);
  color: var(--main);

  font-size: 12px;
  font-weight: 700;
}

.privacy-note {
  margin-top: 16px;

  color: var(--text-light);
  font-size: 12px;
}


/* =====================================
   HEADER
===================================== */

.diagnosis-header {
  position: sticky;
  z-index: 50;
  top: 0;

  padding-top: 16px;

  border-bottom: 1px solid rgba(229, 231, 235, 0.9);

  background: rgba(249, 250, 251, 0.96);

  backdrop-filter: blur(10px);
}

.header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 13px;
}

.text-button {
  padding: 6px;

  border: 0;

  background: transparent;
  color: var(--text-light);

  cursor: pointer;
}

.text-button:hover {
  color: var(--main);
}

.step-indicator {
  color: var(--main);

  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.progress-track {
  height: 5px;

  overflow: hidden;

  border-radius: 999px;

  background: #E5E7EB;
}

.progress-bar {
  height: 100%;

  border-radius: inherit;

  background: var(--main);

  transition: width 0.3s ease;
}


/* =====================================
   DIAGNOSIS
===================================== */

.diagnosis-section {
  padding: 52px 0 90px;
}

.diagnosis-inner {
  max-width: 820px;
}

.step-heading {
  margin-bottom: 34px;
  text-align: center;
}

.step-english {
  display: block;

  margin-bottom: 7px;

  color: var(--main);

  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.step-heading h2 {
  margin: 0 0 10px;

  color: var(--text-dark);

  font-size: clamp(27px, 5vw, 36px);
}

.step-heading p {
  max-width: 650px;
  margin: auto;

  color: var(--text-light);
}

.scale-card {
  margin-bottom: 22px;
  padding: 18px;

  border: 1px solid var(--border);
  border-radius: var(--radius-md);

  background: #FFFFFF;
}

.scale-title {
  margin: 0 0 14px;

  text-align: center;

  color: var(--text-dark);

  font-size: 13px;
  font-weight: 700;
}

.scale-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;

  text-align: center;

  color: var(--text-light);

  font-size: 10px;
  line-height: 1.35;
}

.scale-labels strong {
  display: block;

  margin-bottom: 3px;

  color: var(--main);

  font-size: 15px;
}

.questions-container {
  display: grid;
  gap: 18px;
}

.question-card {
  padding: 26px;

  border: 1px solid var(--border);
  border-radius: var(--radius-md);

  background: var(--surface);

  box-shadow: var(--shadow-sm);
}

.question-number {
  margin-bottom: 7px;

  color: var(--main);

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.question-text {
  margin: 0 0 20px;

  color: var(--text-dark);

  font-size: 16px;
  font-weight: 600;
  line-height: 1.8;
}

.answer-group {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.answer-button {
  min-height: 52px;

  border: 1px solid #D1D5DB;
  border-radius: var(--radius-sm);

  background: #FFFFFF;
  color: var(--text-light);

  font-size: 16px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.answer-button:hover {
  border-color: var(--main);
  color: var(--main);
}

.answer-button.selected {
  border-color: var(--main);

  background: var(--main);
  color: #FFFFFF;

  transform: translateY(-1px);
}

.validation-message {
  min-height: 28px;
  margin: 22px 0 0;

  text-align: center;

  color: #B45309;

  font-size: 14px;
  font-weight: 600;
}

.navigation-area {
  margin-top: 8px;
  text-align: center;
}

.navigation-button {
  min-width: 230px;
}


/* =====================================
   RESULT
===================================== */

.result-hero {
  padding: 62px 0 46px;

  background: var(--main);
  color: #FFFFFF;

  text-align: center;
}

.result-eyebrow {
  display: block;

  margin-bottom: 8px;

  color: rgba(255, 255, 255, 0.72);

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.result-hero h1 {
  margin: 0;

  font-size: clamp(32px, 6vw, 46px);
}

.result-hero p {
  margin: 12px 0 0;

  color: rgba(255, 255, 255, 0.80);
}

.result-section {
  padding: 48px 0 90px;
}

.result-inner {
  max-width: 900px;
}

.chart-card {
  padding: 30px 20px 18px;

  border-radius: var(--radius-lg);

  background: #FFFFFF;

  box-shadow: var(--shadow-md);
}

.section-heading {
  margin-bottom: 8px;
  text-align: center;
}

.section-heading span {
  color: var(--main);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.section-heading h2 {
  margin: 4px 0 0;

  color: var(--text-dark);

  font-size: 21px;
}

.radar-chart {
  width: 100%;
  max-width: 650px;
  margin: auto;
}

.radar-chart svg {
  display: block;

  width: 100%;
  height: auto;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;

  margin-top: 22px;
}

.score-card {
  padding: 22px;

  border: 1px solid var(--border);
  border-radius: var(--radius-md);

  background: #FFFFFF;

  box-shadow: var(--shadow-sm);
}

.score-en {
  display: block;

  color: var(--main);

  font-size: 11px;
  font-weight: 800;
}

.score-card h3 {
  margin: 5px 0 14px;

  color: var(--text-dark);

  font-size: 14px;
}

.score-number {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.score-number strong {
  color: var(--main);

  font-size: 38px;
  line-height: 1;
}

.score-number span {
  color: var(--text-light);

  font-size: 12px;
}

.feedback-card {
  margin-top: 24px;
  padding: 36px;

  border-radius: var(--radius-lg);

  background: #FFFFFF;

  box-shadow: var(--shadow-md);
}

.feedback-heading {
  padding-bottom: 22px;

  border-bottom: 1px solid var(--border);
}

.feedback-heading span {
  color: var(--accent);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.feedback-heading h2 {
  margin: 5px 0 0;

  color: var(--main);

  font-size: clamp(27px, 5vw, 36px);
}

.result-description {
  margin: 26px 0;

  color: var(--text);

  line-height: 2;
}

.question-box {
  padding: 24px;

  border-radius: var(--radius-md);

  background: var(--main-soft);
}

.question-box-label {
  display: block;

  margin-bottom: 8px;

  color: var(--main);

  font-size: 12px;
  font-weight: 800;
}

.question-box p {
  margin: 0;

  color: var(--text-dark);

  font-size: 17px;
  font-weight: 600;
  line-height: 1.8;
}

.restart-area {
  margin-top: 36px;

  text-align: center;
}


/* =====================================
   MOBILE
===================================== */

@media (max-width: 720px) {

  .hero {
    padding: 52px 0;
  }

  .concept-grid {
    grid-template-columns: 1fr;
    max-width: 430px;
  }

  .concept-card {
    padding: 18px;
  }

  .intro-card {
    padding: 22px 18px;
  }

  .diagnosis-section {
    padding-top: 38px;
  }

  .question-card {
    padding: 22px 16px;
  }

  .answer-group {
    gap: 5px;
  }

  .answer-button {
    min-height: 50px;
    padding: 6px 2px;
  }

  .scale-labels {
    font-size: 9px;
  }

  .scale-labels span {
    line-height: 1.25;
  }

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

  .score-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .score-en,
  .score-card h3 {
    grid-column: 1;
  }

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

  .feedback-card {
    padding: 28px 20px;
  }

  .question-box {
    padding: 20px;
  }
}


@media (max-width: 520px) {

  .container {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .hero-title {
    font-size: 33px;
  }

  .hero-subtitle br {
    display: none;
  }

  .scale-card {
    padding: 14px 8px;
  }

  .scale-labels span {
    font-size: 0;
  }

  .scale-labels strong {
    font-size: 14px;
  }

  .scale-labels span:first-child::after {
    content: "低い";
    display: block;
    font-size: 9px;
  }

  .scale-labels span:last-child::after {
    content: "高い";
    display: block;
    font-size: 9px;
  }

  .question-text {
    font-size: 15px;
  }

  .answer-button {
    min-height: 46px;
    font-size: 15px;
  }
}