:root {
  --bg: #0b1026;
  --bg2: #1b1446;
  --card: rgba(255, 255, 255, 0.06);
  --card-strong: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f6f2ea;
  --muted: #a9b0d0;
  --gold: #f5c451;
  --red: #ff5a6e;
  --green: #3ecf8e;
  --accent: var(--gold);
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%) fixed;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
/* quiet snowfall */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 90px 120px, #fff, transparent),
    radial-gradient(2px 2px at 160px 60px, #fff, transparent),
    radial-gradient(1px 1px at 220px 180px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 280px 20px, #fff, transparent);
  background-size: 300px 220px;
  animation: snow 30s linear infinite;
}
@keyframes snow { to { background-position: 60px 660px; } }
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

a { color: var(--accent); }
button, input { font: inherit; }

.top, .foot, .wrap { position: relative; max-width: 520px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; padding-bottom: 8px; }
.logo { font-weight: 800; letter-spacing: 0.18em; color: var(--gold); text-decoration: none; font-size: 18px; }
.wrap { padding-bottom: 32px; min-height: 60vh; }
.foot { color: var(--muted); font-size: 13px; padding-top: 24px; padding-bottom: 32px; text-align: center; border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }

h1 { font-size: clamp(26px, 7vw, 34px); line-height: 1.15; margin: 8px 0 12px; font-weight: 800; }
h2 { font-size: 22px; line-height: 1.25; margin: 8px 0 12px; font-weight: 700; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 17px; }
.muted { color: var(--muted); }
.center { text-align: center; }

.hero-emoji { font-size: 72px; line-height: 1; margin-top: 16px; }
.meta { display: inline-flex; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 16px 0; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 14px 18px;
  border: 0; border-radius: 14px; cursor: pointer;
  background: var(--accent); color: #17112e; font-weight: 800; font-size: 17px;
  text-decoration: none; text-align: center;
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform 0.1s ease, filter 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { filter: grayscale(0.6) brightness(0.8); cursor: wait; }
.btn.ghost { background: var(--card-strong); color: var(--text); box-shadow: none; border: 1px solid var(--line); font-weight: 600; }
.btn.small { width: auto; min-height: 38px; padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.stack > * + * { margin-top: 10px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 12px 0; font-size: 15px; display: block; margin: 4px auto 0; }

label { display: block; font-weight: 600; margin: 4px 0 8px; }
.input {
  width: 100%; min-height: 54px; padding: 12px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); color: var(--text); font-size: 18px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.err { color: #ff8e9b; min-height: 1.2em; font-size: 14px; margin: 8px 0; }

/* questions */
.progress { height: 6px; border-radius: 99px; background: var(--card-strong); overflow: hidden; margin: 12px 0 6px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width 0.3s ease; }
.qcount { color: var(--muted); font-size: 14px; font-weight: 600; }
.opts { display: grid; gap: 10px; margin-top: 16px; }
.opt {
  text-align: left; padding: 16px 18px; min-height: 58px; border-radius: 14px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 16px; font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.opt:hover { background: var(--card-strong); }
.opt:active { transform: scale(0.99); }
.opt.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.fade { animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

/* calculating */
.calc { text-align: center; padding: 60px 0; }
.big-spin { width: 64px; height: 64px; margin: 0 auto 24px; border-radius: 50%; border: 5px solid var(--card-strong); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--card-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* price + payment */
.price { display: flex; align-items: center; gap: 14px; }
.price b { font-size: 30px; color: var(--accent); white-space: nowrap; }
.price span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.payrows { display: grid; gap: 10px; margin: 16px 0; }
.payrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.payrow small { display: block; color: var(--muted); font-size: 13px; }
.payrow .val { font-size: 26px; font-weight: 800; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.charge { background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 14px; padding: 12px 14px; font-weight: 600; margin: 12px 0; }
.qr { background: #fff; border-radius: 16px; padding: 12px; width: 220px; margin: 8px auto; }
.qr svg { display: block; width: 100%; height: auto; }
.waiting { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 8px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.waiting .grow { flex: 1; font-weight: 600; }
.timer { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.note { color: var(--muted); font-size: 14px; }
.mock { background: #3a2d00; color: #ffe08a; border: 1px dashed #ffe08a; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 8px 0 12px; }
.fine { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 18px; text-align: center; }
.fine a { color: var(--muted); }

/* result */
.badge { display: inline-block; background: var(--card-strong); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; margin-top: 8px; }
.result {
  text-align: center; margin: 16px 0; padding: 26px 20px 22px; border-radius: 24px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 16%, transparent), var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  animation: pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
@keyframes pop { from { opacity: 0; transform: scale(0.94); } }
.r-lead { color: var(--muted); font-weight: 600; }
.r-emoji { font-size: 84px; line-height: 1.1; margin: 10px 0 4px; }
.r-title { font-size: clamp(28px, 8vw, 36px); font-weight: 800; color: var(--accent); margin: 4px 0 8px; line-height: 1.15; }
.r-tagline { font-weight: 600; font-size: 17px; }
.r-text { color: var(--text); opacity: 0.92; }
.r-advice { background: rgba(0, 0, 0, 0.22); border-radius: 12px; padding: 10px 12px; font-weight: 600; margin-top: 16px; }
.r-sign { font-style: italic; color: var(--muted); margin-top: 12px; }
.stats { text-align: left; margin: 18px 0 4px; display: grid; gap: 10px; }
.stat-top { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.bar { height: 9px; border-radius: 99px; background: rgba(0, 0, 0, 0.3); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); animation: grow 1s ease-out; }
@keyframes grow { from { width: 0 !important; } }
.tagline-cta { font-weight: 700; text-align: center; margin: 18px 0 10px; }

/* quiz list */
.qlist { display: grid; gap: 12px; margin: 16px 0; }
.qitem { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.qitem:hover { background: var(--card-strong); }
.qitem .e { font-size: 38px; }
.qitem b { display: block; line-height: 1.3; }
.qitem small { color: var(--muted); }
.section-title { font-weight: 700; margin-top: 28px; color: var(--muted); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }

/* share modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(4, 6, 20, 0.85); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.modal-box { width: 100%; max-width: 420px; background: #141a3a; border: 1px solid var(--line); border-radius: 22px; padding: 16px; }
.modal-box img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 14px; display: block; margin-bottom: 12px; }

/* terms */
.prose h2 { font-size: 18px; margin-top: 22px; }
.prose p, .prose li { color: var(--text); opacity: 0.92; }
