:root {
  --bg: #f8f5ff;
  --panel: #ffffff;
  --ink: #25242b;
  --muted: #77727f;
  --soft: #eee7ff;
  --soft-2: #f6f1ff;
  --line: #e5ddf7;
  --primary: #8f55ff;
  --primary-2: #b084ff;
  --blue: #18a8ef;
  --green: #21c7a8;
  --amber: #f5a623;
  --shadow: 0 16px 48px rgba(110, 80, 170, 0.14);
}

* { box-sizing: border-box; }
html { background: #ebe8f4; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 20% 0%, #fff 0, var(--bg) 36%, #f6fbff 100%);
}
button, input { font: inherit; }
button { border: 0; cursor: pointer; }

.app {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  background:
    linear-gradient(90deg, rgba(143,85,255,.06) 1px, transparent 1px),
    linear-gradient(rgba(143,85,255,.05) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  padding-bottom: 34px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(218,208,242,.9);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 19px; color: var(--primary); }
.logo {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  color: #fff; font-size: 25px;
  background: linear-gradient(135deg, #8750ff, #bd8cff);
  box-shadow: 0 10px 22px rgba(143,85,255,.28);
}
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--soft-2);
  color: #5d566c;
  font-weight: 800;
  white-space: nowrap;
}
.section { padding: 26px 22px; }
.hero { text-align: center; padding-top: 34px; }
.tag {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--primary);
  background: #eee6ff;
  font-weight: 900;
}
h1 {
  margin: 30px 0 18px;
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: 0;
}
h2 { margin: 0; font-size: 28px; line-height: 1.22; }
h3 { margin: 0; font-size: 21px; line-height: 1.3; }
p { margin: 0; line-height: 1.82; color: var(--muted); font-size: 16px; }
.lead { font-size: 18px; color: #65606f; }
.stack { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.info-card {
  padding: 22px 16px;
  text-align: center;
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
}
.info-card .icon { font-size: 28px; }
.info-card strong { font-size: 29px; }
.info-card span { color: #8a8492; font-weight: 700; }
.btn {
  width: 100%;
  min-height: 62px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 16px 32px rgba(143,85,255,.28);
  font-weight: 900;
  font-size: 20px;
}
.btn.secondary { color: var(--primary); background: #f0e8ff; box-shadow: none; }
.btn.ghost { color: #6d6677; background: #f6f3fb; box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.preview-card {
  min-height: 126px;
  padding: 18px 12px;
  text-align: center;
  display: grid;
  align-content: center;
  gap: 8px;
}
.preview-card .emoji { font-size: 28px; }
.preview-card strong { font-size: 18px; }
.preview-card small { color: #8d8795; line-height: 1.45; }
.question-shell { padding: 18px 16px; }
.progress-wrap { padding: 18px 22px 0; }
.progress-meta { display: flex; justify-content: space-between; color: #7c7487; font-weight: 800; margin-bottom: 10px; }
.progress { height: 10px; border-radius: 999px; background: #ece6f7; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--blue)); border-radius: inherit; }
.dimension-box {
  padding: 18px;
  background: linear-gradient(135deg, #fbf9ff, #f0e9ff);
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-bottom: 26px;
}
.dimension-box.neutral h3 { color: #4a4358; }
.dimension-box.neutral p { font-size: 15px; line-height: 1.6; }
.question-title { font-size: 24px; line-height: 1.55; margin: 18px 0 22px; font-weight: 900; }
.option {
  width: 100%;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid #e6e3ea;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-weight: 850;
  font-size: 18px;
  text-align: left;
}
.option .dot {
  width: 25px; height: 25px; border: 3px solid #ddd9e4; border-radius: 50%; flex: 0 0 auto;
}
.option.active {
  border-color: #b891ff;
  background: #f3edff;
  box-shadow: 0 10px 22px rgba(143,85,255,.12);
}
.option.active .dot { border-color: var(--primary); background: radial-gradient(circle, var(--primary) 0 42%, transparent 45%); }
.nav-row { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding-top: 18px; background: linear-gradient(transparent, var(--bg) 30%); }
.nav-row .btn { border-radius: 0; min-height: 66px; box-shadow: none; }
.result-hero { padding: 26px 22px 8px; text-align: center; }
.result-card { padding: 24px 18px; }
.result-name { font-size: 31px; color: var(--primary); margin: 10px 0; font-weight: 950; }
.quote { color: var(--ink); font-size: 20px; line-height: 1.65; font-weight: 900; }
.scoreline { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.badge { padding: 8px 12px; border-radius: 999px; background: #edf8ff; color: #0b9ee6; font-weight: 900; }
.badge.green { background: #eafff9; color: #12a78d; }
.star-panel { padding: 20px 16px; }
.star-wrap { display: grid; grid-template-columns: 190px 1fr; gap: 14px; align-items: center; }
svg { max-width: 100%; }
.legend { display: grid; gap: 8px; }
.legend-row { display: grid; gap: 6px; }
.legend-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 850; color: #514b5d; }
.bar { height: 9px; background: #ece8f3; border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--blue)); }
.report-section { padding: 20px 18px; }
.report-section + .report-section { border-top: 1px solid #f0edf6; }
.report-section.standalone { border-top: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head .round { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--blue)); }
.result-modules { display: grid; gap: 16px; }
.module-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  padding: 20px 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94)),
    var(--panel);
  border: 1px solid rgba(229,221,247,.95);
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(110,80,170,.11);
}
.module-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #8750ff, #18a8ef);
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(80,120,220,.22);
}
.module-copy { min-width: 0; }
.module-copy h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.35;
}
.module-copy p {
  color: #6f6878;
  font-size: 16px;
  line-height: 1.9;
}
.eyebrow {
  margin-bottom: 4px;
  color: var(--primary);
  font-weight: 900;
  font-size: 13px;
}
.score-list { display: grid; gap: 12px; }
.score-row { display: grid; grid-template-columns: 34px 82px 1fr 34px; align-items: center; gap: 10px; }
.letter { width: 34px; height: 34px; border-radius: 10px; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 950; }
.score-row strong { font-size: 15px; }
.footer-note { padding: 20px; color: #908998; line-height: 1.8; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: min(90%, 430px);
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(37,36,43,.9);
  text-align: center;
  font-weight: 800;
}
@media (max-width: 420px) {
  h1 { font-size: 34px; }
  .section { padding-left: 16px; padding-right: 16px; }
  .topbar { padding-left: 16px; padding-right: 16px; }
  .star-wrap { grid-template-columns: 1fr; }
  .star-wrap svg { margin: 0 auto; }
  .score-row { grid-template-columns: 34px 74px 1fr 30px; }
}
