:root {
  --brand: #5B8C5A;
  --brand-deep: #3F6B41;
  --brand-light: #EAF1E6;
  --gold: #C8A96A;
  --bg: #F7F4ED;
  --card: #FFFFFF;
  --text: #2F3B32;
  --sub: #6E7A70;
  --weak: #A0A9A1;
  --line: #EAE4D8;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px calc(32px + env(safe-area-inset-bottom));
  min-height: 100vh;
}

.view { display: none; }
.view.is-active { display: block; animation: fade .22s ease both; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 品牌头 ---------- */
.brand { display: flex; align-items: center; gap: 14px; padding: 8px 2px 26px; }

.seal {
  width: 54px; height: 54px; flex: 0 0 54px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(91, 140, 90, .26);
}

.brand-text h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--brand-deep);
}

.brand-text p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--sub);
  line-height: 1.5;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 14px rgba(63, 107, 65, .055);
}

.card-title {
  margin: 0 0 14px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  padding-left: 10px;
  border-left: 3px solid var(--brand);
  line-height: 1.2;
}

/* ---------- 数据条 ---------- */
.stats { display: flex; align-items: center; padding: 16px 0; }
.stat { flex: 1; text-align: center; }
.stat b { display: block; font-size: 21px; font-weight: 600; color: var(--brand-deep); line-height: 1.2; }
.stat span { font-size: 11.5px; color: var(--sub); }
.stat-sep { width: 1px; height: 26px; background: var(--line); }

/* ---------- 按钮 ---------- */
.btn {
  width: 100%;
  height: 50px;
  border-radius: 25px;
  border: none;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s ease, background .15s ease;
  padding: 0;
}

.btn:active { opacity: .82; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand-deep); border: 1px solid var(--brand); }
.btn:disabled { opacity: .45; cursor: default; }

#btn-start { margin: 4px 0 18px; }

/* ---------- 说明 ---------- */
.intro-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.intro-row:last-child { margin-bottom: 0; }

.intro-row i {
  width: 18px; height: 18px; flex: 0 0 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-deep);
  font-size: 11.5px;
  font-style: normal;
  display: flex; align-items: center; justify-content: center;
}

.intro-row p { margin: 0; font-size: 13.5px; color: var(--sub); }

.disclaimer {
  margin: 18px 0 0;
  padding: 13px 15px;
  background: #FBF7EC;
  border: 1px solid #EFE6CE;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: #8A7B55;
}

/* ---------- 答题 ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 4px 2px 20px; }

.bar { flex: 1; height: 5px; border-radius: 3px; background: #E6E1D5; overflow: hidden; }
.bar-inner { height: 100%; width: 0; border-radius: 3px; background: var(--brand); transition: width .25s ease; }
.count { font-size: 12px; color: var(--sub); min-width: 52px; text-align: right; }

.qcard {
  background: var(--card);
  border-radius: 16px;
  padding: 24px 20px;
  min-height: 150px;
  box-shadow: 0 2px 14px rgba(63, 107, 65, .055);
  margin-bottom: 16px;
}

.qno { font-size: 11.5px; letter-spacing: 1px; color: var(--gold); }
.qtext { margin: 8px 0 0; font-size: 18px; font-weight: 500; line-height: 1.55; }
.qhint { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--weak); display: none; }
.qhint.is-on { display: block; }

.options { margin-bottom: 18px; }

.opt {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  height: 54px;
  padding: 0 18px;
  margin-bottom: 9px;
  background: var(--card);
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.opt .dot {
  width: 19px; height: 19px; flex: 0 0 19px;
  border-radius: 50%;
  border: 1.5px solid #D5D0C4;
  display: flex; align-items: center; justify-content: center;
}

.opt .dot::after {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0;
  transition: opacity .15s ease;
}

.opt.is-on { border-color: var(--brand); background: #F3F8F1; color: var(--brand-deep); }
.opt.is-on .dot { border-color: var(--brand); }
.opt.is-on .dot::after { opacity: 1; }

.footer { display: flex; gap: 10px; }
.btn-prev { width: 112px; flex: 0 0 112px; }
.btn-next { flex: 1; width: auto; }

/* ---------- 结果 ---------- */
.hero {
  border-radius: 18px;
  padding: 26px 22px;
  color: #fff;
  background: var(--brand-deep);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  right: -50px; top: -50px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}

.hero-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .18);
  font-size: 11.5px;
}

.hero-name { margin: 10px 0 0; font-size: 30px; font-weight: 600; letter-spacing: 3px; }
.hero-score { margin: 4px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .8); }
.hero-score b { font-size: 17px; color: #F3E6C4; }
.hero-def {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .92);
}

.tip {
  padding: 14px 16px;
  background: #FBF7EC;
  border: 1px solid #EFE6CE;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #7D6C43;
}

.advice-row { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 9px; }
.advice-row:last-child { margin-bottom: 0; }
.advice-row .bdot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--gold); margin-top: 8px; }
.advice-row p { margin: 0; font-size: 13.5px; color: var(--sub); line-height: 1.7; }

.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.legend span { font-size: 11px; color: var(--weak); }

.score-row { margin-bottom: 13px; }
.score-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.score-name { font-size: 13.5px; }
.score-right { display: flex; align-items: baseline; gap: 8px; }
.score-level { font-size: 11px; padding: 1px 7px; border-radius: 5px; background: var(--brand-light); color: var(--brand-deep); }
.score-level.is-ref { background: #FBF3DE; color: #A88B48; }
.score-val { font-size: 13.5px; font-weight: 600; color: var(--brand-deep); min-width: 28px; text-align: right; }

.track { height: 7px; border-radius: 4px; background: #EDEAE1; overflow: hidden; }
.fill { height: 100%; width: 0; border-radius: 4px; transition: width .55s ease; }

.ref-note {
  margin: 10px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--weak);
}

.timeline { margin: 14px 0 0; text-align: center; font-size: 11.5px; color: var(--weak); }

.actions { display: flex; gap: 10px; margin-top: 20px; }
.actions .btn-ghost { width: 118px; flex: 0 0 118px; }
.actions .btn-primary { flex: 1; width: auto; }

@media (max-width: 360px) {
  .app { padding-left: 14px; padding-right: 14px; }
  .hero-name { font-size: 26px; }
  .qtext { font-size: 17px; }
}
