:root {
  --brand: #1a7f8e;
  --brand-2: #14b8a6;
  --brand-deep: #115e66;
  --brand-soft: #e6f5f6;
  --ink: #16242c;
  --ink-2: #4a6070;
  --ink-3: #8298a6;
  --line: #e3ebef;
  --bg: #f2f6f8;
  --card: #ffffff;
  --danger: #e05252;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(22, 60, 72, 0.06);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 14px 40px;
}

/* ---------- 顶部 ---------- */
.hero {
  background: linear-gradient(150deg, #115e66 0%, #1a7f8e 48%, #14b8a6 100%);
  color: #fff;
  padding: 26px 20px 30px;
  margin: 0 -14px 0;
  border-radius: 0 0 22px 22px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -90px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 50%;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.hero h1 {
  font-size: 20px;
  line-height: 1.4;
  margin: 0 0 8px;
  font-weight: 700;
  position: relative;
}

.hero p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  position: relative;
}

.hero-stats {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  position: relative;
}

.hero-stat {
  flex: 1;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.hero-stat b {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

/* ---------- 提示条 ---------- */
.notice {
  background: #fffaf0;
  border: 1px solid #f5e2bb;
  color: #8a6318;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  margin-top: 16px;
  line-height: 1.65;
}

.notice b {
  color: #6b4c0f;
}

/* ---------- 进度 ---------- */
.progress-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242, 246, 248, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 9px 14px 8px;
  margin: 0 -14px 4px;
  border-bottom: 1px solid var(--line);
}

.progress-track {
  height: 6px;
  background: #dde7eb;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 6px;
  transition: width 0.3s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 5px;
}

.progress-text span:last-child {
  color: var(--brand);
  font-weight: 600;
}

/* ---------- 卡片 / 题目 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 14px;
  overflow: hidden;
}

.sec-head {
  padding: 15px 16px 13px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdfe, #fff);
}

.sec-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--brand-deep);
}

.sec-head p {
  margin: 5px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

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

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

.q-label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 11px;
  display: flex;
  gap: 6px;
}

.q-num {
  color: var(--brand);
  font-weight: 700;
  flex-shrink: 0;
}

.q-hint {
  font-size: 12.5px;
  color: var(--ink-3);
  margin: -6px 0 10px;
  line-height: 1.6;
}

.req {
  color: var(--danger);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- 输入 ---------- */
input[type="text"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcfd;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238298a6' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand-2);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.13);
}

input.err,
textarea.err,
select.err,
.opt-group.err {
  border-color: var(--danger);
  background: #fff8f8;
}

.opt-group.err {
  padding: 6px;
  border-radius: 10px;
  border-style: dashed;
}

::placeholder {
  color: #b3c3cc;
}

/* 两列输入 */
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-label {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 6px;
  font-weight: 600;
}

/* ---------- 选项 ---------- */
.opt-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.opt-group.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fbfcfd;
  cursor: pointer;
  transition: all 0.16s;
  font-size: 14px;
  line-height: 1.5;
  min-height: 44px;
}

.opt:active {
  transform: scale(0.988);
}

.opt .tick {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  border: 1.8px solid #c5d4db;
  border-radius: 50%;
  background: #fff;
  margin-top: 1px;
  position: relative;
  transition: all 0.16s;
}

.opt.multi .tick {
  border-radius: 6px;
}

.opt .tick::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.16s;
}

.opt.multi .tick::after {
  width: 11px;
  height: 6px;
  border-radius: 0;
  border-left: 2.2px solid #fff;
  border-bottom: 2.2px solid #fff;
  background: transparent;
  transform: translate(-50%, -62%) rotate(-45deg) scale(0);
}

.opt.on {
  border-color: var(--brand-2);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 600;
}

.opt.on .tick {
  border-color: var(--brand-2);
  background: var(--brand-2);
}

.opt.on .tick::after {
  transform: translate(-50%, -50%) scale(1);
}

.opt.multi.on .tick::after {
  transform: translate(-50%, -62%) rotate(-45deg) scale(1);
}

/* 其他输入 */
.other-input {
  margin-top: 8px;
}

/* ---------- 量表 ---------- */
.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-bottom: 8px;
  gap: 8px;
}

.scale {
  display: flex;
  gap: 7px;
}

.scale-item {
  flex: 1;
  border: 1.5px solid var(--line);
  background: #fbfcfd;
  border-radius: 11px;
  padding: 9px 2px;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s;
}

.scale-item b {
  display: block;
  font-size: 16px;
  color: var(--ink-2);
}

.scale-item small {
  display: block;
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
}

.scale-item.on {
  border-color: var(--brand-2);
  background: linear-gradient(180deg, #e6f5f6, #d8f0f0);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.18);
}

.scale-item.on b {
  color: var(--brand-deep);
  font-weight: 700;
}

.scale-item.on small {
  color: var(--brand);
}

/* ---------- 提交 ---------- */
.submit-area {
  margin-top: 20px;
  text-align: center;
}

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 13px;
  padding: 15px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px rgba(26, 127, 142, 0.28);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.14s, box-shadow 0.14s;
}

.btn:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: 0 3px 10px rgba(26, 127, 142, 0.24);
}

.btn[disabled] {
  opacity: 0.6;
  box-shadow: none;
}

.btn-ghost {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--brand-2);
  box-shadow: none;
}

.submit-tip {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 10px;
  line-height: 1.7;
}

.err-tip {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
}

.footer-note {
  text-align: center;
  font-size: 11.5px;
  color: #a5b6bf;
  margin-top: 22px;
  line-height: 1.8;
}

/* ---------- 成功页 ---------- */
.success {
  text-align: center;
  padding: 46px 22px 30px;
}

.success .ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.32);
  animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.5, 1);
}

@keyframes pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success .ring svg {
  width: 38px;
  height: 38px;
}

.success h2 {
  font-size: 20px;
  margin: 0 0 10px;
  color: var(--brand-deep);
}

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

.success .meta {
  margin-top: 20px;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  font-size: 13px;
  color: var(--ink-2);
  box-shadow: var(--shadow);
}

.success .meta div {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}

.success .meta b {
  color: var(--ink);
}

/* ---------- 浮动提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(22, 36, 44, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.24s;
  z-index: 99;
  max-width: 84vw;
  text-align: center;
}

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

@media (max-width: 360px) {
  .scale small {
    display: none;
  }
  .opt-group.cols-2 {
    grid-template-columns: 1fr;
  }
}
