:root {
  color-scheme: dark;
  --bg: #120b1f;
  --bg-2: #25163f;
  --panel: rgba(255, 248, 239, 0.94);
  --panel-strong: #fff9f2;
  --ink: #28172f;
  --muted: #775f78;
  --line: rgba(255, 255, 255, 0.16);
  --rose: #ff5f8d;
  --rose-deep: #ce315f;
  --gold: #f3c76d;
  --cream: #fff2dd;
  --mint: #79dec8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 95, 141, 0.28), transparent 30%),
    radial-gradient(circle at 84% 16%, rgba(243, 199, 109, 0.22), transparent 28%),
    radial-gradient(circle at 50% 86%, rgba(121, 222, 200, 0.12), transparent 32%),
    linear-gradient(145deg, #10081a 0%, #211339 46%, #351836 100%);
  color: var(--cream);
}

button {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.82;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.76) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(243, 199, 109, 0.68) 0 1px, transparent 1.5px);
  background-size: 78px 78px, 118px 118px;
  background-position: 12px 20px, 48px 64px;
  opacity: 0.32;
}

.screen {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 18px 32px;
}

.home-screen {
  display: grid;
  align-content: center;
  gap: 22px;
}

.site-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 30px;
  color: rgba(255, 242, 221, 0.72);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-mark {
  color: rgba(255, 249, 241, 0.92);
  font-weight: 800;
}

.site-status {
  color: rgba(243, 199, 109, 0.76);
}

.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  align-content: center;
  gap: 24px;
}

.badge {
  width: fit-content;
  padding: 8px 13px;
  border: 1px solid rgba(243, 199, 109, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  color: #fff9f1;
  font-size: clamp(38px, 8vw, 76px);
  line-height: 1.04;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero .lead {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 242, 221, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero-panel,
.quiz-card,
.result-panel,
.share-preview,
.soft-panel {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(16px);
}

.preview-card {
  position: relative;
  min-height: 246px;
  overflow: hidden;
  padding: 20px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 249, 242, 0.98), rgba(255, 232, 238, 0.96)),
    #fff9f2;
  color: var(--ink);
}

.preview-card::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(206, 49, 95, 0.22);
  border-radius: 50%;
}

.preview-label {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--rose-deep);
  font-size: 13px;
  font-weight: 800;
}

.preview-card h2 {
  position: relative;
  margin: 0;
  max-width: 260px;
  font-size: 34px;
  line-height: 1.1;
}

.preview-card p {
  position: relative;
  max-width: 220px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.orbit-preview {
  position: absolute;
  right: 20px;
  bottom: 24px;
  width: 138px;
  height: 138px;
  opacity: 0.82;
}

.orbit-ring {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(206, 49, 95, 0.2);
  border-radius: 50%;
}

.orbit-ring-two {
  inset: 25px;
  border-color: rgba(243, 199, 109, 0.28);
}

.orbit-core {
  position: absolute;
  inset: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--gold));
  color: #35142b;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 28px rgba(255, 95, 141, 0.28);
}

.orbit-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(206, 49, 95, 0.25);
  border-radius: 50%;
  background: rgba(255, 249, 242, 0.86);
  color: var(--rose-deep);
  font-size: 10px;
  font-weight: 800;
}

.orbit-node-a {
  top: 0;
  left: 52px;
}

.orbit-node-b {
  right: 0;
  bottom: 30px;
}

.orbit-node-c {
  bottom: 0;
  left: 10px;
}

.preview-lines {
  position: relative;
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.preview-lines span {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 95, 141, 0.45), rgba(243, 199, 109, 0.12));
}

.preview-lines span:nth-child(2) {
  width: 76%;
}

.preview-lines span:nth-child(3) {
  width: 52%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  min-height: 82px;
  padding: 14px 12px;
  border-radius: 8px;
  background: rgba(255, 249, 242, 0.96);
  color: var(--ink);
}

.stat strong {
  display: block;
  margin-bottom: 4px;
  color: var(--rose-deep);
  font-size: 24px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--rose), var(--gold));
  color: #251020;
  font-weight: 800;
  box-shadow: 0 14px 36px rgba(255, 95, 141, 0.28);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
}

.btn-ghost {
  border: 1px solid rgba(119, 95, 120, 0.28);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
}

.note {
  color: rgba(255, 242, 221, 0.7);
  font-size: 13px;
  line-height: 1.7;
}

.micro-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.micro-list span {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 242, 221, 0.82);
  font-size: 13px;
}

.home-band {
  display: grid;
  gap: 10px;
  margin-top: -34px;
}

.home-band div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.home-band strong,
.home-band span {
  display: block;
}

.home-band strong {
  margin-bottom: 6px;
  color: #fff9f1;
}

.home-band span {
  color: rgba(255, 242, 221, 0.72);
  line-height: 1.7;
  font-size: 14px;
}

.quiz-screen {
  display: grid;
  align-content: center;
  gap: 16px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.progress-wrap {
  flex: 1;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: rgba(255, 242, 221, 0.82);
  font-size: 13px;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), var(--gold), var(--mint));
  transition: width 260ms ease;
}

.quiz-card {
  padding: 22px;
  background: var(--panel);
  color: var(--ink);
}

.quiz-layout {
  display: grid;
  gap: 12px;
}

.question-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.question-kicker {
  margin-bottom: 12px;
  color: var(--rose-deep);
  font-size: 13px;
  font-weight: 800;
}

.question-count {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff0f5;
  color: var(--rose-deep);
  font-weight: 900;
}

.question-title {
  margin: 0 0 20px;
  font-size: 25px;
  line-height: 1.35;
}

.answer-hint {
  margin: -6px 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 14px 14px;
  border: 1px solid rgba(119, 95, 120, 0.22);
  border-radius: 8px;
  background: #fffefe;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.option:hover,
.option.selected {
  border-color: rgba(255, 95, 141, 0.72);
  background: #fff0f5;
}

.option.selected {
  transform: translateY(-1px);
}

.option-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f6ecf0;
  color: var(--rose-deep);
  font-weight: 900;
}

.option.selected .option-index,
.option:hover .option-index {
  background: linear-gradient(135deg, var(--rose), var(--gold));
  color: #251020;
}

.option-text {
  line-height: 1.58;
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.quiz-side {
  display: grid;
  gap: 10px;
}

.mini-panel {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 242, 221, 0.82);
  backdrop-filter: blur(14px);
}

.mini-panel strong,
.mini-panel span {
  display: block;
}

.mini-panel strong {
  margin-bottom: 6px;
  color: #fff9f1;
}

.mini-panel span {
  line-height: 1.65;
  font-size: 14px;
}

.answered-dots {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 5px;
}

.dot {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.dot.active {
  background: linear-gradient(90deg, var(--rose), var(--gold));
}

.side-note {
  margin: 0;
  color: rgba(255, 242, 221, 0.66);
  font-size: 13px;
  line-height: 1.7;
}

.result-screen {
  display: grid;
  gap: 14px;
}

.result-hero {
  padding: 28px 0 8px;
}

.result-hero .site-topbar {
  margin-bottom: 26px;
}

.result-hero h1 {
  margin: 8px 0 8px;
  font-size: clamp(32px, 7vw, 58px);
  line-height: 1.12;
}

.result-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 242, 221, 0.78);
  line-height: 1.8;
}

.result-panel {
  padding: 20px;
  background: var(--panel);
  color: var(--ink);
}

.type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 95, 141, 0.12);
  color: var(--rose-deep);
  font-weight: 800;
  font-size: 13px;
}

.result-panel h2 {
  margin: 12px 0 8px;
  font-size: 30px;
  line-height: 1.18;
}

.section-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--rose-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.radar-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.radar-caption {
  max-width: 190px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: right;
}

.radar-shell {
  display: grid;
  place-items: center;
  min-height: 310px;
  margin: 8px -4px 10px;
  border: 1px solid rgba(206, 49, 95, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle, rgba(255, 95, 141, 0.12), transparent 42%),
    linear-gradient(135deg, #fff9f2, #fff1f4);
}

.radar-chart {
  display: block;
  width: min(100%, 330px);
  height: auto;
  overflow: visible;
}

.radar-grid {
  fill: none;
  stroke: rgba(119, 95, 120, 0.18);
  stroke-width: 1;
}

.radar-axis {
  stroke: rgba(119, 95, 120, 0.18);
  stroke-width: 1;
}

.radar-value {
  fill: url(#radarFill);
  stroke: var(--rose-deep);
  stroke-width: 2.4;
  stroke-linejoin: round;
  animation: radarReveal 680ms ease both;
}

.radar-dot {
  fill: var(--gold);
  stroke: var(--rose-deep);
  stroke-width: 2;
}

.radar-label {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

@keyframes radarReveal {
  from {
    opacity: 0;
    transform: scale(0.86);
    transform-origin: 140px 140px;
  }
  to {
    opacity: 1;
    transform: scale(1);
    transform-origin: 140px 140px;
  }
}

.summary {
  color: var(--muted);
  line-height: 1.8;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.keyword {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f6ecf0;
  color: #643d60;
  font-size: 13px;
  font-weight: 700;
}

.score-cards {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.score-card {
  padding: 13px;
  border: 1px solid rgba(206, 49, 95, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff9f2, #fff1f4);
}

.score-card span,
.score-card strong,
.score-card em {
  display: block;
}

.score-card span {
  color: var(--rose-deep);
  font-size: 12px;
  font-weight: 900;
}

.score-card strong {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 17px;
}

.score-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
  font-size: 13px;
}

.compatibility-panel {
  margin-top: 14px;
}

.compatibility-note {
  color: var(--muted);
  font-size: 12px;
}

.compatibility-grid {
  display: grid;
  gap: 10px;
}

.compatibility-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(206, 49, 95, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff9f2, #fff1f4);
}

.compatibility-rank {
  display: grid;
  place-items: center;
  min-height: 70px;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--rose-deep), #e77b8f);
  color: #fff9f2;
  font-size: 18px;
  font-weight: 900;
}

.compatibility-body {
  min-width: 0;
}

.compatibility-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.compatibility-kind {
  color: var(--rose-deep);
  font-size: 12px;
  font-weight: 900;
}

.compatibility-meta strong {
  color: var(--rose-deep);
  font-size: 13px;
}

.compatibility-card h3 {
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: 17px;
}

.compatibility-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.bars {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: #4c344f;
  font-size: 14px;
  font-weight: 800;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #ede3e7;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), var(--gold));
}

.detail-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.soft-panel {
  padding: 16px;
  background: var(--panel-strong);
  color: var(--ink);
}

.soft-panel h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.soft-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.action-plan {
  margin-top: 14px;
}

.step-list {
  display: grid;
  gap: 10px;
}

.step-list div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 8px;
  background: #fff3f7;
}

.step-list strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--rose-deep);
  color: #fff;
}

.step-list span {
  color: var(--muted);
  line-height: 1.7;
}

.share-preview {
  position: sticky;
  top: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.share-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.share-title strong {
  color: #fff9f1;
}

.share-title span {
  color: rgba(255, 242, 221, 0.68);
  font-size: 12px;
}

.share-preview img {
  display: block;
  width: min(100%, 360px);
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  max-width: calc(100vw - 36px);
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(20, 10, 28, 0.92);
  color: var(--cream);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

@media (min-width: 760px) {
  .screen {
    padding: 40px 28px 48px;
  }

  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
  }

  .hero-copy {
    align-self: center;
  }

  .hero-panel {
    align-self: end;
  }

  .detail-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-band {
    grid-template-columns: repeat(2, 1fr);
  }

  .quiz-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: start;
  }

  .score-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .result-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 14px;
    align-items: start;
  }
}

@media (max-width: 520px) {
  .screen {
    padding: 18px 14px 28px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero .lead {
    font-size: 16px;
  }

  .quiz-card,
  .result-panel {
    padding: 18px;
  }

  .topbar,
  .quiz-actions,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-band {
    margin-top: -12px;
  }

  .question-head {
    display: block;
  }

  .question-count {
    display: none;
  }

  .btn {
    width: 100%;
  }

  .question-title {
    font-size: 21px;
  }

  .site-topbar {
    font-size: 11px;
  }

  .site-status {
    max-width: 46%;
    text-align: right;
  }

  .radar-header {
    display: block;
  }

  .radar-caption {
    max-width: none;
    margin-top: 6px;
    text-align: left;
  }

  .radar-shell {
    min-height: 280px;
  }

  .orbit-preview {
    right: 10px;
    bottom: 20px;
    transform: scale(0.82);
    transform-origin: bottom right;
  }

  .preview-card p {
    max-width: 205px;
    font-size: 13px;
  }

  .share-preview {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .particle-canvas {
    opacity: 0.35;
  }
}
