/* ================= 基础 ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background: #f6f4ff;
  background-image: radial-gradient(circle at 12% 0%, #ece6ff 0%, rgba(246, 244, 255, 0) 55%),
    radial-gradient(circle at 92% 8%, #fdeaf6 0%, rgba(246, 244, 255, 0) 45%);
  color: #262336;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  font-family: inherit;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
}

.app {
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
}

.screen.is-active {
  display: flex;
}

/* ================= 首页 ================= */
.hero {
  padding-top: 44px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 5px;
  color: #a897ff;
}

.hero-title {
  margin-top: 14px;
  font-size: 38px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 1px;
  color: #3d2e8c;
}

.hero-sub {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.9;
  color: #837c99;
}

.dim-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.dim-chip {
  padding: 6px 12px;
  border: 1px solid #e2dcff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  color: #7c6ba8;
}

/* ================= 按钮 ================= */
.action-bar {
  margin-top: auto;
  padding-top: 30px;
}

.btn {
  display: block;
  width: 100%;
  padding: 15px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 1px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn + .btn {
  margin-top: 10px;
}

.btn:active {
  transform: scale(0.985);
  opacity: 0.92;
}

.btn-primary {
  background: linear-gradient(135deg, #8a6bff, #6a4bf0);
  color: #fff;
  box-shadow: 0 10px 24px rgba(108, 79, 240, 0.28);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #e0d9ff;
  color: #6b5f8c;
}

.hint {
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
  color: #a49db8;
}

/* ================= 答题页 ================= */
.quiz-head {
  padding-top: 10px;
}

.quiz-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e5dfff;
  color: #7a6ba8;
  font-size: 14px;
  line-height: 1;
}

.back-btn.is-hidden {
  visibility: hidden;
}

.bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #e7e1fb;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #b39bff, #6a4bf0);
  transition: width 0.3s ease;
}

.quiz-count {
  flex: 0 0 auto;
  font-size: 11px;
  color: #9c94b3;
  font-variant-numeric: tabular-nums;
}

.quiz-body {
  padding-top: 46px;
}

.q-index {
  font-size: 12px;
  letter-spacing: 2px;
  color: #b3a9d6;
}

.question {
  margin-top: 10px;
  font-size: 22px;
  line-height: 1.55;
  font-weight: 600;
  color: #2b2540;
  min-height: 68px;
}

.options {
  margin-top: 26px;
}

.option {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 11px;
  padding: 16px 16px;
  border: 1px solid #e6e0fb;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
  color: #3a3452;
  box-shadow: 0 2px 8px rgba(120, 100, 200, 0.05);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.option:active {
  transform: scale(0.99);
}

.option.is-picked {
  background: #f0ebff;
  border-color: #7b5cff;
}

.option-index {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border-radius: 50%;
  background: #f1edff;
  color: #8b7ac0;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
}

.option.is-picked .option-index {
  background: #6a4bf0;
  color: #fff;
}

.quiz-foot {
  margin-top: auto;
  padding-top: 20px;
  text-align: center;
  font-size: 11px;
  color: #b3aac5;
}

/* ================= 结果页 ================= */
.report {
  padding-top: 26px;
}

.block {
  margin-bottom: 14px;
  padding: 22px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #ece7ff;
  box-shadow: 0 6px 20px rgba(120, 100, 200, 0.07);
}

.block-title {
  font-size: 15px;
  font-weight: 600;
  color: #332a5c;
}

.block-sub {
  margin-top: 4px;
  font-size: 11px;
  color: #a49db8;
}

/* 偏好画像 */
.profile-list {
  margin-top: 16px;
}

.profile-item {
  margin-bottom: 13px;
}

.profile-item:last-child {
  margin-bottom: 0;
}

.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.profile-name {
  font-size: 12px;
  color: #5c5480;
}

.profile-val {
  font-size: 11px;
  color: #8f86ad;
  font-variant-numeric: tabular-nums;
}

.track {
  height: 7px;
  border-radius: 999px;
  background: #f0ecfb;
  overflow: hidden;
}

.track-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #c9b8ff, #7b5cff);
}

/* 最佳城市 */
.best-block {
  text-align: center;
  background: linear-gradient(160deg, #ffffff 0%, #f7f3ff 100%);
}

.best-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: #a897e0;
}

.best-city {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #3d2e8c;
}

.best-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin-top: 6px;
}

.best-num {
  font-size: 26px;
  font-weight: 700;
  color: #a24bf0;
  font-variant-numeric: tabular-nums;
}

.best-unit {
  font-size: 12px;
  color: #a24bf0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}

.tag {
  padding: 5px 11px;
  border-radius: 999px;
  background: #f2edff;
  font-size: 11px;
  color: #7c6ba8;
}

.best-desc {
  margin-top: 16px;
  font-size: 13px;
  line-height: 2;
  text-align: left;
  color: #56506e;
}

.best-scene {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6f2ff;
  font-size: 12px;
  line-height: 1.9;
  text-align: left;
  color: #7b6ea6;
}

.fit-line {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e6dfff;
  font-size: 12px;
  line-height: 1.8;
  text-align: left;
  color: #8a7fb0;
}

/* 排名列表 */
.rank-list {
  margin-top: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f2eefc;
}

.rank-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rank-no {
  flex: 0 0 auto;
  width: 18px;
  font-size: 11px;
  color: #b6aed0;
}

.rank-name {
  flex: 0 0 auto;
  width: 62px;
  font-size: 14px;
  letter-spacing: 1px;
  color: #3a3452;
}

.rank-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #f2eefc;
  overflow: hidden;
}

.rank-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #d9c9ff, #8a6bff);
}

.rank-pct {
  flex: 0 0 auto;
  font-size: 11px;
  color: #8f86ad;
  font-variant-numeric: tabular-nums;
}

.disclaimer {
  margin: 6px 0 4px;
  text-align: center;
  font-size: 10px;
  color: #b6aecb;
}

/* ================= 宽度类（避免内联样式） ================= */
.fill-0 { width: 0%; }
.fill-2 { width: 2%; }
.fill-4 { width: 4%; }
.fill-6 { width: 6%; }
.fill-8 { width: 8%; }
.fill-10 { width: 10%; }
.fill-12 { width: 12%; }
.fill-14 { width: 14%; }
.fill-16 { width: 16%; }
.fill-18 { width: 18%; }
.fill-20 { width: 20%; }
.fill-22 { width: 22%; }
.fill-24 { width: 24%; }
.fill-26 { width: 26%; }
.fill-28 { width: 28%; }
.fill-30 { width: 30%; }
.fill-32 { width: 32%; }
.fill-34 { width: 34%; }
.fill-36 { width: 36%; }
.fill-38 { width: 38%; }
.fill-40 { width: 40%; }
.fill-42 { width: 42%; }
.fill-44 { width: 44%; }
.fill-46 { width: 46%; }
.fill-48 { width: 48%; }
.fill-50 { width: 50%; }
.fill-52 { width: 52%; }
.fill-54 { width: 54%; }
.fill-56 { width: 56%; }
.fill-58 { width: 58%; }
.fill-60 { width: 60%; }
.fill-62 { width: 62%; }
.fill-64 { width: 64%; }
.fill-66 { width: 66%; }
.fill-68 { width: 68%; }
.fill-70 { width: 70%; }
.fill-72 { width: 72%; }
.fill-74 { width: 74%; }
.fill-76 { width: 76%; }
.fill-78 { width: 78%; }
.fill-80 { width: 80%; }
.fill-82 { width: 82%; }
.fill-84 { width: 84%; }
.fill-86 { width: 86%; }
.fill-88 { width: 88%; }
.fill-90 { width: 90%; }
.fill-92 { width: 92%; }
.fill-94 { width: 94%; }
.fill-96 { width: 96%; }
.fill-98 { width: 98%; }
.fill-100 { width: 100%; }

.bar-w-0 { width: 0%; }
.bar-w-2 { width: 2%; }
.bar-w-4 { width: 4%; }
.bar-w-6 { width: 6%; }
.bar-w-8 { width: 8%; }
.bar-w-10 { width: 10%; }
.bar-w-12 { width: 12%; }
.bar-w-14 { width: 14%; }
.bar-w-16 { width: 16%; }
.bar-w-18 { width: 18%; }
.bar-w-20 { width: 20%; }
.bar-w-22 { width: 22%; }
.bar-w-24 { width: 24%; }
.bar-w-26 { width: 26%; }
.bar-w-28 { width: 28%; }
.bar-w-30 { width: 30%; }
.bar-w-32 { width: 32%; }
.bar-w-34 { width: 34%; }
.bar-w-36 { width: 36%; }
.bar-w-38 { width: 38%; }
.bar-w-40 { width: 40%; }
.bar-w-42 { width: 42%; }
.bar-w-44 { width: 44%; }
.bar-w-46 { width: 46%; }
.bar-w-48 { width: 48%; }
.bar-w-50 { width: 50%; }
.bar-w-52 { width: 52%; }
.bar-w-54 { width: 54%; }
.bar-w-56 { width: 56%; }
.bar-w-58 { width: 58%; }
.bar-w-60 { width: 60%; }
.bar-w-62 { width: 62%; }
.bar-w-64 { width: 64%; }
.bar-w-66 { width: 66%; }
.bar-w-68 { width: 68%; }
.bar-w-70 { width: 70%; }
.bar-w-72 { width: 72%; }
.bar-w-74 { width: 74%; }
.bar-w-76 { width: 76%; }
.bar-w-78 { width: 78%; }
.bar-w-80 { width: 80%; }
.bar-w-82 { width: 82%; }
.bar-w-84 { width: 84%; }
.bar-w-86 { width: 86%; }
.bar-w-88 { width: 88%; }
.bar-w-90 { width: 90%; }
.bar-w-92 { width: 92%; }
.bar-w-94 { width: 94%; }
.bar-w-96 { width: 96%; }
.bar-w-98 { width: 98%; }
.bar-w-100 { width: 100%; }

@media (max-width: 340px) {
  .hero-title {
    font-size: 32px;
  }

  .question {
    font-size: 19px;
  }

  .best-city {
    font-size: 30px;
  }
}
