:root {
  --bg: #f4f2ed;
  --surface: #ffffff;
  --ink: #1a1a18;
  --ink-soft: #3d3b36;
  --muted: #6f6b63;
  --line: #e7e3da;
  --line-strong: #d5d0c4;
  --accent: #1f6b5a;
  --accent-ink: #14483d;
  --accent-soft: #eaf2ef;
  --danger: #a9463b;
  --danger-soft: #fbeeec;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(24, 22, 18, 0.04), 0 28px 70px -32px rgba(24, 22, 18, 0.28);
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", Georgia, serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 50% -180px, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(700px 400px at 100% 100%, rgba(31, 107, 90, 0.05) 0%, rgba(31, 107, 90, 0) 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 60;
  background: rgba(26, 26, 24, 0.04);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.shell {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px calc(48px + env(safe-area-inset-bottom));
}

.hero {
  padding: 68px 4px 34px;
  animation: rise 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4.6vw, 40px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: break-word;
}

.lede {
  margin: 16px 0 0;
  max-width: 620px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--muted);
}

.meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.meta-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(26, 26, 24, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 44px 34px;
  animation: rise 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) 0.05s both;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.section-no {
  display: block;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.section-name {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.005em;
}

.section-count {
  flex: none;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.section-body {
  animation: fadeUp 0.34s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.q {
  padding: 28px 0 2px;
  border-bottom: 1px solid var(--line);
}

.q:last-child {
  border-bottom: none;
}

.q-index {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.q-title {
  margin: 5px 0 0;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink);
}

.req {
  margin-left: 3px;
  color: var(--danger);
  font-weight: 500;
}

.q-desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.options {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.opt:hover {
  border-color: var(--line-strong);
  background: #fbfaf7;
}

.opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.mark {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid #c8c3b8;
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.mark.box {
  border-radius: 6px;
}

.mark::after {
  content: "";
  position: absolute;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.mark.radio::after {
  inset: 5px;
  border-radius: 50%;
  background: #fff;
}

.mark.box::after {
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(43deg);
}

.opt.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.opt.is-selected .mark {
  border-color: var(--accent);
  background: var(--accent);
}

.opt.is-selected .mark::after {
  opacity: 1;
}

.opt .txt {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.opt input:focus-visible + .mark {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.opt.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.scale {
  margin-top: 16px;
}

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

.scale-btn {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.scale-btn:hover {
  border-color: var(--line-strong);
  background: #fbfaf7;
}

.scale-btn.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(31, 107, 90, 0.7);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--muted);
}

.field {
  position: relative;
  margin-top: 16px;
}

.field textarea {
  width: 100%;
  min-height: 118px;
  padding: 14px 15px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  resize: vertical;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea::placeholder {
  color: #a8a399;
}

.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(31, 107, 90, 0.12);
}

.counter {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 11.5px;
  color: #a8a399;
  font-variant-numeric: tabular-nums;
}

.q-error {
  display: none;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
}

.q.has-error .q-error {
  display: block;
}

.q.has-error .opt {
  border-color: rgba(169, 70, 59, 0.35);
}

.q.has-error .opt.is-selected {
  border-color: var(--accent);
}

.q.shake {
  animation: shake 0.32s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
  background: var(--surface);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px -14px rgba(31, 107, 90, 0.85);
}

.btn-primary:hover {
  background: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: #fbfaf7;
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 6px 0;
  font-size: 12px;
  color: var(--muted);
}

.link-btn {
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.link-btn:hover {
  color: var(--ink);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  z-index: 80;
  max-width: min(90vw, 460px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(26, 26, 24, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.success {
  padding: 30px 0 20px;
  text-align: center;
  animation: fadeUp 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.success-mark svg {
  width: 26px;
  height: 26px;
}

.success h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}

.success p {
  margin: 0 auto;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.success .seq {
  display: inline-block;
  margin-top: 22px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f6f4ef;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  20% {
    transform: translateX(-3px);
  }
  45% {
    transform: translateX(3px);
  }
  70% {
    transform: translateX(-2px);
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 0 14px calc(36px + env(safe-area-inset-bottom));
  }

  .hero {
    padding: 44px 6px 24px;
  }

  .hero h1 {
    font-size: clamp(26px, 7.4vw, 31px);
  }

  .lede {
    font-size: 13.5px;
  }

  .card {
    border-radius: 20px;
    padding: 26px 18px 20px;
  }

  .section-head {
    padding-bottom: 18px;
  }

  .section-name {
    font-size: 19px;
  }

  .q {
    padding-top: 24px;
  }

  .q-title {
    font-size: 15.5px;
  }

  .opt {
    padding: 13px 14px;
  }

  .scale-track {
    gap: 6px;
  }

  .scale-btn {
    height: 46px;
  }

  .nav {
    gap: 10px;
    margin-top: 26px;
    padding-top: 18px;
  }

  .btn {
    flex: 1;
    padding: 13px 10px;
  }

  .foot {
    padding: 18px 6px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
