/* BABAI VPN — мини-приложение, макет «Babai Mini App v2».
 *
 * Разметку экранов собирает app.js из данных сервера; здесь — всё
 * оформление макета: палитра, стекло карточек, кнопки, шторки, навигация,
 * сцена с монстром и кадры анимаций. Значения взяты из макета дословно
 * (цвета, радиусы, тени, тайминги), чтобы приложение не расходилось с тем,
 * что нарисовал дизайнер. */

/* Шрифт лежит в проекте, а не тянется с Google: приложение открывают из
   Telegram в России, и сторонний домен — это лишняя точка отказа. */
@font-face {
  font-family: 'Rubik';
  src: url('fonts/Rubik.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --mint: #9CE298;
  --mint-2: #6FCB7F;
  --pink: #E35286;
  --pink-text: #F07FA6;
  --amber: #E8B86B;
  --text: #D9E9DF;
  --text-2: #B9D3C4;
  --text-3: #9FBFB0;
  --muted: #7FA694;
  --ink: #0A2419;
  --placeholder: #5F8674;
  --card: rgba(10, 36, 29, .55);
  /* Карточки без backdrop-filter: плотнее, чтобы фон не просвечивал. */
  --card-solid: rgba(12, 40, 32, .82);
  --card-2: rgba(10, 36, 29, .4);
  --line: rgba(156, 226, 152, .18);
  --line-soft: rgba(156, 226, 152, .12);
  --line-faint: rgba(156, 226, 152, .08);
  --glass-blur: 14px;
  --r-card: 24px;
  --r-btn: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* Пружинистое замедление для переходов экранов и шторок. */
  --spring: cubic-bezier(.22, 1, .36, 1);
  /* Безопасные зоны Telegram. Ставит app.js (applyInsets): --sat — вырез
     камеры, --csat — полоса кнопок Telegram во весь экран, --sab — низ.
     Вне полноэкранного режима обе верхние — ноль. */
  --sat: 0px;
  --csat: 0px;
  --sab: 0px;
  --head: calc(var(--sat) + var(--csat));
  --bottom: max(env(safe-area-inset-bottom, 0px), var(--sab));
}

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(1.2deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { transform: translate3d(0, 100%, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes screenIn { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeUp { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes menuIn { from { transform: translateX(-50%) scale(.92) translateY(-6px); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes ripple { 0% { transform: translate(-50%, -50%) scale(.55); opacity: .7; } 100% { transform: translate(-50%, -50%) scale(1.25); opacity: 0; } }
@keyframes drift1 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(60px, 90px) scale(1.25); } }
@keyframes drift2 { 0% { transform: translate(0, 0) scale(1.1); } 100% { transform: translate(-70px, -60px) scale(.9); } }
@keyframes drift3 { 0% { transform: translate(0, 0) scale(.9); } 100% { transform: translate(-40px, 70px) scale(1.2); } }
@keyframes twinkle { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes fly {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: .9; }
  50% { transform: translate(18px, -45vh); opacity: .6; }
  90% { opacity: .2; }
  100% { transform: translate(-12px, -95vh); opacity: 0; }
}
@keyframes poke {
  0% { transform: translateY(0) scale(1, 1); }
  18% { transform: translateY(4px) scale(1.08, .9); }
  45% { transform: translateY(-26px) scale(.95, 1.06) rotate(-3deg); }
  70% { transform: translateY(0) scale(1.04, .96); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes shake { 0%, 100% { transform: translateX(0) rotate(-3deg); } 20% { transform: translateX(-7px) rotate(-6deg); } 40% { transform: translateX(6px) rotate(1deg); } 60% { transform: translateX(-4px) rotate(-5deg); } 80% { transform: translateX(3px) rotate(-2deg); } }
@keyframes sayIn { from { transform: translate(-50%, 8px) scale(.85); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
@keyframes peek {
  0%, 8% { transform: translateX(70%) rotate(-4deg); }
  16%, 72% { transform: translateX(0) rotate(-14deg); }
  76% { transform: translateX(0) rotate(-6deg); }
  80% { transform: translateX(0) rotate(-16deg); }
  84% { transform: translateX(0) rotate(-10deg); }
  92%, 100% { transform: translateX(70%) rotate(-4deg); }
}
@keyframes peekSay {
  0%, 16% { opacity: 0; transform: translateY(6px) scale(.9); }
  22%, 70% { opacity: 1; transform: none; }
  78%, 100% { opacity: 0; transform: translateY(6px) scale(.9); }
}
@keyframes glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes shimmer { from { transform: translateX(-120%); } to { transform: translateX(220%); } }
@keyframes bbDot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Фон живёт на html: у обёртки телефона ограничена ширина, и фон,
   нарисованный на ней, оставил бы по бокам чужой цвет. */
html {
  /* Telegram на Android передаёт в WebView системный масштаб текста, и без
     этого все надписи выходили крупнее макета и ломали вёрстку. Остаток
     масштаба (если WebView его всё же применил) гасит app.js — см. textZoom. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  min-height: 100%;
  background: #08201A;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  /* Системный стек позади обязателен: пока шрифт грузится — и если не
     загрузится вовсе — текст должен остаться читаемым. */
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  overflow: hidden;
}

a { color: var(--mint); text-decoration: none; }
button { font-family: inherit; color: inherit; }
button:disabled { cursor: default; }
input, textarea { font-family: inherit; -webkit-user-select: text; user-select: text; }
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
[data-noscroll]::-webkit-scrollbar { display: none; }
svg { flex: none; }

/* --- Окно приложения ------------------------------------------------------
   На телефоне — весь экран. В широком окне (браузер на ПК, планшет) экран
   встаёт по центру в рамке телефона из макета: так витрину проверяют на
   компьютере ровно в том виде, в каком её увидят в Telegram. */
#stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}
#phone {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #0B2820 0%, #0D3027 45%, #08201A 100%);
}
/* Рамка-телефон — ТОЛЬКО в браузерном кабинете на ПК (`.web`): там витрину
   смотрят на большом экране, и приятно видеть её «как в телефоне». В самом
   Telegram (и на телефоне, и в Desktop) `.web` нет — там мини-апп заполняет
   окно как обычный мини-апп, без нарисованного телефона в тёмной рамке. */
@media (min-width: 640px) {
  .web #stage { padding: 20px 16px; }
  .web #phone {
    width: 412px;
    height: min(866px, 100%);
    border-radius: 32px;
    box-shadow: 0 30px 70px rgba(8, 30, 22, .4), 0 12px 30px rgba(0, 0, 0, .25);
  }
}
/* Высоты хватает на целый «телефон» — добавляем фирменную рамку-корпус (web). */
@media (min-width: 640px) and (min-height: 700px) {
  .web #stage { padding: 24px 16px; }
  .web #phone {
    border-radius: 49px;
    box-shadow:
      0 0 0 11px #0B0F0D,
      0 0 0 13px #2B332F,
      0 0 0 14px #0B0F0D,
      0 50px 90px rgba(8, 30, 22, .35),
      0 12px 30px rgba(0, 0, 0, .25);
  }
}
/* В самом Telegram (нет `.web`) на широком окне (Desktop) мини-апп заполняет
   окно как обычно: живой фон #phone растянут на все окно, а контент —
   центрированной колонкой, чтобы не разъезжался. Никакого нарисованного
   телефона. Нижняя навигация и так центрируется (justify-content: center). */
@media (min-width: 640px) {
  html:not(.web) .sheet { left: 50%; right: auto; width: min(560px, 100%); translate: -50% 0; }
  html:not(.web) .sheet .body { border-radius: 26px 26px 0 0; }
  html:not(.web) #screen { max-width: 412px; margin: 0 auto; }
  html:not(.web) .top {
    left: 50%; right: auto; transform: translateX(-50%); width: min(412px, 100%);
  }
  html:not(.web) .paybar {
    left: 50%; right: auto; transform: translateX(-50%);
    width: min(388px, calc(100% - 24px));
  }
}

/* Живой фон: три пятна медленно дрейфуют, под ними мерцают звёзды, вверх
   плывут светлячки. Цвет пятен — настроение Бабая (data-mood от app.js):
   мятный, когда всё хорошо, янтарный — пора продлевать, розовый и
   приглушённый — подписки нет. */
.bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; --c1: 156, 226, 152; --c2: 227, 82, 134; --c3: 111, 203, 127; transition: filter 1.2s ease; }
.bg[data-mood="worried"] { --c1: 232, 184, 107; --c3: 232, 184, 107; }
.bg[data-mood="sad"], .bg[data-mood="lost"] { --c1: 120, 170, 150; --c3: 227, 82, 134; filter: saturate(.7); }
.bg[data-mood="waiting"] { --c1: 156, 226, 152; --c3: 232, 184, 107; }
.bg[data-mood="celebrate"] { --c2: 227, 82, 134; --c3: 232, 184, 107; }
.bg i { position: absolute; border-radius: 50%; display: block; transition: background 1.2s ease; }
.bg .b3 {
  top: 34%; left: 30%; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(var(--c3), .12) 0%, rgba(var(--c3), 0) 65%);
  animation: drift3 19s ease-in-out infinite alternate;
}
.bg .stars {
  position: absolute; inset: -20px; display: block;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(217, 233, 223, .55) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, rgba(217, 233, 223, .45) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 64% 32%, rgba(156, 226, 152, .5) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 44%, rgba(217, 233, 223, .35) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 88% 52%, rgba(217, 233, 223, .4) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 66%, rgba(156, 226, 152, .45) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 46% 76%, rgba(217, 233, 223, .35) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 88%, rgba(217, 233, 223, .4) 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite;
}
.bg .fly {
  position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; display: block;
  background: rgb(var(--c1)); box-shadow: 0 0 10px 2px rgba(var(--c1), .6); opacity: 0;
  animation: fly 13s linear infinite;
}
.bg .f1 { left: 14%; animation-delay: 0s; }
.bg .f2 { left: 36%; animation-delay: 4.5s; animation-duration: 15s; }
.bg .f3 { left: 58%; animation-delay: 2s; animation-duration: 11s; }
.bg .f4 { left: 80%; animation-delay: 7s; animation-duration: 16s; }
.bg .f5 { left: 90%; animation-delay: 10s; width: 3px; height: 3px; }
.bg .b1 {
  top: -80px; left: -90px; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(var(--c1), .24) 0%, rgba(var(--c1), 0) 65%);
  animation: drift1 14s ease-in-out infinite alternate;
}
.bg .b2 {
  bottom: 40px; right: -120px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(var(--c2), .14) 0%, rgba(var(--c2), 0) 65%);
  animation: drift2 17s ease-in-out infinite alternate;
}
/* Размытие под шапкой: содержимое уходит под неё при прокрутке. */
.fadeTop {
  position: absolute; top: 0; left: 0; right: 0; height: calc(84px + var(--head)); z-index: 6;
  pointer-events: none;
  background: linear-gradient(180deg, #0B2820 0%, rgba(11, 40, 32, .95) 60%, rgba(11, 40, 32, 0) 100%);
}

/* --- Шапка ------------------------------------------------------------- */
.top {
  position: absolute; top: 0; left: 0; right: 0; height: 56px; z-index: 7;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 0;
}
.top .brand {
  position: absolute; left: 50%; top: calc(50% + 5px); transform: translate(-50%, -50%);
  display: flex; align-items: baseline; gap: 4px;
  font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: #fff;
  pointer-events: none; white-space: nowrap;
}
/* Во весь экран: шапка — это полоса кнопок Telegram под вырезом камеры.
   «Закрыть» слева, меню справа, название ровно посередине между ними. */
body.fs .top { top: var(--sat); height: var(--csat); padding: 0 14px; }
body.fs .top .brand { top: 50%; font-size: 16px; }
body.fs #screen { padding-top: calc(var(--head) + 14px); }
.top .brand b { color: var(--mint); font-weight: 800; }
.top .brand small { font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--muted); }
/* На сайте логотип — ссылка на главную: кликабелен и подсвечивается. */
html.web .top a.brand { pointer-events: auto; text-decoration: none; transition: opacity .2s; }
html.web .top a.brand:hover { opacity: .8; }
.pill-btn {
  height: 32px; padding: 0 14px 0 10px; display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; border: none; background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
}
.pill-btn:active { transform: scale(.97); }
/* Пилюля 32px на вид, а попадать пальцем — по 44px. */
.pill-btn { position: relative; }
.pill-btn::after { content: ""; position: absolute; inset: -6px -2px; }
/* В Telegram кнопка «Назад» — своя, в его шапке. Нашу тогда не рисуем. */
body.tg-back .top .back { display: none; }

/* --- Прокрутка и экран ---------------------------------------------------- */
#scroll {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  /* Выглядывающий Бабай и карусель выходят за край намеренно: без этого
     iPhone давал «пружинить» главной вбок, и она казалась кривой. */
  overscroll-behavior-x: none;
}
#screen { padding: calc(68px + var(--head)) 16px calc(132px + var(--bottom)); position: relative; min-height: 100%; }
#screen.in > .view { animation: screenIn .28s var(--spring) both; }
#screen.up > .view { animation: fadeUp .3s var(--spring) both; }
.view { animation: fadeUp .3s var(--spring) both; }

/* --- Типографика ---------------------------------------------------------- */
h1, h2, h3 { margin: 0; color: #fff; letter-spacing: -.02em; }
.h1 { margin: 4px 0 16px; font-size: 28px; font-weight: 700; }
.h1.mid { font-size: 26px; margin-bottom: 12px; }
.lead { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--text-3); text-wrap: pretty; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.sec {
  display: flex; align-items: center; gap: 8px; margin: 0 4px 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--muted); text-transform: uppercase;
}
.sec::before { content: ''; width: 3px; height: 12px; border-radius: 3px; background: var(--mint); }
.sec.pink::before { background: var(--pink); }
.sec.grey::before { background: var(--muted); }
.sec.amber::before { background: var(--amber); }
.center { text-align: center; }
.dim { color: var(--muted); }
.mint { color: var(--mint); }
.pinkt { color: var(--pink-text); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 600; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* --- Карточки и списки ---------------------------------------------------- */
.card {
  padding: 18px; border-radius: var(--r-card);
  background: var(--card-solid); border: 1px solid var(--line);
}
.card.soft { background: var(--card-2); border-color: var(--line-soft); }
.card.tight { padding: 14px; border-radius: 20px; }
.card + .card, .card + .list, .list + .card, .list + .list { margin-top: 10px; }
.mb { margin-bottom: 18px; }
.mb-s { margin-bottom: 12px; }
.mt { margin-top: 12px; }

.list {
  border-radius: 20px; background: var(--card); border: 1px solid var(--line-soft); overflow: hidden;
}
.list.pad { padding: 6px; border-radius: 22px; }
.li {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 13px 14px; border: none; border-bottom: 1px solid var(--line-faint);
  background: none; color: var(--text); font-size: 15px; text-align: left; cursor: pointer;
}
.li:last-child { border-bottom: none; }
.li:active { background: rgba(156, 226, 152, .06); }
.li.static { cursor: default; }
a.li { text-decoration: none; }
.li.static:active { background: none; }
.li .ic {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  background: rgba(156, 226, 152, .12); color: var(--mint); display: grid; place-items: center;
}
.li .ic.pink { background: rgba(227, 82, 134, .16); color: var(--pink-text); }
.li .ic.big { width: 44px; height: 44px; border-radius: 13px; }
.li .ic.solid { background: var(--pink); color: #fff; }
.li .ic.amber { background: rgba(232, 184, 107, .14); color: var(--amber); }
.li .t { flex: 1; min-width: 0; }
.li .t b { display: block; font-size: 15px; font-weight: 600; }
.li .t small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.li .badge { font-size: 12px; color: var(--mint); margin-right: 4px; white-space: nowrap; }
.li .badge.amber { color: var(--amber); }
.li .badge.dim { color: var(--muted); }
.li .chev { color: var(--muted); }
.list.pad .li { padding: 12px; border-bottom: none; border-radius: 16px; }
.list.pad .li:active { background: rgba(156, 226, 152, .06); }

.rowb { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.k { font-size: 12px; color: var(--muted); }
.k.big { font-size: 13px; }
.v { font-size: 22px; font-weight: 700; color: #fff; margin-top: 4px; letter-spacing: -.02em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-soft); }
.stat.lit { background: rgba(156, 226, 152, .1); border-color: rgba(156, 226, 152, .3); }
/* «₽» не переносится на отдельную строку: на 320 сумма ужимается, а не ломается. */
.stat .v { font-size: clamp(17px, 6vw, 22px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.lit .v { color: var(--mint); }

/* Чипы состояния. */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.chip.ok { background: rgba(156, 226, 152, .12); }
.chip.off { background: rgba(227, 82, 134, .16); }
.chip.off .dot { background: var(--pink); }
.chip.wait { background: rgba(232, 184, 107, .14); }
.chip.wait .dot { background: var(--amber); animation: glow 1.4s ease-in-out infinite; }
.chip.line { border: 1px solid rgba(156, 226, 152, .2); color: var(--text-2); }

/* Полоса срока. */
.bar { height: 6px; border-radius: 6px; background: rgba(156, 226, 152, .12); overflow: hidden; }
.bar i {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--mint-2), var(--mint));
  box-shadow: 0 0 12px rgba(156, 226, 152, .5); transition: width .6s ease;
}
.bar.low i { background: linear-gradient(90deg, #C9A05A, var(--amber)); box-shadow: 0 0 12px rgba(232, 184, 107, .5); }
.bar.dead i { background: rgba(227, 82, 134, .55); box-shadow: none; }

/* --- Кнопки --------------------------------------------------------------- */
.btn {
  width: 100%; height: 54px; border: none; border-radius: var(--r-btn);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 600; cursor: pointer; transition: transform .12s, opacity .2s, background .25s, color .25s;
}
.btn:active { transform: scale(.98); }
.btn.p { background: var(--pink); color: #fff; box-shadow: 0 10px 26px rgba(227, 82, 134, .32); }
.btn.g {
  height: 50px; background: none; color: var(--text); font-size: 15px; font-weight: 500;
  border: 1.5px solid rgba(156, 226, 152, .4); box-shadow: inset 0 0 18px rgba(156, 226, 152, .08);
}
.btn.m { background: var(--mint); color: var(--ink); height: 44px; font-size: 14px; }
.btn.q { height: 46px; background: none; color: var(--muted); font-size: 15px; font-weight: 400; }
.btn.sm { height: 44px; font-size: 14px; }
.btn.tiny { width: auto; height: 36px; padding: 0 14px; font-size: 13px; }
.btn.dis, .btn:disabled { background: rgba(255, 255, 255, .08); color: var(--placeholder); box-shadow: none; cursor: default; }
.btn + .btn { margin-top: 8px; }
.quiet {
  display: block; width: 100%; margin-top: 8px; padding: 8px; border: none; background: none;
  color: var(--muted); font-size: 13px; cursor: pointer; text-align: center;
}
.quiet span { color: var(--mint); }
/* Цель для пальца — не меньше 44px. */
.quiet { min-height: 44px; }
.pickrow .acts { display: flex; gap: 6px; flex: none; align-items: center; }
.pickrow .t { min-width: 0; }
.pickrow .t small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 375px) {
  .pickrow .acts { flex-direction: column; align-items: stretch; }
  .pickrow .acts .btn.tiny { height: 32px; }
}
@media (max-width: 340px) {
  /* На самых узких экранах кнопки «Установить/Добавить» — в колонку, иначе
     правая обрезается; бейдж программы — переносится, а не наезжает;
     Бабай-зазывала — прячется, он перекрывал подзаголовок. */
  .pickrow .acts { flex-direction: column; align-items: stretch; }
  .pickrow .acts .btn.tiny { height: 32px; }
  .li .t { min-width: 0; }
  .li .badge { white-space: normal; text-align: right; }
  .peek { display: none; }
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.pair .btn { height: 46px; margin: 0; font-size: 14px; border-radius: 14px; }

/* Кнопка на время запроса: выключена и с бегущей полоской. Иначе выключенная
   кнопка читается как «нажатие не дошло», и человек жмёт ещё раз. */
.busy { position: relative; overflow: hidden; pointer-events: none; opacity: .85; }
.busy::after {
  content: ''; position: absolute; inset: 0; width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
  animation: shimmer 1.1s linear infinite;
}

/* --- Поля ----------------------------------------------------------------- */
.field {
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px;
  border-radius: 16px; background: rgba(10, 36, 29, .6); border: 1.5px solid rgba(156, 226, 152, .2);
  transition: border-color .2s; margin-bottom: 12px;
}
.field:focus-within, .field.ok { border-color: var(--mint); }
.field input { flex: 1; min-width: 0; height: 100%; border: none; background: none; color: #fff; font-size: 16px; outline: none; }
.field.sheet-input { background: rgba(0, 0, 0, .2); border-color: rgba(156, 226, 152, .3); }
.field input.code { text-align: center; font-size: 22px; letter-spacing: .3em; font-weight: 600; }
.field input.promo { font-size: 17px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
textarea.area {
  width: 100%; resize: none; padding: 14px 16px; border-radius: 16px;
  background: rgba(10, 36, 29, .6); border: 1.5px solid rgba(156, 226, 152, .2);
  color: #fff; font-size: 15px; line-height: 1.45; outline: none; margin-bottom: 12px; transition: border-color .2s;
}
textarea.area:focus { border-color: var(--mint); }
.label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.label.w { font-size: 14px; font-weight: 600; color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chips button {
  height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(156, 226, 152, .25);
  background: transparent; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s;
}
.chips button.on { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.hint-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px;
  background: rgba(156, 226, 152, .07); font-size: 13px; color: var(--text-3); margin-bottom: 16px;
}
.count { font-size: 12px; color: var(--muted); text-align: right; margin: -6px 0 10px; }

/* Сегмент-переключатель. */
.seg {
  position: relative; display: grid; padding: 4px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line-soft); margin-bottom: 18px;
}
.seg .thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 12px;
  background: var(--mint); transition: transform .3s var(--ease), opacity .2s;
}
.seg.soft .thumb { background: rgba(156, 226, 152, .14); border: 1px solid rgba(156, 226, 152, .3); }
.seg button {
  position: relative; height: 40px; border: none; background: none; color: var(--text);
  font-size: 15px; font-weight: 600; cursor: pointer; transition: color .25s;
}
.seg button.on { color: var(--ink); }
.seg.soft button.on { color: #fff; }
.seg.soft button { color: var(--muted); }

/* Переключатель. */
.switch {
  width: 44px; height: 26px; flex: none; border-radius: 999px; padding: 3px; border: none;
  background: rgba(156, 226, 152, .18); display: flex; justify-content: flex-start; cursor: pointer; transition: background .2s;
}
.switch.on { background: var(--mint); justify-content: flex-end; }
.switch i { width: 20px; height: 20px; border-radius: 50%; background: #fff; }

/* --- Главная: сцена с монстром -------------------------------------------- */
/* Главная подогнана под экран без прокрутки: высота = видимая область
   (#screen минус его отступы под шапку и нижнюю панель), сцена с монстром —
   гибкая и ужимается, остальное компактное. */
.home { display: flex; flex-direction: column; min-height: 0; margin-top: 14px; height: calc(100vh - 200px - var(--head, 0px) - var(--bottom)); height: calc(100dvh - 200px - var(--head, 0px) - var(--bottom)); }
/* Во весь экран сверху отступ — полоса кнопок Telegram (--head) плюс 14px. */
body.fs .home { height: calc(100dvh - var(--head) - 146px - var(--bottom)); }
@media (min-width: 640px) and (min-height: 700px) { .home { height: auto; min-height: 640px; } }
.switcher { position: relative; display: flex; justify-content: center; z-index: 8; }
.switcher > button {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 16px; border-radius: 999px;
  border: 1px solid rgba(156, 226, 152, .28); background: rgba(12, 40, 32, .9);
  color: #fff; font-size: 15px; font-weight: 500; cursor: pointer;
}
/* Длинное своё название — одной строкой с многоточием, а не в две строки
   в кнопке высотой 36px. */
.switcher > button { max-width: calc(100% - 24px); min-width: 0; }
.switcher > button .sw-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switcher > button svg { flex-shrink: 0; }
.switcher > button:active { transform: scale(.97); }
.switcher > button svg { transition: transform .25s; }
.switcher.open > button svg { transform: rotate(180deg); }
.menu-shade { position: fixed; inset: 0; z-index: 1; }
.menu {
  position: absolute; top: 46px; left: 50%; z-index: 2; width: 250px; padding: 6px; border-radius: 18px;
  background: rgba(8, 28, 22, .96); border: 1px solid rgba(156, 226, 152, .2);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .45);
  transform: translateX(-50%); transform-origin: top center; animation: menuIn .22s var(--ease) both;
}
.menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: none; border-radius: 12px;
  background: none; color: var(--text); font-size: 15px; cursor: pointer; text-align: left;
  min-width: 0; overflow-wrap: anywhere;
}
.menu button:active { background: rgba(156, 226, 152, .08); }
.menu button.danger { color: var(--pink-text); }
.menu button.danger:active { background: rgba(227, 82, 134, .1); }
.menu hr { height: 1px; border: none; background: rgba(156, 226, 152, .12); margin: 4px 8px; }

.stage {
  position: relative; flex: 1 1 0; min-height: 70px; display: flex; justify-content: center; align-items: flex-end; margin-top: auto;
}
.stage .ring {
  position: absolute; left: 50%; top: 50%; width: 270px; height: 270px; border-radius: 50%;
  border: 1.5px solid rgba(156, 226, 152, .35); transform: translate(-50%, -50%) scale(.55);
  animation: ripple 3.6s ease-out infinite both; opacity: 1;
}
.stage .ring:nth-child(2) { animation-delay: 1.2s; }
.stage .ring:nth-child(3) { animation-delay: 2.4s; }
.stage .halo {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(156, 226, 152, .22) 0%, rgba(0, 0, 0, 0) 68%); animation: glow 3.4s ease-in-out infinite;
}
.stage .shadow {
  position: absolute; bottom: 10px; left: 50%; width: 150px; height: 20px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(2, 11, 9, .9) 0%, rgba(2, 11, 9, 0) 70%);
}
/* Настроение монстра — требование заказчика: радостный, когда подписка
   активна, грустный, когда нет. Грустный обязан стоять: покачивание — знак
   «всё хорошо». */
.m {
  position: relative; z-index: 1; height: 100%; max-height: 248px; width: auto; aspect-ratio: 186 / 248;
  padding: 0; border: none; background: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: filter .6s ease, transform .6s ease;
}
.m img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.m.poked img { animation: poke .6s var(--ease); }
.m.sad.poked img { animation: shake .55s ease; }
/* Реплика Бабая: облачко над головой после касания. */
.say {
  position: absolute; left: 50%; top: 4px; z-index: 3; max-width: 230px; padding: 9px 14px;
  border-radius: 16px; background: #EFF7F1; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.3;
  text-align: center; box-shadow: 0 10px 26px rgba(0, 0, 0, .3); transform: translate(-50%, 0);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.say::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: #EFF7F1; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.say.on { opacity: 1; animation: sayIn .3s var(--ease) both; }
.stage.mood-worried .halo { background: radial-gradient(circle, rgba(232, 184, 107, .2) 0%, rgba(0, 0, 0, 0) 68%); }
.stage.mood-worried .ring { border-color: rgba(232, 184, 107, .35); }
.m.happy {
  animation: bob 3.4s ease-in-out infinite;
  filter: drop-shadow(0 0 26px rgba(156, 226, 152, .35)) saturate(1.05);
}
.m.sad {
  animation: none;
  filter: saturate(.75) brightness(.85);
  transform: rotate(-3deg) translateY(4px);
}
.stage.sad .ring { opacity: .25; }
.stage.sad .halo { background: radial-gradient(circle, rgba(227, 82, 134, .12) 0%, rgba(0, 0, 0, 0) 68%); }
.home-title { margin: 8px 0 2px; color: #fff; font-size: 22px; font-weight: 700; letter-spacing: -.02em; text-align: center; text-wrap: balance; }
.home-sub { margin: 0 0 14px; font-size: 14px; line-height: 1.45; color: var(--muted); text-align: center; text-wrap: pretty; }
.home .card.offer { margin-top: auto; padding: 20px; }
.offer .big { font-size: 22px; font-weight: 700; margin: 6px 0 4px; color: #fff; }
.offer .note { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.sub-card { margin-top: auto; padding: 18px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); }
/* Название переносится, а не режется многоточием: на узком экране рядом
   дата, и «1 месяц · 3 устройст…» читалось как поломка. */
.sub-card .name { font-size: 17px; font-weight: 600; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sub-card .rowb { align-items: flex-start; }
.sub-card .date { display: flex; align-items: center; gap: 6px; flex: none; font-size: 13px; }
.sub-card .chips-row { display: flex; align-items: center; gap: 8px; margin: 10px 0 14px; flex-wrap: wrap; }
.sub-card .meta { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.sub-card .bar { margin-bottom: 16px; }
.sub-card .foot { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.4; }

/* --- Тарифы ---------------------------------------------------------------- */
.steps2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 18px; }
.steps2 span, .steps3 span { height: 4px; border-radius: 4px; background: rgba(156, 226, 152, .18); transition: background .3s; }
.steps2 span.on, .steps3 span.on { background: var(--mint); }
.for { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 13px; color: var(--text-3); }
.for::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); }
.dev-cards { display: flex; flex-direction: column; gap: 12px; }
.dev {
  position: relative; display: block; width: 100%; text-align: left; padding: 18px; border-radius: 22px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--text); cursor: pointer;
  animation: fadeUp .4s both; transition: border-color .2s, box-shadow .2s;
}
.dev:active { transform: scale(.98); }
.dev.on { border-color: var(--mint); background: rgba(156, 226, 152, .08); box-shadow: 0 0 30px rgba(156, 226, 152, .14); }
.dev .best {
  position: absolute; top: -11px; left: 18px; padding: 4px 10px; border-radius: 999px;
  background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em;
}
.dev .head { display: flex; align-items: center; gap: 12px; }
.dev .n {
  width: 44px; height: 44px; flex: none; border-radius: 14px; background: rgba(156, 226, 152, .12);
  color: var(--mint); display: grid; place-items: center; font-size: 18px; font-weight: 700;
}
.dev .ttl { display: block; font-size: 18px; font-weight: 600; color: #fff; }
.dev .hnt { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.dev .foot {
  display: flex; align-items: baseline; justify-content: space-between; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(156, 226, 152, .12); font-size: 12px; color: var(--muted);
}
.dev .price { font-size: 22px; font-weight: 700; color: #fff; }
.dev.on .price { color: var(--mint); }
.dev .price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.periods {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line-soft); margin-bottom: 12px;
}
.period {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 14px;
  border-radius: 16px; border: 1.5px solid rgba(156, 226, 152, .14); background: rgba(0, 0, 0, .15);
  color: var(--text); cursor: pointer; text-align: left; transition: all .25s;
}
.period:active { transform: scale(.97); }
.period.on { border-color: var(--mint); background: rgba(156, 226, 152, .1); box-shadow: 0 0 0 4px rgba(156, 226, 152, .08), 0 0 24px rgba(156, 226, 152, .15); }
.period .badge { position: absolute; top: -9px; right: 10px; padding: 3px 8px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; }
.period .lbl { font-size: 16px; font-weight: 600; }
.period .pr { align-self: stretch; text-align: right; }
.period .pr b { display: block; font-size: 20px; font-weight: 700; color: #fff; }
.period.on .pr b { color: var(--mint); }
.period .pr small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.period .pr s { display: block; font-size: 12px; color: var(--muted); }
.choice { padding: 16px; }
.choice .ttl { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: #fff; }
.choice .line { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(156, 226, 152, .12); }
.choice .ava {
  width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center;
  color: var(--mint); background: radial-gradient(circle at 50% 40%, rgba(156, 226, 152, .22), rgba(156, 226, 152, .05) 70%);
  box-shadow: inset 0 0 0 1px rgba(156, 226, 152, .25);
}
.choice .ava svg { width: 20px; height: 20px; }
.choice .line .t { flex: 1; font-size: 14px; }
.choice .line .sum { font-size: 16px; font-weight: 700; color: var(--mint); }
.choice .opt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 0; border: none;
  border-bottom: 1px solid rgba(156, 226, 152, .12); background: none; color: var(--text); cursor: pointer; text-align: left;
}
.choice .opt .t { flex: 1; }
.choice .opt .t b { display: block; font-size: 14px; font-weight: 500; }
.choice .opt .t small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.choice .inc { font-size: 14px; font-weight: 600; margin: 14px 0 8px; color: #fff; }
.choice .it { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; color: var(--text-2); }

/* Нижняя панель оплаты. */
.paybar {
  position: absolute; left: 12px; right: 12px; bottom: calc(24px + var(--bottom)); z-index: 5;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 24px;
  background: rgba(8, 28, 22, .96); border: 1px solid rgba(156, 226, 152, .2);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .3); animation: fadeUp .3s var(--ease) both;
}
.paybar .t { flex: 1; }
.paybar .t small { display: block; font-size: 12px; color: var(--muted); }
.paybar .t b { font-size: 22px; font-weight: 700; color: var(--mint); }
.paybar .t s { font-size: 13px; color: var(--muted); margin-left: 8px; }
.paybar .btn { width: auto; height: 52px; padding: 0 30px; margin: 0; }

/* --- Навигация ------------------------------------------------------------- */
.nav {
  position: absolute; left: 0; right: 0; bottom: calc(22px + var(--bottom)); z-index: 5; display: flex; justify-content: center;
  animation: fadeUp .35s both;
}
.nav .bar-pill {
  position: relative; display: flex; gap: 6px; padding: 6px; border-radius: 999px;
  background: rgba(8, 28, 22, .88); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}
.nav .thumb {
  position: absolute; top: 6px; left: 6px; width: 58px; height: 50px; border-radius: 999px;
  background: rgba(156, 226, 152, .16); border: 1px solid rgba(156, 226, 152, .35);
  transition: transform .35s var(--ease);
}
.nav button {
  position: relative; width: 58px; height: 50px; border: none; background: none; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; transition: color .25s;
}
.nav button.on { color: var(--mint); }
.nav .dot { position: absolute; top: 10px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px #0A241D; }

/* --- Тост ------------------------------------------------------------------ */
.toast {
  position: absolute; top: calc(64px + var(--head)); left: 16px; right: 16px; z-index: 30;
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 16px;
  background: var(--mint); color: var(--ink); font-size: 14px; font-weight: 600;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4); animation: fadeUp .3s var(--ease) both;
  visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s;
}
.toast.on { visibility: visible; opacity: 1; }
/* Во весь экран тост встаёт сразу под полосой кнопок Telegram («Назад»,
   «Закрыть», меню), а не поверх них. */
body.fs .toast { top: calc(var(--head) + 10px); }
.toast.bad { background: #F07FA6; color: #1B0A12; }
.toast.bad svg { display: none; }

/* --- Шторки ----------------------------------------------------------------- */
.shade {
  position: absolute; inset: 0; z-index: 10; background: rgba(2, 12, 9, .7);
  animation: fade .22s both;
}
.sheet { position: absolute; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 11; animation: rise .34s var(--spring) both; will-change: transform; contain: layout paint; backface-visibility: hidden; transition: bottom .26s var(--ease); }
.shade { will-change: opacity; }
/* Закрытие: шторка уезжает вниз, затемнение гаснет; нажатия уже не ловятся. */
#sheet.leaving { pointer-events: none; }
#sheet.leaving .shade { animation: fadeOut .22s ease both; }
#sheet.leaving .sheet { animation: sink .22s cubic-bezier(.4, 0, 1, 1) both; }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes sink { from { transform: none; } to { transform: translate3d(0, 100%, 0); } }
.sheet .body {
  background: linear-gradient(180deg, #123A2F 0%, #0C2B23 100%); border: 1px solid var(--line); border-bottom: none;
  border-radius: 30px 30px 0 0; padding: 10px 22px calc(40px + var(--bottom)); box-shadow: 0 -20px 50px rgba(0, 0, 0, .35);
  max-height: 86vh; max-height: calc(86dvh - var(--kb, 0px)); overflow-y: auto; scrollbar-width: none;
  transition: max-height .26s var(--ease);
}
.sheet .grip { width: 38px; height: 5px; border-radius: 5px; background: rgba(156, 226, 152, .25); margin: 0 auto 20px; }
.sheet h2 { margin: 0 0 6px; font-size: 21px; font-weight: 700; color: #fff; }
.sheet h2.c { text-align: center; }
.sheet .lead { margin-bottom: 16px; }
.sheet .lead.c { text-align: center; }
.sheet .btn.q { margin-top: 0; }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 3px solid rgba(156, 226, 152, .16); border-top-color: var(--mint); animation: spin .9s linear infinite; margin: 0 auto 16px; }
.okmark {
  width: 78px; height: 78px; border-radius: 50%; background: var(--mint); color: var(--ink); display: grid; place-items: center;
  animation: pop .5s both; box-shadow: 0 0 0 10px rgba(156, 226, 152, .12), 0 0 40px rgba(156, 226, 152, .4); margin: 0 auto 18px;
}
.warnmark { width: 56px; height: 56px; border-radius: 18px; background: rgba(227, 82, 134, .16); color: var(--pink-text); display: grid; place-items: center; margin-bottom: 14px; }
.pickrow {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: 16px;
  border: 1.5px solid rgba(156, 226, 152, .14); background: rgba(0, 0, 0, .15); color: var(--text); cursor: pointer; text-align: left;
  margin-bottom: 8px;
}
.pickrow.on { border-color: var(--mint); background: rgba(156, 226, 152, .08); }
.pickrow .t { flex: 1; }
.pickrow .t b { display: block; font-size: 15px; font-weight: 600; }
.pickrow .t small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pickrow .tag { font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 999px; background: rgba(156, 226, 152, .14); color: var(--mint); white-space: nowrap; }
.pickrow .radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(217, 233, 223, .3); flex: none; }
.pickrow.on .radio { background: var(--mint); box-shadow: none; display: grid; place-items: center; }
.key-groups { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0 14px; }
.key-groups span { padding: 7px 10px; border-radius: 10px; background: rgba(156, 226, 152, .12); font-size: 17px; font-weight: 600; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--mint); }
.lnk {
  padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, .2); font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; color: var(--mint); word-break: break-all; line-height: 1.5; -webkit-user-select: text; user-select: text;
}

/* --- Мастер подключения ----------------------------------------------------- */
.setup {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; padding: calc(76px + var(--head)) 24px calc(40px + var(--bottom));
  background: radial-gradient(80% 50% at 50% 30%, #0F3A2E 0%, #081E18 70%);
  overflow-y: auto; scrollbar-width: none;
}
.setup.enter { animation: fade .3s ease both; }
.setup.leaving { animation: fadeOutSetup .22s ease both; pointer-events: none; }
@keyframes fadeOutSetup { from { opacity: 1; } to { opacity: 0; } }
.setup .scene { position: relative; flex: 1; min-height: 220px; display: grid; place-items: center; }
.setup .scene .ring { position: absolute; left: 50%; top: 50%; width: 320px; height: 320px; border-radius: 50%; border: 1px solid rgba(156, 226, 152, .3); transform: translate(-50%, -50%) scale(.55); animation: ripple 4s ease-out infinite both; }
.setup .scene .ring:nth-child(2) { animation-delay: 1s; }
.setup .scene .ring:nth-child(3) { animation-delay: 2s; }
.setup .scene .ring:nth-child(4) { animation-delay: 3s; }
.setup .scene .orbit { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(156, 226, 152, .08); }
.setup .scene .arc { position: absolute; left: 50%; top: 50%; margin: -75px 0 0 -75px; }
.setup .scene .arc.spin { animation: spin 1.6s linear infinite; }
.setup .scene .arc circle.p { transition: stroke-dashoffset .9s var(--ease); filter: drop-shadow(0 0 6px rgba(156, 226, 152, .6)); }
.setup .orb {
  position: relative; width: 112px; height: 112px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1B5443, #0D3027); border: 1px solid rgba(156, 226, 152, .3);
  box-shadow: 0 0 40px rgba(156, 226, 152, .2), inset 0 0 20px rgba(156, 226, 152, .1); display: grid; place-items: center; color: #fff;
}
.setup .orb > svg, .setup .orb > img { animation: pop .36s var(--spring) both; }
.setup .text { position: relative; text-align: center; flex: none; }
.setup .text .n { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.setup .text h2 { margin: 0 0 8px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.setup .text p { margin: 0 auto 28px; max-width: 320px; min-height: 42px; font-size: 14px; line-height: 1.5; color: var(--text-3); text-wrap: pretty; }
.setup .text .step-in { animation: screenIn .3s var(--spring) both; }
.setup .btn.p { height: 56px; border-radius: 18px; box-shadow: 0 12px 30px rgba(227, 82, 134, .35); }
.setup .btn.g { height: 52px; border-radius: 18px; margin-top: 10px; border-color: rgba(156, 226, 152, .35); box-shadow: none; }
.setup .lnk { margin: 0 0 16px; text-align: left; }

/* --- Прочее ----------------------------------------------------------------- */
.empty { display: flex; flex-direction: column; align-items: center; padding: 30px 20px; border-radius: 22px; background: var(--card-2); border: 1px solid var(--line-soft); animation: fade .3s; text-align: center; }
.empty .sil { width: 70px; height: 77px; background: url('silhouette.png') no-repeat center / contain; opacity: .35; margin-bottom: 12px; }
.empty .mood { width: 92px; height: 108px; object-fit: contain; margin-bottom: 10px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35)); animation: fadeUp .4s var(--spring) both; }
.empty b { font-size: 15px; font-weight: 500; }
.empty small { font-size: 13px; color: var(--muted); margin-top: 4px; }
.ticket { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-soft); animation: fadeUp .35s both; margin-bottom: 8px; }
.ticket .t { flex: 1; min-width: 0; }
.ticket .t small { display: block; font-size: 12px; color: var(--muted); }
.ticket .t b { display: block; font-size: 15px; font-weight: 600; margin-top: 3px; }
.ticket .t span { display: block; font-size: 13px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.faq { border-radius: 18px; background: var(--card); border: 1px solid rgba(156, 226, 152, .14); overflow: hidden; transition: border-color .25s; margin-bottom: 8px; }
.faq.open { border-color: rgba(156, 226, 152, .35); }
.faq button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 16px; border: none; background: none; color: var(--text); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.faq button svg { transition: transform .3s; }
.faq.open button svg { transform: rotate(180deg); }
.faq .a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.faq.open .a { grid-template-rows: 1fr; }
.faq .a > div { overflow: hidden; }
.faq .a p { margin: 0; padding: 0 16px 16px; font-size: 14px; line-height: 1.55; color: var(--text-3); }
.avatar { width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, var(--mint), #5FB77A); color: var(--ink); font-size: 22px; font-weight: 700; display: grid; place-items: center; flex: none; }
.profile-name { font-size: 18px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idbtn { display: flex; align-items: center; gap: 6px; padding: 0; margin-top: 3px; border: none; background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.balance { position: relative; overflow: hidden; padding: 16px; border-radius: 24px; background: linear-gradient(140deg, rgba(156, 226, 152, .16), rgba(156, 226, 152, .04) 70%); border: 1px solid rgba(156, 226, 152, .28); margin-bottom: 20px; }
.balance .amt { font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: #fff; margin-top: 2px; }
/* Карточка баланса в теме — сплошной мятный фон: приглушённый текст на нём
   тонул, поэтому делаем его тёмным, как остальные подписи на этой карточке. */
.balance .k { color: #2c5137; }
.balance .tag { padding: 5px 10px; border-radius: 999px; background: rgba(156, 226, 152, .14); color: var(--mint); font-size: 12px; font-weight: 500; white-space: nowrap; }
/* Сумма и «+N% с друзей» в один ряд, но с переносом: большая сумма не
   наезжает на чип, а уводит его на строку ниже — карточка не ломается. */
.bal-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bal-row .tag { align-self: center; min-height: 32px; }
.bal-note { color: #2c5137; font-size: 13px; line-height: 1.4; margin-top: 8px; }
/* Чипы банка/сети в выводе: компактнее обычных, чтобы влезал длинный список. */
.wd-picks { margin-bottom: 14px; }
/* Тап-цель не ниже 44px: чипы банков/сетей и способов — кнопки, по которым
   попадают пальцем. */
.wd-picks button { padding: 8px 12px; font-size: 13px; min-height: 44px; }
.hero { position: relative; overflow: hidden; padding: 22px 20px; border-radius: 26px; background: linear-gradient(145deg, rgba(227, 82, 134, .26), rgba(227, 82, 134, .06) 60%); border: 1px solid rgba(227, 82, 134, .35); margin-bottom: 12px; }
.hero .sil { position: absolute; right: -18px; bottom: -16px; width: 130px; height: 142px; background: url('silhouette.png') no-repeat center / contain; opacity: .22; transform: rotate(-8deg); }
.hero .k2 { font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--pink-text); }
.hero .big { font-size: 26px; font-weight: 700; line-height: 1.15; margin: 8px 0 8px; max-width: 250px; color: #fff; }
.hero .txt { font-size: 14px; color: #D9C5CE; max-width: 240px; line-height: 1.45; }
.linkbox { display: flex; align-items: center; gap: 8px; }
.linkbox .u { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 12px; background: rgba(0, 0, 0, .2); display: flex; align-items: center; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--mint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linkbox .ib { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 1px solid rgba(156, 226, 152, .3); background: none; color: var(--mint); display: grid; place-items: center; cursor: pointer; }
.linkbox .ib:active { transform: scale(.94); }
.linkbox .ib.danger { color: var(--pink-text); border-color: rgba(227, 82, 134, .4); }
/* Пригласительная ссылка — вся плашка нажимается и копируется; адрес читаемый
   (переносится целиком, код виден), а не обрезанная моноширинная строка. */
.reflink { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .2); border: 1px solid rgba(156, 226, 152, .22); cursor: pointer; }
.reflink:active { transform: scale(.99); }
.reflink .rl-main { flex: 1; min-width: 0; }
.reflink .rl-main b { display: block; font-size: 13px; color: #fff; margin-bottom: 3px; }
.reflink .rl-url { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--mint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; line-height: 1.35; }
.reflink .rl-ic { width: 44px; height: 44px; flex: none; border-radius: 11px; display: grid; place-items: center; color: var(--mint); background: rgba(156, 226, 152, .12); }
.rl-stat { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 7px 2px 12px; }
.rl-del { margin-left: auto; background: none; border: none; color: var(--pink-text); font-size: 12px; cursor: pointer; padding: 2px 4px; }
/* Промокоды партнёра: код, скидка, тариф/срок, статистика и кто купил. */
.promo-card { padding: 14px; border-radius: 16px; background: rgba(156, 226, 152, .06); border: 1px solid var(--line-soft); margin-bottom: 10px; }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc-top b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; color: #fff; letter-spacing: .04em; word-break: break-all; }
.pc-disc { flex: none; font-size: 13px; font-weight: 700; color: var(--mint); }
.pc-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.pc-stats { display: flex; gap: 20px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.pc-stats b { color: #fff; font-weight: 700; }
.pc-buyers { margin-top: 10px; border-top: 1px solid var(--line-soft); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.pc-b { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text); }
.pc-empty { margin-top: 10px; font-size: 12px; color: var(--muted); }
/* Скидка и бейдж статуса справа от кода — группой, чтобы не разъезжались. */
.pc-right { flex: none; display: flex; align-items: center; gap: 8px; }
/* Код на модерации/отклонённый/выключенный приглушаем — активные читаются первыми. */
.promo-card.muted { opacity: .8; }
/* Серый бейдж «выключен»: не беда (не розовый), но и не «живой» мятный. */
.chip.dim { background: rgba(255, 255, 255, .07); }
.chip.dim .dot { background: var(--muted); }
/* Ссылка партнёра — компактной строкой-раскрывашкой: имя и цифры снаружи,
   кнопки «поделиться»/«скопировать» справа; адрес, люди и «убрать» — внутри.
   Так и десять ссылок читаются ровным списком. */
.lnk-row { border-top: 1px solid var(--line-soft); }
.lnk-row:first-of-type { border-top: 0; }
.lnk-row > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 2px; cursor: pointer; }
.lnk-row > summary::-webkit-details-marker { display: none; }
.lnk-row > summary::after { content: '▾'; color: var(--muted); font-size: 11px; margin-left: 2px; transition: transform .15s; }
.lnk-row[open] > summary::after { transform: rotate(180deg); }
.lr-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lr-t b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-t small { color: var(--muted); font-size: 12px; }
.lr-body { padding: 0 2px 12px; display: flex; flex-direction: column; gap: 10px; }
.lr-body .drill { margin: 0; }
.lr-body .rl-del { align-self: flex-start; margin: 0; padding: 2px 0; }
.lnk-ic { flex: none; display: flex; gap: 6px; }
.lnk-ic button { width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .05); color: var(--mint); display: grid; place-items: center; cursor: pointer; }
.lnk-ic button:active { transform: scale(.94); }
.lnk-url { display: block; width: 100%; text-align: left; padding: 0; border: 0; background: none; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--muted); font-size: 12.5px; word-break: break-all; line-height: 1.35; cursor: pointer; }
/* Свёрнутые «Неактивные» промокоды: раскрыл — карточки с отступом сверху. */
.off-codes { margin: 2px 2px 10px; }
.off-codes[open] > summary { margin-bottom: 8px; }
.promo-card .pc-stats .rl-del { margin: 0 0 0 auto; }
/* На узких экранах три цифры + «убрать» не должны вылезать за карточку. */
.promo-card .pc-stats { flex-wrap: wrap; row-gap: 4px; }
/* Раскрывашка «кто перешёл/применил» — под ссылкой и под промокодом. */
.drill { margin: 0 2px 12px; }
.drill > summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--mint); padding: 4px 0; display: inline-flex; align-items: center; gap: 6px; }
.drill > summary::-webkit-details-marker { display: none; }
.drill > summary::before { content: '▸'; font-size: 10px; transition: transform .15s; }
.drill[open] > summary::before { transform: rotate(90deg); }
.drill > .list, .drill > .pc-buyers { margin-top: 6px; }
/* Сворачиваемый заголовок раздела (например «Приглашённые») — выглядит как
   .sec, но раскрывается по клику. Свёрнут по умолчанию — список не распирает
   экран. */
.sec-drill { margin-top: 18px; }
.sec-drill > summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; padding: 6px 0; display: flex; align-items: center; gap: 8px; }
.sec-drill > summary::-webkit-details-marker { display: none; }
.sec-drill > summary::after { content: '▾'; margin-left: auto; font-size: 11px; transition: transform .15s; }
.sec-drill[open] > summary::after { transform: rotate(180deg); }
.howto { padding: 6px 16px; }
.howto .st { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-faint); font-size: 14px; }
.howto .st:last-child { border-bottom: none; }
.howto .st i { width: 28px; height: 28px; flex: none; border-radius: 50%; background: rgba(156, 226, 152, .14); color: var(--mint); font-size: 13px; font-weight: 700; font-style: normal; display: grid; place-items: center; }
.howto .st i.on { background: var(--mint); color: var(--ink); }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-faint); }
.person:last-child { border-bottom: none; }
.person .av { width: 36px; height: 36px; flex: none; border-radius: 50%; background: rgba(156, 226, 152, .14); color: var(--mint); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.person .t { flex: 1; min-width: 0; }
.person .t b { display: block; font-size: 14px; font-weight: 500; }
.person .t small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.person .st { font-size: 13px; font-weight: 600; white-space: nowrap; }
.dashed { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px 16px; border-radius: 18px; border: 1px dashed rgba(156, 226, 152, .3); background: none; color: var(--text); cursor: pointer; text-align: left; }
.dashed .t { flex: 1; }
.dashed .t b { display: block; font-size: 14px; font-weight: 600; }
.dashed .t small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Ожидание загрузки. */
/* :not(.chip): у значка статуса «Выдаём ключ» тот же модификатор wait, и
   без исключения он раздувался в мигающий круг с отступом 40px. */
.wait:not(.chip) { text-align: center; color: var(--muted); padding: 40px 0; animation: bbDot 1.2s ease-in-out infinite; }

/* Кому движение мешает — тому без него: покачивание, дрейф пятен, кольца и
   переходы экранов выключаются системной настройкой. Цвета и состояния
   остаются, пропадает только анимация. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Отклик на касание: палец попал, даже если ответ сервера идёт секундами. */
.bb-press { transform: scale(.97); opacity: .8; }

/* --- Маленький Бабай из-за края: «нажми на меня» ---------------------------
   Живая реклама рефералки. Прячется за правым краем, выглядывает, машет
   облачком и снова прячется. Край экрана его обрезает (#scroll не
   прокручивается вбок), поэтому видно ровно выглядывающую половину. */
.home { position: relative; }
.peek {
  position: absolute; right: -20px; top: 104px; z-index: 4; width: 78px; height: 122px;
  padding: 0; border: none; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
/* Внутри сцены — от её низа, а не от верха главной (см. stageHtml).
   18px — на сколько наклон (rotate -14deg вокруг правого нижнего угла)
   опускает левый край: без запаса он задевал заголовок под сценой. */
.stage > .peek { top: auto; bottom: 18px; }
/* Низкая сцена (телефон, где всё место занято карточкой): облачку негде
   встать, кроме как на переключатель подписки, — тогда Бабай выглядывает
   молча, из-под кнопки. */
.view.home .stage { container-type: size; }
@container (max-height: 160px) { .stage > .peek .peek-say { display: none; } }
.peek-body { position: absolute; right: -26px; bottom: 0; width: 74px; height: 98px; transform-origin: 100% 100%; animation: peek 7s var(--ease) infinite; }
.peek-body img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }
.peek-say {
  position: absolute; right: 22px; top: 0; padding: 7px 10px; border-radius: 14px 14px 4px 14px;
  background: var(--pink); color: #fff; text-align: left; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(227, 82, 134, .4); animation: peekSay 7s var(--ease) infinite;
}
.peek-say b { display: block; font-size: 12px; font-weight: 700; }
.peek-say small { display: block; font-size: 11px; opacity: .9; margin-top: 1px; }
.peek:active .peek-body { transform: translateX(0) rotate(-8deg) scale(1.06); animation-play-state: paused; }

/* Фото профиля поверх буквы: не загрузилось — остаётся буква. */
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.balance .tag { display: inline-flex; align-items: center; gap: 2px; border: none; cursor: pointer; }
.balance .tag svg { width: 14px; height: 14px; color: var(--mint) !important; }

/* Способ «скоро»: виден, но не выбирается. */
.pickrow.soon { opacity: .6; cursor: default; }
.pickrow.soon .tag { background: rgba(232, 184, 107, .16); color: var(--amber); }
.pickrow .ic { width: 36px; height: 36px; flex: none; border-radius: 11px; background: rgba(156, 226, 152, .1); display: grid; place-items: center; }

.paid-babai { width: 150px; height: 200px; object-fit: contain; display: block; margin: -10px auto 4px; animation: pop .5s var(--ease) both; }
.hero .hero-babai { position: absolute; right: -14px; bottom: -22px; width: 124px; height: 165px; object-fit: contain; opacity: .9; transform: rotate(-6deg); pointer-events: none; }
/* Узкие экраны: кот в шапке рефералки не наезжает на заголовок и подзаголовок —
   текст отступает от правого края на ширину кота, сам кот чуть меньше. */
@media (max-width: 375px) {
  .hero .big, .hero .txt { max-width: none; padding-right: 92px; }
  .hero .hero-babai { width: 104px; height: 138px; right: -16px; bottom: -18px; }
}
@media (max-width: 340px) {
  .sub-card .btn.g { font-size: 13px; padding-inline: 8px; white-space: nowrap; }
  .sub-card .btn.g svg { width: 16px; height: 16px; }
  .dev b { font-size: 12px; min-height: 2.4em; display: flex; align-items: center; justify-content: center; }
  .hero .big, .hero .txt { padding-right: 80px; }
  .hero .hero-babai { width: 92px; height: 122px; right: -20px; }
  /* Правая подпись «50% на баланс» наезжала на название программы — прячем. */
  .li .badge { display: none; }
}

/* Во весь экран сверху занята полоса кнопок Telegram: сцена чуть ниже, чтобы
   карточка подписки целиком помещалась над навигацией без прокрутки. */
body.fs .stage { height: 214px; }
body.fs .m { width: 160px; height: 214px; }
body.fs .peek { top: 96px; }
@media (max-height: 760px) { body.fs .stage { height: 180px; } body.fs .m { width: 135px !important; height: 180px !important; } }
body.fs .fadeTop { height: calc(var(--head) + 22px); }

/* --- Несколько подписок: карточки листаются --------------------------------
   Слайд во всю ширину, соседний выглядывает на ширину отступа — видно, что
   дальше есть ещё. Последний слайд — «Ещё одна подписка». */
.subs-wrap { margin-top: auto; }
.subs {
  display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px;
}
.subs::-webkit-scrollbar { display: none; }
.subs .slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; display: flex; }
.subs .slide > .card { flex: 1; margin: 0; }
.home .subs .sub-card { margin-top: 0; }
.add-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 6px; padding: 22px 18px; border: 1.5px dashed rgba(156, 226, 152, .35); background: rgba(156, 226, 152, .04);
}
.add-card .plus { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(156, 226, 152, .12); color: var(--mint); margin-bottom: 4px; }
.add-card b { font-size: 17px; color: #fff; }
.add-card small { font-size: 13px; line-height: 1.45; color: var(--muted); max-width: 270px; margin-bottom: 8px; }
.add-card .btn { width: 100%; margin: 0; }
.dots { display: flex; justify-content: center; gap: 6px; }
/* Ряд листания под карточкой: [‹] точки [›]. Стрелки живут здесь, а не
   поверх карточки — ничего не перекрывают. На телефоне остаются одни точки. */
.dots-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; min-height: 20px; }
/* Точки кликабельны (листание без свайпа) — с запасом под палец/курсор. */
.dots i { position: relative; cursor: pointer; }
.dots i::after { content: ""; position: absolute; inset: -7px -5px; }
/* Стрелки — только на сайте в широком окне, мышкой свайп неудобен. */
.subs-arr { display: none; }
@media (min-width: 840px) {
  html.web .subs-arr {
    display: grid; place-items: center; flex: none;
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(156, 226, 152, .22);
    background: rgba(255, 255, 255, .04); color: var(--mint); cursor: pointer;
    transition: background-color .2s, border-color .2s, scale .15s var(--spring);
  }
  html.web .subs-arr:hover { background: rgba(156, 226, 152, .14); border-color: rgba(156, 226, 152, .45); }
  html.web .subs-arr:active { scale: .92; }
}
.dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(156, 226, 152, .25); transition: width .25s var(--ease), background .25s; }
.dots i.on { width: 18px; background: var(--mint); }
.dots i.add.on { background: var(--text-3); }
.menu button.on { color: var(--mint); }
.menu button .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.menu button .dot.ok { background: var(--mint); }
.menu button .dot.off { background: var(--pink); }

/* Тот же экран перерисован после нажатия: без анимаций появления, иначе
   каждое нажатие выглядит как перезагрузка страницы. Бесконечные (Бабай,
   кольца, светлячки) не трогаем. */
#screen.still .view,
#screen.still .dev,
#screen.still .ticket,
#screen.still .empty,
#screen.still [style*="animation"] { animation: none !important; }
.setup.still, .setup.still .step-in, .setup.still .orb > svg, .setup.still .orb > img, .setup.still .dev { animation: none !important; }

/* Невысокий экран во весь экран: сцена ниже, и маленький Бабай тоже
   поднимается и уменьшается, чтобы не наезжать на заголовок. */
@media (max-height: 760px) {
  body.fs .peek { top: 62px; height: 104px; }
  body.fs .peek-body { width: 66px; height: 86px; right: -22px; }
}
@media (max-height: 700px) {
  .peek { top: 84px; height: 104px; }
  .peek-body { width: 66px; height: 86px; right: -22px; }
  /* Низкое окно (Telegram Desktop 400×650, iPhone SE): не зажимаем сцену до
     70px — главная докручивается, герой читаемого размера, выглядывающий
     Бабай (он был крупнее героя) спрятан; карточка с кнопками — над
     плавающей навигацией с запасом. */
  .view.home { height: auto; min-height: calc(100dvh - var(--head, 0px) - var(--bottom)); padding-bottom: calc(var(--bottom) + 92px); }
  .view.home .stage { min-height: 150px; }
  .view.home .m { max-height: 150px; }
  .view.home .peek { display: none; }
}


/* --- Плавность ---------------------------------------------------------------
   Бесконечные анимации (звёзды, светлячки, пятна, кольца, покачивание Бабая,
   маленький Бабай) идут только на главной и только когда поверх ничего нет.
   app.js ставит body.calm, когда открыт другой экран, шторка или приложение
   свёрнуто: работу, которую не видно, телефон не делает. */
body.calm .bg i, body.calm .bg .stars, body.calm .bg .fly,
body.calm .stage .ring, body.calm .stage .halo, body.calm .m.happy,
body.calm .peek-body, body.calm .peek-say { animation-play-state: paused; }
/* Светлячков меньше: два из пяти скрыты, трёх хватает для живости. */
.bg .f4, .bg .f5 { display: none; }
/* Слои, которые двигаются сами по себе, — на видеокарту, и перерисовка
   одного не трогает остальные. */
.bg i, .bg .fly, .stage .ring, .peek-body { will-change: transform; }
.bg .stars, .stage .halo { will-change: opacity; }
.bg { contain: strict; }
/* Тяжёлый фильтр на покачивающемся Бабае заменён лёгкой тенью под ним. */
.m.happy { filter: none; }
/* Меньше одновременных бесконечных анимаций на главной: третье пятно,
   мерцание звёзд и пульс свечения неподвижны (разница незаметна глазу),
   колец два вместо трёх. */
.bg .b3, .bg .stars, .stage .halo { animation: none; }
.stage .ring:nth-child(3) { display: none; }
.stage .ring:nth-child(2) { animation-delay: 1.8s; }

/* --- Анкета в партнёры и блок вывода ------------------------------------- */
.chips-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip-pick {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(156, 226, 152, .05); color: var(--text-2); font: inherit; font-size: 14px; cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .12s;
}
.chip-pick:active { transform: scale(.96); }
.chip-pick.on { background: var(--mint); border-color: var(--mint); color: var(--ink); font-weight: 600; }
.pa-about {
  width: 100%; min-height: 88px; resize: vertical; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .18); color: var(--text); font: inherit; font-size: 15px; line-height: 1.4;
}
.pa-about:focus { outline: none; border-color: var(--mint); }
.pa-error { min-height: 0; max-height: 0; overflow: hidden; color: var(--pink-text); font-size: 13px; transition: max-height .2s var(--ease), margin .2s; }
.pa-error.on { max-height: 60px; margin-top: 10px; }
.wd .btn { margin: 0 0 10px; }
.wd .meta { display: flex; justify-content: space-between; margin: 2px 0 6px; font-size: 13px; color: var(--muted); }
.lnk-btn { display: block; margin-top: 8px; padding: 0; border: none; background: none; color: var(--mint); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

/* Способы оплаты: настоящие логотипы и хорошо заметный выбор. */
.pickrow .ic.pay { background: none; width: 38px; height: 38px; border-radius: 12px; overflow: hidden; }
.pickrow .ic.pay .brand-logo { width: 38px; height: 38px; border-radius: 50%; display: block; }
.pickrow .ic.pay .brand-sbp { width: 38px; height: 38px; border-radius: 11px; background: #fff; display: grid; place-items: center; }
.pickrow .radio { width: 24px; height: 24px; box-shadow: inset 0 0 0 2px rgba(217, 233, 223, .35); }
.pickrow.on { border-color: var(--mint); background: rgba(156, 226, 152, .12); box-shadow: 0 0 0 1px rgba(156, 226, 152, .35) inset; }
.pickrow.on .radio { background: #A8F0A3; box-shadow: 0 0 0 4px rgba(156, 226, 152, .22); }
.pickrow.on .radio svg { width: 15px; height: 15px; stroke: #062015; stroke-width: 3.4; }
/* «Скоро»: серая строка, но логотип различим. */
.pickrow.soon { opacity: 1; background: rgba(255, 255, 255, .02); border-color: rgba(156, 226, 152, .08); }
.pickrow.soon .t b, .pickrow.soon .t small { color: var(--muted); }
/* Логотип у способа «скоро» — в полном цвете: бледный знак СБП выглядел
   сломанным. Приглушён только текст и метка. */
.pickrow.soon .ic.pay { filter: none; opacity: 1; }

/* --- Мастер: выбор устройства ------------------------------------------------ */
.setup.pick0 { justify-content: center; gap: 22px; }
.setup.pick0 .text p { margin-bottom: 0; min-height: 0; }
.devgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dev {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 6px 12px;
  border-radius: 18px; border: 1.5px solid rgba(156, 226, 152, .16); background: rgba(12, 40, 32, .7); color: #fff;
  font: inherit; cursor: pointer; animation: fadeUp .3s var(--spring) both;
  transition: transform .24s var(--spring), border-color .24s, background .24s;
}
.dev:nth-child(2) { animation-delay: .03s; } .dev:nth-child(3) { animation-delay: .06s; }
.dev:nth-child(4) { animation-delay: .09s; } .dev:nth-child(5) { animation-delay: .12s; } .dev:nth-child(6) { animation-delay: .15s; }
.dev:active { transform: scale(.96); }
.dev .dev-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(156, 226, 152, .08); color: #fff; }
.dev b { font-size: 13px; font-weight: 600; line-height: 1.2; text-align: center; }
.dev small { font-size: 11px; color: var(--muted); white-space: nowrap; }
@media (max-width: 380px) { .dev small { font-size: 10px; } .dev b { font-size: 12.5px; } }
.dev small.me { color: var(--mint); font-weight: 600; }
.dev .dev-check {
  position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: #A8F0A3;
  display: grid; place-items: center; transform: scale(0); opacity: 0; transition: transform .26s var(--spring), opacity .2s;
}
.dev.on { border-color: #A8F0A3; background: rgba(40, 110, 80, .45); box-shadow: 0 0 0 3px rgba(168, 240, 163, .14); }
.dev.on .dev-check { transform: scale(1); opacity: 1; }
.dev .dev-check svg { width: 13px; height: 13px; stroke: #062015; stroke-width: 3.4; }
.setup .orb .brand { width: 52px; height: 52px; }
.setup .orb .orb-badge {
  position: absolute; right: 4px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; background: #A8F0A3; color: #062015;
  display: grid; place-items: center; border: 3px solid #0D3027; font-style: normal;
}
.setup .orb .orb-badge svg { width: 15px; height: 15px; stroke: #062015; }
.setup .orb .orb-babai { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; transform: scale(1.12); }
.setup.won .orb { overflow: hidden; }
.setup.won .orb { border-color: #A8F0A3; box-shadow: 0 0 60px rgba(168, 240, 163, .35); }
.setup.won .text h2 { color: #A8F0A3; }
.watch {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--mint);
}
.watch.off { color: var(--text-3); line-height: 1.45; }
.watch-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); animation: bbDot 1s ease-in-out infinite; }
.setup-howto { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; text-align: left; }
.setup-howto li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--line); }
.setup-howto li > span {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(156, 226, 152, .14); color: var(--mint); font-weight: 700; font-size: 14px;
}
.setup-howto b { display: block; font-size: 14px; color: #fff; }
.setup-howto small { display: block; font-size: 12.5px; color: var(--text-3); line-height: 1.4; margin-top: 2px; }
@media (max-height: 700px) { .setup .scene { min-height: 170px; } .dev { padding: 12px 4px 10px; } .dev .dev-ic { width: 44px; height: 44px; } }

/* Плитки устройств в мастере: класс .dev общий с карточками тарифов, и
   их анимация появления не должна повторяться при выборе устройства. */
.setup.still .dev, .setup.still .devgrid * { animation: none !important; }
.setup .devgrid .dev { transition: border-color .18s ease, background-color .18s ease, transform .12s ease; }
.pickrow .ic.pay .brand-sbp { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }

/* --- Вывод: способы, реквизиты с проверкой на лету, сводка перед отправкой --- */
.wd-methods { margin-bottom: 14px; }
.wd-methods button { min-height: 44px; }
.field.bad, .field.bad:focus-within { border-color: var(--pink); }
.wd-hint { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin: -4px 2px 14px; min-height: 18px; }
.wd-hint.bad { color: var(--pink-text); }
.wd-sum .row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
.wd-sum .row span { color: var(--muted); flex: none; }
.wd-sum .row b { text-align: right; word-break: break-all; font-weight: 600; }
.wd-sum .mono, .person small .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.person .st.mint { color: var(--mint); }
.pickrow .ic.pay .brand-card { width: 38px; height: 38px; display: grid; place-items: center; }


/* --- Число устройств: карточки с картинкой ------------------------------------- */
.dcards { display: flex; flex-direction: column; gap: 12px; }
.dc {
  position: relative; display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 14px;
  width: 100%; padding: 16px 16px 16px 14px; border-radius: 24px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); background: linear-gradient(180deg, rgba(20, 58, 47, .7), rgba(12, 40, 33, .7));
  color: var(--text); -webkit-tap-highlight-color: transparent;
  animation: fadeUp .42s both; animation-delay: calc(var(--i) * 60ms);
  transition: border-color .22s ease, background-color .22s ease, box-shadow .22s ease, transform .14s ease;
}
.still .dc { animation: none; }
.dc:active { transform: scale(.985); }
.dc.on {
  border-color: var(--mint); background: linear-gradient(180deg, rgba(156, 226, 152, .14), rgba(156, 226, 152, .05));
  box-shadow: 0 0 0 4px rgba(156, 226, 152, .08), 0 14px 34px rgba(0, 0, 0, .28);
}
.dc-best {
  position: absolute; top: -10px; left: 16px; padding: 4px 10px; border-radius: 999px;
  background: var(--pink); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .07em;
  box-shadow: 0 6px 16px rgba(227, 82, 134, .35);
}
.dc-art {
  position: relative; width: 72px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  color: var(--mint); background: radial-gradient(circle at 50% 40%, rgba(156, 226, 152, .2), rgba(156, 226, 152, .04) 70%);
  border: 1px solid rgba(156, 226, 152, .16); transition: color .22s, background .22s;
}
.dc-art svg { width: 58px; height: 50px; }
.dc:not(.on) .dc-art { color: #8FBFA4; }
.dc-n {
  position: absolute; right: -6px; bottom: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 800;
  background: #0C2B23; color: var(--mint); border: 1.5px solid rgba(156, 226, 152, .45);
}
.dc.on .dc-n { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.dc-t { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dc-t b { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.dc-t small { font-size: 13px; color: var(--muted); }
.dc-t em { font-style: normal; font-size: 12px; color: var(--mint); opacity: .85; margin-top: 3px; white-space: nowrap; }
.dc-p { text-align: right; padding-right: 30px; }
.dc-p b { display: block; font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dc.on .dc-p b { color: var(--mint); }
.dc-p small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.dc-radio, .term-radio {
  width: 22px; height: 22px; border-radius: 50%; border: 1.8px solid rgba(156, 226, 152, .35);
  display: grid; place-items: center; transition: border-color .2s, background-color .2s;
}
.dc-radio { position: absolute; right: 14px; top: 50%; margin-top: -11px; }
.dc-radio i, .term-radio i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .24s var(--spring); }
.dc.on .dc-radio, .term.on .term-radio { border-color: var(--mint); background: var(--mint); }
.dc.on .dc-radio i, .term.on .term-radio i { transform: scale(1); }
@media (max-width: 360px) { .dc { grid-template-columns: 58px 1fr auto; gap: 10px; } .dc-art { width: 58px; height: 54px; } .dc-art svg { width: 48px; } .dc-p b { font-size: 19px; } }

/* --- Уровни тарифов (Стандарт / Про / Ультра) ----------------------------------- */
.dcards.tiers { gap: 14px; }
.dc.tier { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
.dc-head { display: grid; grid-template-columns: 44px 1fr auto 22px; align-items: center; gap: 12px; }
.dc-ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  color: var(--mint);
  background: radial-gradient(circle at 50% 40%, rgba(156, 226, 152, .2), rgba(156, 226, 152, .04) 70%);
  border: 1px solid rgba(156, 226, 152, .16);
}
.dc-ico svg { width: 24px; height: 24px; }
.dc.tier .dc-radio { position: static; margin: 0; }
.dc.tier .dc-p { padding-right: 0; }
.dc-q { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dc-q span { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 12px; background: rgba(0, 0, 0, .18); border: 1px solid rgba(156, 226, 152, .1); }
.dc-q small { font-size: 11px; color: var(--muted); letter-spacing: .01em; }
.dc-q b { font-size: 14px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.dc.on .dc-q b { color: var(--mint); }
.dc-y { font-style: normal; font-size: 12px; color: var(--mint); opacity: .9; text-align: center; padding-top: 2px; }
@media (min-width: 640px) { .dc-q { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* --- Пакеты трафика ---------------------------------------------------------- */
.packs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.pack {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 18px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--text); -webkit-tap-highlight-color: transparent;
  transition: border-color .22s, background-color .22s, transform .14s;
}
.pack:active { transform: scale(.985); }
.pack:hover { border-color: rgba(156, 226, 152, .4); }
.pack-gb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pack-gb b { font-size: 17px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.pack-gb small { font-size: 12.5px; color: var(--muted); }
.pack-p { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.pack-p b { font-size: 17px; font-weight: 800; color: var(--mint); font-variant-numeric: tabular-nums; }
.pack-p small { font-size: 11.5px; color: var(--muted); }

/* --- Сроки строками ------------------------------------------------------------ */
.terms { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.term {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: 20px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--text); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: border-color .22s, background-color .22s, box-shadow .22s, transform .14s;
}
.term:active { transform: scale(.985); }
.term.on { border-color: var(--mint); background: rgba(156, 226, 152, .09); box-shadow: 0 0 0 4px rgba(156, 226, 152, .07); }
.term-radio { flex: none; }
.term-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.term-t b { font-size: 16.5px; font-weight: 700; color: #fff; }
.term-t small { font-size: 12.5px; color: var(--muted); }
.term-p { text-align: right; }
.term-p b { font-size: 20px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.term.on .term-p b { color: var(--mint); }
.term-p s { display: block; font-size: 12px; color: var(--muted); }
.term-badge {
  position: absolute; top: -9px; right: 14px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800;
  background: rgba(156, 226, 152, .16); color: var(--mint); border: 1px solid rgba(156, 226, 152, .3);
}
.term-badge.hit { background: var(--pink); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(227, 82, 134, .3); }

/* --- Мастер: устройство узнали сами -------------------------------------------- */
.detect0 { display: flex; flex-direction: column; justify-content: flex-end; min-height: 100%; }
.detect-hero { position: relative; display: grid; place-items: center; margin: 28px auto 8px; width: 220px; height: 220px; }
.detect-glow { position: absolute; inset: 20px; border-radius: 50%; background: radial-gradient(circle, rgba(156, 226, 152, .26), transparent 68%); animation: breathe 3.2s ease-in-out infinite; }
.detect-orb {
  position: relative; width: 128px; height: 128px; border-radius: 38px; display: grid; place-items: center;
  background: linear-gradient(160deg, #1A4A3C, #0E3027); border: 1.5px solid rgba(156, 226, 152, .35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .08); animation: popIn .5s var(--spring) both;
}
.detect-orb svg { width: 64px; height: 64px; }
.detect-tag {
  position: absolute; bottom: 6px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--mint); color: var(--ink); font-size: 12.5px; font-weight: 700; box-shadow: 0 8px 20px rgba(156, 226, 152, .3);
  animation: fadeUp .45s .2s both;
}
.detect-tag svg { width: 12px; height: 12px; }
.detect-steps { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 16px 0 20px; flex-wrap: wrap; }
.detect-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 6px; white-space: nowrap; border-radius: 999px; background: rgba(156, 226, 152, .07); border: 1px solid rgba(156, 226, 152, .14); font-size: 12.5px; color: var(--text-2, #CFE3D8); }
.detect-steps li span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(156, 226, 152, .18); color: var(--mint); font-size: 11px; font-weight: 800; }
.detect0 .btn.g { margin-top: 8px; }
.still .detect-orb, .still .detect-tag { animation: none; }
@keyframes breathe { 0%, 100% { transform: scale(.94); opacity: .8; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes popIn { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

/* --- Шторки: клавиатура и смахивание ------------------------------------------- */
.sheet { bottom: var(--kb, 0px); transition: bottom .24s ease; touch-action: pan-y; }
.sheet.dragging { animation: none !important; transition: none !important; }
.sheet .grip { cursor: grab; }
.rename-sugg { margin: 12px 0 16px; }

/* --- Анкета партнёра ------------------------------------------------------------ */
.pa-head { margin-bottom: 14px; }
.pa-kicker { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mint); margin-bottom: 6px; }
.pa-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.pa-perk { padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, .16); border: 1px solid rgba(156, 226, 152, .14); display: flex; flex-direction: column; gap: 3px; }
.pa-perk .ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: var(--mint); background: rgba(156, 226, 152, .1); margin-bottom: 4px; }
.pa-perk .ic svg { width: 16px; height: 16px; }
.pa-perk b { font-size: 14.5px; color: #fff; }
.pa-perk small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.pa-steps { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin: 4px 0 14px; }
.pa-steps span { white-space: nowrap; }
.pa-steps span.on { color: var(--mint); font-weight: 700; }
.pa-steps i { flex: 1; height: 1px; background: rgba(156, 226, 152, .2); min-width: 8px; }
.pa-sec { margin: 16px 0 8px; }
.pa-field { margin-top: 10px; }
.pa-hint { font-size: 12px; color: var(--muted); margin: 6px 2px 0; transition: color .2s; }
.pa-hint.bad { color: var(--pink-text); }
.pa-field.bad .field { border-color: rgba(240, 127, 166, .7); box-shadow: 0 0 0 3px rgba(240, 127, 166, .12); }
.pa-foot { font-size: 12px; color: var(--muted); text-align: center; margin: 12px 8px 0; line-height: 1.45; }

/* --- Вход на сайте (браузер, не Telegram) --------------------------------- */
.view.login { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 8px; }
.view.login .home-title { margin-top: 4px; }
.login-left { width: 100%; display: flex; flex-direction: column; align-items: center; }
.login-hero { width: 100%; animation: loginFloat 6s ease-in-out infinite; }
@keyframes loginFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.login-actions, .login-card { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.login-actions .btn, .login-card .btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.login-actions .btn svg, .login-card .btn svg { width: 20px; height: 20px; }
.login-card { padding: 22px 18px; border-radius: 26px; background: var(--card); border: 1px solid rgba(156, 226, 152, .16); box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
.login-card h2 { margin: 2px 0 0; font-size: 21px; color: #fff; }
.login-card p { margin: 0 0 4px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.login-card p b { color: var(--text); }
.login-ic { width: 58px; height: 58px; margin: 0 auto 4px; border-radius: 18px; display: grid; place-items: center; color: var(--mint); background: rgba(156, 226, 152, .1); border: 1px solid rgba(156, 226, 152, .25); animation: loginPop .5s var(--spring) both; }
.login-ic svg { width: 26px; height: 26px; }
.login-ic.tg { color: #fff; background: #2AABEE; border-color: transparent; box-shadow: 0 10px 26px rgba(42, 171, 238, .35); }
@keyframes loginPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.login-code { display: flex; justify-content: center; gap: 8px; margin: 6px 0 8px; }
.login-code span.dash { width: 14px; flex: none; background: none; border: 0; }
@media (max-width: 360px) { .login-code { gap: 4px; } .login-code span { flex: 1 1 0; min-width: 0; max-width: 44px; font-size: 20px; } }
.login-code span { width: 44px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .25); border: 1.5px solid rgba(156, 226, 152, .35); animation: loginPop .45s var(--spring) both; }
.login-wait { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.login-wait b { color: var(--text); font-variant-numeric: tabular-nums; }
.spin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(156, 226, 152, .25); border-top-color: var(--mint); animation: spin .9s linear infinite; }
.login-note { margin-top: 6px; font-size: 13px; color: var(--muted); }
.btn.tg-btn { background: #2AABEE; color: #fff; box-shadow: 0 12px 28px rgba(42, 171, 238, .3); }
.fade-in { animation: fadeUp .35s var(--spring) both; }
#login-code { letter-spacing: .5em; text-align: center; font-size: 22px; font-weight: 700; }

/* Кабинет в браузере на компьютере: вокруг рамки — живой фон бренда,
   а не пустота; рамка чуть приподнята при появлении. */
html.web body { background: radial-gradient(1200px 800px at 20% 10%, rgba(156, 226, 152, .10), transparent 60%), radial-gradient(900px 700px at 85% 90%, rgba(227, 82, 134, .10), transparent 60%), #06140F; }
@media (min-width: 640px) and (min-height: 700px) {
  /* На сайте — не рамка телефона, а панель приложения: мягкая светящаяся
     кромка, чуть шире и выше, чтобы на мониторе было просторно. */
  html.web #phone {
    width: 460px;
    height: min(920px, 100%);
    border-radius: 34px;
    box-shadow:
      0 0 0 1px rgba(156, 226, 152, .18),
      0 0 60px rgba(156, 226, 152, .10),
      0 40px 90px rgba(0, 0, 0, .45);
    animation: phoneIn .6s var(--spring) both;
  }
}
@keyframes phoneIn { from { transform: translateY(18px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

/* Ссылки на тарифы и документы внизу профиля и экрана входа. */
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 6px; margin: 18px 0 6px; }
.legal-links .quiet { width: auto; min-height: 44px; margin: 0; padding: 0 8px; font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; }
.legal-links a.quiet { display: inline-flex; align-items: center; text-decoration: none; }
.legal-links .quiet:hover { color: var(--mint); }
.legal-links span { color: var(--muted); opacity: .5; font-size: 13px; }

/* Профиль: тарифы и документы — плитки 2×2. */
/* Оформление — как у остальных заголовков секций (.sec), только отступ свой. */
.docs-title { margin: 22px 4px 10px; }
.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.doc-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 104px; padding: 14px; text-align: left; cursor: pointer;
  border-radius: 18px; border: 1px solid rgba(156, 226, 152, .16); color: var(--text);
  background: linear-gradient(160deg, rgba(156, 226, 152, .1), rgba(0, 0, 0, .12));
  transition: transform .18s ease, border-color .2s ease, background-color .2s ease; -webkit-tap-highlight-color: transparent; }
.doc-tile:active { transform: scale(.97); }
.doc-tile:hover { border-color: rgba(156, 226, 152, .34); }
.doc-tile b { font-size: 15px; font-weight: 600; line-height: 1.2; }
.doc-tile small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.doc-ic { width: 36px; height: 36px; margin-bottom: 6px; border-radius: 12px; display: grid; place-items: center; color: var(--mint);
  background: rgba(156, 226, 152, .12); border: 1px solid rgba(156, 226, 152, .2); }
.doc-ic svg { width: 19px; height: 19px; }

/* Знак СБП: по центру белого квадрата, чёткие края на любом масштабе. */
.pickrow .ic.pay .brand-sbp svg { display: block; shape-rendering: geometricPrecision; }
/* Оба логотипа (СБП и USDT) — одного размера по центру одинаковой плитки,
   object-fit сохраняет пропорции: стоят ровно и одинаково. */
.pickrow .ic.pay .brand-sbp img { width: 30px; height: 30px; object-fit: contain; display: block; }

/* Мелкие кнопки на вид остаются мелкими, а палец попадает по 44px:
   невидимая зона нажатия чуть шире самой кнопки. */
.chip-pick, .chips button, .idbtn, .balance .tag { position: relative; }
.chip-pick::after, .chips button::after { content: ""; position: absolute; inset: -5px 0; }
.idbtn::after { content: ""; position: absolute; inset: -14px -6px; }
.idbtn { min-height: 32px; }
.top a.brand { min-height: 32px; display: inline-flex; align-items: center; }
.side .legal-links .quiet, .side a.quiet { min-height: 32px; }
.balance .tag::after { content: ""; position: absolute; inset: -9px -4px; }
.sheet .login-wait { margin-top: 14px; }

/* === Сайт на компьютере ==================================================
   Широкое окно браузера (не Telegram): вместо «рамки телефона» посреди
   пустого экрана — полноценная раскладка. Слева боковое меню с подписями,
   справа — основная область, содержимое по центру удобной ширины. Шторки —
   окна по центру экрана. Телефон и Telegram эти правила не задевают. */
.side { display: none; }
@media (min-width: 840px) {
  html.web #stage { padding: 0; }
  html.web #phone {
    width: 100%; height: 100%; border-radius: 0; box-shadow: none; animation: none;
    background: radial-gradient(1100px 700px at 70% -10%, rgba(156, 226, 152, .08), transparent 60%), linear-gradient(180deg, #0B2820 0%, #0A2A21 50%, #07201A 100%);
  }
  /* Боковое меню. */
  html.web.authed .side {
    display: flex; flex-direction: column; gap: 6px;
    position: absolute; top: 0; left: 0; bottom: 0; width: 264px; z-index: 8;
    padding: 26px 18px 22px; border-right: 1px solid rgba(156, 226, 152, .1);
    background: linear-gradient(180deg, rgba(6, 24, 19, .85), rgba(6, 22, 17, .92));
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    animation: sideIn .45s var(--spring) both;
  }
  /* Telegram на компьютере во весь экран рисует свою полосу управления сверху
     (--head). Опускаем под неё боковое меню, чтобы «BABAI» и первый пункт не
     попали под кнопки клиента. Контент справа отступ уже учитывает (#screen). */
  html.web.authed body.fs .side { top: var(--head); padding-top: 18px; }
  .side-brand { display: flex; align-items: center; gap: 8px; padding: 0 8px 22px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
  .side-brand img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
  .side-brand b { color: var(--mint); }
  .side-brand small { font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--muted); margin-left: -2px; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; }
  .side-i {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 12px; border-radius: 14px;
    border: 1px solid transparent; background: none; color: var(--muted); font-size: 15px; font-weight: 600; text-align: left; cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  }
  .side-i:hover { background: rgba(156, 226, 152, .06); color: var(--text); }
  .side-i.on { background: rgba(156, 226, 152, .12); border-color: rgba(156, 226, 152, .28); color: var(--mint); }
  .side-ic { width: 26px; display: grid; place-items: center; }
  .side-ic svg { width: 21px; height: 21px; }
  .side-cta { margin-top: 18px; height: 50px; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .side-cta svg { width: 18px; height: 18px; }
  /* Низ меню: заметная строка «На сайт» и ровная сетка документов 2×2 —
     вместо кучки из пяти разнокалиберных кнопок. */
  .side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(156, 226, 152, .1); display: flex; flex-direction: column; gap: 4px; }
  .side-site { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 12px; color: var(--text-2); font-size: 13.5px; font-weight: 600; text-decoration: none; }
  .side-site svg { color: var(--mint); flex: none; }
  .side-site:hover { background: rgba(156, 226, 152, .06); color: var(--mint); }
  .side-legal { display: flex; flex-wrap: wrap; gap: 0 2px; padding: 0 2px; }
  .side-legal button { text-align: left; min-height: 32px; padding: 4px 8px; border: 0; background: none; color: var(--muted); font-size: 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
  /* Длинная «Конфиденциальность» уходит последней — второй строкой целиком,
     а не обрезается многоточием (тот же приём, что у .legal-links). */
  .side-legal button:nth-child(3) { order: 1; }
  .side-legal button:hover { color: var(--mint); background: rgba(156, 226, 152, .06); }
  @keyframes sideIn { from { transform: translateX(-16px); opacity: 0; } to { transform: none; opacity: 1; } }

  /* Основная область справа от меню. */
  html.web.authed #scroll, html.web.authed .top, html.web.authed .fadeTop, html.web.authed #setup .setup { left: 264px; }
  html.web.authed .nav { display: none; }
  html.web.authed .top .brand { display: none; }
  html.web #scroll { scrollbar-width: thin; scrollbar-color: rgba(156, 226, 152, .25) transparent; }
  html.web #screen { max-width: 760px; margin: 0 auto; padding: calc(64px + var(--head)) 28px 120px; }
  html.web .top { padding: 16px 28px 0; height: 64px; }
  html.web .fadeTop { height: 76px; }
  html.web .paybar { left: calc(264px + (100% - 264px - 720px) / 2); right: auto; width: 720px; bottom: 28px; }
  html.web .toast { left: calc(264px + (100% - 264px - 440px) / 2); right: auto; width: 440px; top: 22px; }
  /* Мастер подключения — колонка по центру, а не растянутый во всю ширину экран.
     Проценты в padding считаются от ширины всего окна, поэтому вычитаем меню. */
  html.web #setup .setup { padding: 76px max(28px, calc((100% - 264px - 520px) / 2)) 48px; }

  /* Шторки — окна по центру. Сдвиг от перетаскивания (JS пишет transform)
     складывается с центровкой (свойство translate). */
  html.web .sheet { left: 50%; right: auto; top: 50%; bottom: auto; width: min(520px, calc(100vw - 48px)); translate: -50% -50%; animation: modalIn .28s var(--spring) both; }
  html.web.authed .sheet { left: calc(264px + (100vw - 264px) / 2); width: min(520px, calc(100vw - 264px - 48px)); }
  html.web .sheet .body { border-radius: 26px; border-bottom: 1px solid var(--line); padding: 14px 26px 26px; max-height: 84vh; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
  html.web .sheet .grip { display: none; }
  html.web #sheet.leaving .sheet { animation: modalOut .2s ease both; }
  @keyframes modalIn { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes modalOut { from { transform: none; opacity: 1; } to { transform: scale(.97); opacity: 0; } }

  /* Экран входа: слева крупно о сервисе, справа карточка входа. */
  html.web:not(.authed) #screen { max-width: 1040px; }
  /* Левая колонка (Бабай, заголовок, подпись) — один блок: его середина
     совпадает с серединой карточки входа, сколько бы строк в нём ни было. */
  html.web:not(.authed) .view.login {
    display: grid; grid-template-columns: 1fr 440px; grid-template-areas: "left card";
    align-items: center; align-content: center; justify-items: center; column-gap: 64px; min-height: calc(100vh - 200px);
  }
  html.web:not(.authed) .view.login .login-left { grid-area: left; justify-self: center; text-align: center; }
  /* На шагах ввода почты, кода и ожидания Telegram заголовка под Бабаем нет,
     а у его картинки снизу пустое поле под тень — без поправки он стоит
     заметно выше середины карточки. Сдвиг на половину этого поля. */
  html.web:not(.authed) .view.login .login-left:has(> .login-hero:only-child) { margin-top: 48px; }
  html.web:not(.authed) .view.login .home-title { font-size: 40px; margin-top: 12px; }
  html.web:not(.authed) .view.login .home-sub { font-size: 17px; max-width: 460px; margin-top: 6px; }
  html.web:not(.authed) .view.login .login-actions,
  html.web:not(.authed) .view.login .login-card {
    grid-area: card; align-self: center; padding: 28px; border-radius: 26px;
    background: linear-gradient(160deg, rgba(18, 58, 47, .9), rgba(10, 36, 29, .9)); border: 1px solid var(--line);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .4); justify-self: stretch;
  }
  html.web:not(.authed) .view.login .legal-links { gap: 0 2px; }
  html.web:not(.authed) .view.login .legal-links span { display: none; }
  html.web:not(.authed) .view.login .legal-links .quiet { padding: 0 6px; }
}
/* Большой монитор: главная — в две колонки (Бабай и статус слева, карточка
   подписки справа), чтобы не было длинной ленты с огромными кнопками. */
@media (min-width: 1280px) {
  html.web.authed #screen:has(> .view.home) { max-width: 1120px; }
  html.web.authed .view.home {
    position: relative;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 468px); column-gap: 52px;
    align-items: center;
    grid-template-areas: "sw cards" "stage cards" "title cards" "sub cards";
    /* Высоту (ровно до центра экрана) задаёт общее правило ≥840 выше. */
    align-content: center;
  }
  /* Бабай на мониторе чуть компактнее — тогда левая колонка по высоте
     совпадает с карточкой справа и обе читаются одним ровным блоком. */
  html.web.authed .view.home .stage .m { max-height: 206px; }
  /* Левый герой (переключатель, Бабай, заголовок) — на мягкой панели, чтобы
     он читался единым блоком вровень с карточкой справа, а не висел в пустоте.
     Панель рисуем псевдоэлементом с абсолютным позиционированием поверх левой
     колонки — без обёртки в DOM, чтобы не трогать мобильную вёрстку и анимации.
     align-self: stretch тянет её на всю высоту ряда карточки справа — так обе
     колонки одной высоты и верх/низ совпадают (ровно). */
  html.web.authed .view.home::before {
    content: ""; grid-column: 1 / 2; grid-row: 1 / -1; align-self: stretch; z-index: 0;
    /* По вертикали — ровно по карточке: верх ряда = верх карточки, снизу
       под карточкой ещё точки листания (10px + 6px) и отступ ленты (4px). */
    margin: 0 -38px; border-radius: 30px;
    background: linear-gradient(158deg, rgba(22, 66, 53, .78), rgba(9, 34, 27, .82));
    border: 1px solid rgba(156, 226, 152, .18); box-shadow: 0 30px 70px rgba(0, 0, 0, .38);
  }
  html.web.authed .view.home > * { position: relative; z-index: 1; }
  /* Меню переключателя подписок — поверх Бабая: правило «> *» своей
     специфичностью опускало переключатель до z-index:1, и картинка
     перекрывала открытый список подписок. */
  html.web.authed .view.home .switcher { z-index: 8; }
  html.web.authed .view.home .subs { margin: 0; padding: 0 0 4px; scroll-padding: 0; }
  html.web.authed .view.home .switcher { grid-area: sw; justify-self: center; margin-top: 20px; }
  /* В grid-центрировании переключатель сжимается до содержимого, и клэмп
     «100% − 24px» резал бы собственное имя («Моя под…») — тут места хватает. */
  html.web.authed .view.home .switcher > button { max-width: 420px; }
  html.web.authed .view.home .stage { grid-area: stage; min-height: 196px; }
  html.web.authed .view.home .home-title { grid-area: title; font-size: 33px; }
  html.web.authed .view.home .home-sub { grid-area: sub; font-size: 16px; padding-bottom: 22px; }
  /* Карточка подписки — ровно по центру своей колонки; обе колонки одной
     высоты (панель растянута), поэтому центр карточки совпадает с центром
     Бабая, а верх и низ — на одной линии с панелью. */
  html.web.authed .view.home .subs-wrap, html.web.authed .view.home .card.offer { grid-area: cards; align-self: center; }
}

/* === Ровно и плавно =======================================================
   Экран появляется не одним куском, а по очереди: блоки и строки списков
   поднимаются друг за другом. Только при переходе (in/up) — тихие
   перерисовки (still) не мигают. */
#screen.in > .view > :not(.login-hero):not(.login-left):not(.peek),
#screen.up > .view > :not(.login-hero):not(.login-left):not(.peek),
#screen.in > .view > .login-left > :not(.login-hero),
#screen.up > .view > .login-left > :not(.login-hero) { animation: fadeUp .5s var(--spring) both; }
#screen.in > .view > :nth-child(2), #screen.up > .view > :nth-child(2) { animation-delay: .04s; }
#screen.in > .view > :nth-child(3), #screen.up > .view > :nth-child(3) { animation-delay: .08s; }
#screen.in > .view > :nth-child(4), #screen.up > .view > :nth-child(4) { animation-delay: .12s; }
#screen.in > .view > :nth-child(5), #screen.up > .view > :nth-child(5) { animation-delay: .16s; }
#screen.in > .view > :nth-child(6), #screen.up > .view > :nth-child(6) { animation-delay: .2s; }
#screen.in > .view > :nth-child(7), #screen.up > .view > :nth-child(7) { animation-delay: .24s; }
#screen.in > .view > :nth-child(n+8), #screen.up > .view > :nth-child(n+8) { animation-delay: .28s; }
#screen.in .list > .li, #screen.up .list > .li { animation: fadeUp .45s var(--spring) both; }
#screen.in .list > .li:nth-child(2), #screen.up .list > .li:nth-child(2) { animation-delay: .05s; }
#screen.in .list > .li:nth-child(3), #screen.up .list > .li:nth-child(3) { animation-delay: .1s; }
#screen.in .list > .li:nth-child(n+4), #screen.up .list > .li:nth-child(n+4) { animation-delay: .15s; }

/* Отклик на нажатия и наведение: мягко, без рывков. */
.btn { transition: transform .22s var(--spring), box-shadow .25s var(--ease), filter .2s, opacity .2s, background .25s, color .25s, border-color .25s; }
.btn:active { transform: scale(.97); transition-duration: .08s; }
.li { transition: background-color .2s var(--ease), transform .18s var(--spring); }
.li:active { transform: scale(.99); }
.card, .list { transition: border-color .25s var(--ease), box-shadow .3s var(--ease), transform .3s var(--spring); }
@media (hover: hover) and (pointer: fine) {
  .btn.p:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 32px rgba(227, 82, 134, .42); }
  .btn.tg-btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 32px rgba(42, 171, 238, .42); }
  .btn.g:hover:not(:disabled) { background: rgba(156, 226, 152, .07); border-color: rgba(156, 226, 152, .6); }
  .li:not(.static):hover { background: rgba(156, 226, 152, .06); }
  .list:hover, .card:hover { border-color: rgba(156, 226, 152, .26); }
  .pill-btn { transition: background-color .2s, transform .2s var(--spring); }
  .pill-btn:hover { background: rgba(255, 255, 255, .18); }
}

/* Нижнее меню телефона: содержимое уходит под него в тень, а не торчит
   текстом между кнопками. */
.nav::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(-22px - var(--bottom)); height: 84px; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(7, 32, 26, .92) 48%, rgba(7, 32, 26, 0));
}

/* Ссылки на документы: без точек-разделителей, которые повисали в конце
   строки. Длинная «Конфиденциальность» переносится последней и встаёт
   ровно по центру. */
.legal-links { gap: 0 4px; }
.legal-links span { display: none; }
.legal-links .quiet:nth-of-type(3) { order: 1; }
/* Подписи переносятся ровными строками, без одинокого слова внизу. */
.home-sub, .login-note, .login-card p, .view.login p { text-wrap: balance; }

@media (min-width: 840px) {
  /* «Назад» — по левому краю колонки, а не прижата к меню. */
  html.web .top { padding-left: max(28px, calc((100% - 264px - 760px) / 2 + 28px)); padding-right: max(28px, calc((100% - 264px - 760px) / 2 + 28px)); }
  /* Итог оплаты — ровно по ширине колонки. */
  html.web .paybar { left: calc(264px + (100% - 264px - 704px) / 2); width: 704px; }
  /* Кнопка в меню: подпись свободно, не впритык к краям. */
  .side-cta { font-size: 14px; padding: 0 12px; white-space: nowrap; }
  /* Выглядывающий Бабай — жест для телефона; на мониторе про друзей есть пункт меню. */
  html.web .peek { display: none; }
  /* Мастер подключения: всё собрано по центру экрана, а не прижато к низу
     с пустым полем сверху. */
  html.web #setup .setup, html.web .setup.detect0 { justify-content: center; }
  html.web #setup .setup .scene { flex: 0 0 auto; min-height: 300px; }
  /* Вход: Бабай, заголовок и подпись — одной ровной колонкой по центру. */
  html.web:not(.authed) .view.login { justify-items: center; }
  html.web:not(.authed) .view.login .home-title,
  html.web:not(.authed) .view.login .home-sub { text-align: center; }
  html.web:not(.authed) .view.login .legal-links { margin: 8px 0 -10px; }
  html.web:not(.authed) .view.login .legal-links .quiet:nth-of-type(3) { order: 0; }
}
/* Кабинет на десктопе: главная — РОВНО по центру экрана. Сверху и снизу
   одинаковый запас 64px (как верхний отступ #screen), высота без прокрутки:
   64 + (100vh − 128) + 64 = 100vh. */
@media (min-width: 840px) {
  html.web.authed #screen:has(> .view.home) { padding-bottom: 64px; }
  html.web.authed .view.home { margin-top: 0; height: auto; min-height: calc(100vh - var(--head, 0px) - 128px); }
}
@media (min-width: 840px) and (max-width: 1279.98px) {
  html.web.authed .view.home { justify-content: center; }
  /* Карточка — сразу под героем, а не утянута вниз остатком высоты. */
  html.web.authed .view.home .subs-wrap, html.web.authed .view.home .card.offer { margin-top: 26px; }
}
@media (min-width: 1280px) {
  /* Карточка подписки — ровно по центру левой колонки, а не прижата вниз. */
  html.web.authed .view.home .subs-wrap { margin: 0; }
}

/* --- Поддержка: список обращений и чат -------------------------------------- */
.list.tickets { padding: 0; }
.ticket-row { display: flex; align-items: center; gap: 12px; text-align: left; }
.ticket-row .t { flex: 1; min-width: 0; }
.ticket-row .t b { display: block; font-size: 15px; font-weight: 600; }
.ticket-row .t small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-meta { display: flex; align-items: center; gap: 8px; flex: none; }
.ticket-meta .chip { white-space: nowrap; }
.unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--pink); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* Точка непрочитанного на нижней навигации */
.nav .bar-pill button { position: relative; }
.nav-badge { position: absolute; top: 9px; right: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px #0A241D; }

/* Чат одного обращения: шапка, лента, поле ввода, поднимается над клавиатурой */
.chat {
  position: absolute; left: 0; right: 0; top: 0; bottom: var(--kb, 0px); z-index: 20;
  display: flex; flex-direction: column; background: #0A241D;
  padding-top: calc(58px + var(--head)); transition: bottom .26s var(--ease);
}
/* Тема и статус «ждём ответа» — заметной шапкой сверху. */
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px 12px; border-bottom: 1px solid var(--line-soft); }
.chat-head .ch-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.chat-head b { font-size: 16px; font-weight: 700; color: #fff; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.chat-msgs::-webkit-scrollbar { display: none; }
.bubble { max-width: 82%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; animation: fadeUp .3s var(--spring) both; }
.bubble .bubble-t { display: block; word-wrap: break-word; overflow-wrap: anywhere; }
.bubble time { display: block; font-size: 10.5px; opacity: .6; margin-top: 4px; text-align: right; }
.bubble.me { align-self: flex-end; background: var(--mint); color: var(--ink); border-bottom-right-radius: 5px; }
.bubble.op { align-self: flex-start; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-soft); color: var(--text); border-bottom-left-radius: 5px; }
.chat-note, .chat-empty { align-self: center; max-width: 280px; text-align: center; font-size: 13px; color: var(--muted); padding: 10px 16px; }
.chat-input { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 10px 14px calc(10px + var(--bottom)); border-top: 1px solid var(--line-soft); background: #0A241D; }
.chat-input .area { flex: 1; margin: 0; min-height: 44px; max-height: 120px; border-radius: 16px; resize: none; }
.chat-send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--mint); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: transform .14s, opacity .2s; }
.chat-send:disabled { opacity: .4; cursor: default; }
.chat-send:active:not(:disabled) { transform: scale(.92); }

/* Заметка об исчерпании белого списка на карточке подписки */
.wl-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(227, 82, 134, .12); color: var(--pink-text, #F28AB0); font-size: 12.5px; line-height: 1.4; }
.wl-note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
