/* ==========================================================================
 * 气味类情绪调节产品问卷 · 视觉层
 * 浅色主题 · 暖白底 + 森林绿主色 + 陶土橘点缀
 * ========================================================================== */

:root {
  --bg:           #FAF8F4;
  --bg-2:         #F3EFE7;
  --card:         #FFFFFF;
  --ink:          #1F2A26;
  --ink-2:        #4A5952;
  --ink-3:        #8A968F;
  --ink-4:        #B4BDB7;
  --line:         #E6E1D7;
  --line-2:       #F0ECE3;

  --brand:        #2F5D50;
  --brand-2:      #3E7A67;
  --brand-soft:   #E8F0EC;
  --brand-tint:   #F2F7F4;

  --clay:         #C4784A;
  --clay-soft:    #F7EDE4;

  --danger:       #C0563F;
  --ok:           #3E8E6B;

  --shadow-1:     0 1px 2px rgba(31,42,38,.04), 0 4px 16px rgba(31,42,38,.05);
  --shadow-2:     0 2px 6px rgba(31,42,38,.06), 0 16px 44px rgba(31,42,38,.10);
  --shadow-pop:   0 8px 28px rgba(47,93,80,.18);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --ease-out:  cubic-bezier(.22,.9,.28,1);
  --ease-soft: cubic-bezier(.4,0,.2,1);
  --ease-back: cubic-bezier(.34,1.4,.5,1);
}

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

html, body {
  margin: 0; padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- 动态背景 ---------- */
.bg {
  position: fixed; inset: 0;
  z-index: 0; overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 15% -10%, #FFFFFF 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  will-change: transform;
}
.blob.b1 { width: 420px; height: 420px; left: -120px; top: -80px;
  background: radial-gradient(circle at 30% 30%, #BFD9CE, rgba(191,217,206,0) 70%);
  animation: drift1 26s var(--ease-soft) infinite; }
.blob.b2 { width: 360px; height: 360px; right: -100px; top: 22%;
  background: radial-gradient(circle at 60% 40%, #F0D9C4, rgba(240,217,196,0) 70%);
  animation: drift2 32s var(--ease-soft) infinite; }
.blob.b3 { width: 300px; height: 300px; left: 30%; bottom: -120px;
  background: radial-gradient(circle at 50% 50%, #D8E4DC, rgba(216,228,220,0) 70%);
  animation: drift3 29s var(--ease-soft) infinite; }

@keyframes drift1 { 0%,100%{transform:translate3d(0,0,0) scale(1)} 50%{transform:translate3d(60px,40px,0) scale(1.12)} }
@keyframes drift2 { 0%,100%{transform:translate3d(0,0,0) scale(1)} 50%{transform:translate3d(-50px,60px,0) scale(1.08)} }
@keyframes drift3 { 0%,100%{transform:translate3d(0,0,0) scale(1)} 50%{transform:translate3d(40px,-50px,0) scale(1.15)} }

/* ---------- 布局骨架 ---------- */
.shell {
  position: relative; z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.topbar {
  position: sticky; top: 0; z-index: 10;
  padding: 14px 22px 10px;
  background: linear-gradient(180deg, rgba(250,248,244,.96) 60%, rgba(250,248,244,0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.topbar-inner {
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
}

.brandmark {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--brand);
  white-space: nowrap;
}
.brandmark svg { width: 20px; height: 20px; flex: none; }

.progress-wrap { flex: 1; min-width: 60px; }
.progress-rail {
  height: 6px; border-radius: 99px;
  background: var(--line-2); overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 55%, #6FAE95 100%);
  transition: width .55s var(--ease-out);
  position: relative;
}
.progress-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.6s var(--ease-soft) infinite;
}
@keyframes shimmer { 0%{transform:translateX(-100%)} 60%,100%{transform:translateX(220%)} }

.progress-num {
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  min-width: 54px; text-align: right;
  white-space: nowrap;
}

/* ---------- 舞台 ---------- */
.viewport {
  flex: 1;
  width: 100%; max-width: 720px;
  margin: 0 auto;
  padding: 6px 22px 40px;
  display: flex; flex-direction: column;
  justify-content: center;
}

.stage { width: 100%; }
.stage.out { animation: stageOut .18s var(--ease-soft) both; }
.stage.in  { animation: stageIn  .5s var(--ease-out) both; }

@keyframes stageOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-14px); }
}
@keyframes stageIn {
  from { opacity: 0; transform: translateY(26px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.stage.back.out { animation: stageOutBack .18s var(--ease-soft) both; }
.stage.back.in  { animation: stageInBack  .5s var(--ease-out) both; }
@keyframes stageOutBack { from{opacity:1;transform:translateY(0)} to{opacity:0;transform:translateY(14px)} }
@keyframes stageInBack  { from{opacity:0;transform:translateY(-26px) scale(.985)} to{opacity:1;transform:translateY(0) scale(1)} }

/* ---------- 题目卡片 ---------- */
.q-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 34px 30px 28px;
  box-shadow: var(--shadow-2);
  position: relative;
}

.q-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.q-index {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 10px; border-radius: 99px;
  font-variant-numeric: tabular-nums;
}
.q-hint {
  font-size: 12px; font-weight: 600;
  color: var(--clay);
  background: var(--clay-soft);
  padding: 4px 10px; border-radius: 99px;
}
.q-star {
  font-size: 11.5px; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 4px;
}
.q-star::before { content: '★'; color: var(--clay); font-size: 10px; }

.q-title {
  font-size: 21px; line-height: 1.5;
  font-weight: 700; letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 8px;
}
.q-desc {
  font-size: 14.5px; line-height: 1.72;
  color: var(--ink-2);
  margin: 0 0 6px;
}
.q-note {
  font-size: 13px; color: var(--ink-3);
  margin: 10px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}
.q-stem { margin-bottom: 22px; }
.q-stem:last-child { margin-bottom: 0; }

/* ---------- 选项 ---------- */
.opts { display: flex; flex-direction: column; gap: 10px; }

.opt {
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  font-size: 15.5px; line-height: 1.5;
  font-family: inherit;
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: border-color .2s var(--ease-soft),
              background .2s var(--ease-soft),
              transform .18s var(--ease-out),
              box-shadow .2s var(--ease-soft);
  opacity: 0;
  animation: optIn .42s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 34ms + 90ms);
}
@keyframes optIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (hover: hover) {
  .opt:hover { border-color: #CBD8D1; background: var(--brand-tint); transform: translateY(-1px); }
}
.opt:active { transform: scale(.985); }
.opt:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

.opt .mark {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-4);
  display: grid; place-items: center;
  transition: border-color .2s var(--ease-soft), background .2s var(--ease-soft);
}
.opt.multi .mark { border-radius: 7px; }
.opt .mark svg { width: 12px; height: 12px; opacity: 0; transform: scale(.4);
  transition: opacity .2s var(--ease-out), transform .28s var(--ease-back); }
.opt .label { flex: 1; }
.opt .key {
  flex: none; font-size: 11px; color: var(--ink-4);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 5px; font-variant-numeric: tabular-nums;
}

.opt.on {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 2px 10px rgba(47,93,80,.10);
}
.opt.on .mark { border-color: var(--brand); background: var(--brand); }
.opt.on .mark svg { opacity: 1; transform: scale(1); }
.opt.on .key { opacity: .35; }

.opt.dim { opacity: .45; }
.opt.dim:not(.on) { }

/* 选中时的水波纹 */
.opt .ripple {
  position: absolute; border-radius: 50%;
  background: rgba(47,93,80,.16);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple .55s var(--ease-out) forwards;
  pointer-events: none;
}
@keyframes ripple { to { transform: translate(-50%,-50%) scale(1); opacity: 0; } }

/* 达到多选上限时的提示脉冲 */
.opt.shake { animation: nudge .4s var(--ease-back); }
@keyframes nudge {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
}

/* 其他（请填写） */
.other-input {
  width: 100%; margin: 2px 0 4px;
  padding: 12px 15px;
  border: 1.5px dashed var(--brand-2);
  border-radius: var(--r-md);
  font-size: 15px; font-family: inherit; color: var(--ink);
  background: var(--brand-tint);
  animation: optIn .34s var(--ease-out) both;
  outline: none;
}
.other-input::placeholder { color: var(--ink-4); }
.other-input:focus { border-style: solid; box-shadow: 0 0 0 3px rgba(62,122,103,.12); }

/* ---------- 量表 0-10 ---------- */
.scale-bar { display: flex; gap: 7px; flex-wrap: wrap; }
.scale-dot {
  flex: 1 1 auto; min-width: 42px;
  height: 52px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff; color: var(--ink-2);
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; position: relative;
  transition: all .2s var(--ease-out);
  opacity: 0; animation: optIn .4s var(--ease-out) both;
  animation-delay: calc(var(--i,0) * 28ms + 80ms);
}
@media (hover: hover) { .scale-dot:hover { border-color: var(--brand-2); color: var(--brand); } }
.scale-dot.on {
  background: var(--brand); border-color: var(--brand); color: #fff;
  transform: translateY(-3px) scale(1.04);
  box-shadow: var(--shadow-pop);
}
.scale-ends {
  display: flex; justify-content: space-between;
  font-size: 12.5px; color: var(--ink-3); margin-top: 10px;
}
.scale-groups {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
  padding-top: 16px; border-top: 1px dashed var(--line);
  animation: optIn .4s var(--ease-out) both; animation-delay: .2s;
}
.scale-groups-label { font-size: 12.5px; color: var(--ink-3); width: 100%; margin-bottom: 2px; }
.grp-chip {
  font-size: 13px; color: var(--brand);
  background: var(--brand-soft); border-radius: 99px;
  padding: 5px 12px; font-weight: 600;
}

/* ---------- 矩阵题 ---------- */
.matrix { display: flex; flex-direction: column; gap: 0; }
.mx-head, .mx-row {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) repeat(var(--cols,4), minmax(46px,1fr));
  gap: 6px; align-items: center;
}
.mx-head {
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 62px; z-index: 3;
  background: var(--card);
}
.mx-head .h {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  text-align: center; line-height: 1.35;
}
.mx-head .h:first-child { text-align: left; }
.mx-row {
  padding: 11px 4px;
  border-bottom: 1px solid var(--line-2);
  opacity: 0; animation: optIn .42s var(--ease-out) both;
  animation-delay: calc(var(--i,0) * 42ms + 60ms);
  border-radius: var(--r-sm);
  transition: background .2s var(--ease-soft);
}
.mx-row:last-child { border-bottom: none; }
.mx-row.done { background: rgba(232,240,236,.42); }
.mx-label { font-size: 14.5px; line-height: 1.5; color: var(--ink); padding-right: 6px; }

.cell {
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: all .18s var(--ease-out);
  position: relative;
}
@media (hover: hover) { .cell:hover { border-color: var(--brand-2); background: var(--brand-tint); } }
.cell i {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand); opacity: 0; transform: scale(.3);
  transition: opacity .18s var(--ease-out), transform .26s var(--ease-back);
}
.cell.on { border-color: var(--brand); background: var(--brand-soft); }
.cell.on i { opacity: 1; transform: scale(1); }
.cell:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }

.mx-foot {
  margin-top: 12px; font-size: 13px; color: var(--ink-3);
  display: flex; align-items: center; gap: 8px;
}
.mx-foot .tick { color: var(--ok); font-weight: 600; }

/* ---------- 概念卡片 ---------- */
.concept {
  border-radius: var(--r-lg);
  padding: 26px 24px;
  margin-bottom: 24px;
  background:
    linear-gradient(160deg, #F4FAF7 0%, #FBF8F3 55%, #F7F1E9 100%);
  border: 1px solid #E0EBE5;
  position: relative; overflow: hidden;
}
.concept::before {
  content: '';
  position: absolute; inset: -2px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(120deg, rgba(47,93,80,.55), rgba(196,120,74,.35), rgba(47,93,80,.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  background-size: 300% 300%;
  animation: borderFlow 9s linear infinite;
  pointer-events: none;
}
@keyframes borderFlow { 0%{background-position:0% 50%} 100%{background-position:300% 50%} }

.concept-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: var(--brand);
  background: rgba(255,255,255,.8);
  border: 1px solid #DBE9E3;
  padding: 5px 12px; border-radius: 99px;
  margin-bottom: 16px;
}
.concept-badge svg { width: 14px; height: 14px; }
.concept h3 {
  font-size: 18px; font-weight: 700; color: var(--ink);
  margin: 0 0 14px; line-height: 1.5;
}
.concept p {
  font-size: 15px; line-height: 1.85; color: var(--ink-2);
  margin: 0 0 12px;
  opacity: 0; animation: conceptLine .6s var(--ease-out) both;
  animation-delay: calc(var(--i,0) * 150ms + 200ms);
}
.concept p:last-child { margin-bottom: 0; }
@keyframes conceptLine {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: translateY(0); }
}
.concept .bean {
  position: absolute; right: -14px; bottom: -18px;
  width: 120px; height: 120px; opacity: .07;
  animation: floatSlow 7s var(--ease-soft) infinite;
}
@keyframes floatSlow { 0%,100%{transform:translateY(0) rotate(0)} 50%{transform:translateY(-9px) rotate(6deg)} }

/* ---------- 开放题 ---------- */
textarea.open-input {
  width: 100%; min-height: 130px; resize: vertical;
  padding: 15px 17px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font-size: 15.5px; line-height: 1.75; font-family: inherit;
  color: var(--ink); background: #fff;
  outline: none;
  transition: border-color .2s var(--ease-soft), box-shadow .2s var(--ease-soft);
}
textarea.open-input::placeholder { color: var(--ink-4); }
textarea.open-input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(62,122,103,.10); }
.open-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; font-size: 12.5px; color: var(--ink-3);
}

/* ---------- 底部操作条 ---------- */
.navbar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 22px;
}
.btn {
  font-family: inherit; font-size: 15px; font-weight: 600;
  border-radius: var(--r-md); cursor: pointer;
  padding: 14px 24px; min-height: 50px;
  border: 1.5px solid transparent;
  transition: all .2s var(--ease-out);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  position: relative; overflow: hidden;
}
.btn:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; flex: 1;
  box-shadow: 0 4px 16px rgba(47,93,80,.22);
}
.btn-primary:not(:disabled):hover { transform: translateY(-1.5px); box-shadow: 0 8px 24px rgba(47,93,80,.30); }
.btn-primary:not(:disabled):active { transform: translateY(0) scale(.99); }
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.32), transparent);
  transform: skewX(-18deg);
  animation: sweep 3.4s var(--ease-soft) infinite;
}
@keyframes sweep { 0%{left:-60%} 55%,100%{left:130%} }

.btn-ghost {
  background: #fff; color: var(--ink-2);
  border-color: var(--line);
}
.btn-ghost:not(:disabled):hover { border-color: #CBD8D1; color: var(--brand); background: var(--brand-tint); }
.btn-sm { padding: 10px 16px; min-height: 42px; font-size: 14px; flex: none; }

.navbar .spacer { flex: 1; }
.nav-hint { font-size: 12.5px; color: var(--ink-3); }

/* 校验提示 */
.warn {
  margin-top: 14px; font-size: 13.5px; color: var(--danger);
  display: flex; align-items: center; gap: 7px;
  animation: optIn .3s var(--ease-out) both;
}

/* ---------- 章节过场页 ---------- */
.section-card {
  text-align: center;
  padding: 46px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
}
.section-num {
  font-size: 66px; font-weight: 800; line-height: 1;
  letter-spacing: -.04em;
  background: linear-gradient(140deg, var(--brand) 0%, #7FB49F 55%, var(--clay) 130%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin-bottom: 16px;
  animation: popIn .6s var(--ease-back) both;
}
@keyframes popIn { from{opacity:0;transform:scale(.82)} to{opacity:1;transform:scale(1)} }
.section-name {
  font-size: 25px; font-weight: 700; color: var(--ink);
  margin: 0 0 10px;
  animation: optIn .5s var(--ease-out) both; animation-delay: .12s;
}
.section-tagline {
  font-size: 15px; color: var(--ink-2); margin: 0 auto 26px;
  max-width: 26em; line-height: 1.7;
  animation: optIn .5s var(--ease-out) both; animation-delay: .2s;
}
.section-dots {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 28px;
  animation: optIn .5s var(--ease-out) both; animation-delay: .28s;
}
.section-dots i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--line);
}
.section-dots i.on { background: var(--brand); width: 22px; border-radius: 99px; transition: all .3s var(--ease-out); }

/* ---------- 首页 / 结束页 ---------- */
.hero { text-align: center; padding: 10px 0; }
.hero-pouch {
  width: 150px; height: 150px; margin: 0 auto 22px;
  animation: floatSlow 6s var(--ease-soft) infinite;
}
.hero h1 {
  font-size: 30px; line-height: 1.35; font-weight: 800;
  letter-spacing: -.02em; color: var(--ink);
  margin: 0 0 14px;
  animation: optIn .6s var(--ease-out) both; animation-delay: .1s;
}
.hero .sub {
  font-size: 16px; color: var(--ink-2); line-height: 1.75;
  max-width: 30em; margin: 0 auto 24px;
  animation: optIn .6s var(--ease-out) both; animation-delay: .18s;
}
.hero .facts {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 28px;
  animation: optIn .6s var(--ease-out) both; animation-delay: .26s;
}
.fact {
  font-size: 13px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); border-radius: 99px;
  padding: 7px 15px;
}
.hero .consent {
  max-width: 34em; margin: 0 auto 26px;
  font-size: 13.5px; line-height: 1.85; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px 22px; text-align: left;
  animation: optIn .6s var(--ease-out) both; animation-delay: .34s;
}
.hero .consent strong { color: var(--ink); }
.hero .actions { animation: optIn .6s var(--ease-out) both; animation-delay: .42s; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* 结束页 */
.done-card {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 42px 30px 36px;
  box-shadow: var(--shadow-2);
}
.ring-wrap { width: 130px; height: 130px; margin: 0 auto 20px; position: relative; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line-2); stroke-width: 8; }
.ring-fg {
  fill: none; stroke: url(#ringGrad); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 339.3; stroke-dashoffset: 339.3;
  animation: ringDraw 1.15s var(--ease-out) .15s forwards;
}
@keyframes ringDraw { to { stroke-dashoffset: 0; } }
.ring-txt {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-txt b { font-size: 30px; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.ring-txt span { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.done-card h2 { font-size: 23px; margin: 0 0 10px; color: var(--ink); font-weight: 700; }
.done-card p { font-size: 15px; color: var(--ink-2); margin: 0 0 22px; line-height: 1.75; }

.contact-box {
  text-align: left;
  background: var(--brand-tint);
  border: 1px dashed #CBDFD5;
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 24px;
  animation: optIn .5s var(--ease-out) both; animation-delay: .3s;
}
.contact-box label { font-size: 14.5px; font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; }
.contact-box .tip { font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; display: block; }
.contact-box input {
  width: 100%; padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: 15px; font-family: inherit; color: var(--ink);
  background: #fff; outline: none;
  transition: border-color .2s var(--ease-soft), box-shadow .2s var(--ease-soft);
}
.contact-box input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(62,122,103,.10); }

.answers-preview {
  text-align: left; margin-bottom: 24px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
}
.answers-preview summary {
  cursor: pointer; padding: 14px 18px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  background: #FCFAF7; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.answers-preview summary::-webkit-details-marker { display: none; }
.answers-preview summary::after { content: '▾'; color: var(--ink-4); transition: transform .2s; }
.answers-preview[open] summary::after { transform: rotate(180deg); }
.answers-preview .list { padding: 6px 18px 16px; max-height: 320px; overflow-y: auto; }
.answers-preview .item {
  display: flex; gap: 12px; padding: 9px 0;
  border-bottom: 1px dashed var(--line-2); font-size: 13.5px;
}
.answers-preview .item:last-child { border-bottom: none; }
.answers-preview .item .k { color: var(--ink-3); flex: none; min-width: 38px; font-variant-numeric: tabular-nums; }
.answers-preview .item .v { color: var(--ink); flex: 1; word-break: break-word; }

/* 感谢页的粒子 */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i {
  position: absolute; top: -20px;
  width: 8px; height: 8px; border-radius: 2px;
  opacity: 0;
  animation: fall 3.2s var(--ease-soft) forwards;
}
@keyframes fall {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg); }
  8%   { opacity: 1; }
  100% { opacity: 0; transform: translateY(105vh) rotate(420deg); }
}

/* ---------- 顶部进度退场 / 结束页淡出 ---------- */
.topbar.hide { opacity: 0; pointer-events: none; transition: opacity .4s var(--ease-soft); }

/* ---------- 骨架屏 / 加载 ---------- */
.loading { display: grid; place-items: center; height: 60vh; }
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 响应式 ---------- */
@media (max-width: 620px) {
  .viewport { padding: 2px 16px 30px; }
  .topbar { padding: 12px 16px 8px; }
  .brandmark span { display: none; }
  .q-card { padding: 26px 20px 22px; border-radius: var(--r-lg); }
  .q-title { font-size: 19px; }
  .hero h1 { font-size: 25px; }
  .hero-pouch { width: 118px; height: 118px; }
  .mx-head, .mx-row { grid-template-columns: minmax(0,1fr) repeat(var(--cols,4), 44px); gap: 4px; }
  .mx-label { font-size: 13px; }
  .mx-head .h { font-size: 10.5px; }
  .cell { height: 38px; }
  .mx-head { top: 56px; }
  .scale-dot { min-width: 0; height: 46px; font-size: 14px; }
  .btn { padding: 13px 18px; }
  .section-num { font-size: 52px; }
  .section-name { font-size: 21px; }
  .opt .key { display: none; }
}

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