/* ==========================================================
   七宗罪 VS 七美德 —— 样式
   ========================================================== */
:root {
  --pink: #ec4899;
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --rose: #fb7185;
  --ink: #1f2437;
  --ink-2: #4b5563;
  --muted: #8b91a1;
  --card: rgba(255, 255, 255, 0.88);
  --line: rgba(196, 181, 253, 0.5);
  --shadow-sm: 0 4px 16px rgba(139, 92, 246, 0.08);
  --shadow-md: 0 10px 32px rgba(139, 92, 246, 0.12);
  --shadow-lg: 0 18px 50px rgba(139, 92, 246, 0.18);
  --radius: 22px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  background: #e9edff;
  -webkit-tap-highlight-color: transparent;
  font-size: clamp(15px, 4.1vw, 17px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  min-height: 100vh;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 500px at 15% -8%, #fce7f3 0%, rgba(252, 231, 243, 0) 60%),
    radial-gradient(800px 520px at 92% 8%, #e0e7ff 0%, rgba(224, 231, 255, 0) 55%),
    linear-gradient(180deg, #fdf4ff 0%, #f5f3ff 34%, #eef2ff 72%, #e4e9ff 100%);
  background-attachment: fixed;
}

img { max-width: 100%; }
button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
button:focus { outline: none; }
button:focus-visible { outline: 2px solid rgba(168, 85, 247, 0.35); outline-offset: 2px; }

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 26px 20px 48px;
  position: relative;
}

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fade-in { animation: fadeIn 0.5s ease-out both; }
.qfade { animation: qFade 0.26s ease-out both; }
@keyframes qFade {
  from { opacity: .35; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.rise { animation: rise 0.6s cubic-bezier(.2,.8,.25,1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 首页 ---------- */
.hero {
  text-align: center;
  padding-top: 6px;
}

.hero-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 36px;
  line-height: 1;
  background: linear-gradient(145deg, #f9a8d4 0%, #c084fc 48%, #818cf8 100%);
  box-shadow: 0 14px 40px rgba(168, 85, 247, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  position: relative;
}
.hero-icon::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.28), rgba(192, 132, 252, 0) 70%);
  z-index: -1;
  animation: breathe 3.6s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(.94); opacity: .7; }
  50% { transform: scale(1.08); opacity: 1; }
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 2.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #ec4899 0%, #a855f7 45%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: -4px auto 16px;
  max-width: 22em;
  padding: 0 6px;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #8b91a1;
}
.hero-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(233, 213, 255, 0.9);
  color: #7c6f9c;
  line-height: 1.4;
}
.pill.pink {
  background: linear-gradient(135deg, #fbcfe8, #f5d0fe);
  border-color: transparent;
  color: #be185d;
  font-weight: 600;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.meta {
  padding: 13px 6px 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(233, 213, 255, 0.7);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.06);
}
.meta-label {
  display: block;
  font-size: 0.67rem;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.meta-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #7c3aed;
}

.intro {
  padding: 20px 20px 18px;
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--ink-2);
}
.intro p {
  margin: 0 0 12px;
  text-align: justify;
  text-justify: inter-ideograph;
  text-wrap: pretty;
}
.intro p:last-child { margin-bottom: 0; }
.intro .sin { color: #db2777; font-weight: 600; }
.intro .virtue { color: #4f46e5; font-weight: 600; padding-left: 0.16em; }
.intro .nm { white-space: nowrap; font-weight: inherit; }
.intro .nb { white-space: nowrap; }

.btn-start {
  position: relative;
  width: 100%;
  margin-top: 18px;
  padding: 17px 20px;
  border: 0;
  border-radius: 18px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: linear-gradient(135deg, #f9a8d4 0%, #c084fc 52%, #818cf8 100%);
  box-shadow: 0 12px 34px rgba(192, 132, 252, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
  overflow: hidden;
}
.btn-start::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.38), rgba(255,255,255,0));
  transform: skewX(-18deg);
  animation: sweep 4.2s ease-in-out infinite;
}
@keyframes sweep {
  0%, 62% { left: -60%; }
  92%, 100% { left: 130%; }
}
.btn-start:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(192, 132, 252, 0.5); filter: saturate(1.05); }
.btn-start:active { transform: translateY(0) scale(.995); }
.btn-start .arrow { display: inline-block; margin-left: 6px; transition: transform .25s ease; }
.btn-start:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px auto 0;
  padding: 9px 16px;
  font-size: 0.8rem;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #e9e5f5;
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-ghost:hover { color: #7c3aed; border-color: #d8cff5; background: #fff; }

.section-hint {
  margin: 30px 0 14px;
  text-align: center;
  font-size: 0.74rem;
  color: #9ca3af;
  letter-spacing: 0.04em;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}
.test-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 13px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(233, 213, 255, 0.65);
  border-radius: 16px;
  cursor: pointer;
  transition: all .22s ease;
  text-align: left;
}
.test-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #ddd6fe; }
.test-emoji {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  font-size: 15px;
  border-radius: 8px;
  background: linear-gradient(145deg, #f5f3ff, #ede9fe);
}
.test-title { display: block; font-size: 0.82rem; font-weight: 700; color: #374151; line-height: 1.4; }
.test-sub { display: block; margin-top: 3px; font-size: 0.68rem; color: #9ca3af; line-height: 1.4; }

.foot-link {
  margin-top: 26px;
  text-align: center;
  font-size: 0.8rem;
  color: #8b5cf6;
  font-weight: 600;
  text-decoration: none;
  display: block;
  padding: 8px;
}
.foot-note {
  margin-top: 22px;
  text-align: center;
  font-size: 0.66rem;
  color: #a9aebd;
  line-height: 1.7;
}

/* ---------- 答题页 ---------- */
.exam-shell {
  -webkit-user-select: none;
  user-select: none;
  min-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.exam-head { text-align: center; }
.exam-head h1 {
  margin: 0 0 16px;
  font-size: 1.45rem;
  font-weight: 800;
  background: linear-gradient(100deg, #ec4899, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  overflow: hidden;
  border: 1px solid rgba(233, 213, 255, 0.6);
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f472b6, #a855f7, #818cf8);
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}
.progress-text {
  display: block;
  margin: 10px 0 24px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7c3aed;
  letter-spacing: 0.02em;
}

.question {
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.75;
  color: #1f2937;
  text-align: center;
  margin: 0 0 22px;
  padding: 0 4px;
  min-height: 3.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.q-card { padding: 22px 18px; }

.likert-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
}
.likert-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 2px;
  border-radius: 18px;
  outline: none !important;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.likert-item:focus,
.likert-item:focus-visible { outline: none; }
.likert-item:focus-visible .likert-dot {
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.16);
}
.likert-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ede9fe;
  border: 2px solid #c1b4fa;
  display: grid;
  place-items: center;
  transition: all .2s ease;
  position: relative;
}
.likert-dot::after {
  content: "";
  width: 0;
  height: 0;
  border-radius: 50%;
  background: #fff;
  transition: all .2s ease;
}
.likert-item:active .likert-dot {
  transform: scale(0.9);
  border-color: #a78bfa;
}
.likert-item:hover .likert-dot { transform: translateY(-2px); border-color: #a78bfa; box-shadow: 0 6px 16px rgba(139, 92, 246, 0.2); }
.likert-label {
  font-size: 0.66rem;
  color: #8b91a1;
  line-height: 1.35;
  text-align: center;
  transition: color .2s ease;
}
.likert-item.active .likert-dot {
  background: linear-gradient(145deg, #f472b6, #a855f7);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.42);
  transform: translateY(-2px) scale(1.04);
  animation: dotPulse 0.55s ease-out;
}
@keyframes dotPulse {
  0% { box-shadow: 0 8px 20px rgba(168, 85, 247, 0.42), 0 0 0 0 rgba(168, 85, 247, 0.30); }
  100% { box-shadow: 0 8px 20px rgba(168, 85, 247, 0.42), 0 0 0 13px rgba(168, 85, 247, 0); }
}
.likert-item.active .likert-dot::after { width: 12px; height: 12px; }
.likert-item.active .likert-label { color: #7c3aed; font-weight: 600; }

.binary-list { display: flex; flex-direction: column; gap: 11px; }
.binary-btn {
  width: 100%;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  padding: 15px 17px;
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.6;
  font-weight: 500;
  color: #374151;
  background: #fefefe;
  border: 2px solid #e4e6ea;
  border-radius: 15px;
  cursor: pointer;
  transition: all .2s ease;
}
.binary-btn:hover { border-color: #c4b5fd; background: #faf8ff; transform: translateY(-1px); }
.binary-btn:active { transform: scale(0.99); border-color: #a78bfa; }
.binary-btn:focus,
.binary-btn:focus-visible { outline: none; }
.binary-btn:focus-visible { box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.14); }
.binary-btn.active {
  border-color: #a78bfa;
  background: linear-gradient(135deg, #faf5ff, #f5f3ff);
  color: #5b21b6;
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.16);
  font-weight: 600;
}

.exam-nav { display: flex; gap: 11px; margin-top: 22px; }
.nav-btn {
  flex: 1;
  padding: 15px;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  transition: all .2s ease;
}
.nav-btn:hover:not(:disabled) { border-color: #ddd6fe; color: #6d28d9; background: #fdfcff; }
.nav-btn:disabled { color: #cbd0da; cursor: not-allowed; }
.nav-btn.primary {
  background: linear-gradient(135deg, #f9a8d4, #c084fc 55%, #818cf8);
  color: #fff;
  border: 0;
  box-shadow: 0 10px 26px rgba(192, 132, 252, 0.35);
}
.nav-btn.primary:disabled {
  background: #efe9fb;
  color: #b9b1cf;
  box-shadow: none;
}

.exam-hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.7rem;
  color: #a2a7b5;
}

/* ---------- 结果页 ---------- */
.topbar { display: flex; align-items: center; padding: 2px 0 12px; }
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 13px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #ece7f8;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.06);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.back-home:hover { color: #7c3aed; border-color: #ddd6fe; background: #fff; }
.back-home:active { transform: scale(0.97); }

.cta-slot { margin: 14px 0 2px; }
.cta-slot .btn-primary { width: 100%; }
.cta-hint {
  margin: 9px 0 0;
  text-align: center;
  font-size: 0.66rem;
  line-height: 1.6;
  color: #a2a7b5;
}

.result-head { text-align: center; padding: 2px 0 4px; }
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: #7c3aed;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #e9d5ff;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.result-title {
  margin: 0 0 8px;
  font-size: 2.05rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, #ec4899 0%, #a855f7 50%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.result-sub {
  font-size: 0.82rem;
  color: #7c8095;
  margin: 0 0 18px;
}
.result-sub b { color: #6d28d9; font-weight: 700; }

.indices {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 2px 0 12px;
}
.idx { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.idx-num {
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.idx-num.sin { color: #e11d74; }
.idx-num.virtue { color: #4f46e5; }
.idx-lbl { font-size: 0.64rem; color: #8b91a1; letter-spacing: 0.06em; }
.idx-divider {
  width: 1px;
  height: 30px;
  background: linear-gradient(180deg, transparent, #ecdcff, transparent);
}

.balance-bar {
  margin-top: 2px;
  height: 10px;
  border-radius: 999px;
  background: #eef0ff;
  overflow: hidden;
  display: flex;
  border: 1px solid #e9e5f5;
}
.balance-bar i {
  display: block;
  height: 100%;
  transition: width .9s cubic-bezier(.25, .8, .3, 1);
}
.balance-bar i.sin { background: linear-gradient(90deg, #f9a8d4, #ec4899); }
.balance-bar i.virtue { background: linear-gradient(90deg, #a5b4fc, #6366f1); }
.balance-tip {
  margin-top: 9px;
  margin-bottom: 4px;
  font-size: 0.7rem;
  color: #8b91a1;
  text-align: center;
}

/* 罪恶之首 / 美德之首 */
.duel {
  margin-top: 14px;
  padding: 18px 14px 16px;
  background: linear-gradient(158deg, rgba(255, 246, 251, 0.94), rgba(255, 255, 255, 0.94) 46%, rgba(244, 246, 255, 0.96));
}
.duel-head {
  text-align: center;
  font-size: 0.63rem;
  letter-spacing: 0.16em;
  color: #b0a7c6;
  margin-bottom: 13px;
}
.duel-body { display: flex; align-items: flex-start; gap: 2px; }
.duel-side { flex: 1; min-width: 0; text-align: center; }
.duel-frame {
  width: 116px;
  height: 116px;
  margin: 0 auto 2px;
  display: grid;
  place-items: center;
  position: relative;
}
.duel-frame::before {
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  z-index: 0;
}
.duel-frame.sin::before {
  background: radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.92) 26%, rgba(255, 205, 231, 0.72) 52%, rgba(255, 205, 231, 0) 68%);
}
.duel-frame.virtue::before {
  background: radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.92) 26%, rgba(205, 214, 255, 0.75) 52%, rgba(205, 214, 255, 0) 68%);
}
.duel-frame img {
  position: relative;
  z-index: 1;
  width: 136%;
  height: 132%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(80, 60, 120, 0.14));
}
.duel-frame .ph {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #f9a8d4, #c084fc);
}
.duel-role { font-size: 0.6rem; letter-spacing: 0.12em; margin-bottom: 3px; }
.duel-role.sin { color: #db2777; }
.duel-role.virtue { color: #4f46e5; }
.duel-name { font-size: 1rem; font-weight: 800; letter-spacing: 0.01em; }
.duel-name.sin { color: #be185d; }
.duel-name.virtue { color: #4338ca; }
.duel-name span { font-size: 0.64rem; font-weight: 700; margin-left: 5px; opacity: 0.55; }
.duel-tag { margin-top: 3px; font-size: 0.63rem; line-height: 1.5; color: #9aa0af; }
.duel-vs { align-self: center; margin-top: -26px; }
.duel-vs span {
  display: inline-block;
  padding: 4px 7px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #c4b5fd;
  background: #fff;
  border: 1px solid #f0e9ff;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.tag-row { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-bottom: 20px; }
.tag {
  font-size: 0.68rem;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #ece7f8;
  color: #6b7280;
}
.tag b { color: #7c3aed; font-weight: 700; }

.block { margin-top: 16px; padding: 20px 18px; }
.block-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 14px;
}
.block-title h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #2c3145;
  letter-spacing: 0.01em;
}
.block-title h2::before {
  content: "";
  display: inline-block;
  width: 4px; height: 14px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: -2px;
  background: linear-gradient(180deg, #f472b6, #8b5cf6);
}
.block-title .aside { font-size: 0.66rem; color: #a2a7b5; }

.legend { display: flex; gap: 14px; justify-content: center; margin: 14px 0 2px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 0.66rem; color: #8b91a1; }
.legend i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.legend i.sin { background: #ec4899; }
.legend i.virtue { background: #6366f1; }

.radar-wrap { display: flex; justify-content: center; }
.radar-wrap svg { width: 100%; max-width: 360px; height: auto; overflow: visible; }
.radar-poly {
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: radarIn .85s cubic-bezier(.2, .9, .25, 1) both;
}
@keyframes radarIn {
  from { transform: scale(.25); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 七组拉锯 */
.pair-list { display: flex; flex-direction: column; gap: 15px; }
.pair { }
.pair-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  margin-bottom: 6px;
}
.pair-head .names { color: #4b5563; font-weight: 700; }
.pair-head .names .sin { color: #db2777; }
.pair-head .names .divider { color: #c9c5d8; font-weight: 400; margin: 0 1px; }
.pair-head .names .virtue { color: #4f46e5; }
.pair-head .verdict { color: #9aa0af; font-size: 0.66rem; }
.pair-bars { display: flex; flex-direction: column; gap: 4px; }
.pair-bar {
  height: 7px;
  border-radius: 999px;
  background: #f1f0f7;
  overflow: hidden;
}
.pair-bar i { display: block; height: 100%; border-radius: 999px; transition: width .8s ease-out; }
.pair-bar.sin i { background: linear-gradient(90deg, #fbcfe8, #ec4899); }
.pair-bar.virtue i { background: linear-gradient(90deg, #c7d2fe, #6366f1); }

/* 维度列表 */
.dim-list { display: flex; flex-direction: column; gap: 2px; }
.dim-item { border-bottom: 1px solid #f4f1fb; }
.dim-item:last-child { border-bottom: 0; }
.dim-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dim-rank {
  width: 20px;
  flex: 0 0 20px;
  font-size: 0.66rem;
  color: #c0c4d0;
  font-variant-numeric: tabular-nums;
}
.dim-name {
  width: 3.4em;
  flex: 0 0 3.4em;
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
}
.dim-name.sin { color: #be185d; }
.dim-name.virtue { color: #4338ca; }
.dim-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #f2f0f9;
  overflow: hidden;
}
.dim-bar i { display: block; height: 100%; border-radius: 999px; transition: width .85s cubic-bezier(.25,.8,.3,1); }
.dim-bar.sin i { background: linear-gradient(90deg, #fbcfe8, #f43f5e); }
.dim-bar.virtue i { background: linear-gradient(90deg, #c7d2fe, #4f46e5); }
.dim-score {
  width: 2.1em;
  flex: 0 0 2.1em;
  text-align: right;
  font-size: 0.76rem;
  font-weight: 700;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}
.dim-caret { font-size: 0.6rem; color: #c8ccd8; transition: transform .25s ease; }
.dim-item.open .dim-caret { transform: rotate(90deg); }
.dim-detail {
  display: none;
  padding: 0 2px 14px 32px;
  font-size: 0.78rem;
  line-height: 1.8;
  color: #5b6070;
}
.dim-item.open .dim-detail { display: block; animation: fadeIn .3s ease both; }
.dim-detail .lv {
  display: inline-block;
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 5px;
  margin-right: 6px;
  vertical-align: 1px;
}
.lv-4 { background: #fee2e2; color: #b91c1c; }
.lv-3 { background: #fef3c7; color: #b45309; }
.lv-2 { background: #ede9fe; color: #6d28d9; }
.lv-1 { background: #ecfdf5; color: #047857; }
.dim-detail .tip {
  display: block;
  margin-top: 8px;
  padding: 9px 11px;
  background: #faf7ff;
  border-left: 2px solid #ddd6fe;
  border-radius: 0 8px 8px 0;
  color: #6b7280;
  font-size: 0.74rem;
  line-height: 1.7;
}
.dim-detail .tip b { color: #7c3aed; }

/* 解读 */
.reading { font-size: 0.86rem; line-height: 1.95; color: #4b5563; }
.reading p { margin: 0 0 12px; }
.reading p:last-child { margin: 0; }
.reading b { color: #6d28d9; }
.reading .sub-h { margin: 18px 0 2px; font-size: 0.8rem; color: #4b5563; }
.tips { list-style: none; padding: 0; margin: 4px 0 0; }
.tips li {
  display: flex;
  gap: 9px;
  padding: 9px 0;
  border-top: 1px dashed #f2eefb;
  font-size: 0.78rem;
  line-height: 1.75;
  color: #5b6070;
}
.tips li:first-child { border-top: 0; }
.tips .k {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 700;
  color: #7c3aed;
  font-size: 0.74rem;
  padding-top: 1px;
}

.mode-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fdf2f8, #f5f3ff);
  border: 1px solid #f3e8ff;
  margin-bottom: 14px;
}
.mode-emoji {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: grid; place-items: center;
  font-size: 17px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.12);
}
.mode-body .mode-name { font-size: 0.82rem; font-weight: 800; color: #6d28d9; margin-bottom: 3px; }
.mode-body .mode-desc { font-size: 0.76rem; line-height: 1.75; color: #6b7280; }

.kv { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed #ede9fe; }
.kv div { font-size: 0.66rem; color: #9ca3af; }
.kv div b { display: block; margin-top: 3px; font-size: 0.74rem; color: #4b5563; font-weight: 600; }

.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.actions-row { display: flex; gap: 10px; }
.actions-row > * { flex: 1; }
.btn-primary {
  padding: 15px;
  border: 0;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #f9a8d4, #c084fc 55%, #818cf8);
  box-shadow: 0 10px 26px rgba(192, 132, 252, 0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(192, 132, 252, 0.44); }
.btn-outline {
  padding: 14px;
  border-radius: 15px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #e9e5f5;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-outline:hover { color: #7c3aed; border-color: #ddd6fe; background: #fff; }

/* ---------- 记录弹层 ---------- */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 50, 0.32);
  backdrop-filter: blur(3px);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.sheet-mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.3, .9, .3, 1);
  max-height: 76vh;
  overflow: auto;
}
.sheet-mask.show .sheet { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h3 { margin: 0; font-size: 0.95rem; font-weight: 800; color: #2c3145; }
.sheet-close {
  border: 0; background: #f4f2fa; color: #8b91a1;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 15px; cursor: pointer; line-height: 1;
}
.record {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  border: 1px solid #f1ecfb;
  border-radius: 14px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: all .2s ease;
}
.record:hover { border-color: #ddd6fe; background: #fdfcff; }
.record .r-title { font-size: 0.84rem; font-weight: 700; color: #374151; }
.record .r-meta { margin-top: 3px; font-size: 0.66rem; color: #a2a7b5; }
.record .r-score { margin-left: auto; font-size: 0.68rem; color: #9ca3af; text-align: right; line-height: 1.5; }
.record .r-score b { color: #db2777; }
.record .r-score i { color: #4f46e5; font-style: normal; }
.empty {
  padding: 34px 0 40px;
  text-align: center;
  color: #a2a7b5;
  font-size: 0.78rem;
  line-height: 1.8;
}
.empty .big { font-size: 26px; display: block; margin-bottom: 8px; opacity: .7; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(16px);
  padding: 11px 17px;
  border-radius: 13px;
  background: rgba(30, 27, 45, 0.92);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.5;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 60;
  max-width: 84vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 桌面端 ---------- */
@media (min-width: 720px) {
  .app { padding: 46px 20px 64px; }
  .hero h1 { font-size: 2.35rem; }
  .result-title { font-size: 2.3rem; }
  .card:hover { box-shadow: var(--shadow-sm); }
  .question { font-size: 1.3rem; }
  .likert-dot { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
}
