/* 米白底、深灰正文、每只动物一种辅助色。移动端优先，兼容小红书/微信内置浏览器。 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #f7f3ec; color: #33302b;
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
main { max-width: 520px; margin: 0 auto; padding: 20px 18px calc(32px + env(safe-area-inset-bottom)); }
[hidden] { display: none !important; }
h1 { font-size: 26px; line-height: 1.35; margin: 6px 0 8px; }
h2 { font-size: 20px; line-height: 1.45; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 0 0 10px; }
p { margin: 0 0 10px; }
a { color: inherit; }
.link { color: #8a5a2b; text-decoration: none; }
.center { text-align: center; }
.muted { color: #8c857a; }
.small { font-size: 13px; }
.view.center { padding-top: 30vh; }

.card { background: #fff; border-radius: 16px; padding: 18px; margin: 0 0 14px; box-shadow: 0 1px 0 #ebe4d8; }

.btn {
  display: block; width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none;
}
.btn.primary { background: #33302b; color: #fff; }
.btn.ghost { background: #fff; color: #33302b; border-color: #ddd5c7; }
.btn:disabled { opacity: .35; cursor: default; }
.stack .btn { margin-top: 10px; }

/* 首页 */
.hero { text-align: center; padding: 18px 0 8px; }
.brand { color: #8a5a2b; font-size: 14px; letter-spacing: 2px; margin: 0; }
.sub { color: #6d665c; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 20px; background: #efe6d6; font-size: 13px; color: #6d5a3f; }
.animals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 6px; }
.animal-chip { background: #fff; border-radius: 12px; padding: 10px 2px 6px; text-align: center; border-top: 3px solid #ddd; }
.animal-chip .emoji { font-size: 30px; line-height: 1.2; }
.animal-chip .name { font-size: 12px; color: #5d574e; }
.sample { position: relative; margin-top: 12px; }
.sample-tag { position: absolute; top: 12px; right: 12px; font-size: 12px; color: #a39a8c; border: 1px solid #ddd5c7; border-radius: 6px; padding: 0 6px; }
.sample-name { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.sample-list { margin: 10px 0 0; padding-left: 20px; color: #6d665c; font-size: 14px; }
.redeem .label { display: block; font-weight: 600; margin-bottom: 8px; }
.redeem input[type=text], #code-input {
  width: 100%; padding: 13px 14px; font-size: 18px; letter-spacing: 1px; border: 1px solid #ddd5c7; border-radius: 12px;
  background: #fbf9f5; font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase;
}
.check { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 8px; font-size: 14px; color: #5d574e; }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.note { font-size: 13px; color: #8c857a; }
.error { color: #b5473a; font-size: 14px; min-height: 1em; }

/* 说明页 */
.intro-list { padding-left: 20px; margin: 0 0 12px; }
.intro-list li { margin-bottom: 8px; }

/* 答题 */
.progress { height: 6px; background: #e8e0d2; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.progress-fill { height: 100%; width: 0; background: #33302b; transition: width .25s; }
.progress-text { font-size: 13px; color: #8c857a; margin: 6px 0 12px; }
.question { padding: 22px 18px; }
.hint { font-size: 13px; color: #a39a8c; margin-bottom: 6px; }
.q-text { font-size: 19px; font-weight: 600; margin-bottom: 18px; }
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: block; width: 100%; text-align: left; padding: 13px 16px; font: inherit; color: #33302b;
  background: #fbf9f5; border: 1.5px solid #e6dfd2; border-radius: 12px; cursor: pointer;
}
.opt.selected { border-color: #33302b; background: #fff; font-weight: 600; }
.opt.na { margin-top: 6px; font-size: 14px; color: #6d665c; background: transparent; border-style: dashed; }
.opt.na.selected { color: #33302b; border-style: solid; }
.nav-row { display: flex; gap: 10px; margin-top: 4px; }
.nav-row .btn { flex: 1; }
.nav-row .btn.ghost { flex: 0 0 34%; }

.big-emoji { font-size: 46px; margin: 4px 0; }

#toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: rgba(40, 37, 33, .92); color: #fff; padding: 9px 18px; border-radius: 22px; font-size: 14px; z-index: 30;
  max-width: 86%; text-align: center;
}

/* 报告 */
.r-head { text-align: center; padding: 26px 18px 20px; border-top: 6px solid #ddd; }
.r-head .lead { color: #8c857a; margin: 0; }
.r-emoji { font-size: 64px; line-height: 1.2; margin: 8px 0 4px; }
.r-name { font-size: 26px; font-weight: 800; margin: 0; }
.r-sub { font-size: 17px; font-weight: 600; margin: 2px 0 10px; }
.r-text { font-size: 16px; }
.r-score { display: inline-block; padding: 3px 12px; border-radius: 20px; background: #f3ede2; font-size: 14px; margin: 4px 0 8px; }
.r-also { color: #6d665c; font-size: 15px; }
.r-note { font-size: 13px; color: #a39a8c; margin: 10px 0 0; }
.section-title { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.bar { margin: 0 0 10px; }
.bar-top { display: flex; justify-content: space-between; font-size: 14px; }
.bar-track { height: 8px; background: #f0eadf; border-radius: 4px; overflow: hidden; margin-top: 3px; }
.bar-fill { height: 100%; border-radius: 4px; background: #c9b9a0; }
.bar.main .bar-top { font-weight: 700; }
.recovery { background: #f4f8fb; }
.evidence { margin: 0; padding: 0; list-style: none; }
.evidence li { padding: 10px 12px; background: #faf7f1; border-radius: 10px; margin-bottom: 8px; font-size: 15px; }
.evidence .ans { font-weight: 700; }
.actions { margin: 0; padding: 0; list-style: none; counter-reset: a; }
.actions li { position: relative; padding: 10px 12px 10px 42px; background: #faf7f1; border-radius: 10px; margin-bottom: 8px; }
.actions li::before {
  counter-increment: a; content: counter(a); position: absolute; left: 12px; top: 11px;
  width: 22px; height: 22px; border-radius: 50%; background: #33302b; color: #fff; font-size: 13px; text-align: center; line-height: 22px;
}
.help-card { background: #fdf6ee; border: 1px solid #f0dcc4; }
.disclaimer { font-size: 12px; color: #a39a8c; text-align: center; margin: 18px 0 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.chip { padding: 6px 12px; border-radius: 18px; border: 1px solid #ddd5c7; background: #fff; font: inherit; font-size: 14px; color: #5d574e; cursor: pointer; }
.chip.selected { background: #33302b; border-color: #33302b; color: #fff; }
textarea.fb-text { width: 100%; min-height: 70px; padding: 10px; font: inherit; font-size: 15px; border: 1px solid #ddd5c7; border-radius: 10px; background: #fbf9f5; }

/* 身份卡弹层 */
.overlay { position: fixed; inset: 0; background: rgba(30, 28, 25, .78); z-index: 20; overflow-y: auto; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
.overlay-inner { max-width: 420px; margin: 0 auto; }
.overlay img { display: block; width: 100%; border-radius: 12px; background: #fff; }
.overlay .tip { color: #fff; text-align: center; margin: 12px 0; font-size: 15px; }
.overlay .row { display: flex; gap: 10px; justify-content: center; color: #fff; font-size: 14px; align-items: center; margin-bottom: 12px; }
.overlay .row input { width: 18px; height: 18px; }

/* 图鉴、帮助页 */
.page-head { padding: 10px 0 6px; }
.back { display: inline-block; margin-bottom: 8px; color: #8a5a2b; text-decoration: none; font-size: 14px; }
.g-card { border-left: 5px solid #ddd; }
.g-card .g-top { display: flex; align-items: center; gap: 12px; }
.g-card .emoji { font-size: 40px; line-height: 1; }
.g-card .quote { color: #6d665c; font-size: 14px; margin-top: 8px; }
.g-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.g-subs span { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #f3ede2; color: #6d5a3f; }
.doc h2 { font-size: 18px; margin-top: 6px; }
.doc ul { padding-left: 20px; }
