:root {
  --bg: #f7fbff;
  --paper: rgba(255, 255, 255, 0.82);
  --ink: #12202f;
  --muted: #6c7887;
  --line: rgba(31, 52, 70, 0.1);
  --blue: #2878ff;
  --teal: #16b79f;
  --orange: #f08a3c;
  --red: #e65b4f;
  --violet: #6d5df6;
  --shadow: 0 22px 70px rgba(26, 54, 78, 0.14);
  --radius: 28px;
  --font: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 7%, rgba(22, 183, 159, 0.22), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(109, 93, 246, 0.18), transparent 28%),
    radial-gradient(circle at 82% 82%, rgba(240, 138, 60, 0.16), transparent 28%),
    linear-gradient(180deg, #f8fffd, #eef5ff);
  font-family: var(--font);
  letter-spacing: 0;
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

#app {
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  overflow-x: hidden;
}

.screen {
  position: relative;
  min-height: 100svh;
  padding: 16px;
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 18%, rgba(22, 183, 159, 0.18), transparent 24%),
    radial-gradient(circle at 92% 74%, rgba(40, 120, 255, 0.16), transparent 28%);
  filter: blur(2px);
}

.hero-card,
.panel,
.result-hero,
.modal-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(238, 250, 255, 0.82));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card {
  min-height: calc(100svh - 32px);
  padding: 18px 18px 20px;
}

.hero-nav,
.result-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(18, 32, 47, 0.55);
  font-size: 12px;
  font-weight: 850;
}

.hero-visual {
  position: relative;
  height: 260px;
  margin: 12px 0 2px;
}

.path-stage {
  position: absolute;
  inset: 8px 2px 0;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(40, 120, 255, 0.16), transparent 42%),
    linear-gradient(225deg, rgba(240, 138, 60, 0.2), transparent 42%),
    rgba(255, 255, 255, 0.48);
}

.path-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 28px;
  bottom: 28px;
  width: 1px;
  background: linear-gradient(transparent, rgba(18, 32, 47, 0.28), transparent);
}

.route-card {
  position: absolute;
  top: 54px;
  width: 43%;
  min-height: 148px;
  padding: 16px 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 44px rgba(27, 60, 88, 0.12);
}

.route-card.left {
  left: 8px;
}

.route-card.right {
  right: 8px;
}

.route-icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 28px;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(31, 52, 70, 0.16);
}

.left .route-icon {
  background: linear-gradient(135deg, #2878ff, #16b79f);
}

.right .route-icon {
  background: linear-gradient(135deg, #f08a3c, #e65b4f);
}

.route-card strong {
  display: block;
  margin-top: 14px;
  font-size: 20px;
  line-height: 1.15;
}

.route-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.choice-badge {
  position: absolute;
  left: 50%;
  top: 124px;
  transform: translateX(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #12202f, #39536a);
  box-shadow: 0 18px 36px rgba(18, 32, 47, 0.22);
  font-weight: 950;
}

.spark {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
}

.spark.one {
  left: 26px;
  top: 28px;
  width: 46px;
  height: 46px;
}

.spark.two {
  right: 36px;
  bottom: 22px;
  width: 34px;
  height: 34px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 0 6px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.14em;
  font-weight: 950;
}

.hero-copy h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.08;
  font-weight: 950;
}

.hero-copy p {
  margin: 16px 0 20px;
  color: rgba(18, 32, 47, 0.72);
  font-size: 15px;
  line-height: 1.75;
}

.primary-btn,
.ghost-btn,
.plain-btn {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.primary-btn {
  width: 100%;
  color: white;
  background: linear-gradient(135deg, #2878ff, #16b79f 48%, #6d5df6);
  box-shadow: 0 16px 36px rgba(40, 120, 255, 0.22);
}

.ghost-btn {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(31, 52, 70, 0.1);
}

.plain-btn {
  color: var(--muted);
  background: transparent;
}

.primary-btn:active,
.ghost-btn:active,
.plain-btn:active,
.option-btn:active,
.progress-dot:active {
  transform: translateY(1px);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.info-card {
  min-height: 104px;
  padding: 15px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 32px rgba(27, 60, 88, 0.08);
}

.info-card.wide {
  grid-column: span 2;
}

.info-card b {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #12202f, #39536a);
  font-size: 12px;
}

.info-card h3 {
  margin: 12px 0 6px;
  font-size: 16px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.disclaimer {
  margin: 14px 8px 0;
  color: rgba(108, 120, 135, 0.9);
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
}

.quiz-screen {
  padding: 12px;
}

.quiz-shell {
  min-height: calc(100svh - 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-top {
  position: sticky;
  top: 10px;
  z-index: 5;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 32px rgba(27, 60, 88, 0.1);
  backdrop-filter: blur(14px);
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

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

.progress-dot {
  height: 13px;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 32, 47, 0.09);
  cursor: pointer;
}

.progress-dot.done {
  background: linear-gradient(135deg, #2878ff, #16b79f);
}

.progress-dot.current {
  outline: 2px solid rgba(18, 32, 47, 0.52);
  outline-offset: 2px;
}

.question-card {
  flex: 1;
  padding: 22px 18px 18px;
  border-radius: 30px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(238, 250, 255, 0.84));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.question-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.question-num {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, #12202f, #39536a);
  font-size: 14px;
}

.question-title {
  margin: 22px 0 20px;
  font-size: 25px;
  line-height: 1.38;
  font-weight: 950;
}

.option-list {
  display: grid;
  gap: 11px;
}

.option-btn {
  width: 100%;
  min-height: 70px;
  border: 1px solid rgba(31, 52, 70, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(27, 60, 88, 0.06);
}

.option-btn.selected {
  border-color: rgba(40, 120, 255, 0.32);
  background: linear-gradient(135deg, rgba(40, 120, 255, 0.12), rgba(22, 183, 159, 0.12));
}

.option-key {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #2878ff, #16b79f);
  font-weight: 950;
}

.option-text {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 750;
}

.quiz-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
}

.quiz-actions.single {
  grid-template-columns: 1fr;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  z-index: 20;
  width: max-content;
  max-width: calc(100% - 44px);
  padding: 12px 16px;
  border-radius: 999px;
  color: white;
  background: rgba(18, 32, 47, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  font-size: 13px;
  font-weight: 800;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(18, 32, 47, 0.28);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(100%, 380px);
  padding: 22px;
}

.modal-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.modal-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.loading-wrap {
  min-height: calc(100svh - 32px);
  display: grid;
  place-items: center;
}

.loading-card {
  width: 100%;
  padding: 36px 24px;
  text-align: center;
}

.loader {
  width: 74px;
  height: 74px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 9px solid rgba(40, 120, 255, 0.12);
  border-top-color: var(--teal);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.loading-card p {
  margin: 0;
  color: var(--muted);
}

.result-screen {
  padding: 12px;
}

.result-hero {
  padding: 18px;
}

.result-main {
  text-align: center;
  padding: 28px 6px 18px;
}

.result-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #2878ff, #16b79f);
  font-size: 12px;
  font-weight: 950;
}

.result-title {
  margin: 14px 0 8px;
  font-size: 42px;
  line-height: 1.05;
  font-weight: 950;
}

.result-subtitle {
  margin: 0 auto;
  max-width: 330px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 750;
}

.route-meter {
  display: grid;
  gap: 12px;
  margin: 24px 4px 8px;
}

.route-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.route-meter span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.route-track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2878ff, #16b79f 44%, #f08a3c 66%, #e65b4f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.route-thumb {
  position: absolute;
  top: 50%;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  border: 7px solid #12202f;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 22px rgba(18, 32, 47, 0.18);
}

.report-section {
  margin-top: 12px;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 32px rgba(27, 60, 88, 0.08);
}

.report-section h3 {
  margin: 0 0 12px;
  font-size: 19px;
}

.report-section p {
  margin: 0;
  color: rgba(18, 32, 47, 0.76);
  font-size: 14px;
  line-height: 1.8;
}

.bar-list {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.bar-track {
  height: 13px;
  border-radius: 999px;
  background: rgba(18, 32, 47, 0.08);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c1), var(--c2));
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 9px 12px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #2878ff, #16b79f);
  font-size: 13px;
  font-weight: 850;
}

.quote {
  margin-top: 12px;
  padding: 16px;
  border-radius: 20px;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(40, 120, 255, 0.12), rgba(240, 138, 60, 0.12));
  font-weight: 900;
  line-height: 1.7;
}

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

.action-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
}

.action-item b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, #12202f, #39536a);
  font-size: 12px;
}

.action-item span {
  color: rgba(18, 32, 47, 0.76);
  font-size: 14px;
  line-height: 1.65;
}

.result-actions {
  display: grid;
  gap: 10px;
  padding: 14px 0 2px;
}

@media (max-width: 380px) {
  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-visual {
    height: 236px;
  }

  .route-card {
    min-height: 136px;
    padding: 14px 12px;
  }

  .route-card strong {
    font-size: 18px;
  }

  .choice-badge {
    width: 62px;
    height: 62px;
    top: 118px;
  }

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

  .option-text {
    font-size: 14px;
  }
}
