*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #1f1d1e;
  background: #faf6f2;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

.page {
  min-height: 100vh;
}

.diagnosis-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 18px 42px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .88) 48%, rgba(255, 255, 255, .4) 100%),
    url("https://www.ouenschool.fun/images/sakurazaru/fv-hero.png") right center / cover;
}

.diagnosis-hero__inner,
.diagnosis-shell {
  width: min(100%, 1120px);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3ebe4;
  color: #5d4438;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.diagnosis-hero h1 {
  max-width: 720px;
  margin: 0 0 16px;
  font-size: clamp(28px, 4.5vw, 48px);
  line-height: 1.42;
  font-weight: 900;
  letter-spacing: 0;
  text-wrap: balance;
}

.lead {
  max-width: 640px;
  margin: 0 0 26px;
  color: #4a4548;
  font-size: 16px;
  font-weight: 500;
}

.line-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 22px;
  border-radius: 999px;
  background: #4f8a5b;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(79, 138, 91, .22), 0 2px 6px rgba(79, 138, 91, .15);
}

.line-link:hover {
  background: #3e6e48;
}

.diagnosis-section {
  padding: 42px 18px 72px;
}

.diagnosis-shell {
  display: grid;
  gap: 24px;
  padding: 22px;
  border: 1px solid #e4d6cb;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 44px rgba(130, 100, 80, .12);
}

.diagnosis-head {
  border-bottom: 1px solid #efdfe4;
  padding-bottom: 18px;
}

.diagnosis-head h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.45;
  font-weight: 900;
}

.diagnosis-head p:last-child {
  margin: 0;
  color: #7a7175;
}

.diagnosis-form {
  display: grid;
  gap: 22px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid #efdfe4;
  border-radius: 16px;
  background: #faf8f9;
}

legend {
  padding: 0 8px;
  color: #1f1d1e;
  font-weight: 900;
}

.form-grid,
.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label,
.subject-grid label {
  display: grid;
  gap: 6px;
  color: #4a4548;
  font-size: 13px;
  font-weight: 700;
}

.form-grid__wide {
  grid-column: 1 / -1;
}

input[type="number"],
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #e4d6cb;
  border-radius: 10px;
  background: #fff;
  color: #1f1d1e;
}

input:focus,
select:focus {
  outline: 3px solid #f5dde4;
  border-color: #b26a7c;
}

.choice-grid,
.check-grid {
  display: grid;
  gap: 10px;
}

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

.choice-grid label,
.check-grid label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 54px;
  padding: 13px 14px;
  border: 1px solid #e4d6cb;
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.choice-grid small {
  color: #7a7175;
  font-weight: 500;
}

.choice-grid input,
.check-grid input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: #4f8a5b;
}

.form-note {
  margin: 12px 0 0;
  color: #7a7175;
  font-size: 12px;
}

.diagnosis-submit {
  width: min(100%, 360px);
  min-height: 58px;
  justify-self: center;
  border: 0;
  border-radius: 14px;
  background: #4f8a5b;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(79, 138, 91, .22), 0 2px 6px rgba(79, 138, 91, .15);
}

.diagnosis-submit:hover {
  background: #3e6e48;
}

.diagnosis-result {
  display: grid;
  gap: 18px;
}

.result-score,
.result-plan,
.result-cta,
.result-grid article {
  border: 1px solid #e4d6cb;
  border-radius: 16px;
  background: #fff;
  padding: 18px;
}

.result-score {
  display: grid;
  gap: 8px;
  border-color: #e6a8b8;
  background: linear-gradient(135deg, #fff 0%, #fff7f9 100%);
}

.result-score span {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f5dde4;
  color: #b26a7c;
  font-size: 12px;
  font-weight: 900;
}

.result-score strong {
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.45;
}

.result-score p,
.result-plan p,
.result-cta p {
  margin: 0;
}

.result-line {
  color: #5d4438;
  font-size: 13.5px;
  font-weight: 900;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.result-grid h3,
.result-plan h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 900;
}

.result-grid ol,
.result-grid ul {
  margin: 0;
  padding-left: 1.3em;
}

.result-grid li + li {
  margin-top: 8px;
}

.result-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  background: #e6f0e7;
  border-color: #c9dfce;
}

.result-cta__note {
  grid-column: 1 / -1;
  margin: -6px 0 0;
  color: #3e6e48;
  font-size: 13px;
  font-weight: 700;
}

.line-link--large {
  min-width: 240px;
  background: #06c755;
  box-shadow: 0 8px 20px rgba(6, 199, 85, .22);
}

.line-link--large:hover {
  background: #05b04a;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .diagnosis-hero {
    padding-top: 58px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .92) 100%),
      url("https://www.ouenschool.fun/images/sakurazaru/fv-hero.png") 72% center / cover;
  }

  .diagnosis-section {
    padding-inline: 12px;
  }

  .diagnosis-shell {
    padding: 16px;
    border-radius: 18px;
  }

  .form-grid,
  .subject-grid,
  .choice-grid,
  .result-grid,
  .result-cta {
    grid-template-columns: 1fr;
  }

  fieldset {
    padding: 16px 14px;
  }

  .result-cta .line-link {
    width: 100%;
  }
}
