/* ═══ GO Bull ЛК — монохромная тема (лендинг) ═══════════════════════════
   Белый фон, чёрный текст, Inter + Space Grotesk, тонкие границы.
   Legacy-имена переменных (--dust, --sand-muted…) сохранены как алиасы. */

:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --foreground-muted: rgba(10, 10, 10, 0.72);
  --foreground-subtle: rgba(10, 10, 10, 0.58);
  --muted: #fafafa;
  --muted-2: #f4f4f5;
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.18);
  --primary: #0a0a0a;
  --primary-foreground: #fafafa;
  --radius: 12px;
  --radius-lg: 16px;
  --header-h: 56px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: var(--font-sans);

  /* Совместимость со старыми токенами */
  --dust: var(--foreground);
  --charcoal: var(--foreground);
  --sand: var(--foreground-muted);
  --sand-muted: var(--foreground-subtle);
  --leather: var(--muted);
  --leather-light: var(--muted-2);
  --saddle: var(--border);
  --rust: var(--primary);
  --rust-light: #2a2a2a;
  --rust-dark: #0a0a0a;

  /* Акценты тарифов (мягкие, на белом фоне) */
  --tier-standard: #3d5a73;
  --tier-standard-fill: rgba(61, 90, 115, 0.09);
  --tier-comfort: #b45309;
  --tier-comfort-fill: rgba(180, 83, 9, 0.1);
  --tier-unlimited: #6d28d9;
  --tier-unlimited-fill: rgba(109, 40, 217, 0.1);
  --tier-unlimited-gold: #ca8a04;

  /* Статус подписки */
  --status-ok: #16a34a;
  --status-bad: #dc2626;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--background) !important;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  background: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ── Фиксированная шапка ─────────────────────────────────────────────── */
.lk-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 14px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.lk-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.lk-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.lk-brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.lk-brand-text .pro {
  color: var(--primary);
  font-weight: 700;
}

/* ── Декоративный mesh: на весь экран, за контентом (равномерно по ширине) ─ */
.lk-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.lk-bg .lk-mesh-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  display: block;
  /* Лёгкая общая видимость; без «косой карточки» в углу */
  opacity: 0.62;
}

.lk-mesh-label {
  position: absolute;
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--foreground-subtle);
  opacity: 0.55;
  z-index: 1;
  white-space: nowrap;
}

/* Пунктирные линии — разные длительности / reverse, чтобы не «плясали» синхронно */
.mesh-line-a { animation: meshDashA 22s linear infinite; }
.mesh-line-b { animation: meshDashB 18s linear infinite reverse; }
.mesh-line-c { animation: meshDashC 25s linear infinite; }
.mesh-line-d { animation: meshDashD 20s linear infinite reverse; }
.mesh-line-e { animation: meshDashE 27s linear infinite; }
.mesh-line-f { animation: meshDashF 24s linear infinite reverse; }
.mesh-line-g { animation: meshDashG 19s linear infinite; }

@keyframes meshDashA { to { stroke-dashoffset: -240; } }
@keyframes meshDashB { to { stroke-dashoffset: -180; } }
@keyframes meshDashC { to { stroke-dashoffset: -220; } }
@keyframes meshDashD { to { stroke-dashoffset: -280; } }
@keyframes meshDashE { to { stroke-dashoffset: -200; } }
@keyframes meshDashF { to { stroke-dashoffset: -260; } }
@keyframes meshDashG { to { stroke-dashoffset: -210; } }

.mesh-pulse {
  animation: meshPulseSoft 3s ease-in-out infinite;
}

@keyframes meshPulseSoft {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  .mesh-line-a, .mesh-line-b, .mesh-line-c, .mesh-line-d, .mesh-line-e,
  .mesh-line-f, .mesh-line-g {
    animation: none !important;
  }
  .mesh-pulse { animation: none !important; opacity: 0.45; }
}

/* ── Lite mode: мягкая оптимизация для слабых устройств/сети ─────────── */
.lite-mode .lk-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(255, 255, 255, 0.96);
}
.lite-mode .lk-bg .lk-mesh-svg {
  opacity: 0.38;
}
.lite-mode .mesh-line-a,
.lite-mode .mesh-line-b,
.lite-mode .mesh-line-c,
.lite-mode .mesh-line-d,
.lite-mode .mesh-line-e,
.lite-mode .mesh-line-f,
.lite-mode .mesh-line-g,
.lite-mode .mesh-pulse {
  animation: none !important;
}
.lite-mode .mesh-pulse {
  opacity: 0.28 !important;
}
.lite-mode .card,
.lite-mode .kv,
.lite-mode .kv-row,
.lite-mode .tier-card,
.lite-mode .duration-picker,
.lite-mode .btn-row,
.lite-mode .progress-wrap,
.lite-mode .hint,
.lite-mode .tier-badge--hot,
.lite-mode .progress-bar::after {
  animation: none !important;
}
.lite-mode .card,
.lite-mode .tier-card,
.lite-mode .btn,
.lite-mode .btn-pay-crypto {
  box-shadow: none !important;
}
.lite-mode .btn-pay-crypto:hover {
  filter: none;
}

/* Очень узкие экраны — чуть сильнее сетка, чтобы не казалось пустым по краям */
@media (max-width: 380px) {
  .lk-bg .lk-mesh-svg { opacity: 0.68; }
}

/* ── Layout ─────────────────────────────────────────────────────────── */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 24px) 16px 48px;
  min-height: 100vh;
}

h1 { font-family: var(--font-display); font-size: 1.35rem; margin: 0 0 16px; font-weight: 700; }
.row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }

/* ── Card ───────────────────────────────────────────────────────────── */
.card {
  position: relative;
  overflow: hidden;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  animation: cardSlideIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12), transparent);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
  flex-wrap: wrap;
}

.card-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 4vw, 1.2rem);
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

/* ── Tier badge (верхняя плашка тарифа в карточке подписки) ─────────── */
.sub-tier-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--background);
}

.sub-tier-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.02) 50%, transparent 100%);
  pointer-events: none;
}

.tier--standard {
  border-color: rgba(61, 90, 115, 0.28);
  background: var(--tier-standard-fill);
}
.tier--standard .sub-tier-stars {
  color: var(--tier-standard);
  opacity: 1;
  text-shadow: none;
}
.tier--standard .sub-tier-label {
  color: #2a4255;
}

.tier--comfort {
  border-color: rgba(180, 83, 9, 0.35);
  background: var(--tier-comfort-fill);
}
.tier--comfort .sub-tier-stars {
  color: var(--tier-comfort);
  opacity: 1;
}
.tier--comfort .sub-tier-label {
  color: #92400e;
}

.tier--unlimited {
  border-color: rgba(109, 40, 217, 0.35);
  background: var(--tier-unlimited-fill);
}
.tier--unlimited .sub-tier-stars {
  color: var(--tier-unlimited-gold);
  opacity: 1;
  filter: saturate(1.05);
}
.tier--unlimited .sub-tier-label {
  color: #5b21b6;
}
.tier--unlimited .sub-tier-crown {
  filter: none;
}

.sub-tier-stars { font-size: 12px; letter-spacing: 3px; }
.sub-tier-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  flex: 1;
  color: var(--foreground-muted);
}
.sub-tier-crown { font-size: 15px; margin-left: auto; opacity: 0.9; }

/* ── Status ─────────────────────────────────────────────────────────── */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: var(--background);
}

.status--active {
  color: #166534;
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.07);
}
.status--expired {
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.06);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status--active .status-dot {
  background: var(--status-ok);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  animation: pulse-dot-green 2s ease-in-out infinite;
}
.status--expired .status-dot {
  background: var(--status-bad);
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45);
  animation: pulse-dot-red 2.2s ease-in-out infinite;
}

@keyframes pulse-dot-green {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45);
  }
  50% {
    opacity: 0.92;
    transform: scale(1.12);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

@keyframes pulse-dot-red {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .status--active .status-dot,
  .status--expired .status-dot {
    animation: none !important;
    box-shadow: none !important;
  }
}

/* ── KV rows ────────────────────────────────────────────────────────── */
.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  animation: kvSlideIn 0.45s ease both 0.08s;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  transform: translateX(-6px);
  opacity: 0;
  animation: rowSlideIn 0.38s ease both;
}

.kv-row:nth-child(1) { animation-delay: 0.12s; }
.kv-row:nth-child(2) { animation-delay: 0.16s; }
.kv-row:nth-child(3) { animation-delay: 0.2s; }
.kv-row:nth-child(4) { animation-delay: 0.24s; }
.kv-row:nth-child(5) { animation-delay: 0.28s; }
.kv-row:nth-child(6) { animation-delay: 0.32s; }

.kv-label {
  color: var(--foreground-muted);
  font-size: 12px;
  font-weight: 500;
}
.kv-value {
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}
.kv-row a {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}
.kv-row a:hover { opacity: 0.75; }

/* Всегда показываем инфо-блок подписки на главной карточке */
.sub-kv {
  display: grid !important;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}
.sub-kv .kv-row,
.sub-kv .sub-kv-row {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
button { cursor: pointer; font-family: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.12s, box-shadow 0.2s;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:active:not([disabled]) { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.btn-primary:hover:not([disabled]) {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

.btn-pay {
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 15px;
  font-weight: 700;
  border: 1px solid var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.btn-pay:hover:not([disabled]) {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

.btn-danger {
  background: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.btn-danger:hover:not([disabled]) {
  background: #1a1a1a;
}

.btn-secondary {
  background: var(--muted-2);
  color: var(--foreground);
  border-color: var(--border);
}
.btn-secondary:hover:not([disabled]) {
  background: var(--muted);
  border-color: var(--border-strong);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}
.btn-outline:hover:not([disabled]) {
  border-color: var(--border-strong);
  background: rgba(0, 0, 0, 0.03);
}

.btn-lg { padding: 12px 18px; font-size: 15px; border-radius: 11px; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; font-weight: 600; }

.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  animation: btnRowSlideIn 0.45s ease both 0.35s;
}

/* Одна кнопка на всю ширину карточки (Устройства / Поддержка / Настройки) */
.btn-row--stack {
  flex-direction: column;
  align-items: stretch;
}
.btn-row--stack .btn {
  width: 100%;
  justify-content: center;
}

/* Выйти — в том же ряду, чуть отличимая обводка */
.btn-logout {
  border-color: rgba(220, 38, 38, 0.35) !important;
  color: #991b1b !important;
}
.btn-logout:hover:not([disabled]) {
  border-color: rgba(220, 38, 38, 0.55) !important;
  background: rgba(220, 38, 38, 0.06) !important;
}

/* ── Переключатель клиента Happ / Incy ─────────────────────────────── */
.client-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--muted, #f1f1f2);
  border-radius: 12px;
}
.client-seg-btn {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--foreground-muted, #71717a);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.client-seg-btn.active {
  background: var(--background, #fff);
  color: var(--foreground, #0a0a0a);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ── Блок «Сайт определил устройство» ──────────────────────────────── */
.device-detect {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  margin: 6px 0 14px;
  background: var(--muted, #f4f4f5);
  border: 1px solid var(--border, rgba(0,0,0,.08));
  border-radius: 14px;
}
.device-detect-ic { font-size: 22px; line-height: 1.2; flex-shrink: 0; }
.device-detect-txt { font-size: 14px; line-height: 1.5; color: var(--foreground, #0a0a0a); }
.device-detect-txt b { font-weight: 700; }

/* ── Карточка Happ (рекомендуем) ───────────────────────────────────── */
.happ-card {
  padding: 16px;
  border: 1.5px solid var(--border-strong, rgba(0,0,0,.16));
  border-radius: 16px;
  background: var(--muted-2, #fafafa);
}
.happ-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.happ-card-ic { width: 52px; height: 52px; border-radius: 13px; object-fit: cover; flex-shrink: 0; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.happ-card-title { font-size: 19px; font-weight: 800; font-family: var(--font-display, system-ui); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.happ-rec {
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #2dd4bf, #06b6d4); color: #04323a;
  text-transform: uppercase;
}
.happ-card-sub { font-size: 13px; color: var(--foreground-muted, #71717a); margin-top: 2px; }

/* ── Мастер «Подключение VPN» (2 шага) ─────────────────────────────── */
.connect-wizard .connect-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 18px;
}
.connect-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border);
  color: var(--foreground-muted);
  background: var(--background);
}
.connect-step--on {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.connect-step-line {
  width: 40px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
}
.connect-lead {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--foreground);
  margin: 0 0 10px;
  line-height: 1.35;
}
.connect-platform {
  font-size: 13px;
  color: var(--foreground-muted);
  margin: 0 0 14px;
  line-height: 1.4;
}
.connect-hint {
  font-size: 13px;
  color: var(--foreground-muted);
  margin: 16px 0 0;
  line-height: 1.45;
}
.connect-download-block {
  margin-top: 4px;
}
.connect-dl-alt {
  margin-top: 12px;
  text-align: center;
}
.connect-dl-alt a {
  font-size: 13px;
  color: var(--foreground-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.connect-dl-alt a:hover {
  color: var(--foreground);
}
.connect-tg-foot {
  margin-top: 16px;
  font-size: 12px;
}

/* ── Inputs ─────────────────────────────────────────────────────────── */
input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 15px;
}
input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.mono {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  overflow: auto;
  color: var(--foreground);
  font-size: 13px;
}

.muted {
  color: var(--foreground-muted);
  font-size: 12px;
}
.subtle { color: var(--foreground-muted); opacity: 1; }

/* ── Plan / promo blocks ───────────────────────────────────────────── */
.plan-block { margin-top: 16px; }
.plan-block-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--foreground-muted);
  margin-bottom: 8px;
  font-weight: 700;
  font-family: var(--font-display);
}
.plan-row { display: flex; flex-wrap: wrap; gap: 8px; }

.btn-plan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 140px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  border: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}
.btn-plan:hover { border-color: var(--border-strong); background: var(--muted); }

.btn-plan .plan-label { font-size: 14px; font-weight: 700; }
.btn-plan .plan-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-plan .plan-price-old {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.55;
  text-decoration: line-through;
}
.btn-plan .plan-price-new { font-size: 12px; font-weight: 800; }
.btn-plan .plan-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--muted-2);
  border: 1px solid var(--border);
  color: var(--foreground-muted);
}
.btn-plan[aria-disabled='true'] { opacity: 0.5; pointer-events: none; }
.plan-actions { width: 100%; display: flex; gap: 10px; margin-top: 10px; }
.plan-actions .btn { flex: 1 1 0; justify-content: center; }

.pay-helper {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--muted);
  border: 1px solid var(--border);
}
.pay-helper-text {
  color: var(--foreground-muted);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.promo-block {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--muted);
  border: 1px solid var(--border);
}
.promo-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--foreground-muted);
  margin-bottom: 8px;
  font-weight: 700;
  font-family: var(--font-display);
}
.promo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.promo-input {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  outline: none;
  font-family: inherit;
}
.promo-input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* ── Progress ───────────────────────────────────────────────────────── */
.progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--muted-2);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: progressSlideIn 0.35s ease both 0.25s;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--foreground);
  opacity: 0.88;
  transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
  animation: shimmer 2.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar::after { animation: none; }
}

.hint {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
  color: var(--foreground-muted);
  animation: hintSlideIn 0.45s ease both 0.06s;
  font-size: 13px;
}
.step-title { font-weight: 700; color: var(--foreground); letter-spacing: 0.01em; }
.step-title .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: 800;
  margin-right: 8px;
}
.progress.infinite .progress-bar {
  width: 32%;
  animation: progress-anim 1.8s ease-in-out infinite;
}

/* ── Flags ──────────────────────────────────────────────────────────── */
.flag { font-size: 16px; margin-right: 6px; }
.flag-icon {
  display: inline-block;
  width: 22px;
  height: 16px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.flag-icon--ru {
  background: linear-gradient(to bottom, #ffffff 0 33.33%, #0039a6 33.33% 66.66%, #d52b1e 66.66% 100%);
}
.flag-icon--us {
  background:
    linear-gradient(#3c3b6e, #3c3b6e) left top / 45% 55% no-repeat,
    repeating-linear-gradient(to bottom, #b22234 0 10%, #ffffff 10% 20%);
}

#flow { opacity: 0; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.35s ease; }
#flow.show { opacity: 1; transform: none; }
#flow .kv { transform: translateY(6px); opacity: 0; transition: all 0.28s ease; }
#flow.show .kv { transform: none; opacity: 1; transition-delay: 0.08s; }
#flow .btn-row { transform: translateY(6px); opacity: 0; transition: all 0.28s ease; }
#flow.show .btn-row { transform: none; opacity: 1; transition-delay: 0.15s; }

/* ═══ Tier cards (оплата) ═════════════════════════════════════════════ */
@keyframes tierCardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes pickerSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes badgeShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.tier-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.tier-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  position: relative;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  animation: tierCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tier-card:nth-child(1) { animation-delay: 0.04s; }
.tier-card:nth-child(2) { animation-delay: 0.1s; }
.tier-card:nth-child(3) { animation-delay: 0.16s; }

.tier-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
  z-index: 1;
}

.tier-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.tier-card.tier-comfort {
  border-color: var(--border-strong);
  background: var(--muted);
}
.tier-card.tier-unlimited {
  border: 1.5px solid #ff7a3d;
  background: linear-gradient(180deg, rgba(255, 122, 61, 0.06) 0%, var(--muted-2) 60%);
  box-shadow: 0 6px 24px rgba(255, 77, 141, 0.10);
}
.tier-card.tier-unlimited.selected {
  border-color: #ff4d8d;
  box-shadow: 0 0 0 1px rgba(255, 77, 141, 0.25), 0 8px 28px rgba(255, 77, 141, 0.18);
}

.tier-card.selected {
  border-color: var(--foreground);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.tier-card-header {
  padding: 14px 16px 12px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.tier-card-header:active { background: rgba(0, 0, 0, 0.02); }

.tier-card-header::after {
  content: '›';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-size: 20px;
  line-height: 1;
  color: var(--foreground-subtle);
  transition: transform 0.2s ease, color 0.2s ease;
}
.tier-card.selected .tier-card-header::after {
  transform: translateY(-50%) rotate(-90deg);
  color: var(--foreground);
}

.tier-card .tier-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 0;
  font-family: var(--font-display);
  background: var(--muted-2);
  color: var(--foreground-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.tier-badge-sep {
  display: inline-block;
  margin: 0 7px;
  opacity: 0.55;
  font-weight: 400;
}

/* "Горячая" плашка — насыщенный градиент, видна сразу */
.tier-badge--hot {
  background: linear-gradient(135deg, #ff4d8d 0%, #ff7a3d 55%, #ffb347 100%);
  background-size: 200% 100%;
  color: #fff;
  border: none;
  box-shadow: 0 2px 12px rgba(255, 77, 141, 0.35);
  animation: badgeShimmer 3s linear infinite;
}
.tier-badge--hot .tier-badge-sep { opacity: 0.7; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .tier-badge--hot { animation: none; }
}

.tier-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding-right: 22px;
}
.tier-name {
  font-family: var(--font-display);
  font-size: clamp(15px, 4.5vw, 17px);
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.02em;
}
.tier-price-month {
  font-size: clamp(15px, 4.5vw, 17px);
  font-weight: 800;
  color: var(--foreground);
  white-space: nowrap;
}
.tier-price-per { font-size: 12px; font-weight: 600; color: var(--foreground-muted); }

.tier-meta { display: flex; gap: 7px; margin: 8px 0; flex-wrap: wrap; }
.tier-devices,
.tier-traffic {
  font-size: 11px;
  font-weight: 600;
  color: var(--foreground-muted);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 3px 9px;
  white-space: nowrap;
}

.tier-features { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 4px; }
.tier-features li {
  font-size: 12.5px;
  color: var(--foreground-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.45;
}
.tier-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--foreground);
  font-weight: 800;
  font-size: 11px;
  top: 1px;
  opacity: 0.75;
}

.tier-desc {
  font-size: 12px;
  color: var(--foreground-muted);
  margin-top: 8px;
  line-height: 1.5;
  padding-right: 18px;
}

.duration-picker {
  padding: 14px 16px 16px;
  background: var(--muted);
  border-top: 1px solid var(--border);
  animation: pickerSlideDown 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dur-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.dur-btn {
  padding: 10px 5px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.14s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: visible;
  font-family: inherit;
}
.dur-btn:hover { background: var(--muted-2); border-color: var(--border-strong); }
.dur-btn:active { transform: scale(0.96); }
.dur-btn.selected {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.dur-label { font-size: 12px; font-weight: 800; }
.dur-discount {
  font-size: 10px;
  font-weight: 800;
  color: var(--foreground-subtle);
  letter-spacing: 0.02em;
}
.dur-btn.selected .dur-discount { color: rgba(250, 250, 250, 0.85); }
.dur-price { font-size: 10.5px; color: var(--foreground-subtle); font-weight: 600; }
.dur-btn.selected .dur-price { color: rgba(250, 250, 250, 0.75); }

.price-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.price-total {
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 800;
  color: var(--foreground);
  letter-spacing: -0.03em;
}
.savings-badge {
  background: var(--muted-2);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
}
.promo-applied-badge {
  background: var(--muted);
  color: var(--foreground-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
}
.bonus-badge {
  background: linear-gradient(90deg, #f97316, #dc2626);
  color: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}
.dur-btn.has-bonus { padding-top: 18px; }
.dur-x2 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 4px;
  border-top-left-radius: 9px;
  border-top-right-radius: 9px;
  background: linear-gradient(90deg, #f97316, #dc2626);
  color: #fff;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.3;
}
.dur-bonus {
  font-size: 10px;
  font-weight: 800;
  color: #b45309;
  letter-spacing: 0.01em;
}
.dur-btn.selected .dur-bonus { color: #fed7aa; }

.pay-actions { display: flex; gap: 10px; margin-top: 13px; flex-wrap: wrap; }
.pay-actions--ru .btn-pay-sbp,
.pay-actions--ru .btn-pay-card,
.pay-actions--ru .btn-pay-crypto { flex: 1 1 calc(33.333% - 7px); min-width: min(100%, 140px); }
.pay-actions--en { justify-content: stretch; }
.pay-actions--en .btn-pay-crypto { flex: 1; width: 100%; }

.btn-pay-sbp {
  flex: 1;
  border: none;
  border-radius: var(--radius);
  padding: 13px 16px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, transform 0.12s;
  font-family: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.btn-pay-sbp:hover { background: #1a1a1a; }
.btn-pay-sbp:active { transform: scale(0.98); }

.btn-pay-card {
  flex: 1;
  background: transparent;
  color: var(--foreground);
  font-weight: 800;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
}
.btn-pay-card:hover {
  border-color: var(--border-strong);
  background: var(--muted);
}

.btn-pay-crypto {
  flex: 1;
  border: none;
  border-radius: var(--radius);
  padding: 13px 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 55%, #b45309 100%);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: filter 0.2s, transform 0.12s;
  font-family: inherit;
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.35);
}
.btn-pay-crypto:hover { filter: brightness(1.06); }
.btn-pay-crypto:active { transform: scale(0.98); }

.promo-section { margin-top: 14px; }
.promo-section--inline { margin-top: 10px; margin-bottom: 4px; }
.promo-section--inline .promo-toggle-link {
  font-weight: 500;
  color: var(--foreground);
  padding: 4px 0;
}
.promo-section--inline .promo-toggle-link:hover { color: var(--accent, var(--foreground)); }
.promo-toggle-link {
  background: none;
  border: none;
  color: var(--foreground-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
.promo-toggle-link:hover { color: var(--foreground); }
.promo-open-block {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  animation: pickerSlideDown 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Connect page: separate hint island ─────────────────────────────── */
.connect-extra-island {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--background);
}
.connect-extra-btn {
  width: 100%;
  justify-content: center;
  font-weight: 700;
}
.connect-extra-box {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--muted);
}

/* ── Devices ────────────────────────────────────────────────────────── */
.device-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.device-icon { font-size: 22px; flex-shrink: 0; }
.device-info { flex: 1; min-width: 0; }
.device-model {
  color: var(--foreground);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-meta { color: var(--foreground-muted); font-size: 12px; margin-top: 2px; }

/* ── Profile ───────────────────────────────────────────────────────── */
/* ── Реферальная страница: «Как работает» + FAQ ──────────────────── */
.ref-howto {
  margin-top: 14px;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(255, 122, 61, 0.08) 0%, rgba(255, 122, 61, 0.02) 100%);
  border: 1px solid rgba(255, 122, 61, 0.22);
  border-radius: 14px;
}
.ref-howto-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--foreground);
  font-family: var(--font-display);
}
.ref-howto-list {
  margin: 0;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--foreground);
}
.ref-howto-list li {
  margin-bottom: 6px;
}
.ref-howto-list li:last-child { margin-bottom: 0; }
.ref-howto-list b { font-weight: 700; }

.ref-faq {
  margin-top: 10px;
  padding: 0;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.ref-faq > summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  list-style: none;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s;
}
.ref-faq > summary:hover { background: rgba(0,0,0,0.025); }
.ref-faq > summary::-webkit-details-marker { display: none; }
.ref-faq > summary::after {
  content: '›';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-size: 18px;
  line-height: 1;
  color: var(--foreground-subtle);
  transition: transform 0.2s ease;
}
.ref-faq[open] > summary::after { transform: translateY(-50%) rotate(-90deg); }
.ref-faq[open] > summary { border-bottom: 1px solid var(--border); }
.ref-faq-list {
  margin: 0;
  padding: 12px 16px 14px 32px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--foreground-muted);
}
.ref-faq-list li { margin-bottom: 6px; }
.ref-faq-list li:last-child { margin-bottom: 0; }
.ref-faq-list b { color: var(--foreground); font-weight: 600; }

.profile-section { padding: 14px 0 10px; }
.profile-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--foreground-muted);
  margin-bottom: 8px;
  font-family: var(--font-display);
}
.profile-section-desc {
  font-size: 13px;
  color: var(--foreground-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}
.profile-field { margin-bottom: 10px; }
.profile-field input {
  width: 100%;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--foreground);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.profile-field input:focus { border-color: var(--border-strong); }
.profile-field input::placeholder { color: var(--foreground-subtle); }
.profile-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.profile-msg {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.4;
  border: 1px solid var(--border);
}

/* ── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 420px) {
  .wrap { padding-left: 14px; padding-right: 14px; }
  .btn-row { gap: 10px; }
  .plan-row { flex-direction: column; gap: 10px; }
  .btn-plan { min-width: 100%; width: 100%; }
  .plan-actions { gap: 12px; }
  .promo-row { gap: 10px; }
  .promo-input { min-width: 100%; width: 100%; }
  #btn-promo-apply, #btn-promo-clear { flex: 1 1 auto; min-height: 40px; }
}
@media (max-width: 380px) {
  .tier-card-header { padding: 13px 13px 11px; }
  .tier-card-header::after { right: 10px; }
  .tier-name-row { padding-right: 18px; }
  .dur-row { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .dur-btn { padding: 11px 6px; }
  .dur-label { font-size: 13px; }
  .pay-actions { flex-direction: column; }
  .btn-pay-card, .btn-pay-sbp, .btn-pay-crypto { width: 100%; flex: none !important; min-width: 0 !important; }
}
@media (max-width: 320px) {
  .wrap { padding-left: 10px; padding-right: 10px; }
  .duration-picker { padding: 12px 12px 14px; }
}
@media (min-width: 480px) {
  .dur-row { gap: 10px; }
  .dur-btn { padding: 12px 8px; }
  .tier-features li { font-size: 13px; }
}

/* ── Keyframes (сохранены имена для overlay в app.js) ───────────────── */
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes kvSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes rowSlideIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: none; }
}
@keyframes btnRowSlideIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
@keyframes progressSlideIn {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: none; }
}
@keyframes hintSlideIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes progress-anim {
  0% { transform: translateX(-50%); }
  50% { transform: translateX(20%); }
  100% { transform: translateX(120%); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes pulse-rust {
  0% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2); }
  70% { box-shadow: 0 0 0 8px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}
@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.15); }
  70% { box-shadow: 0 0 0 8px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}
@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ── Tier switch hint ─────────────────────────────────────────────────── */
.digital-service-note {
  font-size: 12px;
  color: var(--foreground-muted);
  text-align: center;
  margin: 10px 0 4px;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--muted-2);
}

.tier-switch-hint {
  font-size: 12px;
  color: var(--foreground-subtle);
  text-align: center;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--muted-2);
  line-height: 1.5;
}

/* ── Tier intro cards overlay ─────────────────────────────────────────── */
.tier-intro-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeInOverlay 0.2s ease both;
}
body.tier-intro-open {
  overflow: hidden;
}
.tier-intro-wrap {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  animation: cardSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tier-intro-wrap.comfort { border-top: 3px solid var(--tier-comfort); }
.tier-intro-wrap.unlimited { border-top: 3px solid var(--tier-unlimited); }
.tier-intro-wrap.standard { border-top: 3px solid var(--tier-standard); }
.tier-intro-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 10px;
}
.tier-intro-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.tier-intro-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.tier-intro-badges .tier-intro-badge {
  margin-bottom: 0;
}
.tier-intro-badge--extra {
  background: linear-gradient(135deg, #ff7a3d, #ff4d8d);
  color: #fff;
}
.tier-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 10px;
}
.tier-badge--extra {
  background: linear-gradient(135deg, #ff7a3d, #ff4d8d);
  color: #fff;
  border: none;
}
.tier-badge--promo {
  background: linear-gradient(90deg, #16a34a, #059669);
  color: #fff;
  border: none;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.3);
  animation: promoPulse 2.4s ease-in-out infinite;
  white-space: normal;
}
@media (max-width: 380px) {
  .tier-card .tier-badge { font-size: 9.5px; padding: 5px 9px; letter-spacing: 0.08em; }
  .tier-badge-sep { margin: 0 5px; }
}
@keyframes promoPulse {
  0%,100% { box-shadow: 0 2px 10px rgba(220, 38, 38, 0.3); transform: translateY(0); }
  50%     { box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5); transform: translateY(-1px); }
}
.tier-intro-wrap.comfort .tier-intro-badge { background: var(--tier-comfort-fill); color: var(--tier-comfort); }
.tier-intro-wrap.unlimited .tier-intro-badge { background: var(--tier-unlimited-fill); color: var(--tier-unlimited); }
.tier-intro-wrap.standard .tier-intro-badge { background: var(--tier-standard-fill); color: var(--tier-standard); }
.tier-intro-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--foreground);
  margin-bottom: 6px;
}
.tier-intro-desc {
  font-size: 14px;
  color: var(--foreground-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.tier-intro-features {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tier-intro-features li {
  font-size: 13px;
  color: var(--foreground-muted);
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.tier-intro-features li::before {
  content: '✓';
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}
.tier-intro-wrap.comfort .tier-intro-features li::before { color: var(--tier-comfort); }
.tier-intro-wrap.unlimited .tier-intro-features li::before { color: var(--tier-unlimited); }
.tier-intro-wrap.standard .tier-intro-features li::before { color: var(--tier-standard); }
.tier-intro-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tier-intro-dots {
  display: flex;
  gap: 5px;
}
.tier-intro-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.2s, transform 0.2s;
}
.tier-intro-dot.active {
  transform: scale(1.25);
}
.tier-intro-wrap.comfort .tier-intro-dot.active { background: var(--tier-comfort); }
.tier-intro-wrap.unlimited .tier-intro-dot.active { background: var(--tier-unlimited); }
.tier-intro-wrap.standard .tier-intro-dot.active { background: var(--tier-standard); }
.tier-intro-btn {
  flex: 1;
  max-width: 140px;
}

/* ── Поддержка-чат ─────────────────────────────────────────────── */
.chat-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
  max-height: 58vh;
  overflow-y: auto;
  padding: 16px 4px 8px;
  margin-top: 8px;
}
.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--foreground-subtle);
  font-size: 14px;
  line-height: 1.5;
  padding: 24px 12px;
}
.chat-empty .chat-empty-ico { font-size: 30px; display: block; margin-bottom: 8px; }
.chat-msg {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg .chat-time { display: block; font-size: 10px; margin-top: 4px; opacity: 0.55; }
.chat-msg--user {
  align-self: flex-end;
  background: var(--primary);
  color: var(--primary-foreground);
  border-bottom-right-radius: 5px;
}
.chat-msg--staff {
  align-self: flex-start;
  background: var(--muted-2);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}
.chat-msg--sys {
  align-self: center;
  max-width: 90%;
  background: none;
  color: var(--foreground-subtle);
  font-size: 12px;
  text-align: center;
}
.chat-input-row { display: flex; gap: 8px; margin-top: 12px; }
.chat-input {
  flex: 1;
  font: inherit;
  font-size: 15px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--background);
  color: var(--foreground);
  outline: none;
}
.chat-input:focus { border-color: var(--foreground); }
.chat-send { min-width: 52px; border-radius: 12px; padding: 11px 14px; }
.chat-hint { text-align: center; margin-top: 10px; font-size: 12px; color: var(--foreground-subtle); }
