/* 146 wrapped — Gen-Z story cards. Tokens first. */
@property --bd { syntax: "<color>"; inherits: true; initial-value: #2D3DFF; }

:root {
  --ink: #16124A;
  --night: #0B0A24;
  --blue: #2D3DFF;
  --lime: #D6FF3D;
  --pink: #FF7CC8;
  --orange: #FF5A26;
  --mint: #7DF5C9;
  --lilac: #BBA6FF;
  --paper: #F3F5FF;
  --cream: #FFF3E3;
  --display: "Unbounded", "Arial Black", sans-serif;
  --text: "Onest", system-ui, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --spring: cubic-bezier(.2, 1.5, .35, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--text);
  overflow-x: hidden;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- pre-render (before wasm) ---------- */
.prerender {
  min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px;
  padding: 24px; text-align: center; background: var(--blue); color: #fff;
}
.prerender h1 { font: 900 clamp(48px, 14vw, 120px)/.9 var(--display); margin: 0; letter-spacing: -.03em; }
.prerender p { max-width: 34ch; margin: 0; }
.pr-kicker { font-weight: 600; opacity: .8; }
.pr-cta { background: var(--lime); color: var(--ink); padding: 14px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; }

/* ---------- top: stage + desktop backdrop ---------- */
.top {
  --bd: #2D3DFF;
  position: relative;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  background: var(--night);
  transition: --bd .7s var(--out);
}
.backdrop, .side-l, .peek, .nav-btn { display: none; }

.stage {
  position: absolute; inset: 0;
  container-type: size;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  background: var(--under);
  color: var(--fg);
}
.under { position: absolute; inset: 0; background: var(--under); }

/* ---------- glass (ig:Dco0yUcxeUW) ---------- */
.glass {
  position: relative;
  background: color-mix(in srgb, var(--fg) 13%, transparent);
  border: 1px solid color-mix(in srgb, #fff 55%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.9);
  backdrop-filter: blur(14px) saturate(1.9);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.7),
    inset 0 -2px 6px rgba(255,255,255,.12),
    inset 2px 0 4px rgba(255,255,255,.18),
    0 8px 24px rgba(10, 8, 40, .16);
  color: var(--fg);
}
html.lg-svg .glass { backdrop-filter: url(#lg) blur(5px) saturate(1.9); }
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(140deg, rgba(255,255,255,.55), rgba(255,255,255,0) 38%, rgba(255,255,255,0) 70%, rgba(255,255,255,.22));
  mix-blend-mode: soft-light;
}

/* ---------- stage chrome ---------- */
.st-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 18px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 70%, transparent), transparent);
  pointer-events: none;
}
.st-head button { pointer-events: auto; }
.segs { display: flex; gap: 4px; }
.seg {
  flex: 1; height: 3.5px; border-radius: 4px; overflow: hidden;
  background: color-mix(in srgb, var(--fg) 28%, transparent);
}
.fill { display: block; height: 100%; width: 100%; background: var(--fg); transform-origin: left; transform: scaleX(0); border-radius: inherit; }
.fill.done { transform: none; }
.fill.run { animation: seg linear forwards; }
.fill.wait { transform: scaleX(.18); animation: wait 1.4s ease-in-out infinite alternate; }
@keyframes seg { to { transform: scaleX(1); } }
@keyframes wait { to { transform: scaleX(.45); } }
.stage.paused .fill.run { animation-play-state: paused; }

.st-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.st-ava { width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--fg); }
.st-name { margin: 0; flex: 1; font: 600 14px/1.1 var(--text); }
.st-name span { opacity: .65; font-weight: 500; margin-left: 6px; }
.ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.ic svg, .pill svg, .side-down svg, .nav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ic svg .solid { fill: currentColor; stroke: none; }

.st-foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 26px 12px calc(env(safe-area-inset-bottom) + 14px);
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 75%, transparent), transparent);
  transition: opacity .3s, translate .3s var(--out);
}
.st-foot.hide { opacity: 0; translate: 0 20px; pointer-events: none; }
.pill {
  height: 46px; padding: 0 18px; border-radius: 999px; border: 0;
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 15px/1 var(--text); text-decoration: none; white-space: nowrap;
}
.cta { background: var(--fg); color: var(--bg); border: 0; box-shadow: 0 10px 26px color-mix(in srgb, var(--fg) 30%, transparent); }
.cta:active, .btn:active, .opt:active, .pill:active { transform: scale(.96); }

.confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }

/* ---------- cards ---------- */
.card {
  position: absolute; inset: 0; z-index: 1;
  background: var(--bg); color: var(--fg);
  padding: calc(env(safe-area-inset-top) + 86px) 7cqw calc(env(safe-area-inset-bottom) + 92px);
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  animation: reveal .62s var(--out) both;
}
@keyframes reveal {
  from { clip-path: circle(0% at var(--tx) var(--ty)); }
  to { clip-path: circle(150% at var(--tx) var(--ty)); }
}
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.body { position: relative; z-index: 2; }
.body > * { margin: 0; }

.kicker, .pre { font: 600 clamp(15px, 4.4cqw, 19px)/1.3 var(--text); opacity: .85; margin-bottom: 2cqh; animation: rise .6s var(--out) .15s both; }
.post { font: 500 clamp(16px, 4.8cqw, 21px)/1.38 var(--text); max-width: 30ch; margin-top: 2.2cqh; animation: rise .7s var(--out) .9s both; text-wrap: pretty; }
.post.small { font-size: clamp(13px, 3.7cqw, 15px); opacity: .8; }
.post.dim { opacity: .75; margin-top: 1cqh; }
.lead { font: 500 clamp(16px, 4.8cqw, 20px)/1.35 var(--text); max-width: 23ch; margin-top: 2.4cqh; animation: rise .7s var(--out) 1s both; }
.jump { position: relative; z-index: 5; margin-top: 2cqh; min-height: 44px; padding: 0 16px; font: 700 clamp(13px, 3.8cqw, 15px)/1.15 var(--text); color: inherit; animation: rise .7s var(--out) 1.3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* kinetic type */
.kin { display: inline-block; }
.k { display: inline-block; animation: kin .8s var(--spring) both; animation-delay: calc(var(--d) + var(--i) * 45ms); }
.w { display: inline-block; white-space: nowrap; }
@keyframes kin {
  from { opacity: 0; transform: translateY(70%) rotate(10deg) scale(.5); font-weight: 300; }
  60% { font-weight: 900; }
}

/* odometer */
.num { display: block; font: 800 1em/1 var(--display); letter-spacing: -.035em; }
.odo { display: inline-flex; align-items: flex-start; font-size: min(30cqw, calc(118cqw / var(--len))); }
.duo .odo { font-size: 21cqw; }
.odo > span { display: inline-flex; }
.od { position: relative; display: inline-block; height: 1.04em; line-height: 1.04em; overflow: hidden; }
.od-ghost { visibility: hidden; }
.od-strip {
  position: absolute; left: 50%; top: 0;
  display: flex; flex-direction: column;
  transform: translate(-50%, calc((var(--n) + 10) * -1.04em));
  animation: odo 1.6s cubic-bezier(.12, .9, .22, 1) both;
  animation-delay: calc(var(--d) + var(--i) * 80ms);
}
.od-strip span { display: block; height: 1.04em; text-align: center; }
@keyframes odo { from { transform: translate(-50%, 0); } }
.od-gap { display: inline-block; width: .22em; }
.cur { font: 800 clamp(26px, 9cqw, 44px)/1 var(--display); margin-top: .6cqh; color: var(--ac); }

/* stickers */
.stk {
  position: absolute; z-index: 1; pointer-events: none; height: auto;
  filter: drop-shadow(0 12px 18px rgba(10, 8, 40, .28));
  animation: stk-in .9s var(--spring) .55s both, bob 4.6s ease-in-out 1.5s infinite alternate;
  rotate: var(--r, 0deg);
}
@keyframes stk-in { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
@keyframes bob { to { translate: 0 -10px; } }

/* margin notes */
.note {
  position: absolute; z-index: 3; margin: 0;
  font: 700 clamp(22px, 7.4cqw, 34px)/1 var(--hand);
  color: var(--ac); rotate: -7deg;
  animation: write 1s steps(16) 1.6s both;
}
@keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* buttons inside cards */
.btn {
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 clamp(14px, 4.2cqw, 16px)/1.15 var(--text); text-decoration: none; text-align: center;
  transition: transform .15s var(--out);
}
.btn.glass { border: 1px solid color-mix(in srgb, #fff 55%, transparent); }
.btn.big { min-height: 56px; width: 100%; font-size: clamp(16px, 4.8cqw, 19px); }
.actions { position: relative; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2.4cqh; }
.actions .btn { flex: 1 1 auto; }
.actions.left { justify-content: flex-start; }
.chip { display: inline-flex; min-height: 44px; align-items: center; padding: 0 16px; border-radius: 999px; margin-top: 2.4cqh; font-weight: 600; text-decoration: none; font-size: 15px; animation: rise .6s var(--out) 1.2s both; }
.link { background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; opacity: .8; margin-top: 1.4cqh; min-height: 40px; font-weight: 600; }
.title { font: 800 clamp(26px, 8.6cqw, 40px)/1.02 var(--display); letter-spacing: -.02em; text-wrap: balance; animation: rise .6s var(--out) .15s both; }
.title.big { font-size: clamp(30px, 10cqw, 46px); }

/* ---- intro ---- */
.c-intro .deco {
  background:
    radial-gradient(circle at 70% 64%, color-mix(in srgb, var(--ac) 40%, transparent) 0 18%, transparent 46%),
    radial-gradient(color-mix(in srgb, #fff 28%, transparent) 1.2px, transparent 1.6px) 0 0 / 22px 22px;
}
.c-intro .deco::after {
  content: ""; position: absolute; left: 70%; top: 64%; width: 190cqw; height: 190cqw; translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--ac) 30%, transparent) 0 6deg, transparent 6deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 12%, transparent 55%); mask: radial-gradient(circle, #000 12%, transparent 55%);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }
.c-intro { justify-content: flex-start; padding-top: calc(env(safe-area-inset-top) + 96px); }
.mega { font: 900 35cqw/.86 var(--display); letter-spacing: -.06em; margin: 0; }
.mega-sub { font: 300 15cqw/1 var(--display); letter-spacing: -.04em; color: var(--ac); margin-top: -.5cqh; font-style: normal; }
.mega-sub .k { animation-name: kin-wide; }
@keyframes kin-wide { from { opacity: 0; letter-spacing: .4em; font-weight: 900; transform: translateX(30%); } }
.mascot { position: absolute; z-index: 2; right: -5cqw; bottom: calc(env(safe-area-inset-bottom) + 66px); width: min(66cqw, 36cqh); aspect-ratio: 1; pointer-events: none; animation: stk-in 1s var(--spring) .7s both; }
.mascot video, .mascot img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(10, 8, 40, .35)); }
.s-intro-star { width: 19cqw; left: 8cqw; bottom: calc(env(safe-area-inset-bottom) + 196px); --r: -14deg; }
.s-intro-bell { width: 14cqw; right: 3cqw; top: 13cqh; --r: 16deg; animation-delay: .9s, 1.9s; }
.hint {
  position: absolute; z-index: 4; left: 6cqw; bottom: calc(env(safe-area-inset-bottom) + 84px);
  max-width: 46cqw; margin: 0; padding: 10px 14px; border-radius: 18px;
  font: 600 13px/1.25 var(--text);
  display: flex; gap: 8px; align-items: flex-start;
  animation: rise .6s var(--out) 1.8s both;
}
.hint-dot { flex: none; width: 10px; height: 10px; margin-top: 3px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 0 0 var(--ac); animation: ping 1.6s ease-out infinite; }
@keyframes ping { to { box-shadow: 0 0 0 12px transparent; } }

/* ---- raised ---- */
.c-raised .deco { background: radial-gradient(circle at 85% 18%, transparent 0 24cqw, color-mix(in srgb, var(--fg) 12%, transparent) 24cqw calc(24cqw + 2px), transparent calc(24cqw + 3px)), radial-gradient(circle at 85% 18%, transparent 0 36cqw, color-mix(in srgb, var(--fg) 10%, transparent) 36cqw calc(36cqw + 2px), transparent calc(36cqw + 3px)); }
.n-raised { right: 8cqw; top: 24cqh; }
.s-raised { width: 34cqw; right: -4cqw; bottom: calc(env(safe-area-inset-bottom) + 96px); --r: 12deg; }

/* ---- spent ---- */
.c-spent .deco { background: repeating-linear-gradient(-28deg, transparent 0 26px, color-mix(in srgb, var(--fg) 9%, transparent) 26px 28px); }
.n-spent { left: 9cqw; bottom: calc(env(safe-area-inset-bottom) + 104px); rotate: 4deg; }
.s-spent { width: 40cqw; right: -6cqw; top: 13cqh; --r: -10deg; }

/* ---- people ---- */
.c-people { justify-content: flex-start; }
.dots { position: relative; z-index: 1; width: 100%; height: 34cqh; margin-top: 3cqh; }
.n-people { right: 7cqw; bottom: calc(env(safe-area-inset-bottom) + 88px); rotate: -4deg; }

/* ---- 146 ₽ ---- */
.c-min { text-align: center; align-items: center; }
.c-min .post, .c-min .pre { margin-inline: auto; }
.jelly { font: 900 25cqw/1 var(--display); letter-spacing: -.05em; margin: 3cqh 0 !important; animation: jelly 2.6s ease-in-out 1.6s infinite; }
@keyframes jelly { 0%, 100% { transform: scale(1, 1); } 10% { transform: scale(1.12, .88); } 20% { transform: scale(.94, 1.08); } 30% { transform: scale(1.03, .97); } 40% { transform: scale(1); } }
.rays {
  position: absolute; left: 50%; top: 50%; width: 220cqh; height: 220cqh; translate: -50% -50%; z-index: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.34) 0 7deg, transparent 7deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 6%, transparent 42%); mask: radial-gradient(circle, #000 6%, transparent 42%);
  animation: spin 26s linear infinite;
}
.s-min { width: 24cqw; right: 8cqw; top: 15cqh; --r: 18deg; }

/* ---- tournaments ---- */
.c-tournaments { justify-content: flex-start; padding-top: calc(env(safe-area-inset-top) + 104px); }
.marquee { position: relative; z-index: 3; margin: 4cqh -7cqw 0; display: grid; gap: 10px; rotate: -4deg; }
.mq-row { display: flex; gap: 10px; width: max-content; animation: mq 26s linear infinite; }
.mq-row.rev { animation-direction: reverse; animation-duration: 30s; }
@keyframes mq { to { transform: translateX(-50%); } }
.tag { flex: none; padding: 10px 16px; border-radius: 999px; font: 700 15px/1.1 var(--text); white-space: nowrap; }
.c-tournaments .tag { color: var(--fg); }
.n-tour { left: 8cqw; bottom: calc(env(safe-area-inset-bottom) + 100px); }
.s-tour { width: 40cqw; right: -2cqw; bottom: calc(env(safe-area-inset-bottom) + 84px); --r: 10deg; }

/* ---- grants ---- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 4cqw; }
.duo-l { font: 600 clamp(14px, 4.2cqw, 18px)/1.25 var(--text); margin: .8cqh 0 0; animation: rise .6s var(--out) .9s both; }
.c-grants .deco { background: radial-gradient(circle at 20% 90%, color-mix(in srgb, #fff 50%, transparent) 0 18%, transparent 40%); }
.s-grants { width: 46cqw; right: -6cqw; top: 13cqh; --r: -8deg; z-index: 0; opacity: .95; }
.n-grants { left: 8cqw; bottom: calc(env(safe-area-inset-bottom) + 100px); }

/* ---- lessons & prime: graph paper ---- */
.c-lessons .deco, .c-prime .deco {
  background:
    linear-gradient(color-mix(in srgb, var(--fg) 14%, transparent) 1px, transparent 1px) 0 0 / 6cqw 6cqw,
    linear-gradient(90deg, color-mix(in srgb, var(--fg) 14%, transparent) 1px, transparent 1px) 0 0 / 6cqw 6cqw;
}
.c-lessons .deco::before { content: ""; position: absolute; top: 0; bottom: 0; left: 12cqw; width: 2px; background: color-mix(in srgb, var(--ac) 60%, transparent); }
.formula {
  margin-top: 2.6cqh !important; padding: 12px 14px; border-radius: 14px;
  font: 600 clamp(14px, 4cqw, 17px)/1.35 var(--text);
  background: color-mix(in srgb, var(--fg) 8%, transparent); border: 1.5px dashed color-mix(in srgb, var(--fg) 45%, transparent);
  animation: rise .6s var(--out) 1.8s both;
}
.n-lessons { right: 8cqw; top: 17cqh; }
.s-lessons { width: 28cqw; right: 4cqw; bottom: calc(env(safe-area-inset-bottom) + 92px); --r: -12deg; }

.eq { display: flex; flex-direction: column; font: 900 23cqw/.95 var(--display); letter-spacing: -.05em; margin: 0 !important; }
.eq-a { animation: rise .6s var(--out) .1s both; }
.eq-b { font-size: 13.5cqw; color: var(--ac); letter-spacing: -.03em; animation: split 1s var(--spring) .7s both; }
@keyframes split { from { opacity: 0; transform: translateY(-60%) scale(.6); filter: blur(6px); } }
.punch { font: 800 clamp(22px, 7cqw, 32px)/1.1 var(--display); margin-top: 2.6cqh !important; letter-spacing: -.02em; }
.n-prime { left: 7cqw; right: 7cqw; bottom: calc(env(safe-area-inset-bottom) + 96px); font-size: clamp(19px, 6cqw, 28px); rotate: -3deg; }
.s-prime { width: 30cqw; right: 6cqw; top: 13cqh; --r: 14deg; }

/* ---- ogonek ---- */
.c-ogonek { justify-content: flex-start; padding-top: calc(env(safe-area-inset-top) + 92px); }
.c-ogonek .deco {
  background:
    radial-gradient(circle, rgba(255,255,255,.7) 1px, transparent 1.6px) 0 0 / 38px 38px,
    radial-gradient(circle, rgba(255,255,255,.45) 1px, transparent 1.5px) 13px 19px / 52px 52px,
    radial-gradient(ellipse at 50% 70%, rgba(255, 184, 74, .22), transparent 60%);
  animation: snow 14s linear infinite;
}
@keyframes snow { to { background-position: 0 380px, 13px 539px, 0 0; } }
.c-ogonek .post { margin-top: 1.2cqh; font-size: clamp(14px, 4.2cqw, 18px); }
.tree { position: relative; z-index: 3; width: min(64cqw, 34cqh); margin: 1.4cqh auto 0; cursor: pointer; touch-action: manipulation; }
.tree svg { width: 100%; height: auto; overflow: visible; }
.tree .cone { fill: #164D3A; stroke: #2F7D5D; stroke-width: 2; stroke-linejoin: round; }
.tree .trunk { fill: #6B3E21; }
.tree .garland { fill: none; stroke: rgba(255, 215, 140, .5); stroke-width: 1.4; stroke-dasharray: 3 4; }
.bulb .lamp { fill: rgba(255,255,255,.22); transition: fill .25s; }
.bulb .halo { fill: var(--c); opacity: 0; transform-box: fill-box; transform-origin: center; }
.bulb.on .lamp { fill: var(--c); }
.bulb.on .halo { animation: glow 2.4s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .55; transform: scale(.6); } to { opacity: .2; transform: scale(1.1); } }
.tree-star { position: absolute; width: 18%; left: 41%; top: -7%; animation: bob 3s ease-in-out infinite alternate; filter: drop-shadow(0 0 12px rgba(255, 220, 120, .8)); }
.tree-count { text-align: center; font: 700 clamp(18px, 6cqw, 26px)/1.1 var(--hand); color: var(--ac); margin: .6cqh 0 0; min-height: 1.2em; }
.c-ogonek .actions { margin-top: 1cqh; }
.c-ogonek .btn { min-height: 46px; }
.s-ogonek { width: 13cqw; left: 5cqw; top: 46cqh; --r: -24deg; }

/* ---- meet ---- */
.c-meet .deco::after {
  content: ""; position: absolute; right: -40cqw; top: -30cqw; width: 140cqw; height: 140cqw;
  background: repeating-conic-gradient(from 10deg, color-mix(in srgb, var(--ac) 30%, transparent) 0 5deg, transparent 5deg 14deg);
  -webkit-mask: radial-gradient(circle, #000 5%, transparent 60%); mask: radial-gradient(circle, #000 5%, transparent 60%);
  animation: spin 50s linear infinite;
}
.date { font: 900 14cqw/.92 var(--display); letter-spacing: -.05em; margin: 0; }
.city { font: 700 6.4cqw/1 var(--display); color: var(--ac); margin-top: 1cqh !important; letter-spacing: -.02em; }
.n-meet { right: 30cqw; bottom: calc(env(safe-area-inset-bottom) + 112px); rotate: -6deg; }
.s-meet { width: 26cqw; right: 4cqw; bottom: calc(env(safe-area-inset-bottom) + 92px); --r: 18deg; }

/* ---- lecture ---- */
.lect { list-style: none; padding: 0; margin: 2.4cqh 0 0 !important; display: grid; gap: 10px; }
.lect li { padding: 14px 16px; border-radius: 18px; font: 700 clamp(15px, 4.4cqw, 18px)/1.3 var(--text); animation: rise .6s var(--out) both; animation-delay: .8s; }
.lect li + li { animation-delay: 1s; }
.s-lecture { width: 26cqw; right: 6cqw; top: 13cqh; --r: 24deg; }
.n-lecture { left: 8cqw; bottom: calc(env(safe-area-inset-bottom) + 100px); }

/* ---- quiz ---- */
.c-quiz .deco {
  background:
    radial-gradient(circle at 12% 20%, color-mix(in srgb, var(--pink, #FF7CC8) 70%, transparent), transparent 35%),
    radial-gradient(circle at 90% 85%, color-mix(in srgb, #3DD9FF 60%, transparent), transparent 40%);
  filter: blur(10px);
}
.quiz { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.c-quiz { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
.q-n { font: 700 14px/1 var(--display); opacity: .8; }
.q { font: 800 clamp(21px, 6.8cqw, 32px)/1.08 var(--display); letter-spacing: -.02em; margin: 1.2cqh 0 2cqh !important; text-wrap: balance; animation: rise .5s var(--out) both; }
.opts { display: grid; gap: 10px; }
.opts.row { grid-template-columns: 1fr auto; align-items: stretch; margin-top: 2cqh; }
.opt {
  min-height: 52px; padding: 10px 16px; border-radius: 18px; text-align: left;
  font: 700 clamp(15px, 4.4cqw, 18px)/1.25 var(--text);
  animation: rise .45s var(--out) both; animation-delay: calc(.15s + var(--i, 0) * 70ms);
  transition: transform .15s var(--out), background-color .2s;
}
.opt.sel { background: var(--fg); color: var(--bg); }
.opt.lvl { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.opt.lvl b { font: 800 clamp(15px, 4.6cqw, 19px)/1 var(--display); white-space: nowrap; }
.opt.lvl span { opacity: .85; font-weight: 600; text-align: right; }
.year { font: 900 24cqw/1 var(--display); letter-spacing: -.05em; margin: 0 0 1cqh !important; color: var(--ac); transition: opacity .2s; }
.year.off { font-size: 18cqw; }
.range { width: 100%; height: 44px; accent-color: var(--ac); margin: 0; }
.year-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.year-row .year { flex: 1; text-align: center; font-size: 15cqw; }
.yr-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; padding: 0; font: 800 26px/1 var(--display); color: inherit; }
.q-intro .btn { margin-top: 3cqh; }
.q-result { display: flex; flex-direction: column; align-items: stretch; }
.shot { align-self: center; width: min(46cqw, 30cqh); aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: color-mix(in srgb, var(--fg) 14%, transparent); box-shadow: 0 18px 40px rgba(10, 8, 40, .35); rotate: -3deg; animation: stk-in .8s var(--spring) both; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot-wait { height: 100%; display: grid; place-items: center; padding: 16px; text-align: center; font: 700 22px/1.1 var(--hand); }
.res-name { font: 800 clamp(20px, 6.4cqw, 28px)/1.1 var(--display); text-align: center; margin-top: 2cqh !important; letter-spacing: -.02em; }
.q-result .actions { margin-top: 1.6cqh; }
.q-result .actions .btn { min-height: 44px; padding: 0 12px; flex: 1 1 0; }
.q-result .post.small { text-align: center; margin: 1cqh auto 0; min-height: 1em; }
.q-result .btn.cta { margin-top: 1.2cqh; }
.q-result .link { align-self: center; }
.links { display: flex; justify-content: center; gap: 18px; }

/* ---- final ---- */
.c-final .deco::after {
  content: ""; position: absolute; left: 50%; bottom: -60cqw; width: 200cqw; height: 200cqw; translate: -50% 0;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--ac) 26%, transparent) 0 6deg, transparent 6deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 50%); mask: radial-gradient(circle, #000 8%, transparent 50%);
  animation: spin 46s linear infinite;
}
.final-h { font: 800 clamp(26px, 8.6cqw, 40px)/1.03 var(--display); letter-spacing: -.03em; margin: 0; display: grid; animation: rise .6s var(--out) .1s both; }
.final-h .ac { color: var(--ac); }
.ladder { list-style: none; padding: 0; margin: 2.6cqh 0 0 !important; display: grid; gap: 6px; }
.ladder li.glass { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 16px; border-radius: 16px; animation: rise .5s var(--out) both; }
.ladder li:nth-child(3) { animation-delay: .25s; } .ladder li:nth-child(5) { animation-delay: .4s; }
.ladder b { font: 800 clamp(16px, 5cqw, 21px)/1 var(--display); white-space: nowrap; }
.ladder span { font: 600 clamp(13px, 3.8cqw, 15px)/1.2 var(--text); text-align: right; opacity: .9; }
.ladder .x { justify-self: center; font: 700 clamp(18px, 5.4cqw, 24px)/1 var(--hand); color: var(--ac); margin: -2px 0; }
.c-final .btn.cta.big { margin-top: 2.2cqh; animation: rise .6s var(--out) .7s both, nudge 2.4s ease-in-out 2s infinite; }
@keyframes nudge { 0%, 80%, 100% { transform: none; } 88% { transform: scale(1.04); } }
.c-final .actions { margin-top: 1.2cqh; }
.c-final { padding-bottom: calc(env(safe-area-inset-bottom) + 28px); }
.s-final-heart { width: 20cqw; right: 6cqw; top: 13cqh; --r: 14deg; }
.s-final-mascot { width: 22cqw; left: -3cqw; bottom: 30cqh; --r: -12deg; display: none; }

/* ---------- desktop: the stage becomes a phone on a stage ---------- */
@media (min-width: 820px) and (min-height: 620px) {
  .top {
    --sh: min(88dvh, 900px);
    --sw: calc(var(--sh) * 9 / 18);
    display: grid; place-items: center;
    background: color-mix(in oklch, var(--bd) 34%, #0E0B33);
  }
  .backdrop { display: block; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
  .bd-glow {
    position: absolute; left: 50%; top: 50%; width: 120vmax; height: 120vmax; translate: -50% -50%;
    background: radial-gradient(closest-side in oklab, var(--bd), transparent 72%);
    opacity: .85;
  }
  .bd-line { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; rotate: -6deg; white-space: nowrap; }
  .bd-track {
    display: inline-flex; gap: 6vw; width: max-content;
    font: 900 26vh/1 var(--display); letter-spacing: -.05em;
    color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--bd) 45%, #fff);
    opacity: .38; animation: mq 60s linear infinite;
  }
  .stage {
    position: relative; inset: auto;
    height: var(--sh); width: var(--sw);
    border-radius: 42px;
    box-shadow: 0 0 0 10px rgba(10, 8, 40, .9), 0 0 0 11px rgba(255,255,255,.18), 0 40px 120px rgba(0,0,0,.55);
    cursor: pointer;
  }
  .st-head { padding-top: 14px; }
  .st-foot { padding-bottom: 16px; }
  .nav-btn {
    display: grid; place-items: center; position: absolute; top: 50%; translate: 0 -50%; z-index: 3;
    width: 56px; height: 56px; border-radius: 50%; padding: 0;
    --fg: #fff;
    transition: opacity .2s, transform .15s;
  }
  .nav-btn.prev { left: calc(50% - var(--sw) / 2 - 92px); }
  .nav-btn.next { left: calc(50% + var(--sw) / 2 + 36px); }
  .nav-btn:disabled { opacity: .25; cursor: default; }
  .nav-btn svg { width: 24px; height: 24px; }
  .peek {
    display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
    position: absolute; top: 50%; z-index: 2; translate: 0 -50%; rotate: 4deg;
    left: calc(50% + var(--sw) / 2 + 120px);
    width: calc(var(--sw) * .5); aspect-ratio: 9 / 16;
    padding: 18px; border: 0; border-radius: 22px; text-align: left;
    background: var(--pbg); color: var(--pfg);
    box-shadow: 0 24px 60px rgba(0,0,0,.4);
    opacity: .9; transition: opacity .3s, rotate .3s var(--out);
  }
  .peek:hover { opacity: 1; rotate: 1deg; }
  .peek.gone { opacity: 0; pointer-events: none; }
  .peek-big { font: 900 clamp(20px, 2.2vw, 32px)/.98 var(--display); letter-spacing: -.04em; }
  .peek-title { font: 600 14px/1.25 var(--text); opacity: .85; }
  .peek::before { content: "Дальше"; font: 700 20px/1 var(--hand); opacity: .8; }
}
@media (min-width: 1180px) and (min-height: 620px) {
  .side-l {
    display: grid; gap: 14px; justify-items: start;
    position: absolute; z-index: 2; top: 50%; translate: 0 -50%;
    right: calc(50% + var(--sw) / 2 + 130px); width: 270px;
    color: #fff;
  }
  .side-logo { width: 56px; height: 56px; border-radius: 50%; background: #fff; }
  .side-title { margin: 0; font: 900 44px/.95 var(--display); letter-spacing: -.04em; }
  .side-text { margin: 0; font: 500 17px/1.45 var(--text); opacity: .9; }
  .side-keys { margin: 0; font: 500 14px/1.6 var(--text); opacity: .75; }
  kbd { display: inline-block; min-width: 26px; padding: 1px 7px; border-radius: 7px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.1); font: 600 13px/1.5 var(--text); text-align: center; }
  .side-down { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.08); color: #fff; font-weight: 700; }
  .nav-btn.prev { left: calc(50% - var(--sw) / 2 - 92px); }
}
@media (max-width: 819px), (max-height: 619px) {
  .stage { height: 100%; }
}

/* ---------- home (after the stories) ---------- */
.home { background: var(--paper); color: var(--ink); overflow-x: clip; }
.h-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px max(16px, calc(50% - 600px));
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid rgba(22, 18, 74, .08);
  --fg: var(--ink); --bg: var(--lime);
}
.h-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 15px/1.1 var(--text); margin-right: auto; }
.h-brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px var(--ink); }
.h-links { display: none; gap: 4px; }
.h-links a { text-decoration: none; padding: 10px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.h-links a:hover { background: rgba(22, 18, 74, .07); }
.h-nav .pill.cta { background: var(--ink); color: var(--lime); }
@media (min-width: 900px) { .h-links { display: flex; } }

.h-hero {
  display: grid; gap: 28px; align-items: center;
  padding: 48px 16px 56px; max-width: 1200px; margin: 0 auto;
}
.h-hero h2 { font: 800 clamp(34px, 7vw, 76px)/1 var(--display); letter-spacing: -.04em; margin: 0; text-wrap: balance; }
.h-hero p { font-size: clamp(17px, 2vw, 20px); max-width: 52ch; margin: 18px 0 0; }
.h-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.h-cta .btn.big { width: auto; padding: 0 28px; }
.home .cta { background: var(--blue); color: #fff; box-shadow: 0 12px 30px rgba(45, 61, 255, .35); }
.btn.line { border: 2px solid currentColor; background: transparent; }
.h-photo { position: relative; margin: 0; }
.h-photo > img:first-child { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 28px; rotate: 2deg; box-shadow: 0 30px 60px rgba(22, 18, 74, .25); }
.h-photo .stk { animation: none; }
.h-stk-a { width: 34%; left: -6%; bottom: -14%; rotate: -8deg; }
.h-stk-b { width: 20%; right: -3%; top: -9%; rotate: 14deg; }
@media (min-width: 900px) { .h-hero { grid-template-columns: 1.15fr 1fr; padding: 96px 24px; gap: 64px; } }

.h-sec { font: 800 clamp(28px, 5vw, 52px)/1 var(--display); letter-spacing: -.035em; margin: 0 0 24px; }

.h-receipt { padding: 24px 16px 72px; display: grid; place-items: center; background: var(--ink); }
.receipt {
  width: min(460px, 100%); background: #fff; color: var(--ink); padding: 34px 26px 30px;
  rotate: -1.5deg; position: relative; margin: 12px 0;
}
.h-receipt > .receipt { filter: drop-shadow(0 30px 40px rgba(0,0,0,.35)); }
.receipt::before, .receipt::after { content: ""; position: absolute; left: 0; right: 0; height: 12px; }
.receipt::before { top: -12px; background: linear-gradient(45deg, #fff 6px, transparent 0) 0 0 / 12px 12px repeat-x, linear-gradient(-45deg, #fff 6px, transparent 0) 0 0 / 12px 12px repeat-x; background-position: 0 100%; }
.receipt::after { bottom: -12px; background: linear-gradient(135deg, #fff 6px, transparent 0) 0 0 / 12px 12px repeat-x, linear-gradient(-135deg, #fff 6px, transparent 0) 0 0 / 12px 12px repeat-x; }
.h-receipt { padding-top: 72px; }
.r-head { font: 800 20px/1.1 var(--display); text-align: center; margin: 0 0 18px; letter-spacing: -.02em; }
.receipt dl { margin: 0; display: grid; gap: 10px; }
.receipt dl div { display: flex; align-items: baseline; gap: 8px; }
.receipt dt { font-size: 15px; }
.receipt dl div::after { content: ""; order: 2; flex: 1; border-bottom: 2px dotted rgba(22, 18, 74, .35); translate: 0 -4px; }
.receipt dd { order: 3; margin: 0; font: 800 16px/1.1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.r-foot { text-align: center; font: 700 22px/1.1 var(--hand); color: var(--blue); margin: 22px 0 6px; border-top: 2px dashed rgba(22, 18, 74, .25); padding-top: 16px; }
.r-link { display: block; text-align: center; font-weight: 700; padding: 8px; }

.h-programs { max-width: 1200px; margin: 0 auto; padding: 72px 16px 24px; }
.prog {
  position: relative; display: grid; grid-template-columns: 84px 1fr; gap: 18px; align-items: start;
  padding: 26px 22px; border-radius: 28px; margin-bottom: 14px;
}
.prog .stk { position: static; width: 84px; animation: none; rotate: -6deg; }
.prog h3 { font: 800 clamp(22px, 3vw, 32px)/1.05 var(--display); margin: 0 0 8px; letter-spacing: -.02em; }
.prog p { margin: 0; max-width: 60ch; }
.prog .prog-m { margin-top: 12px; font: 700 15px/1.3 var(--text); display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.55); }
.p-lime { background: var(--lime); } .p-mint { background: var(--mint); } .p-lilac { background: var(--lilac); } .p-pink { background: var(--pink); }
@media (min-width: 900px) {
  .h-programs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .h-programs .h-sec { grid-column: 1 / -1; }
  .prog { margin: 0; grid-template-columns: 120px 1fr; padding: 34px; }
  .prog .stk { width: 120px; }
  .prog:nth-of-type(even) { translate: 0 40px; }
}

.h-levels { max-width: 1200px; margin: 0 auto; padding: 96px 16px 64px; }
.h-note { max-width: 56ch; margin: -8px 0 24px; font-size: 17px; }
.lv-row { display: grid; gap: 8px; margin-bottom: 26px; }
.lv { padding: 22px; border-radius: 24px; background: #fff; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.lv b { font: 800 clamp(24px, 3.4vw, 34px)/1 var(--display); color: var(--blue); letter-spacing: -.03em; }
.lv h3 { margin: 8px 0 6px; font: 700 19px/1.2 var(--text); }
.lv p { margin: 0; }
.lv-x { justify-self: center; font: 700 26px/1 var(--hand); color: var(--orange); }
.h-levels .btn.big { width: auto; padding: 0 30px; }
@media (min-width: 900px) { .lv-row { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 14px; } }

.h-now { background: var(--blue); color: #fff; padding: 80px 16px; }
.h-now .h-sec { max-width: 1200px; margin: 0 auto 26px; }
.now-grid { max-width: 1200px; margin: 0 auto; display: grid; gap: 16px; }
.now { position: relative; padding: 26px 22px 24px; border-radius: 28px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.3); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.now .stk { position: static; width: 74px; animation: none; rotate: 8deg; }
.now h3 { font: 800 clamp(20px, 2.4vw, 26px)/1.1 var(--display); margin: 4px 0 0; letter-spacing: -.02em; }
.now p { margin: 0 0 8px; opacity: .92; }
.now .btn { margin-top: auto; }
.h-now .cta { background: var(--lime); color: var(--ink); box-shadow: none; }
.now-tree { background: #0D1440; }
@media (min-width: 900px) { .now-grid { grid-template-columns: 1.3fr 1fr 1fr; } }

.h-replay { padding: 56px 16px; display: grid; place-items: center; background: var(--paper); }
.h-replay .btn { --fg: var(--ink); width: auto; padding: 0 28px; background: #fff; border: 2px solid var(--ink); }

.h-foot { background: var(--ink); color: #fff; padding: 48px max(16px, calc(50% - 600px)) calc(env(safe-area-inset-bottom) + 40px); }
.f-links { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.f-links a { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); text-decoration: none; font-weight: 600; font-size: 15px; }
.f-links a:hover { background: rgba(255,255,255,.1); }
.f-joke { font: 700 clamp(22px, 3vw, 30px)/1.15 var(--hand); color: var(--lime); max-width: 40ch; margin: 0 0 20px; }
.f-legal, .f-lab { font-size: 14px; opacity: .75; margin: 0 0 8px; }

/* ---------- reduced motion: content first, no autoplay, no confetti ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .card { animation: none; }
  .note { clip-path: none; }
}
