/* ============================================================
   FlypeksVPN Mini App — visual system
   Единственная точка смены акцента: --acid
   ============================================================ */

@font-face{font-family:Manrope;src:url(/fonts/manrope-400.ttf) format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:Manrope;src:url(/fonts/manrope-500.ttf) format('truetype');font-weight:500;font-display:swap}
@font-face{font-family:Manrope;src:url(/fonts/manrope-600.ttf) format('truetype');font-weight:600;font-display:swap}
@font-face{font-family:Manrope;src:url(/fonts/manrope-700.ttf) format('truetype');font-weight:700;font-display:swap}
@font-face{font-family:Manrope;src:url(/fonts/manrope-800.ttf) format('truetype');font-weight:800;font-display:swap}

:root{
  /* Отступы под системные вырезы и панель Telegram.
     env() и safeAreaInset описывают один и тот же вырез — берём максимум,
     а панель Telegram (contentSafeAreaInset) добавляем сверху. */
  --top-inset: calc(max(env(safe-area-inset-top), var(--tg-safe-top, 0px)) + var(--tg-top, 0px));
  --bottom-inset: calc(max(env(safe-area-inset-bottom), var(--tg-safe-bottom, 0px)) + var(--tg-bottom, 0px));

  --acid:#BDF13A;
  --acid-dim:#8FB92C;
  --acid-ink:#0A0B0A;
  --acid-soft:rgba(189,241,58,.13);
  --acid-line:rgba(189,241,58,.42);

  --bg:#0A0B0A;
  --card:#141614;
  --card-2:#1B1E1B;
  --card-3:#232622;
  --line:rgba(255,255,255,.07);

  --txt:#FFFFFF;
  --txt-2:#A6ABA4;
  --txt-3:#6E736C;

  --danger:#FF3B4E;
  --warn:#F5C518;

  --r-lg:26px;
  --r-md:20px;
  --r-sm:15px;

  --pad:16px;
  --nav-h:96px;
  --ease:cubic-bezier(.22,.9,.28,1);
  --ease-spring:cubic-bezier(.34,1.45,.5,1);   /* лёгкий пружинный перелёт */
  --ease-out:cubic-bezier(.16,.84,.3,1);       /* плавное торможение */
}

*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
/* ВАЖНО: overflow-x только на body. На html он ломает вертикальный скролл в WebView Telegram */
html{
  background:var(--bg);min-height:100%;
  /* clip, а не hidden: hidden делает html контейнером прокрутки
     и ломает вертикальный скролл страницы */
  overflow-x:clip;overscroll-behavior-y:none;overscroll-behavior-x:none;
}
body{
  background:var(--bg);min-height:100%;
  overflow-x:clip;overscroll-behavior-y:none;overscroll-behavior-x:none;
  /* pan-y разрешает вертикальный жест и запрещает горизонтальный */
  touch-action:pan-y;
  -webkit-overflow-scrolling:touch;
}
body{
  font-family:Manrope,-apple-system,'SF Pro Text',system-ui,sans-serif;
  color:var(--txt);
  font-size:15px;line-height:1.45;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
svg{width:100%;height:100%;fill:currentColor;display:block}
img{max-width:100%;display:block}
u{text-decoration:none;color:var(--acid);border-bottom:1px solid var(--acid-line)}

/* ---------- shell ---------- */
.app{
  min-height:100dvh;
  /* --tg-top приходит из Telegram: в полноэкранном режиме сверху висит
     его собственная панель с крестиком, под неё нужен отступ */
  padding:calc(var(--top-inset) + 12px) var(--pad)
          calc(var(--nav-h) + var(--bottom-inset));
  max-width:520px;margin:0 auto;position:relative;
}
.screen{display:none;animation:screenIn .42s var(--ease-out) both}
.screen.is-active{display:block}
@keyframes screenIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.glow-top{
  position:absolute;top:-190px;left:50%;transform:translateX(-50%);
  width:100%;max-width:100vw;height:400px;pointer-events:none;z-index:-1;
  background:radial-gradient(ellipse 50% 50% at 50% 50%,rgba(140,200,40,.15),transparent 70%);
}

/* reveal */
.rv{animation:rv .5s var(--ease) both}
.rv.d1{animation-delay:.05s}
.rv.d2{animation-delay:.1s}
.rv.d3{animation-delay:.15s}
/* после первого показа экрана карточки больше не «всплывают заново»:
   display:none сбрасывает CSS-анимацию, из-за этого каждое переключение
   таба переигрывало все reveal-ы — выглядело как дёрганье */
.screen.seen .rv{animation:none}
/* Контент внутри шита: стартует не одновременно с шитом, а через 140мс.
   Шит приезжает первым, потом «населяется» содержимым — ощущается
   как слоистая оркестровка, а не всё сразу. Шаг 45мс (чуть быстрее
   обычного 48мс, чтобы уложиться в комфортный таймлайн) */
/* Контент внутри шита: stagger 350ms + 28ms ОТКЛЮЧЁН (animation:none).
   Причины:
   1) При открытии order sheet — 7 детей с rowIn создают 7 параллельных
      opacity-анимаций (0→1, 280мс каждая) = 7 paint-операций на кадр
      в течение ~450мс. На телефоне это отбирало GPU у анимации открытия
      dropdown'а.
   2) Stagger в form-modal (order sheet) — не нужен: контент статичен,
      он не «прибывает по одному», он уже в DOM. Визуально достаточно,
      что сам шит появился (transform-анимация 420мс).
   Контент ВСЕ ЕЩЁ появляется с opacity:1 сразу при `display` смены
   sheet с display:none на block. Никакой визуальной потери, зато
   dropdown'ы и прочие sheet-анимации теперь НЕ конкурируют за GPU. */
/* sheet > .row-in: STAGGER ВОЗВРАЩЁН в v=139 (был отключён в v=131/138
   по соображениям производительности, но юзер явно сказал: «не в
   скорости, а в плавности как выглядит»). Контент появляется
   едва-различимым каскадом когда шит проехал половину пути —
   создаёт depth-эффект «слои наполняются». 160мс + stagger 10мс
   — быстрее чем раньше (было 180/14), чтобы не затягивать визуально. */
.sheet > .row-in{animation:rowIn .16s cubic-bezier(0.16, 1, 0.3, 1) both;animation-delay:calc(150ms + var(--i,0)*10ms)}
@keyframes rv{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.rv,.screen{animation:none}}

/* ---------- motion: entrances ----------
   Всё только на transform/opacity — считает композитор, перерисовок нет.
   .row-in — ступенчатое появление списков; задержка задаётся JS через --i */
/* rowIn: opacity-only. Используется stagger() в renderLocs/renderConnect/
   renderTopRef/renderTx для каскадного появления списков. В ШИТАХ
   отключён через .sheet > .row-in { animation:none } — там stagger
   мешает, создавая 7 параллельных paint-операций. Длительность 0.28s
   короче, чем была (0.42s) — список проявляется быстрее, не успевает
   надоесть. */
@keyframes rowIn{from{opacity:0}to{opacity:1}}
.row-in{animation:rowIn .28s var(--ease) both;animation-delay:calc(var(--i,0)*32ms)}

/* пружинное появление иконок/элементов (toast, копирование, QR) */
@keyframes popIn{0%{opacity:0;transform:scale(.5)}60%{opacity:1;transform:scale(1.12)}100%{opacity:1;transform:scale(1)}}

/* прогресс-бары заливаются (transition задан в .meter-track i / #lvlBar ниже) */

/* числа, которые докручиваются счётчиком: табличные цифры не меняют ширину
   знаков от кадра к кадру — текст не «дышит» и не переобщает layout */
#balanceValue,#refCount,#stTraffic,#trafficText,.stat b{font-variant-numeric:tabular-nums}

/* QR-код материализуется с лёгким поворотом */
@keyframes qrIn{from{opacity:0;transform:scale(.86) rotate(-4deg)}to{opacity:1;transform:none}}
#qrBox img,#qrBox canvas{animation:qrIn .55s var(--ease-spring) both}

/* премиальная иконка тарифа мягко парит */
@keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-3.5px)}}
.tariff-badge.floaty svg{animation:floaty 4s ease-in-out infinite}

/* блик, изредка пробегающий по промо-баннерам */
@keyframes bannerSheen{
  0%{transform:translateX(-150%) skewX(-16deg)}
  34%,100%{transform:translateX(340%) skewX(-16deg)}
}
.promo-banner::after{
  content:'';position:absolute;top:0;bottom:0;left:0;width:34%;
  background:linear-gradient(105deg,transparent,rgba(255,255,255,.06),transparent);
  transform:translateX(-150%) skewX(-16deg);
  animation:bannerSheen 7s ease-in-out 2.2s infinite;
  will-change:transform;               /* свой слой: баннер не перекрашивается каждый кадр */
  pointer-events:none;
}

/* орб «включается» пружинным толчком в момент подключения */
@keyframes orbPop{0%{transform:scale(.9)}55%{transform:scale(1.05)}100%{transform:scale(1)}}
.orb.on{animation:orbPop .6s var(--ease-spring)}

/* строка статуса щита сменяется мягко */
@keyframes shieldOn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
#shieldLine.safe{animation:shieldOn .5s var(--ease) both}

/* активная вкладка островка подпрыгивает, а не просто подкрашивается */
@keyframes navBounce{
  0%{transform:translateY(0) scale(.9)}
  55%{transform:translateY(-4px) scale(1.16)}
  100%{transform:translateY(-1px) scale(1.06)}
}
.island button.active i{animation:navBounce .5s var(--ease-spring)}

/* иконка toast-уведомления выскакивает пружиной */
.toast.show i{animation:popIn .45s var(--ease-spring)}

/* кнопка, в которую только что скопировали: зелёная вспышка + галочка */
.copied{color:var(--acid)!important;animation:popIn .35s var(--ease-spring)}

/* раскрывающиеся ответы FAQ — плавная высота через grid-rows,
   внутрянка обёрнута в .faq-a-in (overflow:hidden) */
.faq-a{display:grid;grid-template-rows:0fr;transition:grid-template-rows .4s var(--ease)}
.faq-row.open .faq-a{grid-template-rows:1fr}
.faq-a-in{overflow:hidden;min-height:0}

@media (prefers-reduced-motion:reduce){
  .row-in,.tariff-badge.floaty svg,.promo-banner::after,
  #qrBox img,#qrBox canvas,.toast.show i,
  .island button.active i,.orb.on,#shieldLine.safe,.copied,
  .nav-dot.is-on::after,.chat-ava-dot::after,
  .chat-composer .chat-attach.busy svg{animation:none!important}
  .meter-track i,#lvlBar,.faq-a{transition:none!important}
}

/* ---------- primitives ---------- */
.card{
  background:var(--card);border-radius:var(--r-lg);
  padding:20px;margin-bottom:14px;
  border:1px solid var(--line);
}
.card.tight{padding:4px 18px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.card-title{font-size:20px;font-weight:800;letter-spacing:-.02em;display:flex;align-items:center;gap:10px}
.card-title.center,.card-sub.center{text-align:center;justify-content:center}
.card-sub{color:var(--txt-2);font-size:14px;margin-top:8px;line-height:1.5}
.eyebrow{color:var(--txt-3);font-size:13px;font-weight:600}
.group-label{display:block;color:var(--txt-3);font-size:13.5px;margin:6px 0 10px 6px}

.pill-count{
  background:#0C0E0C;border-radius:999px;padding:3px 12px;
  font-size:15px;font-weight:800;color:var(--acid);
}
.pill-count.acid{background:var(--acid);color:var(--acid-ink)}

.icon-btn{
  width:44px;height:44px;flex:0 0 44px;border-radius:14px;
  background:#0C0E0C;display:grid;place-items:center;color:#fff;
  transition:transform .16s var(--ease),background .16s;
}
.icon-btn svg{width:20px;height:20px}
.icon-btn:active{transform:scale(.9);background:var(--card-3)}
/* Обновление устройств: стрелки кружатся, пока грузится; оборот с мягкой
   паузой в конце (72%→100%) выглядит «по-настоящему», а не как блендер */
.icon-btn.is-refreshing{background:var(--card-3)}
.icon-btn.is-refreshing svg{
  color:var(--acid);
  animation:devRefresh .9s cubic-bezier(.55,.1,.45,.9) infinite;
}
@keyframes devRefresh{
  0%{transform:rotate(0deg)}
  72%{transform:rotate(360deg)}
  100%{transform:rotate(360deg)}
}

.hint-dashed{
  border:1.5px dashed var(--acid-line);background:rgba(189,241,58,.05);
  border-radius:var(--r-md);padding:14px 16px;margin-top:14px;
  color:var(--txt-2);font-size:14px;line-height:1.5;
}
.hint-dashed b{color:var(--acid);font-weight:600}

.chev{width:20px;height:20px;flex:0 0 20px;color:var(--txt-3)}
.chev.down{transform:rotate(90deg);transition:transform .26s var(--ease)}
.mini{width:19px;height:19px;flex:0 0 19px}

/* buttons */
.btn-acid{
  background:var(--acid);color:var(--acid-ink);
  border-radius:var(--r-md);padding:17px 22px;
  font-weight:800;font-size:16px;letter-spacing:-.01em;
  display:flex;align-items:center;justify-content:center;gap:9px;
  transition:transform .16s var(--ease),filter .16s;
}
.btn-acid svg{width:18px;height:18px;flex:0 0 18px}
/* Press-feedback: scale .975 + brightness .93. Transition ускорена до 100мс
   для «мгновенного» отклика — пользователь должен чувствовать реакцию
   кнопки В КАДР клика, а не через 200мс. brightness .93 даёт лёгкое
   «вдавливание» — кнопка темнеет, как физическая кнопка под пальцем. */
.btn-acid:active{transform:scale(.975);filter:brightness(.93);transition:transform .1s var(--ease),filter .1s}
.btn-acid.full{width:100%;margin-top:16px}
/* «Дышащая» аура у primary CTA «Стать премиум» через псевдо-слой —
   opacity+transform на ::after (композитор, без перерисовки box-shadow
   каждый кадр, как было раньше). Псевдо лежит абсолютно позади кнопки
   с blur, alpha 0.34→0.55 за 3.2s — ощущение «живого» призыва. */
.btn-acid.glow{position:relative;box-shadow:0 0 26px rgba(189,241,58,.34),0 0 56px rgba(189,241,58,.1)}
.btn-acid.glow::after{
  content:'';position:absolute;inset:-8px;border-radius:inherit;
  background:radial-gradient(ellipse at center,rgba(189,241,58,.4),transparent 70%);
  z-index:-1;pointer-events:none;opacity:.55;
  animation:glowPulse 3.2s ease-in-out infinite;
}
@keyframes glowPulse{
  0%,100%{opacity:.4;transform:scale(1)}
  50%{opacity:.85;transform:scale(1.04)}
}
/* кнопка-акция, стоящая прямо на экране (не внутри карточки), не должна липнуть к следующему блоку */
.screen>.btn-acid.full{margin-bottom:26px}
.screen>.btn-acid.glow{margin-bottom:32px}
.btn-acid[disabled]{opacity:.55;pointer-events:none}

.btn-ghost{
  background:#0C0E0C;color:#fff;border-radius:var(--r-md);
  padding:17px 22px;font-weight:700;font-size:16px;
  display:flex;align-items:center;justify-content:center;
  transition:transform .16s var(--ease);
}
.btn-ghost:active{transform:scale(.975)}
.btn-pair{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:16px}

.btn-soft{
  background:rgba(189,241,58,.1);color:var(--acid);
  border-radius:14px;padding:12px 18px;font-weight:700;font-size:14.5px;
  display:inline-flex;align-items:center;gap:9px;margin-top:11px;
  transition:transform .16s var(--ease);
}
.btn-soft svg{width:17px;height:17px;flex:0 0 17px}
.btn-soft:active{transform:scale(.96)}
.btn-mute{
  background:var(--card-2);color:var(--txt-2);
  border-radius:14px;padding:12px 18px;font-weight:600;font-size:14.5px;
  display:inline-flex;align-items:center;gap:9px;margin-top:9px;
}
.btn-mute svg{width:17px;height:17px;flex:0 0 17px}
.btn-warn{background:var(--warn);color:#111}

/* ---------- tariff card ---------- */
.tariff-card{
  display:block;width:100%;text-align:left;
  background:var(--card);border:1px solid var(--line);
  border-radius:var(--r-lg);padding:18px;margin-bottom:22px;
  /* Сложный press-фидбек: чуть сжимается, фон подсвечивается — как
     «карточка втягивается при нажатии», даёт тактильный фидбек
     на крупный primary-тариф */
  transition:transform .18s var(--ease),background .2s var(--ease),
             border-color .2s var(--ease),box-shadow .2s var(--ease);
}
.tariff-card:active{transform:scale(.99);background:var(--card-2);border-color:rgba(255,255,255,.12)}
.tariff-head{display:flex;align-items:center;gap:14px}
.tariff-badge{
  width:52px;height:52px;flex:0 0 52px;border-radius:16px;
  background:var(--acid);color:var(--acid-ink);
  display:grid;place-items:center;
}
.tariff-badge svg{width:28px;height:28px}
.tariff-badge.prem{background:var(--acid)}
.tariff-copy{flex:1;min-width:0}
.tariff-copy b{display:block;font-size:19px;font-weight:800;letter-spacing:-.02em}
.tariff-copy small{display:block;color:var(--txt-3);font-size:13.5px;margin-top:2px}
.tariff-meter{display:block;border-top:1px solid var(--line);margin-top:16px;padding-top:14px}
.meter-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.meter-row em{font-style:normal;font-weight:700;font-size:14.5px;color:var(--danger)}
.meter-row em.ok{color:var(--acid)}
.meter-cta{
  display:inline-flex;align-items:center;gap:3px;
  color:var(--acid);font-weight:600;font-size:14px;white-space:nowrap;
}
.meter-cta svg{width:16px;height:16px;color:var(--acid)}
.meter-track{display:block;height:6px;border-radius:99px;background:#2A2E29;margin-top:11px;overflow:hidden}
.meter-track i{
  display:block;height:100%;border-radius:99px;background:var(--danger);
  /* scaleX вместо width: transform считает композитор, а не layout —
     заливка бара не роняет FPS на телефоне */
  width:100%;transform:scaleX(0);transform-origin:left center;
  transition:transform .85s var(--ease);
}
.meter-track i.ok{background:var(--acid)}

/* ---------- shield + orb ---------- */
.shield-state{text-align:center;margin-bottom:6px;position:relative;z-index:2}
.shield-state p{
  display:flex;align-items:center;justify-content:center;gap:9px;
  font-weight:800;font-size:18px;letter-spacing:-.02em;color:var(--danger);
  /* плавный переход цвета (опасный красный → защитный кислотный) при
     смене состояния подключения. transition на color — композитор-safe */
  transition:color .35s var(--ease);
}
.shield-state p svg{width:21px;height:21px;flex:0 0 21px;transition:color .35s var(--ease),transform .35s var(--ease)}
#shieldLine.safe{color:var(--acid)}
#shieldLine.safe svg{animation:liveDot 2.2s ease-in-out infinite}
.shield-state small{display:block;color:var(--txt-3);font-size:14.5px;margin-top:3px;transition:color .35s var(--ease)}
@keyframes liveDot{
  /* тонкая пульсация иконки щита в «защищённом» состоянии — даёт
     ощущение живой связи, не статичной иконки. Амплитуда 6% — едва
     заметно, но «дышит» */
  0%,100%{transform:scale(1);opacity:1}
  50%{transform:scale(1.06);opacity:.82}
}

.orb-stage{
  position:relative;height:330px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:26px;
}
/* Вокруг кнопки ничего нет. Элементы .ring остались в разметке, но скрыты. */
.ring{display:none}

.orb{
  width:178px;height:178px;border-radius:50%;position:relative;
  display:grid;place-items:center;color:#8E938C;
  background:
    radial-gradient(circle at 38% 28%,#4C4E4B 0%,#353834 34%,#232522 62%,#181A17 100%);
  box-shadow:
    inset 0 3px 10px rgba(255,255,255,.1),
    inset 0 -12px 26px rgba(0,0,0,.75),
    0 26px 55px rgba(0,0,0,.62);
  transition:transform .2s var(--ease),color .35s,
             background .6s var(--ease),box-shadow .6s var(--ease);
}

/* Единственная анимация во всём экране — мягкий импульс, когда туннель жив.
   Только transform и opacity: их считает композитор, перерисовки нет. */
.orb::after{
  content:'';position:absolute;inset:-2px;border-radius:50%;
  border:2px solid rgba(189,241,58,.45);
  pointer-events:none;opacity:0;transform:scale(1);
}
.orb-stage.live .orb::after{
  will-change:transform,opacity;
  animation:orbPulse 3.4s cubic-bezier(.25,.6,.35,1) infinite;
}
@keyframes orbPulse{
  0%  {transform:scale(1);opacity:.5}
  70% {transform:scale(1.4);opacity:0}
  100%{transform:scale(1.4);opacity:0}
}

.orb svg{width:74px;height:74px;position:relative;z-index:1}
.orb:active{transform:scale(.955)}
.orb.on{
  color:var(--acid-ink);
  background:radial-gradient(circle at 38% 28%,#D6FB74 0%,var(--acid) 40%,#8FBE24 100%);
  box-shadow:
    inset 0 3px 10px rgba(255,255,255,.42),
    inset 0 -12px 26px rgba(0,0,0,.22),
    /* был 60px blur alpha .5 — слишком «ядовитое» зелёное засвечивание
       вокруг орба. Снижено до 40px .2: орб явно «горит», но не
       выжигает фон. Тёмная drop-shadow слегка уплотнена для контраста */
    0 0 40px rgba(189,241,58,.2),0 20px 50px rgba(0,0,0,.55);
}

/* Подсказка под орбом подсвечивается, когда туннель жив */
.orb-stage.live .orb-hint{
  color:var(--acid);background:var(--acid-soft);
  box-shadow:inset 0 0 0 1px var(--acid-line);
}
.orb-hint{transition:color .5s var(--ease),background .5s var(--ease),box-shadow .5s var(--ease)}

@media (prefers-reduced-motion:reduce){
  .orb-stage.live .orb::after{animation:none}
}
.orb-hint{
  background:var(--card-2);border-radius:14px;padding:13px 26px;
  color:var(--txt-2);font-size:15px;font-weight:600;
}

/* ---------- advice ---------- */
.advice{margin-top:16px;position:relative}
.advice article{display:flex;gap:16px;padding-bottom:22px;position:relative}
.advice article:last-child{padding-bottom:0}
.advice article:not(:last-child)::before{
  content:'';position:absolute;left:21px;top:48px;bottom:6px;
  width:0;border-left:2px dashed var(--acid-line);
}
.advice i{
  width:43px;height:43px;flex:0 0 43px;border-radius:50%;
  border:1.6px solid var(--acid);color:var(--acid);
  display:grid;place-items:center;background:var(--card);z-index:1;
}
.advice i svg{width:21px;height:21px}
.advice b{display:block;font-size:17px;font-weight:800;letter-spacing:-.02em}
.advice small{display:block;color:var(--txt-2);font-size:14px;margin-top:3px;line-height:1.5}
.advice em{font-style:normal;color:var(--acid);font-weight:600}

/* ---------- banners ---------- */
.promo-banner{
  position:relative;overflow:hidden;width:100%;text-align:left;
  border-radius:var(--r-lg);padding:20px;margin-bottom:14px;
  background:linear-gradient(105deg,#161A14 0%,#1D2618 58%,#28381C 100%);
  border:1px solid var(--line);
  display:flex;align-items:center;
  transition:transform .18s var(--ease);
}
.promo-banner:active{transform:scale(.99)}
.banner-text{position:relative;z-index:2;max-width:70%}
.banner-text b{display:block;font-size:17px;font-weight:800;line-height:1.32;letter-spacing:-.02em}
.banner-text b em{font-style:italic;color:var(--acid);border-bottom:2px solid var(--acid)}
.banner-text small{
  display:inline-flex;align-items:center;gap:4px;
  color:var(--txt-3);font-size:14px;margin-top:9px;font-weight:600;
}
.banner-text small svg{width:15px;height:15px}
.banner-art{position:absolute;right:-18px;top:50%;transform:translateY(-50%);width:150px;height:150px}

/* 3D-ассеты: изображение растворяется в фоне карточки маской слева */
.art-coin{
  background:url(/assets/coin.webp?a=3) center/contain no-repeat;
  /* фон у ассета теперь прозрачный, маска нужна только чтобы
     край мягко уходил под текст баннера */
  -webkit-mask-image:linear-gradient(100deg,transparent 0%,#000 26%);
  mask-image:linear-gradient(100deg,transparent 0%,#000 26%);
}
.art-coin i{display:none}

/* ---------- acid cards ---------- */
.acid-card{
  position:relative;overflow:hidden;
  background:linear-gradient(118deg,var(--acid) 0%,#A9E52F 52%,#C8F84B 100%);
  color:var(--acid-ink);border-radius:var(--r-lg);
  padding:22px;margin-bottom:14px;
}
.acid-card h3{font-size:21px;font-weight:800;letter-spacing:-.02em;position:relative;z-index:2}
.acid-card p{font-size:14.5px;opacity:.72;margin-top:5px;position:relative;z-index:2;max-width:62%}
.acid-art{
  /* фиксированный квадрат вместо растяжки по высоте карточки:
     на большом экране картинка больше не деформируется */
  position:absolute;right:-14px;top:50%;transform:translateY(-50%);
  width:204px;height:204px;max-height:112%;
  background-size:contain;background-repeat:no-repeat;background-position:right center;
  pointer-events:none;
}
.art-gem,.art-cup,.art-money{
  -webkit-mask-image:linear-gradient(100deg,transparent 0%,#000 36%);
  mask-image:linear-gradient(100deg,transparent 0%,#000 36%);
  background-position:center;background-size:cover;background-repeat:no-repeat;
}
.art-gem{background-image:url(/assets/gem.webp?a=4)}
.art-cup{background-image:url(/assets/cup.jpg?a=2)}
.art-money{background-image:url(/assets/money.jpg?a=2)}

.acid-card .from-label{font-size:26px;font-weight:800;display:block;position:relative;z-index:2;line-height:1}
.acid-card .from-price{display:flex;align-items:baseline;gap:3px;position:relative;z-index:2;margin-bottom:12px}
.acid-card .from-price b{font-size:50px;font-weight:800;letter-spacing:-.05em;line-height:1}
.acid-card .from-price span{font-size:21px;font-weight:700;opacity:.82}

.acid-card.level{padding-bottom:20px}
.acid-card.level h3 b{font-weight:800}
.lvl-track{display:block;height:6px;border-radius:99px;background:rgba(0,0,0,.16);margin:20px 0 12px;overflow:hidden;position:relative;z-index:2}
.lvl-track i{display:block;height:100%;border-radius:99px;background:rgba(0,0,0,.5);width:100%;transform:scaleX(0);transform-origin:left center;transition:transform .9s var(--ease)}
.acid-card.level small{font-size:15px;font-weight:700;position:relative;z-index:2}

.acid-card.wallet{padding:20px 22px}
.acid-card.wallet>span{font-size:15px;font-weight:600;opacity:.72;position:relative;z-index:2}
.wallet-row{display:flex;align-items:center;gap:14px;position:relative;z-index:2;margin-top:2px}
.wallet-row b{font-size:38px;font-weight:800;letter-spacing:-.04em}
.round-plus{
  width:40px;height:40px;flex:0 0 40px;border-radius:50%;
  background:var(--acid-ink);color:var(--acid);display:grid;place-items:center;
  transition:transform .16s var(--ease);
}
.round-plus svg{width:20px;height:20px}
.round-plus:active{transform:scale(.9)}

/* feature lists */
.feat{list-style:none;margin-top:15px;display:grid;gap:12px}
.feat li{display:flex;align-items:flex-start;gap:12px;font-size:15.5px;font-weight:600;line-height:1.35}
.feat li i{width:23px;height:23px;flex:0 0 23px;border-radius:50%;display:grid;place-items:center;margin-top:1px}
.feat li i svg{width:14px;height:14px}
.feat li i.y{background:#2FBF4E;color:#fff}
.feat li i.n{background:var(--danger);color:#fff}
.feat li.off{color:var(--txt-3)}
.feat.dark li i{background:var(--acid-ink);color:var(--acid)}
.feat.dark li{color:var(--acid-ink);position:relative;z-index:2}

/* держим текст слева от 3D-объекта */
#premiumCard>h3,#premiumCard .from-label,#premiumCard .from-price,#premiumCard .feat li{max-width:70%}
.acid-card.level>h3,.acid-card.level>p,.acid-card.level>small{max-width:60%}
.acid-card.level .lvl-track{max-width:60%}
@media (max-width:360px){
  #premiumCard>h3,#premiumCard .from-label,#premiumCard .from-price,#premiumCard .feat li{max-width:70%}
}

/* ---------- hero ---------- */
.hero-pill{
  display:table;margin:6px auto 0;padding:11px 26px;border-radius:999px;
  background:rgba(189,241,58,.12);color:var(--acid);
  font-weight:700;font-size:16px;
}
.hero-title{
  text-align:center;font-size:31px;font-weight:800;letter-spacing:-.035em;
  line-height:1.14;margin:16px 0 0;
}
.hero-sub{text-align:center;color:var(--txt-3);font-size:15px;margin:9px 0 20px;line-height:1.45}
.hero-capsule{
  display:table;margin:16px auto 22px;padding:13px 24px;border-radius:16px;
  background:var(--card-2);color:var(--txt-2);font-size:15px;font-weight:600;
}
.plan-h{font-size:26px;font-weight:800;letter-spacing:-.03em;margin-top:3px}

.art-hero{height:210px;position:relative;margin:4px 0 6px}
.art-gift{
  background:url(/assets/coin.webp?a=3) center/contain no-repeat;
}
.art-gift i{display:none}

/* ---------- select ---------- */
.select{position:relative;margin-top:18px}
.select-face{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:var(--card-2);border:1.5px solid var(--line);border-radius:var(--r-md);
  padding:15px 18px;text-align:left;transition:border-color .2s,box-shadow .2s,background .2s;
}
.select-face:active{transform:scale(.985)}
.select-face small{display:block;color:var(--txt-3);font-size:13.5px}
.select-face b{display:block;font-size:17px;font-weight:700;margin-top:1px}
.select.open .select-face{border-color:var(--acid);box-shadow:0 0 22px rgba(189,241,58,.2);background:#1E221D}
.select.open .chev.down{transform:rotate(-90deg)}
/* список устройств раскрывается ПОВЕРХ шагов инструкции, не сдвигая их.
   Без overflow — родная прокрутка шита листает список на всю высоту. */
.select-list{
  display:none;position:absolute;left:0;right:0;top:calc(100% + 8px);
  z-index:40;background:#101310;border:1px solid var(--acid-line);border-radius:var(--r-md);
  margin-top:0;padding:6px;
  box-shadow:0 22px 54px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.03);
  animation:dropIn .2s var(--ease) both;
}
.select.open .select-list{display:block}
.select-list button{
  width:100%;display:flex;align-items:center;gap:12px;
  padding:14px 14px;border-radius:14px;font-size:16px;font-weight:600;text-align:left;
}
.select-list button.sel{background:var(--acid-soft);color:var(--acid)}
.select-list button:active{background:var(--card-3)}

/* ---------- steps ---------- */
.steps{margin-top:22px}
.steps article{display:flex;gap:16px;padding-bottom:24px;position:relative}
.steps article:last-child{padding-bottom:0}
.steps article:not(:last-child)::before{
  content:'';position:absolute;left:21px;top:50px;bottom:4px;
  width:0;border-left:2px dashed var(--acid-line);
}
.step-n{
  width:43px;height:43px;flex:0 0 43px;border-radius:50%;
  border:1.8px solid var(--acid);color:var(--acid);
  display:grid;place-items:center;font-weight:800;font-size:18px;
  background:var(--card);z-index:1;
}
.steps b{display:block;font-size:18px;font-weight:800;letter-spacing:-.02em}
.steps small{display:block;color:var(--txt-2);font-size:14px;margin-top:4px;line-height:1.5}

/* ---------- QR ---------- */
.qr-hero{display:flex;justify-content:center;margin-bottom:18px}
.qr-frame{
  width:212px;height:212px;border-radius:26px;background:#fff;
  display:grid;place-items:center;padding:12px;
  box-shadow:0 18px 44px rgba(0,0,0,.5);
}
.qr-frame canvas,.qr-frame img{width:100%!important;height:100%!important;border-radius:6px}
.qr-ph{width:60px;height:60px;color:#C9CFC4}

/* ---------- chips / locations ---------- */
.chip-wrap{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}
.chip{
  display:inline-flex;align-items:center;gap:8px;
  background:#0C0E0C;border-radius:14px;padding:12px 16px;
  font-size:15px;font-weight:600;
}
.chip span{font-size:19px;line-height:1}

/* ---------- devices ---------- */
.dev-row{
  display:flex;align-items:center;gap:14px;
  background:#0C0E0C;border-radius:var(--r-md);padding:14px 16px;margin-top:11px;
  transition:opacity .15s var(--ease),transform .12s var(--ease);
}
.dev-row:active{opacity:.6;transform:scale(.99)}
.dev-ic{
  width:48px;height:48px;flex:0 0 48px;border-radius:50%;
  background:rgba(189,241,58,.13);color:var(--acid);display:grid;place-items:center;
}
.dev-ic svg{width:24px;height:24px}
.dev-row div{flex:1;min-width:0}
.dev-row b{display:block;font-size:16px;font-weight:700}
.dev-row small{display:block;color:var(--txt-3);font-size:13.5px;margin-top:1px}
.dev-del{width:26px;height:26px;flex:0 0 26px;color:var(--danger)}
.empty{
  display:flex;flex-direction:column;align-items:center;gap:10px;
  text-align:center;color:var(--txt-2);font-size:14.5px;padding:40px 0;
  /* тонкая пунктирная рамка вокруг пустого состояния — визуально
     «складка», не «ошибка» */
  border:1.5px dashed rgba(255,255,255,.06);border-radius:18px;
  margin:8px 0;
}
.empty i{
  width:48px;height:48px;border-radius:50%;
  background:rgba(255,255,255,.04);
  display:grid;place-items:center;color:var(--txt-3);
  font-style:normal;
}
.empty b{font-weight:700;color:var(--txt);font-size:15.5px}

/* ---------- rows / links ---------- */
.row-link{
  display:flex;align-items:center;gap:14px;padding:17px 0;
  border-bottom:1px solid var(--line);font-size:16px;font-weight:600;
  transition:opacity .16s;
}
.row-link:last-child{border-bottom:0}
.row-link:active{opacity:.6}
.row-link b{flex:1;font-weight:600}
.ri{width:26px;height:26px;flex:0 0 26px}
.ri.acid{color:var(--acid)}

/* ---------- stats ---------- */
.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:16px}
.stat{background:#0C0E0C;border-radius:var(--r-md);padding:15px 16px}
.stat small{display:flex;align-items:center;gap:6px;color:var(--txt-3);font-size:13.5px}
.stat b{display:block;font-size:22px;font-weight:800;letter-spacing:-.03em;margin-top:5px}
.stat b em{font-style:italic;font-size:17px;color:var(--acid)}
.dot-i{width:15px;height:15px;color:var(--acid)}

.info-rows{margin-top:14px;display:grid;gap:12px}
.info-rows div{display:flex;align-items:center;gap:10px;font-size:15.5px;font-weight:600}
.info-rows div i{width:20px;height:20px;flex:0 0 20px;color:var(--acid)}
.info-rows div b{color:var(--acid);font-weight:700}

/* ---------- link box ---------- */
.link-box{
  width:100%;display:flex;align-items:center;gap:14px;text-align:left;
  background:#0C0E0C;border-radius:var(--r-md);padding:16px 18px;margin-top:14px;
}
.link-box span{flex:1;min-width:0;font-size:15px;font-weight:600;word-break:break-all;line-height:1.4}
.link-box svg{width:23px;height:23px;flex:0 0 23px;color:var(--acid)}

/* ---------- profile ---------- */
.profile-cover{
  /* Обложка в потоке, а не absolute. Тогда всё, что идёт следом,
     отсчитывается от её нижней кромки — без арифметики с вырезами. */
  position:relative;
  margin:calc(-1 * (var(--top-inset) + 12px)) 0 0;
  height:120px;
  border-radius:0 0 26px 26px;
  pointer-events:none;overflow:hidden;
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22132%22%20height%3D%22132%22%20viewBox%3D%220%200%20132%20132%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%231B4D02%22%20stroke-opacity%3D%220.28%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%2020l3.2%206.6%207.2%201-5.2%205%201.2%207.2-6.4-3.4-6.4%203.4%201.2-7.2-5.2-5%207.2-1z%22%2F%3E%3Ccircle%20cx%3D%2296%22%20cy%3D%2224%22%20r%3D%228%22%2F%3E%3Cpath%20d%3D%22M108%2058q6-7%2013%200%22%2F%3E%3Cpath%20d%3D%22M60%2015c5.5%200%2010%204.5%2010%2010s-4.5%2010-10%2010%22%2F%3E%3Cpath%20d%3D%22M27%2067l7-12%207%2012z%22%2F%3E%3Cpath%20d%3D%22M84%2074c0-5%204-9%209-9s9%204%209%209-9%2012-9%2012-9-7-9-12z%22%2F%3E%3Cpath%20d%3D%22M13%2097q7-9%2014%200t14%200%22%2F%3E%3Crect%20x%3D%2255%22%20y%3D%2293%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%225%22%2F%3E%3Cpath%20d%3D%22M118%20103v11M112.5%20108.5h11%22%2F%3E%3Cpath%20d%3D%22M45%2040h15M52.5%2032.5v15%22%2F%3E%3Ccircle%20cx%3D%22122%22%20cy%3D%2240%22%20r%3D%223.6%22%2F%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2252%22%20r%3D%223.6%22%2F%3E%3Cpath%20d%3D%22M95%20119q6.5-8%2013%200%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 0 0/132px 132px repeat,
    linear-gradient(158deg,#C9FA52 0%,var(--acid) 46%,#A2D92C 100%);
}
.profile-top{
  text-align:center;padding-top:0;
  /* половина аватара (72/2) заходит на обложку */
  margin-top:-36px;
}
.avatar-wrap{display:inline-block;position:relative}
.avatar{
  width:72px;height:72px;border-radius:50%;overflow:hidden;
  background:#0F110E;border:3px solid var(--bg);
  display:grid;place-items:center;
  font-size:25px;font-weight:800;color:var(--acid);
  box-shadow:0 12px 34px rgba(0,0,0,.5);
}
.avatar img{width:100%;height:100%;object-fit:cover}
.prem-badge{
  position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);
  background:var(--acid);color:var(--acid-ink);
  border:2.5px solid var(--bg);border-radius:999px;
  padding:3px 11px;font-size:10.5px;font-weight:800;letter-spacing:.06em;
  white-space:nowrap;
}
.profile-top h1{font-size:22px;font-weight:800;letter-spacing:-.03em;margin-top:20px}
.profile-top p{color:var(--txt-3);font-size:13.5px;margin-top:2px;margin-bottom:16px}

.tile-row{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-bottom:14px}
.tile{
  background:var(--card);border:1px solid var(--line);border-radius:var(--r-md);
  padding:17px 13px;text-align:left;transition:transform .16s var(--ease);
}
.tile:active{transform:scale(.97)}
.tile i{display:block;width:31px;height:31px;color:var(--acid);margin-bottom:13px}
.tile b{display:block;font-size:14px;font-weight:700;line-height:1.3}

/* ---------- island nav ---------- */
.island{
  position:fixed;left:50%;transform:translateX(-50%);
  bottom:calc(var(--bottom-inset) + 14px);
  width:min(calc(100% - 30px),490px);height:70px;z-index:60;
  /* 5 вкладок: home / plans / earn / support / profile */
  display:grid;grid-template-columns:repeat(5,1fr);align-items:center;
  padding:0 4px;border-radius:999px;
  /* Непрозрачный фон вместо backdrop-filter:blur(26px)+saturate.
     Размытие под плавающей навигацией перекомпоновывалось КАЖДЫЙ кадр
     скролла и анимаций — главный источник дёрганья на телефонах.
     Визуально на тёмной теме разница незаметна, скорость — кардинальная. */
  background:rgba(24,27,23,.97);
  border:1px solid rgba(255,255,255,.09);
  box-shadow:0 16px 44px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.07);
}
.island button{
  height:58px;border-radius:999px;position:relative;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  color:var(--txt-3);transition:color .24s var(--ease);
  min-width:0;padding:0 2px;
}
.island button i{width:24px;height:24px;display:block;flex:0 0 auto;transition:transform .28s var(--ease)}
.island button small{
  font-size:10.5px;font-weight:700;letter-spacing:-.02em;
  max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
/* очень узкие экраны — подписи мельче, чтобы «Поддержка» не обрезалась */
@media (max-width:359px){
  .island button small{font-size:9.5px;letter-spacing:-.03em}
  .island button i{width:22px;height:22px}
}
.island button.active{color:var(--acid)}
.island button.active i{transform:translateY(-1px) scale(1.06)}
.island button:active i{transform:scale(.88)}
.island button.active::before{
  content:'';position:absolute;inset:2px 3px;border-radius:999px;
  background:rgba(189,241,58,.1);z-index:-1;
  animation:rv .3s var(--ease) both;
}
.nav-av{
  width:24px;height:24px;border-radius:50%;overflow:hidden;
  background:#0F110E;display:grid;place-items:center;
  font-size:10.5px;font-weight:800;color:var(--acid);
  border:1.5px solid rgba(189,241,58,.4);
}
.nav-av img{width:100%;height:100%;object-fit:cover}
.island button.active .nav-av{border-color:var(--acid);box-shadow:0 0 14px rgba(189,241,58,.5)}

/* ── Приоритет 60fps при открытом шите ────────────────────────────────
   Пока шит открыт, бесконечные фоновые анимации (orbPulse, bannerSheen,
   dotRipple, liveDot, floaty) продолжают крутить compositor-слои
   ЗА тёмным backdrop'ом — пользователь их не видит, но GPU всё
   равно считает каждый кадр, конкурируя с transform-анимацией шита.
   На слабых телефонах это даёт 5-10fps при открытии.
   Решение: animation-play-state:paused на эти анимации когда шит открыт.
   Возобновляются автоматически когда .sheet-open снимается. */
.app.sheet-open .orb-stage.live .orb::after,
.app.sheet-open .promo-banner::after,
.app.sheet-open .nav-dot::after,
.app.sheet-open #shieldLine.safe svg,
.app.sheet-open .tariff-badge.floaty svg{animation-play-state:paused}

/* ---------- sheet ---------- */
.backdrop{
  position:fixed;inset:0;background:rgba(0,0,0,.78);z-index:70;
  opacity:0;pointer-events:none;contain:paint;
  /* Без transform/scale на backdrop — fullscreen transform композитор
     обрабатывает viewport (1920×1080 пикселей), это самый дорогой
     possible compositing-path. Только opacity 0→1 — дёшево, даёт
     «затемнение фона». Premium-feel даёт сама sheet-анимация. */
  transition:opacity .3s var(--ease);
}
.backdrop.open{
  opacity:1;pointer-events:auto;
  transition:opacity .3s var(--ease);
}
.backdrop.open{
  opacity:1;pointer-events:auto;
  transform:scale(1);
  transition:opacity .3s var(--ease),transform .3s var(--ease);
}
.sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:80;
  max-width:520px;margin:0 auto;
  background:var(--card);border-radius:28px 28px 0 0;
  padding:10px var(--pad) calc(var(--bottom-inset) + 22px);
  max-height:92dvh;overflow-y:auto;overscroll-behavior:contain;
  /* ---- sheet: premium slide-up с subtle scale-pop ----
   Анимация открытия — это ЛИЦО приложения. На слабых GPU без
   will-change слой создаётся при первом transform и держится весь
   цикл анимации (400мс) — это норма. Масштаб + translateY дают
   depth-эффект «шит приходит в место» через scale-origin 50% 100%
   (от низа). cubic-bezier(0.16, 1, 0.3, 1) — premium ease-out-expo:
   очень плавный старт + быстрое торможение = «500fps feel» на
   60fps-устройствах и приемлемо на 30fps. На 2fps-устройствах
   выглядит рывками, но юзер сам сказал: «не в скорости, а в
   плавности как выглядит» — ставим premium-feel. */
  transform:translateY(100%) scale(.98);
  transform-origin:50% 100%;
  transition:transform .38s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:none;
  will-change:auto;
}
/* .sheet.open: will-change:transform на время открытого состояния —
   держит compositor-слой пока шит виден, гарантируя плавный
   compositing всех transform-анимаций детей (rowIn, dropdown slide).
   При закрытии слой освобождается. */
.sheet.open{
  transform:translateY(0) scale(1);
  will-change:transform;
  /* box-shadow появляется МГНОВЕННО на .open — НИКАКОЙ transition.
     Transition на box-shadow заставлял браузер делать PAINT каждый кадр
     в течение 250мс (blur 28px = тяжёлый paint). Без transition shadow
     появляется мгновенно, но т.к. sheet в этот момент едет снизу
     (translateY 100%), shadow невидим до конца слайда. */
  box-shadow:0 -18px 28px rgba(0,0,0,.55);
}
/* will-change:transform на #sheetBody БЫЛ добавлен в v=126 для GPU-скролла,
   но на старых Android WebView постоянно «припаркованный» compositor-слой
   с большим растром (весь контент шита) занимает видеопамять и может
   вызывать fallback на software rendering — 5-10fps при скролле.
   УБРАНО: доверяем встроенной оптимизации Android WebView для overflow-y:auto. */
.sheet-grip{width:44px;height:4.5px;border-radius:99px;background:#3A3E38;margin:6px auto 18px}
.sheet h2{font-size:23px;font-weight:800;letter-spacing:-.03em;text-align:center;margin-bottom:18px}
.sheet .card{background:#0C0E0C}

.kv{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 0;font-size:15px}
.kv + .kv{border-top:1px solid rgba(255,255,255,.05)}
.kv span{color:var(--txt-3)}
.kv b{font-weight:700;text-align:right}
.promo-note{
  display:flex;gap:12px;align-items:flex-start;
  border:1.5px solid var(--acid-line);background:rgba(189,241,58,.06);
  border-radius:var(--r-md);padding:14px;margin-top:14px;
}
.promo-note em{
  font-style:normal;background:var(--acid);color:var(--acid-ink);
  border-radius:8px;padding:3px 10px;font-size:12px;font-weight:800;flex:0 0 auto;
}
.promo-note p{font-size:14px;color:var(--txt-2);line-height:1.45}
.sheet-label{display:block;font-size:19px;font-weight:800;letter-spacing:-.02em;margin:20px 0 12px}

/* v=112: были громоздкие карточки (бейдж флага + radio-кружок + градиент)
   — выглядело перегружено для бинарного выбора. Возвращаем плоский список
   (как было в v≤111) + единственное точечное улучшение: галочка справа
   при выборе вместо безликой рамки, и тонкий кислотный тинт фона. */
.opt{
  width:100%;display:flex;align-items:center;gap:14px;
  background:#0C0E0C;border:1.5px solid transparent;border-radius:var(--r-md);
  padding:16px 18px;text-align:left;color:var(--txt);
  transition:border-color .25s var(--ease),background .25s var(--ease),
             box-shadow .25s var(--ease),transform .15s var(--ease);
}
.opt:active{transform:scale(.99);background:var(--card-3)}
.opt.sel{
  border-color:var(--acid);
  background:linear-gradient(180deg,rgba(189,241,58,.07),rgba(189,241,58,.03));
  /* был диффузный 22px blur alpha .18 — на тёмном фоне «блевотное»
     засвечивание. Заменён на тонкую inset-линию: та же «кислотная
     подсветка» выбора, но без ореола. Чек + рамка + тинт = достаточно */
  box-shadow:inset 0 0 0 1px rgba(189,241,58,.22);
}
.opt-main{flex:1;min-width:0}
.opt-main b{font-size:17px;font-weight:700;letter-spacing:-.01em}
.opt-main small{font-size:13px;color:var(--txt-3);margin-top:2px;display:block;font-weight:500}
.opt-main s{opacity:.55}
/* галочка выбора: скрыта по умолчанию (opacity 0, scale .4),
   при .sel — пружинный popIn. Скрыта через opacity+transform,
   а не display:none, чтобы при появлении текст не «прыгал» */
.opt-check{
  flex:0 0 24px;width:24px;height:24px;border-radius:50%;
  background:var(--acid);color:var(--acid-ink);
  display:grid;place-items:center;
  opacity:0;transform:scale(.4);
  transition:opacity .25s var(--ease),transform .4s var(--ease-spring);
}
.opt.sel .opt-check{opacity:1;transform:scale(1)}
.opt-check svg{width:14px;height:14px}

.lang-hint{
  margin:16px 4px 0;font-size:13px;color:var(--txt-3);line-height:1.5;text-align:center;
}

@media (prefers-reduced-motion:reduce){
  .opt,.opt-check{transition:none!important}
  .opt:active{transform:none}
}
.opt-main u{color:var(--acid);border:0}
.tag{background:var(--acid);color:var(--acid-ink);border-radius:7px;padding:2px 8px;font-size:11.5px;font-weight:800}
.opt-list{display:grid;gap:9px;margin-top:9px}

.amount-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#0C0E0C;border-radius:var(--r-md);padding:16px 18px;margin-top:12px}
.amount-row small{display:block;color:var(--txt-3);font-size:13.5px}
.amount-row input{
  background:none;border:0;outline:0;color:#fff;
  font:800 27px/1.1 Manrope,sans-serif;letter-spacing:-.03em;width:100%;margin-top:3px;
}
.quick{display:flex;gap:8px;flex:0 0 auto}
.quick button{background:rgba(189,241,58,.13);color:var(--acid);border-radius:11px;padding:9px 13px;font-weight:800;font-size:14px}
.quick button.sel{background:var(--acid);color:var(--acid-ink)}

.legal{text-align:center;color:var(--txt-3);font-size:13px;margin:18px 0 14px;line-height:1.5}
.legal a{color:var(--acid);text-decoration:underline}

.toggle-row{display:flex;align-items:flex-start;gap:14px;background:#0C0E0C;border-radius:var(--r-md);padding:18px}
.toggle-row div{flex:1}
.toggle-row b{display:block;font-size:17px;font-weight:800}
.toggle-row small{display:block;color:var(--txt-3);font-size:13.5px;margin-top:5px;line-height:1.45}
.sw{width:52px;height:31px;flex:0 0 52px;border-radius:99px;background:#33372F;position:relative;transition:background .26s var(--ease)}
.sw i{position:absolute;top:3px;left:3px;width:25px;height:25px;border-radius:50%;background:#8E938C;transition:transform .26s var(--ease),background .26s}
.sw.on{background:var(--acid-dim)}
.sw.on i{transform:translateX(21px);background:var(--acid-ink)}

.tx-row{display:flex;align-items:center;gap:14px;padding:15px 0;border-bottom:1px solid var(--line);transition:opacity .15s var(--ease)}
.tx-row:active{opacity:.55}
.tx-row:last-child{border-bottom:0}
.tx-row div{flex:1;min-width:0}
.tx-row b{display:block;font-size:15.5px;font-weight:600}
.tx-row small{display:block;color:var(--txt-3);font-size:13px;margin-top:2px}
.tx-amt{font-weight:800;font-size:16px;white-space:nowrap}
.tx-amt.pos{color:var(--acid)}
.tx-amt.neg{color:var(--txt-2)}

/* ---------- toast ---------- */
.toast{
  position:fixed;left:50%;top:calc(var(--top-inset) + 26px);
  transform:translate(-50%,-140%);z-index:120;
  width:min(calc(100% - 30px),480px);
  display:flex;align-items:center;gap:12px;overflow:hidden;
  /* без backdrop-filter: в Android WebView размытие продолжает рисоваться,
     даже когда элемент уехал за экран — на верху висела пустая плашка */
  background:#181B17;
  border:1px solid var(--acid-line);border-radius:16px;padding:15px 18px;
  /* пока не показан — полностью выключен из отрисовки */
  opacity:0;visibility:hidden;pointer-events:none;
  /* ease-out без overshoot: пружина заставляла тост «прыгать» вниз
     при появлении (overshoot на 140% дистанции давал 5-8% видимый
     отскок). Гладкое торможение ровнее и предсказуемее */
  transition:transform .5s var(--ease-out),opacity .25s var(--ease),visibility 0s linear .4s;
}
.toast.show{
  transform:translate(-50%,0);
  opacity:1;visibility:visible;pointer-events:auto;
  transition:transform .5s var(--ease-out),opacity .25s var(--ease),visibility 0s;
}
.toast i{width:26px;height:26px;flex:0 0 26px;border-radius:50%;background:#2FBF4E;color:#fff;display:grid;place-items:center}
.toast i svg{width:15px;height:15px}
.toast span{flex:1;font-size:15px;font-weight:600}
.toast em{position:absolute;left:0;bottom:0;height:2.5px;background:var(--acid);width:100%;transform-origin:left}
.toast.show em{animation:tbar 2.6s linear forwards}
@keyframes tbar{from{transform:scaleX(1)}to{transform:scaleX(0)}}
.toast.err{border-color:rgba(255,59,78,.5)}
.toast.err i{background:var(--danger)}
.toast.err em{background:var(--danger)}

/* ---------- boot ---------- */
.boot{
  position:fixed;inset:0;background:var(--bg);z-index:200;
  display:grid;place-items:center;transition:opacity .4s var(--ease);
}
.app:not(.is-loading) .boot{opacity:0;pointer-events:none}
.spin{
  width:38px;height:38px;border-radius:50%;
  border:3px solid rgba(189,241,58,.18);border-top-color:var(--acid);
  animation:sp .8s linear infinite;
}
@keyframes sp{to{transform:rotate(360deg)}}
.app.is-loading .screen{opacity:0}


/* ═══════ экран подключения: приложения, перевыпуск, устройства, FAQ ═══════ */
.app-tabs{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.app-tab{
  display:flex;align-items:center;justify-content:center;gap:10px;
  background:#0C0E0C;border-radius:var(--r-md);padding:15px 12px;
  font-weight:700;font-size:16px;color:var(--txt);
  transition:background .22s var(--ease),color .22s var(--ease);
}
.app-tab .app-logo{
  width:34px;height:34px;flex:0 0 34px;border-radius:10px;
  display:grid;place-items:center;font-size:13px;font-weight:800;
  background:#fff;color:#0A0B0A;
}
.app-tab.sel{background:var(--acid);color:var(--acid-ink)}
.app-tab.sel .app-logo{background:#0A0B0A;color:var(--acid)}
.app-tab .star{color:#F5A623;font-size:15px}

.dl-list{display:flex;flex-direction:column;align-items:flex-start;gap:9px;margin-top:11px}
.dl-list .btn-soft{margin-top:0;animation:screenIn .22s var(--ease) both}
.dl-list .btn-soft:nth-child(2){animation-delay:.04s}
.dl-list .btn-soft:nth-child(3){animation-delay:.08s}

.warn-box{
  background:#221E12;border-radius:var(--r-md);padding:16px;margin-top:14px;
  color:#C6BC9E;font-size:14.5px;line-height:1.55;
}
.warn-box p+p{margin-top:14px}

.btn-warn{
  width:100%;background:var(--warn);color:#141614;
  border-radius:var(--r-md);padding:17px 18px;margin-top:14px;
  font-weight:800;font-size:16px;
  display:flex;align-items:center;justify-content:center;gap:10px;
  transition:transform .16s var(--ease);
}
.btn-warn svg{width:22px;height:22px;flex:0 0 22px}
.btn-warn:active{transform:scale(.985)}

.dev-meta{flex:1;min-width:0}
.dev-meta b{display:block;font-size:16.5px;font-weight:700;letter-spacing:-.01em}
.dev-meta small{display:block;color:var(--txt-3);font-size:14px;margin-top:3px}
.dev-del{
  width:40px;height:40px;flex:0 0 40px;border-radius:12px;
  display:grid;place-items:center;color:var(--danger);
  transition:background .16s var(--ease);
}
.dev-del svg{width:22px;height:22px}
.dev-del:active{background:rgba(255,59,78,.14)}

.sect-label{color:var(--txt-3);font-size:15px;font-weight:600;margin:22px 0 12px 6px}

.faq{padding:4px 20px}
.faq-row{border-bottom:1px solid var(--line)}
.faq-row:last-child{border-bottom:0}
.faq-q{width:100%;display:flex;align-items:center;gap:14px;padding:18px 0;text-align:left}
/* бейдж вопроса: мягкая acid-плашка со знаком, при раскрытии — плотная acid */
.faq-ic{
  width:30px;height:30px;flex:0 0 30px;border-radius:10px;
  background:rgba(189,241,58,.10);color:var(--acid);
  display:grid;place-items:center;
  transition:background .22s var(--ease),color .22s var(--ease),transform .25s var(--ease);
}
.faq-ic svg{width:16px;height:16px}
.faq-q{transition:background-color .15s var(--ease)}
.faq-q:active{background-color:rgba(255,255,255,.03)}
.faq-q:active .faq-ic{transform:scale(.9)}
.faq-row.open .faq-ic{
  background:var(--acid);color:var(--acid-ink);
  transform:rotate(-6deg);
}
.faq-q span{flex:1;font-size:17px;font-weight:700;line-height:1.3;letter-spacing:-.015em}
.faq-chev{width:18px;height:18px;flex:0 0 18px;color:var(--txt-3);transition:transform .25s var(--ease)}
.faq-row.open .faq-chev{transform:rotate(90deg)}
.faq-a{color:var(--txt-2);font-size:15px;line-height:1.6;padding:0 0 18px 44px}
.faq-a ul{margin-top:10px;list-style:none}
.faq-a li{position:relative;padding-left:19px;margin-top:9px}
.faq-a li:before{content:'\25C6';position:absolute;left:0;top:2px;color:#D9A441;font-size:11px}
.faq-kb{display:flex;align-items:center;gap:14px;width:100%;padding:18px 0;text-align:left}
.faq-kb i{
  width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;color:var(--acid);
  background:rgba(189,241,58,.10);border-radius:10px;
}
.faq-kb i svg{width:16px;height:16px}
.faq-kb span{flex:1;font-size:17px;font-weight:700;letter-spacing:-.015em}

.confirm-title{font-size:23px;font-weight:800;text-align:center;letter-spacing:-.02em}
.confirm-text{color:var(--txt-2);font-size:15.5px;text-align:center;margin-top:12px;line-height:1.5}
.confirm-text b{color:var(--txt);font-weight:700}
.confirm-actions{display:flex;flex-direction:column;gap:12px;margin-top:24px}
.btn-neutral{
  width:100%;background:var(--card-2);color:var(--txt-2);
  border-radius:var(--r-md);padding:17px;font-weight:700;font-size:16px;
}


/* ═══════ экран подключения — компактнее ═══════ */
[data-screen="connect"] .qr-frame{width:168px;height:168px;border-radius:22px;padding:10px}
[data-screen="connect"] .qr-hero{margin-bottom:14px}
[data-screen="connect"] .hero-title{font-size:25px;margin-top:12px}
[data-screen="connect"] .hero-sub{font-size:13.5px;margin:7px 0 15px}

[data-screen="connect"] .card{padding:16px;border-radius:21px;margin-bottom:11px}
[data-screen="connect"] .card-title{font-size:17.5px;gap:8px}
[data-screen="connect"] .card-sub{font-size:13px;margin-top:7px}
[data-screen="connect"] .pill-count{font-size:13px;padding:2px 10px}
[data-screen="connect"] .icon-btn{width:38px;height:38px;flex:0 0 38px;border-radius:12px}
[data-screen="connect"] .icon-btn svg{width:19px;height:19px}

[data-screen="connect"] .select-face{padding:12px 15px;border-radius:16px}
[data-screen="connect"] .hint-dashed{padding:11px 13px;font-size:13px;margin-top:11px;border-radius:15px}

[data-screen="connect"] .app-tabs{gap:10px;margin-top:11px}
[data-screen="connect"] .app-tab{padding:11px 10px;font-size:14.5px;border-radius:15px;gap:8px}
[data-screen="connect"] .app-tab .app-logo{width:27px;height:27px;flex:0 0 27px;border-radius:8px;font-size:11px}
[data-screen="connect"] .app-tab .star{font-size:13px}

[data-screen="connect"] .steps{margin-top:17px}
[data-screen="connect"] .steps article{gap:13px;padding-bottom:17px}
[data-screen="connect"] .steps article:not(:last-child)::before{left:17px;top:42px}
[data-screen="connect"] .step-n{width:35px;height:35px;flex:0 0 35px;font-size:15px;border-width:1.6px}
[data-screen="connect"] .steps b{font-size:15.5px}
[data-screen="connect"] .steps small{font-size:13px;margin-top:3px}

[data-screen="connect"] .btn-soft,
[data-screen="connect"] .btn-mute{padding:10px 14px;font-size:13.5px;border-radius:12px;margin-top:8px;gap:8px}
[data-screen="connect"] .btn-soft svg,
[data-screen="connect"] .btn-mute svg{width:17px;height:17px}
[data-screen="connect"] .dl-list{gap:8px;margin-top:9px}

[data-screen="connect"] .warn-box{padding:13px;font-size:13px;border-radius:15px;margin-top:11px}
[data-screen="connect"] .warn-box p+p{margin-top:11px}
[data-screen="connect"] .btn-warn{padding:14px;font-size:15px;border-radius:15px;margin-top:11px;gap:8px}
[data-screen="connect"] .btn-warn svg{width:18px;height:18px;flex:0 0 18px}

[data-screen="connect"] .dev-row{padding:11px 12px;border-radius:15px;gap:11px;margin-top:9px}
[data-screen="connect"] .dev-ic{width:39px;height:39px;flex:0 0 39px}
[data-screen="connect"] .dev-ic svg{width:19px;height:19px}
[data-screen="connect"] .dev-meta b{font-size:14.8px}
[data-screen="connect"] .dev-meta small{font-size:12.5px;margin-top:2px}
[data-screen="connect"] .dev-del{width:34px;height:34px;flex:0 0 34px;border-radius:10px}
[data-screen="connect"] .dev-del svg{width:19px;height:19px}

[data-screen="connect"] .sect-label{font-size:13.5px;margin:17px 0 9px 4px}
[data-screen="connect"] .faq{padding:2px 16px}
[data-screen="connect"] .faq-q{padding:14px 0;gap:12px}
[data-screen="connect"] .faq-q span{font-size:15px}
[data-screen="connect"] .faq-ic{width:23px;height:23px;flex:0 0 23px;font-size:12px}
[data-screen="connect"] .faq-chev{width:16px;height:16px;flex:0 0 16px}
[data-screen="connect"] .faq-a{font-size:13.5px;padding:0 0 14px 35px}
[data-screen="connect"] .faq-kb{padding:14px 0;gap:12px}
[data-screen="connect"] .faq-kb span{font-size:15px}
[data-screen="connect"] .faq-kb i{width:23px;height:23px;flex:0 0 23px}

[data-screen="connect"] .btn-ghost{padding:14px 20px;font-size:15px;border-radius:15px}


/* ═══════ главный экран — плотнее, ближе к референсу ═══════ */
.tariff-card{padding:15px;margin-bottom:16px;border-radius:22px}
.tariff-badge{width:44px;height:44px;flex:0 0 44px;border-radius:13px}
.tariff-badge svg{width:25px;height:25px}
.tariff-head{gap:12px}
.tariff-copy b{font-size:17px}
.tariff-copy small{font-size:12.5px}

/* разделителя над трафиком у них нет */
.tariff-meter{border-top:0;margin-top:13px;padding-top:0}
.meter-row em{font-size:13px}
.meter-cta{font-size:13px}
.meter-track{height:8px;margin-top:9px}

/* орб крупнее, сцена ниже */
.orb-stage{height:302px;gap:20px}
.orb{width:196px;height:196px}
.orb svg{width:80px;height:80px}
.orb-hint{padding:11px 20px;font-size:14px;border-radius:13px}

/* карточка советов плотнее */
.advice{margin-top:13px}
.advice article{gap:13px;padding-bottom:17px}
.advice i{width:38px;height:38px;flex:0 0 38px}
.advice i svg{width:19px;height:19px}
.advice article:not(:last-child)::before{left:18px}
.advice b{font-size:15.5px}
.advice small{font-size:13px;margin-top:2px}


/* ═══════ база знаний ═══════ */
.kb-hero{
  height:212px;margin:2px 0 2px;
  background:url(/assets/kbhero.webp?a=1) center/contain no-repeat;
}
[data-screen="kb"] .hero-title{font-size:27px}
[data-screen="kb"] .hero-sub{font-size:14px;margin:8px 0 20px}
[data-screen="kb"] .sect-label{font-size:14px;margin:20px 0 10px 4px}
[data-screen="kb"] .faq{padding:2px 18px;margin-bottom:6px}
[data-screen="kb"] .faq-q{padding:16px 0;gap:13px}
[data-screen="kb"] .faq-q span{font-size:16px}
[data-screen="kb"] .faq-a{font-size:14.5px;padding:0 0 16px 37px}
[data-screen="kb"] .btn-ghost{margin-top:14px;padding:15px 20px;font-size:15px}
.kb-link{
  display:flex;align-items:center;gap:13px;width:100%;padding:16px 0;text-align:left;
}
.kb-link i{width:26px;height:26px;flex:0 0 26px;display:grid;place-items:center;color:var(--acid)}
.kb-link span{flex:1;font-size:16px;font-weight:700;letter-spacing:-.015em}
.kb-link svg.faq-chev{color:var(--txt-3)}


/* ═══════ профиль — плотнее, под референс ═══════ */
[data-screen="profile"] .acid-card{padding:17px;border-radius:22px;margin-bottom:12px}
[data-screen="profile"] .acid-card span{font-size:14px}
[data-screen="profile"] .tile{padding:13px 11px;border-radius:17px}
[data-screen="profile"] .tile b{font-size:12.5px}
[data-screen="profile"] .tile i svg{width:26px;height:26px}
[data-screen="profile"] .card{padding:16px;border-radius:22px;margin-bottom:12px}
[data-screen="profile"] .card-title{font-size:17.5px}
[data-screen="profile"] .stat{padding:12px 13px;border-radius:16px}
[data-screen="profile"] .stat small{font-size:12.5px}
[data-screen="profile"] .stat b{font-size:18px;margin-top:4px}
[data-screen="profile"] .group-label{font-size:13.5px}


/* ═══════ экран локаций ═══════ */
.seg{
  display:grid;grid-template-columns:repeat(3,1fr);gap:0;
  background:var(--card);border:1px solid var(--line);
  border-radius:17px;padding:5px;margin-bottom:14px;
}
.seg-i{
  padding:12px 6px;border-radius:13px;font-size:14.5px;font-weight:700;
  color:var(--txt-3);transition:background .2s var(--ease),color .2s var(--ease);
}
.seg-i.sel{background:var(--acid);color:var(--acid-ink)}
.seg-multi{margin:10px 0 0;background:#0C0E0C;border:0}

.loc-legend p{margin:0}
.loc-legend p+p{margin-top:13px}
.loc-legend b{color:var(--acid);font-weight:800}
.loc-filter-label{color:var(--txt-2);font-size:14px;margin-top:15px}

.loc-row{
  transition:opacity .15s var(--ease);
  display:flex;align-items:center;gap:14px;
  background:var(--card);border:1px solid var(--line);
  border-radius:19px;padding:13px 15px;margin-bottom:10px;
}
.loc-row:active{opacity:.55}
.loc-flag{font-size:29px;line-height:1;flex:0 0 auto}
.loc-meta{flex:1;min-width:0}
.loc-name{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.loc-name b{font-size:16.5px;font-weight:700;letter-spacing:-.015em}
.loc-meta small{display:block;color:var(--txt-3);font-size:13.5px;margin-top:2px}
.loc-tag{
  background:rgba(59,130,246,.16);color:#5AA9FF;
  border-radius:7px;padding:2px 8px;font-size:12.5px;font-weight:700;white-space:nowrap;
}
.loc-tag.dv{background:rgba(189,241,58,.16);color:var(--acid)}
.loc-tag.bp{background:rgba(245,197,24,.16);color:#F5C518}
.loc-off{margin-left:auto;color:var(--txt-3);font-size:12.5px;white-space:nowrap}
[data-screen="locs"] .hero-title{font-size:27px}
[data-screen="locs"] .hero-sub{font-size:14px;margin:8px 0 16px}
[data-screen="locs"] .card{padding:16px;border-radius:22px}
[data-screen="locs"] .card-title{font-size:17.5px}
[data-screen="locs"] .hint-dashed{font-size:13.5px;padding:13px 14px}
[data-screen="locs"] .sect-label{font-size:14px;margin:16px 0 10px 4px}


/* ═══════ баннер истории и экран награды ═══════ */
.banner-story{
  background:linear-gradient(115deg,#0E1A24 0%,#122B3D 55%,#0C1720 100%);
  border-color:rgba(90,169,255,.22);
}
.banner-story .banner-text b em{color:#5AA9FF;border-bottom-color:#5AA9FF}
.art-story{
  /* 3D-самолётик Telegram с прозрачным фоном, как в референсе */
  background:url(/assets/tg.webp?a=2) center/contain no-repeat;
  right:-10px;width:132px;height:132px;
}
.art-story i{display:none}

.story-preview{display:flex;justify-content:center;margin:2px 0 16px}
.story-preview img{
  width:min(58%,220px);border-radius:20px;display:block;
  box-shadow:0 18px 44px rgba(0,0,0,.55);
}
[data-screen="story"] .hero-title{font-size:25px}
[data-screen="story"] .hero-sub{font-size:14px;margin:8px 0 14px}
[data-screen="story"] .card{padding:16px;border-radius:22px}
[data-screen="story"] .card-title{font-size:17.5px}
[data-screen="story"] .steps{margin-top:14px}
[data-screen="story"] .steps article{gap:13px;padding-bottom:16px}
[data-screen="story"] .step-n{width:35px;height:35px;flex:0 0 35px;font-size:15px}
[data-screen="story"] .steps article:not(:last-child)::before{left:17px;top:42px}
[data-screen="story"] .steps b{font-size:15.5px}
[data-screen="story"] .steps small{font-size:13px}
[data-screen="story"] .hint-dashed{font-size:13px;padding:12px 14px}
[data-screen="story"] .btn-acid{margin-top:14px}
[data-screen="story"] .btn-mute{margin-top:9px}

.legal{
  text-align:center;color:var(--txt-3);font-size:12.5px;line-height:1.55;
  margin:18px 4px 4px;
}
.legal b{display:block;color:var(--txt-2);font-weight:700;font-size:13.5px;margin-bottom:5px}


/* ═══════ оформление заказа ═══════ */
.order-card{margin-bottom:18px;padding:18px}
.order-card .card-title{font-size:19px;margin-bottom:14px}
.order-card .kv{
  display:flex;align-items:baseline;justify-content:space-between;gap:14px;
  padding:7px 0;font-size:15px;
}
.order-card .kv span{color:var(--txt-3)}
.order-card .kv b{font-weight:700;text-align:right}

.sheet-h{font-size:19px;font-weight:800;letter-spacing:-.02em;margin:0 0 11px}

/* выпадающий список: закрытая «морда» снизу, раскрытый список над ней */
.drop{
  /* isolation:isolate обрезает стэкинг-контекст — .drop-list z-index
     локален и не «утекает» в общий стэк шита.
     + .drop.open { z-index: 10 } поднимает ВЕСЬ открытый .drop выше
     последующих DOM-соседей (других .drop, .promo-note, .btn-acid) —
     иначе compositor-порядок рисует их ПОВЕРХ выпавшего списка,
     даже если внутри .drop z-index:100 (это был корень бага). */
  position:relative;margin-bottom:20px;isolation:isolate
}
.drop.open{z-index:10}
.drop-face{
  width:100%;display:flex;align-items:center;gap:13px;
  background:var(--card-2);border:1.5px solid var(--line);border-radius:var(--r-md);
  padding:15px 17px;text-align:left;
  /* transition убран полностью: border-color + background + box-shadow
     все 3 — paint-операции, и одновременный transition всех трёх на
     200мс = repaint drop-face 3 раза за 200мс = основной источник
     «10fps внутри модалки» при выборе периода/метода. Состояние
     .drop.open теперь меняется МГНОВЕННО — взгляд на контенте
     (раскрывающемся списке), а не на морде кнопки. */
}
.drop-face:active{transform:scale(.985)}
.drop.open .drop-face{
  border-color:var(--acid-line);
  background:#1E221D;
  box-shadow:0 0 0 3px rgba(189,241,58,.09);
}
.drop-face-t{flex:1;min-width:0}
.drop-face-t b{display:block;font-size:16.5px;font-weight:700;letter-spacing:-.01em}
.drop-face-t small{display:block;color:var(--txt-3);font-size:14px;margin-top:2px}
.drop-chev{
  width:20px;height:20px;flex:0 0 20px;color:var(--txt-3);
  transform:rotate(90deg);
  transition:transform .25s var(--ease);
}
.drop.open .drop-chev{transform:rotate(-90deg)}

/* список раскрывается ПОВЕРХ содержимого (position:absolute),
   а не сдвигает кнопку оплаты и легалку вниз.
   ВАЖНО: без max-height и overflow — внутренний скролл внутри шита
   на мобильных WebView ненадёжен (а при крупных системных шрифтах
   список выше вьюпорта и не прокручивается вовсе). Полная высота
   списка прокручивается РОДНОЙ прокруткой шита — работает везде. */
.drop-list{
  /* Минимальный entrance: opacity 0→1 + translateY -8px→0 за 140мс.
     translateY создаёт КОРОТКОЖИВУЩИЙ compositor-слой (140мс) — это
     дешевле, чем background-blur на весь viewport, и даёт ощущение
     «список упал вниз», а не «из воздуха». Без translateY список
     появлялся чисто opacity-fade, и в сумме с другими sheet-операциями
     это воспринималось как «из ниоткуда». visibility:hidden блокирует
     клики в закрытом состоянии, pointer-events:none — страховка. */
  position:absolute;left:0;right:0;top:calc(100% + 8px);
  z-index:200;
  background:#101310;border:1px solid var(--acid-line);border-radius:var(--r-md);
  padding:7px;
  box-shadow:0 22px 54px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.03);
  opacity:0;visibility:hidden;transform:translateY(-8px);pointer-events:none;
}
.drop.open .drop-list{
  opacity:1;visibility:visible;pointer-events:auto;
  /* dropIn: opacity 0→1 + translateY -8px→0 за 160мс с ease-out-expo.
     Чуть длиннее (160мс vs 140мс) и ease-out-expo даёт ощущение
     «лёгкого подпруживания» — dropdown будто слегка «приземляется».
     Всё ещё в пределах perception threshold (200мс), но ощутимо
     «премиальнее» чем линейная интерполяция. */
  animation:dropIn .16s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes dropIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
.drop-i{
  /* Entrance: opacity 0→1 с шагом 18мс между пунктами. Без transform
     в keyframe — transform-анимация создаёт compositor-слой на время
     entrance, а у нас :active{transform:scale(.99)} для press-фидбека.
     Одновременный transform от keyframe + :active конфликтует:
     keyframe (fill both) держит transform:scale(1) после анимации
     и перебивает :active. Без transform в keyframe — press-фидбек
     живой, entrance — чисто opacity (paint-cheap). */
  width:100%;display:flex;align-items:center;gap:12px;
  padding:14px 13px;border-radius:15px;text-align:left;
  background:#0C0E0C;border:1.5px solid transparent;margin-bottom:7px;
  transition:background .15s var(--ease),border-color .15s var(--ease),
             transform .12s var(--ease);
  /* dropItem: opacity 0→1 за 140мс ease-out-expo, stagger 12мс между
     пунктами. Чуть быстрее (было 120мс/18мс) — для ощущения «моментальной»
     отзывчивости dropdown'а. ease-out-expo (тот же что у sheet) даёт
     согласованное «премиальное» ощущение по всей системе. */
  animation:dropItem .14s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay:calc(var(--i,0)*12ms);
}
@keyframes dropItem{from{opacity:0}to{opacity:1}}
.drop-i:last-child{margin-bottom:0}
.drop-i:active{transform:scale(.99);background:#181B18}
/* выбранный пункт: подложка + обводка, чтобы выбор читался сразу */
.drop-i.sel{
  background:var(--acid-soft);
  border-color:var(--acid-line);
  box-shadow:0 0 0 3px rgba(189,241,58,.08);
}
.drop-i.sel .drop-n{color:var(--acid)}
.drop-i.sel .drop-p{color:var(--acid-dim)}
.drop-i.sel .pay-ic{box-shadow:0 0 0 2px rgba(189,241,58,.35)}
.drop-n{flex:1;font-size:16px;font-weight:700;letter-spacing:-.01em}
.drop-n .tag{
  background:var(--acid);color:var(--acid-ink);border-radius:7px;
  padding:1px 7px;font-size:12.5px;font-weight:800;font-style:normal;margin-left:6px;
}
.drop-p{color:var(--txt-3);font-size:14.5px;white-space:nowrap}

.pay-ic{
  width:42px;height:42px;flex:0 0 42px;border-radius:50%;
  display:grid;place-items:center;background:var(--card-3);color:var(--txt-2);
}
.pay-ic.acid{background:var(--acid);color:var(--acid-ink)}
.pay-ic svg{width:22px;height:22px}

.legal-mini{color:var(--txt-3);font-size:12.5px;line-height:1.5;margin:2px 0 14px}
.legal-mini a{color:var(--txt-2);text-decoration:underline}
.pay-cta{padding:18px;font-size:16.5px}
.pay-cta .mini{width:17px;height:17px}
.pay-cta[disabled]{opacity:1}


/* ═══════ история транзакций ═══════ */
.tx-hero{
  height:196px;margin:2px 0 4px;
  background:url(/assets/txhero.webp?a=1) center/contain no-repeat;
}
[data-screen="tx"] .hero-title{font-size:27px}
[data-screen="tx"] .hero-sub{font-size:14px;margin:8px 0 18px}

.tx-row{
  display:flex;align-items:center;gap:14px;
  padding:15px 4px;border-bottom:1px solid var(--line);
}
.tx-row:last-of-type{border-bottom:0}
.tx-ic{
  width:48px;height:48px;flex:0 0 48px;border-radius:50%;
  background:var(--acid);color:var(--acid-ink);
  display:grid;place-items:center;
}
.tx-ic svg{width:24px;height:24px}
.tx-meta{flex:1;min-width:0}
.tx-meta b{display:block;font-size:16.5px;font-weight:700;letter-spacing:-.015em}
.tx-meta small{display:block;color:var(--txt-3);font-size:13.5px;margin-top:2px}
.tx-sum{text-align:right;white-space:nowrap}
.tx-sum b{display:block;font-size:16.5px;font-weight:700}
.tx-sum b.plus{color:var(--txt)}
.tx-sum b.minus{color:var(--txt)}
.tx-sum small{display:block;color:var(--txt-3);font-size:13.5px;margin-top:2px}


/* ═══════ раздел «Подписка» — аккуратнее ═══════ */
[data-screen="plans"] .hero-pill{padding:12px 28px;font-size:16.5px;margin-top:8px}
[data-screen="plans"] .hero-title{font-size:29px;margin-top:14px}
[data-screen="plans"] .hero-capsule{margin:15px auto 20px;padding:13px 22px;font-size:14.5px}
[data-screen="plans"] .eyebrow{font-size:13.5px}
[data-screen="plans"] .plan-h{font-size:25px;margin-top:5px}
[data-screen="plans"] #premiumCard{padding:22px 20px}
[data-screen="plans"] #premiumCard>h3{font-size:21px;font-weight:800;letter-spacing:-.02em}
[data-screen="plans"] #premUntil{font-size:14.5px;opacity:.75;margin-top:4px}
[data-screen="plans"] #goPremium{padding:18px;font-size:16.5px;margin-top:4px}


/* ═══════ шторка «история за Premium» ═══════ */
.story-h{
  font-size:20px;font-weight:800;line-height:1.3;letter-spacing:-.02em;
  text-align:center;margin:2px 0 18px;
}
.story-steps{list-style:none;display:grid;gap:13px;margin-bottom:20px}
.story-steps li{
  position:relative;padding-left:20px;text-align:center;
  color:var(--txt-2);font-size:14.5px;line-height:1.5;
}
.story-steps li:before{
  content:'\25C6';position:absolute;left:0;top:3px;
  color:#D9A441;font-size:11px;
}
.story-steps b{color:var(--txt);font-weight:700}


/* ═══════ расширенная реферальная система ═══════ */
.info-dot{
  width:21px;height:21px;border-radius:50%;
  background:rgba(0,0,0,.28);color:var(--acid-ink);
  font-size:12px;font-weight:800;font-style:italic;
  display:inline-grid;place-items:center;vertical-align:middle;margin-left:5px;
}
.stat .info-dot{background:var(--acid);color:var(--acid-ink)}

.top-row{
  display:flex;align-items:center;gap:14px;
  padding:13px 2px;border-bottom:1px solid var(--line);
}
.top-row:last-child{border-bottom:0}
.top-n{
  width:34px;height:34px;flex:0 0 34px;border-radius:50%;
  background:#0C0E0C;color:var(--acid);
  display:grid;place-items:center;font-size:14.5px;font-weight:800;
}
.top-id{flex:1;font-size:16px;font-weight:600;letter-spacing:.01em}
.top-sum{font-size:16px;font-weight:700;white-space:nowrap}

/* модалка уровней */
.lv-list{display:grid;gap:0;margin:4px 0 18px}
.lv-item{display:flex;gap:16px;padding-bottom:22px;position:relative}
.lv-item:last-child{padding-bottom:4px}
.lv-item:not(:last-child)::before{
  content:'';position:absolute;left:19px;top:46px;bottom:6px;
  width:0;border-left:2px dashed var(--acid-line);
}
.lv-n{
  width:39px;height:39px;flex:0 0 39px;border-radius:50%;
  border:1.8px solid var(--acid);color:#fff;background:var(--card);
  display:grid;place-items:center;font-size:17px;font-weight:700;z-index:1;
}
.lv-b b{font-size:17.5px;font-weight:700;letter-spacing:-.01em}
.lv-b .now{color:var(--acid);font-size:14.5px;font-weight:700;margin-left:9px}
.lv-b small{display:block;color:var(--txt-2);font-size:14.5px;margin-top:6px;line-height:1.5}
.lv-b small u{text-decoration:none;color:var(--txt);font-weight:700}


/* ═══════ вывод средств ═══════ */
.stat-wd{position:relative}
.wd-btn{
  position:absolute;right:12px;bottom:12px;
  width:34px;height:34px;border-radius:50%;
  background:var(--acid);color:var(--acid-ink);
  display:grid;place-items:center;
}
.wd-btn svg{width:17px;height:17px}
.fld{
  width:100%;background:var(--card);border:1.5px solid transparent;
  border-radius:var(--r-md);padding:15px 17px;margin-bottom:14px;
  color:var(--txt);font-size:16.5px;font-weight:600;font-family:inherit;
  transition:border-color .2s var(--ease);
}
.fld:focus{outline:none;border-color:var(--acid-line);box-shadow:0 0 0 3px rgba(189,241,58,.12)}
.fld::placeholder{color:var(--txt-3);font-weight:500}


/* ═══════ админ-панель ═══════ */
.adm-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.adm-box{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:14px}
.adm-box small{display:block;color:var(--txt-3);font-size:12.5px}
.adm-box b{display:block;font-size:20px;font-weight:800;letter-spacing:-.03em;margin-top:4px}
.adm-box.wide{grid-column:1 / -1}
.adm-box .sub{color:var(--txt-3);font-size:12.5px;font-weight:600;margin-top:3px}

.adm-u{
  display:flex;align-items:center;gap:12px;width:100%;
  padding:12px 4px;border-bottom:1px solid var(--line);text-align:left;
}
.adm-u:last-child{border-bottom:0}
.adm-u .who{flex:1;min-width:0}
.adm-u .who b{display:block;font-size:15.5px;font-weight:700}
.adm-u .who small{display:block;color:var(--txt-3);font-size:13px;margin-top:2px}
.adm-u .tag{font-size:12px;font-weight:800;padding:3px 8px;border-radius:7px;white-space:nowrap}
.tag-ok{background:var(--acid-soft);color:var(--acid)}
.tag-ban{background:rgba(255,59,78,.16);color:var(--danger)}
.tag-inf{background:rgba(90,169,255,.16);color:#5AA9FF}

.adm-kv{display:flex;justify-content:space-between;gap:12px;padding:7px 0;font-size:14.5px}
.adm-kv span{color:var(--txt-3)}
.adm-kv b{font-weight:700;text-align:right}
.adm-acts{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}
.adm-acts .full{grid-column:1 / -1}
.adm-btn{
  padding:13px 10px;border-radius:14px;font-size:14px;font-weight:700;
  background:var(--card-2);color:var(--txt);
}
.adm-btn.acid{background:var(--acid);color:var(--acid-ink)}
.adm-btn.warn{background:var(--warn);color:#141614}
.adm-btn.danger{background:rgba(255,59,78,.16);color:var(--danger)}
[data-screen="admin"] .hero-title{font-size:26px}
[data-screen="admin"] .hero-sub{font-size:13.5px;margin:8px 0 16px}
[data-screen="admin"] .card{padding:16px;border-radius:22px}
[data-screen="admin"] .card-title{font-size:17.5px;margin-bottom:12px}

.adm-entry{
  display:flex;align-items:center;gap:14px;width:100%;text-align:left;
  border-color:var(--acid-line);
}
.adm-entry-ic{
  width:44px;height:44px;flex:0 0 44px;border-radius:14px;
  background:var(--acid);color:var(--acid-ink);display:grid;place-items:center;
}
.adm-entry-ic svg{width:23px;height:23px}
.adm-entry-t{flex:1}
.adm-entry-t b{display:block;font-size:16.5px;font-weight:700}
.adm-entry-t small{display:block;color:var(--txt-3);font-size:13px;margin-top:2px}


/* ═══════ админка: оформление ═══════ */
.adm-live{color:var(--acid);font-weight:700}
.adm-live i{
  display:inline-block;width:7px;height:7px;border-radius:50%;
  background:var(--acid);margin-right:6px;vertical-align:middle;
}

.adm-hero{
  grid-column:1 / -1;position:relative;overflow:hidden;
  background:linear-gradient(118deg,var(--acid) 0%,#A9E52F 60%,#C8F84B 100%);
  color:var(--acid-ink);border-radius:22px;padding:18px;
}
.adm-hero-l{font-size:13.5px;font-weight:700;opacity:.7}
.adm-hero b{display:block;font-size:34px;font-weight:800;letter-spacing:-.04em;line-height:1.1;margin-top:3px}
.adm-hero-s{font-size:13.5px;font-weight:600;opacity:.7}
.adm-hero-ic{
  position:absolute;right:-10px;bottom:-14px;width:104px;height:104px;
  display:grid;place-items:center;opacity:.17;
}
.adm-hero-ic svg{width:100%;height:100%}

.adm-box{position:relative;padding:15px 14px 14px}
.adm-box-ic{
  position:absolute;right:11px;top:11px;width:22px;height:22px;
  color:var(--txt-3);opacity:.5;
}
.adm-box-ic svg{width:100%;height:100%}
.adm-box.acid b{color:var(--acid)}
.adm-box.bad b{color:var(--danger)}
.adm-box.ok .adm-box-ic{color:var(--acid);opacity:.75}

.adm-av{
  width:40px;height:40px;flex:0 0 40px;border-radius:50%;
  background:var(--card-3);color:var(--acid);
  display:grid;place-items:center;font-size:16px;font-weight:800;
}
.adm-av.big{width:52px;height:52px;flex:0 0 52px;font-size:21px;background:var(--acid);color:var(--acid-ink)}

.adm-head{display:flex;align-items:center;gap:13px;margin-bottom:14px}
.adm-head-t{flex:1;min-width:0}
.adm-head-t b{display:block;font-size:17.5px;font-weight:800;letter-spacing:-.02em}
.adm-head-t small{display:block;color:var(--txt-3);font-size:13px;margin-top:2px}

.adm-lbl{color:var(--txt-3);font-size:12.5px;font-weight:700;
  text-transform:uppercase;letter-spacing:.07em;margin:18px 0 9px}

.adm-btn{display:flex;align-items:center;justify-content:center;gap:8px}
.adm-btn .mini{width:16px;height:16px}
.adm-btn:active{transform:scale(.97)}

.adm-node{display:flex;align-items:center;gap:12px;padding:11px 2px;border-bottom:1px solid var(--line)}
.adm-node:last-child{border-bottom:0}
.adm-node-f{font-size:23px;line-height:1}
.adm-node-n{flex:1}
.adm-node-n b{display:block;font-size:15.5px;font-weight:700}
.adm-node-n small{display:block;color:var(--txt-3);font-size:13px;margin-top:1px}
.dot{width:10px;height:10px;border-radius:50%;flex:0 0 10px}
.dot.on{background:var(--acid);box-shadow:0 0 8px rgba(189,241,58,.7)}
.dot.off{background:var(--danger)}


/* ═══════ админка: вкладки и разделы ═══════ */
.adm-tabs{
  display:flex;gap:7px;overflow-x:auto;margin-bottom:14px;padding-bottom:2px;
  scrollbar-width:none;
}
.adm-tabs::-webkit-scrollbar{display:none}
.adm-tab{
  flex:0 0 auto;padding:10px 15px;border-radius:13px;
  background:var(--card);color:var(--txt-3);
  font-size:14px;font-weight:700;white-space:nowrap;
  transition:background .2s var(--ease),color .2s var(--ease);
}
.adm-tab.sel{background:var(--acid);color:var(--acid-ink)}

.adm-row{
  display:flex;align-items:center;gap:12px;
  padding:12px 2px;border-bottom:1px solid var(--line);
}
.adm-row:last-child{border-bottom:0}
.adm-row .who{flex:1;min-width:0}
.adm-row .who b{display:block;font-size:15px;font-weight:700}
.adm-row .who small{display:block;color:var(--txt-3);font-size:12.5px;margin-top:2px}
.adm-row .amt{font-size:15.5px;font-weight:700;white-space:nowrap;text-align:right}
.adm-row .amt small{display:block;color:var(--txt-3);font-size:12px;font-weight:600;margin-top:2px}

.adm-check{
  display:flex;align-items:center;gap:10px;margin:2px 0 14px;
  color:var(--txt-2);font-size:14.5px;font-weight:600;
}
.adm-check input{width:19px;height:19px;accent-color:var(--acid)}
textarea.fld{resize:vertical;min-height:110px;line-height:1.45;font-size:15px}
[data-screen="admin"] .btn-warn{margin-top:0}

/* режим «только админка»: без пользовательских вкладок */
body.admin-only .island{display:none}
body.admin-only .app{padding-bottom:calc(28px + var(--bottom-inset))}
body.admin-only [data-screen="admin"] [data-back]{display:none}


/* ═══════ админка: меню-сетка вместо вкладок ═══════ */
.adm-menu{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.adm-m{
  display:flex;flex-direction:column;gap:9px;align-items:flex-start;text-align:left;
  background:var(--card);border:1px solid var(--line);border-radius:20px;padding:15px 14px;
  transition:transform .16s var(--ease),border-color .2s var(--ease);
}
.adm-m:active{transform:scale(.975)}
.adm-m i{
  width:40px;height:40px;border-radius:13px;display:grid;place-items:center;
  background:var(--acid-soft);color:var(--acid);
}
.adm-m i svg{width:21px;height:21px}
.adm-m b{font-size:15.5px;font-weight:700;letter-spacing:-.01em}
.adm-m small{color:var(--txt-3);font-size:12.5px;line-height:1.35;margin-top:-4px}
.adm-m.wide{grid-column:1 / -1;flex-direction:row;align-items:center;gap:13px}
.adm-m.wide .txt{flex:1}
.adm-m.hot i{background:var(--acid);color:var(--acid-ink)}
.adm-m .badge{
  margin-left:auto;background:var(--danger);color:#fff;
  border-radius:999px;padding:2px 9px;font-size:12.5px;font-weight:800;
}

.adm-back{
  display:flex;align-items:center;gap:9px;margin-bottom:14px;
  color:var(--txt-2);font-size:15px;font-weight:700;
}
.adm-back svg{width:17px;height:17px;transform:rotate(180deg)}

.price-row{
  display:flex;align-items:center;gap:12px;
  padding:12px 2px;border-bottom:1px solid var(--line);
}
.price-row:last-child{border-bottom:0}
.price-row .p-n{flex:1}
.price-row .p-n b{display:block;font-size:15.5px;font-weight:700}
.price-row .p-n small{display:block;color:var(--txt-3);font-size:12.5px;margin-top:2px}
.price-row input{
  width:96px;background:#0C0E0C;border:1.5px solid transparent;border-radius:12px;
  padding:10px 12px;color:var(--txt);font-size:15.5px;font-weight:700;
  font-family:inherit;text-align:right;
}
.price-row input:focus{outline:none;border-color:var(--acid-line)}
.price-row button{
  background:var(--acid);color:var(--acid-ink);border-radius:12px;
  padding:10px 14px;font-size:14px;font-weight:700;
}

.adm-m.wide .txt b{display:block}
.adm-m.wide .txt small{display:block;margin-top:2px}


/* четыре плитки в профиле — сеткой 2×2, а не сжатым рядом */
[data-screen="profile"] .tile-row{grid-template-columns:1fr 1fr}
[data-screen="profile"] .tile{min-height:96px;display:flex;flex-direction:column;justify-content:space-between}

/* ═══════ карточка пользователя в админке ═══════ */
.cp-row{display:flex;align-items:center;gap:10px;padding:8px 0;font-size:13.5px}
.cp-row>span{color:var(--txt-3);flex:0 0 118px}
.cp-row code{
  flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;color:var(--txt);
}
.cp-row code.mini{font-size:11.5px}
.cp-b{
  width:28px;height:28px;flex:0 0 28px;border-radius:9px;
  background:var(--card-2);color:var(--txt-2);display:grid;place-items:center;
}
.cp-b svg{width:14px;height:14px}
.cp-b:active{background:var(--acid-soft);color:var(--acid)}

.grant{margin-bottom:4px}
.grant-q{display:flex;gap:7px;margin-bottom:10px}
.grant-q .q{
  flex:1;padding:9px 0;border-radius:11px;background:var(--card-2);
  color:var(--txt-2);font-size:13.5px;font-weight:700;
}
.grant-q .q.sel{background:var(--acid);color:var(--acid-ink)}
.grant-row{display:flex;gap:9px;margin-bottom:10px}
.grant-row .fld{margin-bottom:0;flex:1;padding:12px 14px;font-size:15px}
.grant-row .adm-btn{flex:0 0 auto;padding:12px 16px}
[data-screen="admin"] textarea.fld{min-height:84px;margin-bottom:10px}
.tag-warn{background:rgba(245,197,24,.16);color:var(--warn)}

/* ============================================================
   Чат с поддержкой
   ============================================================ */
/* Экран-чат живёт по своим правилам: фиксированная высота вьюпорта,
   скроллится только лента, шапка и композер прибиты. Поэтому у .app
   для этого экрана снимаем нижний паддинг под навбар — иначе внизу
   остаётся мёртвая пустота, по которой можно скроллить. */
 .app.chat-mode{
   padding-bottom:0;overflow:hidden;max-width:none;
   /* в чате шапка прижата к панели Telegram: без лишних 12px сверху */
   padding-top:var(--top-inset);
 }
.app.chat-mode .glow-top{display:none}

.screen[data-screen="support"].is-active{
  display:flex;flex-direction:column;
  /* высота ровно во вьюпорт: контент не скроллит страницу, скроллит только лента
     (12px общего отступа .app в chat-mode убраны — шапка выше) */
  height:calc(100dvh - var(--top-inset));
  padding-bottom:calc(var(--nav-h) + var(--bottom-inset) + 4px);
  animation:none;                      /* без общего screenIn — лента прыгает */
  overflow:hidden;
  /* выходим за 16px-отступ .app, чтобы шапка/композер красились от края
     до края вьюпорта (иначе overflow:hidden оставляет швы по бокам) */
  margin-left:calc(-1 * var(--pad));
  margin-right:calc(-1 * var(--pad));
  padding-left:var(--pad);
  padding-right:var(--pad);
}

/* ---- шапка: прибита сверху, не уезжает при скролле ----
   Переработана для «просто онлайн» feel: убрана pill «ждёт ответа»,
   status упрощён до «Онлайн», padding сбалансирован для дыхания.
   Вместо pill — pulse-точка на аватаре (chat-ava-dot::after) даёт
   «живой» индикатор активности без визуального шума. */
.chat-head{
  position:relative;
  display:flex;align-items:center;gap:13px;flex:0 0 auto;
  padding:14px 16px 12px;margin:0 -16px 12px;
  /* Glass-blur на шапке убран (v=138) — backdrop-filter даже 20px blur
     на 50px-высоте = repaint каждый кадр при скролле ленты, на 2fps
     Android-устройствах = ощутимый лаг. Обычный градиент + тонкая
     граница снизу — выглядит premium, не нагружает GPU. */
  background:linear-gradient(180deg,rgba(22,25,22,.98),rgba(16,18,16,.96) 70%,rgba(16,18,16,.92));
  border-bottom:1px solid var(--line);
  /* Glass-blur ВОЗВРАЩЁН в v=139: юзер жалуется на отсутствие
     плавности. backdrop-filter 20px на header 50px-высотом = лёгкая
     операция (в 25 раз меньше пикселей, чем полноэкранный blur),
     даёт premium glass-эффект «шапка парит над лентой». На 60fps-
     устройствах незаметно, на слабых — разница с обычным градиентом
     тоже невелика. */
  backdrop-filter:blur(20px) saturate(140%);
  -webkit-backdrop-filter:blur(20px) saturate(140%);
}
/* тонкая нейтральная полоска внизу шапки */
.chat-head::after{
  content:'';position:absolute;left:0;right:0;bottom:-1px;height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.10) 30%,rgba(255,255,255,.10) 70%,transparent);
  pointer-events:none;
}
.chat-ava{
  width:42px;height:42px;border-radius:50%;
  background:radial-gradient(120% 120% at 30% 20%,rgba(189,241,58,.22),rgba(189,241,58,.07) 65%);
  color:var(--acid);
  display:grid;place-items:center;flex:0 0 42px;
  position:relative;
}
/* градиентное кольцо вокруг аватара (маска, без лишних вложенных div) */
.chat-ava::before{
  content:'';position:absolute;inset:0;border-radius:50%;
  padding:1.5px;
  background:conic-gradient(from 210deg,var(--acid-line),rgba(189,241,58,.08) 40%,rgba(255,255,255,.14) 65%,var(--acid-line));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask-composite:exclude;
  pointer-events:none;
}
/* точка «на связи»: пульс тем же композиторным способом (ripple-слой) */
.chat-ava-dot{
  position:absolute;right:-1px;bottom:-1px;
  width:12px;height:12px;border-radius:50%;
  background:var(--acid);
  box-shadow:0 0 0 2.5px #101210;
}
.chat-ava-dot::after{
  content:'';position:absolute;inset:-2px;border-radius:50%;
  border:2px solid rgba(189,241,58,.45);opacity:0;transform:scale(.7);
  animation:dotRipple 2.6s ease-out infinite;
  pointer-events:none;
}
.chat-ava svg{width:22px;height:22px}
.chat-head-t{flex:1;min-width:0}
.chat-head-t b{
  display:block;font-size:15px;font-weight:700;letter-spacing:-.01em;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.chat-head-t small{
  display:block;font-size:12px;color:var(--txt-3);margin-top:1.5px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  transition:color .2s var(--ease);
}
.chat-head-t small.is-waiting{color:var(--warn)}
/* пилюля статуса: тёмно-янтарная, с пульсирующей точкой */
.chat-pill{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;
  padding:6px 11px;border-radius:99px;
  background:rgba(245,197,24,.10);
  border:1px solid rgba(245,197,24,.22);
  color:var(--warn);
  font-size:10.5px;font-weight:800;letter-spacing:.02em;
  text-transform:uppercase;white-space:nowrap;
  animation:pillIn .25s var(--ease) both;
}
@keyframes pillIn{from{opacity:0;transform:translateY(-3px) scale(.94)}to{opacity:1;transform:none}}
.chat-pill-dot{
  width:6px;height:6px;border-radius:50%;background:var(--warn);flex:0 0 6px;
  animation:pillDot 1.6s ease-in-out infinite;
}
@keyframes pillDot{0%,100%{opacity:1}50%{opacity:.35}}

/* ---- лента: единственный скроллящийся блок ---- */
.chat-thread{
  flex:1 1 auto;min-height:0;
  display:flex;flex-direction:column;gap:7px;
  overflow-y:auto;overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;          /* скролл не «протекает» на страницу */
  padding:6px 2px 10px;
  scrollbar-width:none;
}
.chat-thread::-webkit-scrollbar{display:none}
/* пустая лента не должна распирать вёрстку — центрируем заглушку */
.chat-thread.is-empty{justify-content:center;align-items:center}

/* приветственный блок — внутри ленты, а не над ней */
.chat-welcome{
  text-align:center;padding:24px 18px;max-width:340px;margin:auto;
  animation:rv .45s var(--ease) both;
}
.chat-welcome-ic{
  width:68px;height:68px;margin:0 auto 14px;border-radius:50%;
  background:radial-gradient(120% 120% at 30% 20%,rgba(189,241,58,.2),rgba(189,241,58,.05) 70%);
  color:var(--acid);
  display:grid;place-items:center;
  position:relative;
}
.chat-welcome-ic::before{
  content:'';position:absolute;inset:0;border-radius:50%;
  padding:1.5px;
  background:conic-gradient(from 210deg,var(--acid-line),rgba(189,241,58,.08) 40%,rgba(255,255,255,.14) 65%,var(--acid-line));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask-composite:exclude;
}
.chat-welcome-ic svg{width:32px;height:32px}
.chat-welcome h3{font-size:17px;font-weight:800;letter-spacing:-.02em;margin-bottom:7px}
.chat-welcome p{font-size:13.5px;color:var(--txt-2);line-height:1.5}

/* разделитель дат */
.chat-day{
  align-self:center;margin:8px 0 4px;padding:4px 11px;
  border-radius:99px;background:var(--card-2);
  font-size:11px;font-weight:700;color:var(--txt-3);
  letter-spacing:.01em;
}

/* ---- пузыри ---- */
.bubble{
  max-width:min(84%,560px);flex:0 0 auto;
  padding:9px 13px 8px;
  border-radius:19px;font-size:14.5px;line-height:1.42;
  overflow-wrap:anywhere;word-break:break-word;
  position:relative;
  animation:bubbleIn .2s var(--ease) both;
}
@keyframes bubbleIn{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}
/* уже показанные пузыри не переанимируются при перерисовке ленты */
.bubble.static{animation:none}
/* фото-пузырь: фото и есть пузырь (как в Telegram), время — пилюлей поверх фото */
.bubble.media{padding:3px;background:#171A17;border:1px solid var(--line)}
.bubble.media.me{background:#171A17;color:var(--txt)}
.bubble.media.me .bubble-body{color:var(--txt)}
.bubble.media.me .bubble-meta{color:var(--txt-3)}
.bubble.media.me .bubble-meta svg{color:var(--txt-2)}
.bubble.media .sup-photo{border-radius:17px;margin-bottom:0}
.bubble.media.photo-only .bubble-meta{
  position:absolute;bottom:10px;right:12px;margin:0;
  background:rgba(10,11,10,.78);
  padding:3px 9px;border-radius:99px;color:#fff;
}
.bubble.media.photo-only .bubble-meta svg{color:#fff}
.bubble-body{white-space:pre-wrap;overflow-wrap:anywhere}
.bubble-meta{
  display:flex;align-items:center;gap:4px;justify-content:flex-end;
  margin-top:3px;font-size:10.5px;line-height:1;font-weight:600;
}
.bubble-meta svg{width:12px;height:12px;flex:0 0 12px}
.bubble.them{
  align-self:flex-start;background:var(--card);
  border:1px solid var(--line);color:var(--txt);
  border-bottom-left-radius:7px;
}
.bubble.them .bubble-meta{color:var(--txt-3);justify-content:flex-start}
.bubble.me{
  align-self:flex-end;background:var(--acid);color:var(--acid-ink);
  border-bottom-right-radius:7px;
}
.bubble.me .bubble-meta{color:rgba(10,11,10,.6)}
.bubble.pending{opacity:.62}
.bubble.pending .bubble-meta svg{animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---- «оператор печатает» ---- */
.chat-typing{
  flex:0 0 auto;
  display:flex;align-items:center;gap:5px;
  padding:2px 4px 6px;font-size:12px;color:var(--txt-3);
}
.chat-typing em{font-style:normal}
.chat-dot{
  width:5px;height:5px;border-radius:50%;background:var(--txt-3);
  animation:typingDot 1.3s infinite;
}
.chat-dot:nth-child(2){animation-delay:.16s}
.chat-dot:nth-child(3){animation-delay:.32s}
@keyframes typingDot{
  0%,60%,100%{opacity:.28;transform:translateY(0)}
  30%{opacity:1;transform:translateY(-2.5px)}
}

/* ---- композер: прибит к низу, над навбаром ---- */
.chat-composer{
  flex:0 0 auto;
  display:flex;gap:9px;align-items:flex-end;
  padding:6px 6px 6px 6px;margin-top:2px;
  background:rgba(27,30,27,.98);
  border:1px solid rgba(255,255,255,.08);border-radius:26px;
  box-shadow:0 12px 34px rgba(0,0,0,.38);
  transition:border-color .2s var(--ease),box-shadow .2s var(--ease);
}
.chat-composer:focus-within{
  border-color:rgba(255,255,255,.16);
  box-shadow:0 12px 34px rgba(0,0,0,.38),0 0 0 3.5px rgba(255,255,255,.05);
}
.chat-composer textarea{
  flex:1;min-height:28px;max-height:120px;
  background:transparent;border:0;outline:0;resize:none;
  color:var(--txt);font:inherit;font-size:15px;line-height:1.4;
  padding:9px 4px 9px 12px;
  -webkit-appearance:none;appearance:none;
  scrollbar-width:none;
}
.chat-composer textarea::-webkit-scrollbar{display:none}
.chat-composer textarea::placeholder{color:var(--txt-3)}
/* Отправка: без кислотного градиента и неон-свечения. Нейтральная тёмная,
   «оживает» в белую, когда есть текст или фото (класс is-ready ставит JS) */
.chat-composer button{
  flex:0 0 40px;width:40px;height:40px;border-radius:50%;
  background:var(--card-3);color:var(--txt-3);
  display:grid;place-items:center;
  box-shadow:none;
  transition:transform .15s var(--ease),opacity .18s var(--ease),
             background .2s var(--ease),color .2s var(--ease),box-shadow .2s var(--ease);
}
.chat-composer button.is-ready{
  background:#fff;color:var(--acid-ink);
  box-shadow:0 2px 12px rgba(0,0,0,.42);
}
.chat-composer button svg{width:19px;height:19px;transform:translateX(1px)}
.chat-composer button:disabled{opacity:.35;box-shadow:none}
.chat-composer button:not(:disabled):active{transform:scale(.88)}
/* скрепка: тихая кнопка слева */
.chat-composer .chat-attach{
  flex:0 0 38px;width:38px;height:38px;border-radius:50%;
  background:var(--card-2);border:1px solid var(--line);color:var(--txt-2);
  box-shadow:none;
}
.chat-composer .chat-attach svg{width:18px;height:18px;transform:none}
.chat-composer .chat-attach:disabled{opacity:.4}
.chat-composer .chat-attach.busy svg{animation:spin 1.1s linear infinite}
/* превью выбранного фото над композером */
.chat-preview{
  display:flex;align-items:center;gap:10px;
  margin:8px 2px 0;padding:7px 10px;
  background:var(--card-2);border:1px solid var(--line);border-radius:16px;
  animation:screenIn .2s var(--ease) both;
}
.chat-preview img{
  width:44px;height:44px;object-fit:cover;border-radius:11px;flex:0 0 44px;
  cursor:pointer;
}
.chat-preview span{
  flex:1;min-width:0;font-size:12.5px;color:var(--txt-3);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.chat-preview button{
  flex:0 0 30px;width:30px;height:30px;border-radius:50%;
  background:var(--card-3);color:var(--txt-2);font-size:13px;
  display:grid;place-items:center;
}
/* фото в пузыре: компактный превью-размер как в мессенджерах,
   полный размер — в лайтбоксе по тапу. ВАЖНО: базовое состояние ВИДИМОЕ;
   .loaded лишь добавляет мягкое появление (fade+scale) после загрузки */
.sup-photo{
  display:block;width:auto;height:auto;
  max-width:min(100%,220px);
  max-height:280px;
  border-radius:12px;margin-bottom:5px;
  cursor:zoom-in;
}
.sup-photo.loaded{animation:photoIn .3s var(--ease) both}
@keyframes photoIn{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:none}}
.bubble.media .sup-photo{margin-bottom:0}
.bubble.media.photo-only .sup-photo{border-radius:17px}
/* пока фото грузится — светлый скелетон (тёмный на тёмном выглядел
   как чёрный дефект), пузырь не «пустой» */
.sup-photo.loading{
  width:200px;height:150px;opacity:1;transform:none;
  background:linear-gradient(100deg,#262B24 40%,#343B31 50%,#262B24 60%);
  background-size:200% 100%;
  animation:photoShimmer 1.1s linear infinite;
  cursor:default;
}
@keyframes photoShimmer{from{background-position:200% 0}to{background-position:-200% 0}}
.photo-broken{width:160px;height:70px;border-radius:10px;opacity:.5;background:var(--card-2)}
/* лайтбокс на весь экран */
.photo-viewer{
  position:fixed;inset:0;z-index:120;display:none;
  background:rgba(5,6,5,.97);
  align-items:center;justify-content:center;
}
.photo-viewer.open{display:flex;animation:pvIn .22s var(--ease) both}
@keyframes pvIn{from{opacity:0}to{opacity:1}}
.photo-viewer img{
  max-width:94vw;max-height:82vh;max-height:82dvh;
  border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.7);
  animation:dropIn .22s var(--ease) both;
}
/* крестик — всегда ПОВЕРХ фото (z-index) и заметный на любом фоне */
.photo-viewer .pv-close{
  position:absolute;top:calc(var(--top-inset) + 10px);right:14px;
  width:44px;height:44px;border-radius:50%;
  background:rgba(20,22,20,.95);color:#fff;font-size:17px;
  display:grid;place-items:center;
  border:1px solid rgba(255,255,255,.16);
  z-index:10;
}

/* широкие экраны (fullscreen в Telegram Desktop / планшет):
   колонка чата центрирована, шапка — во всю ширину, как в Telegram Web */
@media (min-width:700px){
  .chat-thread,.chat-typing{
    max-width:720px;width:calc(100% - 32px);margin-left:auto;margin-right:auto;
  }
  .chat-composer{max-width:720px;width:calc(100% - 16px);margin-left:auto;margin-right:auto}
}

/* Счётчик непрочитанных на кнопке навигации */
.nav-dot{
  position:absolute;top:5px;right:calc(50% - 17px);
  min-width:17px;height:17px;padding:0 4.5px;border-radius:99px;
  background:var(--danger);color:#fff;font-size:10px;font-weight:800;
  display:grid;place-items:center;
  box-shadow:0 0 0 2px rgba(26,29,25,1);
  font-style:normal;line-height:1;
}
/* box-shadow-анимация на телефоне = repaint каждый кадр. Пульс через
   псевдоэлемент-КОЛЬЦО с transform+opacity — чистая композиторная работа */
.nav-dot{position:relative}
.nav-dot::after{
  content:'';position:absolute;inset:-2px;border-radius:99px;
  border:2px solid rgba(255,59,78,.55);opacity:0;transform:scale(.7);
  pointer-events:none;
}
.nav-dot.is-on::after{animation:dotRipple 2.4s ease-out infinite}
@keyframes dotRipple{
  0%{opacity:.7;transform:scale(.8)}
  70%,100%{opacity:0;transform:scale(2.2)}
}
