:root {
  --bg: #f7f2ed;
  --paper: #fffdf9;
  --ink: #25211d;
  --muted: #766c63;
  --line: #e4d8cd;
  --accent: #2f6f73;
  --accent-dark: #24575b;
  --rose: #b95d5d;
  --gold: #c18d42;
  --shadow: 0 18px 50px rgba(37, 33, 29, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(47,111,115,.12), transparent 32%),
    linear-gradient(240deg, rgba(185,93,93,.12), transparent 34%),
    var(--bg);
}

button, input, select { font: inherit; }

.shell {
  width: min(760px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.screen {
  display: none;
  width: 100%;
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid rgba(228, 216, 205, 0.9);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 44px);
}

.screen.active { display: block; }

.brand {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 14px;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 7vw, 54px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 24px 0 10px;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0;
}

p { line-height: 1.8; }

.lead {
  margin: 0 0 22px;
  font-size: 18px;
  color: var(--muted);
}

.notice {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbf7f1;
  margin: 24px 0;
}

.notice p { margin: 0; }
.notice p + p { margin-top: 10px; }

.primary, .secondary, .ghost {
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  border: 0;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.primary {
  color: white;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(47, 111, 115, .24);
}

.primary:hover { background: var(--accent-dark); transform: translateY(-1px); }

.secondary {
  color: var(--accent-dark);
  background: #dcebea;
}

.ghost {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.progress {
  height: 8px;
  background: #eadfd5;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}

#progressFill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width .2s ease;
}

.question-card h2 {
  margin-top: 0;
  font-size: clamp(22px, 4vw, 30px);
}

.options {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.option {
  width: 100%;
  min-height: 64px;
  padding: 16px 18px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf4;
  color: var(--ink);
  cursor: pointer;
}

.option:hover, .option.selected {
  border-color: var(--accent);
  background: #eef7f5;
}

.option strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--accent);
  margin-right: 10px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 24px 0;
}

.score-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbf7f1;
  text-align: center;
}

.score-item b {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  color: var(--accent);
}

.result-block, .cta-block, .lead-form {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.qr-placeholder {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px dashed var(--accent);
  border-radius: 16px;
  color: var(--muted);
  background: #f4faf8;
  margin-top: 16px;
}

.lead-form {
  display: grid;
  gap: 14px;
}

.lead-form h2, .lead-form p { margin-bottom: 0; }

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

input, select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  background: white;
  color: var(--ink);
}

.status { margin: 0; color: var(--accent); }

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

@media (max-width: 640px) {
  .shell { width: min(100vw - 20px, 760px); padding: 10px 0; place-items: start center; }
  .screen { border-radius: 16px; padding: 22px 18px; }
  .score-grid { grid-template-columns: 1fr 1fr; }
  .primary, .secondary, .ghost { width: 100%; }
  .topbar .ghost { width: auto; }
}