/* ==========================================================
   心动坐标 · Heart Index
   ========================================================== */
:root {
  --ink: #17162b;
  --ink-2: #2b2a45;
  --muted: #6f6b82;
  --faint: #9b97ab;
  --paper: #fbf7fc;
  --card: rgba(255, 255, 255, .78);
  --card-solid: #fff;
  --line: rgba(23, 22, 43, .09);
  --line-strong: rgba(23, 22, 43, .16);
  --lav: #8b78f8;
  --lav-deep: #6a55ec;
  --lav-soft: #ece8ff;
  --rose: #f3a6c8;
  --rose-soft: #fde9f2;
  --blue: #2f6bff;
  --blue-soft: #e5edff;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(23, 22, 43, .04), 0 12px 40px -12px rgba(62, 45, 140, .16);
  --shadow-lg: 0 2px 4px rgba(23, 22, 43, .04), 0 30px 70px -24px rgba(62, 45, 140, .3);
  --sans: "Manrope", "Noto Sans SC", system-ui, sans-serif;
  --cn: "Noto Sans SC", "Manrope", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .75, .25, 1);
  --gutter: clamp(20px, 6vw, 96px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* ---------- 背景 ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.blob-a { width: 520px; height: 520px; background: #e6dcff; top: -160px; left: -120px; }
.blob-b { width: 460px; height: 460px; background: #ffd9ea; top: 20%; right: -160px; }
.blob-c { width: 420px; height: 420px; background: #dbe7ff; bottom: -180px; left: 30%; }

/* ---------- 通用 ---------- */
.eyebrow { display: flex; align-items: center; gap: 10px; font: 500 11px var(--mono); letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.eyebrow-line { width: 26px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--blue), var(--lav)); display: inline-block; }
.desktop-only { display: inline; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 700 14px var(--cn); cursor: pointer; text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.button span { font-size: 16px; transition: transform .25s var(--ease); }
.button:hover span { transform: translate(2px, -2px); }
.button-primary { background: var(--ink); color: #fff; box-shadow: 0 10px 24px -10px rgba(23, 22, 43, .6); }
.button-primary:hover { background: var(--lav-deep); transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(106, 85, 236, .7); }
.button-outline { background: rgba(255, 255, 255, .6); border-color: var(--line-strong); color: var(--ink); }
.button-outline:hover { border-color: var(--ink); background: #fff; transform: translateY(-2px); }
.button-lg { min-height: 56px; padding: 0 28px; font-size: 15px; }

.text-button { border: 0; background: none; cursor: pointer; font: 600 13px var(--cn); color: var(--muted); padding: 8px 4px; transition: color .2s; }
.text-button:hover { color: var(--ink); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 68px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(251, 247, 252, .72); backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 15px var(--cn); }
.brand-en { font: 500 10px var(--mono); letter-spacing: .12em; color: var(--faint); margin-left: 8px; }
.brand-mark { width: 20px; height: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; transform: rotate(-12deg); }
.brand-mark span { border-radius: 3px; background: var(--blue); }
.brand-mark span:nth-child(2) { background: var(--lav); }
.brand-mark span:nth-child(3) { background: var(--rose); }
.brand-mark span:nth-child(4) { background: var(--ink); }
.top-meta { display: flex; align-items: center; gap: 8px; font: 500 12px var(--cn); color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ccf8e; box-shadow: 0 0 0 4px rgba(60, 207, 142, .16); }
.top-divider { color: var(--faint); }
.top-link { color: var(--ink); text-decoration: none; font: 600 13px var(--cn); }
.top-link span { color: var(--lav-deep); margin-left: 3px; }

/* ---------- 首页 ---------- */
.hero {
  min-height: min(calc(100vh - 68px), 860px); max-width: 1320px; margin: 0 auto;
  padding: 64px var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 64px; align-items: center;
}
.hero h1 { font: 900 clamp(44px, 5.6vw, 80px)/1.12 var(--cn); letter-spacing: -.03em; margin: 26px 0 22px; }
.hero h1 span { background: linear-gradient(100deg, var(--lav-deep), #c066d8 60%, var(--rose)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-intro { font: 400 16px/1.95 var(--cn); color: var(--muted); margin: 0; max-width: 540px; }
.hero-intro b { color: var(--ink); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 30px; }
.hero-note { font: 13px var(--cn); color: var(--muted); }
.note-spark { color: var(--lav-deep); margin-right: 4px; }

/* 模式选择 */
.mode-field { border: 0; padding: 0; margin: 34px 0 0; min-width: 0; }
.mode-legend { display: flex; align-items: baseline; gap: 10px; padding: 0; margin-bottom: 12px; font: 600 12px var(--sans); letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.mode-legend-note { font: 400 12px var(--cn); letter-spacing: 0; text-transform: none; color: var(--faint); }
.mode-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 640px; }
.mode-option { position: relative; display: grid; gap: 5px; padding: 16px 16px 15px; text-align: left; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .62); backdrop-filter: blur(10px); cursor: pointer; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s, background .25s; }
.mode-option:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.mode-option:focus-visible { outline: 2px solid var(--lav-deep); outline-offset: 2px; }
.mode-option.active { border-color: var(--ink); background: #fff; box-shadow: 0 14px 28px -18px rgba(23, 22, 43, .55); }
.mode-option.active::after { content: "✳"; position: absolute; top: 12px; right: 14px; font-size: 11px; color: var(--lav-deep); }
.mode-head { display: flex; align-items: baseline; gap: 7px; }
.mode-head b { font: 800 17px var(--cn); }
.mode-head small { font: 10px var(--mono); letter-spacing: .12em; color: var(--faint); }
.mode-count { font: 600 12px var(--sans); color: var(--lav-deep); }
.mode-desc { font: 12px/1.5 var(--cn); color: var(--muted); }

.hero-facts { list-style: none; padding: 0; margin: 38px 0 0; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-facts li { padding: 14px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(10px); display: flex; align-items: baseline; gap: 8px; }
.hero-facts b { font: 800 24px var(--sans); }
.hero-facts span { font: 500 12px var(--cn); color: var(--muted); }

.orbit-scene { position: relative; width: min(100%, 440px); aspect-ratio: 1; justify-self: center; }
.orbit { position: absolute; border-radius: 50%; border: 1px solid var(--line-strong); inset: 0; }
.orbit-mid { inset: 14%; border: 1.5px solid rgba(139, 120, 248, .55); }
.orbit-inner { inset: 30%; border-style: dashed; animation: spin 40s linear infinite; }
.orbit-outer { background: radial-gradient(circle, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 70%); }
.orbit-axis { position: absolute; background: var(--line-strong); }
.axis-x { left: 0; right: 0; top: 50%; height: 1px; }
.axis-y { top: 0; bottom: 0; left: 50%; width: 1px; }
.orbit-point { position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff; box-shadow: var(--shadow); animation: pulse 3.2s ease-in-out infinite; }
.point-a { background: var(--blue); top: 20%; left: 64%; }
.point-b { background: var(--lav); top: 62%; left: 18%; animation-delay: .8s; }
.point-c { background: var(--rose); top: 72%; left: 70%; animation-delay: 1.6s; }
.orbit-center {
  position: absolute; inset: 39%; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-content: center; text-align: center; gap: 2px; font: 500 10px/1.3 var(--mono); letter-spacing: .1em;
  box-shadow: 0 0 0 10px rgba(139, 120, 248, .14), 0 20px 40px -12px rgba(23, 22, 43, .5);
  animation: breathe 5s ease-in-out infinite;
}
.center-star { font-size: 20px; color: var(--rose); }
.orbit-label { position: absolute; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font: 600 12px var(--cn); white-space: nowrap; }
.label-top { top: 3%; left: 50%; transform: translateX(-50%); }
.label-right { right: -4%; top: 50%; transform: translateY(-50%); }
.label-bottom { bottom: 3%; left: 50%; transform: translateX(-50%); }
.label-left { left: -4%; top: 50%; transform: translateY(-50%); }
.orbit-sticker {
  position: absolute; right: 6%; top: 8%; width: 76px; height: 76px; border-radius: 50%;
  background: var(--rose); color: var(--ink); display: grid; place-content: center; text-align: center;
  font: 500 11px/1.35 var(--cn); transform: rotate(12deg); box-shadow: var(--shadow); animation: float 4s ease-in-out infinite;
}
.orbit-sticker b { font-weight: 800; }

.under-hero, .source-section { max-width: 1320px; margin: 0 auto; padding: 72px var(--gutter); }
.under-hero { display: grid; grid-template-columns: 220px 1fr auto; gap: 48px; align-items: start; border-top: 1px solid var(--line); }
.section-index { font: 500 11px var(--mono); letter-spacing: .12em; color: var(--muted); }
.section-index span { color: var(--lav-deep); }
.under-copy h2 { font: 800 clamp(28px, 3vw, 38px)/1.3 var(--cn); margin: 0 0 16px; }
.under-copy p { font: 15px/1.95 var(--cn); color: var(--muted); margin: 0; max-width: 680px; }
.about-link { color: var(--ink); font: 600 14px var(--cn); text-decoration: none; white-space: nowrap; }
.about-link span { color: var(--lav-deep); }
.source-section { padding-top: 0; }
.source-heading { display: flex; justify-content: space-between; font: 500 11px var(--mono); letter-spacing: .12em; color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.source-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.source-columns > div { padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.source-columns h3 { font: 700 15px var(--cn); margin: 0 0 14px; }
.source-columns p { font: 13px/1.85 var(--cn); color: var(--muted); margin: 0 0 12px; }
.source-columns a { display: block; color: var(--ink); text-decoration: none; font: 600 13px/1.6 var(--sans); margin-bottom: 14px; }
.source-columns a span { font: 400 12px var(--cn); color: var(--muted); }
.source-columns a:hover { color: var(--lav-deep); }
.source-disclaimer { display: flex; gap: 14px; align-items: flex-start; }
.disclaimer-mark { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 700 13px var(--mono); }

.footer { max-width: 1320px; margin: 0 auto; padding: 28px var(--gutter) 40px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); font: 500 11px var(--mono); letter-spacing: .1em; color: var(--muted); }

/* ---------- 答题 ---------- */
.quiz-section { padding: 48px var(--gutter) 80px; min-height: min(calc(100vh - 68px), 960px); }
.quiz-shell {
  max-width: 980px; margin: 0 auto; padding: clamp(24px, 4vw, 48px);
  background: var(--card); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 32px; box-shadow: var(--shadow-lg);
}
.quiz-topline { display: flex; justify-content: space-between; align-items: center; }
.progress-row { display: flex; justify-content: space-between; margin: 28px 0 10px; font: 600 13px var(--sans); }
.progress-row span span { color: var(--faint); font-weight: 500; }
.progress-row em { margin-left: 10px; padding: 2px 9px; border-radius: 999px; background: rgba(139, 120, 248, .13); color: var(--lav-deep); font: 600 11px var(--cn); font-style: normal; vertical-align: 1px; }
#progress-percent { font-family: var(--mono); color: var(--lav-deep); }
.progress-track { height: 6px; border-radius: 6px; background: var(--lav-soft); overflow: hidden; }
#progress-bar { display: block; height: 100%; width: 100%; border-radius: inherit; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--blue), var(--lav), var(--rose)); transition: transform .5s var(--ease); }

.question-layout { display: grid; grid-template-columns: 150px 1fr; gap: 36px; margin-top: 44px; }
.question-count { display: flex; flex-direction: column; gap: 14px; }
#big-count { font: 800 76px/1 var(--sans); letter-spacing: -.04em; background: linear-gradient(160deg, var(--ink), var(--lav)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.question-count > span:last-child { font: 500 10px/1.6 var(--mono); letter-spacing: .12em; color: var(--faint); }
.question-kicker { display: inline-block; margin: 0; padding: 5px 12px; border-radius: 999px; background: var(--lav-soft); color: var(--lav-deep); font: 600 12px var(--cn); letter-spacing: .04em; }
.question-content h2 { font: 800 clamp(22px, 2.6vw, 30px)/1.45 var(--cn); margin: 16px 0 8px; }
.question-hint { margin: 0 0 26px; font: 13px var(--cn); color: var(--faint); }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer {
  position: relative; display: flex; align-items: center; gap: 14px; text-align: left;
  min-height: 76px; padding: 16px 18px; border-radius: 18px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); font: 500 15px/1.6 var(--cn);
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s, background .2s;
}
.answer:hover { border-color: rgba(139, 120, 248, .6); transform: translateY(-2px); box-shadow: var(--shadow); }
.answer-num { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); font: 600 12px var(--mono); color: var(--muted); transition: all .2s; }
.answer-text { flex: 1; }
.answer-check { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: all .2s; }
.answer.selected { border-color: var(--lav-deep); background: linear-gradient(135deg, #fff, var(--lav-soft)); box-shadow: 0 10px 24px -14px rgba(106, 85, 236, .8); }
.answer.selected .answer-num { background: var(--lav-deep); border-color: var(--lav-deep); color: #fff; }
.answer.selected .answer-check { border-color: var(--lav-deep); background: var(--lav-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.quiz-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.back-button { border: 0; background: none; cursor: pointer; font: 600 13px var(--cn); color: var(--ink); padding: 8px 0; }
.back-button:disabled { color: var(--faint); cursor: default; }
.keyboard-hint { font: 500 11px var(--mono); color: var(--faint); }

.question-layout.entering .question-content > * { animation: rise .45s var(--ease) both; }
.question-layout.entering .answers .answer { animation: rise .45s var(--ease) both; }
.question-layout.entering .answer:nth-child(2) { animation-delay: .04s; }
.question-layout.entering .answer:nth-child(3) { animation-delay: .08s; }
.question-layout.entering .answer:nth-child(4) { animation-delay: .12s; }
.question-layout.entering #big-count { animation: rise .45s var(--ease) both; }

/* ---------- 结果页 ---------- */
.result-section { padding: 36px var(--gutter) 80px; }
.result-wrap { max-width: 1180px; margin: 0 auto; display: grid; gap: 24px; }
.result-topline { display: flex; justify-content: space-between; align-items: center; }

.result-hero {
  display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(28px, 4vw, 56px); align-items: center;
  padding: clamp(22px, 3vw, 36px); border-radius: 32px; background: var(--card); backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.portrait-card { position: relative; margin: 0; }
.portrait-frame { aspect-ratio: 3 / 4; border-radius: 24px; overflow: hidden; background: linear-gradient(160deg, var(--lav-soft), var(--rose-soft)); box-shadow: 0 30px 60px -30px rgba(62, 45, 140, .55); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 1.2s var(--ease); }
.portrait-card:hover img { transform: scale(1.04); }
.portrait-rank { position: absolute; top: 16px; left: 16px; padding: 7px 12px; border-radius: 999px; background: rgba(23, 22, 43, .82); backdrop-filter: blur(8px); color: #fff; font: 500 11px var(--mono); letter-spacing: .12em; }
.portrait-card figcaption { display: flex; justify-content: space-between; margin-top: 12px; font: 500 10px var(--mono); letter-spacing: .12em; color: var(--faint); }

.result-copy h2 { font: 900 clamp(38px, 5vw, 64px)/1.1 var(--cn); letter-spacing: -.02em; margin: 16px 0 10px; }
.result-work { font: 500 14px var(--sans); color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.result-work span { color: var(--faint); }
.result-type { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.type-chip { padding: 6px 14px; border-radius: 999px; background: var(--ink); color: #fff; font: 700 12px var(--cn); }
.tag { padding: 6px 12px; border-radius: 999px; background: var(--lav-soft); color: var(--lav-deep); font: 600 12px var(--cn); }
.result-note { margin: 24px 0 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--rose); font: 500 16px/1.85 var(--cn); color: var(--ink-2); }
.score-block { display: flex; align-items: center; gap: 18px; margin-top: 26px; padding: 16px 20px; border-radius: 20px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); }
.score-ring {
  --p: calc(var(--score) * 1%);
  flex: none; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, #fff 78%, transparent 80% 100%), conic-gradient(var(--lav-deep) var(--p), var(--lav-soft) 0);
}
.score-ring strong { font: 800 26px var(--sans); letter-spacing: -.03em; }
.score-ring small { font-size: 13px; color: var(--muted); }
.score-text { display: grid; gap: 4px; }
.score-text b { font: 800 16px var(--cn); }
.score-text span { font: 13px var(--cn); color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-tile { padding: 20px 22px; border-radius: 22px; background: var(--card); backdrop-filter: blur(12px); border: 1px solid var(--line); display: grid; gap: 6px; }
.stat-tile span { font: 600 12px var(--cn); color: var(--muted); }
.stat-tile strong { font: 800 22px var(--cn); letter-spacing: -.01em; }
.stat-tile small { font: 12px/1.5 var(--cn); color: var(--faint); }

.report-card { padding: clamp(22px, 3vw, 36px); border-radius: 28px; background: var(--card); backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.section-head > div { display: flex; align-items: baseline; gap: 12px; }
.section-head .section-index { font: 500 12px var(--mono); color: var(--lav-deep); }
.section-head h3 { font: 800 24px var(--cn); margin: 0; }
.section-head p { margin: 0; max-width: 520px; font: 13px/1.8 var(--cn); color: var(--muted); text-align: right; }
.section-head.compact { margin-bottom: 18px; }

.portrait-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; }
.radar-wrap { display: grid; gap: 12px; justify-items: center; align-self: start; position: sticky; top: 96px; }
.radar-chart { width: 100%; max-width: 440px; overflow: visible; }
.radar-ring { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.radar-ring:last-of-type { fill: rgba(255, 255, 255, .6); }
.radar-spoke { stroke: var(--line); stroke-width: 1; }
.radar-label { font: 600 12px var(--cn); fill: var(--ink-2); }
.radar-shape { stroke-width: 2; stroke-linejoin: round; transform-origin: 200px 190px; }
.radar-match { fill: rgba(243, 166, 200, .28); stroke: #e57aa9; }
.radar-user { fill: rgba(106, 85, 236, .2); stroke: var(--lav-deep); }
.radar-dot-match { fill: #fff; stroke: #e57aa9; stroke-width: 2; }
.radar-dot-user { fill: var(--lav-deep); stroke: #fff; stroke-width: 1.5; }
.chart-legend { display: flex; gap: 20px; font: 600 12px var(--cn); color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend i { width: 12px; height: 12px; border-radius: 50%; }
.legend-user { background: var(--lav-deep); }
.legend-match { background: #fff; border: 2px solid #e57aa9; }

.axis-list { display: grid; gap: 18px; }
.axis-head { display: flex; justify-content: space-between; align-items: baseline; }
.axis-name b { font: 700 14px var(--cn); }
.axis-name small { font: 500 10px var(--mono); letter-spacing: .1em; color: var(--faint); margin-left: 8px; }
.axis-score { font: 800 18px var(--sans); }
.axis-score small { font-size: 11px; color: var(--muted); margin-left: 1px; }
.axis-track { position: relative; height: 8px; margin: 10px 0 6px; border-radius: 8px; background: linear-gradient(90deg, var(--blue-soft), var(--lav-soft), var(--rose-soft)); }
.axis-link { position: absolute; top: 0; bottom: 0; left: calc(var(--from) * 100%); width: calc((var(--to) - var(--from)) * 100%); background: rgba(106, 85, 236, .3); border-radius: 8px; }
.axis-dot { position: absolute; top: 50%; left: calc(var(--pos) * 100%); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; transition: left .9s var(--ease); }
.axis-dot-match { background: #fff; border: 2.5px solid #e57aa9; }
.axis-dot-user { background: var(--lav-deep); border: 2.5px solid #fff; box-shadow: 0 2px 8px rgba(106, 85, 236, .5); }
.axis-poles { display: flex; justify-content: space-between; font: 11px var(--cn); color: var(--faint); }

.analysis-lead { margin: 0 0 24px; font: 700 clamp(17px, 1.8vw, 20px)/1.8 var(--cn); color: var(--ink); max-width: 900px; }
.highlight-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.highlight { padding: 18px 20px; border-radius: 18px; background: linear-gradient(145deg, #fff, var(--lav-soft)); border: 1px solid var(--line); display: grid; gap: 8px; }
.highlight span { font: 500 11px var(--mono); letter-spacing: .06em; color: var(--muted); }
.highlight strong { font: 800 20px var(--cn); }
.highlight i { display: block; height: 4px; border-radius: 4px; background: rgba(106, 85, 236, .12); position: relative; overflow: hidden; }
.highlight i::after { content: ""; position: absolute; inset: 0; width: var(--strength); border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--lav-deep)); }
.analysis-copy { columns: 2; column-gap: 40px; }
.analysis-copy p { break-inside: avoid; margin: 0 0 20px; font: 14px/1.95 var(--cn); color: var(--ink-2); }
.analysis-copy b { display: block; font: 700 12px var(--cn); color: var(--lav-deep); margin-bottom: 4px; letter-spacing: .04em; }

.reason-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.reason-item { padding: 20px; border-radius: 20px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; transition: transform .25s var(--ease), box-shadow .25s; }
.reason-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.reason-top { display: flex; justify-content: space-between; align-items: center; }
.reason-number { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: #fff; font: 600 12px var(--mono); }
.reason-score { font: 700 12px var(--sans); color: var(--lav-deep); }
.reason-item h4 { margin: 4px 0 0; font: 800 17px var(--cn); }
.reason-item p { margin: 0; font: 13px/1.85 var(--cn); color: var(--muted); }
.reason-friction { background: linear-gradient(160deg, #fff, var(--rose-soft)); }
.reason-friction .reason-number { background: #e57aa9; }
.reason-friction .reason-score { color: #c9528a; }

.result-columns { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; }
.ranking-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank-item {
  width: 100%; display: grid; grid-template-columns: 28px 48px 1fr 110px; align-items: center; gap: 14px;
  padding: 10px 14px 10px 12px; border-radius: 16px; border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left;
  transition: background .2s, border-color .2s;
}
.rank-item:hover { background: #fff; border-color: var(--line); }
.rank-item.active { background: #fff; border-color: var(--lav); box-shadow: 0 8px 20px -14px rgba(106, 85, 236, .8); }
.rank-no { font: 600 12px var(--mono); color: var(--faint); }
.rank-item.active .rank-no { color: var(--lav-deep); }
.rank-item img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; object-position: top; background: var(--lav-soft); }
.rank-name { display: grid; gap: 2px; min-width: 0; }
.rank-name b { font: 700 14px var(--cn); }
.rank-name small { font: 12px var(--cn); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-score { display: grid; gap: 6px; }
.rank-score b { font: 800 14px var(--sans); text-align: right; }
.rank-score i { height: 4px; border-radius: 4px; background: var(--lav-soft); position: relative; overflow: hidden; }
.rank-score i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: linear-gradient(90deg, var(--lav), var(--lav-deep)); border-radius: inherit; }

.dossier-desc { margin: 0 0 20px; font: 14px/1.9 var(--cn); color: var(--ink-2); }
.character-facts { margin: 0; display: grid; }
.character-facts div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.character-facts dt { font: 600 12px var(--cn); color: var(--faint); }
.character-facts dd { margin: 0; font: 500 13px/1.6 var(--cn); }
.character-facts a { color: var(--lav-deep); text-decoration: none; font-weight: 600; }
.character-facts a:hover { text-decoration: underline; }
.result-source { text-align: center; margin: 8px 0 0; font: 12px var(--cn); color: var(--faint); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 13px var(--cn); box-shadow: var(--shadow-lg);
  transition: opacity .3s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 动效 ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 10px rgba(139, 120, 248, .14), 0 20px 40px -12px rgba(23, 22, 43, .5); } 50% { box-shadow: 0 0 0 18px rgba(139, 120, 248, .08), 0 20px 40px -12px rgba(23, 22, 43, .5); } }
@keyframes float { 0%, 100% { transform: rotate(12deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-8px); } }
@keyframes grow { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }

.hero-copy > * { animation: rise .7s var(--ease) both; }
.hero-copy > *:nth-child(2) { animation-delay: .06s; }
.hero-copy > *:nth-child(3) { animation-delay: .12s; }
.hero-copy > *:nth-child(4) { animation-delay: .18s; }
.hero-copy > *:nth-child(5) { animation-delay: .24s; }
.orbit-scene { animation: rise 1s .1s var(--ease) both; }

.motion-ready .under-hero, .motion-ready .source-section { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.motion-ready .under-hero.is-visible, .motion-ready .source-section.is-visible { opacity: 1; transform: none; }

.result-wrap > * { opacity: 0; transform: translateY(18px); }
.result-section.is-ready .result-wrap > * { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.result-section.is-ready .result-wrap > *:nth-child(2) { transition-delay: .05s; }
.result-section.is-ready .result-wrap > *:nth-child(3) { transition-delay: .15s; }
.result-section.is-ready .result-wrap > *:nth-child(4) { transition-delay: .22s; }
.result-section.is-ready .result-wrap > *:nth-child(n+5) { transition-delay: .28s; }
.result-section.is-ready .radar-shape { animation: grow .9s .3s var(--ease) both; }
.result-section.is-ready .radar-user { animation-delay: .45s; }
.result-section.is-ready .score-ring { animation: grow .7s .2s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .reason-grid { grid-template-columns: repeat(2, 1fr); }
  .portrait-grid { grid-template-columns: 1fr; gap: 28px; }
  .radar-wrap { position: static; }
  .result-columns { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .top-meta { display: none; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; min-height: 0; }
  .orbit-scene { width: min(82vw, 360px); order: -1; }
  .under-hero { grid-template-columns: 1fr; gap: 20px; }
  .source-columns { grid-template-columns: 1fr; }
  .question-layout { grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
  .question-count { flex-direction: row; align-items: flex-end; }
  #big-count { font-size: 52px; }
  .result-hero { grid-template-columns: 1fr; }
  .portrait-card { max-width: 340px; width: 100%; justify-self: center; }
  .result-copy { text-align: left; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-head p { text-align: left; }
  .highlight-row { grid-template-columns: 1fr; }
  .analysis-copy { columns: 1; }
}
@media (max-width: 600px) {
  .desktop-only { display: none; }
  .brand-en { display: none; }
  .mode-picker { grid-template-columns: 1fr; gap: 10px; }
  .mode-option { grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; padding: 14px 15px; }
  .mode-head { grid-row: span 2; }
  .mode-desc { grid-column: 2; }
  .answers { grid-template-columns: 1fr; }
  .answer { min-height: 64px; }
  .keyboard-hint { display: none; }
  .quiz-section, .result-section { padding-left: 14px; padding-right: 14px; }
  .quiz-shell, .result-hero { border-radius: 24px; }
  .stat-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-tile { padding: 16px; }
  .stat-tile strong { font-size: 18px; }
  .reason-grid { grid-template-columns: 1fr; }
  .rank-item { grid-template-columns: 22px 42px 1fr 64px; gap: 10px; }
  .rank-item img { width: 42px; height: 42px; }
  .label-left, .label-right { display: none; }
  .footer { flex-direction: column; align-items: flex-start; }
  .result-actions .button { flex: 1 1 auto; }
}
