/* 5G VPN — личный кабинет 5g-vpn.com/lk. Основа — стиль мини-приложения (MiniApp/assets/app.css: те же цвета, шрифт Inter,
   карточки, кнопки), ниже — раскладка кабинета: телефон (шапка + нижние вкладки), планшет, ПК (боковое меню). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #090e31;
  --bg-deep: #060a24;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.08);
  --surface-press: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0fa;
  --text-muted: #b3b9d6;
  --text-subtle: #8f96bb;
  --violet: #b39ddb;
  --accent-a: #9c27b0;
  --accent-b: #673ab7;
  --green: #5ccf63;
  --green-bg: rgba(67, 160, 71, 0.16);
  --amber: #ffc56b;
  --amber-bg: rgba(255, 176, 32, 0.14);
  --red: #ff7b7b;
  --red-bg: rgba(255, 68, 68, 0.14);
  --blue: #7fa3ff;
  --focus: #c9b5ff;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 60px;
  --sidebar-w: 264px;
}

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

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
body {
  min-height: 100dvh;
}
img,
svg {
  display: block;
  max-width: 100%;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
a {
  color: var(--violet);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ─── каркас ─── */
.glow {
  position: fixed;
  inset: 0 0 auto 0;
  height: 520px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(420px 260px at 12% 0%, rgba(156, 39, 176, 0.26), transparent 70%),
    radial-gradient(380px 260px at 95% 4%, rgba(103, 58, 183, 0.28), transparent 70%);
}
.app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: calc(var(--safe-top) + 12px) 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
  max-width: 560px;
  margin: 0 auto;
}
.app--no-tabs {
  padding-bottom: calc(var(--safe-bottom) + 24px);
}
.screen {
  animation: enter 0.28s var(--ease) both;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
}
/* аватарка клиента: фото профиля Telegram (бэкенд берёт размер не меньше 180 px — чётко на экранах 3×) или первая буква имени */
.avatar {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 0 0 2px var(--border-strong);
  color: #fff;
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  user-select: none;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topbar__hello {
  margin-left: auto;
  color: var(--text-subtle);
  font-size: 14px;
  max-width: 50%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-title {
  margin: 6px 0 4px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.page-lead {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 15px;
}
.section-title {
  margin: 26px 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* ─── нижние вкладки ─── */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 6px 8px calc(var(--safe-bottom) + 6px);
  background: rgba(9, 14, 49, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: 1px solid var(--border);
}
.tabbar__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 560px;
  margin: 0 auto;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 52px;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--text-subtle);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 14px;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.tab svg {
  width: 24px;
  height: 24px;
}
.tab[aria-current="page"] {
  color: #fff;
}
.tab[aria-current="page"] svg {
  color: var(--violet);
}
.tab:active {
  background: var(--surface);
}

/* ─── кнопки ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 15px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease), opacity 0.2s;
  user-select: none;
}
.btn:active {
  transform: scale(0.98);
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 10px 28px -12px rgba(156, 39, 176, 0.8);
}
.btn--green {
  color: #0b2a0d;
  background: #7fd88a;
}
.btn--ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}
.btn--danger {
  color: #ffd9d9;
  background: var(--red-bg);
  border-color: rgba(255, 123, 123, 0.35);
}
.btn--block {
  width: 100%;
}
.btn--sm {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 15px;
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stack {
  display: grid;
  gap: 10px;
}
.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── карточки ─── */
.card {
  position: relative;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.card + .card {
  margin-top: 12px;
}
.card--hero {
  padding: 20px;
  background: linear-gradient(160deg, rgba(156, 39, 176, 0.22), rgba(103, 58, 183, 0.14) 50%, rgba(255, 255, 255, 0.03));
  border-color: rgba(179, 157, 219, 0.35);
}
.card h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.card p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}
.muted {
  color: var(--text-muted);
}
.subtle {
  color: var(--text-subtle);
  font-size: 14px;
}

/* баланс */
.balance {
  display: flex;
  align-items: center;
  gap: 16px;
}
.balance__main {
  flex: 1;
  min-width: 0;
}
.balance__label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.balance__value {
  margin-top: 2px;
  font-size: clamp(26px, 7.6vw, 38px);
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.balance__meta {
  margin-top: 6px;
  color: var(--text-subtle);
  font-size: 14px;
}
.ring {
  position: relative;
  width: 92px;
  height: 92px;
  flex: none;
}
.ring svg {
  width: 92px;
  height: 92px;
  transform: rotate(-90deg);
}
.ring__track {
  stroke: rgba(255, 255, 255, 0.1);
}
.ring__value {
  transition: stroke-dashoffset 0.8s var(--ease);
}
.ring__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.05;
}
.ring__label b {
  font-size: 22px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ring__label span {
  font-size: 11px;
  color: var(--text-subtle);
  font-weight: 600;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.stats--2 {
  grid-template-columns: repeat(2, 1fr);
}
.stat {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
.stat b {
  display: block;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.stat span {
  display: block;
  font-size: 12px;
  color: var(--text-subtle);
  line-height: 1.3;
}

/* плитки действий */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 112px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  transition: background-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.tile:active {
  transform: scale(0.98);
  background: var(--surface-press);
}
.tile b {
  font-size: 15px;
  line-height: 1.25;
}
.tile small {
  display: block;
  margin-top: 2px;
  color: var(--text-subtle);
  font-size: 12.5px;
  line-height: 1.3;
  font-weight: 500;
}
.ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.25), rgba(103, 58, 183, 0.25));
  border: 1px solid rgba(179, 157, 219, 0.28);
  color: #dccff7;
}
.ico svg {
  width: 21px;
  height: 21px;
}
.ico--green {
  background: var(--green-bg);
  border-color: rgba(92, 207, 99, 0.3);
  color: #8fe596;
}
.ico--blue {
  background: rgba(74, 123, 247, 0.16);
  border-color: rgba(127, 163, 255, 0.32);
  color: #a9c1ff;
}
.ico--amber {
  background: var(--amber-bg);
  border-color: rgba(255, 197, 107, 0.3);
  color: var(--amber);
}
.ico--red {
  background: var(--red-bg);
  border-color: rgba(255, 123, 123, 0.3);
  color: var(--red);
}
/* логотип способа оплаты (СБП, USDT) — сам знак с прозрачным фоном, без плашки */
.ico--logo {
  background: none;
  border: 0;
  border-radius: 0;
}
.ico--logo img {
  display: block;
  width: 40px;
  height: 40px;
}
.ico--lg {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}
.ico--lg svg {
  width: 26px;
  height: 26px;
}

.cta-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 12px 0;
  padding: 16px;
  border-radius: 22px;
  border: 0;
  color: #fff;
  text-align: left;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 16px 36px -16px rgba(156, 39, 176, 0.85);
}
.cta-card .ico {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}
.cta-card b {
  display: block;
  font-size: 17px;
}
.cta-card small {
  display: block;
  opacity: 0.85;
  font-size: 13.5px;
}
.cta-card > svg {
  margin-left: auto;
  width: 22px;
  height: 22px;
  opacity: 0.9;
}

/* строки списка */
.list {
  display: grid;
  /* колонка не шире экрана: иначе длинный заголовок строки раздвигал сетку за правый край (узкие телефоны, 360 px) */
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  transition: background-color 0.2s var(--ease), transform 0.15s var(--ease);
}
button.row:active {
  transform: scale(0.99);
  background: var(--surface-press);
}
.row__body {
  flex: 1;
  min-width: 0;
}
.row__title {
  display: block;
  font-weight: 600;
  /* длинный заголовок переносится, а не обрезается */
  overflow-wrap: anywhere;
}
.row__sub {
  display: block;
  color: var(--text-subtle);
  font-size: 13.5px;
  margin-top: 1px;
}
.row > svg {
  width: 20px;
  height: 20px;
  color: var(--text-subtle);
  flex: none;
}
.row--danger {
  border-color: rgba(255, 123, 123, 0.35);
  background: rgba(255, 68, 68, 0.07);
}

/* статусы */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pill--ok {
  color: var(--green);
  background: var(--green-bg);
}
.pill--warn {
  color: var(--amber);
  background: var(--amber-bg);
}
.pill--bad {
  color: var(--red);
  background: var(--red-bg);
}

/* баннеры */
.banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  margin-bottom: 12px;
  font-size: 14.5px;
}
.banner svg {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 1px;
}
.banner > div > b:first-child {
  display: block;
  margin-bottom: 2px;
}
.banner p b {
  color: inherit;
}
.banner p {
  margin: 0;
}
.banner--bad {
  background: var(--red-bg);
  border: 1px solid rgba(255, 123, 123, 0.35);
  color: #ffd9d9;
}
.banner--warn {
  background: var(--amber-bg);
  border: 1px solid rgba(255, 197, 107, 0.35);
  color: #ffe6bf;
}
.banner--info {
  background: rgba(103, 58, 183, 0.14);
  border: 1px solid rgba(179, 157, 219, 0.3);
  color: var(--text-muted);
}
.banner--info svg {
  color: var(--violet);
}
.banner--ok {
  background: var(--green-bg);
  border: 1px solid rgba(92, 207, 99, 0.35);
  color: #d6f5d8;
}
.banner .btn {
  margin-top: 10px;
}
/* компактная плашка (ограничения в карточке устройства) */
.banner--sm {
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  margin-bottom: 8px;
  font-size: 14px;
}
.banner--sm svg {
  width: 18px;
  height: 18px;
  margin-top: 0;
}
.banner--sm b {
  display: inline;
  margin: 0;
}

/* выбор платформы */
.platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  transition: transform 0.15s var(--ease), border-color 0.2s, background-color 0.2s;
}
.platform:active {
  transform: scale(0.98);
}
.platform[aria-pressed="true"] {
  border-color: rgba(179, 157, 219, 0.7);
  background: rgba(103, 58, 183, 0.18);
}
.platform svg {
  width: 34px;
  height: 34px;
}
.platform b {
  font-size: 15px;
}
.platform small {
  color: var(--text-subtle);
  font-size: 12px;
  line-height: 1.3;
}

/* поля ввода */
.field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}
.field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.input,
.textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border-radius: 15px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.input:focus,
.textarea:focus {
  border-color: rgba(179, 157, 219, 0.8);
  background: rgba(255, 255, 255, 0.08);
}
.textarea {
  min-height: 140px;
  resize: vertical;
}
.hint {
  font-size: 13px;
  color: var(--text-subtle);
}
.hint--err {
  color: var(--red);
}
.input-money {
  position: relative;
}
.input-money .input {
  padding-right: 64px;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.input-money span {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-weight: 600;
}

.chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.chip {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s, border-color 0.2s;
}
.chip[aria-pressed="true"] {
  background: rgba(103, 58, 183, 0.28);
  border-color: rgba(179, 157, 219, 0.8);
}

.method {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
}
.method[aria-pressed="true"] {
  border-color: rgba(179, 157, 219, 0.8);
  background: rgba(103, 58, 183, 0.18);
}
.method .radio {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  flex: none;
}
.method[aria-pressed="true"] .radio {
  border-color: var(--violet);
  box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 11px var(--violet);
}

/* шаги инструкций */
.steps {
  counter-reset: s;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps > li {
  counter-increment: s;
  position: relative;
  padding: 14px 14px 14px 58px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.steps > li::before {
  content: counter(s);
  position: absolute;
  left: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
}
.steps b {
  display: block;
  font-size: 15.5px;
}
.steps p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14.5px;
}
.steps .btn {
  margin-top: 12px;
}
/* списки внутри шагов и ответов: «•» вместо нумерации, без отступа браузера */
.sub {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
.sub > li {
  position: relative;
  padding-left: 16px;
  color: var(--text-muted);
  font-size: 14.5px;
}
.sub > li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-a);
}
.steps b.inline,
.sub b.inline {
  display: inline;
  font-size: inherit;
  color: var(--text);
}
.note {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--amber-bg);
  color: #ffe6bf;
  font-size: 13.5px;
}

/* QR-код адреса кошелька USDT */
.qr {
  display: grid;
  place-items: center;
  margin: 12px auto 0;
  padding: 14px;
  width: min(260px, 100%);
  border-radius: 20px;
  background: #fff;
}
.qr img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* копирование */
.copy {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(179, 157, 219, 0.45);
  background: rgba(103, 58, 183, 0.1);
  text-align: left;
}
.copy code {
  flex: 1;
  min-width: 0;
  font: 600 15px/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  word-break: break-all;
}
.copy svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--violet);
}
.big-amount {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* история */
.history-day {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-subtle);
}
.op {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.op:last-child {
  border-bottom: 0;
}
.op__body {
  flex: 1;
  min-width: 0;
}
.op__title {
  font-size: 15px;
  font-weight: 500;
}
.op__time {
  font-size: 12.5px;
  color: var(--text-subtle);
}
.op__sum {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.op__sum--plus {
  color: var(--green);
}

/* инфографика приглашений */
.ref-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.ref-flow__side {
  text-align: center;
  padding: 14px 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
.ref-flow__side .ico {
  margin: 0 auto 8px;
}
.ref-flow__side b {
  display: block;
  font-size: 22px;
  color: var(--green);
  letter-spacing: -0.02em;
}
.ref-flow__side span {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.3;
  display: block;
}
.ref-flow__arrow {
  color: var(--violet);
}
.ref-flow__arrow svg {
  width: 26px;
  height: 26px;
}

/* тариф: инфографика */
.formula {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 12px;
  text-align: center;
}
.formula div {
  flex: 1;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
.formula b {
  display: block;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.formula span {
  display: block;
  font-size: 11.5px;
  color: var(--text-subtle);
  line-height: 1.25;
}
.formula i {
  font-style: normal;
  color: var(--text-subtle);
  font-weight: 700;
}

/* вопросы */
.faq details {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.faq details + details {
  margin-top: 8px;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  list-style: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--violet);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary svg {
  transform: rotate(45deg);
}
.faq .answer {
  padding: 0 16px 14px;
  color: var(--text-muted);
  font-size: 14.5px;
}

/* полноэкранные состояния */
.state {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 40px 12px 20px;
}
.state .ico {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}
.state .ico svg {
  width: 36px;
  height: 36px;
}
.state h2 {
  margin: 8px 0 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.state p {
  margin: 0;
  color: var(--text-muted);
  max-width: 340px;
}
.state .btn {
  margin-top: 10px;
  min-width: 220px;
}
.success-mark {
  position: relative;
}
@media (prefers-reduced-motion: no-preference) {
  .success-mark::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 28px;
    border: 2px solid rgba(92, 207, 99, 0.5);
    animation: ring 1.6s var(--ease) 0.2s 1 both;
  }
  @keyframes ring {
    from {
      transform: scale(0.9);
      opacity: 1;
    }
    to {
      transform: scale(1.35);
      opacity: 0;
    }
  }
}

/* регистрация */
.welcome {
  text-align: center;
  padding-top: 12px;
}
.welcome img {
  width: 108px;
  height: 108px;
  margin: 0 auto 8px;
}
.welcome h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.welcome .lead {
  margin: 8px auto 20px;
  max-width: 340px;
  color: var(--text-muted);
}
.bonus-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--green-bg);
  border: 1px solid rgba(92, 207, 99, 0.35);
  color: #c9f3cc;
  font-weight: 600;
  font-size: 14px;
}
.bonus-badge svg {
  width: 18px;
  height: 18px;
}
.benefits {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  text-align: left;
}
.benefits li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 15px;
}
.legal {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-subtle);
  text-align: center;
}
.legal button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: inherit;
}

/* тарифы */
.plan__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.plan__name h3 {
  margin: 0;
}
.card .plan__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 14px 0 6px;
}
.card .plan__price b {
  font-size: clamp(34px, 11vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.plan__price span {
  color: var(--text-muted);
  font-size: 15px;
}
.card p b {
  color: var(--text);
}
.checks {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 600;
  font-size: 15px;
}
.checks li svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--green);
}
.checks small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 13.5px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.table th {
  padding: 0 6px 10px;
  color: var(--text-subtle);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
}
.table td {
  padding: 11px 6px;
  border-top: 1px solid var(--border);
}
.table th:last-child,
.table td:last-child {
  text-align: right;
}
.table td:first-child {
  font-weight: 700;
}
.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pay-methods li {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
}

/* документы: ссылки внизу главной */
.docs-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin-top: 24px;
}
.docs-footer button {
  min-height: 44px;
  border: 0;
  background: none;
  padding: 0 4px;
  color: var(--text-subtle);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* документы: экран */
.doc-toc {
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.doc-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 12px 16px;
  list-style: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.doc-toc summary::-webkit-details-marker {
  display: none;
}
.doc-toc summary svg {
  width: 18px;
  height: 18px;
  color: var(--violet);
  transition: transform 0.25s var(--ease);
}
.doc-toc[open] summary svg {
  transform: rotate(45deg);
}
.doc-toc ol {
  margin: 0;
  padding: 0 16px 12px 36px;
  color: var(--text-subtle);
}
.doc-toc li button {
  min-height: 40px;
  text-align: left;
  font-size: 14.5px;
  text-decoration: none;
}
.doc-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--violet);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.doc {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.doc section {
  scroll-margin-top: calc(var(--safe-top) + 12px);
}
.doc h2 {
  margin: 28px 0 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.3;
}
.doc p {
  margin: 0 0 10px;
}
.doc ul,
.doc ol {
  margin: 0 0 10px;
  padding-left: 22px;
}
.doc li + li {
  margin-top: 4px;
}
.doc b,
.doc strong {
  color: var(--text);
  font-weight: 600;
}
.doc .num {
  margin-right: 6px;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}
.doc .doc__box {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.doc .doc__box p:last-child,
.doc .doc__final {
  margin-bottom: 0;
}
.doc .doc__final {
  margin-top: 18px;
  color: var(--text-subtle);
}

/* заглушка загрузки */
.skeleton {
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* уведомление */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  z-index: 60;
  transform: translate(-50%, 20px);
  width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 14px;
  background: #1a2150;
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
  font-size: 14.5px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}
.kv {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}
.kv div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14.5px;
}
.kv dt {
  color: var(--text-subtle);
}
.kv dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
}
.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* отступы и выравнивание (CSP: без inline-стилей) */
.mt-8 {
  margin-top: 8px;
}
.mt-10 {
  margin-top: 10px;
}
.mt-12 {
  margin-top: 12px;
}
.mt-14 {
  margin-top: 14px;
}
.mt-16 {
  margin-top: 16px;
}
.center {
  text-align: center;
}
.sk-hero {
  height: 210px;
}
.sk-row {
  height: 72px;
}

/* ─── Защита раскладки на узких экранах и при крупном системном шрифте (01.10.2026) ───
   На части Android (крупный шрифт в настройках — WebView Telegram увеличивает текст, узкий экран) колонка 1fr не
   становилась уже своего содержимого: «Пополнить» выталкивала «История» за край карточки. Колонки сеток — от нуля
   (minmax(0, 1fr)), элементы сеток и тексты могут сжиматься и переносить слова, кнопки в ряд — перенос надписи
   вместо выхода за край. */
.tiles,
.stats--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* ряд кнопок: поровну в строку; не помещаются целиком (узкий экран, крупный шрифт) — следующая кнопка уходит на
   новую строку во всю ширину, надпись не рвётся и не выходит за край */
.btn-row {
  display: flex;
  flex-wrap: wrap;
}
.btn-row > .btn {
  flex: 1 1 0;
  min-width: fit-content;
  white-space: nowrap;
}
.stats,
.chips {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.platforms {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tabbar__row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ref-flow {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.tiles > *,
.stats > *,
.chips > *,
.platforms > *,
.tabbar__row > *,
.ref-flow > * {
  min-width: 0;
}
.btn {
  min-width: 0;
  max-width: 100%;
}
.btn-row .btn {
  padding-left: 12px;
  padding-right: 12px;
  gap: 8px;
}
.tile,
.cta-card > span,
.row__body,
.tab {
  min-width: 0;
  overflow-wrap: anywhere;
}
.balance__value {
  font-size: clamp(22px, 7vw, 38px);
}
.formula div {
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.formula b {
  font-size: clamp(14px, 4.4vw, 17px);
}
@media (max-width: 360px) {
  .formula {
    gap: 4px;
  }
  .formula div {
    padding: 8px 4px;
  }
  .btn-row {
    gap: 8px;
  }
  .btn-row .btn {
    padding-left: 8px;
    padding-right: 8px;
    gap: 6px;
    font-size: 15px;
  }
  .btn-row .btn svg {
    width: 18px;
    height: 18px;
  }
  .ring,
  .ring svg {
    width: 80px;
    height: 80px;
  }
}

/* ═══════════════════════════ Личный кабинет: раскладка и компоненты сайта ═══════════════════════════ */

/* скрытое атрибутом hidden — скрыто всегда (у .btn и других свой display) */
[hidden] {
  display: none !important;
}

/* ссылки в виде строк, плиток и кнопок — без подчёркивания, цвет текста */
a.btn,
a.row,
a.tile,
a.platform,
a.cta-card,
a.tab,
a.icon-btn,
a.brand,
a.side-nav__item,
a.side-user {
  color: inherit;
  text-decoration: none;
}
a.btn--primary,
a.cta-card {
  color: #fff;
}
.block {
  display: block;
}
.pre {
  white-space: pre-line;
}
.offscreen {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
}
[tabindex="-1"]:focus {
  outline: none;
}
.skip-link:not(:focus) {
  position: fixed;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #1a2150;
  font-weight: 600;
}

.noscript {
  position: relative;
  z-index: 2;
  max-width: 420px;
  margin: 40px auto;
  padding: 0 16px;
  text-align: center;
  color: var(--text-muted);
}

/* ─── каркас: телефон (по умолчанию) ─── */
.shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
}
.shell__main {
  min-width: 0;
}
.sidebar {
  display: none !important;
}
.app {
  max-width: 600px;
  min-height: 0;
  margin: 0 auto;
  padding: 16px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
  /* сетки экранов подстраиваются под ширину области контента, а не окна (container queries) */
  container-type: inline-size;
  container-name: main;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.app--auth,
.shell--auth .app {
  max-width: none;
  padding-top: calc(var(--safe-top) + 16px);
  padding-bottom: calc(var(--safe-bottom) + 24px);
}

/* шапка (телефон, планшет): логотип + уведомления и чат */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
  background: rgba(9, 14, 49, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header[hidden],
.tabbar[hidden],
.sidebar[hidden] {
  display: none !important;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 0;
  padding: 0 4px;
  border-radius: 12px;
}
.brand img {
  /* логотип вдвое крупнее (решение пользователя 07.10.2026) */
  width: 80px;
  height: 80px;
  flex: none;
  border-radius: 12px;
}
.brand b {
  display: block;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-size: 12.5px;
  color: var(--text-subtle);
  white-space: nowrap;
}
.brand--sm img {
  /* в шапке телефона и планшета — 64 px; отрицательные отступы: высота шапки не меняется */
  width: 64px;
  height: 64px;
  margin: -10px 0;
  border-radius: 10px;
}
.header__actions {
  display: flex;
  gap: 4px;
}
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--text-muted);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn svg {
  width: 24px;
  height: 24px;
}
.icon-btn[aria-current="page"] {
  color: #fff;
  background: var(--surface-2);
}
.icon-btn[aria-current="page"] svg {
  color: var(--violet);
}

/* счётчик непрочитанного */
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff5b6e;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.badge--dot {
  position: absolute;
  top: 3px;
  right: 1px;
  box-shadow: 0 0 0 2px var(--bg);
}
.badge--tab {
  position: absolute;
  top: 2px;
  left: calc(50% + 4px);
  box-shadow: 0 0 0 2px var(--bg);
}

/* нижние вкладки (телефон, планшет) */
.tabbar {
  padding-left: max(8px, env(safe-area-inset-left, 0px));
  padding-right: max(8px, env(safe-area-inset-right, 0px));
}
.tabbar__row {
  max-width: 600px;
}
.tabbar__row--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.tabbar__row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 420px;
}
.tab {
  position: relative;
  justify-content: center;
}
.tab span {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}
@media (max-width: 374px) {
  .tab {
    padding: 6px 0;
    font-size: 10.5px;
    letter-spacing: -0.01em;
  }
}

/* заголовок экрана и «Назад» */
.page-head {
  margin-bottom: 4px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  margin: -4px 0 2px -8px;
  padding: 0 12px 0 4px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
}
.back-btn svg {
  width: 22px;
  height: 22px;
}
.page-title {
  overflow-wrap: anywhere;
}
.card__title {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.state h1,
.state__title {
  margin: 8px 0 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.state--flat {
  padding: 4px 0 8px;
}
.state .btn {
  max-width: 100%;
}
.spinner--lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
  margin: 6px 0;
}

/* приветствие на главной */
.hello {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 18px;
}
.hello .avatar {
  width: 52px;
  height: 52px;
  font-size: 21px;
}
.hello__text {
  display: grid;
  min-width: 0;
}
.hello__text b {
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.hello__text span {
  color: var(--text-subtle);
  font-size: 14px;
  overflow-wrap: break-word;
  min-width: 0;
}
.device-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 4px;
}
.avatar--sm {
  width: 40px;
  height: 40px;
  font-size: 17px;
  box-shadow: none;
}
.avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 26px;
}

/* сетки экранов: на узком — одна колонка */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "bal" "cta" "tiles" "tar";
  gap: 12px;
}
.home-grid__balance {
  grid-area: bal;
}
.home-grid__tariff {
  grid-area: tar;
}
.home-grid__cta {
  grid-area: cta;
  margin: 0;
}
.home-grid__tiles {
  grid-area: tiles;
}
.home-grid .card + .card {
  margin-top: 0;
}
.split,
.invite-grid,
.help-grid,
.guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 20px;
}
.split > *,
.invite-grid > *,
.help-grid > *,
.guide > * {
  min-width: 0;
}
.split__main > .section-title--first,
.invite-grid__links > .section-title--first {
  margin-top: 26px;
}
.list--grid > * {
  min-width: 0;
}
.stats--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.stat b {
  overflow-wrap: anywhere;
}
.narrow {
  max-width: 680px;
}
.narrow--wide {
  max-width: 860px;
}
.usdt {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px 20px;
}
.usdt__qr {
  margin-top: 16px;
}
.inline-form {
  padding: 14px;
}
.field--flush {
  margin-top: 0;
}
.row--static {
  cursor: default;
}
.row--static > svg:last-child {
  color: var(--green);
}
.mt-4 {
  margin-top: 4px;
}

/* три счётчика на узком экране — строками «значение — подпись», чтобы подписи не обрезались */
@container main (max-width: 419px) {
  .stats--3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .stats--3 .stat {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
  }
  .stats--3 .stat span {
    font-size: 13.5px;
  }
}
@container main (max-width: 340px) {
  .formula {
    gap: 3px;
  }
  .formula div {
    padding: 8px 3px;
  }
  .formula span {
    font-size: 10.5px;
  }
}
@container main (min-width: 560px) {
  .tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .platforms {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .list--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .btn--fit {
    width: auto;
    min-width: 280px;
  }
  .usdt {
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: start;
  }
  .usdt__qr {
    margin-top: 4px;
  }
}
@container main (min-width: 680px) {
  .home-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: "bal tar" "cta cta" "tiles tiles";
    gap: 16px;
  }
  .home-grid__balance,
  .home-grid__tariff {
    display: flex;
    flex-direction: column;
  }
  .home-grid__balance .btn-row,
  .home-grid__tariff .btn {
    margin-top: auto;
  }
  .home-grid__balance .balance {
    margin-bottom: 16px;
  }
  .home-grid__tariff .formula {
    margin-bottom: 14px;
    gap: 4px;
  }
  .home-grid__tariff .formula div {
    padding: 10px 4px;
  }
  .home-grid__tariff .formula b {
    font-size: 15px;
    white-space: nowrap;
  }
  .split {
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
  }
  .split--even {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .split__side {
    position: sticky;
    top: 24px;
  }
  .invite-grid,
  .help-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
  }
  .split__main > .section-title--first,
  .invite-grid__links > .section-title--first {
    margin-top: 0;
  }
}

/* ─── вход и регистрация ─── */
.auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 40px);
  padding: 8px 0;
}
.auth__brand {
  display: flex;
  margin-bottom: 18px;
}
.auth__brand img {
  width: 128px;
  height: 128px;
  border-radius: 18px;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.8);
}
.auth-card__title {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.auth-card__lead {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}
.auth-card__lead b {
  color: var(--text);
}
.auth-card__alt {
  margin-top: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}
.auth-card__alt a {
  display: inline-block;
  padding: 10px 4px;
  font-weight: 600;
}
.auth-card .back-btn {
  margin-top: -10px;
}
.auth-card .benefits {
  margin-top: 16px;
}
.auth-card .benefits li span:last-child {
  min-width: 0;
}
.auth__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 18px;
  max-width: 460px;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-subtle);
  text-align: center;
}
.auth__legal > span {
  display: none;
}
.auth__legal a {
  display: inline-block;
  padding: 10px 2px;
  color: var(--text-subtle);
  text-underline-offset: 3px;
}
@media (max-width: 420px) {
  .auth-card {
    padding: 20px 16px;
    border-radius: 20px;
  }
  .auth-card__title {
    font-size: 22px;
  }
}

/* поля форм */
.field__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.optional {
  font-weight: 500;
  color: var(--text-subtle);
}
.input[aria-invalid="true"] {
  border-color: rgba(255, 123, 123, 0.75);
}
.input::placeholder,
.composer__input::placeholder {
  color: var(--text-subtle);
  opacity: 1;
}
.input--code {
  text-align: center;
  font: 700 28px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.32em;
  padding-left: calc(16px + 0.32em);
  font-variant-numeric: tabular-nums;
}
.form-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--red-bg);
  border: 1px solid rgba(255, 123, 123, 0.35);
  color: #ffd9d9;
  font-size: 14.5px;
}
.form-error p {
  margin: 0;
}
.check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--text-muted);
  font-weight: 400;
}
.check input {
  position: absolute;
  width: 24px;
  height: 24px;
  margin: 0;
  opacity: 0;
}
.check__box {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  margin-top: 1px;
  border-radius: 7px;
  border: 1.5px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  color: transparent;
  transition: background-color 0.2s, border-color 0.2s;
}
.check__box svg {
  width: 16px;
  height: 16px;
}
.check input:checked + .check__box {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: #fff;
}
.check input:focus-visible + .check__box {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.check input[aria-invalid="true"] + .check__box {
  border-color: rgba(255, 123, 123, 0.75);
}
.check__text a {
  color: var(--violet);
}
.captcha {
  min-height: 100px;
  width: 100%;
}
.captcha__loading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 100px;
  padding: 0 16px;
  border-radius: 15px;
  border: 1px dashed var(--border-strong);
  color: var(--text-subtle);
  font-size: 14px;
}
.captcha--error {
  display: grid;
  gap: 8px;
  justify-items: start;
  align-content: center;
  padding: 12px 14px;
  border-radius: 15px;
  border: 1px dashed rgba(255, 123, 123, 0.45);
}
.captcha--error p {
  margin: 0;
}
.resend {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  text-align: center;
}
.resend__timer {
  margin: 0;
  color: var(--text-subtle);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.resend .captcha {
  min-height: 100px;
}
.notfound .banner {
  margin-top: 4px;
}
.bonus-badge--block {
  display: flex;
  width: 100%;
  margin: 8px 0 2px;
  border-radius: 16px;
  text-align: left;
  line-height: 1.35;
}
.bonus-badge--block svg {
  flex: none;
}
.nowrap-email {
  overflow-wrap: break-word;
}

/* ─── профиль ─── */
.profile {
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.profile__name {
  font-size: 19px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.profile__email {
  color: var(--text-muted);
  overflow-wrap: break-word;
  min-width: 0;
}
.profile__id {
  color: var(--text-subtle);
  font-size: 13.5px;
}
.tg-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 14px;
}
.copy--code .big-amount {
  letter-spacing: 0.04em;
}

/* ─── уведомления ─── */
.ntf-list {
  display: grid;
  gap: 10px;
}
.ntf {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.ntf--unread {
  background: rgba(103, 58, 183, 0.12);
  border-color: rgba(179, 157, 219, 0.35);
}
.ntf--important {
  border-color: rgba(255, 123, 123, 0.4);
}
.ntf__main {
  flex: 1;
  min-width: 0;
}
.ntf__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.ntf__title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.ntf__new {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
}
.ntf__body {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14.5px;
  overflow-wrap: anywhere;
}
.ntf__body a {
  color: var(--violet);
}
.ntf__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-subtle);
}
.ntf__foot .btn {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 14px;
}
.pill--sm {
  padding: 2px 8px;
  font-size: 11.5px;
}
.pill--sm::before {
  width: 6px;
  height: 6px;
}

/* ─── чат с поддержкой ─── */
.chat {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--header-h) - var(--safe-top) - var(--tabbar-h) - var(--safe-bottom) - 48px);
  max-width: 860px;
}
.chat__log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0 14px;
}
.chat__day {
  align-self: center;
  margin: 10px 0 4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-subtle);
  font-size: 12.5px;
  font-weight: 600;
}
.msg {
  display: flex;
  flex-direction: column;
  max-width: min(82%, 560px);
}
.msg--mine {
  align-self: flex-end;
  align-items: flex-end;
}
.msg--support {
  align-self: flex-start;
}
.msg__who {
  margin: 0 0 3px 12px;
  color: var(--violet);
  font-size: 12.5px;
  font-weight: 600;
}
.msg__bubble {
  min-width: 64px;
  padding: 9px 14px 6px;
  border-radius: 18px;
}
.msg--mine .msg__bubble {
  color: #fff;
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.88), rgba(103, 58, 183, 0.88));
  border-bottom-right-radius: 6px;
}
.msg--support .msg__bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
}
.msg__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg__text a {
  color: inherit;
  text-decoration: underline;
}
.msg__time {
  display: block;
  margin-top: 2px;
  text-align: right;
  font-size: 11.5px;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}
.composer {
  position: sticky;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 10px);
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 8px;
  border-radius: 22px;
  background: rgba(22, 28, 74, 0.94);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -12px 30px -22px rgba(0, 0, 0, 0.8);
}
.composer:focus-within {
  border-color: rgba(179, 157, 219, 0.7);
}
.composer__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 168px;
  padding: 11px 8px;
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.4;
  resize: none;
  outline: none;
}
.composer__send {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
}
.composer__send svg {
  width: 20px;
  height: 20px;
}
.composer__send[disabled] {
  opacity: 0.4;
  cursor: default;
}
.composer__count {
  position: absolute;
  right: 60px;
  top: -22px;
  color: var(--text-subtle);
  font-size: 12px;
}

/* ─── окно подтверждения ─── */
.dialog {
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.dialog::backdrop {
  background: rgba(3, 5, 20, 0.66);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.dialog__box {
  margin: 0;
  padding: 22px;
  border-radius: 22px;
  background: #141a48;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}
.dialog__title {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}
.dialog__text {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}
.dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.dialog__actions .btn {
  flex: 1 1 140px;
}
.btn--danger-solid {
  color: #fff;
  background: #d9434b;
}

.toast--err {
  border-color: rgba(255, 123, 123, 0.5);
  background: #3a1636;
}

/* наведение мышью (на сенсорных экранах — только нажатие) */
@media (hover: hover) {
  .row:not(.row--static):hover,
  .tile:hover,
  .platform:hover,
  .method:hover,
  .chip:hover,
  .faq summary:hover {
    background: var(--surface-2);
  }
  .btn--ghost:hover {
    background: var(--surface-2);
  }
  .btn--primary:hover,
  .cta-card:hover,
  .composer__send:not([disabled]):hover {
    filter: brightness(1.08);
  }
  .back-btn:hover,
  .icon-btn:hover,
  .tab:hover {
    color: var(--text);
  }
  .icon-btn:hover {
    background: var(--surface);
  }
}

/* ─── планшет ─── */
@media (min-width: 768px) {
  .app {
    max-width: 820px;
    padding: 24px 28px calc(var(--tabbar-h) + var(--safe-bottom) + 32px);
  }
  .header {
    padding-left: 20px;
    padding-right: 20px;
  }
  .tabbar__row--5 {
    max-width: 640px;
  }
  .page-title {
    font-size: 28px;
  }
}

/* ─── ПК: боковое меню слева, контент справа ─── */
@media (min-width: 1024px) {
  .shell:not(.shell--auth) {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }
  .sidebar {
    display: flex !important;
    position: sticky;
    top: 0;
    height: 100dvh;
    flex-direction: column;
    gap: 4px;
    padding: 20px 14px 16px;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: rgba(6, 10, 36, 0.55);
  }
  .shell--auth .sidebar,
  .header,
  .tabbar {
    display: none !important;
  }
  .sidebar .brand {
    margin: 0 4px 18px;
  }
  .side-nav {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .side-nav__item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 14px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
  }
  .side-nav__item svg {
    width: 22px;
    height: 22px;
    flex: none;
  }
  .side-nav__item span:not(.badge) {
    flex: 1;
    min-width: 0;
  }
  .side-nav__item:hover {
    background: var(--surface);
    color: var(--text);
  }
  .side-nav__item[aria-current="page"] {
    color: #fff;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.3), rgba(103, 58, 183, 0.24));
    box-shadow: inset 0 0 0 1px rgba(179, 157, 219, 0.3);
  }
  .side-nav__item[aria-current="page"] svg {
    color: var(--violet);
  }
  .side-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
  }
  .side-user:hover {
    background: var(--surface-2);
  }
  .side-user__text {
    display: grid;
    min-width: 0;
  }
  /* имя и почта переносятся (длинная почта не обрезается многоточием) */
  .side-user__text b {
    overflow-wrap: anywhere;
  }
  .side-user__text small {
    overflow-wrap: break-word;
    min-width: 0;
  }
  .side-user__text b {
    font-size: 14.5px;
  }
  .side-user__text small {
    color: var(--text-subtle);
    font-size: 12.5px;
  }
  .app {
    max-width: 1120px;
    margin: 0;
    padding: 32px 40px 56px;
  }
  .shell--auth .app {
    margin: 0 auto;
  }
  .toast {
    bottom: 28px;
  }
  .chat {
    min-height: calc(100dvh - 32px - 56px);
  }
  .composer {
    bottom: 20px;
  }
}
@media (min-width: 1440px) {
  /* широкий экран: контент по центру области справа от меню, не растянут */
  .app {
    margin: 0 auto;
    padding-left: 56px;
    padding-right: 56px;
  }
}

/* низкие экраны (телефон боком): вход без растягивания по высоте */
@media (max-height: 560px) {
  .auth {
    min-height: 0;
    justify-content: flex-start;
  }
}

/* заголовок экрана без подзаголовка — отступ до содержимого */
.page-head > .page-title:last-child {
  margin-bottom: 16px;
}

/* способ оплаты — радиогруппа (aria-checked) */
.method[aria-checked="true"] {
  border-color: rgba(179, 157, 219, 0.8);
  background: rgba(103, 58, 183, 0.18);
}
.method[aria-checked="true"] .radio {
  border-color: var(--violet);
  box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 11px var(--violet);
}

/* низкие экраны: шапка уезжает вместе со страницей (место под содержимое), меню ПК — плотнее */
@media (max-height: 500px) {
  .header {
    position: relative;
  }
  .chat {
    min-height: calc(100dvh - var(--tabbar-h) - var(--safe-bottom) - 48px);
  }
}
@media (min-width: 1024px) and (max-height: 720px) {
  .sidebar {
    gap: 2px;
    padding-top: 14px;
  }
  .sidebar .brand {
    margin-bottom: 8px;
  }
  .side-nav {
    gap: 2px;
  }
  .side-nav__item {
    min-height: 40px;
    padding: 7px 12px;
  }
  .side-user {
    padding: 8px;
  }
}

/* остаток месячного лимита трафика устройства (решение пользователя 07.10.2026) */
.row__traffic {
  display: block;
  margin-top: 2px;
}
.row__traffic.meter--warn,
.kv .meter--warn {
  color: var(--amber);
}
.row__traffic.meter--bad,
.kv .meter--bad {
  color: var(--red);
}
.meter {
  display: block;
  width: 100%;
  max-width: 260px;
  height: 6px;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}
.meter::-webkit-progress-bar {
  background: var(--surface-2);
  border-radius: 999px;
}
.meter::-webkit-progress-value {
  background: var(--green);
  border-radius: 999px;
}
.meter::-moz-progress-bar {
  background: var(--green);
  border-radius: 999px;
}
.meter.meter--warn::-webkit-progress-value {
  background: var(--amber);
}
.meter.meter--warn::-moz-progress-bar {
  background: var(--amber);
}
.meter.meter--bad::-webkit-progress-value {
  background: var(--red);
}
.meter.meter--bad::-moz-progress-bar {
  background: var(--red);
}

/* Код активации приложения (группы по 4 цифры): перенос только между группами; на узком экране — меньше */
.copy code.act-code {
  word-break: normal;
  overflow-wrap: normal;
  letter-spacing: 0.02em;
}
@media (max-width: 420px) {
  .copy code.act-code {
    font-size: 24px;
  }
}
