* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --blue: #2b7fff;
  --blue-dark: #1f6ae0;
  --bg: #f2f4f7;
  --text: #1a1a1a;
  --muted: #8a909a;
  --line: #ededf2;
  --radius: 14px;
}
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.6;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 0 14px 120px; }

/* 顶部标题区 */
.hero {
  background: linear-gradient(135deg, #eaf1ff 0%, #f3f5ff 60%, #f7f0ff 100%);
  padding: 30px 20px 26px; text-align: center;
}
.hero h1 { margin: 0 0 14px; font-size: 21px; font-weight: 700; line-height: 1.4; }
.hero .intro {
  font-size: 13.5px; color: #5a6072; text-align: left; line-height: 1.75;
  background: rgba(255,255,255,.6); border-radius: 12px; padding: 14px 16px;
}

/* 题卡 */
.card {
  background: #fff; border-radius: var(--radius); padding: 18px 16px;
  margin: 12px 0; box-shadow: 0 1px 2px rgba(20,30,60,.04);
}
.q-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; line-height: 1.5; }
.q-title .idx { color: var(--blue); margin-right: 4px; }
.q-title .req { color: #ff4d4f; margin-left: 3px; }
.q-tag {
  font-size: 11px; color: var(--blue); background: #eaf1ff;
  border-radius: 6px; padding: 1px 7px; margin-left: 6px; font-weight: 500; vertical-align: middle;
}

/* 选项 */
.opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 10px;
  cursor: pointer; transition: all .15s; user-select: none;
}
.opt:last-child { margin-bottom: 0; }
.opt:active { background: #f6f9ff; }
.opt.checked { border-color: var(--blue); background: #f3f8ff; }
.opt .box {
  width: 22px; height: 22px; flex: 0 0 22px; border: 2px solid #cfd4de;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.opt[data-type="single"] .box { border-radius: 50%; }
.opt[data-type="multi"] .box { border-radius: 6px; }
.opt.checked .box { border-color: var(--blue); background: var(--blue); }
.opt.checked .box::after { content: ""; }
.opt[data-type="single"].checked .box::after {
  width: 9px; height: 9px; border-radius: 50%; background: #fff;
}
.opt[data-type="multi"].checked .box::after {
  width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px,-1px);
}
.opt .label { flex: 1; font-size: 15.5px; }

/* 填空 */
textarea, input[type="tel"], input[type="text"] {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 14px; font-size: 15.5px; font-family: inherit; color: var(--text);
  background: #fafbfc; outline: none; resize: vertical;
}
textarea:focus, input:focus { border-color: var(--blue); background: #fff; }
textarea { min-height: 92px; }

/* 提交栏 */
.submit-bar {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 14px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.submit-bar .inner { max-width: 640px; margin: 0 auto; }
.btn {
  width: 100%; border: none; border-radius: 12px; padding: 15px;
  font-size: 17px; font-weight: 600; color: #fff; background: var(--blue);
  cursor: pointer; transition: background .15s;
}
.btn:active { background: var(--blue-dark); }
.btn:disabled { background: #a9c6ff; }

.error-tip {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.82); color: #fff; padding: 11px 18px; border-radius: 22px;
  font-size: 14px; z-index: 99; opacity: 0; transition: opacity .2s; pointer-events: none;
  max-width: 90vw; text-align: center;
}
.error-tip.show { opacity: 1; }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }
