:root {
  --bg0: #0B0822;
  --bg1: #130E3A;
  --bg2: #1C1557;
  --card: rgba(255, 255, 255, .06);
  --card2: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .11);
  --text: #F3F0FF;
  --muted: #A9A3D1;
  --violet: #7C5CFF;
  --violet2: #A08BFF;
  --violet-deep: #4A31BF;
  --blue: #4D7CFE;
  --cyan: #5AD7FF;
  --mango: #FFC53D;
  --ok: #3DDC97;
  --ok-deep: #1F9E68;
  --bad: #FF5C7A;
  --bad-deep: #C7334F;
  --r: 18px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(120% 80% at 50% 0%, var(--bg2) 0%, var(--bg1) 45%, var(--bg0) 100%) fixed;
  font-size: 16px;
  line-height: 1.4;
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.gap-lg { gap: 20px; }

#app { height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; position: relative; }

/* звёздное небо */
#app::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .55; z-index: -1;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 64% 31%, #cfc6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 31% 42%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 90% 52%, #bfe9ff 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 66%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 47% 76%, #cfc6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 86%, #fff 50%, transparent 51%);
}

.boot { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--muted); }
.boot-moon { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #cfc6ff 60%, #8f7bff); box-shadow: 0 0 40px rgba(160, 139, 255, .6); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); box-shadow: 0 0 60px rgba(160, 139, 255, .85); } }

.screen { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px calc(var(--tab-h) + var(--safe-b) + 20px); position: relative; }
.screen.full { padding-bottom: calc(var(--safe-b) + 20px); }
.screen > * { animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* кнопки */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 12px 18px;
  border-radius: 16px; font-weight: 800; font-size: 16px; letter-spacing: .01em; color: #fff;
  background: linear-gradient(180deg, #9179FF, #6B4BF0); box-shadow: 0 4px 0 var(--violet-deep);
  transition: transform .06s, box-shadow .06s, opacity .15s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--violet-deep); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.ok { background: linear-gradient(180deg, #4BE5A4, #2FC486); box-shadow: 0 4px 0 var(--ok-deep); color: #06281A; }
.btn.bad { background: linear-gradient(180deg, #FF7590, #F04A6B); box-shadow: 0 4px 0 var(--bad-deep); }
.btn.gold { background: linear-gradient(180deg, #FFD466, #FFB21F); box-shadow: 0 4px 0 #C07F00; color: #3A2500; }
.btn.ghost { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--text); }
.btn.ghost:active { transform: scale(.98); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.sm { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 12px; width: auto; box-shadow: 0 3px 0 var(--violet-deep); }
.btn.sm.ghost { box-shadow: inset 0 0 0 1.5px var(--line); }
.link { color: var(--violet2); font-weight: 700; padding: 10px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; backdrop-filter: blur(6px); }
.card.tap:active { background: var(--card2); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--card2); font-size: 12px; font-weight: 700; color: var(--muted); }
.chip.violet { background: rgba(124, 92, 255, .25); color: #D6CCFF; }
.chip.gold { background: rgba(255, 197, 61, .18); color: var(--mango); }

/* верхняя панель */
.topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 800; font-size: 15px; }
.pill.dim { opacity: .55; filter: grayscale(.8); }
.pill .inf { font-size: 18px; line-height: 1; }
.course-pill { margin-right: auto; }

/* нижние вкладки */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; padding-bottom: var(--safe-b); background: rgba(13, 9, 40, .86); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabs-inner { display: flex; width: 100%; max-width: 560px; height: var(--tab-h); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tab svg { width: 26px; height: 26px; }
.tab.on { color: #fff; }
.tab.on svg { color: var(--violet2); filter: drop-shadow(0 0 8px rgba(160, 139, 255, .7)); }

/* главный экран */
.hero { position: relative; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: #150F45; }
.hero-scene { display: block; width: 100%; height: auto; }
.bubble { position: absolute; top: 12px; left: 12px; right: 12px; text-align: center; pointer-events: none; }
.bubble span { display: inline-block; max-width: 100%; background: rgba(255, 255, 255, .95); color: #231A52; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 16px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.goal-row { display: flex; align-items: center; gap: 14px; }
.ring { position: relative; width: 62px; height: 62px; flex: none; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.next-card { background: linear-gradient(135deg, rgba(124, 92, 255, .32), rgba(77, 124, 254, .22)); border-color: rgba(160, 139, 255, .4); }
.quest { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.quest + .quest { border-top: 1px solid var(--line); }
.quest-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--card2); display: flex; align-items: center; justify-content: center; font-size: 19px; flex: none; }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--cyan)); transition: width .4s ease; }
.bar.ok i { background: linear-gradient(90deg, #2FC486, #7CF2C0); }
.banner { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #3B2A9E, #5B3FD6 55%, #3F6BE0); border: 0; }

/* путь */
.level-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; }
.level-badge { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--violet), var(--blue)); display: flex; align-items: center; justify-content: center; font-weight: 900; }
.unit { margin-bottom: 12px; }
.unit.soon { opacity: .55; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; width: 100%; text-align: left; }
.lesson-row + .lesson-row { border-top: 1px solid var(--line); }
.node { width: 42px; height: 42px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900; background: var(--card2); color: var(--muted); }
.node.is-done { background: linear-gradient(180deg, #4BE5A4, #2FC486); color: #06281A; }
.node.is-current { background: linear-gradient(180deg, #9179FF, #6B4BF0); color: #fff; box-shadow: 0 0 0 4px rgba(124, 92, 255, .3), 0 0 18px rgba(124, 92, 255, .7); animation: pulse-node 1.8s ease-in-out infinite; }
.node.is-open { background: rgba(124, 92, 255, .3); color: #fff; }
@keyframes pulse-node { 50% { box-shadow: 0 0 0 8px rgba(124, 92, 255, .15), 0 0 26px rgba(124, 92, 255, .9); } }
.grammar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* урок */
.lesson { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.lesson-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px 6px; }
.x { width: 36px; height: 36px; border-radius: 12px; background: var(--card); font-size: 18px; color: var(--muted); flex: none; }
.lesson-top .bar { flex: 1; height: 12px; }
.lesson-body { flex: 1; overflow-y: auto; padding: 14px 16px 24px; display: flex; flex-direction: column; }
.lesson-body > .ex { animation: slide .25s ease both; flex: 1; display: flex; flex-direction: column; }
@keyframes slide { from { opacity: 0; transform: translateX(24px); } }
.lesson-foot { padding: 12px 16px calc(14px + var(--safe-b)); }
.task { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--violet2); margin-bottom: 10px; }
.prompt { font-size: 22px; font-weight: 800; line-height: 1.3; margin-bottom: 6px; -webkit-user-select: text; user-select: text; }
.prompt.l2 { font-size: 26px; }
.sub { color: var(--muted); font-size: 15px; }
.spacer { flex: 1; min-height: 16px; }
.say { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(180deg, #5E8BFF, #3F6BE0); box-shadow: 0 3px 0 #2847A8; font-size: 20px; flex: none; }
.say:active { transform: translateY(2px); box-shadow: 0 1px 0 #2847A8; }
.say.big { width: 110px; height: 110px; border-radius: 32px; font-size: 46px; margin: 10px auto; box-shadow: 0 6px 0 #2847A8; }
.say.slow { background: var(--card2); box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.options { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.opt { text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); font-weight: 700; font-size: 16px; transition: transform .06s; }
.opt:active { transform: translateY(2px); }
.opt.right { background: rgba(61, 220, 151, .2); border-color: var(--ok); }
.opt.wrong { background: rgba(255, 92, 122, .2); border-color: var(--bad); animation: shake .3s; }
.opt.fade { opacity: .45; }
.opt.sel { border-color: var(--violet2); background: rgba(124, 92, 255, .25); }
.opt.gone { opacity: .25; pointer-events: none; border-color: var(--ok); }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.intro-card { text-align: center; padding: 26px 18px; margin-top: 8px; background: linear-gradient(160deg, rgba(124, 92, 255, .28), rgba(77, 124, 254, .14)); border-color: rgba(160, 139, 255, .35); }
.note { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(90, 215, 255, .1); border: 1px solid rgba(90, 215, 255, .25); font-size: 14px; text-align: left; color: #D8F3FF; }
.answer-line { min-height: 62px; border-bottom: 2px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 10px; margin: 16px 0 6px; align-content: flex-start; }
.bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.tile { padding: 10px 14px; border-radius: 13px; background: #2A2170; border: 1.5px solid rgba(160, 139, 255, .45); box-shadow: 0 3px 0 rgba(0, 0, 0, .3); font-weight: 700; font-size: 16px; }
.tile:active { transform: translateY(2px); }
.tile.used { opacity: 0; pointer-events: none; }
.field { width: 100%; min-height: 96px; resize: none; padding: 14px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); outline: none; font-size: 18px; font-weight: 600; margin-top: 16px; }
.field:focus { border-color: var(--violet2); }
.keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.key { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; background: var(--card2); font-weight: 700; }
.gap-text { font-size: 24px; font-weight: 800; line-height: 1.5; }
.blank { display: inline-block; min-width: 64px; border-bottom: 3px solid var(--violet2); text-align: center; color: var(--cyan); padding: 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chips .opt { text-align: center; padding: 12px 18px; }
.dialog-line { display: flex; gap: 10px; align-items: flex-start; margin-top: 6px; }
.speech { background: #fff; color: #231A52; padding: 12px 14px; border-radius: 4px 18px 18px 18px; font-weight: 700; font-size: 17px; -webkit-user-select: text; user-select: text; }
.speech small { display: block; font-weight: 600; color: #6C6594; margin-top: 3px; font-size: 13px; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.match .opt { font-size: 14px; padding: 12px 10px; min-height: 58px; display: flex; align-items: center; }
.mic { width: 96px; height: 96px; border-radius: 50%; margin: 14px auto 8px; display: flex; align-items: center; justify-content: center; font-size: 40px; background: linear-gradient(180deg, #9179FF, #6B4BF0); box-shadow: 0 6px 0 var(--violet-deep); }
.mic.rec { background: linear-gradient(180deg, #FF7590, #F04A6B); box-shadow: 0 6px 0 var(--bad-deep), 0 0 0 0 rgba(255, 92, 122, .6); animation: rec 1.2s infinite; }
@keyframes rec { 70% { box-shadow: 0 6px 0 var(--bad-deep), 0 0 0 22px rgba(255, 92, 122, 0); } }
.words { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 20px; font-weight: 800; }
.words .w-ok { color: var(--ok); }
.words .w-bad { color: var(--bad); text-decoration: underline wavy; }
.tip-body { font-size: 15px; line-height: 1.55; color: #E4DEFF; white-space: pre-line; }
.tip-body b { color: #fff; }
.example { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.example + .example { border-top: 1px solid var(--line); }

.feedback { position: relative; z-index: 2; padding: 16px 16px calc(14px + var(--safe-b)); border-radius: 22px 22px 0 0; animation: up .2s ease both; }
.feedback.good { background: #123B32; border-top: 2px solid var(--ok); }
.feedback.poor { background: #45152A; border-top: 2px solid var(--bad); }
.feedback h3 { font-size: 19px; margin-bottom: 4px; }
.feedback.good h3 { color: var(--ok); }
.feedback.poor h3 { color: #FF8EA4; }
.feedback .correct { font-weight: 800; font-size: 17px; -webkit-user-select: text; user-select: text; }
.feedback p { font-size: 14px; margin-bottom: 4px; }
.feedback .btn { margin-top: 12px; }
@keyframes up { from { transform: translateY(100%); } }

/* итог урока */
.done { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 20px 16px calc(16px + var(--safe-b)); overflow-y: auto; position: relative; }
.done > * { flex-shrink: 0; }
.done > .spacer { flex: 1 0 12px; }
.done > .btn { position: sticky; bottom: 0; box-shadow: 0 4px 0 var(--violet-deep), 0 -10px 24px 10px var(--bg0); }
.center > svg, .unlock > svg { margin-left: auto; margin-right: auto; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin: 18px 0; }
.stat { border-radius: 16px; padding: 12px 6px; text-align: center; background: var(--card); border: 1.5px solid var(--line); animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat:nth-child(2) { animation-delay: .12s; } .stat:nth-child(3) { animation-delay: .24s; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
.reward-line { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; background: rgba(255, 197, 61, .12); border: 1px solid rgba(255, 197, 61, .3); margin-bottom: 8px; animation: rise .4s .3s both; }

/* магазин */
.wardrobe { border-radius: 26px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; }
.seg { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { padding: 9px 14px; border-radius: 12px; background: var(--card); font-weight: 800; font-size: 14px; white-space: nowrap; color: var(--muted); border: 1px solid var(--line); }
.seg button.on { background: var(--violet); color: #fff; border-color: transparent; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-bottom: 8px; }
.item { position: relative; border-radius: 16px; padding: 8px 6px 10px; background: var(--card); border: 1.5px solid var(--line); text-align: center; }
.item.sel { border-color: var(--violet2); background: rgba(124, 92, 255, .22); }
.item svg { width: 100%; height: auto; display: block; }
.item .name { font-size: 12px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .price { font-size: 12px; font-weight: 800; color: var(--mango); }
.item .price.own { color: var(--ok); }
.item .tag { position: absolute; top: 6px; right: 6px; font-size: 12px; }
.buybar { position: sticky; bottom: 0; padding: 12px 0 0; }

/* лига */
.rank { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; }
.rank.me { background: rgba(124, 92, 255, .25); box-shadow: inset 0 0 0 1.5px rgba(160, 139, 255, .5); }
.rank .pos { width: 26px; text-align: center; font-weight: 900; color: var(--muted); }
.rank .ava { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; }
.rank .up { color: var(--ok); }
.league-strip { display: flex; gap: 8px; justify-content: center; margin: 14px 0 6px; }
.gem { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--card); opacity: .4; }
.gem.on { opacity: 1; background: linear-gradient(135deg, var(--violet), var(--blue)); transform: scale(1.18); box-shadow: 0 0 16px rgba(124, 92, 255, .7); }
.gem.past { opacity: .8; }
.zone { text-align: center; font-size: 12px; font-weight: 800; color: var(--ok); padding: 6px 0; border-top: 1px dashed rgba(61, 220, 151, .5); margin-top: 4px; }

/* профиль, достижения */
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ach { aspect-ratio: 1; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 28px; filter: grayscale(1); opacity: .35; }
.ach.on { filter: none; opacity: 1; background: linear-gradient(135deg, rgba(124, 92, 255, .35), rgba(90, 215, 255, .2)); border-color: rgba(160, 139, 255, .5); }
.setting { display: flex; align-items: center; gap: 12px; padding: 13px 0; width: 100%; text-align: left; }
.setting + .setting { border-top: 1px solid var(--line); }
.setting .val { color: var(--muted); font-weight: 700; font-size: 14px; }
.switch { width: 48px; height: 28px; border-radius: 99px; background: var(--card2); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--violet); }
.switch.on::after { transform: translateX(20px); }
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats4 .stat { animation: none; padding: 10px 4px; }
.stats4 .stat b { font-size: 18px; }

/* выбор (онбординг, шторки) */
.pick { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); text-align: left; font-weight: 700; }
.pick .em { font-size: 26px; width: 34px; text-align: center; flex: none; }
.pick.on { border-color: var(--violet2); background: rgba(124, 92, 255, .25); box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); }
.pick small { display: block; font-weight: 600; color: var(--muted); font-size: 13px; }
.onb { flex: 1; display: flex; flex-direction: column; padding: 16px 16px calc(16px + var(--safe-b)); min-height: 0; position: relative; }
.onb-body { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.dots i { width: 22px; height: 5px; border-radius: 9px; background: var(--card2); }
.dots i.on { background: var(--violet2); }
.time-input { background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: 22px; font-weight: 800; color-scheme: dark; outline: none; }

.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(5, 3, 20, .65); animation: fade .2s both; }
.sheet { width: 100%; max-width: 560px; max-height: 86%; overflow-y: auto; background: #1A1352; border-radius: 26px 26px 0 0; padding: 20px 16px calc(18px + var(--safe-b)); border-top: 1px solid var(--line); animation: up .25s ease both; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; top: 12px; left: 0; right: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: #fff; color: #231A52; font-weight: 700; padding: 10px 16px; border-radius: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .4); animation: rise .25s both; max-width: 100%; }
.toast.bad { background: var(--bad); color: #fff; }
.unlock { text-align: center; }
.unlock .big { font-size: 72px; line-height: 1.1; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }

/* Премиум */
.plan { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 2px solid var(--line); text-align: left; position: relative; }
.plan.on { border-color: var(--mango); background: rgba(255, 197, 61, .1); }
.plan .stars { font-weight: 900; font-size: 18px; white-space: nowrap; }
.plan .best { position: absolute; top: -10px; right: 14px; background: var(--mango); color: #3A2500; font-size: 11px; font-weight: 900; padding: 3px 10px; border-radius: 99px; }
.perk { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.perk .em { font-size: 22px; width: 30px; text-align: center; flex: none; }

/* маскот */
.bat { animation: float 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.bat .wing-l, .bat .wing-r { transform-box: fill-box; animation: flap 3.6s ease-in-out infinite; }
.bat .wing-l { transform-origin: 100% 40%; }
.bat .wing-r { transform-origin: 0% 40%; animation-name: flap-r; }
.bat .eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; }
.bat.still, .bat.still * { animation: none !important; }
@keyframes float { 50% { transform: translateY(-5px); } }
@keyframes flap { 50% { transform: rotate(7deg); } }
@keyframes flap-r { 50% { transform: rotate(-7deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.zzz { animation: zzz 2.6s ease-in-out infinite; transform-box: fill-box; }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(8px, -10px); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; } }
