/* ============================================================
   社会心理情况调查问卷 · 独立填写页（手机优先 / 面向全社会人群）
   ============================================================ */
:root {
  --s-primary: #0f8f78;
  --s-primary-2: #2fd08f;
  --s-ink: #173633;
  --s-ink2: #4c6562;
  --s-muted: #8ba09c;
  --s-line: #e8efed;
  --s-bg: #f4f8f7;
  --s-soft: #e8f7f1;
}
* { box-sizing: border-box; }
body.survey-page { margin: 0; background: var(--s-bg); color: var(--s-ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; padding-bottom: 84px; }
img { max-width: 100%; display: block; }
button, input { font-family: inherit; }

.sv-topbar { height: 58px; background: #0d2b29; color: #e6f5f0; display: flex; align-items: center; gap: 11px; padding: 0 18px; position: sticky; top: 0; z-index: 20; }
.sv-topbar .st-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #9df0c0, #2fd08f); color: #073328; display: grid; place-items: center; font-weight: 800; }
.sv-topbar b { font-size: 14px; }
.sv-topbar .st-tag { font-size: 10px; letter-spacing: .8px; color: #8fdcc0; border: 1px solid rgba(126, 232, 224, .3); padding: 3px 8px; border-radius: 999px; }
.sv-topbar .st-right { margin-left: auto; display: flex; gap: 8px; }
.sv-topbar .st-right a, .sv-topbar .st-right button { font-size: 11.5px; color: #cfe9e0; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; padding: 7px 11px; display: inline-flex; align-items: center; gap: 6px; background: transparent; }
.sv-topbar .st-right button.fill { background: rgba(47, 208, 143, .16); border-color: rgba(47, 208, 143, .45); color: #b9ffdd; }

.sv-wrap { max-width: 600px; margin: 0 auto; padding: 16px 14px 24px; }
.sv-hero { border-radius: 16px; padding: 20px; color: #fff; background: linear-gradient(125deg, #0f8f78, #24b394 62%, #4fc3bd); box-shadow: 0 10px 26px rgba(15, 143, 120, .2); position: relative; overflow: hidden; margin-bottom: 14px; }
.sv-hero::after { content: ""; position: absolute; right: -30px; top: -40px; width: 150px; height: 150px; border-radius: 50%; border: 20px solid rgba(255, 255, 255, .13); }
.sv-hero .sh-kicker { font-size: 10px; letter-spacing: 1.6px; opacity: .9; }
.sv-hero h1 { margin: 9px 0 6px; font-size: 21px; font-weight: 800; }
.sv-hero p { margin: 0; font-size: 11.5px; line-height: 1.8; opacity: .92; max-width: 420px; }
.sv-hero .sh-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.sv-hero .sh-tags span { font-size: 10px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .25); padding: 4px 9px; border-radius: 999px; }

.sv-steps { display: flex; gap: 4px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.sv-steps::-webkit-scrollbar { display: none; }
.sv-steps .step { flex: 1; min-width: 66px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; color: #93a9a5; position: relative; }
.sv-steps .step i { width: 24px; height: 24px; border-radius: 50%; background: #e6eeec; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 10.5px; color: #8ba09c; }
.sv-steps .step.done i { background: #d8f3e7; color: #0f8f78; }
.sv-steps .step.active i { background: var(--s-primary); color: #fff; box-shadow: 0 0 0 4px rgba(15, 143, 120, .15); }
.sv-steps .step.active { color: var(--s-primary); font-weight: 800; }

.sec-head { margin: 4px 2px 14px; }
.sec-head h2 { margin: 0 0 5px; font-size: 17px; font-weight: 800; }
.sec-head p { margin: 0; font-size: 11.5px; color: var(--s-muted); line-height: 1.7; }

.card { background: #fff; border: 1px solid var(--s-line); border-radius: 14px; padding: 16px; margin-bottom: 12px; box-shadow: 0 4px 14px rgba(20, 80, 70, .04); }
.card h3 { margin: 0 0 10px; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card h3::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--s-primary-2); }
.card p { margin: 0 0 10px; font-size: 12px; line-height: 1.95; color: var(--s-ink2); }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0; padding-left: 18px; }
.card li { font-size: 12px; line-height: 2; color: var(--s-ink2); }
.card.concern { border-color: #ffe1c9; background: #fffaf5; }
.muted { color: var(--s-muted) !important; font-size: 11px !important; }

.intro-hero { border-radius: 14px; padding: 18px; margin-bottom: 12px; background: linear-gradient(120deg, #e9f8f3, #e7f3f8 70%, #eef0fb); border: 1px solid #d8efe7; }
.intro-hero .ih-kicker { font-size: 10px; letter-spacing: 1.4px; color: #0f8f78; font-weight: 800; }
.intro-hero h2 { margin: 8px 0 6px; font-size: 19px; font-weight: 800; }
.intro-hero p { margin: 0; font-size: 11.5px; color: #5c7571; line-height: 1.8; }
.intro-hero .ih-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.intro-hero .ih-tags span { font-size: 10px; color: #0f8f78; background: #fff; border: 1px solid #cceade; padding: 4px 9px; border-radius: 999px; }
.intro-row { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px dashed #edf2f0; font-size: 11.5px; }
.intro-row:last-child { border-bottom: none; }
.intro-row b { width: 130px; flex: none; }
.intro-row span { color: var(--s-muted); }

.consent { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--s-line); border-radius: 12px; padding: 14px; font-size: 12px; line-height: 1.8; color: var(--s-ink2); cursor: pointer; }
.cbox { width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid #c9d9d5; flex: none; display: grid; place-items: center; margin-top: 2px; background: #fff; }
.cbox.on { background: var(--s-primary); border-color: var(--s-primary); color: #fff; }
.demo-tip { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 11px 13px; border-radius: 10px; background: #fff8ea; border: 1px solid #ffe8bd; color: #a5762c; font-size: 11px; line-height: 1.7; }

.q-group { margin: 18px 2px 10px; font-size: 12px; font-weight: 800; color: var(--s-primary); line-height: 1.7; }
.q-group::before { content: ""; display: inline-block; width: 4px; height: 12px; border-radius: 2px; background: var(--s-primary-2); margin-right: 8px; vertical-align: -1px; }
.q-note { font-size: 11px; color: var(--s-muted); line-height: 1.8; margin: 0 2px 10px; }
.q-card { background: #fff; border: 1px solid var(--s-line); border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: 0 3px 12px rgba(20, 80, 70, .035); }
.q-card.indent { margin-left: 12px; background: #fafdfc; }
.q-label { font-size: 12.5px; font-weight: 700; line-height: 1.7; color: var(--s-ink); }
.q-label em { color: #e8675c; font-style: normal; margin-right: 3px; }
.q-hint { font-size: 10.5px; color: var(--s-muted); margin-top: 5px; line-height: 1.7; }
.opt-list { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.opt-list.two { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.opt { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 10px 11px; border-radius: 9px; border: 1px solid #e9efed; background: #fff; font-size: 11.5px; color: var(--s-ink2); line-height: 1.6; min-height: 38px; }
.opt:hover { border-color: #b9e5d5; }
.opt.active { border-color: var(--s-primary); background: #f0fbf6; color: #0d6d5c; font-weight: 700; }
.opt-mark { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid #cbd9d5; flex: none; display: grid; place-items: center; color: #fff; }
.opt-mark.square { border-radius: 5px; }
.opt.active .opt-mark { background: var(--s-primary); border-color: var(--s-primary); }
.other-input, .text-input { width: 100%; margin-top: 9px; border: 1px solid #e3ebe9; border-radius: 9px; padding: 10px 12px; font-size: 12px; color: var(--s-ink); outline: none; background: #fff; }
.other-input:focus, .text-input:focus { border-color: var(--s-primary); }

.mx-wrap { margin-top: 11px; overflow-x: auto; }
.mx-row { display: grid; grid-template-columns: 1.35fr repeat(4, .85fr); gap: 5px; align-items: center; min-width: 380px; padding: 5px 0; border-bottom: 1px dashed #edf2f0; }
.mx-row:last-child { border-bottom: none; }
.mx-head { font-size: 10px; color: var(--s-muted); text-align: center; }
.mx-head span:first-child { text-align: left; }
.mx-name { font-size: 10.5px; color: var(--s-ink2); }
.mx-cell { height: 28px; border-radius: 7px; border: 1px solid #e5edeb; background: #fff; color: transparent; display: grid; place-items: center; }
.mx-cell.active { background: var(--s-primary); border-color: var(--s-primary); color: #fff; }

.cf-bar { height: 9px; border-radius: 9px; background: #ecf2f0; overflow: hidden; margin: 6px 0 10px; }
.cf-bar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #8ff0bb, #2fd08f); }
.cf-num { font-size: 12px; color: var(--s-ink2); margin-bottom: 10px; }
.cf-num b { font-size: 16px; color: var(--s-primary); }
.info-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #edf2f0; font-size: 11.5px; }
.info-line:last-child { border-bottom: none; }
.info-line span { color: var(--s-muted); }
.info-line b { font-weight: 700; }
.warn-box { display: flex; gap: 8px; align-items: flex-start; padding: 12px; border-radius: 10px; background: #fff3e8; border: 1px solid #ffdfbd; color: #a96a2c; font-size: 11.5px; line-height: 1.8; margin-bottom: 12px; }

.success-hero { text-align: center; padding: 24px 14px 20px; border-radius: 14px; background: linear-gradient(160deg, #e5f8f1, #e4f3f7); margin-bottom: 12px; }
.success-hero .sh-circle { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 12px; background: linear-gradient(140deg, #48dda2, #0f8f78); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(15, 143, 120, .25); }
.success-hero h2 { margin: 0 0 6px; font-size: 19px; }
.success-hero p { margin: 0; font-size: 11px; color: #6c8581; }
.score-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #edf2f0; font-size: 11.5px; }
.score-row:last-child { border-bottom: none; }
.score-row span { flex: 1; color: var(--s-ink2); }
.score-row b { color: var(--s-primary); font-size: 14px; }
.score-row em { font-style: normal; font-size: 10px; color: #0f8f78; background: #e9f8f1; padding: 3px 8px; border-radius: 6px; min-width: 88px; text-align: center; }
.help-box { margin: 10px 0; padding: 12px; border-radius: 9px; background: #fff1f0; border: 1px solid #ffd9d5; color: #b1483f; font-size: 11.5px; line-height: 1.9; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 12px; border-radius: 10px; border: 1px solid #dfe9e6; background: #fff; color: var(--s-ink2); font-size: 12px; font-weight: 700; text-align: center; }
.btn.primary { background: linear-gradient(100deg, #8ce9b6, #2fd08f); border: none; color: #083c2e; }
.btn:hover { border-color: var(--s-primary); }

.sv-footer { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--s-line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; z-index: 15; box-shadow: 0 -4px 16px rgba(20, 80, 70, .05); }
.sv-footer .btn { flex: 1; }
.sv-inner { max-width: 600px; margin: 0 auto; width: 100%; display: flex; gap: 10px; }

.qr-flex { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; }
.qr-box, #qrMainBox { width: 176px; height: 176px; flex: none; border-radius: 12px; border: 1px solid var(--s-line); padding: 8px; background: #fff; display: grid; place-items: center; }
.qr-box svg, #qrMainBox svg { width: 100%; height: 100%; }
.qr-empty { font-size: 10px; color: var(--s-muted); text-align: center; line-height: 1.7; }
.qr-side { flex: 1; min-width: 0; }
.qr-tip { font-size: 11px; color: var(--s-ink2); line-height: 1.8; word-break: break-all; }
.qr-tip b { color: var(--s-primary); font-weight: 700; }
.qr-warn { color: #c07a2d; }
.qr-link { display: block; margin-top: 8px; font-size: 10.5px; color: var(--s-primary); word-break: break-all; }
.qr-editor { display: flex; gap: 8px; margin-top: 12px; }
.qr-editor input { flex: 1; min-width: 0; border: 1px solid #e3ebe9; border-radius: 9px; padding: 9px 11px; font-size: 11.5px; outline: none; }
.qr-editor button { flex: none; padding: 9px 14px; border-radius: 9px; background: var(--s-primary); color: #fff; font-size: 11.5px; font-weight: 700; }
.qr-actions { display: flex; gap: 8px; margin-top: 10px; }
.qr-actions .btn { padding: 8px 12px; font-size: 11px; }
.sv-share { margin-top: 16px; }
.sv-foot { text-align: center; font-size: 10.5px; color: #9aada9; line-height: 1.8; padding: 18px 10px 0; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(10px); background: rgba(16, 48, 44, .94); color: #fff; font-size: 11.5px; padding: 10px 17px; border-radius: 999px; white-space: nowrap; max-width: 90vw; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 40; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 480px) {
  .sv-topbar .st-tag { display: none; }
  .sv-topbar b { font-size: 13px; }
  .opt-list.two { grid-template-columns: 1fr; }
  .btn-grid { grid-template-columns: 1fr; }
  .qr-flex { flex-direction: column; align-items: center; }
  .qr-side { width: 100%; }
}
/* 桌面演示时底部按钮居中，避免整条铺满 */
.sv-footer { justify-content: center; }
.sv-footer .btn { flex: 1; max-width: 260px; }

/* ============ 嵌入「扫码后手机模拟演示页」的独立问卷形态 ============ */
.sv-embed .sv-topbar { height: 50px; padding: 0 12px; }
.sv-embed .sv-topbar .st-mark { width: 26px; height: 26px; border-radius: 8px; }
.sv-embed .sv-topbar .st-tag,
.sv-embed #svHomeLink,
.sv-embed #svShare,
.sv-embed .sv-foot { display: none !important; }
.sv-embed .sv-wrap { max-width: none; padding: 14px 12px 92px; }
.sv-embed .sv-hero { padding: 16px; }
.sv-embed .sv-hero h1 { font-size: 18px; }

/* 提交成功后只保留成功状态：隐藏问卷介绍 / 步骤条 / 分享区 / 演示辅助按钮 */
.sv-done .sv-hero,
.sv-done .sv-steps,
.sv-done #svShare,
.sv-done .sv-foot,
.sv-done .sv-topbar .fill { display: none !important; }
.sv-done .sv-wrap { padding-top: 20px; }
.sv-embed.sv-done .sv-wrap { padding: 22px 12px 24px; }
/* 嵌入模式下提示由演示外壳统一显示，避免两层 toast 重叠 */
.sv-embed .toast { display: none !important; }
