/* URBEX VPN — экраны макета docs/design/miniapp.html.
 *
 * Подключается после app.css и рисует компоненты макета: шапку с логотипом,
 * сцену с кругом URBEX, карточки пробника и подписки, тарифы в два шага,
 * шторку «Чем платить?», экран «Оплачено!», мастер подключения, поддержку,
 * профиль и друзей. Цвета — токены из app.css (--bg, --card, --line,
 * --lilac, --amber, --text, --muted, --purple). */

/* --- Основа ---------------------------------------------------------------- */
html, body { background: var(--bg); }
#phone {
  background: radial-gradient(ellipse 100% 420px at 50% -140px, #38244e, transparent), var(--bg);
}
.fadeTop { background: linear-gradient(180deg, var(--bg) 0%, rgba(14, 11, 22, .92) 62%, rgba(14, 11, 22, 0) 100%); }
body { font-size: 13px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.gl { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.lilac { color: var(--lilac); }
.amber { color: var(--amber); }
.muted { color: var(--muted); }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sub { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 9px 0 0; }

/* Логотип URBEX в круге: эмблема на чёрном. */
.original-mark { position: relative; display: block; overflow: hidden; background: #000; aspect-ratio: 1.16; width: 100%; }
.original-mark img { position: absolute; width: 108%; max-width: none; height: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); user-select: none; -webkit-user-drag: none; pointer-events: none; }
.original-mark.mini { width: 27px; height: 27px; border-radius: 50%; aspect-ratio: auto; flex: none; }
.original-mark.mini img { width: 100%; height: 100%; object-fit: cover; }

/* --- Шапка ----------------------------------------------------------------- */
.top { height: 68px; padding: 0 18px; }
.top .brand {
  top: 50%; display: inline-flex; align-items: center; gap: 9px;
  font-size: 19px; font-weight: 900; letter-spacing: -1px; color: var(--text);
}
.top .brand b { color: var(--text); font-weight: 900; }
.top .brand b span { color: var(--lilac); }
body.fs .top .brand { font-size: 16px; }
body.fs .top .brand .original-mark { width: 22px; height: 22px; }
/* Вложенный экран: «Назад» в рамке слева, знак логотипа прячется. */
.top.with-back .brand .original-mark { display: none; }
.pill-btn.back {
  height: 28px; padding: 0 9px 0 6px; gap: 2px; border-radius: 8px;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line);
  backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--text); font-size: 11px; font-weight: 500;
}
.pill-btn.back .gl { width: 13px; height: 13px; }

/* Экран — свой слой: переключатель подписок (z-index 8) не вылезает
   поверх мастера подключения и шторок. */
#scroll { z-index: 0; }
#screen { padding: calc(68px + var(--head)) 18px calc(120px + var(--bottom)); }
body.fs #screen { padding-top: calc(var(--head) + 12px); }

/* --- Типографика ----------------------------------------------------------- */
h1, h2, h3 { color: var(--text); }
.h1, .app-page-title { font-size: 28px; line-height: 1.15; letter-spacing: -.04em; font-weight: 780; margin: 17px 0 25px; }
.lead { font-size: 13px; color: var(--muted); }
.kicker { font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--lilac); }
.sec, .list-label { color: var(--lilac); margin: 27px 0 12px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sec::before { display: none; }
.view > .sec:first-child { margin-top: 4px; }

/* --- Кнопки ---------------------------------------------------------------- */
.btn {
  min-height: 50px; height: auto; padding: 13px 14px; border-radius: 13px; gap: 10px;
  font-size: 13px; font-weight: 750; box-shadow: none;
}
.btn .gl { width: 18px; height: 18px; }
.btn.p { background: var(--amber); color: var(--bg); box-shadow: none; }
.btn.g { min-height: 50px; height: auto; background: transparent; border: 1px solid #3a3352; color: var(--text); font-weight: 750; box-shadow: none; }
.btn.q { color: var(--lilac); font-weight: 600; font-size: 13px; }
.btn.m { background: var(--lilac); color: var(--bg); }
.btn.sm { min-height: 42px; font-size: 12px; }
.btn.tiny { min-height: 34px; padding: 0 12px; font-size: 12px; }
.btn.dis, .btn:disabled { background: rgba(255, 255, 255, .06); color: var(--muted); border-color: transparent; opacity: .7; }
.btn + .btn { margin-top: 9px; }
.btn.tg-btn { background: #2AABEE; color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn.p:hover:not(:disabled) { background: #e8b16b; filter: none; box-shadow: none; }
  .btn.g:hover:not(:disabled) { background: rgba(255, 255, 255, .035); border-color: #51465f; }
}
.text-link { display: inline-flex; gap: 8px; align-items: center; justify-content: center; color: var(--lilac); font-weight: 600; font-size: 12px; background: none; border: 0; padding: 6px 0; cursor: pointer; }

/* --- Карточки, плашки, бейджи ---------------------------------------------- */
.card { border: 1px solid var(--line); border-radius: 22px; background: var(--card); padding: 20px; }
.card.tight { padding: 16px; border-radius: 18px; }
.icon-box { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #251e39; color: var(--lilac); flex-shrink: 0; }
.icon-box.warm { background: rgba(214, 155, 81, .125); color: var(--amber); }
.icon-box.big { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; }
.icon-box .brand { width: 25px; height: 25px; }
.tag {
  padding: 5px 9px; border-radius: 6px; background: var(--purple); color: var(--lilac);
  font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border: 0;
}
.tag.warm { background: rgba(214, 155, 81, .125); color: var(--amber); }
.tag.off { background: rgba(214, 155, 81, .125); color: var(--amber); }
.tag.dim { background: rgba(255, 255, 255, .06); color: var(--muted); }
.tag .gl { width: 11px; height: 11px; }
.badge { color: var(--lilac); }

/* Строки списков: иконка в плашке, подпись, шеврон справа. */
.list, .list-card { border-radius: 22px; background: var(--card); border: 1px solid var(--line); padding: 0 18px; overflow: hidden; }
.list.pad { padding: 0 18px; }
.li, .list.pad .li { gap: 12px; padding: 18px 0; border-radius: 0; border: 0; color: var(--text); }
.li + .li, .list.pad .li + .li { border-top: 1px solid var(--line); }
.li:active, .list.pad .li:active { background: none; transform: none; opacity: .75; }
.li .t b { font-size: 13px; font-weight: 600; letter-spacing: -.02em; line-height: 1.4; }
.li .t small { font-size: 10.5px; line-height: 1.5; margin-top: 2px; }
.li > .gl:last-child { margin-left: auto; width: 15px; height: 15px; color: var(--muted); }
.li .badge { font-size: 10px; font-weight: 700; color: var(--lilac); background: var(--purple); padding: 4px 7px; border-radius: 6px; }
.li .badge.dim { color: var(--muted); background: rgba(255, 255, 255, .06); }
.li .ic { width: 42px; height: 42px; border-radius: 12px; background: #251e39; color: var(--lilac); display: grid; place-items: center; flex: none; }
.li .ic.warm { background: rgba(214, 155, 81, .125); color: var(--amber); }

.hint-row { background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--muted); font-size: 11px; }
.hint-row .gl { width: 16px; height: 16px; color: var(--lilac); }
.wl-note { display: flex; gap: 8px; align-items: flex-start; margin: -6px 0 16px; padding: 10px 12px; border-radius: 12px; background: rgba(214, 155, 81, .08); color: var(--muted); font-size: 11px; line-height: 1.5; }
.wl-note .gl { width: 15px; height: 15px; color: var(--amber); margin-top: 1px; }

/* --- Нижняя навигация: плавающая «пилюля» -------------------------------- */
.nav { bottom: calc(18px + var(--bottom)); }
.nav::before { display: none; }
.nav .bar-pill {
  position: relative; display: flex; gap: 16px; padding: 8px; border-radius: 100px;
  background: rgba(21, 18, 42, .93); border: 1px solid #3a3352; box-shadow: 0 8px 40px rgba(0, 0, 0, .53);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.nav .thumb { display: none; }
.nav .bar-pill button {
  position: relative; width: 47px; height: 43px; border-radius: 50%; border: 0; background: none;
  color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s;
}
.nav .bar-pill button .gl { width: 21px; height: 21px; }
.nav .bar-pill button.on { background: rgba(214, 155, 81, .14); color: var(--amber); }
.nav-badge { position: absolute; right: 10px; top: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); box-shadow: none; }

/* --- Тост ------------------------------------------------------------------ */
.toast { background: var(--text); color: var(--bg); border-radius: 13px; font-size: 12px; line-height: 1.5; }
.toast.bad { background: var(--amber); color: var(--bg); }

/* --- Главная: сцена с логотипом ------------------------------------------- */
.view.home { display: block; height: auto; min-height: 0; margin-top: 0; }
.app-scene { height: 225px; position: relative; display: grid; place-items: center; margin: 0 0 8px; isolation: isolate; }
.app-scene::before {
  content: ''; position: absolute; width: 202px; height: 202px; border-radius: 50%;
  background: #3f285f; z-index: -1; box-shadow: 0 0 60px rgba(93, 57, 159, .21);
}
.app-scene .original-mark { width: 208px; border-radius: 50%; }
.app-scene.active-scene { height: 188px; margin-top: 4px; }
.app-scene.active-scene .original-mark { width: 178px; }
.app-scene.active-scene::before { width: 177px; height: 177px; }
/* Подписка закончилась: логотип гаснет, луна за ним тускнеет. */
.app-scene.off .original-mark { filter: grayscale(.7) brightness(.7); }
.app-scene.off::before { background: #2a2140; box-shadow: none; animation: none; }
.invite-sticker {
  position: absolute; right: -5px; top: 28px; transform: rotate(6deg); border: 0; cursor: pointer;
  background: var(--amber); color: var(--bg); border-radius: 8px; padding: 10px 12px;
  text-align: left; font-size: 10px; font-weight: 700; line-height: 1.4; font-family: inherit;
  transition: transform .2s var(--spring);
}
.invite-sticker b { display: block; font-size: 12px; font-weight: 800; }
.invite-sticker:active { transform: rotate(3deg) scale(.97); }
.active-scene .invite-sticker { top: 14px; }

.app-intro { text-align: center; margin-bottom: 23px; }
.app-intro h1, .home-title { font-size: 28px; line-height: 1.15; letter-spacing: -.04em; font-weight: 780; margin: 0; color: var(--text); }
.app-intro .sub, .home-sub { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 9px 0 0; }

.trial-card .eyebrow { color: var(--lilac); }
.trial-price { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; gap: 12px; }
.trial-price strong { font-size: 30px; letter-spacing: -.05em; font-weight: 780; color: var(--text); }
.trial-price b { font-size: 30px; color: var(--amber); letter-spacing: -.04em; font-weight: 780; white-space: nowrap; }
.trial-card p { color: var(--muted); margin: 11px 0 20px; font-size: 12px; line-height: 1.6; }
.home .card.offer { margin-top: 0; padding: 20px; }

/* Переключатель подписок над сценой. */
.switcher { margin-bottom: 4px; }
.switcher > button.subscription-toggle {
  height: auto; gap: 7px; padding: 8px 13px; border-radius: 25px;
  background: #1d182d; border: 1px solid var(--line); color: var(--text); font-size: 11px; font-weight: 500;
}
.subscription-toggle .gl { width: 12px; height: 12px; }
.menu { background: #1d182d; border-color: var(--line); top: 40px; }
.menu button .gl { width: 16px; height: 16px; color: var(--lilac); }
.menu button.on { color: var(--lilac); }
.menu button .dot.ok { background: var(--lilac); }
.menu button .dot.off { background: var(--amber); }

/* Карточка подписки. */
.subscription-card { padding: 19px; }
.subscription-card .row { align-items: flex-start; }
.subscription-card h3.name { font-size: 15px; letter-spacing: -.025em; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.subscription-card .date { display: flex; gap: 5px; align-items: center; flex: none; font-size: 10px; color: var(--muted); margin-top: 3px; }
.subscription-card .date .gl { width: 12px; height: 12px; }
.subscription-card .date.off { color: var(--amber); }
.status-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 19px; }
.status-chips .tag { font-size: 10px; padding: 7px 8px; }
.status-chips .tag:first-child::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.progress-caption { font-size: 11px; margin-bottom: 8px; color: var(--muted); }
.progress-caption b { font-weight: 600; color: var(--lilac); }
.progress { height: 5px; border-radius: 6px; background: rgba(255, 255, 255, .04); overflow: hidden; margin-bottom: 22px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, #7c5ce0, var(--lilac)); border-radius: 6px; transition: width .6s var(--ease); }
.progress.low > span { background: linear-gradient(90deg, #b07a3a, var(--amber)); }
.progress.dead > span { background: rgba(255, 255, 255, .08); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.pair .btn { min-height: 42px; font-size: 11px; margin: 0; }
.pair .btn + .btn { margin-top: 0; }
.sub-card .foot { font-size: 11px; color: var(--muted); text-align: center; margin-top: 12px; }
.add-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 26px 20px; }
.add-card b { font-size: 16px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; }
.add-card small { font-size: 12px; color: var(--muted); line-height: 1.55; max-width: 260px; margin-bottom: 10px; }
.subs { margin: 0 -18px; padding: 0 18px 4px; scroll-padding: 0 18px; }
.dots { gap: 5px; margin-top: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 3px; background: var(--line); }
.dots i.on { width: 18px; background: var(--lilac); }
.subs-arr { color: var(--muted); }
.subs-arr .gl { width: 16px; height: 16px; }

/* --- Тарифы: шаг 1 и 2 ------------------------------------------------------ */
.step-title { margin: 16px 0 21px; }
.step-title .eyebrow { color: var(--lilac); margin-bottom: 9px; }
.step-title .h1 { margin: 0 0 17px; }
.step-track { display: flex; gap: 6px; }
.step-track i { height: 4px; flex: 1; border-radius: 10px; background: var(--line); }
.step-track i.on { background: var(--lilac); }
.new-sub { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); margin: 20px 0; }
.new-sub::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); flex: none; }

.dcards { display: block; }
.tier {
  display: block; width: 100%; text-align: left; position: relative; margin: 12px 0; cursor: pointer;
  background: var(--card); padding: 19px 17px; border: 1px solid var(--line); border-radius: 20px; color: var(--text);
  font-family: inherit; transition: background .2s, border-color .2s;
}
.tier.selected { background: var(--purple); border-color: var(--lilac); }
.tier-top { display: flex; align-items: center; gap: 10px; }
.tier .icon-box { width: 35px; height: 35px; border-radius: 10px; }
.tier-name { min-width: 0; }
.tier-name b { display: block; font-size: 16px; letter-spacing: -.025em; font-weight: 700; margin: 0 0 4px; }
.tier-name small { display: block; font-size: 10px; color: var(--muted); }
.tier-price { margin-left: auto; text-align: right; font-size: 17px; font-weight: 750; white-space: nowrap; }
.tier-price small { display: block; font-weight: 400; font-size: 9px; margin-top: 4px; color: var(--muted); }
.radio { width: 18px; height: 18px; border: 1.5px solid #655a79; border-radius: 50%; display: inline-block; flex-shrink: 0; background: none; box-shadow: none; }
.selected .radio { border: 5px solid var(--lilac); background: var(--bg); }
.tier-stats { display: flex; gap: 6px; margin-top: 17px; }
.tier-stats span { font-size: 10px; padding: 8px; background: rgba(255, 255, 255, .02); border-radius: 8px; flex: 1; color: var(--muted); }
.tier-stats b { color: var(--text); font-weight: 600; }
.tier-year { display: block; font-size: 10px; color: var(--lilac); margin-top: 13px; }
.popular {
  position: absolute; right: 17px; top: -9px; background: var(--amber); color: var(--bg);
  border-radius: 4px; padding: 4px 7px; font-size: 8px; font-weight: 750; letter-spacing: .07em;
}
.step-next { margin-top: 16px; }

.terms { display: block; }
.term {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); padding: 17px 15px; border: 1px solid var(--line); border-radius: 17px;
  margin: 12px 0; position: relative; min-height: 79px; color: var(--text); font-family: inherit;
}
.term.selected { background: var(--purple); border-color: var(--lilac); }
.term-t { min-width: 0; }
.term-t b { display: block; font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.term-t small { display: block; font-size: 10px; color: var(--muted); }
.term-p { margin-left: auto; text-align: right; white-space: nowrap; }
.term-p b { font-size: 18px; letter-spacing: -.04em; font-weight: 750; }
.term-p s { display: block; font-size: 11px; color: var(--muted); }
.term .popular { right: 13px; }

.choice { margin-top: 21px; padding: 18px; }
.choice h3 { font-size: 16px; margin: 0 0 16px; }
.choice-line { font-size: 12px; line-height: 1.5; gap: 16px; margin-bottom: 17px; }
.choice-line b { color: var(--lilac); white-space: nowrap; }
.choice .opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; font-family: inherit;
  border: 0; border-top: 1px solid var(--line); padding: 16px 0; background: none; color: var(--text);
}
.choice .opt + .opt { border-top: 1px solid var(--line); }
.choice .opt + h4 { border-top: 1px solid var(--line); padding-top: 16px; }
.choice .opt .t { flex: 1; min-width: 0; }
.choice .opt .t b { display: block; font-size: 13px; font-weight: 600; }
.choice .opt .t small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.choice .opt > .gl { width: 15px; height: 15px; color: var(--muted); }
.choice h4 { font-size: 12px; margin: 0 0 10px; color: var(--text); }
.includes { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.includes li { display: flex; gap: 7px; align-items: center; }
.includes .gl { color: var(--lilac); width: 14px; height: 14px; }
.switch { width: 40px; height: 24px; border-radius: 12px; background: #3a3352; position: relative; flex: none; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .2s var(--spring); }
.switch.on { background: var(--lilac); }
.switch.on i { transform: translateX(16px); background: var(--bg); }

/* Панель «Итого · Оплатить» над нижним краем. */
.paybar {
  position: absolute; left: 12px; right: 12px; bottom: calc(14px + var(--bottom)); z-index: 7;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: rgba(21, 18, 42, .97); border: 1px solid #3a3352; border-radius: 22px; padding: 12px 14px;
  box-shadow: 0 -12px 35px rgba(14, 11, 22, .67); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: fadeUp .3s var(--spring) both;
}
.paybar .t { flex: 1; min-width: 0; }
.paybar .t small { display: block; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.paybar .t b { font-size: 23px; font-weight: 800; color: var(--lilac); letter-spacing: -.04em; }
.paybar .t s { font-size: 12px; color: var(--muted); margin-left: 8px; }
.paybar .btn { width: auto; min-width: 143px; margin: 0; }
html:not(.web) .paybar { max-width: 406px; }

/* Подарок. */
.gift-card { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 14px; }
.gift-card .k { color: var(--muted); font-size: 11px; }
.gift-to { font-size: 20px; font-weight: 750; margin-top: 2px; }
.gift-card .choice-line { align-self: stretch; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* --- Шторки ------------------------------------------------------------------ */
.shade { background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet .body {
  background: #181429; border: 1px solid #3a3352; border-bottom: 0; border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(25px + var(--bottom)); box-shadow: 0 -20px 60px rgba(0, 0, 0, .53);
}
.sheet .grip { width: 32px; height: 4px; background: #534763; margin: 0 auto 18px; }
.close-sheet {
  position: absolute; right: 17px; top: 25px; z-index: 2; width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .025); color: var(--text); display: grid; place-items: center; cursor: pointer;
}
.close-sheet .gl { width: 14px; height: 14px; }
.sheet h2 { font-size: 26px; margin: 12px 40px 9px 0; letter-spacing: -.04em; font-weight: 780; }
.sheet h2.c { margin-right: 0; }
.sheet .body > .sub { margin: 0 0 24px; }
.pay-option {
  display: flex; gap: 11px; align-items: center; width: 100%; text-align: left; cursor: pointer; font-family: inherit;
  border: 1px solid var(--line); border-radius: 15px; background: #1e1931; margin: 10px 0; padding: 14px 12px; color: var(--text);
}
.pay-option.selected { background: var(--purple); border-color: var(--lilac); }
.pay-option .icon-box { width: 36px; height: 36px; }
.pay-option .t { min-width: 0; }
.pay-option h3 { font-size: 13px; letter-spacing: -.02em; margin: 0 0 4px; font-weight: 700; }
.pay-option p { font-size: 10px; color: var(--muted); line-height: 1.5; margin: 0; }
.pay-option .radio { margin-left: auto; }
.pay-option:disabled { opacity: .4; cursor: default; }
.pay-symbol { width: 22px; height: 22px; display: block; color: var(--lilac); }
.btn.full { margin-top: 17px; }

/* Успех: логотип, сиреневая галочка, одна фраза. */
.success { text-align: center; padding-top: 30px; }
.success .original-mark { width: 168px; margin: auto; border-radius: 50%; }
.success .success-check {
  background: var(--lilac); color: var(--bg); width: 32px; height: 32px; border: 3px solid #181429;
  border-radius: 50%; display: grid; place-items: center; margin: -18px auto 18px; position: relative;
}
.success .success-check .gl { width: 16px; height: 16px; stroke-width: 2.4; }
.success h2 { margin-right: 0; }
.success .sub { max-width: 300px; margin: 0 auto 20px; }
.success .text-link { margin: 14px auto 0; width: 100%; }
.store-ic { color: var(--lilac); }
.warnmark { background: rgba(214, 155, 81, .125); color: var(--amber); }
.spinner { border-color: rgba(190, 171, 254, .16); border-top-color: var(--lilac); }
.pickrow { border-color: var(--line); background: #1e1931; }
.pickrow.on { border-color: var(--lilac); background: var(--purple); box-shadow: none; }
.pickrow.on .radio { background: none; border: 5px solid var(--lilac); box-shadow: none; }
.field { background: var(--bg); border: 1px solid #51465f; border-radius: 12px; }
.field.sheet-input { background: var(--bg); border-color: #51465f; }
.field:focus-within, .field.ok { border-color: var(--lilac); }
.field .gl { width: 18px; height: 18px; color: var(--muted); }

/* --- Мастер подключения ------------------------------------------------------ */
.setup { background: radial-gradient(ellipse 100% 420px at 50% -140px, #38244e, transparent), var(--bg); padding: calc(68px + var(--head)) 18px calc(30px + var(--bottom)); }
body.fs .setup { padding-top: calc(var(--head) + 12px); }
.setup > * { width: 100%; max-width: 430px; margin-left: auto; margin-right: auto; }
.setup-track { margin-top: 12px; }
.platform-title { text-align: center; margin: 28px auto; }
.platform-title h1 { max-width: 270px; margin: auto; font-size: 28px; line-height: 1.15; letter-spacing: -.04em; font-weight: 780; }
.platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.platform {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; text-align: left; cursor: pointer;
  padding: 20px 17px; position: relative; min-height: 142px; color: var(--text); font-family: inherit;
  transition: background .2s, border-color .2s;
}
.platform.selected { background: var(--purple); border-color: var(--lilac); }
.platform .icon-box { margin-bottom: 16px; }
.platform b { display: block; font-size: 13px; font-weight: 700; }
.platform small { font-size: 10px; color: var(--muted); display: block; margin-top: 5px; }
.platform small.me { color: var(--lilac); font-weight: 600; }
.platform .platform-check { position: absolute; right: 13px; top: 13px; width: 15px; height: 15px; color: var(--lilac); opacity: 0; transition: opacity .2s; }
.platform.selected .platform-check { opacity: 1; }
.platform-check .gl { width: 15px; height: 15px; }
.platform-grid + .btn { margin-top: 24px; }

.orbit {
  width: 220px; height: 220px; margin: 35px auto 23px; border: 1px solid #32264c; border-radius: 50%;
  position: relative; display: grid; place-items: center; flex: none;
}
.orbit::before { content: ''; position: absolute; inset: 22px; border: 1px solid #43325f; border-radius: 50%; }
.orbit::after {
  content: ''; position: absolute; inset: 44px; border: 2px solid var(--lilac); border-left-color: #2a2540;
  border-radius: 50%; transform: rotate(-45deg); transition: border-color .4s;
}
.orbit.complete::after { border-color: var(--lilac); }
.orbit.spin::after { animation: orbitSpin 1.6s linear infinite; }
@keyframes orbitSpin { from { transform: rotate(-45deg); } to { transform: rotate(315deg); } }
.orbit > span { width: 82px; height: 82px; background: var(--purple); border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1; color: var(--lilac); }
.orbit > span .gl { width: 35px; height: 35px; }
.setup-center { text-align: center; }
.setup-center .eyebrow { color: var(--lilac); margin-bottom: 12px; }
.setup-center h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.04em; font-weight: 780; }
.setup-center p { max-width: 300px; margin: 13px auto 24px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.setup-center .step-in { animation: screenIn .3s var(--spring) both; }
.setup.still .step-in, .setup.still .platform { animation: none !important; }
.setup-center .btn + .btn { margin-top: 10px; }
.setup.won .setup-center h1 { color: var(--lilac); }
.key-clients { display: grid; grid-template-columns: 1fr 1.45fr; gap: 10px; align-items: stretch; margin: 0 0 10px; }
.key-clients .client-button { width: 100%; min-width: 0; min-height: 76px; padding: 12px 10px; margin: 0; font-size: 11px; line-height: 1.4; gap: 7px; }
.client-button span { display: block; }
.client-button strong { display: block; font-size: 18px; margin-top: 2px; line-height: 1.1; }
.key-clients .happ-button strong { font-size: 23px; }
.key-clients .happ-button .gl { width: 18px; height: 18px; }
.key-clients .btn + .btn { margin-top: 0; }
.copy-key { display: block; width: 100%; font-size: 11px; color: var(--muted); background: transparent; border: 0; padding: 20px 0; cursor: pointer; font-family: inherit; }
.copy-key span { color: var(--lilac); }
.instruction {
  display: flex; gap: 13px; align-items: flex-start; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; text-align: left; margin: 10px 0;
}
.instruction .step-num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--purple); color: var(--lilac); font-size: 11px; font-weight: 700; flex-shrink: 0; }
.instruction h3 { font-size: 13px; line-height: 1.5; margin: 2px 0 5px; font-weight: 700; }
.instruction p { font-size: 11px; margin: 0; color: var(--muted); line-height: 1.5; max-width: none; }
.setup-center .instruction + .btn { margin-top: 20px; }
.key-groups { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 18px; }
.key-groups span { background: var(--purple); color: var(--lilac); }

/* --- Поддержка и чат ---------------------------------------------------------- */
.tickets { display: block; }
.ticket {
  display: block; width: 100%; text-align: left; cursor: pointer; font-family: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 17px; padding: 17px; margin-bottom: 10px;
}
.ticket h3 { font-size: 13px; margin: 0; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.ticket p { color: var(--muted); font-size: 11px; margin: 9px 0 0; }
.ticket-meta { display: flex; gap: 6px; align-items: center; flex: none; }
.ticket .badge { background: var(--amber); color: var(--bg); border-radius: 50%; width: 17px; height: 17px; font-size: 9px; font-weight: 700; display: grid; place-items: center; }
.empty { background: var(--card); border: 1px solid var(--line); border-radius: 17px; padding: 24px 18px; gap: 4px; }
.empty .original-mark { width: 92px; border-radius: 50%; margin-bottom: 10px; }
.empty b { font-size: 13px; font-weight: 700; }
.empty small { font-size: 11px; }
.form-card .label { font-size: 11px; color: var(--text); margin: 0 0 8px; }
.form-card .chips { margin-bottom: 14px; }
.chips button { height: 34px; border: 1px solid #3a3352; color: var(--text); font-size: 11px; }
.chips button.on { background: var(--lilac); color: var(--bg); border-color: var(--lilac); }
.area, .pa-about { background: var(--bg); border: 1px solid #51465f; border-radius: 12px; color: var(--text); }
.form-note { font-size: 10px; color: var(--muted); margin: 10px 0 0; text-align: center; }
.chat-send { background: var(--amber); color: var(--bg); }
.chat-send .gl { width: 18px; height: 18px; }

/* --- Частые вопросы: строки с «+» ------------------------------------------- */
.support-faq { border-top: 1px solid var(--line); }
.support-faq .faq { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; margin: 0; }
.support-faq .faq.open { border-color: var(--line); }
.support-faq .faq button { padding: 18px 0; font-size: 13px; font-weight: 500; gap: 15px; text-align: left; }
.faq-plus { width: 12px; height: 12px; position: relative; flex: none; }
.faq-plus::before, .faq-plus::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--lilac); border-radius: 2px; transition: transform .25s var(--ease); }
.faq-plus::after { transform: rotate(90deg); }
.faq.open .faq-plus::after { transform: rotate(0deg); }
.support-faq .faq .a p { padding: 0 0 18px; font-size: 12px; color: var(--muted); }

/* --- Профиль ------------------------------------------------------------------- */
.account .eyebrow { color: var(--lilac); margin-bottom: 19px; }
.account-user { display: flex; gap: 13px; align-items: center; }
.account-user .av, .account-user .avatar {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; flex: none; overflow: hidden;
  background: var(--lilac); color: var(--bg); font-size: 24px; font-weight: 750;
}
.account-name { min-width: 0; }
.account-name h3 { font-size: 15px; margin: 0 0 6px; font-weight: 700; }
.account-name small { color: var(--muted); font-size: 10px; }
.idbtn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 10px; cursor: pointer; font-family: inherit; }
.idbtn .gl { width: 12px; height: 12px; }
.account-status { color: var(--lilac); border-top: 1px solid var(--line); padding-top: 15px; margin: 17px 0 0; font-size: 11px; }
.card.balance { margin-top: 13px; }
.balance .eyebrow { color: var(--muted); }
.balance .tag { cursor: pointer; font-family: inherit; }
.balance .tag .gl { width: 12px; height: 12px; }
.balance .amt { font-size: 36px; color: var(--amber); letter-spacing: -.04em; display: block; margin: 10px 0; font-weight: 780; }
.bal-note { font-size: 11px; color: var(--muted); max-width: 250px; margin: 0; line-height: 1.5; }
.docs-tile, .doc-tile { background: var(--card); border-color: var(--line); }
.doc-ic { color: var(--lilac); }

/* --- Друзья ------------------------------------------------------------------- */
.referral-hero { background: var(--purple); border-color: #655288; position: relative; overflow: hidden; padding-bottom: 25px; min-height: 170px; }
.referral-hero .eyebrow { font-size: 9px; color: var(--amber); }
.referral-hero h1, .referral-hero .big { font-size: 29px; line-height: 1.12; max-width: 215px; margin: 15px 0 13px; letter-spacing: -.04em; font-weight: 780; color: var(--text); }
.referral-hero p, .referral-hero .txt { max-width: 215px; font-size: 12px; line-height: 1.55; color: #c9c0dc; position: relative; z-index: 2; margin: 0; }
.referral-hero .original-mark { width: 124px; border-radius: 50%; position: absolute; right: -15px; bottom: -8px; }
.referral-hero .k2 { color: var(--amber); }
.friend-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 15px 0; }
.friend-stats > div { border-radius: 16px; background: var(--card); border: 1px solid var(--line); padding: 16px 9px; min-width: 0; }
.friend-stats strong { display: block; font-size: 20px; letter-spacing: -.04em; font-weight: 780; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-stats small { display: block; font-size: 10px; color: var(--muted); margin-top: 7px; }
.friend-stats > div:last-child { background: var(--purple); border-color: #655288; }
.friend-stats > div:last-child strong { color: var(--amber); }
.referral-link .eyebrow { color: var(--lilac); margin-bottom: 15px; }
.link-field {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer;
  font-size: 11px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 11px; color: var(--muted); font-family: inherit;
}
.link-field .rl-url { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: inherit; color: var(--muted); font-size: 11px; }
.link-field .gl { width: 14px; height: 14px; color: var(--lilac); }
.referral-link .btn { margin-top: 12px; }
.referral-link .link-note { font-size: 10px; display: block; text-align: center; color: var(--muted); margin-top: 11px; }
.friend-steps { margin-top: 16px; }
.friend-steps .instruction { background: none; border: 0; margin: 0; padding: 8px 0; align-items: center; }
.friend-steps .instruction h3 { margin: 0; font-weight: 600; }
.stat { background: var(--card); border-color: var(--line); }
.stat.lit { background: var(--purple); border-color: #655288; }
.stat.lit .v { color: var(--amber); }
.dashed { border-color: #3a3352; }
.lnk-btn { color: var(--lilac); display: inline-flex; align-items: center; gap: 6px; }
.lnk-btn .gl { width: 14px; height: 14px; }

/* --- Вход и ворота на канал ------------------------------------------------- */
.login-hero .app-scene { margin-bottom: 0; }

/* --- Сайт на компьютере: меню слева ------------------------------------------ */
.side-brand { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 900; letter-spacing: -1px; color: var(--text); }
.side-brand b { color: var(--text); font-weight: 900; }
.side-brand b span { color: var(--lilac); }
.side-brand .original-mark.mini { width: 32px; height: 32px; }
.side-nav .gl, .side-site .gl, .side-cta .gl { width: 19px; height: 19px; }

@media (max-width: 374px) {
  #screen { padding-left: 16px; padding-right: 16px; }
  .app-scene { height: 198px; }
  .app-scene .original-mark { width: 185px; }
  .app-scene::before { width: 185px; height: 185px; }
  .app-intro { margin-bottom: 18px; }
  .h1, .app-page-title, .app-intro h1, .home-title { font-size: 26px; }
  .trial-card { padding: 18px; }
  .tier { padding: 18px 14px; }
  .tier .icon-box { display: none; }
  .term { padding: 15px 12px; }
  .term-p b { font-size: 17px; }
  .orbit { width: 195px; height: 195px; margin-top: 25px; }
  .key-clients { grid-template-columns: 1fr 1fr; }
}

/* Большой монитор: главная в две колонки (сцена и заголовок слева, карточка
   справа). Сетку задаёт app.css, здесь — места блоков макета в ней. */
@media (min-width: 1280px) {
  html.web.authed .view.home { grid-template-areas: "sw cards" "stage cards" "title cards"; }
  html.web.authed .view.home .app-scene { grid-area: stage; }
  html.web.authed .view.home .app-intro { grid-area: title; padding-bottom: 22px; margin-bottom: 0; }
  html.web.authed .view.home .app-intro .home-title { font-size: 33px; }
  html.web.authed .view.home .app-intro .home-sub { font-size: 15px; }
  html.web.authed .view.home .switcher { margin-top: 24px; }
}
