/* 网页版样式：沿用小程序的配色和排版。每个测评的主题色通过 #app 上的 CSS 变量传入。 */
:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --fg: #2f3a34;
  --muted: #8a938d;
  --faint: #b9bfba;
  --line: #ebe8e0;
  --main: #6f8f7b;
  --soft: #e7efe8;
  --deep: #3f5a4a;
  --warn: #b3564a;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

[hidden] { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 12px;
  background: var(--bg);
}
.brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--fg);
  text-decoration: none;
}
.back {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 20px calc(48px + env(safe-area-inset-bottom, 0px));
}

a:focus-visible, button:focus-visible, input:focus-visible, .card:focus-visible, .option:focus-visible {
  outline: 2px solid var(--main);
  outline-offset: 2px;
}

/* 通用按钮 */
.btn {
  display: block;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 25px;
  background: var(--deep);
  color: #fff;
  font: inherit;
  font-size: 16px;
  letter-spacing: 2px;
  cursor: pointer;
}
.btn:active { opacity: 0.85; }
.btn:disabled { background: var(--faint); cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--deep);
  border: 1px solid var(--line);
  margin-top: 12px;
}
.link-btn {
  display: block;
  width: 100%;
  padding: 12px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.state {
  padding: 80px 0;
  text-align: center;
  color: var(--muted);
}
.state a { display: block; margin-top: 12px; color: var(--deep); }

/* ---------- 列表 ---------- */
.hero { padding: 12px 4px 24px; }
.hero-title { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: 1px; line-height: 1.4; }
.hero-sub { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

.card {
  display: flex;
  width: 100%;
  padding: 16px;
  margin-bottom: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 4px 16px rgba(63, 90, 74, 0.06);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.card.is-soon {
  background: transparent;
  box-shadow: none;
  border: 1px dashed var(--line);
  opacity: 0.7;
  cursor: default;
}
.card-art {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-right: 14px;
  border-radius: 12px;
  font-size: 28px;
  font-family: "Songti SC", "STSong", "SimSun", serif;
}
.card.is-locked .card-art { filter: grayscale(0.6); }
.card-body { flex: 1; min-width: 0; }
.card-cat { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.card-title { margin-top: 2px; font-size: 17px; font-weight: 600; line-height: 1.4; }
.card-sub { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.card-meta { font-size: 12px; color: var(--faint); }
.badge { flex: none; padding: 3px 12px; border-radius: 99px; font-size: 12px; letter-spacing: 1px; }
.badge.is-open { background: var(--deep); color: #fff; }
.badge.is-locked { background: #f3ece2; color: #8a6a44; }
.badge.is-soon { color: var(--faint); padding-right: 0; }

.footnote { margin-top: 28px; text-align: center; font-size: 12px; color: var(--faint); }

/* ---------- 测评页：卡密、引导、照片 ---------- */
.center { padding-top: 16px; text-align: center; }
.art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--main);
  font-size: 44px;
  font-family: "Songti SC", "STSong", "SimSun", serif;
}
.cat { font-size: 12px; color: var(--muted); letter-spacing: 3px; }
.title { margin: 6px 0 20px; font-size: 24px; font-weight: 600; letter-spacing: 2px; }
.text { margin: 0 0 12px; font-size: 15px; line-height: 1.9; color: #56625b; text-align: left; }
.tip { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.meta { margin: 24px 0 20px; font-size: 12px; color: var(--faint); }
.note { margin-top: 14px; font-size: 12px; color: var(--faint); }

.code-input {
  display: block;
  width: 100%;
  height: 52px;
  margin-bottom: 16px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  font: 17px/1 "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
}
.code-input::placeholder { color: var(--faint); letter-spacing: 1px; }

.photo-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 210px;
  height: 210px;
  margin: 12px auto 20px;
  border: 1px dashed var(--main);
  border-radius: 16px;
  background: var(--card) center / cover no-repeat;
  overflow: hidden;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.photo-plus { font-size: 40px; line-height: 1.2; color: var(--main); }
.consent { display: flex; align-items: flex-start; margin-bottom: 18px; text-align: left; cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin: 3px 8px 0 0; accent-color: var(--deep); }
.consent span { font-size: 12px; line-height: 1.7; color: var(--muted); }

/* ---------- 答题 ---------- */
.progress { display: flex; align-items: center; padding-top: 4px; }
.progress-bar { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--main); transition: width 0.3s ease; }
.progress-text { flex: none; width: 56px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.question { min-height: 96px; margin: 36px 0 24px; font-size: 20px; font-weight: 600; line-height: 1.6; }
.option {
  display: block;
  width: 100%;
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.option:hover { background: var(--soft); }
.option.is-picked { background: var(--soft); border-color: var(--main); color: var(--deep); }
.actions { margin-top: 24px; }

/* ---------- 报告 ---------- */
.notice {
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid #ecc9bb;
  border-radius: 14px;
  background: #fbefe9;
  color: #6b3a2c;
}
.notice-heading { font-size: 15px; font-weight: 600; }
.notice-body { margin: 6px 0 8px; font-size: 13px; line-height: 1.8; }
.notice-item { font-size: 14px; line-height: 2; font-weight: 600; }

.cover {
  padding: 28px 20px 24px;
  border-radius: 18px;
  background: linear-gradient(165deg, var(--soft) 0%, #ffffff 100%);
  text-align: center;
}
.cover-label { font-size: 12px; color: var(--muted); letter-spacing: 4px; }
.cover-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  margin: 20px auto;
  border: 1px solid var(--main);
  border-radius: 50%;
  color: var(--deep);
  font-size: 60px;
  line-height: 1;
  font-family: "Songti SC", "STSong", "SimSun", serif;
}
.cover-title { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: 2px; color: var(--deep); text-wrap: balance; }
.cover-tagline { margin: 8px 0 0; font-size: 14px; color: #56625b; }
.keywords { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.keyword {
  margin: 4px;
  padding: 3px 14px;
  border: 1px solid var(--soft);
  border-radius: 99px;
  background: #fff;
  font-size: 12px;
  color: var(--deep);
  letter-spacing: 1px;
}

.block { margin-top: 28px; padding: 0 4px; }
.heading { display: flex; align-items: center; margin: 0 0 12px; font-size: 15px; font-weight: 600; letter-spacing: 2px; color: var(--deep); }
.heading::before { content: ""; width: 18px; height: 1px; margin-right: 10px; background: var(--main); }
.para { margin: 0; font-size: 14px; line-height: 2; color: #47524c; text-align: justify; }
.para + .para { margin-top: 12px; }

.dim { display: flex; align-items: center; margin-top: 10px; }
.dim-label { flex: none; min-width: 28px; margin-right: 8px; font-size: 14px; color: var(--muted); }
.dim-label.is-main { color: var(--deep); font-weight: 600; }
.dim-bar { flex: 1; height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.dim-fill { height: 100%; border-radius: 8px; background: var(--faint); }
.dim-fill.is-main { background: var(--main); }
.dim-value { flex: none; min-width: 48px; margin-left: 6px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.bullets { margin: 0; padding: 0; list-style: none; }
.bullets li { position: relative; padding-left: 16px; font-size: 14px; line-height: 2; color: #47524c; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--main); }

.quote { margin-top: 32px; padding: 20px 20px 24px; border-radius: 14px; background: var(--card); text-align: center; }
.quote-mark { height: 28px; font: 40px/1 Georgia, serif; color: var(--main); }
.quote-text { margin: 0; font-size: 15px; line-height: 1.9; letter-spacing: 1px; color: var(--deep); }
.tested { margin: 24px 0 16px; text-align: center; font-size: 12px; color: var(--faint); }
.disclaimer { margin-top: 24px; font-size: 12px; line-height: 1.8; color: var(--faint); text-align: center; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(47, 58, 52, 0.45);
}
.dialog { width: 100%; max-width: 320px; border-radius: 14px; background: var(--card); text-align: center; overflow: hidden; }
.dialog-title { padding: 22px 20px 0; font-size: 16px; font-weight: 600; }
.dialog-body { padding: 10px 22px 22px; font-size: 14px; color: var(--muted); white-space: pre-line; }
.dialog-ok { display: block; width: 100%; height: 48px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: 16px; color: var(--deep); cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
