:root {
  --bg: #0f1222; --card: #181c33; --card2: #20254a; --text: #f3f4fa; --muted: #a3a8c3;
  --accent: #7c5cff; --accent2: #22d3a6; --gold: #ffcc4d; --danger: #ff6b6b;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body { min-height: 100vh; background: radial-gradient(1200px 600px at 50% -200px, #2a2370 0%, var(--bg) 60%); }
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 18px 60px; }
.brand { font-weight: 800; letter-spacing: .3px; color: var(--muted); font-size: 14px; text-transform: uppercase; text-align: center; }
h1 { font-size: 34px; line-height: 1.15; margin: 18px 0 10px; text-align: center; }
h2 { font-size: 24px; margin: 8px 0; }
h3 { margin: 0 0 6px; font-size: 19px; }
p.lead { color: var(--muted); text-align: center; font-size: 18px; margin: 0 0 22px; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px; margin: 16px 0; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.btn { display: block; width: 100%; border: 0; border-radius: 14px; padding: 17px 18px; font-size: 18px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, var(--accent), #a35cff); cursor: pointer; text-align: center; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.alt { background: var(--card2); }
.btn.fb { background: #1877f2; }
.btn.buy { background: linear-gradient(135deg, #ff9d2e, #ff5e7e); font-size: 20px; padding: 19px; }
.btn[disabled] { opacity: .6; }
.pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 20px; }
.pill { background: var(--card); color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.ref { background: linear-gradient(135deg, #2b2f5e, #3a2b6b); border-radius: var(--radius); padding: 14px 16px; text-align: center; margin-bottom: 16px; }
.how li { margin: 6px 0; color: var(--muted); }
.small { font-size: 13px; color: var(--muted); text-align: center; }
.small a { color: var(--muted); }

/* quiz */
.progress { height: 8px; background: var(--card); border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent2), var(--accent)); transition: width .3s; }
.qmeta { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.qtitle { color: var(--muted); text-align: center; margin: 22px 0 6px; font-size: 16px; }
.qtext { font-size: 25px; font-weight: 700; text-align: center; line-height: 1.25; min-height: 96px; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.qemoji { font-size: 46px; margin-bottom: 6px; }
.opts { display: grid; gap: 10px; margin-top: 18px; }
.opt { border: 2px solid transparent; background: var(--card); color: var(--text); border-radius: 14px; padding: 15px; font-size: 18px; font-weight: 600; cursor: pointer; }
.opt.sel { border-color: var(--accent); background: var(--card2); }
@media (hover: hover) { .opt:hover { border-color: var(--accent); background: var(--card2); } }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.choice .opt { padding: 22px 12px; font-size: 17px; }
.choice .opt span { display: block; font-size: 40px; margin-bottom: 8px; }
.back { background: none; border: 0; color: var(--muted); font-size: 15px; margin-top: 18px; cursor: pointer; }
.toast { text-align: center; color: var(--accent2); font-weight: 700; min-height: 26px; margin-top: 10px; }
.fade { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* analyzing */
.spinner { width: 64px; height: 64px; border-radius: 50%; border: 6px solid var(--card2); border-top-color: var(--accent2); margin: 40px auto 20px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* results */
.hero { text-align: center; padding: 26px 20px; background: linear-gradient(160deg, #2d2378, #172046); }
.hero .you { color: var(--muted); font-size: 15px; text-transform: uppercase; letter-spacing: 1px; }
.hero .name { font-size: 36px; font-weight: 900; margin: 6px 0; }
.hero .tag { font-size: 18px; color: #d7d9ee; }
.code { display: inline-flex; gap: 6px; margin-top: 12px; }
.code b { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.bars .row { display: grid; grid-template-columns: 96px 1fr 38px; gap: 10px; align-items: center; margin: 9px 0; font-size: 15px; }
.bars .track { height: 12px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.bars .fill { height: 100%; border-radius: 99px; }
.match { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.match .title { font-size: 21px; font-weight: 800; }
.pct { font-weight: 900; font-size: 22px; color: var(--accent2); white-space: nowrap; }
.locked { position: relative; }
.locked .row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--card2); }
.locked .blur { filter: blur(7px); user-select: none; }
.lockbadge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.lockbadge span { background: rgba(15,18,34,.9); padding: 10px 16px; border-radius: 99px; font-weight: 700; }
ul.checks { list-style: none; padding: 0; margin: 12px 0 18px; }
ul.checks li { padding: 5px 0 5px 30px; position: relative; }
ul.checks li:before { content: "✓"; position: absolute; left: 4px; color: var(--accent2); font-weight: 900; }
.share { display: grid; gap: 10px; }

/* report */
.rcard { border-left: 5px solid var(--accent); }
.rcard .meta { color: var(--muted); font-size: 15px; margin: 4px 0 10px; }
.rcard .why { margin: 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { background: var(--card2); border-radius: 99px; padding: 4px 10px; font-size: 13px; }
.chip.warn { background: #3d2430; color: #ffb3b3; }
.step { background: var(--card2); border-radius: 12px; padding: 10px 12px; font-size: 15px; margin-top: 10px; }
.trait { margin: 14px 0; }
.trait .top { display: flex; justify-content: space-between; font-weight: 700; }
.plan li { margin: 10px 0; }
.note { color: var(--muted); font-size: 13px; }
@media print {
  body { background: #fff; color: #000; }
  .card, .hero { box-shadow: none; background: #fff !important; color: #000; border: 1px solid #ccc; }
  .noprint { display: none !important; }
  .hero .tag, .hero .you, .rcard .meta, .note { color: #333; }
}
