:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f5f8fb;
  --ink: #101828;
  --muted: #667085;
  --line: #d9e3ef;
  --blue: #155eef;
  --blue-soft: #eaf1ff;
  --green: #14945a;
  --green-soft: #e8f7ef;
  --orange: #f97316;
  --orange-soft: #fff3e8;
  --red: #d92d20;
  --shadow: 0 14px 34px rgba(18, 35, 64, 0.09);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #dfeaff 0, rgba(223, 234, 255, 0) 360px),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

.form-shell {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 110px;
}

.page-header,
.form-section,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.page-header {
  padding: 22px;
  margin-bottom: 12px;
}

.page-header p,
.section-title span,
label span,
.option-score,
.result-panel span,
.submit-bar p {
  color: var(--muted);
  font-size: 13px;
}

.page-header p {
  margin: 0 0 6px;
  color: var(--blue);
  font-weight: 900;
}

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

h1 {
  margin-bottom: 14px;
  font-size: 31px;
  line-height: 1.14;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 17px;
  line-height: 1.35;
}

.score-strip,
.section-title,
.submit-bar,
.consent-row,
.result-panel {
  display: flex;
  align-items: center;
}

.score-strip {
  flex-wrap: wrap;
  gap: 8px;
}

.score-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 800;
}

.score-strip strong {
  margin-left: 4px;
}

.form-section {
  padding: 18px;
  margin-bottom: 12px;
}

.section-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

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

label {
  min-width: 0;
}

label span {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.14);
}

.wide-field {
  grid-column: 1 / -1;
}

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

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

.option-list {
  display: grid;
  gap: 8px;
}

.option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.option:hover {
  border-color: rgba(21, 94, 239, 0.42);
  background: #fbfdff;
}

.option input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--blue);
}

.option-text {
  display: block;
  color: #344054;
  font-size: 14px;
  line-height: 1.55;
}

.option-score {
  flex: 0 0 auto;
  margin-bottom: 0;
  font-weight: 900;
}

.text-area-field {
  display: block;
}

.consent-row {
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: var(--green-soft);
}

.consent-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--green);
}

.consent-row span {
  margin-bottom: 0;
  color: #245c3d;
  font-weight: 800;
}

.result-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 12px;
}

.result-panel div {
  min-height: 92px;
  padding: 16px;
  background: var(--surface);
}

.result-panel strong {
  display: block;
  margin-top: 9px;
  font-size: 26px;
  line-height: 1.1;
}

.submit-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  justify-content: space-between;
  gap: 12px;
  width: min(100%, 720px);
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.submit-bar p {
  min-width: 0;
  margin-bottom: 0;
  font-weight: 800;
}

.submit-bar p.is-error {
  color: var(--red);
}

.submit-bar p.is-success {
  color: var(--green);
}

button {
  flex: 0 0 auto;
  min-width: 136px;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

button:hover {
  background: #004eeb;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

@media (max-width: 640px) {
  .form-shell {
    padding: 12px 10px 108px;
  }

  .page-header,
  .form-section {
    padding: 16px;
  }

  h1 {
    font-size: 27px;
  }

  .field-grid,
  .result-panel {
    grid-template-columns: 1fr;
  }

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

  .option-score {
    grid-column: 2;
  }

  .submit-bar {
    align-items: stretch;
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
