:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f8fafc;
  --muted: #a8b3c7;
  --cyan: #48d7ff;
  --lime: #b7ff63;
  --pink: #ff5ebc;
  --yellow: #ffd166;
  --orange: #ff9866;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 18%, rgba(72, 215, 255, 0.24), transparent 26rem),
    radial-gradient(circle at 86% 0%, rgba(255, 94, 188, 0.2), transparent 22rem),
    linear-gradient(135deg, #09111f 0%, #111827 46%, #14162a 100%);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px max(26px, env(safe-area-inset-bottom));
  position: relative;
}

.topbar {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
}

.brand,
.icon-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.brand {
  min-width: 82px;
  height: 34px;
  border-radius: 8px;
  font-weight: 900;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
}

.screen {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero,
.stack {
  display: grid;
  gap: 18px;
}

.hero {
  padding: 22px 0 8px;
}

.kicker {
  width: fit-content;
  border: 1px solid rgba(72, 215, 255, 0.45);
  color: var(--cyan);
  background: rgba(72, 215, 255, 0.08);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 11vw, 58px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  font-size: 25px;
  line-height: 1.12;
}

h3 {
  font-size: 17px;
}

.lead {
  color: #d8e2f5;
  font-size: 17px;
  line-height: 1.62;
}

.muted {
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero-card {
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(72, 215, 255, 0.16) 49% 50%, transparent 51%),
    repeating-linear-gradient(0deg, transparent 0 16px, rgba(255, 255, 255, 0.05) 17px);
  opacity: 0.55;
  pointer-events: none;
}

.hero-card > * {
  position: relative;
}

.btn {
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 14px 16px;
  color: #07111f;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  font-weight: 900;
  text-align: center;
  box-shadow: 0 14px 34px rgba(72, 215, 255, 0.22);
}

.btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line);
  box-shadow: none;
}

.btn.hot {
  background: linear-gradient(135deg, var(--pink), var(--yellow));
}

.btn-row,
.grid {
  display: grid;
  gap: 10px;
}

.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: #eaf1ff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.progress-wrap {
  display: grid;
  gap: 9px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--lime), var(--yellow));
  transition: width 180ms ease;
}

.question-card {
  display: grid;
  gap: 18px;
}

.option {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  padding: 16px;
  text-align: left;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
}

.option:active,
.btn:active,
.icon-btn:active {
  transform: translateY(1px);
}

.option-label {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #09111f;
  background: var(--cyan);
  font-weight: 900;
}

.result-code {
  font-size: clamp(56px, 18vw, 92px);
  line-height: 0.9;
  font-weight: 1000;
  color: var(--lime);
  text-shadow: 0 0 28px rgba(183, 255, 99, 0.28);
}

.result-name {
  font-size: clamp(34px, 11vw, 56px);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.result-hero {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.persona-visual {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 3 / 4;
  margin: 6px auto 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.persona-sprite,
.persona-file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.persona-sprite {
  background-repeat: no-repeat;
  background-size: 400% 400%;
}

.persona-file {
  object-fit: cover;
}

.section-title {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 8px;
}

.text-block {
  color: #dce7f8;
  line-height: 1.7;
}

.share-card {
  aspect-ratio: 9 / 16;
  min-height: 560px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(72, 215, 255, 0.2), transparent 34%),
    linear-gradient(25deg, rgba(255, 94, 188, 0.22), transparent 42%),
    #101827;
  box-shadow: var(--shadow);
}

.share-canvas {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #101827;
}

.hidden-canvas {
  display: none;
}

.share-image {
  width: 100%;
  display: block;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #101827;
  object-fit: cover;
  -webkit-touch-callout: default;
  user-select: auto;
}

.share-card .result-code {
  font-size: 78px;
}

.qr-placeholder {
  width: 86px;
  height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.form {
  display: grid;
  gap: 12px;
}

.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  min-height: 50px;
  padding: 0 14px;
  outline: none;
}

.input:focus {
  border-color: var(--cyan);
}

.lead-magnet-page {
  gap: 12px;
  padding: 14px 0 8px;
}

.lead-magnet-page .panel {
  padding: 16px;
}

.lead-intro {
  display: grid;
  gap: 12px;
}

.lead-intro .section-title,
.compact-panel .section-title {
  margin-bottom: 0;
}

.lead-intro h2 {
  font-size: 27px;
  line-height: 1.18;
}

.lead-intro .text-block {
  line-height: 1.58;
}

.lead-callout strong {
  color: var(--lime);
}

.qrcode-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.wechat-qrcode {
  display: block;
  width: min(240px, 72vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  border: 8px solid #fff;
  border-radius: 8px;
  -webkit-touch-callout: default;
  user-select: auto;
}

.qrcode-tip {
  color: #dce7f8;
  font-size: 15px;
  line-height: 1.65;
}

.qrcode-tip strong {
  color: var(--text);
}

.compact-panel {
  display: grid;
  gap: 8px;
}

.reply-format {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.reply-example {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.benefit-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
  color: #dce7f8;
  font-size: 14px;
  line-height: 1.5;
}

.bars {
  display: grid;
  gap: 11px;
}

.bar-line {
  display: grid;
  gap: 6px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  color: #dce7f8;
  font-size: 13px;
}

.bar-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
}

.list {
  display: grid;
  gap: 8px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  color: #dce7f8;
}

@media (min-width: 720px) {
  .screen {
    min-height: 760px;
  }
}
