:root {
  --bg: #efe8fb;
  --card: #ffffff;
  --purple: #7b61ff;
  --purple-deep: #6a4dff;
  --ink: #3a2d72;
  --muted: #9b93c0;
  --line: #eee8ff;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

.cta:disabled { opacity: 0.7; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #d9d1ef;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
}

.phone {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: linear-gradient(#f7f3ff, var(--bg) 180px);
  padding: 8px 18px 36px;
}

.topbar {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  padding: 8px 0 6px;
}

.topbar h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  text-align: center;
}

.icon-btn, .dots {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #222;
  padding: 0;
}

.dots { text-align: right; letter-spacing: -2px; }

.lock-wrap { display: flex; justify-content: center; margin: 28px 0 14px; }

.lock {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(180deg, #8b74ff, #6d54f2);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(109, 84, 242, 0.28);
}

.lock svg { width: 42px; height: 42px; }

.title {
  margin: 0;
  text-align: center;
  font-size: 28px;
  letter-spacing: 0.5px;
}

.subtitle {
  margin: 8px 0 22px;
  text-align: center;
  color: var(--muted);
  letter-spacing: 0.18em;
  font-size: 12px;
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 18px 16px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(90, 70, 180, 0.06);
}

.card-label {
  margin: 0 0 12px;
  text-align: center;
  font-weight: 650;
}

#code-input {
  width: 100%;
  height: 56px;
  border: 0;
  background: #f4f1fb;
  border-radius: 16px;
  text-align: center;
  font-size: 28px;
  letter-spacing: 14px;
  color: var(--ink);
  outline: none;
}

.hint, .info-text, .credit, .error {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.hint { margin: 10px 0 0; }
.error { color: #d14b6a; margin: 8px 0 0; }

.info p:first-child {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}

.info-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4aa3ff;
  color: #fff;
  font-size: 12px;
  display: inline-grid;
  place-items: center;
}

.info-text { text-align: left; line-height: 1.7; margin: 0; }

.cta {
  width: 100%;
  border: 0;
  margin-top: 10px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(180deg, #8a70ff, var(--purple-deep));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(106, 77, 255, 0.28);
}

.cta.ghost {
  background: #fff;
  color: var(--purple-deep);
  border: 1px solid #ddd4ff;
  box-shadow: none;
}

.credit { margin-top: 18px; }

.progress { margin: 18px 0 8px; color: var(--muted); }
.bar {
  height: 8px;
  background: #e7dffb;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 22px;
}
#bar-fill {
  display: block;
  height: 100%;
  width: 12%;
  background: var(--purple);
}

.q-title { font-size: 22px; margin: 0 0 18px; }

.options { display: grid; gap: 12px; }

.option {
  text-align: left;
  border: 0;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  font-size: 16px;
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(90, 70, 180, 0.06);
}

.option:active { transform: scale(0.99); }

.eyebrow { text-align: center; color: var(--purple-deep); margin: 18px 0 8px; font-weight: 650; }
.city { text-align: center; font-size: 40px; margin: 6px 0; }
.city-en { text-align: center; color: var(--muted); letter-spacing: 0.08em; }
.result-pin { text-align: center; font-size: 42px; margin: 8px 0 0; }
.pct {
  text-align: center;
  font-size: 64px;
  font-weight: 800;
  color: var(--purple-deep);
  margin: 0;
  line-height: 1.1;
}
.types { justify-content: center; margin: 12px 0 8px; }
.flavors { justify-content: center; margin-bottom: 16px; }
.flavors span { background: #f7f3ff; color: #6b5ea8; }
.card-title, .block-title { margin: 0 0 12px; font-size: 16px; }
.reason-text { margin: 0; color: #5a507f; line-height: 1.8; font-size: 14px; text-align: left; }
.portrait-row {
  display: grid;
  grid-template-columns: 72px 1fr 32px;
  gap: 8px;
  align-items: center;
  margin: 9px 0;
  font-size: 13px;
  color: #6b5ea8;
}
.portrait-track {
  height: 8px;
  background: #eee8ff;
  border-radius: 99px;
  overflow: hidden;
}
.portrait-fill {
  height: 100%;
  background: #7b61ff;
  border-radius: 99px;
}
.portrait-num { text-align: right; color: var(--ink); font-weight: 650; }
.other-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.other-item:last-child { border-bottom: 0; padding-bottom: 0; }
.other-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.other-name { font-weight: 700; }
.other-name small { color: var(--muted); font-weight: 400; }
.other-pct { color: var(--purple-deep); font-weight: 800; }
.other-item .chips { margin: 8px 0; }
.other-desc { margin: 0; color: #5a507f; font-size: 13px; line-height: 1.7; }

.intro-title { font-size: 24px; padding: 0 8px; }
.lock.pin {
  font-size: 32px;
  line-height: 1;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.stat {
  background: #fff;
  border-radius: 18px;
  padding: 16px 8px 14px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(90, 70, 180, 0.06);
}

.stat-icon { font-size: 22px; margin-bottom: 4px; }
.stat-icon.red { color: #e23d3d; font-weight: 800; font-size: 26px; }
.stat strong { display: block; font-size: 20px; }
.stat span { color: var(--muted); font-size: 12px; }

.info em { color: var(--purple-deep); font-style: normal; font-weight: 700; }

.dim-list { display: grid; gap: 10px; margin-bottom: 14px; }

.dim {
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  box-shadow: 0 8px 24px rgba(90, 70, 180, 0.05);
}

.dim span { font-size: 18px; }
.dim p { margin: 0; font-size: 14px; color: #5a507f; line-height: 1.5; }
.dim b { color: var(--ink); }

.group-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(90, 70, 180, 0.06);
}

.group-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.group-head h3 { margin: 0; font-size: 16px; }
.group-head small { color: var(--muted); }

.g-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f3e9c8;
}
.g-ico.blue { background: #e4ecff; }
.g-ico.green { background: #e5f4ea; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  background: #f4f1fb;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

.dim-tag {
  margin: 0 0 8px;
  color: var(--purple-deep);
  font-size: 13px;
  font-weight: 700;
}

.city-group {
  text-align: center;
  color: var(--purple-deep);
  margin-top: 0;
}
