:root {
  --navy: #1a3471;
  --ink: #232323;
  --muted: #8b8b8b;
  --line: #e8e7e3;
  --lime: #d9f56c;
  --danger: #f67073;
  --card: #f7f4edf0;
  --opt: rgba(255, 255, 255, 0.82);
  --font-sans: "Inter", sans-serif;
  --font-display: "Dela Gothic One", cursive;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: #f3efe6;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
button, input { font-family: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
.opt-ico { width: 24px; height: 24px; }
.check svg { width: 12px; height: 12px; }
.pill svg { width: 14px; height: 14px; }
.copy-btn svg { width: 14px; height: 14px; }
a { color: inherit; }

#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
#bg picture, #bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#bg .thanks { opacity: 0; transition: opacity 450ms ease-in-out; }
#bg.thanks-on .thanks { opacity: 1; }
.quiz-breath {
  position: absolute;
  inset: 0;
  mix-blend-mode: soft-light;
  opacity: 0.84;
  background:
    radial-gradient(60% 50% at 20% 30%, #bedc3252 0%, transparent 70%),
    radial-gradient(50% 55% at 75% 70%, #1a347147 0%, transparent 70%),
    radial-gradient(45% 40% at 55% 20%, #c8e63c38 0%, transparent 70%);
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.glass-header {
  width: 100%;
  flex-shrink: 0;
  backdrop-filter: blur(18px) saturate(1.04);
  background: var(--card);
  border-bottom: 1px solid #ffffff73;
}
.progress-track { height: 2px; width: 100%; background: rgba(255,255,255,0.35); }
.progress-fill { height: 100%; background: var(--navy); transition: width 300ms ease-out; }
.header-row {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  padding: 0 16px;
  height: 48px;
}
.header-row .pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; justify-self: end; }
.header-row .back { padding: 4px; color: var(--ink); justify-self: start; }
.header-row a { justify-self: center; }
.header-row .spacer { width: 28px; height: 28px; }

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0;
  min-height: 0;
}
.stage-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.stage-inner.enter {
  animation: enter 180ms ease;
}
@keyframes enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.glass-card {
  backdrop-filter: blur(18px) saturate(1.04);
  background: var(--card);
  border: 1px solid #ffffff94;
  border-radius: 24px;
  padding: 24px;
}
.center-card {
  display: flex;
  flex-direction: column;
}
.center-card.splash {
  flex: 1;
  justify-content: center;
  min-height: 0;
}
.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
  max-width: 260px;
}
.btn-stack .btn {
  width: 100%;
  padding: 0 16px;
}

.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
}
.kicker.sm { font-size: 10px; }
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
}
.lede { font-size: 14px; color: rgb(35 35 35 / 0.56); line-height: 1.6; }
.hint { font-size: 14px; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  padding: 0 48px;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:disabled,
.btn-disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-ghost {
  width: 100%;
  height: auto;
  padding: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.btn-ghost:hover { color: var(--ink); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  width: 100%;
}
.btn-outline:hover { background: var(--line); }
.btn-block { width: 100%; padding: 0 16px; }
.linkish { font-size: 14px; color: var(--muted); }
.linkish:hover { color: var(--ink); }

.opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--opt);
  color: var(--ink);
  text-align: left;
  transition: background 0.2s, color 0.2s;
}
.opt:hover { background: var(--line); }
.opt.on { background: var(--navy); color: #fff; }
.opt.off { background: rgba(255,255,255,0.4); color: rgb(35 35 35 / 0.4); cursor: not-allowed; }
.opt-ico { width: 24px; height: 24px; flex-shrink: 0; color: var(--navy); }
.opt.on .opt-ico { color: #fff; }
.opt-title { display: block; font-size: 14px; font-weight: 500; }
.opt-sub { display: block; font-size: 12px; margin-top: 2px; color: rgb(35 35 35 / 0.56); }
.opt.on .opt-sub { color: rgba(255,255,255,0.7); }
.check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.opt.on .check { background: #fff; border-color: #fff; color: var(--navy); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pill {
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--opt);
  color: var(--ink);
  transition: 0.2s;
}
.pill:hover { background: var(--line); }
.pill.on { background: var(--navy); color: #fff; border-color: var(--navy); }

.scale { display: flex; gap: 12px; margin-top: 24px; justify-content: center; }
.scale button {
  width: 56px; height: 56px; border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 18px; font-weight: 700;
  background: var(--opt); color: var(--ink);
}
.scale button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.scale-labels {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted);
  padding: 0 8px; margin-top: 12px;
}

.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.sticky-next { position: sticky; bottom: 0; padding: 12px 0 16px; }

.lime {
  border-radius: 12px;
  padding: 8px 12px;
  text-align: center;
  background: var(--lime);
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
}
.chip {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--lime);
}

.product {
  background: var(--opt);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.product-img {
  width: 60px; height: 60px; border-radius: 12px;
  background: #f1efeb;
  object-fit: contain;
  flex-shrink: 0;
}
.product-col { font-size: 8px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy); }
.product-name { font-size: 12px; font-weight: 600; line-height: 1.25; }
.product-why { font-size: 10px; color: var(--muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price { font-size: 11px; font-weight: 700; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.field input {
  height: 48px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}
.field input:focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy); }
.field input.bad { border-color: var(--danger); }
.field input.bad:focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--danger); }
.err { font-size: 13px; color: var(--danger); }
.checkrow { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.checkrow input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--navy); flex-shrink: 0; }
.checkrow span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.checkrow a { color: var(--navy); text-decoration: underline; }

.fine { font-size: 12px; color: var(--muted); }
.fine.tiny { font-size: 9px; line-height: 1.4; text-align: center; margin-top: 8px; }
.mono { font-family: ui-monospace, "Courier New", monospace; font-weight: 700; }
.copy-btn {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--line);
  display: inline-flex; align-items: center; justify-content: center;
}
.copy-btn:hover { background: #dbd9d4; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  z-index: 50;
  animation: enter 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .stage-inner, .progress-fill, #bg .thanks { animation: none; transition: none; }
}
