:root {
  /* Premium 2026: тихая палитра, без дефолтного iOS-синего и неона */
  --bg-main: #0b0d12;
  --bg-secondary: #0f1218;
  --bg-elevated: #12151c;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.06);
  --text-primary: #e6eaf2;
  --text-secondary: rgba(230, 234, 242, 0.6);
  --text-muted: rgba(230, 234, 242, 0.4);
  --accent: #7c8cff;
  --accent-soft: #9fa8ff;
  --accent-dark: #5c6cff;
  --green: #3ddc97;
  --red: #ff5a6b;
  --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.4);
  /* Совместимость с существующими селекторами */
  --app-text: var(--text-primary);
  --muted: var(--text-muted);
  --card: var(--glass-bg);
  --danger: var(--red);
  --shadow: var(--shadow-soft);
  --radius-lg: 18px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* Подчёркнутое замедление в конце — как в Material / iOS для перемещения индикатора */
  --ease-tab-pill: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-tab-pill: 0.38s;
  --dur-overlay: 0.24s;
  --dur-sheet: 0.34s;
}
*,
*::before,
*::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.35;
  background: var(--bg-main);
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(90px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  -webkit-font-smoothing: antialiased;
}
.wave-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
  mix-blend-mode: screen;
  overflow: hidden;
}
.wave-bg svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
}
/* Фоновые полоски: лёгкий дрейф */
.wave-bg svg .wave-lines {
  transform-origin: 600px 400px;
  animation: waveDrift 32s ease-in-out infinite;
  will-change: transform;
}
@keyframes waveDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(-4%, 18px, 0) scale(1.015); }
  66% { transform: translate3d(3%, -10px, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .wave-bg svg .wave-lines {
    animation: none;
  }
}
.app {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
}
.appShell, .bootSkeleton, .deviceList, .faqList { display: grid; gap: 18px; }
.screen { display: grid; gap: 18px; }
/* Главная: больше воздуха между балансом, рефералкой и FAQ */
#screen-home.screen {
  gap: 28px;
  padding-bottom: 6px;
}
.profileCard {
  display: flex;
  flex-direction: column;
  min-height: min(72vh, 620px);
  gap: 12px;
}
.statsGrid { display: grid; gap: 8px; flex: 1; align-content: start; }
.statsHint { margin: 8px 0 0; font-size: 13px; }
.statRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 14px;
}
.statRowMain {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.statIcon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(124, 140, 255, 0.12);
  display: grid;
  place-items: center;
  color: var(--accent-soft);
}
.statIconSvg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.statLabel { color: var(--text-secondary); flex: 1; min-width: 0; line-height: 1.3; }
.statValue {
  font-weight: 700;
  text-align: right;
  flex-shrink: 0;
  min-width: 4.5rem;
  min-height: 1.15em;
}
.statValue[aria-busy="true"] {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.statValueSkeleton {
  display: inline-block;
  height: 13px;
  width: 68px;
  max-width: 100%;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  background-size: 220% 100%;
  animation: shimmer 1.2s infinite;
}
.statValueSkeleton--wide {
  width: 88px;
}
.profileStatsHint:empty {
  display: none;
}
.profileSupportFoot { margin-top: auto; padding-top: 8px; }
.profileSupportBtn {
  width: 100%;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--text-primary) !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
.historySheet .sheetHead { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
.historySheetActions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.historyModalScroll { max-height: min(52vh, 440px); }
.hidden { display: none !important; }

@keyframes appShellIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.appShell.appShell--enter {
  animation: appShellIn 0.4s var(--ease-out) both;
}

@keyframes tabBarIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.tabBar.tabBar--enter {
  animation: tabBarIn 0.35s var(--ease-out) both;
}

.topBar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.appLogoHeading {
  margin: 0;
  line-height: 0;
  flex: 1;
  min-width: 0;
}
.appLogo {
  display: block;
  height: clamp(46px, 13vw, 60px);
  width: auto;
  max-width: min(300px, 72vw);
  object-fit: contain;
  object-position: left center;
}
.iconBtn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease;
}
.iconBtn:active {
  transform: scale(0.94);
}
.iconBtn.iconBtn--busy {
  animation: iconBtnSpin 0.85s linear infinite;
  opacity: 0.88;
  pointer-events: none;
}
@keyframes iconBtnSpin {
  to {
    transform: rotate(360deg);
  }
}
.card {
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  padding: 14px;
}
.label { margin: 0; color: var(--text-secondary); font-size: 14px; }
.muted { margin: 0; color: var(--text-secondary); font-size: 14px; }
.rowBetween { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.amount { margin: 10px 0 8px; font-size: 52px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.amountDanger { color: var(--danger); }
.tgStar { font-size: 26px; vertical-align: -2px; }
.trustText { margin: 10px 0 0; color: var(--text-secondary); font-size: 14px; }
.inviteCard h3 { margin: 8px 0; font-size: 34px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.inviteLight { opacity: 0.95; padding-top: 16px; padding-bottom: 16px; }
.inviteLight h3 { font-size: 30px; }

/* Рефералка: шапка с иллюстрацией + текстовый блок */
.referralCard {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.refHero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-height: 0;
  width: 100%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  background: linear-gradient(
    168deg,
    rgba(124, 140, 255, 0.14) 0%,
    rgba(18, 21, 28, 0.55) 42%,
    rgba(124, 140, 255, 0.06) 100%
  );
  border-bottom: none;
}
.refHero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 75% 65% at 50% 92%, rgba(124, 140, 255, 0.1), transparent 52%);
  pointer-events: none;
}
.refHeroInner {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 0;
}
.refHeroArt {
  width: 100%;
  height: auto;
  display: block;
}
.refBody {
  padding: 16px 14px 17px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--glass-border);
}
.refEyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.referralCard .refBody h3 {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.refDesc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.referralCard .refActions { margin-top: 0; }
.textBtn { border: none; background: none; color: var(--text-muted); font-size: 14px; }
.deviceNewHeading { margin: 0 0 8px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
/* Экран «Устройства» */
.screenDevices { position: relative; }
.devicesSection {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.devicesScreenTitle {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.15;
  color: var(--text-primary);
}
.devicesStateText {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.deviceList { overflow: visible; }
.deviceList--premium {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.screenDevices .deviceCard.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  margin: 0;
  border-radius: 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: visible;
}
.deviceCardHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 36px;
}
.deviceCardStatus {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.deviceCardMeta {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deviceCardName {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deviceStatusDot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.deviceStatusDot--online {
  background: var(--green);
  box-shadow: none;
}
.deviceStatusDot--offline {
  background: var(--red);
  opacity: 0.85;
  box-shadow: none;
}
.screenDevices .deviceCardPrimary.btnShowConfig {
  width: 100%;
  max-width: none;
  height: 44px;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.screenDevices .deviceCardPrimary.btnShowConfig:active {
  transform: scale(0.98);
  opacity: 0.92;
}
.fabAddDevice--premium {
  position: fixed;
  right: max(20px, calc(12px + env(safe-area-inset-right)));
  bottom: calc(90px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 20px rgba(124, 140, 255, 0.25);
  display: grid;
  place-items: center;
  z-index: 45;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s var(--ease-out), opacity 0.2s ease;
}
.fabAddDevice--premium:active {
  transform: scale(0.94);
  opacity: 0.9;
}
.fabAddDevice--premium svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}
.deviceMenuWrap {
  flex-shrink: 0;
  position: relative;
}
.deviceMenuBtn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.deviceMenuBtn:active {
  opacity: 0.7;
}
.deviceMenuBtn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.deviceMenuBtn[aria-expanded="true"] {
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.08);
}
.deviceMenu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(15, 18, 24, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  z-index: 55;
  display: grid;
  gap: 2px;
  transform-origin: top right;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.2s var(--ease-out),
    transform 0.2s var(--ease-out),
    visibility 0.2s;
}
.deviceMenu.deviceMenu--open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
}
.deviceMenuItem {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
}
.deviceMenuItem:hover,
.deviceMenuItem:focus {
  background: rgba(255, 255, 255, 0.06);
}
.deviceMenuItem:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.deviceMenuItem--danger {
  color: rgba(255, 186, 196, 0.95);
}
@media (max-width: 380px) {
  .screenDevices .deviceCardPrimary.btnShowConfig .cfgLabelFull {
    display: none;
  }
  .screenDevices .deviceCardPrimary.btnShowConfig .cfgLabelShort {
    display: inline;
  }
  .screenDevices .deviceCardPrimary.btnShowConfig {
    font-size: 14px;
    padding: 0 14px;
  }
}
@media (min-width: 381px) {
  .screenDevices .deviceCardPrimary.btnShowConfig .cfgLabelShort {
    display: none;
  }
}
.deviceCreatePanel {
  text-align: center;
  max-width: 300px;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--glass-border);
}
.deviceCreateTitle {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}
.deviceCreateSub {
  margin: 0;
  font-size: 14px;
}
.deviceCreateRings {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
}
.deviceCreateRings::before,
.deviceCreateRings::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(124, 140, 255, 0.35);
  animation: deviceRingPulse 2s ease-out infinite;
}
.deviceCreateRings::after {
  animation-delay: 0.65s;
}
.deviceCreateCore {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-soft), var(--accent-dark));
  box-shadow: none;
  animation: deviceCoreGlow 1.4s ease-in-out infinite alternate;
}
@keyframes deviceRingPulse {
  0% {
    transform: scale(0.55);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}
@keyframes deviceCoreGlow {
  from {
    opacity: 0.85;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}
.addRow { margin-top: 8px; display: grid; grid-template-columns: 1fr; gap: 10px; }
.addRow input { min-width: 0; border-radius: var(--radius-sm); border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.05); color: var(--text-primary); font-size: 16px; padding: 14px; }
.addRow .ghostBtn { min-height: 54px; border-radius: var(--radius-sm); }
.btnSecondary, .btnDanger, .ghostBtn, .composerBtn, .blockBtn {
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.96);
  width: 100%;
  text-align: center;
}
.btnSecondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border);
  color: var(--text-primary);
}
.btnDanger { background: rgba(255, 90, 107, 0.2); color: rgba(255, 210, 216, 0.95); border-color: rgba(255, 90, 107, 0.25); }
.ghostBtn, .composerBtn, .blockBtn {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}
.ctaPrimary {
  min-height: 58px;
  border-radius: 14px;
  font-size: 17px;
  line-height: 1;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btnIcon { width: 18px; height: 18px; display: inline-flex; }
.btnIcon svg { width: 18px; height: 18px; fill: currentColor; }
.starsIcon { width: 16px; height: 16px; fill: var(--accent-soft); vertical-align: -2px; }
.starsIcon.lg { width: 22px; height: 22px; vertical-align: -4px; }
/* Крупная сумма на экране пополнения — звезда сопоставима с цифрами */
.starsIcon.topupHeroStar {
  width: 42px;
  height: 42px;
  vertical-align: middle;
  flex-shrink: 0;
}
.starsIcon--inline {
  width: 1em;
  height: 1em;
  min-width: 14px;
  min-height: 14px;
  max-width: 22px;
  max-height: 22px;
  vertical-align: -0.2em;
  margin-left: 2px;
  display: inline-block;
}
.starsIcon--btn {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.topupPayInner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.balanceStar { width: 28px; height: 28px; vertical-align: -3px; margin-right: 4px; }
/* Шапка пополнения: компактная звезда у «Баланс: …», не как на главной */
#topupHeaderBalance .balanceStar {
  width: 18px;
  height: 18px;
  vertical-align: -0.12em;
  margin-right: 3px;
}
.topupChoices {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.topupBtn {
  min-height: 48px;
  border-radius: 14px;
  font-size: 15px;
  padding: 8px 6px;
}
.refActions .topupBtn { min-height: 54px; }
/* Главная: баланс и кнопки без карточки (на фоне экрана) */
.homeBalance {
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}
/*
 * Шапка «Nova VPN» + отступ shell — вне #screen-home; зона баланса тянется так,
 * чтобы вместе с шапкой получилось ~40% высоты экрана.
 */
#screen-home .homeBalance {
  min-height: max(
    13.5rem,
    calc(
      40dvh - max(12px, env(safe-area-inset-top, 0px)) - 40px - 18px
    )
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.balanceCard { text-align: center; }
.balanceCard .rowBetween { text-align: left; margin-bottom: 6px; align-items: center; }
.balanceCard .textBtn { font-size: 13px; }
.balanceTitle { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.referralCard .ghostBtn { margin-top: 0; }
.refActions { margin-top: 14px; display: grid; grid-template-columns: 4fr 1fr; gap: 8px; align-items: stretch; }
.refActions .ghostBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 58px;
}
.iconOnlyBtn {
  display: grid;
  place-items: center;
  padding: 0;
  min-width: 64px;
  height: 58px;
  line-height: 1;
}
.iconOnlyBtn .btnIcon { width: 20px; height: 20px; }
.iconOnlyBtn .btnIcon svg { width: 20px; height: 20px; }
.homePrimaryActions { margin-top: 12px; display: grid; grid-template-columns: 4fr 1fr; gap: 8px; align-items: stretch; }
.ctaHistoryBtn { min-height: 58px; border-radius: 16px; padding: 0; display: grid; place-items: center; }
/* Пополнение: шапка на фоне экрана, без внешней «карточки» как на главной */
.screenTopup {
  gap: 18px;
}
.topupHeader {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
}
.screenTopup .topupHeader .rowBetween {
  align-items: baseline;
}
.topupTitle { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.topupBalanceMeta #topupHeaderBalance { font-weight: 800; color: var(--text-primary); }
.topupPanel {
  border-radius: 16px;
  padding: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: grid;
  gap: 10px;
}
.topupCurrent {
  margin: 0;
  font-size: 56px;
  font-weight: 800;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  line-height: 1;
}
.packageList { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.packageCard {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 12px 12px;
  text-align: left;
  background: var(--glass-bg);
  color: var(--text-primary);
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 148px;
}
.packageCard strong {
  font-size: 24px;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.packageCard small {
  color: var(--text-secondary);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.pkgRub { color: var(--text-secondary) !important; }
.packageCard em {
  color: var(--accent-soft);
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.pkgLabel {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  min-height: 2.5em;
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.packageCard.popular { border-color: rgba(124, 140, 255, 0.35); }
.packageCard.activePick { background: rgba(124, 140, 255, 0.14); border-color: rgba(124, 140, 255, 0.45); }
.customTopupRow { margin-top: 8px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.customTopupRow input {
  min-width: 0;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 15px;
  padding: 12px 14px;
}
.topupBottomBtn {
  margin-top: 28px;
}
.btnSpinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: rgba(230, 234, 242, 0.9);
  animation: spin 0.8s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
.deviceMenuItem .btnSpinner {
  width: 15px;
  height: 15px;
  border-width: 2px;
}
.screenDevices .deviceCardPrimary .btnSpinner {
  flex-shrink: 0;
}
.ctaPrimary.is-loading,
.ghostBtn.is-loading {
  opacity: 0.88;
  pointer-events: none;
}
.iconOnlyBtn.is-busy {
  opacity: 0.75;
  pointer-events: none;
}
.confirmBtns .blockBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.historyScroll { max-height: 40vh; overflow: auto; display: grid; gap: 8px; }
.txItem { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 12px; border-radius: 12px; background: var(--glass-bg); border: 1px solid var(--glass-border); font-size: 14px; }
.txItem.isPayment span:nth-child(2) { color: rgba(61, 220, 151, 0.95); font-weight: 600; }
.txItem.isDebit span:nth-child(2) { color: rgba(255, 186, 120, 0.95); font-weight: 600; }
.txMeta { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.faqCard {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faqHeading {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
}
.faqList {
  display: grid;
  gap: 10px;
}
.faqItem {
  width: 100%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  border-radius: 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  box-shadow: none;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.faqQRow {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.faqQuestion {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
  text-align: left;
  justify-self: start;
}
.faqChevron {
  flex-shrink: 0;
  justify-self: end;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  transition: background 0.28s var(--ease-out);
}
.faqChevron svg {
  width: 22px;
  height: 22px;
  fill: var(--text-secondary);
}
.faqItem.open .faqChevron {
  background: rgba(124, 140, 255, 0.18);
}
.faqItem.open .faqChevron svg {
  fill: var(--accent-soft);
}
/* Плавное раскрытие текста (grid 0fr → 1fr), без опоры на переворот иконки */
.faqAnswerWrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease-out);
}
.faqItem.open .faqAnswerWrap {
  grid-template-rows: 1fr;
}
.faqAnswer {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  padding: 0 16px 16px;
  margin: 0;
  min-height: 0;
  max-height: min(60vh, 360px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre-line;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease 0.06s, transform 0.36s var(--ease-out) 0.06s;
}
.faqItem.open .faqAnswer {
  opacity: 1;
  transform: translateY(0);
}
.tabBar {
  position: fixed;
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  background: rgba(10, 15, 30, 0.8);
  border-radius: 16px;
  padding: 6px;
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
}
.tabBarRail {
  position: relative;
}
.tabBarButtons {
  position: relative;
  z-index: 0;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.tabBarPill {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  border-radius: 11px;
  background: rgba(124, 140, 255, 0.14);
  box-shadow: none;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  will-change: transform, width, height;
  transition:
    transform var(--dur-tab-pill) var(--ease-tab-pill),
    width var(--dur-tab-pill) var(--ease-tab-pill),
    height var(--dur-tab-pill) var(--ease-tab-pill);
}
.tabBtn {
  position: relative;
  z-index: 1;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--text-muted);
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 0.16s ease, color var(--dur-tab-pill) var(--ease-tab-pill);
  -webkit-tap-highlight-color: transparent;
}
.tabBtn:active {
  transform: scale(0.94);
}
.tabIcon { width: 18px; height: 18px; display: inline-flex; transition: transform 0.28s var(--ease-out); }
.tabBtn.active .tabIcon {
  transform: scale(1.06);
}
.tabIcon svg { width: 18px; height: 18px; fill: currentColor; }
.tabBtn small { font-size: 11px; line-height: 1; }
.tabBtn.active {
  color: var(--accent);
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-overlay) ease, visibility var(--dur-overlay);
}
.overlay.overlay--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.overlay .sheet {
  transform: translateY(110%);
  transition: transform var(--dur-sheet) var(--ease-out);
  will-change: transform;
}
.overlay.overlay--open .sheet {
  transform: translateY(0);
}
.overlay.overlayCenter {
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.overlay.overlayCenter .deviceCreatePanel {
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  transition: opacity 0.26s ease, transform 0.32s var(--ease-out);
  will-change: transform, opacity;
}
.overlay.overlayCenter.overlay--open .deviceCreatePanel {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.sheet { width: 100%; max-width: 520px; background: var(--bg-elevated); border-radius: var(--radius-lg); border: 1px solid var(--glass-border); padding: 8px 16px 16px; box-shadow: var(--shadow-soft); }
.sheetSm { max-width: 360px; }
.sheetLg { max-width: 520px; }
.sheetGrab { width: 34px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); margin: 4px auto 12px; }
.sheetHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheetHead h3 { margin: 0; font-size: 18px; }
.linkBtn { border: none; background: none; color: var(--accent); font-size: 16px; font-weight: 600; }
.configPre { margin: 0 0 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; max-height: 34vh; overflow: auto; font-size: 11px; }
.qrBox { display: grid; place-items: center; margin-bottom: 10px; }
.qrBox img { border-radius: 12px; border: 4px solid rgba(230, 234, 242, 0.92); width: 220px; height: 220px; }
.blockBtn.ghost { background: rgba(255, 255, 255, 0.08); }
.blockBtn.danger { background: var(--red); }
.confirmBody { margin: 8px 0 0; color: var(--muted); }
.confirmBtns { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  max-width: calc(100vw - 28px);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(15, 18, 24, 0.92);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  z-index: 110;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 0.22s ease, transform 0.28s var(--ease-out), visibility 0.22s;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.toast.toast--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.skCard { background: var(--card); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.skLine { border-radius: 8px; height: 14px; margin-bottom: 10px; background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.2), rgba(255,255,255,.08)); background-size: 220% 100%; animation: shimmer 1.2s infinite; }
.w25 { width: 25%; } .w30 { width: 30%; } .w35 { width: 35%; } .w45 { width: 45%; } .w50 { width: 50%; } .w70 { width: 70%; } .w100 { width: 100%; }
.h30 { height: 30px; } .h40 { height: 40px; } .h46 { height: 46px; } .h48 { height: 48px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -120% 0; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-overlay: 0.01ms;
    --dur-sheet: 0.01ms;
  }
  .appShell.appShell--enter,
  .tabBar.tabBar--enter {
    animation: none !important;
  }
  .overlay,
  .overlay .sheet,
  .overlay.overlayCenter .deviceCreatePanel,
  .deviceMenu,
  .tabBtn,
  .tabBtn .tabIcon,
  .iconBtn,
  .toast,
  .faqAnswerWrap,
  .faqAnswer,
  .tabBarPill {
    transition-duration: 0.01ms !important;
  }
  .iconBtn.iconBtn--busy {
    animation: none;
  }
  .btnSpinner {
    animation: none;
    border-color: rgba(230, 234, 242, 0.35);
  }
}
