/* ==========================================================================
   Antlia: dark, neon, epic.
   ========================================================================== */
:root {
  --bg: #07060d;
  --bg2: #0d0b18;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f5f3ff;
  --muted: #aaa4c9;
  --dim: #6e6890;
  --gold: #fcd34d;
  --gold-2: #f59e0b;
  --violet: #a78bfa;
  --magenta: #e879f9;
  --pink: #f472b6;
  --orange: #fb923c;
  --cyan: #22d3ee;
  --green: #34d399;
  --red: #fb7185;
  --epic: linear-gradient(120deg, #8b5cf6 0%, #d946ef 45%, #fb923c 100%);
  --xp: linear-gradient(90deg, #f59e0b, #fcd34d 50%, #fff7c2);
  --radius: 20px;
  --radius-s: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Chakra Petch', 'Inter', system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body {
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
input { touch-action: manipulation; }
a { color: var(--violet); }
.ic { width: 1em; height: 1em; flex: none; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); letter-spacing: .01em; margin: 0; line-height: 1.1; }

/* ---------- Living background ---------- */
#bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(120% 80% at 50% 0%, #15102b 0%, var(--bg) 60%); }
#bg .blob { position: absolute; width: 90vmax; height: 90vmax; border-radius: 50%; opacity: .55; will-change: transform; }
#bg .b1 { background: radial-gradient(closest-side, rgba(139, 92, 246, .38), transparent); top: -45vmax; left: -30vmax; animation: drift1 22s ease-in-out infinite alternate; }
#bg .b2 { background: radial-gradient(closest-side, rgba(217, 70, 239, .25), transparent); bottom: -50vmax; right: -35vmax; animation: drift2 26s ease-in-out infinite alternate; }
#bg .b3 { background: radial-gradient(closest-side, rgba(34, 211, 238, .16), transparent); top: 20vh; left: 30vw; width: 60vmax; height: 60vmax; animation: drift3 30s ease-in-out infinite alternate; }
#bg .stars { position: absolute; inset: -50%; background-image:
  radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,.7), transparent),
  radial-gradient(1px 1px at 120px 80px, rgba(255,255,255,.5), transparent),
  radial-gradient(1.5px 1.5px at 200px 160px, rgba(196,181,253,.8), transparent),
  radial-gradient(1px 1px at 280px 40px, rgba(255,255,255,.4), transparent),
  radial-gradient(1px 1px at 60px 220px, rgba(165,243,252,.6), transparent);
  background-size: 320px 260px; animation: starfall 120s linear infinite; opacity: .5; }
@keyframes drift1 { to { transform: translate(18vw, 12vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vw, -14vh) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-20vw, 18vh) scale(.85); } }
@keyframes starfall { to { transform: translateY(260px); } }

#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 90; pointer-events: none; }

/* ---------- Shell ---------- */
#root { position: relative; z-index: 1; min-height: 100dvh; display: flex; justify-content: center; }
.app {
  position: relative; width: 100%; max-width: 480px; min-height: 100dvh;
  display: flex; flex-direction: column;
}
@media (min-width: 560px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: rgba(7, 6, 13, .35); box-shadow: 0 0 120px rgba(139, 92, 246, .15); }
}
.screen { flex: 1; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 18px) 20px calc(var(--safe-b) + 24px); }

/* ---------- Common bits ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px; border-radius: 18px; font-weight: 700; font-size: 16px; letter-spacing: .01em;
  transition: transform .18s var(--spring), filter .2s, opacity .2s; overflow: hidden; isolation: isolate;
}
.btn:active { transform: scale(.96); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--epic); color: #fff; box-shadow: 0 10px 30px -8px rgba(217, 70, 239, .6), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-primary::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); animation: sheen 3.2s ease-in-out infinite; }
.btn-gold { background: linear-gradient(120deg, #f59e0b, #fcd34d 55%, #fde68a); color: #2a1600; box-shadow: 0 10px 34px -8px rgba(252, 211, 77, .65), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-gold::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%); transform: translateX(-120%); animation: sheen 2.6s ease-in-out infinite; }
.btn-ghost { background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.btn-text { min-height: 44px; color: var(--muted); font-weight: 600; font-size: 15px; padding: 0 12px; }
.btn-block { width: 100%; }
@keyframes sheen { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.grad-text { background: var(--epic); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gold-text { background: var(--xp); -webkit-background-clip: text; background-clip: text; color: transparent; }

.field { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input {
  width: 100%; min-height: 54px; padding: 0 18px; border-radius: 16px; font-size: 16px;
  background: rgba(255,255,255,.05); border: 1.5px solid var(--line); outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(167, 139, 250, .18); background: rgba(255,255,255,.07); }
.input::placeholder { color: var(--dim); }
.err { color: var(--red); font-size: 14px; font-weight: 600; min-height: 20px; }

/* Icon tiles */
.tile {
  --c1: #a78bfa; --c2: #7c3aed;
  position: relative; display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; border-radius: 15px; font-size: 24px; color: #fff;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  box-shadow: 0 6px 20px -6px var(--c2), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 6px rgba(0,0,0,.2);
}
.tile .ic { filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.tile.sm { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; }
.tile.lg { width: 72px; height: 72px; border-radius: 22px; font-size: 36px; }
.tile.xl { width: 96px; height: 96px; border-radius: 30px; font-size: 48px; }

/* Progress bars */
.bar { position: relative; height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--c2, #7c3aed), var(--c1, #a78bfa)); transition: width .9s var(--out); box-shadow: 0 0 12px var(--c1, #a78bfa); }
.bar > i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%); background-size: 200% 100%; animation: barshine 2.4s linear infinite; }
@keyframes barshine { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.bar.xp { height: 12px; background: rgba(252, 211, 77, .1); box-shadow: inset 0 0 0 1px rgba(252, 211, 77, .15); }
.bar.xp > i { background: var(--xp); box-shadow: 0 0 16px rgba(252, 211, 77, .7); }
.bar.flash > i { animation: barflash .6s ease-out; }
@keyframes barflash { 0% { filter: brightness(2.2); } 100% { filter: none; } }

/* ==========================================================================
   Landing (also the SEO page)
   ========================================================================== */
.landing { text-align: center; gap: 0; }
.landing .hero { min-height: calc(100dvh - var(--safe-t) - 40px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px; padding-bottom: 20px; }
.emblem { position: relative; width: 148px; height: 148px; display: grid; place-items: center; margin-bottom: 4px; }
.emblem::before { content: ''; position: absolute; inset: -30px; border-radius: 50%; background: conic-gradient(from 0deg, #8b5cf6, #d946ef, #fb923c, #fcd34d, #22d3ee, #8b5cf6); filter: blur(34px); opacity: .55; animation: spin 9s linear infinite; }
.emblem svg { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 10px 30px rgba(139, 92, 246, .6)); animation: float 5s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }
.brand { font-family: var(--display); font-weight: 700; letter-spacing: .38em; font-size: 14px; color: var(--muted); text-transform: uppercase; }
.landing h1 { font-size: clamp(34px, 9vw, 46px); font-weight: 700; }
.landing .lede { color: var(--muted); font-size: 17px; max-width: 340px; margin: 0 auto; }
.landing .ctas { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 360px; }
.pills .chip { animation: pillIn .6s var(--spring) both; }
.pills .chip:nth-child(2) { animation-delay: .08s; } .pills .chip:nth-child(3) { animation-delay: .16s; } .pills .chip:nth-child(4) { animation-delay: .24s; }
@keyframes pillIn { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.scroll-hint { color: var(--dim); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 10px; }
.scroll-hint span { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

.about { text-align: left; display: flex; flex-direction: column; gap: 16px; padding: 30px 0 10px; }
.about h2 { font-size: 26px; margin-bottom: 4px; }
.feat { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.feat h3 { font-family: var(--font); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.feat p { margin: 0; color: var(--muted); font-size: 14px; }
.faq details { padding: 16px 18px; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; color: var(--violet); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); margin: 10px 0 0; font-size: 14px; }
.foot { text-align: center; color: var(--dim); font-size: 13px; padding: 24px 0 8px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; }

/* ==========================================================================
   Onboarding
   ========================================================================== */
.ob { gap: 18px; }
.ob-top { display: flex; align-items: center; gap: 12px; height: 44px; }
.ob-back { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); font-size: 20px; transition: opacity .2s; }
.ob-back[hidden] { display: grid; visibility: hidden; }
.ob-progress { flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.ob-progress i { display: block; height: 100%; width: 0; background: var(--epic); border-radius: inherit; transition: width .7s var(--out); box-shadow: 0 0 14px rgba(217, 70, 239, .8); }
.ob-stage { flex: 1; position: relative; display: flex; }
.step { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; text-align: center; animation: stepIn .55s var(--out) both; }
.step.out { animation: stepOut .3s ease-in both; }
.step.back-in { animation: stepBackIn .55s var(--out) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(40px) scale(.98); filter: blur(4px); } }
@keyframes stepOut { to { opacity: 0; transform: translateX(-40px) scale(.98); filter: blur(4px); } }
@keyframes stepBackIn { from { opacity: 0; transform: translateX(-40px); } }
.step h2 { font-size: clamp(26px, 7vw, 32px); }
.step .sub { color: var(--muted); margin: -8px auto 0; max-width: 340px; font-size: 15px; }
.step .kicker { font-family: var(--display); font-size: 13px; letter-spacing: .25em; text-transform: uppercase; color: var(--magenta); font-weight: 700; }
.opts { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.opts.grid { display: grid; grid-template-columns: 1fr 1fr; }
.opt {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 64px;
  border-radius: 18px; background: var(--panel); border: 1.5px solid var(--line); font-weight: 600; text-align: left;
  transition: transform .2s var(--spring), border-color .2s, background .2s, box-shadow .2s;
  animation: optIn .5s var(--out) both;
}
.opt:active { transform: scale(.97); }
.opt .t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.opt .t small { color: var(--muted); font-weight: 500; font-size: 13px; }
.opt .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 14px; transition: all .25s var(--spring); color: transparent; flex: none; }
.opt.on { border-color: transparent; background: linear-gradient(var(--bg2), var(--bg2)) padding-box, var(--epic) border-box; box-shadow: 0 8px 30px -10px rgba(217, 70, 239, .6); }
.opt.on .tick { background: var(--epic); border-color: transparent; color: #fff; transform: scale(1.1); }
.opts.grid .opt { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 86px; padding: 12px 14px; }
.opts.grid .opt .tick { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; }
.opt .badge { position: absolute; top: -9px; right: 14px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: var(--xp); color: #2a1600; letter-spacing: .03em; }
@keyframes optIn { from { opacity: 0; transform: translateY(14px); } }
.opts > :nth-child(2) { animation-delay: .05s; } .opts > :nth-child(3) { animation-delay: .1s; } .opts > :nth-child(4) { animation-delay: .15s; }
.opts > :nth-child(5) { animation-delay: .2s; } .opts > :nth-child(6) { animation-delay: .25s; } .opts > :nth-child(7) { animation-delay: .3s; }
.opts > :nth-child(8) { animation-delay: .35s; } .opts > :nth-child(9) { animation-delay: .4s; } .opts > :nth-child(10) { animation-delay: .45s; }
.ob-foot { display: flex; flex-direction: column; gap: 8px; position: sticky; bottom: 0; z-index: 2; margin: 0 -20px; padding: 14px 20px calc(var(--safe-b) + 6px); background: linear-gradient(rgba(7,6,13,0), var(--bg) 40%); }

.insight { padding: 26px 20px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.insight .big { font-family: var(--display); font-size: 64px; font-weight: 700; line-height: 1; }
.curve { width: 100%; height: 120px; }
.curve path.line { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.8s .3s var(--out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hold { position: relative; width: 168px; height: 168px; margin: 8px auto; border-radius: 50%; display: grid; place-items: center; touch-action: none; }
/* Long-press controls: no text selection, no "tap to search", no callout menu. */
.hold, .hold *, .chk, .chk *, .fab, .nav, .seg, .opt { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.hold .core { pointer-events: none; }
.hold svg.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.hold .core { width: 124px; height: 124px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, #2a1f4d, #120d24); border: 1px solid var(--line-2); font-weight: 800; font-family: var(--display); letter-spacing: .08em; font-size: 15px; transition: transform .2s var(--spring), box-shadow .2s; text-transform: uppercase; }
.hold.pressing .core { transform: scale(.92); box-shadow: 0 0 60px rgba(217, 70, 239, .6); }
.hold.done .core { background: var(--epic); box-shadow: 0 0 80px rgba(217, 70, 239, .8); }

.forge { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.forge .pct { font-family: var(--display); font-size: 52px; font-weight: 700; }
.forge ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%; max-width: 300px; }
.forge li { display: flex; gap: 12px; align-items: center; color: var(--dim); transition: color .3s; font-weight: 600; }
.forge li i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-style: normal; font-size: 13px; transition: all .3s var(--spring); }
.forge li.on { color: var(--text); }
.forge li.on i { background: var(--green); border-color: var(--green); color: #052e1c; transform: scale(1.1); box-shadow: 0 0 16px rgba(52, 211, 153, .7); }
.orbit { position: relative; width: 140px; height: 140px; }
.orbit svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.orbit .spin { position: absolute; inset: -14px; border-radius: 50%; border: 2px dashed rgba(167, 139, 250, .35); animation: spin 6s linear infinite; }

.hero-card { padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; text-align: left; }
.hero-card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; background: var(--epic); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.hero-row { display: flex; gap: 14px; align-items: center; }
.skill-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.skill-mini div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 600; animation: optIn .5s var(--spring) both; }
.proj b { font-size: 14px; white-space: nowrap; }
.proj { gap: 10px; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 16px; background: rgba(252, 211, 77, .08); border: 1px solid rgba(252, 211, 77, .2); }

/* ==========================================================================
   Paywall
   ========================================================================== */
.pay { gap: 18px; text-align: center; }
.pay .crown { width: 84px; height: 84px; margin: 6px auto 0; border-radius: 26px; display: grid; place-items: center; font-size: 42px; color: #2a1600; background: var(--xp); box-shadow: 0 0 60px rgba(252, 211, 77, .55); animation: float 4s ease-in-out infinite; }
.pay h2 { font-size: 30px; }
.perks { display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 6px 2px; }
.perks li { list-style: none; display: flex; gap: 12px; align-items: center; font-weight: 600; animation: optIn .5s var(--out) both; }
.perks li:nth-child(2) { animation-delay: .06s; } .perks li:nth-child(3) { animation-delay: .12s; } .perks li:nth-child(4) { animation-delay: .18s; } .perks li:nth-child(5) { animation-delay: .24s; }
.perks ul { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.timeline { padding: 18px; text-align: left; display: flex; flex-direction: column; gap: 0; }
.tl { display: flex; gap: 14px; position: relative; padding-bottom: 16px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: linear-gradient(var(--violet), rgba(167,139,250,.1)); }
.tl:last-child::before { display: none; }
.tl .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; flex: none; background: var(--panel-2); border: 1px solid var(--line-2); }
.tl .dot.go { background: var(--epic); border: 0; box-shadow: 0 0 18px rgba(217, 70, 239, .6); }
.tl b { display: block; }
.tl span { color: var(--muted); font-size: 13px; }
.pay-cta { display: flex; flex-direction: column; gap: 10px; margin: auto -20px 0; position: sticky; bottom: 0; z-index: 2; padding: 34px 20px calc(var(--safe-b) + 8px); background: linear-gradient(rgba(7,6,13,0) 0, var(--bg) 30px); }
.price { font-size: 15px; color: var(--muted); }
.price b { color: var(--text); font-size: 17px; }
.fine { font-size: 12px; color: var(--dim); line-height: 1.5; }
.fine a { color: var(--muted); }

/* ==========================================================================
   Main app
   ========================================================================== */
.main { flex: 1; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 12px) 16px calc(var(--safe-b) + 110px); gap: 14px; }
.view { display: flex; flex-direction: column; gap: 14px; animation: viewIn .45s var(--out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }

/* Header */
.hud { position: sticky; top: 0; z-index: 20; margin: calc(-1 * (var(--safe-t) + 12px)) -16px 0; padding: calc(var(--safe-t) + 12px) 16px 12px; background: linear-gradient(var(--bg) 60%, rgba(7,6,13,0)); }
.hud-row { display: flex; align-items: center; gap: 12px; }
.lvl-ring { position: relative; width: 58px; height: 58px; flex: none; }
.lvl-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.lvl-ring circle.track { stroke: rgba(252, 211, 77, .14); }
.lvl-ring circle.fill { stroke: url(#gGold); transition: stroke-dashoffset 1s var(--out); filter: drop-shadow(0 0 4px rgba(252, 211, 77, .9)); }
.lvl-ring .num { position: absolute; inset: 6px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, #3a2a6b, #140f28); font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.lvl-ring .num small { position: absolute; top: 7px; font-size: 8px; letter-spacing: .15em; color: var(--gold); font-family: var(--font); font-weight: 800; }
.lvl-ring .num b { margin-top: 6px; }
.hud-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hud-name { display: flex; align-items: baseline; gap: 8px; }
.hud-name strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-name span { font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.hud-xp { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.hud-xp b { color: var(--gold); }
.streak-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 58px; border-radius: 16px; background: linear-gradient(160deg, rgba(251, 146, 60, .22), rgba(244, 63, 94, .12)); border: 1px solid rgba(251, 146, 60, .35); flex: none; }
.streak-chip .ic { font-size: 22px; color: var(--orange); filter: drop-shadow(0 0 6px rgba(251, 146, 60, .9)); }
.streak-chip.hot .ic { animation: flicker 1.3s ease-in-out infinite; }
.streak-chip b { font-family: var(--display); font-size: 16px; line-height: 1.1; }
.streak-chip.cold { filter: grayscale(1); opacity: .5; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.12) rotate(3deg); } }

/* Segmented period tabs */
.seg { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 5px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.seg .ind { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 13px; background: var(--epic); box-shadow: 0 6px 22px -6px rgba(217, 70, 239, .8); transition: transform .45s var(--spring); }
.seg button { position: relative; z-index: 1; height: 42px; font-weight: 700; font-size: 14.5px; color: var(--muted); transition: color .25s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { color: #fff; }
.seg button .cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11px; display: grid; place-items: center; background: rgba(255,255,255,.14); }
.seg button .cnt.done { background: var(--green); color: #052e1c; }

/* Period summary */
.sum { display: flex; align-items: center; gap: 16px; padding: 16px; overflow: hidden; position: relative; }
.sum .ring { position: relative; width: 66px; height: 66px; flex: none; }
.sum .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sum .ring .fill { transition: stroke-dashoffset 1s var(--out); }
.sum .ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 17px; }
.sum .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sum .meta strong { font-size: 16px; }
.sum .meta span { color: var(--muted); font-size: 13px; }
.sum .bonus { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--gold); }
.sum.perfect { border-color: rgba(252, 211, 77, .5); box-shadow: 0 0 40px -10px rgba(252, 211, 77, .5); }
.sum.perfect::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(252, 211, 77, .14) 50%, transparent 65%); background-size: 250% 100%; animation: barshine 3s linear infinite; pointer-events: none; }

/* Quest cards */
.quests { display: flex; flex-direction: column; gap: 10px; }
.q {
  --c1: #a78bfa; --c2: #7c3aed;
  position: relative; display: flex; align-items: center; gap: 13px; padding: 13px 13px 13px 14px; border-radius: 20px;
  background: var(--panel); border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transition: transform .25s var(--spring), border-color .3s, background .3s, opacity .3s;
  animation: qIn .5s var(--out) both;
}
@keyframes qIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.q::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--c2) 22%, transparent), transparent 60%); opacity: .7; transition: opacity .3s; }
.q:active { transform: scale(.985); }
.q .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.q .name { font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s; }
.q .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.q .meta .xp { color: var(--gold); }
.q .meta .stk { color: var(--orange); display: inline-flex; align-items: center; gap: 2px; }
.q .meta .stk .ic { font-size: 13px; }
.q .meta .sk { display: inline-flex; align-items: center; gap: 4px; }
.q .meta .sk i { width: 7px; height: 7px; border-radius: 50%; background: var(--sc, var(--violet)); box-shadow: 0 0 6px var(--sc, var(--violet)); }
.q .bar { height: 6px; margin-top: 2px; }
.q .amt { font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.q.done { border-color: color-mix(in srgb, var(--c1) 45%, transparent); background: color-mix(in srgb, var(--c2) 14%, rgba(255,255,255,.03)); }
.q.done::before { opacity: 1; }
.q.done .name { color: color-mix(in srgb, var(--c1) 70%, #fff); }
.q .shine { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%); transform: translateX(-120%); }
.q.flash .shine { animation: qshine .8s ease-out; }
@keyframes qshine { to { transform: translateX(120%); } }
.q.pop { animation: qpop .5s var(--spring); }
@keyframes qpop { 30% { transform: scale(1.03); } }
.q.crit { animation: qcrit .6s var(--spring); border-color: var(--gold); box-shadow: 0 0 30px -4px rgba(252, 211, 77, .7); }
@keyframes qcrit { 20% { transform: scale(1.05) rotate(-.6deg); } 40% { transform: scale(1.02) rotate(.6deg); } }

/* The big satisfying check button */
.chk { position: relative; width: 50px; height: 50px; flex: none; border-radius: 50%; display: grid; place-items: center; touch-action: manipulation; }
.chk svg.r { position: absolute; inset: 0; transform: rotate(-90deg); }
.chk svg.r .track { stroke: rgba(255,255,255,.12); }
.chk svg.r .fill { stroke: var(--c1); transition: stroke-dashoffset .6s var(--out); filter: drop-shadow(0 0 4px var(--c1)); }
.chk .in { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--muted); background: rgba(255,255,255,.05); transition: transform .35s var(--spring), background .3s, color .3s, box-shadow .3s; }
.chk .in .ic { font-size: 20px; }
.chk:active .in { transform: scale(.82); }
.q.done .chk .in { background: linear-gradient(145deg, var(--c1), var(--c2)); color: #fff; box-shadow: 0 0 22px -2px var(--c2), inset 0 1px 0 rgba(255,255,255,.5); }
.q.done .chk .in .ic path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: tick .4s .05s var(--out) forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }
.chk .plus { position: absolute; bottom: -4px; right: -4px; padding: 1px 6px; border-radius: 99px; font-size: 10px; font-weight: 800; background: var(--c2); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.q.done .chk .plus { display: none; }

.empty { padding: 34px 20px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty .tile { animation: float 4s ease-in-out infinite; }
.empty p { color: var(--muted); margin: 0; }

.coach { position: absolute; z-index: 30; left: 50%; transform: translateX(-50%); padding: 10px 14px; border-radius: 14px; background: var(--epic); font-weight: 700; font-size: 13.5px; white-space: nowrap; box-shadow: 0 10px 30px -6px rgba(217, 70, 239, .7); animation: coach 1.6s ease-in-out infinite; pointer-events: none; }
.coach::after { content: ''; position: absolute; bottom: -6px; right: 30px; width: 12px; height: 12px; background: #d946ef; transform: rotate(45deg); }
@keyframes coach { 50% { transform: translateX(-50%) translateY(-5px); } }
.pulse-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--c1); animation: pulsering 1.6s ease-out infinite; pointer-events: none; }
@keyframes pulsering { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* FAB */
.fab { position: fixed; z-index: 40; bottom: calc(var(--safe-b) + 92px); right: max(18px, calc(50vw - 240px + 18px)); width: 62px; height: 62px; border-radius: 22px; display: grid; place-items: center; font-size: 30px; color: #fff; background: var(--epic); box-shadow: 0 12px 34px -6px rgba(217, 70, 239, .8), inset 0 1px 0 rgba(255,255,255,.4); transition: transform .3s var(--spring); }
.fab:active { transform: scale(.88) rotate(90deg); }
.fab::before { content: ''; position: absolute; inset: -6px; border-radius: 26px; border: 2px solid rgba(217, 70, 239, .5); animation: fabpulse 2.4s ease-out infinite; }
@keyframes fabpulse { from { transform: scale(.92); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }

/* Bottom nav */
.nav { position: fixed; z-index: 45; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; padding: 8px 12px calc(var(--safe-b) + 8px); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(10, 8, 20, .82); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border-top: 1px solid var(--line); }
.nav button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; font-size: 11px; font-weight: 700; color: var(--dim); transition: color .25s; }
.nav button .ic { font-size: 24px; transition: transform .35s var(--spring), filter .3s; }
.nav button.on { color: var(--text); }
.nav button.on .ic { transform: translateY(-2px) scale(1.12); color: var(--magenta); filter: drop-shadow(0 0 8px rgba(232, 121, 249, .8)); }
.nav button.on::before { content: ''; position: absolute; top: -9px; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--epic); box-shadow: 0 0 12px rgba(217, 70, 239, .9); }
.nav { grid-template-columns: repeat(5, 1fr); }
.nav-add { position: relative; display: grid; place-items: center; }
.nav-add .plus-core { position: relative; width: 60px; height: 60px; margin-top: -30px; border-radius: 22px; display: grid; place-items: center; color: #fff; font-size: 34px; font-weight: 300; line-height: 1; background: var(--epic); border: 4px solid #0b0916; box-shadow: 0 10px 30px -6px rgba(217, 70, 239, .85), inset 0 1px 0 rgba(255,255,255,.4); transition: transform .3s var(--spring); }
.nav-add .plus-core span { margin-top: -3px; }
.nav-add .plus-core::before { content: ''; position: absolute; inset: -8px; border-radius: 26px; border: 2px solid rgba(217, 70, 239, .5); animation: fabpulse 2.4s ease-out infinite; pointer-events: none; }
.nav-add:active .plus-core { transform: scale(.88) rotate(90deg); }
.nav .dot { position: absolute; top: 4px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }

/* Section titles */
.sec { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px 0; }
.sec h2 { font-size: 22px; }
.sec span { color: var(--muted); font-size: 13px; font-weight: 600; }

/* Skills */
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sk-card { --c1: #a78bfa; --c2: #7c3aed; position: relative; padding: 14px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; text-align: left; overflow: hidden; animation: qIn .5s var(--out) both; transition: transform .2s var(--spring); }
.sk-card:active { transform: scale(.97); }
.sk-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(100% 100% at 100% 0%, color-mix(in srgb, var(--c2) 30%, transparent), transparent 60%); pointer-events: none; }
.sk-card .top { display: flex; justify-content: space-between; align-items: center; }
.sk-card .lv { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1; }
.sk-card .lv small { font-size: 13px; color: var(--dim); font-weight: 600; }
.sk-card .nm { font-weight: 700; font-size: 14px; }
.sk-card .xpl { font-size: 11px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.total { display: flex; align-items: center; gap: 16px; padding: 18px; }
.total .big { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; }

/* Trophies */
.trophies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tr { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); text-align: center; animation: qIn .5s var(--out) both; }
.tr .hex { width: 58px; height: 58px; display: grid; place-items: center; font-size: 26px; clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); background: rgba(255,255,255,.07); color: var(--dim); }
.tr.on .hex { background: linear-gradient(145deg, #fde68a, #f59e0b 50%, #d946ef); color: #fff; filter: drop-shadow(0 0 12px rgba(252, 211, 77, .6)); }
.tr .tn { font-size: 12px; font-weight: 700; line-height: 1.2; }
.tr:not(.on) .tn { color: var(--dim); }
.tr .td { font-size: 10.5px; color: var(--dim); line-height: 1.3; }

/* Profile */
.prof { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.avatar { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 28px; background: var(--epic); box-shadow: 0 8px 30px -8px rgba(217, 70, 239, .8); flex: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { padding: 12px 8px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line); text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 20px; }
.stat span { font-size: 11px; color: var(--muted); font-weight: 600; }
.chart { display: flex; align-items: flex-end; gap: 5px; height: 120px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .col i { width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #fcd34d, #d946ef 60%, #7c3aed); min-height: 3px; transform-origin: bottom; animation: grow .9s var(--spring) both; box-shadow: 0 0 10px rgba(217, 70, 239, .35); }
.chart .col.zero i { background: rgba(255,255,255,.08); box-shadow: none; }
.chart .col span { font-size: 9.5px; color: var(--dim); font-weight: 700; }
.chart .col.today span { color: var(--gold); }
@keyframes grow { from { transform: scaleY(0); } }
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 4px; border-bottom: 1px solid var(--line); font-weight: 600; text-align: left; width: 100%; }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; }
.row small { color: var(--muted); font-weight: 500; }
.switch { width: 50px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.12); position: relative; transition: background .25s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch.on { background: var(--epic); }
.switch.on::after { transform: translateX(20px); }
.seg.mini { padding: 4px; border-radius: 14px; }
.seg.mini button { height: 34px; font-size: 13px; }
.seg.mini .ind { top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 10px; }
.to99 { display: flex; flex-direction: column; gap: 8px; }

/* ==========================================================================
   Sheets, toasts, overlays
   ========================================================================== */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(3, 2, 8, .6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .3s both; }
.scrim.out { animation: fadeOut .25s both; }
@keyframes fadeOut { to { opacity: 0; } }
/* Anything on its way out must never swallow taps. */
.scrim.out, .sheet.out, .lvlup.out, .toast.out { pointer-events: none; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 61; left: 50%; bottom: 0; width: 100%; max-width: 480px; max-height: 92dvh; display: flex; flex-direction: column; transform: translateX(-50%); border-radius: 28px 28px 0 0; background: linear-gradient(180deg, #17122c, #0d0a1a); border: 1px solid var(--line-2); border-bottom: 0; box-shadow: 0 -20px 60px rgba(0,0,0,.6); animation: sheetIn .5s var(--out) both; }
.sheet.out { animation: sheetOut .3s ease-in both; }
@keyframes sheetIn { from { transform: translate(-50%, 100%); } }
@keyframes sheetOut { to { transform: translate(-50%, 100%); } }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 10px auto 4px; flex: none; }
.sheet .scroll { overflow-y: auto; padding: 8px 20px calc(var(--safe-b) + 20px); display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; }
.sheet .scroll > * { flex-shrink: 0; }
.sheet h3 { font-size: 22px; }
.ed-head { display: flex; gap: 14px; align-items: center; }
.ed-head .tile { transition: transform .4s var(--spring); }
.ed-head .tile.bump { animation: bump .5s var(--spring); }
@keyframes bump { 40% { transform: scale(1.18) rotate(-6deg); } }
.ed-name { flex: 1; min-height: 58px; font-size: 18px; font-weight: 700; }
.suggest { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--magenta); animation: optIn .4s var(--spring) both; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; padding: 9px 14px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; transition: transform .2s var(--spring), background .2s, border-color .2s; }
.chips button:active { transform: scale(.94); }
.chips button.on { background: var(--epic); border-color: transparent; }
.lbl { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: -8px; display: flex; justify-content: space-between; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 48px; height: 48px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); font-size: 22px; font-weight: 700; }
.stepper button:active { transform: scale(.92); }
.stepper .input { text-align: center; font-weight: 700; font-size: 18px; flex: 1; min-width: 0; }
.diff { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.diff button { padding: 10px 4px; border-radius: 14px; background: var(--panel); border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 700; font-size: 13px; transition: all .25s var(--spring); }
.diff button small { color: var(--gold); font-size: 11px; }
.diff button.on { border-color: var(--gold); background: rgba(252, 211, 77, .1); transform: translateY(-2px); box-shadow: 0 6px 20px -8px rgba(252, 211, 77, .6); }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.swatches button { aspect-ratio: 1; border-radius: 14px; transition: transform .25s var(--spring); position: relative; }
.swatches button.on { transform: scale(1.12); box-shadow: 0 0 0 3px var(--bg2), 0 0 0 5px #fff; }
.icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.icon-grid button { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); transition: transform .2s var(--spring), background .2s, color .2s; }
.icon-grid button:active { transform: scale(.9); }
.icon-grid button.on { background: var(--epic); color: #fff; border-color: transparent; }
.icon-grid button.sug { border-color: var(--magenta); color: var(--text); }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chips button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; background: var(--panel); border: 1.5px solid var(--line); font-weight: 600; font-size: 13px; transition: all .2s; }
.skill-chips button .ic { font-size: 15px; color: var(--sc); }
.skill-chips button.on { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 18%, transparent); }
.ed-actions { display: flex; gap: 10px; }
.danger { color: var(--red); }

/* Toasts */
.toasts { position: fixed; z-index: 80; top: calc(var(--safe-t) + 10px); left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 456px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(23, 18, 44, .94); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0,0,0,.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: toastIn .5s var(--spring) both; pointer-events: auto; }
.toast.out { animation: toastOut .3s ease-in both; }
.toast .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.toast .t b { font-size: 14.5px; }
.toast .t span { font-size: 12.5px; color: var(--muted); }
.toast .x { font-family: var(--display); font-weight: 700; color: var(--gold); font-size: 16px; white-space: nowrap; }
.toast.gold { border-color: rgba(252, 211, 77, .55); box-shadow: 0 0 40px -6px rgba(252, 211, 77, .5), 0 16px 40px rgba(0,0,0,.5); }
.toast.err { border-color: rgba(251, 113, 133, .5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-30px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-20px) scale(.95); } }

/* Floating text & XP orbs */
.float-text { position: fixed; z-index: 95; transform: translate(-50%, -50%); pointer-events: none; font-family: var(--display); font-weight: 700; font-size: 22px; white-space: nowrap; color: var(--gold); text-shadow: 0 0 14px rgba(252, 211, 77, .9), 0 2px 0 rgba(0,0,0,.4); animation: floatUp 1.3s var(--out) forwards; }
.float-text.crit { font-size: 34px; color: #fff; text-shadow: 0 0 20px #f59e0b, 0 0 40px #d946ef, 0 3px 0 #000; animation: critSlam 1.6s var(--out) forwards; letter-spacing: .04em; }
.float-text.combo { font-size: 18px; color: var(--cyan); text-shadow: 0 0 12px rgba(34, 211, 238, .9); }
.float-text.minus { color: var(--dim); text-shadow: none; font-size: 18px; }
.float-text.streak { font-size: 15px; color: var(--orange); text-shadow: 0 0 12px rgba(251, 146, 60, .9); }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -80%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
@keyframes critSlam { 0% { opacity: 0; transform: translate(-50%, -50%) scale(3) rotate(-8deg); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(.95) rotate(-4deg); } 28% { transform: translate(-50%, -50%) scale(1.08) rotate(-4deg); } 75% { opacity: 1; transform: translate(-50%, -120%) scale(1) rotate(-4deg); } 100% { opacity: 0; transform: translate(-50%, -170%) scale(.9) rotate(-4deg); } }
.fly-orb { position: fixed; z-index: 96; pointer-events: none; padding: 5px 11px; border-radius: 99px; font-family: var(--display); font-weight: 700; font-size: 16px; color: #2a1600; background: var(--xp); box-shadow: 0 0 22px rgba(252, 211, 77, .95), 0 0 50px rgba(245, 158, 11, .6); white-space: nowrap; }
.fly-orb.crit { background: linear-gradient(120deg, #fde68a, #f472b6, #a78bfa); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* Level-up overlay */
.lvlup { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 42%, rgba(76, 29, 149, .92), rgba(3, 2, 8, .97) 70%); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .4s both; }
.lvlup.out { animation: fadeOut .35s both; }
.lvlup .rays { position: absolute; width: 220vmax; height: 220vmax; left: 50%; top: 42%; transform: translate(-50%, -50%); background: repeating-conic-gradient(from 0deg, rgba(252, 211, 77, .16) 0deg 7deg, transparent 7deg 18deg); -webkit-mask: radial-gradient(circle, #000 0%, transparent 45%); mask: radial-gradient(circle, #000 0%, transparent 45%); animation: rays 14s linear infinite; }
@keyframes rays { to { transform: translate(-50%, -50%) rotate(360deg); } }
.lvlup .inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 24px; }
.lvlup .kicker { font-family: var(--display); font-weight: 700; letter-spacing: .5em; font-size: 14px; color: var(--gold); text-transform: uppercase; animation: optIn .5s .2s var(--out) both; }
.lvlup .title { display: flex; gap: 2px; font-family: var(--display); font-weight: 700; font-size: clamp(44px, 13vw, 64px); line-height: 1; }
.lvlup .title span { display: inline-block; background: linear-gradient(180deg, #fff7c2, #fcd34d 45%, #f59e0b 70%, #d946ef); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(252, 211, 77, .7)); animation: letter .7s var(--spring) both; }
@keyframes letter { from { opacity: 0; transform: translateY(40px) scale(.3) rotate(-20deg); } }
.lvlup .badge { position: relative; width: 190px; height: 210px; display: grid; place-items: center; animation: badgeIn .9s .15s var(--spring) both; }
@keyframes badgeIn { from { opacity: 0; transform: scale(.2) rotate(-30deg); } }
.lvlup .badge svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 30px rgba(252, 211, 77, .7)); }
.lvlup .badge b { position: relative; font-family: var(--display); font-size: 84px; font-weight: 700; line-height: 1; margin-top: -8px; color: #fff; text-shadow: 0 0 24px rgba(255,255,255,.7), 0 4px 0 rgba(0,0,0,.3); }
.lvlup .badge b.tick { animation: numtick .25s var(--spring); }
@keyframes numtick { 50% { transform: scale(1.25); } }
.lvlup .sub { color: var(--text); font-size: 16px; font-weight: 600; max-width: 300px; animation: optIn .5s .9s var(--out) both; }
.lvlup .newtitle { font-family: var(--display); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 16px; border-radius: 99px; background: rgba(252, 211, 77, .14); border: 1px solid rgba(252, 211, 77, .5); color: var(--gold); animation: optIn .5s 1.1s var(--spring) both; }
.lvlup .btn { margin-top: 10px; min-width: 220px; animation: optIn .5s 1.3s var(--out) both; }

.banner { position: fixed; z-index: 84; left: 50%; top: 38%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; animation: bannerIn 2.4s var(--out) forwards; }
.banner b { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(38px, 11vw, 54px); line-height: 1; background: var(--xp); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(252, 211, 77, .9)); white-space: nowrap; }
.banner span { display: inline-block; margin-top: 8px; font-weight: 800; font-size: 18px; color: #fff; text-shadow: 0 0 14px rgba(217, 70, 239, .9); }
@keyframes bannerIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }

/* Loading */
.boot { flex: 1; display: grid; place-items: center; }
.loader { width: 54px; height: 54px; border-radius: 50%; border: 3px solid rgba(255,255,255,.1); border-top-color: var(--magenta); animation: spin .8s linear infinite; box-shadow: 0 0 30px rgba(217, 70, 239, .3); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }

/* Sign in */
.signin { gap: 18px; justify-content: center; text-align: center; }
.signin form { display: flex; flex-direction: column; gap: 14px; text-align: left; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.calm *, .calm *::before, .calm *::after { animation-iteration-count: 1 !important; }
.calm #bg .blob, .calm #bg .stars { animation: none !important; }
