/* 人格画像 · 移动端（蓝本 light 主题）
 * 令牌与《主题映射规则-v1.md》§8.1 一致 */
:root {
  --bg: #FBFAF7;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text2: #5C5C5C;
  --text3: #9B9B9B;
  --accent: #1A4480;
  --accent-soft: #DCE6F5;
  --key: #C0392B;
  --border: #E5E1D7;
  --track: #E5E1D7;
  --shadow: 0 2px 8px rgba(26, 68, 128, .08);
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); }
body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text); font-size: 15px; line-height: 1.6;
}
#app { max-width: 430px; margin: 0 auto; min-height: 100vh; background: var(--bg); }
.screen { display: none; padding: 20px 20px 32px; }
.screen.on { display: block; }

/* ---------- 通用 ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.btn {
  display: block; width: 100%; border: 0; border-radius: 12px; padding: 14px;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 600;
  font-family: inherit; cursor: pointer;
}
.btn:active { opacity: .85; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.muted { color: var(--text2); font-size: 13px; }
.fineprint { color: var(--text3); font-size: 11px; line-height: 1.7; }

/* ---------- 输入码 ---------- */
#screen-code { padding-top: 88px; text-align: center; }
.logo-mark { font-size: 44px; font-weight: 800; color: var(--accent); letter-spacing: 2px; }
.logo-sub { color: var(--text2); margin: 6px 0 40px; }
#code-input {
  width: 100%; padding: 14px; font-size: 18px; text-align: center; letter-spacing: 3px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  font-family: inherit; margin-bottom: 10px;
}
#code-err { color: var(--key); font-size: 12px; min-height: 18px; margin-bottom: 14px; }
.code-note { margin-top: 26px; color: var(--text3); font-size: 11px; }

/* ---------- 封面 ---------- */
#screen-cover { padding-top: 72px; }
.cover-title { font-size: 34px; font-weight: 800; line-height: 1.35; }
.cover-sub { color: var(--text2); font-size: 16px; margin-top: 14px; }
.cover-meta {
  display: flex; gap: 8px; margin: 26px 0 14px; flex-wrap: wrap;
}
.cover-meta span {
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 12px; color: var(--text2);
}
.privacy-bar {
  background: var(--card); border-radius: 12px; padding: 14px; font-size: 12px;
  color: var(--text2); border: 1px solid var(--border); margin-bottom: 26px;
}

/* ---------- 指导语 ---------- */
.guide-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }
.guide-item { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.guide-item i {
  flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-style: normal; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.guide-item p { font-size: 15px; }

/* ---------- 答题 ---------- */
#quiz-note:not(:empty) {
  background: var(--accent-soft, #DCE6F5); color: var(--accent); font-size: 12px;
  line-height: 1.6; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px;
}
#quiz-note:empty { display: none; }

.quiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#quiz-progress { font-size: 13px; color: var(--text2); font-variant-numeric: tabular-nums; }
.quiz-track { height: 4px; background: var(--track); border-radius: 2px; overflow: hidden; margin-bottom: 34px; }
#quiz-bar { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .25s; }
#quiz-stem { font-size: 22px; font-weight: 600; line-height: 1.5; margin-bottom: 30px; min-height: 66px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 15px; margin-bottom: 12px; font-size: 15px; font-family: inherit;
  color: var(--text); cursor: pointer; transition: all .15s;
}
.opt i {
  flex: 0 0 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border);
  font-style: normal; font-size: 12px; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
}
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt.sel i { background: var(--accent); border-color: var(--accent); color: #fff; }
#quiz-prev {
  margin-top: 8px; background: none; border: 0; color: var(--text2);
  font-size: 14px; font-family: inherit; cursor: pointer; padding: 8px 0;
}

/* ---------- 加载 ---------- */
#screen-loading { padding-top: 40vh; text-align: center; }
.spinner {
  width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; margin: 0 auto 18px; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loading-copy { color: var(--text2); font-size: 14px; }

/* ---------- 结果 ---------- */
.hero-chip {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 500; border-radius: 6px; padding: 4px 8px; margin-bottom: 10px;
}
#hero-label { font-size: 26px; font-weight: 800; line-height: 1.4; }
#hero-sub { color: var(--text2); font-size: 13px; margin-top: 8px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 600; }
.chip-soft {
  font-size: 10px; color: var(--text2); background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; padding: 3px 7px;
}
#radar-box { display: flex; justify-content: center; }
.radar-note { color: var(--text3); font-size: 11px; line-height: 1.7; margin-top: 12px; }

.dim-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dim-name { flex: 0 0 60px; font-size: 13px; font-weight: 500; }
.dim-track { flex: 1; height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.dim-track i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.dim-val { flex: 0 0 26px; text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dim-val.key { color: var(--key); }

#boundary {
  display: none; background: #FDF6EC; border: 1px solid #F0E3C8; border-left: 4px solid #E0A800;
  border-radius: 12px;
  padding: 14px; font-size: 13px; color: #7A5B1E; margin-bottom: 16px; line-height: 1.8;
}

/* 作答特征提示（软信号）：照常给分，只是如实告知。
   刻意用**信息蓝**而不是警示橙 —— 它不是「你做错了」，是「我们注意到这件事告诉你」。 */
#advisory { display: none; margin-bottom: 16px; }
.adv-item {
  background: #EEF3FA; border: 1px solid #D7E3F2; border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 14px; margin-bottom: 10px;
}
.adv-item:last-child { margin-bottom: 0; }
.adv-title { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.adv-body { font-size: 13px; color: #46587A; line-height: 1.8; }

.locked-line { height: 12px; border-radius: 6px; background: #EDEAE3; margin-bottom: 10px; }
.locked-line.w2 { width: 68%; }
.lock-row { display: flex; align-items: center; gap: 6px; color: var(--key); font-size: 11px; font-weight: 500; margin-bottom: 10px; }
#paywall .card-title { margin-bottom: 12px; }
#unlock-note { text-align: center; color: var(--text3); font-size: 11px; margin-top: 10px; }

.facet-card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.facet-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.facet-name { font-size: 16px; font-weight: 700; }
.facet-val { font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; }
.facet-id { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.facet-mf { font-size: 14px; color: var(--text2); margin-bottom: 8px; }
.facet-advice { font-size: 13px; color: var(--accent); }
#combo-box { background: var(--accent); color: #fff; border-radius: var(--radius); padding: 22px; text-align: center; margin-bottom: 16px; }
.combo-label { font-size: 11px; opacity: .75; margin-bottom: 8px; letter-spacing: 2px; }
.combo-title { font-size: 22px; font-weight: 800; }

.result-actions { display: flex; gap: 12px; margin-top: 4px; }
.result-actions .btn { flex: 1; }
.btn-amber { background: #E0A800; color: #1A1A1A; }

/* ---------- 分享卡 ---------- */
#screen-share { padding: 20px; }
.share-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.share-head button { background: none; border: 0; font-size: 15px; color: var(--text2); font-family: inherit; cursor: pointer; }
#share-box { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
#share-box svg { display: block; width: 100%; height: auto; }
.share-actions { margin-top: 18px; }

/* ---------- 同意勾选（敏感个人信息单独同意） ---------- */
.consent-row {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  font-size: 12px; color: var(--text2); line-height: 1.6;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; margin-bottom: 6px;
}
.consent-row input { margin-top: 2px; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--accent); }
.consent-row a { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
#consent-err { color: var(--key); font-size: 12px; min-height: 18px; margin-bottom: 10px; }

/* ---------- 解锁 / 升级屏 ---------- */
#screen-upgrade { padding: 20px; }
#upgrade-input {
  width: 100%; padding: 14px; font-size: 18px; text-align: center; letter-spacing: 2px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  font-family: inherit; margin: 22px 0 10px; text-transform: uppercase;
}
#upgrade-err { color: var(--key); font-size: 12px; min-height: 18px; margin-bottom: 14px; }
#screen-result a { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- 右下角状态徽标（模式 + 联网状态） ---------- */
#mode-badge {
  position: fixed; right: 10px; bottom: 10px; z-index: 40;
  background: rgba(26,68,128,.82); color: #fff; font-size: 11px;
  padding: 5px 10px; border-radius: 999px; letter-spacing: .5px;
  pointer-events: none; font-family: inherit;
}

/* ---------- 版本选择 ---------- */
#screen-choose { padding: 56px 20px 40px; }
.choice {
  display: block; width: 100%; text-align: left; font-family: inherit; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); transition: border-color .15s;
}
.choice:not(.locked):hover { border-color: var(--accent); }
.choice .choice-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.choice .choice-name { font-size: 19px; font-weight: 700; color: var(--text1); }
.choice .choice-tag { font-size: 12px; color: var(--text2); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; }
.choice .choice-lock {
  margin-left: auto; font-size: 11px; color: var(--key); border: 1px solid currentColor;
  border-radius: 6px; padding: 2px 7px;
}
.choice .choice-desc { font-size: 14px; color: var(--text1); line-height: 1.6; }
.choice .choice-foot { font-size: 12px; color: var(--text3); line-height: 1.6; margin-top: 8px; }
.choice.locked { opacity: .55; }
.choice.locked .choice-name { color: var(--text2); }
.choice.recommended { border-color: var(--accent); border-width: 2px; }

/* 桌面预览：手机框 */
@media (min-width: 520px) {
  body { background: #EFEDE8; }
  #app { margin: 24px auto; border-radius: 28px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.12); min-height: calc(100vh - 48px); }
}
