:root {
  --bg: #f6f1e8;
  --card: #fffdf8;
  --ink: #18211d;
  --muted: #687269;
  --line: #e1d5c2;
  --teal: #126b5a;
  --teal-dark: #0b4d40;
  --gold: #b88432;
  --gold-soft: #f4e5c7;
  --dark: #18211d;
  --shadow: 0 16px 42px rgba(53, 41, 23, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(180deg, rgba(18, 107, 90, 0.1), transparent 260px), var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.app {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 14px 14px 32px;
}

.screen {
  min-height: 100vh;
  min-height: 100svh;
}

.hidden {
  display: none !important;
}

.quiz-screen,
.result-screen,
.pay-dialog,
#quiz-screen,
#result-screen,
#pay-dialog,
#quiz,
#result,
#payDialog {
  display: none !important;
}

.quiz-screen.active,
#quiz-screen.active,
#quiz.active {
  display: block !important;
}

.result-screen.active,
#result-screen.active,
#result.active {
  display: block !important;
}

.pay-dialog[open],
#pay-dialog[open],
#payDialog[open] {
  display: block !important;
}

.landing-screen {
  display: grid;
  gap: 12px;
  padding-bottom: 22px;
}

.landing-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.hero-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 28px);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(18, 107, 90, 0.12), transparent 54%),
    linear-gradient(135deg, rgba(184, 132, 50, 0.16), transparent 52%),
    var(--card);
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #344039;
  font-size: 13px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--dark);
  color: #fff5dc;
}

.hero-copy {
  margin: auto 0;
  padding: 34px 0 24px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

h1 {
  margin-bottom: 14px;
  max-width: 100%;
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: break-word;
}

.landing-section h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 6.3vw, 31px);
  line-height: 1.16;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow),
.landing-section > p:not(.eyebrow),
.question-card p,
.result-note p,
.pain-note p,
.risk-card p,
.opportunity-card p,
.stuck-card p,
.offer-card li,
.trust-card p {
  color: var(--muted);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.hero-proof span {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(18, 107, 90, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.primary-btn,
.cta-stack button {
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
  font-weight: 900;
}

.primary-btn:active,
.secondary-wide-btn:active,
.cta-stack button:active,
.text-btn:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(0.96);
}

.primary-btn,
.cta-stack button:first-child {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 14px 24px rgba(18, 107, 90, 0.22);
}

.micro-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.security-notice {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.pain-section,
.solution-section,
.trust-section,
.product-section,
.action-section {
  padding: 20px 18px;
}

.pain-list,
.step-list {
  display: grid;
  gap: 10px;
}

.pain-list article,
.step-list article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8eb;
}

.pain-list strong,
.step-list strong {
  font-size: 16px;
}

.pain-list span,
.step-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.step-list article {
  background: #fff;
}

.step-list span {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--dark);
  color: #fff5dc;
  font-size: 12px;
  font-weight: 950;
}

.secondary-wide-btn {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border-radius: 8px;
  background: var(--gold);
  color: #fff;
  font-weight: 900;
}

.trust-section {
  background: linear-gradient(180deg, rgba(18, 107, 90, 0.08), transparent 160px), #fffdf8;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.trust-grid div {
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.trust-grid strong,
.trust-grid span {
  display: block;
}

.trust-grid strong {
  color: var(--teal-dark);
  font-size: 18px;
}

.trust-grid span {
  color: var(--muted);
  font-size: 12px;
}

.product-section ul,
.product-ladder {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-section li,
.product-ladder article {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #3c4740;
  font-size: 14px;
  font-weight: 800;
}

.product-ladder article {
  display: grid;
  gap: 8px;
  min-height: 116px;
  border-color: rgba(18, 107, 90, 0.18);
  background: linear-gradient(180deg, rgba(18, 107, 90, 0.06), transparent 80px), #fff;
}

.product-ladder strong {
  font-size: 18px;
  line-height: 1.2;
}

.product-ladder p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.product-tag {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #80571f;
  font-size: 12px;
  font-weight: 950;
}

.product-section li::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.action-section {
  background: var(--dark);
  color: #fff8eb;
}

.action-section .eyebrow {
  color: #f2d49b;
}

.action-section p {
  color: rgba(255, 248, 235, 0.74);
}

.action-section .primary-btn {
  margin-top: 8px;
  background: #fff8eb;
  color: var(--dark);
  box-shadow: none;
}

.quiz-screen {
  flex-direction: column;
  padding: 14px 0 24px;
}

.quiz-top {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fffdf8;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  box-shadow: var(--shadow);
}

.progress-wrap span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5dbc9;
}

.progress-bar i {
  display: block;
  width: 12.5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 0.2s ease;
}

.quiz-form {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.question-card,
.result-card,
.result-note,
.pain-note,
.risk-card,
.opportunity-card,
.stuck-card,
.offer-card,
.trust-card,
.modal {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: var(--shadow);
}

.question-card {
  display: none;
}

.question-card.active {
  display: grid;
}

.question-card {
  gap: 14px;
  padding: 18px;
}

.question-no {
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
}

.question-card h2,
.result-card h2 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.18;
}

.question-guide {
  margin-bottom: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: #fff8eb;
  font-size: 13px;
}

.question-card input[type="text"] {
  width: 100%;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.option-list,
.chip-grid {
  display: grid;
  gap: 9px;
}

.chip-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-list label,
.chip-grid label {
  position: relative;
  display: flex;
}

.option-list input,
.chip-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-list span,
.chip-grid span {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #303a33;
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.option-list input:checked + span,
.chip-grid input:checked + span {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.sticky-action {
  position: sticky;
  bottom: calc(12px + env(safe-area-inset-bottom));
  margin-top: auto;
}

.result-screen {
  align-content: start;
  gap: 12px;
  padding: 22px 0;
}

.result-card,
.result-note {
  padding: 18px;
}

.pain-note,
.risk-card,
.stuck-card {
  padding: 18px;
  border-color: rgba(184, 132, 50, 0.45);
  background: #fff8eb;
}

.opportunity-card,
.offer-card,
.trust-card {
  padding: 18px;
}

.result-card {
  background: linear-gradient(180deg, rgba(18, 107, 90, 0.08), transparent 120px), #fffdf8;
}

.result-card h2 {
  margin-bottom: 8px;
  font-size: 34px;
}

.result-card p {
  color: #465149;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.score-row div {
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8eb;
}

.score-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.score-row strong {
  font-size: 18px;
}

.result-note h3,
.pain-note h3,
.risk-card h3,
.opportunity-card h3,
.stuck-card h3,
.offer-card h3,
.trust-card h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.offer-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.cta-stack {
  display: grid;
  gap: 8px;
}

.cta-stack .secondary-cta {
  background: var(--gold);
  color: #fff;
}

.cta-stack .light-cta {
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
}

.wechat-hint {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  text-align: center;
}

.wechat-id {
  color: var(--teal-dark);
  font-size: 15px;
  font-weight: 950;
}

.wechat-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.wechat-hint-active {
  border-color: var(--gold);
  background: #fff8eb;
  box-shadow: 0 0 0 3px rgba(184, 132, 50, 0.16);
}

@media (min-width: 720px) {
  .product-ladder {
    grid-template-columns: repeat(3, 1fr);
  }
}

.text-btn {
  min-height: 44px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.modal {
  width: min(92vw, 420px);
  padding: 22px;
}

.modal::backdrop {
  background: rgba(18, 24, 21, 0.45);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  max-width: min(88vw, 420px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(24, 33, 29, 0.92);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 380px) {
  .app {
    padding-inline: 10px;
  }

  .chip-grid,
  .score-row {
    grid-template-columns: 1fr;
  }
}
