:root {
  --accent: #2563eb;
  --accent-2: #14b8a6;
  --accent-ink: #1d4ed8;
  --text: #172033;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.22);
  --bg: #f6f8fb;
  --paper: rgba(255, 255, 255, 0.86);
  --paper-solid: #ffffff;
  --danger: #dc2626;
  --success: #15803d;
  --shadow-sm: 0 10px 26px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 46px rgba(15, 23, 42, 0.11);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.12), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(20, 184, 166, 0.11), transparent 28%),
    linear-gradient(180deg, #fbfdff 0, var(--bg) 48%, #eef3f8 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  animation: page-fade 360ms ease both;
}

.page {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 18px 12px;
}

.survey {
  width: min(100%, 420px);
  margin: 0;
  padding: 36px 16px 38px;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(22px);
}

h1 {
  margin: 0 16px 24px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.55;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0;
}

.intro {
  margin: 0 2px 34px;
  padding: 22px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.82));
  box-shadow: var(--shadow-sm);
  font-size: 19px;
  line-height: 1.62;
  font-weight: 900;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.intro p {
  margin: 0;
}

.intro span,
.required label span,
.required .question span {
  color: var(--accent-ink);
}

.field {
  margin: 0 2px 32px;
}

.field label,
.question {
  display: block;
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 760;
}

.required label span,
.required .question span {
  margin-right: 2px;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.input-shell:focus-within {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-shell svg {
  width: 18px;
  height: 18px;
  margin: 0 11px;
  fill: #94a3b8;
  flex: 0 0 auto;
}

input[type="text"],
input[type="tel"],
input:not([type]) {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  font: inherit;
  padding: 6px 8px 6px 0;
  background: transparent;
}

.choice-grid {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

.choice-grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.choice-grid.two label + label {
  border-left: 1px solid var(--line);
}

.choice-grid label {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #73777f;
  cursor: pointer;
  font-size: 16px;
  font-weight: 680;
  transition: background 180ms ease, color 180ms ease;
}

.choice-grid label:hover {
  background: rgba(37, 99, 235, 0.045);
  color: var(--text);
}

.choice-grid.stacked label + label {
  border-top: 1px solid var(--line);
}

input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.choice-grid i {
  width: 18px;
  height: 18px;
  border: 1.5px solid #c7cbd1;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #fff;
}

.choice-grid input:checked + i {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 5px #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.role {
  margin: 0 2px 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.role:hover,
.intro:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: var(--shadow-md);
}

.role-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 900;
}

.role-copy {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  white-space: pre-line;
}

.role-copy strong {
  font-weight: 900;
}

.error {
  min-height: 0;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.error:not(:empty) {
  min-height: 18px;
}

.role-error {
  margin: -18px 8px 16px;
}

.blessing {
  margin: 4px 2px 26px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(239, 246, 255, 0.9));
  font-size: 16px;
  line-height: 1.7;
  font-weight: 900;
  color: #0f766e;
}

.actions {
  margin: 0 2px;
  display: grid;
  gap: 10px;
}

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

button:hover {
  transform: translateY(-2px);
}

button:disabled {
  opacity: 0.7;
}

.submit {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.24);
}

.submit:hover {
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.3);
  filter: saturate(1.04);
}

.secondary {
  color: var(--accent);
  background: rgba(239, 246, 255, 0.9);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.notice {
  margin: 14px 8px 0;
  color: #2f7d4f;
  font-size: 14px;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  display: none;
  width: min(340px, calc(100vw - 32px));
  transform: translateX(-50%) translateY(10px) scale(0.96);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  backdrop-filter: blur(18px) saturate(1.4);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  display: block;
  animation: toast-pop 360ms cubic-bezier(0.2, 1.3, 0.3, 1) both;
}

@media (min-width: 520px) {
  .survey {
    margin: 18px 0 32px;
  }
}

@keyframes page-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-pop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(18px) scale(0.92);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}