/* ============================================================
   职业天赋测试 · 靛蓝 + 金色 + 浅灰白
   ============================================================ */
:root {
  --bg: #F5F6FB;
  --surface: #FFFFFF;
  --surface-2: #EEF0FA;
  --line: rgba(99,102,241,.14);
  --line-strong: rgba(99,102,241,.34);
  --txt: #1E1B4B;
  --muted: #63667C;
  --muted-2: #989BB0;
  --accent: #6366F1;
  --accent-soft: rgba(99,102,241,.10);
  --gold: #D49A2E;
  --radius: 18px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--txt); font-family: var(--font);
  font-size: 15px; line-height: 1.6; min-height: 100vh; min-height: 100dvh;
}
.app {
  position: relative; max-width: 480px; margin: 0 auto;
  padding: calc(30px + env(safe-area-inset-top)) 22px calc(40px + env(safe-area-inset-bottom));
  min-height: 100vh; min-height: 100dvh;
}
.screen { display: none; flex-direction: column; animation: fade .35s ease both; }
.screen.is-active { display: flex; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 通用 */
.btn { appearance: none; border: 0; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 700; border-radius: 14px; padding: 15px 18px; transition: transform .15s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { color: #fff; background: linear-gradient(135deg, #818CF8, #6366F1 55%, #4F46E5); box-shadow: 0 8px 20px rgba(99,102,241,.24); }
.btn-primary:disabled { opacity: .45; }
.btn-ghost { background: var(--surface-2); color: var(--accent); border: 1px solid var(--line); }
.btn-lg { width: 100%; padding: 18px; font-size: 16px; margin-top: 22px; }
.fineprint { color: var(--muted-2); font-size: 11px; text-align: center; margin: 20px 0 0; }

/* 封面 */
.gate-hero { text-align: center; }
.hero-mark {
  width: 96px; height: 96px; line-height: 96px; margin: 10px auto 22px;
  font-size: 44px; color: #fff; border-radius: 50%;
  background: linear-gradient(135deg, #818CF8, #4F46E5);
  box-shadow: 0 12px 30px rgba(99,102,241,.28);
}
.brandline { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.hero-title { font-size: 46px; line-height: 1.15; margin: 16px 0 0; font-weight: 900; letter-spacing: -.02em; }
.hero-title .hl { color: var(--accent); }
.hero-sub { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.hero-points { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 22px auto 0; max-width: 340px; }
.hero-points span { font-size: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: left; }
.hero-points b { color: var(--gold); font-family: ui-monospace, monospace; margin-right: 5px; }
.evidence-card { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.evidence-head { font-size: 12px; font-weight: 800; color: var(--accent); }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.evidence-item { text-align: center; background: var(--surface-2); border-radius: 10px; padding: 12px 4px; }
.evidence-item b { display: block; font-size: 20px; font-weight: 800; color: var(--accent); }
.evidence-item span { display: block; font-size: 10px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.evidence-note { font-size: 10px; color: var(--muted-2); text-align: center; margin: 12px 0 0; }

/* 门禁面板 */
.panel { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel-label { font-size: 13px; font-weight: 700; color: var(--txt); }
.input-row { display: flex; gap: 8px; margin-top: 12px; }
.code-input { flex: 1; min-width: 0; height: 52px; padding: 0 14px; background: var(--surface-2); color: var(--txt); border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 14px; letter-spacing: .06em; outline: none; }
.code-input:focus { border-color: var(--accent); }
.code-input::placeholder { color: var(--muted-2); }
.input-row .btn { height: 52px; padding: 0 16px; white-space: nowrap; }
.code-msg { font-size: 12px; margin: 10px 0 0; min-height: 16px; color: var(--muted); }
.code-msg.error { color: #DC2626; }
.demo-box { margin-top: 14px; }
.demo-toggle { width: 100%; background: transparent; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; display: flex; justify-content: space-between; padding: 8px; font-family: inherit; }
.demo-list { margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.demo-row { display: flex; justify-content: space-between; align-items: center; padding: 8px; border-bottom: 1px solid var(--line); font-size: 12px; }
.demo-row:last-child { border: 0; }
.demo-code { font-family: ui-monospace, monospace; font-weight: 700; color: var(--accent); cursor: pointer; }
.demo-note { color: var(--muted-2); }

/* 区块标题 */
.section-eyebrow { color: var(--accent); font-size: 10px; letter-spacing: .18em; font-weight: 800; }
.section-title { font-size: 30px; line-height: 1.28; margin: 10px 0 0; font-weight: 900; }
.section-title .hl { color: var(--accent); }
.section-lead { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

/* 信息采集 */
.profile-head { margin-bottom: 22px; }
.profile-lead { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.profile-field { margin-bottom: 20px; }
.profile-q { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.profile-q span { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; background: var(--accent); color: #fff; border-radius: 50%; font-size: 11px; margin-right: 8px; }
.profile-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-opt { padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; font-family: inherit; cursor: pointer; }
.profile-opt.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.profile-note { text-align: center; font-size: 11px; color: var(--muted-2); margin: 12px 0 0; }

/* 菜单 */
.mode-bar { display: flex; gap: 8px; margin: 18px 0 0; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.mode-btn { flex: 1; padding: 11px 8px; border: 0; background: transparent; border-radius: 9px; font-family: inherit; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.mode-btn.active { background: linear-gradient(135deg, #818CF8, #6366F1); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,.22); }
.ai-badge { margin-top: 14px; padding: 16px 18px; background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(212,154,46,.05)); border: 1px solid var(--line-strong); border-radius: 14px; }
.ai-badge-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--accent); }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ai-badge-body { font-size: 11px; color: var(--muted); line-height: 1.7; margin-top: 10px; }
.product-list { display: grid; gap: 12px; margin-top: 16px; }
.product-card { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; cursor: pointer; }
.product-card:active { transform: scale(.99); }
.product-glyph { width: 52px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--accent); font-size: 24px; }
.product-main { flex: 1; min-width: 0; }
.product-name { font-weight: 800; font-size: 16px; }
.product-desc { font-size: 11px; color: var(--muted); margin-top: 4px; }
.product-meta { font-size: 11px; color: var(--gold); margin-top: 6px; }
.product-badge { font-size: 10px; color: var(--gold); border: 1px solid var(--gold); border-radius: 6px; padding: 3px 7px; }
.product-arrow { color: var(--muted-2); }
.menu-preview { margin-top: 22px; padding: 20px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.menu-preview-title { font-size: 13px; font-weight: 800; color: var(--accent); text-align: center; }
.menu-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.mp-item { display: flex; gap: 10px; align-items: center; padding: 12px 10px; background: var(--surface-2); border-radius: 10px; }
.mp-item b { font-family: ui-monospace, monospace; color: var(--gold); font-size: 14px; }
.mp-item span { font-size: 11px; color: var(--muted); line-height: 1.5; }

/* 答题 */
.quiz-top { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; font-size: 18px; color: var(--txt); cursor: pointer; }
.quiz-counter { font-family: ui-monospace, monospace; font-size: 13px; font-weight: 700; color: var(--accent); }
.quiz-badge { margin-left: auto; font-size: 10px; color: var(--muted); }
.progress { height: 5px; background: var(--surface-2); border-radius: 4px; margin-top: 16px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #818CF8, #6366F1); width: 0; transition: width .3s; border-radius: 4px; }
.quiz-body { margin-top: 60px; }
.q-index { font-family: ui-monospace, monospace; font-size: 11px; color: var(--accent); letter-spacing: .12em; }
.q-text { font-size: 25px; line-height: 1.45; margin: 16px 0 30px; font-weight: 800; }
.options { display: grid; gap: 10px; }
.opt { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; font-family: inherit; color: var(--txt); cursor: pointer; text-align: left; }
.opt:active { border-color: var(--accent); background: var(--accent-soft); }
.quiz-hint { font-size: 11px; color: var(--muted-2); text-align: center; margin-top: 24px; }

/* 结果 */
.result-eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-align: center; }
.talent-hero { text-align: center; padding: 40px 0 20px; }
.talent-badge { display: inline-block; font-size: 11px; color: var(--gold); border: 1px solid var(--gold); border-radius: 20px; padding: 4px 12px; }
.talent-name { font-size: 40px; margin: 16px 0 0; font-weight: 900; }
.talent-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.talent-tag { font-size: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 5px 10px; }
.talent-who { font-size: 11px; color: var(--muted-2); margin-top: 12px; }
.talent-block { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-top: 16px; }
.tb-title { font-size: 14px; font-weight: 800; color: var(--accent); }
.tb-text { font-size: 13px; color: var(--txt); line-height: 1.75; margin: 12px 0 0; }
.tb-point, .tb-work { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tb-point b, .tb-work b { color: var(--gold); display: block; margin-bottom: 4px; }
.trap-block { border-color: rgba(220,38,38,.2); }
.trap-block .tb-title { color: #DC2626; }
.reveal-block { margin-top: 24px; padding: 22px; background: linear-gradient(135deg, #1E1B4B, #312E81); border-radius: 16px; }
.reveal-loss { font-size: 15px; color: #E0E7FF; line-height: 1.8; font-weight: 600; }
.reveal-hook { font-size: 12px; color: #FBBF24; line-height: 1.75; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.15); }
.share-text-wrap { margin-top: 24px; }
.share-text-wrap label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.share-textarea { width: 100%; min-height: 150px; resize: vertical; padding: 14px; background: var(--surface); color: var(--txt); border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 12px; line-height: 1.7; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.result-actions .btn { font-size: 13px; padding: 14px 8px; }
.result-actions .wide { grid-column: 1 / -1; }
.disclaimer-strip { margin-top: 18px; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; font-size: 11px; color: var(--muted-2); text-align: center; }

/* 转化卡 */
.resource-card { margin-top: 24px; padding: 18px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; }
.resource-tag { display: inline-block; font-size: 10px; font-weight: 800; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; padding: 3px 9px; }
.resource-title { font-size: 17px; font-weight: 800; margin-top: 12px; }
.resource-desc { font-size: 11px; color: var(--muted); margin-top: 7px; line-height: 1.6; }
.resource-body { display: flex; gap: 14px; align-items: center; margin-top: 14px; }
.resource-qr { width: 100px; height: 100px; flex: none; border-radius: 8px; background: #fff; padding: 4px; }
.resource-side { flex: 1; }
.resource-qr-hint { font-size: 11px; color: var(--accent); margin-bottom: 8px; }
.resource-btn { font-size: 13px; text-align: center; text-decoration: none; display: block; padding: 12px; }
.resource-hint { font-size: 10px; color: var(--muted-2); text-align: center; margin-top: 10px; }
.private-card { margin-top: 18px; padding: 18px; background: var(--surface); border: 1px solid rgba(212,154,46,.3); border-radius: 16px; text-align: center; }
.private-head { font-size: 15px; font-weight: 800; color: var(--gold); line-height: 1.6; }
.private-sub { font-size: 12.5px; color: var(--txt); line-height: 1.6; margin-top: 8px; font-weight: 600; }
.private-body { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px; background: var(--surface-2); border-radius: 10px; text-align: left; }
.private-qr { width: 92px; height: 92px; flex: none; border-radius: 6px; background: #fff; padding: 4px; }
.private-tip b { font-size: 13px; }

/* toast */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--txt); color: #fff; padding: 12px 20px; border-radius: 24px; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
