:root {
  --bg: #ffffff;
  --bg-soft: #faf8fd;
  --surface: #ffffff;
  --surface-muted: #f7f5fb;
  --text: #27252b;
  --muted: #a3a1ac;
  --muted-strong: #83808e;
  --purple: #9269ab;
  --purple-deep: #8356a3;
  --line: #f0edf6;
  --shadow: 0 24px 50px rgba(115, 93, 145, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 245, 252, 0.96)),
    radial-gradient(circle at top center, rgba(255, 190, 210, 0.16), transparent 24%);
}

button,
input {
  font: inherit;
}

.page {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 28px 22px 64px;
}

#landing-view[hidden],
.flow-view[hidden] {
  display: none;
}

.hero {
  text-align: center;
  padding-top: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  position: relative;
  width: 120px;
  height: 120px;
}

.brand-mark span {
  position: absolute;
  border-radius: 999px;
  width: 24px;
}

.mark-blue,
.mark-purple {
  left: 10px;
  height: 96px;
}

.mark-green {
  right: 10px;
  height: 96px;
}

.mark-blue {
  top: 4px;
  background: linear-gradient(180deg, #2aa8d8, #2b91cf);
  transform: rotate(-45deg);
  transform-origin: top center;
}

.mark-gold {
  position: absolute;
  top: 2px;
  left: 48px;
  width: 24px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f9c32f, #f5a90b);
  transform: rotate(45deg);
  transform-origin: top center;
}

.mark-purple {
  bottom: 4px;
  background: linear-gradient(180deg, #9c69b8, #8b57b0);
}

.mark-green {
  bottom: 4px;
  background: linear-gradient(180deg, #2bb588, #21a972);
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 0.95;
}

.brand-subtitle {
  margin: 6px 0 0;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #2f2d34;
}

.hero-note {
  margin: 8px 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #5f6479;
}

.hero-description {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #9a98a3;
}

.test-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.test-card {
  position: relative;
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: 34px;
  min-height: 520px;
  padding: 28px 26px 34px;
  box-shadow: 0 10px 24px rgba(208, 204, 219, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.test-card:hover {
  transform: translateY(-4px);
}

.test-card strong {
  margin-top: 16px;
  font-size: 2.25rem;
  font-weight: 500;
  color: #5d5d66;
}

.test-name {
  display: block;
  margin-top: 6px;
  font-size: 2.05rem;
  font-weight: 700;
  color: #6b6973;
}

.test-time {
  margin-top: 22px;
  font-size: 1rem;
  color: #dddbe3;
}

.test-card.is-selected {
  border-color: var(--purple);
  box-shadow: 0 24px 48px rgba(146, 105, 171, 0.15);
}

.test-card.is-selected strong,
.test-card.is-selected .test-name {
  color: #23242a;
}

.choice-tag {
  position: absolute;
  top: -18px;
  right: -6px;
  background: linear-gradient(90deg, #ff7447, #ff4192);
  color: #fff;
  border-radius: 0 16px 16px 16px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 700;
}

.selected-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 24px 0 30px 0;
  background: var(--purple);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
}

.test-art {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 240px;
  margin-top: 26px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(243, 240, 249, 0.65)),
    radial-gradient(circle at top, rgba(255, 227, 151, 0.45), transparent 26%);
  overflow: hidden;
}

.study-scene::after,
.creative-scene::after {
  content: "";
  position: absolute;
  inset: auto 0 18px;
  height: 20px;
  background: rgba(224, 225, 233, 0.34);
  filter: blur(8px);
}

.desk,
.chair,
.person,
.lamp,
.plant,
.easel,
.artist,
.friend,
.shelf,
.heart {
  position: absolute;
}

.desk {
  left: 46px;
  bottom: 50px;
  width: 210px;
  height: 18px;
  background: #9ec7cc;
  border-radius: 12px;
  box-shadow:
    0 34px 0 -13px #8898aa,
    124px 34px 0 -13px #8898aa,
    0 -8px 0 18px #b4bcc8;
}

.chair {
  left: 92px;
  bottom: 52px;
  width: 40px;
  height: 60px;
  border-radius: 18px 18px 8px 8px;
  background: #dcc78d;
}

.person {
  left: 126px;
  bottom: 72px;
  width: 72px;
  height: 92px;
  background: linear-gradient(180deg, #e6d5bb 0 22px, #c9a66c 22px 52px, #93c2bb 52px);
  clip-path: polygon(24% 0, 67% 4%, 82% 28%, 74% 100%, 42% 100%, 34% 60%, 0 38%);
}

.lamp {
  right: 104px;
  bottom: 112px;
  width: 44px;
  height: 44px;
  border: 6px solid #92c6e9;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

.plant {
  right: 38px;
  bottom: 96px;
  width: 46px;
  height: 58px;
  background: linear-gradient(180deg, #a9d38a, #78b36a);
  clip-path: polygon(46% 0, 74% 15%, 100% 0, 85% 38%, 100% 68%, 64% 58%, 49% 100%, 30% 60%, 0 70%, 14% 36%, 0 10%, 32% 14%);
}

.easel {
  left: 38px;
  bottom: 50px;
  width: 86px;
  height: 140px;
  background: linear-gradient(180deg, #f7d98c, #f0c35d);
  clip-path: polygon(35% 0, 100% 10%, 84% 100%, 6% 100%, 0 18%);
}

.artist {
  left: 102px;
  bottom: 42px;
  width: 90px;
  height: 138px;
  background: linear-gradient(180deg, #f2cf5b 0 22px, #566589 22px 46px, #f3c13c 46px 78px, #5c7fb1 78px 100%, #59667c 100%);
  clip-path: polygon(34% 0, 72% 4%, 84% 22%, 90% 56%, 100% 100%, 8% 100%, 12% 68%, 0 38%);
}

.friend {
  right: 68px;
  bottom: 38px;
  width: 86px;
  height: 136px;
  background: linear-gradient(180deg, #8e7b68 0 18px, #d0b39a 18px 42px, #73b364 42px 82px, #507f49 82px);
  clip-path: polygon(38% 0, 78% 12%, 100% 46%, 84% 100%, 18% 100%, 0 56%, 12% 16%);
}

.shelf {
  right: 10px;
  bottom: 56px;
  width: 74px;
  height: 120px;
  border-radius: 8px;
  border: 8px solid #aab4c6;
  border-bottom-width: 10px;
}

.heart {
  left: 208px;
  top: 34px;
  width: 26px;
  height: 26px;
  background: #a87aa9;
  transform: rotate(45deg);
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #a87aa9;
}

.heart::before {
  left: -12px;
}

.heart::after {
  top: -12px;
}

.cta-panel {
  margin-top: 26px;
  text-align: center;
}

.account-strip,
.provider-row,
.account-result-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-strip {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--surface-muted);
  color: #6f687a;
}

.ghost-mini-btn {
  border: 0;
  border-radius: 999px;
  background: rgba(146, 105, 171, 0.14);
  color: var(--purple-deep);
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.start-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 28px 24px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  background: var(--purple);
  box-shadow: 0 18px 34px rgba(146, 105, 171, 0.2);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.start-btn:hover {
  transform: translateY(-2px);
  background: var(--purple-deep);
}

.agreement {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #a09dac;
  font-size: 0.98rem;
}

.agreement input {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
}

.agreement a {
  color: var(--purple);
  text-decoration: none;
}

.intro {
  margin-top: 18px;
  color: #acabb3;
  font-size: 0.98rem;
  line-height: 1.45;
}

.intro p {
  margin: 0;
}

.intro .question {
  margin-bottom: 2px;
  font-size: 1.15rem;
  font-weight: 600;
}

.intro .question span {
  color: #3f99c0;
}

.selection-tip {
  margin: 18px 0 0;
  color: var(--purple);
  font-weight: 600;
}

.notice-block {
  margin-top: 34px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.notice-block h2 {
  margin: 0;
  padding: 24px 28px;
  font-size: 1.18rem;
  text-align: center;
  border-bottom: 2px solid var(--line);
}

.notice-content {
  padding: 20px 24px 24px;
}

.notice-content p {
  margin: 0 0 18px;
  color: #9c9aa4;
  line-height: 1.55;
  font-size: 1rem;
}

.notice-content p:last-child {
  margin-bottom: 0;
}

.secondary-block .detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px 24px 28px;
}

.secondary-block article {
  padding: 18px 18px 0;
  background: var(--surface-muted);
  border-radius: 18px;
}

.secondary-block h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.secondary-block p {
  margin: 0 0 18px;
  color: var(--muted-strong);
  line-height: 1.6;
}

.quiz-topbar,
.quiz-actions,
.result-actions,
.progress-head,
.dimension-head,
.dimension-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.flow-view {
  padding-top: 18px;
}

.plan-chip,
.result-tags span,
.test-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(146, 105, 171, 0.12);
  color: var(--purple-deep);
  font-weight: 700;
}

.quiz-panel,
.result-hero,
.ad-panel {
  margin-top: 22px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.quiz-panel {
  padding: 26px;
}

.quiz-progress {
  margin-bottom: 24px;
}

.progress-head {
  color: var(--muted-strong);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: #ece7f3;
  border-radius: 999px;
  overflow: hidden;
}

#quiz-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #bc95d4, #8d63ac);
  border-radius: 999px;
  transition: width 180ms ease;
}

.question-card {
  padding: 34px 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #fbf9fe);
  border: 1px solid #f0eaf7;
}

.question-card h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.45;
}

.option-list {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.option-pill,
.ghost-btn,
.primary-btn {
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.option-pill {
  border: 2px solid #ebe6f2;
  background: #fff;
  padding: 16px 12px;
  color: #6f6b79;
}

.option-pill.is-active {
  border-color: var(--purple);
  background: rgba(146, 105, 171, 0.12);
  color: #3b3343;
}

.option-pill:hover,
.ghost-btn:hover,
.primary-btn:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  border: 2px solid #e9e3f1;
  background: #fff;
  color: #6e6679;
  padding: 14px 20px;
}

.primary-btn {
  border: 0;
  background: var(--purple);
  color: #fff;
  padding: 16px 24px;
}

.test-badge {
  min-height: 56px;
  padding-inline: 24px;
  background: linear-gradient(90deg, rgba(146, 105, 171, 0.16), rgba(255, 114, 176, 0.14));
  color: var(--purple-deep);
  font-weight: 800;
}

.result-hero {
  padding: 34px 28px;
  text-align: center;
}

.ad-panel {
  padding: 30px 28px;
}

.ad-copy {
  text-align: center;
}

.ad-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.ad-copy p:last-child {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted-strong);
  line-height: 1.7;
}

.ad-card {
  margin-top: 24px;
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff8fb, #fbf7ff);
  border: 1px solid #efe4f6;
  text-align: center;
}

.ad-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 83, 146, 0.12);
  color: #dc4b8a;
  font-weight: 700;
}

.ad-card h3 {
  margin: 16px 0 8px;
  font-size: 1.35rem;
}

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

.provider-row {
  margin: 18px auto 0;
  width: min(100%, 420px);
  color: #6e6679;
  font-weight: 700;
}

.provider-row select {
  border: 2px solid #ece3f4;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
}

.ad-progress {
  margin: 22px auto 14px;
  width: min(100%, 560px);
  height: 14px;
  border-radius: 999px;
  background: #efe8f5;
  overflow: hidden;
}

#ad-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff8a5b, #ff4f9c);
  transition: width 300ms linear;
}

.ad-status {
  font-weight: 700;
}

.ad-actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.reward-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.reward-grid article {
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-muted);
}

.reward-grid h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.reward-grid p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.modal-shell[hidden] {
  display: none;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 26, 38, 0.42);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(92vw, 760px);
  margin: 6vh auto 0;
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 60px rgba(44, 34, 60, 0.18);
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #f4eff9;
  color: #6f627e;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.modal-copy,
.privacy-copy p,
.wechat-panel p {
  color: var(--muted-strong);
  line-height: 1.7;
}

.provider-note {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #f8f4fc;
}

.provider-note strong {
  display: block;
  margin-bottom: 8px;
}

.provider-note p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.login-tabs {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login-tab {
  border: 2px solid #ece3f4;
  background: #fff;
  color: #6d6678;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}

.login-tab.is-active {
  border-color: var(--purple);
  background: rgba(146, 105, 171, 0.12);
  color: var(--purple-deep);
}

.login-panel {
  display: none;
  margin-top: 20px;
}

.login-panel.is-active {
  display: block;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  color: #6f687a;
  font-weight: 700;
}

.field input {
  width: 100%;
  border: 2px solid #ece5f4;
  border-radius: 18px;
  padding: 14px 16px;
  background: #fff;
}

.wechat-panel {
  text-align: center;
}

.qr-card {
  width: min(100%, 240px);
  margin: 0 auto 14px;
  aspect-ratio: 1;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, #f6f2fb, #fff),
    radial-gradient(circle, rgba(146, 105, 171, 0.14), transparent 50%);
  border: 2px dashed #ddcfea;
  color: var(--purple-deep);
  font-weight: 800;
}

.privacy-card {
  width: min(92vw, 820px);
}

.privacy-copy {
  margin-top: 18px;
}

.privacy-copy p {
  margin: 0 0 14px;
}

.account-result-chip {
  margin-top: 18px;
  justify-content: center;
}

.result-kicker {
  margin: 0 0 10px;
  color: var(--purple);
  font-weight: 700;
}

.result-hero h2 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 4.8rem);
  line-height: 1;
}

.result-hero h3 {
  margin: 12px 0 14px;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.result-hero p {
  margin: 0 auto;
  max-width: 720px;
  color: var(--muted-strong);
  line-height: 1.7;
}

.result-tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.result-block {
  margin-top: 22px;
}

.dimension-bars {
  padding: 20px 24px 26px;
  display: grid;
  gap: 18px;
}

.dimension-card {
  padding: 18px 18px 14px;
  background: var(--surface-muted);
  border-radius: 18px;
}

.dimension-head {
  margin-bottom: 10px;
  font-size: 0.98rem;
}

.dimension-head span,
.dimension-foot {
  color: var(--muted-strong);
}

.dimension-track {
  height: 14px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: #ede8f4;
}

.dimension-left {
  background: linear-gradient(90deg, #4bb3d6, #86d2ee);
}

.dimension-right {
  background: linear-gradient(90deg, #c39ada, #8d63ac);
}

.dimension-foot {
  margin-top: 10px;
  font-size: 0.9rem;
}

.result-actions {
  margin-top: 20px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(41, 36, 48, 0.92);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  box-shadow: 0 14px 28px rgba(41, 36, 48, 0.18);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@media (max-width: 860px) {
  .page {
    padding-inline: 16px;
  }

  .brand {
    flex-direction: column;
    gap: 6px;
  }

  .test-picker,
  .secondary-block .detail-grid,
  .option-list {
    grid-template-columns: 1fr;
  }

  .test-card {
    min-height: 420px;
  }

  .start-btn {
    padding-block: 22px;
  }

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

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

@media (max-width: 520px) {
  .brand-copy h1 {
    font-size: 4rem;
  }

  .brand-subtitle {
    font-size: 1.6rem;
  }

  .hero-note,
  .hero-description,
  .notice-content p,
  .intro,
  .agreement {
    font-size: 0.92rem;
  }

  .test-card {
    border-radius: 26px;
    padding: 20px 18px 24px;
  }

  .test-art {
    height: 198px;
  }

  .test-card strong {
    font-size: 1.95rem;
  }

  .test-name {
    font-size: 1.8rem;
  }
}
