:root {
  --cream: #FAF7F2;
  --card: #FFFFFF;
  --mist: #E8E4F5;
  --lavender: #9B8FBF;
  --lavender-deep: #7C6FA8;
  --ink: #3A3645;
  --ink-soft: #6E6A7C;
  --accent: #A69BC8;
  --radius: 20px;
  --shadow: 0 8px 30px rgba(124, 111, 168, 0.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 20px 20px 40px;
}

.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }

/* ========== 开场页 ========== */
#view-home {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  text-align: center;
}
#view-home.active { display: flex; }

.home-inner { width: 100%; padding: 40px 10px; }

.logo {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--lavender), var(--accent));
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}

.brand {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 8px;
  color: var(--ink);
  margin-bottom: 10px;
}

.tagline {
  font-size: 17px;
  color: var(--lavender-deep);
  margin-bottom: 8px;
  font-weight: 500;
}

.intro {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.9;
  margin: 22px auto 30px;
  max-width: 400px;
  text-align: left;
}

.subtag {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 44px;
}

.home-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ========== 按钮 ========== */
.btn-primary {
  display: inline-block;
  width: 100%;
  padding: 16px 0;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--lavender), var(--lavender-deep));
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(124, 111, 168, 0.3);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid var(--lavender);
  border-radius: 999px;
  background: transparent;
  color: var(--lavender-deep);
  font-size: 15px;
  cursor: pointer;
}
.btn-sm { width: auto; padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; margin-top: 18px; }

/* ========== 答题页 ========== */
.test-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.progress-wrap {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--mist);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lavender), var(--lavender-deep));
  transition: width 0.3s ease;
}
.progress-text { font-size: 13px; color: var(--ink-soft); }

.question-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 24px;
  margin-bottom: 22px;
  min-height: 120px;
  display: flex;
  align-items: center;
}
.question-text {
  font-size: 22px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--ink);
}

.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice {
  background: var(--card);
  border: 2px solid var(--mist);
  border-radius: 16px;
  padding: 15px 18px;
  font-size: 16px;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.choice.selected {
  border-color: var(--lavender-deep);
  background: var(--mist);
  font-weight: 600;
}

.test-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}
.test-bottom .btn-primary { flex: 1; }

/* ========== 恋爱人格篇 ========== */
.home-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
  color: var(--lavender-deep);
  text-decoration: none;
}
.axes-wrap { display: flex; flex-direction: column; gap: 18px; margin-bottom: 20px; }
.axis-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.axis-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.axis-score { font-size: 14px; font-weight: 600; color: #E07A8A; }
.axis-track {
  position: relative;
  height: 12px;
  background: #EDEAF6;
  border-radius: 6px;
  overflow: hidden;
}
.axis-fill {
  height: 100%;
  background: linear-gradient(90deg, #F2A9C4, #E07A8A);
  border-radius: 6px;
  transition: width 0.8s ease;
}
.axis-marker {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 16px;
  background: rgba(58, 54, 69, 0.3);
}
.axis-desc { font-size: 12px; color: var(--ink-soft); margin-top: 6px; line-height: 1.4; }
.free-desc {
  background: var(--card);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 3px 12px rgba(124, 111, 168, 0.08);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* ========== 结果页 ========== */
.result-inner { padding-top: 10px; }
.result-kicker {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 6px;
}
.result-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: var(--lavender-deep);
  margin-bottom: 6px;
}
.result-sub {
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 20px;
  line-height: 1.5;
}

.radar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.radar-wrap svg { width: 100%; max-width: 320px; height: auto; }

.summary-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.summary-item {
  background: var(--card);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 3px 12px rgba(124, 111, 168, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.summary-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.summary-name { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.summary-text { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

.combo-line {
  text-align: center;
  font-size: 15px;
  color: var(--lavender-deep);
  background: var(--mist);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* 解锁区 */
.lock-box {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  text-align: center;
}
.lock-divider {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.lock-tip {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 16px;
}
.redeem-row {
  display: flex;
  gap: 10px;
}
.redeem-input {
  flex: 1;
  padding: 13px 16px;
  border: 2px solid var(--mist);
  border-radius: 14px;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  outline: none;
  letter-spacing: 1px;
}
.redeem-input:focus { border-color: var(--lavender-deep); }
.redeem-msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.redeem-msg.ok { color: #4CAF8A; }
.redeem-msg.err { color: #D96A6A; }

.buy-link {
  display: block;
  margin-top: 14px;
  font-size: 14px;
  color: var(--lavender-deep);
  text-decoration: underline;
  cursor: pointer;
}

.unlocked-box { text-align: center; margin: 8px 0; }

.share-canvas {
  width: 100%;
  margin-top: 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ========== 深度报告页 ========== */
.btn-back {
  margin-bottom: 20px;
  font-size: 14px;
  padding: 8px 16px;
}
.full-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--lavender-deep);
  margin-bottom: 24px;
  text-align: center;
}
.full-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 3px 14px rgba(124, 111, 168, 0.1);
  padding: 22px 20px;
  margin-bottom: 16px;
}
.full-section h3 {
  font-size: 18px;
  color: var(--lavender-deep);
  margin-bottom: 10px;
}
.full-section h4 {
  font-size: 15px;
  color: var(--ink);
  margin: 12px 0 6px;
}
.full-section p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
}
.full-section .sub {
  color: var(--ink-soft);
}
.full-section ul {
  padding-left: 20px;
}
.full-section li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
}
.highlight {
  background: var(--mist);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 0;
}
