/* ══════════════════════════════════════════════════════════
   RoleLens · 科技感视觉系统 v2
   基底：深空 #070B14 / 面板 #0F1626 / 双霓虹（青 → 紫）
   原则：深底高对比、发光只给焦点、网格只做气氛、数据可读优先
   ══════════════════════════════════════════════════════════ */
:root {
  --bg: #070b14;
  --bg-2: #0a0f1c;
  --surface: #0f1626;
  --surface-2: #131c2e;
  --ink: #f2f6ff;
  --ink-2: #d3dded;
  --ink-3: #93a3bc;
  --ink-4: #5d6b84;
  --line: #1c2740;
  --line-2: #17223a;
  --accent: #22d3ee;
  --accent-soft: #67e8f9;
  --accent-2: #8b5cf6;
  --accent-2-soft: #a78bfa;
  --accent-deep: #04121c;
  --warn: #ff8a5c;
  --grad: linear-gradient(90deg, #22d3ee, #8b5cf6);
  --glow-cyan: 0 0 22px rgba(34, 211, 238, 0.45);
  --glow-violet: 0 0 22px rgba(139, 92, 246, 0.45);
  --radius-card: 20px;
  --radius-btn: 14px;
  --maxw: 480px;
  --pad: 20px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* {
  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);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  /* 环境氛围光：左上冷青 + 右中紫，固定不随滚动 */
  background-color: var(--bg);
  background-image:
    radial-gradient(520px 380px at 8% -6%, rgba(34, 211, 238, 0.16) 0%, transparent 62%),
    radial-gradient(560px 460px at 104% 34%, rgba(139, 92, 246, 0.17) 0%, transparent 66%),
    radial-gradient(420px 360px at 0% 92%, rgba(34, 211, 238, 0.06) 0%, transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* 全屏科技网格底纹（很淡，只做气氛，不抢数据） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(148, 178, 220, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 178, 220, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 78%);
}

::selection { background: rgba(34, 211, 238, 0.28); color: #fff; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

#app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

@media (min-width: 481px) and (max-width: 768px) {
  :root { --maxw: 440px; }
}
@media (min-width: 769px) {
  :root { --maxw: 420px; }
  #app {
    box-shadow:
      0 0 0 1px rgba(34, 211, 238, 0.10),
      0 0 90px rgba(34, 211, 238, 0.06),
      0 0 160px rgba(139, 92, 246, 0.08);
    border-radius: 0;
  }
}

/* ── 通用 ── */
.screen {
  padding: 22px var(--pad) 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.screen.enter {
  animation: screenIn 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.btn-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 15px 18px;
  background: var(--grad);
  color: var(--accent-deep);
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-btn);
  letter-spacing: 0.01em;
  box-shadow: 0 8px 26px rgba(34, 211, 238, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 120ms ease, box-shadow 200ms ease, filter 160ms ease;
}
.btn-primary::after {
  content: "→";
  font-weight: 700;
  opacity: 0.85;
}
.btn-primary:active { transform: scale(0.985); filter: brightness(1.06); }
.btn-primary[disabled] {
  background: #1b2537;
  color: var(--ink-4);
  box-shadow: none;
  cursor: default;
}

.btn-ghost {
  display: block;
  width: 100%;
  padding: 13px;
  color: var(--ink-3);
  font-size: 14px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--line);
  background: rgba(15, 22, 38, 0.6);
  transition: border-color 160ms ease, color 160ms ease;
}
.btn-ghost:active { border-color: rgba(34, 211, 238, 0.4); color: var(--accent-soft); }

/* 二级入口：紫色描边（对应设计稿"继续上次"） */
.btn-resume {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-2-soft);
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.38);
  border-radius: 12px;
  text-align: center;
}
.btn-resume:active { background: rgba(139, 92, 246, 0.14); }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--mono);
}

.hint {
  font-size: 12px;
  color: var(--ink-4);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

/* 章节小标签：细线 + 双色胶囊（替代设计的 idx 数字） */
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── 品牌字 ── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-family: Inter, var(--font);
}
.brand .lens {
  position: relative;
  width: 26px;
  height: 18px;
}
.brand .lens::before,
.brand .lens::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}
.brand .lens::before {
  left: 0;
  background: rgba(34, 211, 238, 0.16);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.45);
}
.brand .lens::after {
  right: 0;
  border-color: var(--accent-2);
  background: rgba(139, 92, 246, 0.24);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45);
}
/* 品牌后缀小胶囊 */
.brand-tag {
  margin-left: 8px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--accent-soft);
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.30);
  border-radius: 6px;
}

/* ── Landing ── */
.landing { justify-content: space-between; }
.landing .top { padding-top: 6px; }

/* 顶部引导行：短线 + 等宽小字 */
.landing .eyebrow-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 40px;
}
.landing .eyebrow-row::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.7);
}
.landing .eyebrow-row span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.landing h1 {
  font-size: 37px;
  line-height: 1.28;
  font-weight: 800;
  margin: 14px 0 12px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.landing h1 em {
  font-style: normal;
  background: linear-gradient(96deg, #7decf9 0%, #22d3ee 42%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.42));
}
.landing .sub {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-3);
  margin: 0;
  letter-spacing: 0.01em;
}
.hero-graphic {
  display: flex;
  justify-content: center;
  margin: 8px 0 4px;
  flex: 1;
  align-items: center;
}
.landing .bottom { padding-bottom: 4px; }
.landing .foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  font-size: 11px;
  color: var(--ink-4);
  margin-top: 16px;
}
.landing .foot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1.2px solid var(--ink-4);
}
.resume-note {
  text-align: center;
  font-size: 11px;
  color: var(--accent-2-soft);
  margin-top: 9px;
  font-variant-numeric: tabular-nums;
}

/* ── Guide ── */
.guide-list {
  margin: 30px 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guide-item {
  display: flex;
  gap: 14px;
  padding: 16px 16px;
  border-radius: 14px;
  background: rgba(15, 22, 38, 0.82);
  border: 1px solid var(--line);
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.guide-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--grad);
}
.guide-item .num {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.30);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.guide-item p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-4);
  margin: 18px 0;
}
.privacy .dot-icon {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1.2px solid var(--ink-4);
  position: relative;
}
.privacy .dot-icon::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  background: var(--ink-4);
  opacity: 0.5;
}

/* ── Quiz ── */
.quiz { padding-top: 14px; }
.progress-wrap { padding: 8px 0 4px; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--ink-4);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.progress-meta b {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.progress-meta .meta-label {
  color: var(--ink-4);
  font-size: 11px;
  margin-left: 6px;
}
.progress-track {
  position: relative;
  height: 4px;
  background: var(--line-2);
  border-radius: 3px;
}
.progress-fill {
  position: relative;
  height: 100%;
  background: var(--grad);
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
  transition: width 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.progress-fill::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 999px;
  background: #ecfeff;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.95);
}
.phase-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent-2-soft);
  text-transform: uppercase;
}
.phase-tag::before {
  content: "";
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: var(--accent-2);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.7);
}
.q-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 0 18px;
}
.q-index {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.q-text {
  font-size: 23px;
  line-height: 1.55;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 24px;
  letter-spacing: -0.008em;
}
/* 题干下面的短霓虹线（设计稿里的装饰线） */
.q-text::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 16px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.75);
}
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 14px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  color: var(--ink-2);
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 200ms ease, transform 120ms ease;
}
.opt .tick {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.4px solid rgba(255, 255, 255, 0.22);
  position: relative;
  transition: border-color 140ms;
}
.opt .kbd {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-5);
  font-variant-numeric: tabular-nums;
}
.opt:active { transform: scale(0.99); }
.opt.selected {
  border-color: rgba(34, 211, 238, 1);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.16));
  color: #eaf9fe;
  font-weight: 700;
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.20), inset 0 0 18px rgba(34, 211, 238, 0.06);
}
.opt.selected .tick { border-color: var(--accent); }
.opt.selected .tick::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.95);
}
.opt.selected .kbd { color: var(--accent); }
.quiz-foot {
  padding-top: 10px;
  min-height: 46px;
  display: flex;
  align-items: center;
  margin-top: auto;
}
.prev-btn {
  color: var(--ink-4);
  font-size: 13px;
  padding: 8px 2px;
  transition: color 140ms;
}
.prev-btn:active { color: var(--accent-soft); }
.prev-btn:disabled { opacity: 0.35; }

.q-area.slide-in { animation: qIn 200ms ease-out; }
@keyframes qIn {
  from { opacity: 0; transform: translateX(26px); }
  to { opacity: 1; transform: none; }
}
.q-area.slide-back { animation: qBack 200ms ease-out; }
@keyframes qBack {
  from { opacity: 0; transform: translateX(-26px); }
  to { opacity: 1; transform: none; }
}

/* ── Bridge ── */
.bridge { justify-content: center; align-items: center; text-align: center; }
.bridge .half-lens {
  margin-bottom: 30px;
  filter: drop-shadow(0 0 26px rgba(34, 211, 238, 0.34));
}
.bridge h2 {
  font-size: 24px;
  line-height: 1.45;
  margin: 0 0 12px;
  font-weight: 800;
  color: var(--ink);
}
.bridge p {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-3);
  margin: 0 0 8px;
  max-width: 300px;
}
.bridge .tag-done {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid rgba(34, 211, 238, 0.30);
  margin-bottom: 26px;
}
.bridge .tag-done::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.9);
}
.bridge .btn-primary { margin-top: 34px; max-width: 320px; }

/* ── Loading ── */
.loading {
  justify-content: center;
  align-items: center;
  text-align: center;
}
.loading .lens-spin {
  margin-bottom: 34px;
  filter: drop-shadow(0 0 22px rgba(34, 211, 238, 0.30));
}
.loading .load-text {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-soft);
  min-height: 22px;
  letter-spacing: 0.06em;
}
.loading::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.6), transparent);
}

/* ── Result ── */
.result { padding: 18px var(--pad) 48px; }
.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section {
  margin-bottom: 24px;
}
.section-head {
  margin-bottom: 11px;
}
.section-head .idx {
  position: relative;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent-soft);
  padding-left: 14px;
}
.section-head .idx::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(34, 211, 238, 0.95);
}
.section-head .idx::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  width: 0;
  height: 0;
}
.card {
  position: relative;
  background: rgba(13, 20, 33, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px 16px;
  overflow: hidden;
}
/* 卡片顶部一道极细的霓虹渐隐线 */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.55), rgba(139, 92, 246, 0.35), transparent);
}

/* 人格卡：青紫双层辉光 */
.card-hero {
  padding: 18px 16px 16px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.13) 0%, rgba(139, 92, 246, 0.12) 100%),
    rgba(13, 20, 33, 0.94);
  border-color: rgba(34, 211, 238, 0.30);
  box-shadow: 0 12px 40px rgba(9, 16, 30, 0.9), inset 0 0 60px rgba(34, 211, 238, 0.05);
}
.card-hero::before { height: 0; }

.type-big {
  font-family: Inter, var(--font);
  font-size: 46px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  background: linear-gradient(120deg, #7decf9, #22d3ee 55%, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.45));
}
.type-nick {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.type-nick span {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent-2-soft);
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 6px;
  vertical-align: 2px;
  font-family: var(--font);
}
.type-img {
  margin: 12px 0 18px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
  padding-left: 12px;
  border-left: 2px solid rgba(34, 211, 238, 0.45);
}
.traits { margin: 0; padding: 0; list-style: none; }
.traits li {
  position: relative;
  padding-left: 15px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.traits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.85;
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.8);
}

.dim-bars { margin-top: 16px; }
.dim-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
}
.dim-row.is-zero .dim-bar,
.bar-track.is-zero { visibility: hidden; }
.dim-row .pole {
  font-family: Inter, var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-5);
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.04em;
}
.dim-row .pole i {
  display: block;
  font-family: var(--font);
  font-style: normal;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 1px;
}
.dim-row .pole.active { color: var(--accent); text-shadow: 0 0 12px rgba(34, 211, 238, 0.65); }
.dim-mid { min-width: 0; }
.dim-bar {
  position: relative;
  height: 5px;
  border-radius: 3px;
  background: var(--line-2);
}
.dim-bar .fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
  transition: width 560ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.dim-bar .fill.right { left: 50%; border-radius: 0 3px 3px 0; }
.dim-bar .fill.left { right: 50%; border-radius: 3px 0 0 3px; }
.dim-bar .mid-mark {
  position: absolute;
  left: 50%;
  top: -1px;
  width: 1px;
  height: calc(100% + 2px);
  background: rgba(255, 255, 255, 0.22);
  transform: translateX(-0.5px);
}
.dim-nums {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: var(--ink-5);
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.dim-nums span:first-child { font-weight: 700; color: var(--accent-soft); }
.dim-row .pole.active i { color: var(--accent-soft); }

.strength-note {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(34, 211, 238, 0.07);
  border: 1px solid rgba(34, 211, 238, 0.20);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--accent-soft);
}

.code-big {
  font-family: Inter, var(--font);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.12em;
  background: linear-gradient(120deg, #c4b5fd, #818cf8 50%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.45));
}
.code-sub {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.code-desc {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.78;
  color: var(--ink-2);
}
.dual-note {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(255, 138, 92, 0.08);
  border: 1px solid rgba(255, 138, 92, 0.22);
  font-size: 11.5px;
  color: #ffb08f;
  line-height: 1.65;
}

.bars { margin-top: 18px; display: flex; flex-direction: column; gap: 11px; }
.bar-row {
  display: grid;
  grid-template-columns: 68px 1fr 32px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.bar-row .name { color: var(--ink-2); font-weight: 500; }
.bar-row .name i {
  font-style: normal;
  font-size: 10.5px;
  color: var(--ink-5);
  margin-left: 5px;
  font-weight: 400;
}
/* 轨道用伪元素画底，避免 inline 元素高度不吃的问题 */
.bar-track {
  position: relative;
  display: block;
  height: 6px;
  border-radius: 4px;
  background: transparent;
}
.bar-track::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--line-2);
}
.bar-track .fill {
  position: relative;
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
  width: 0;
  transition: width 520ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.bar-track .fill.muted { background: rgba(139, 92, 246, 0.55); box-shadow: none; }
.bar-row .num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  font-weight: 600;
}
.bar-row.is-top .name { font-weight: 700; color: var(--ink); }
.bar-row.is-top .num { color: var(--accent); font-weight: 700; }

.radar-wrap {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 0 auto 8px;
  aspect-ratio: 1 / 1;
}
.radar-wrap canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
}
/* 图例现在挂在卡片头右侧（与设计稿一致） */
.radar-legend {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  font-size: 10px;
  color: var(--ink-4);
  margin-bottom: 6px;
}
.radar-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-right: 5px;
  vertical-align: 1px;
}
.radar-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.radar-card-head > span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.radar-card-head .radar-legend { margin: 0; }

.rank-list { display: flex; flex-direction: column; gap: 3px; }
.rank-row {
  display: grid;
  grid-template-columns: 22px 60px 1fr 30px;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 10px;
}
.rank-row .rk {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-5);
  font-variant-numeric: tabular-nums;
}
.rank-row .nm { font-size: 13px; color: var(--ink-2); }
.rank-row .sc {
  text-align: right;
  font-family: Inter, var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.rank-row .bar-track { height: 5px; }
.rank-row.top1 {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.14), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(34, 211, 238, 0.28);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.10);
  padding: 10px 8px;
}
.rank-row.top1 .nm { font-weight: 700; color: #eaf9fe; }
.rank-row.top1 .sc { color: var(--accent); }
.rank-row.top1 .rk { color: var(--accent); font-weight: 700; }

.role-card { margin-bottom: 14px; }
.role-card:last-child { margin-bottom: 0; }
.role-card.is-top1 {
  border-color: rgba(34, 211, 238, 0.30);
  box-shadow: 0 10px 34px rgba(8, 14, 26, 0.8), inset 0 0 50px rgba(34, 211, 238, 0.045);
}
.role-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.top-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-deep);
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 10px;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.5);
}
.top-badge.second {
  color: var(--accent-2-soft);
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: none;
}
.role-name { font-size: 21px; font-weight: 800; margin: 0; color: var(--ink); }
.role-sub { font-size: 11.5px; color: var(--ink-4); margin: 4px 0 0; }
.role-score {
  font-family: Inter, var(--font);
  font-size: 27px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
  flex: none;
}
.role-score small { font-size: 11px; color: var(--ink-5); font-weight: 400; text-shadow: none; }
.role-part { margin-top: 16px; }
.role-part h4 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.role-part h4::before {
  content: "";
  width: 2px;
  height: 11px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.7);
}
.role-part p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-2);
}
.role-part.pitfall h4::before { background: var(--warn); box-shadow: 0 0 8px rgba(255, 138, 92, 0.6); }
.branch-note {
  margin: 10px 0 14px;
  padding: 11px 13px;
  border-radius: 9px;
  background: rgba(255, 138, 92, 0.08);
  border: 1px solid rgba(255, 138, 92, 0.22);
  font-size: 12px;
  line-height: 1.7;
  color: #ffb08f;
}
.result-warn {
  margin-bottom: 14px;
  padding: 11px 13px;
  background: rgba(255, 138, 92, 0.08);
  border: 1px solid rgba(255, 138, 92, 0.24);
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.7;
  color: #ffb08f;
}

.share-box {
  text-align: center;
}
.share-preview {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 14px;
  background: #0a101d;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.share-preview canvas { display: block; width: 100%; height: auto; }
.share-tip { font-size: 11px; color: var(--ink-4); margin-top: 9px; line-height: 1.6; }

.disclaimer {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-5);
}
.result-foot {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.result-foot .btn-primary { flex: 1; font-size: 14px; padding: 13px; min-height: 48px; }
.result-foot .btn-ghost {
  width: auto;
  flex: none;
  padding: 13px 16px;
  color: var(--ink-3);
  font-size: 13px;
}

/* ── 弹窗 / Toast ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(10, 16, 29, 0.94);
  color: var(--ink);
  font-size: 13px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 22px rgba(34, 211, 238, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms, transform 180ms;
  z-index: 90;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* hero SVG 自适应 */
.hero-graphic svg { width: 100%; max-width: 340px; height: auto; display: block; }

/* Guide 头部与底部 */
.guide-head { margin: 34px 0 8px; }
.guide-head h2 { font-size: 27px; margin: 0 0 10px; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); }
.guide-head p { font-size: 14px; color: var(--ink-3); margin: 0; }
.guide-foot { margin-top: auto; padding-top: 24px; }
.guide .guide-list { margin: 24px 0 auto; }

/* 小屏收紧 */
@media (max-width: 380px) {
  .landing h1 { font-size: 31px; }
  .q-text { font-size: 20px; }
  .type-big { font-size: 42px; }
  :root { --pad: 16px; }
}

/* 结果页章节间的呼吸更紧一点，避免长页面过于松散 */
.section + .section { margin-top: 4px; }
.result .section-head .idx { white-space: nowrap; }
