:root {
  --bg: #FBF8F3;
  --card: #FFFFFF;
  --ink: #241F1B;
  --muted: #7A6F66;
  --line: rgba(36, 31, 27, 0.1);
  --accent: #6E5AA8;
  --accent-deep: #4E3F80;
  --accent-soft: #F0ECFA;
  --gold: #C08A4E;
  --gold-soft: #FBF1E4;
  --ok: #3F8F6B;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(36, 31, 27, 0.06);
  --font: "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
}

body { padding-bottom: 96px; }

a { color: var(--accent-deep); text-decoration: none; }

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── 通用 ── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 15px 20px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  color: var(--accent-deep);
  border: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 2px 10px;
}

.muted { color: var(--muted); }
.small { font-size: 12.5px; line-height: 1.6; }

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  margin: 0 6px 6px 0;
}
.tag.gold { background: var(--gold-soft); color: #8A5B22; }

/* ── 顶部 ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand b { font-size: 16px; letter-spacing: .02em; }
.brand span { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.toplink { font-size: 13px; color: var(--muted); }

/* ── 首页 ── */
.hero { padding: 12px 0 24px; }
.hero h1 {
  font-size: 27px;
  line-height: 1.42;
  margin: 14px 0 10px;
  font-weight: 700;
  letter-spacing: .01em;
}
.hero p { margin: 0; color: var(--muted); font-size: 14px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 22px 0;
}
.metric {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.metric b { display: block; font-size: 19px; font-weight: 700; }
.metric span { font-size: 12px; color: var(--muted); }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  margin: 28px 0 12px;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--accent);
}

.dimlist { display: grid; gap: 8px; }
.dimrow {
  display: flex;
  gap: 12px;
  align-items: baseline;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.dimrow i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  min-width: 20px;
}
.dimrow b { font-size: 14px; font-weight: 600; min-width: 66px; }
.dimrow span { font-size: 12.5px; color: var(--muted); }

.note {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--accent-deep);
  line-height: 1.7;
  margin: 18px 0;
}

.bottom-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, rgba(251, 248, 243, 0));
}
.bottom-cta .inner { max-width: 480px; margin: 0 auto; }

/* ── 弹窗 ── */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(36, 31, 27, .42);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
}
.mask.show { display: flex; }
.sheet {
  width: 100%;
  max-width: 480px;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
}
.sheet h3 { margin: 0 0 6px; font-size: 18px; }
.field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 14px;
  margin: 16px 0 10px;
}
.field input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 20px;
  letter-spacing: .18em;
  padding: 12px 0;
  color: var(--ink);
  text-transform: uppercase;
}
.field input::placeholder { letter-spacing: .06em; font-size: 15px; color: #B9AFA5; }
.tips { font-size: 12px; color: var(--muted); line-height: 1.9; margin: 0 0 18px; padding-left: 16px; }
.err {
  color: #C0392B;
  font-size: 12.5px;
  min-height: 18px;
  margin-bottom: 6px;
}

/* ── 答题 ── */
.progress {
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width .25s ease;
}
.qmeta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
}
.qstem {
  font-size: 20px;
  line-height: 1.6;
  font-weight: 600;
  margin: 0 0 22px;
  min-height: 64px;
}
.opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}
.opt em {
  font-style: normal;
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-top: 1px;
}
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt.on em { background: var(--accent); color: #fff; border-color: var(--accent); }

.qnav { display: flex; gap: 10px; margin-top: 20px; }
.qnav .btn { flex: 1; }

/* ── 报告 ── */
.report-head {
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 26px 26px;
  padding: 26px 20px 30px;
  margin: 0 -20px 18px;
}
.report-head .kicker { font-size: 11px; letter-spacing: .2em; opacity: .75; }
.report-head h1 { font-size: 22px; margin: 8px 0 4px; font-weight: 700; }
.report-head .meta { font-size: 12px; opacity: .8; }

.score-card { text-align: center; padding: 24px 18px; }
.ring {
  width: 108px;
  height: 108px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--accent-soft) 0);
}
.ring b {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  color: var(--accent-deep);
}
.score-card h2 { font-size: 22px; margin: 6px 0 8px; }
.score-card p { margin: 0; font-size: 13px; color: var(--muted); text-align: left; }

.blk { margin: 26px 0; }
.blk-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.blk-head b {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
}
.blk-head h3 { margin: 0; font-size: 16px; flex: 1; }
.blk-head span { font-size: 11.5px; color: var(--muted); }

.bars { display: grid; gap: 13px; }
.bar-row .bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13.5px;
  margin-bottom: 5px;
}
.bar-top b { font-weight: 600; }
.bar-top i { font-style: normal; font-size: 12px; color: var(--muted); }
.bar-track {
  height: 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
}
.bar-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.bar-row.high .bar-track i { background: var(--accent); }
.bar-row.mid .bar-track i { background: #A99BCB; }
.bar-row.low .bar-track i { background: #D6CFC4; }
.bar-desc { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.7; }

.quote {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 14px;
  font-size: 15px;
  color: #5C4A38;
  margin: 4px 0 14px;
  background: var(--gold-soft);
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
}
.warn {
  background: #FDF3E7;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: #7A4E1D;
  line-height: 1.75;
  margin: 12px 0;
}
.warn b { display: block; margin-bottom: 4px; }

.career {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--card);
}
.career b { font-size: 14.5px; }
.career .m { font-size: 13px; color: var(--accent-deep); font-weight: 600; }
.career p { grid-column: 1 / -1; margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.career .tags { grid-column: 1 / -1; margin-top: 4px; }

.plans { display: grid; gap: 10px; }
.plan-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.plan-item b { display: block; font-size: 13px; color: var(--accent-deep); margin-bottom: 6px; }
.plan-item ul { margin: 0; padding-left: 16px; }
.plan-item li { font-size: 13px; color: var(--muted); line-height: 1.8; }

.locked {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.locked b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 6px; }

.footer-note {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.9;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 28px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(36, 31, 27, .9);
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 99;
  max-width: 80vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 后台 ── */
.admin-grid { display: grid; gap: 12px; }
textarea, select, input[type="text"] {
  width: 100%;
  font-family: var(--font);
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--card);
  color: var(--ink);
  outline: none;
}
textarea { min-height: 120px; resize: vertical; letter-spacing: .04em; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
