/* ============================================================================
 *  ФормулаЦТ — Premium UI 2.2
 *  Визуальный слой поверх базовых стилей: глубокие тона, стекло, аура,
 *  золото, пружинные анимации. Подключается последним.
 * ==========================================================================*/

/* ------------------------------- ПАЛИТРА -------------------------------- */
:root {
  --ink: #0b1220;
  --ink-2: #151d31;
  --brand: #12b76a;
  --brand-600: #0e9f5b;
  --brand-700: #087443;
  --brand-300: #6ee7b7;
  --brand-100: #e7fbf1;
  --brand-glow: rgba(18, 183, 106, .35);

  --violet: #7c5cff;
  --violet-soft: #efeaff;
  --gold: #e8b44a;
  --gold-2: #f7d488;
  --gold-soft: #fdf3dc;

  --bg: #f4f6fb;
  --bg-2: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --surface-3: #ecf0f7;
  --line: #e3e8f2;
  --line-2: #cfd7e6;

  --fg: #0f172a;
  --fg-2: #5b667d;
  --fg-3: #8d97ab;

  --sh-1: 0 1px 2px rgba(15, 23, 42, .05);
  --sh-2: 0 10px 30px -12px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .04);
  --sh-3: 0 30px 70px -30px rgba(15, 23, 42, .35), 0 8px 22px -12px rgba(15, 23, 42, .18);
  --sh-brand: 0 10px 24px -10px rgba(18, 183, 106, .55);

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --r-xl: 32px;

  --font: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
}

html[data-theme="dark"] {
  --brand: #2ddc8a;
  --brand-600: #1fc47a;
  --brand-700: #12925a;
  --brand-300: #6ee7b7;
  --brand-100: #0c2b20;
  --brand-glow: rgba(45, 220, 138, .28);

  --violet: #a78bfa;
  --violet-soft: #1d1a33;
  --gold: #f0c26a;
  --gold-2: #ffe1a6;
  --gold-soft: #2a2113;

  --bg: #070b14;
  --bg-2: #0a0f1c;
  --surface: #101827;
  --surface-2: #141e30;
  --surface-3: #1b2740;
  --line: #1f2b42;
  --line-2: #2d3b57;

  --fg: #f3f6fc;
  --fg-2: #a6b2c8;
  --fg-3: #6f7c94;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
  --sh-2: 0 18px 40px -18px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .35);
  --sh-3: 0 40px 90px -30px rgba(0, 0, 0, .8);
}

/* -------------------------------- БАЗА ---------------------------------- */
html { -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  font-feature-settings: "kern" 1, "liga" 1, "ss01" 1;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(124, 92, 255, .10), transparent 60%),
    radial-gradient(800px 480px at 92% 4%, rgba(18, 183, 106, .12), transparent 62%),
    radial-gradient(700px 420px at 50% 110%, rgba(232, 180, 74, .08), transparent 60%),
    var(--bg);
  color: var(--fg);
  letter-spacing: -.011em;
}
[hidden] { display: none !important; }

body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.10'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
html[data-theme="dark"] [hidden] { display: none !important; }

body::before { opacity: .22; }

h1, .t-h1, .t-h2, .t-h3, .hero__name, .about__brand, .gate__title, .prem__title, .course-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.03em;
}
.t-h1 { font-size: 30px; line-height: 1.1; }
.t-h2 { font-size: 23px; line-height: 1.15; }
.t-h3 { font-size: 16px; letter-spacing: -.02em; }
.t-small, .t-body { letter-spacing: -.006em; }

/* ------------------------------- КНОПКИ --------------------------------- */
.btn {
  border-radius: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  transition: transform .16s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s, border-color .2s, color .2s;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn:active { transform: scale(.97) translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--brand-300), var(--brand) 38%, var(--brand-600));
  border: 0;
  color: #052e1b;
  box-shadow: 0 10px 24px -10px var(--brand-glow), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 0 rgba(0,0,0,.12);
}
html[data-theme="dark"] .btn--primary { color: #04160d; }
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.45) 45%, transparent 62%);
  transform: translateX(-130%);
  transition: transform .7s ease;
}
.btn--primary:hover::after { transform: translateX(130%); }
.btn--gold {
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 45%, #c99731);
  border: 0; color: #3a2600;
  box-shadow: 0 12px 26px -12px rgba(232,180,74,.65), inset 0 1px 0 rgba(255,255,255,.6);
}
.btn--outline { border: 1.5px solid var(--line-2); background: color-mix(in srgb, var(--surface) 82%, transparent); }
.btn--ghost { border: 0; }
.btn--lg { border-radius: 18px; padding-top: 15px; padding-bottom: 15px; }

/* ------------------------------ ПОВЕРХНОСТИ ----------------------------- */
.card {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--sh-2);
  backdrop-filter: blur(10px);
}
.card--flat { box-shadow: none; background: var(--surface-2); }
.card--brand {
  background:
    radial-gradient(600px 220px at 100% 0%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(135deg, #0c2b20, #0f766e 55%, #0e7490);
  color: #eafff6; border: 0;
}
.section-head h2 { font-family: var(--font-display); font-size: 19px; letter-spacing: -.02em; }
.section-head { position: relative; }
.section-head h2::after {
  content: ""; display: block; width: 34px; height: 3px; border-radius: 3px; margin-top: 6px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

/* ------------------------------- ТОПБАР -------------------------------- */
.topbar {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar--scrolled { box-shadow: 0 10px 30px -22px rgba(15,23,42,.5); }
.hud__xp, .hud__streak, .hud__hearts { font-weight: 800; }

/* ------------------------------- ТАББАР -------------------------------- */
.tabbar {
  left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 24px); max-width: 520px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(170%) blur(20px);
  -webkit-backdrop-filter: saturate(170%) blur(20px);
  box-shadow: 0 18px 40px -18px rgba(15,23,42,.35), inset 0 1px 0 rgba(255,255,255,.35);
  padding: 8px 8px;
  height: auto;
  gap: 2px;
}
.tabbar__item {
  border-radius: 17px; gap: 5px; padding: 8px 6px 7px;
  font-size: 10px; font-weight: 800; letter-spacing: .01em;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), color .2s, background .25s;
}
.tabbar__item.is-active {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 18%, transparent), color-mix(in srgb, var(--brand) 6%, transparent));
  color: var(--brand-700);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent);
}
html[data-theme="dark"] .tabbar__item.is-active { color: var(--brand-300); }
.tabbar__item.is-active span[style] { transform: translateY(-1px) scale(1.06); transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.tabbar__item:active { transform: scale(.94); }

/* -------------------------------- ГЕРОЙ -------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 0;
  color: #eaf6ff;
  background:
    radial-gradient(700px 300px at 88% 8%, rgba(45,220,138,.35), transparent 60%),
    radial-gradient(620px 340px at 6% 100%, rgba(124,92,255,.42), transparent 62%),
    radial-gradient(500px 320px at 50% 120%, rgba(232,180,74,.25), transparent 60%),
    linear-gradient(140deg, #0a1020, #101a33 48%, #0b2a2a);
  box-shadow: 0 34px 80px -34px rgba(6, 12, 28, .75), inset 0 1px 0 rgba(255,255,255,.12);
  padding: 24px 22px 18px;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: -40%;
  background:
    conic-gradient(from 120deg at 60% 40%, rgba(45,220,138,.18), transparent 25%, rgba(124,92,255,.22) 55%, transparent 75%, rgba(232,180,74,.16));
  filter: blur(46px);
  animation: auroraSpin 26s linear infinite;
}
.hero::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.10), transparent 32%);
}
.hero__hi { color: rgba(234,246,255,.62); font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.hero__name {
  font-family: var(--font-display); font-size: clamp(25px, 6vw, 38px); line-height: 1.02;
  margin-top: 6px; letter-spacing: -.03em;
  background: linear-gradient(100deg, #ffffff 10%, #b9ffe0 45%, #ffe3a8 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { color: rgba(234,246,255,.72); font-weight: 600; margin-top: 8px; font-size: 13px; }
.hero__stats { border-top: 1px solid rgba(255,255,255,.10); margin-top: 16px; padding-top: 14px; }
.hero__stat {
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.045));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px; padding: 12px 6px 10px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.hero__stat b { font-family: var(--font-display); font-size: clamp(18px, 4.6vw, 24px); color: #fff; line-height: 1; }
.hero__stat span { color: rgba(234,246,255,.58); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; margin-top: 4px; }

.hero .mascot { filter: drop-shadow(0 18px 26px rgba(0,0,0,.35)); animation: floatY 6s ease-in-out infinite; }

/* ------------------------------ БЫСТРЫЕ КАРТОЧКИ ------------------------ */
.quick { gap: 10px; }
.quick__card {
  color: var(--fg);
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(220px 120px at 100% 0%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%),
    var(--surface);
  box-shadow: var(--sh-2);
  padding: 15px 14px;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s, border-color .25s;
  will-change: transform;
}
.quick__card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.quick__ico {
  width: 38px; height: 38px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, transparent), color-mix(in srgb, var(--violet) 16%, transparent));
  color: var(--brand-700);
}
html[data-theme="dark"] .quick__ico { color: var(--brand-300); }
.quick__card b { font-size: 13.5px; letter-spacing: -.02em; }
.quick__card span { font-size: 11px; color: var(--fg-2); }

/* --------------------------- ПУТЬ / УРОКИ ------------------------------- */
.path__unit { filter: drop-shadow(0 20px 30px rgba(15,23,42,.10)); }
.path__head {
  border-radius: 22px !important;
  position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 18px 38px -22px rgba(15,23,42,.55);
}
.path__head::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(300px 120px at 100% 0%, rgba(255,255,255,.28), transparent 65%);
  pointer-events: none;
}
.node {
  border-radius: 20px;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s;
  box-shadow: 0 10px 20px -12px rgba(15,23,42,.35), inset 0 2px 0 rgba(255,255,255,.35);
}
.node:active { transform: scale(.94); }
.node--cur { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent), 0 16px 30px -14px var(--brand-glow); animation: nodePulse 3.2s ease-in-out infinite; }
.node--done { background: linear-gradient(160deg, var(--brand-300), var(--brand)); }
.node-dots i { background: color-mix(in srgb, var(--fg-3) 45%, transparent); }

/* ------------------------------- КУРСЫ ---------------------------------- */
.course-card {
  border-radius: 22px;
  border: 1px solid var(--line);
  border-left: 0;
  background:
    radial-gradient(260px 140px at 100% 0%, color-mix(in srgb, var(--course, var(--brand)) 12%, transparent), transparent 70%),
    var(--surface);
  box-shadow: var(--sh-2);
  position: relative; overflow: hidden;
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .28s, border-color .28s;
  will-change: transform;
}
.course-card::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, var(--course, var(--brand)), color-mix(in srgb, var(--course, var(--brand)) 35%, transparent));
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.course-card__ico {
  border-radius: 18px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--course, var(--brand)) 20%, transparent), color-mix(in srgb, var(--course, var(--brand)) 6%, transparent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.course-card__title { font-family: var(--font-display); font-size: 15px; letter-spacing: -.02em; }
.course-card__go { transition: transform .25s; }
.course-card:hover .course-card__go { transform: translateX(4px); color: var(--course, var(--brand)); }
.course-tool {
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s, border-color .22s;
}
.course-tool:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }

/* ------------------------------ ПРЕМИУМ -------------------------------- */
.prem {
  border-radius: 26px;
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(255,225,166,.35), transparent 60%),
    linear-gradient(135deg, #1a1305, #2b210c 45%, #4a3410);
  color: #fff6e2;
  border: 1px solid rgba(232,180,74,.35);
  box-shadow: 0 30px 70px -30px rgba(70,48,8,.8), inset 0 1px 0 rgba(255,255,255,.14);
  position: relative; overflow: hidden;
}
.prem::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.18) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: shimmerSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}
.prem__title { font-family: var(--font-display); letter-spacing: -.02em; }
.prem__sub { color: rgba(255,246,226,.7); }
.plan { border-radius: 20px; border-width: 1.5px; transition: transform .22s cubic-bezier(.34,1.56,.64,1), border-color .22s, box-shadow .22s; }
.plan:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.plan.is-on { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent), var(--sh-2); }
.prod { border-radius: 18px; transition: transform .22s cubic-bezier(.34,1.56,.64,1), border-color .22s, box-shadow .22s; }
.prod:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }

/* ------------------------------ ОНБОРДИНГ ------------------------------ */
.onb {
  background:
    radial-gradient(800px 500px at 50% -10%, rgba(124,92,255,.20), transparent 60%),
    radial-gradient(700px 460px at 100% 20%, rgba(18,183,106,.16), transparent 62%),
    var(--bg);
}
.onb__body { animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both; }
.onb__body .t-h1 { font-size: 32px; line-height: 1.06; }
.pick {
  border-radius: 20px;
  border: 1.5px solid var(--line);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), border-color .22s, box-shadow .22s, background .22s;
}
.pick:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.pick.is-on { border-color: var(--brand); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), var(--surface)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.pick__ico { border-radius: 15px; background: linear-gradient(140deg, color-mix(in srgb, var(--brand) 18%, transparent), color-mix(in srgb, var(--violet) 14%, transparent)); }

/* ------------------------------- ЗАГРУЗКА ------------------------------ */
.boot { background: radial-gradient(700px 500px at 50% 30%, rgba(18,183,106,.12), transparent 60%), var(--bg); }
.boot__logo { animation: floatY 4s ease-in-out infinite; filter: drop-shadow(0 18px 30px var(--brand-glow)); }
.boot__title { font-family: var(--font-display); letter-spacing: -.03em; font-size: 26px; }
.boot__sub { color: var(--fg-2); font-weight: 600; }
.boot__bar { border-radius: 999px; overflow: hidden; }
.boot__bar i { background: linear-gradient(90deg, var(--brand), var(--gold)); }

/* ------------------------------- РЕЗУЛЬТАТ ----------------------------- */
.result__stars span:not(:empty) { animation: starPop .6s cubic-bezier(.34,1.56,.64,1) both; }
.result__stars span:nth-child(2) { animation-delay: .12s; }
.result__stars span:nth-child(3) { animation-delay: .24s; }
.result__title { font-family: var(--font-display); }
.result__card { border-radius: 20px; box-shadow: var(--sh-2); }
.result__card b { font-family: var(--font-display); }

/* ------------------------------- ЭКРАНЫ -------------------------------- */
.screen { position: relative; z-index: 1; }
.screen.is-enter > * { animation: fadeUp .42s cubic-bezier(.2,.7,.2,1) both; }
.screen.is-enter > *:nth-child(2) { animation-delay: .05s; }
.screen.is-enter > *:nth-child(3) { animation-delay: .09s; }
.screen.is-enter > *:nth-child(4) { animation-delay: .13s; }

/* ------------------------------- АНИМАЦИИ ------------------------------ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes auroraSpin { to { transform: rotate(360deg); } }
@keyframes shimmerSweep { 0%,55% { transform: translateX(-120%); } 85%,100% { transform: translateX(120%); } }
@keyframes nodePulse { 0%,100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent), 0 16px 30px -14px var(--brand-glow); } 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--brand) 8%, transparent), 0 18px 36px -14px var(--brand-glow); } }
@keyframes starPop { from { opacity: 0; transform: scale(.3) rotate(-18deg); } to { opacity: 1; transform: none; } }
@keyframes ripple { from { transform: scale(0); opacity: .55; } to { transform: scale(2.6); opacity: 0; } }

/* появление карточек */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in { animation: fadeUp .55s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }

/* рябь по кнопкам */
.ripple-dot {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  animation: ripple .6s ease-out forwards; z-index: 0; opacity: .35;
}

/* стеклянные чипы */
.chip { border-radius: 999px; border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); background: color-mix(in srgb, var(--surface) 80%, transparent); font-weight: 800; letter-spacing: -.01em; }
.chip--brand { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, transparent), color-mix(in srgb, var(--brand) 8%, transparent)); color: var(--brand-700); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
html[data-theme="dark"] .chip--brand { color: var(--brand-300); }
.chip--gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #3a2600; border-color: transparent; }

/* статистика */
.stat-hero .stat-box, .stat-box { border-radius: 20px; box-shadow: var(--sh-2); }
.stat-card { border-radius: 18px; box-shadow: var(--sh-2); }

/* поля */
input, textarea, select, .input {
  border-radius: 16px !important;
  border-width: 1.5px !important;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus, .input:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
  outline: 0;
}

/* скроллбар */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 420px) {
  .t-h1 { font-size: 26px; }
  .hero { padding: 20px 16px 16px; border-radius: 24px; }
  .hero__name { font-size: 27px; }
  .tabbar { width: calc(100% - 16px); bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}

@media (min-width: 900px) {
  .hero { padding: 30px 30px 22px; }
  .hero__name { font-size: 40px; }
}


/* --------------------------- МИКРО-ДЕТАЛИ ------------------------------- */
.quick__card, .course-card, .tabbar__item, .prod { position: relative; overflow: hidden; }
.plan { position: relative; }
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  z-index: 90; pointer-events: none; border-radius: 0 2px 2px 0;
  box-shadow: 0 0 12px var(--brand-glow);
  transition: width .08s linear;
}
.cursor-glow {
  position: fixed; width: 380px; height: 380px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 10%, transparent), transparent 62%);
  transform: translate(-50%, -50%); z-index: 0; opacity: 0; transition: opacity .4s;
  will-change: left, top;
}
@media (hover: hover) and (pointer: fine) { .cursor-glow { opacity: .8; } }

.plan .plan__badge { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #3a2600; box-shadow: 0 6px 16px -8px rgba(232,180,74,.9); top: -9px; }


/* ------------------------- прокрутка треков ----------------------------- */
.track-scroll {
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  margin-inline: -4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.track-scroll::-webkit-scrollbar { display: none; }
.track-scroll .chip { flex: 0 0 auto; scroll-snap-align: start; }
.track-scroll::after { content: ""; flex: 0 0 8px; }

/* ----------------------------- план: пусто ----------------------------- */
.plan-empty {
  border-radius: 24px; padding: 22px; margin-top: 14px;
  background:
    radial-gradient(420px 200px at 100% 0%, color-mix(in srgb, var(--violet) 14%, transparent), transparent 65%),
    color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid var(--line); box-shadow: var(--sh-2);
}
.plan-empty__row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; color: var(--fg-2); }
.plan-empty__row:last-child { border-bottom: 0; }
.plan-empty__n { width: 26px; height: 26px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); font-weight: 900; font-size: 12px; color: var(--brand-700); }

/* ------------------------- десктопный док ------------------------------- */
@media (min-width: 1100px) {
  .tabbar {
    top: 50%; bottom: auto; left: auto; right: 22px; transform: translateY(-50%);
    width: 78px; max-width: 78px;
    grid-auto-flow: row; grid-auto-columns: auto;
    padding: 10px 7px; gap: 4px; border-radius: 24px;
  }
  .tabbar__item { flex-direction: column; gap: 3px; font-size: 9px; padding: 9px 2px; }
  .tabbar__item span[style] { width: 22px !important; height: 22px !important; }
  .screen { padding-bottom: 32px; }
}

.topbar.topbar--scrolled { background: color-mix(in srgb, var(--bg) 97%, transparent); }
.theory__formula, .solution__step, .lab__given { scrollbar-width: thin; }

.theory__formula { white-space: normal !important; overflow-wrap: anywhere; }
.solution__step { overflow-wrap: anywhere; }

.quick__card::after { content: none !important; }
.bar__fill { background-image: linear-gradient(90deg, var(--brand), var(--brand-300)) !important; }
.bar__fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.28) 50%, transparent 80%); transform: translateX(-100%); animation: barShine 2.8s ease-in-out infinite; }
.bar__fill { position: relative; overflow: hidden; }
@keyframes barShine { 0%,60% { transform: translateX(-100%); } 90%,100% { transform: translateX(100%); } }

/* --------------------------- нижний скрим ------------------------------- */
body.has-tabs::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(104px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 42%, color-mix(in srgb, var(--bg) 55%, transparent) 70%, transparent);
  z-index: 44; pointer-events: none;
}
@media (min-width: 1100px) { body.has-tabs::after { display: none; } }

/* --------------------------- бейджи курсов ------------------------------ */
.course-card__badge {
  position: absolute; top: 10px; right: 12px;
  font-size: 9px; font-weight: 900; letter-spacing: .08em;
  padding: 4px 8px; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #3a2600; box-shadow: 0 6px 14px -8px rgba(232,180,74,.9);
}

body.has-tabs .screen { padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)); }
body.has-tabs .screen--flush { padding-bottom: 0; }
