/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

html {
  height: 100%;
  background: #05070f;
}

:root {
  --guide-cyan: #22d3ee;
  --guide-emerald: #10b981;
  --guide-text-muted: rgba(226, 232, 240, .78);
  --guide-border: rgba(255,255,255,.1);
  --guide-surface: linear-gradient(180deg, rgba(10,16,32,.9), rgba(6,10,22,.95));
  --header-height: 96px;
  --footer-extra-bottom: 0px;
}

body {
  background:
    linear-gradient(180deg, rgba(2,8,18,.04) 0%, rgba(2,8,18,.22) 58%, rgba(2,8,18,.5) 100%),
    url("/static/Asberry_full_rost.png") center clamp(-320px, calc(-80px - 24vw), -120px) / clamp(520px, 112vw, 900px) auto no-repeat,
    #05070f;
  color: #fff;
  height: 100vh;
  overflow: hidden;
}

:where(a, button, input, select, textarea, summary, [role="button"]) {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

:where(a, button, input, select, textarea, summary, [role="button"]):focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* INTRO VIDEO */
.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  opacity: 1;
  transition: opacity .3s ease;
}

.intro-splash.is-done {
  opacity: 0;
  pointer-events: none;
}

.intro-video-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  background: #000;
}

.intro-video-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at center, rgba(0,0,0,0) 58%, rgba(0,0,0,.24) 74%, rgba(0,0,0,.6) 88%, #000 100%),
    linear-gradient(90deg, #000 0%, rgba(0,0,0,.62) 5%, rgba(0,0,0,.2) 10%, rgba(0,0,0,0) 16%, rgba(0,0,0,0) 84%, rgba(0,0,0,.2) 90%, rgba(0,0,0,.62) 95%, #000 100%),
    linear-gradient(180deg, #000 0%, rgba(0,0,0,.48) 6%, rgba(0,0,0,.16) 12%, rgba(0,0,0,0) 20%, rgba(0,0,0,0) 80%, rgba(0,0,0,.16) 88%, rgba(0,0,0,.48) 94%, #000 100%);
}

.intro-continue-btn {
  position: absolute;
  left: 50%;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  transform: translate(-50%, 10px);
  min-width: 160px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.56);
  background: linear-gradient(120deg, rgba(12,20,38,.94), rgba(8,14,28,.94));
  color: #f8fafc;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 14px 32px rgba(2,6,23,.5), inset 0 1px 0 rgba(255,255,255,.12);
  transition: opacity .24s ease, transform .24s ease, filter .2s ease;
  z-index: 2;
}

.intro-continue-btn.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.intro-continue-btn:active {
  transform: translate(-50%, 0) scale(.98);
  filter: brightness(1.06);
}

/* ONBOARDING TOUR */
.onboarding-tour {
  position: fixed;
  inset: 0;
  z-index: 920;
  display: none;
  pointer-events: none;
}

.onboarding-tour.open {
  display: block;
  pointer-events: auto;
}

.onboarding-tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(72% 40% at 50% 22%, rgba(32, 220, 197, .2), transparent 68%),
    radial-gradient(62% 30% at 50% 58%, rgba(26, 148, 255, .14), transparent 72%),
    rgba(6, 12, 28, .92);
  backdrop-filter: blur(6px);
}

.onboarding-tour-skip {
  position: fixed;
  right: 16px;
  top: max(12px, calc(env(safe-area-inset-top) + 10px));
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .38);
  background: rgba(15, 23, 42, .55);
  color: rgba(226, 232, 240, .9);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(2, 6, 23, .35);
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}

.onboarding-tour-skip:active {
  transform: scale(.97);
  filter: brightness(1.08);
  border-color: rgba(148, 163, 184, .62);
}

.onboarding-tour-stage {
  position: fixed;
  inset: clamp(8px, 1.8vw, 18px);
  z-index: 2;
  border-radius: clamp(24px, 3vw, 32px);
  border: 1px solid rgba(86, 127, 177, .48);
  background:
    radial-gradient(58% 34% at 50% 34%, rgba(34, 197, 94, .2), transparent 72%),
    radial-gradient(66% 50% at 50% 18%, rgba(37, 99, 235, .24), transparent 76%),
    linear-gradient(180deg, rgba(9, 16, 40, .95) 0%, rgba(15, 27, 58, .9) 56%, rgba(16, 31, 62, .94) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(148, 163, 184, .18),
    0 28px 70px rgba(2, 6, 23, .55);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(20px, 3.4vw, 34px);
}

.onboarding-tour-stage::before {
  content: "";
  position: absolute;
  inset: auto -12% -34% -12%;
  height: 45%;
  pointer-events: none;
  background:
    radial-gradient(60% 75% at 50% 50%, rgba(34, 211, 238, .2), rgba(34, 211, 238, 0) 72%);
}

.onboarding-tour-title {
  margin: 0;
  font-size: clamp(36px, 7vw, 62px);
  line-height: 1.08;
  font-weight: 800;
  color: #29d5f8;
  letter-spacing: .01em;
  text-align: center;
  text-wrap: balance;
}

.onboarding-tour-text {
  margin: 0;
  max-width: min(720px, 92%);
  font-size: clamp(16px, 3.2vw, 24px);
  line-height: 1.45;
  color: rgba(208, 222, 239, .9);
  text-align: center;
  text-wrap: balance;
}

.onboarding-tour-media {
  width: min(720px, 92%);
}

.onboarding-tour-media-shell {
  position: relative;
  padding: 8px;
  border-radius: 24px;
  border: 1px solid rgba(56, 189, 248, .48);
  background:
    radial-gradient(210px 110px at 16% 0, rgba(56, 189, 248, .22), transparent 70%),
    radial-gradient(220px 130px at 88% 100%, rgba(16, 185, 129, .16), transparent 72%),
    linear-gradient(168deg, rgba(15, 23, 42, .92), rgba(9, 18, 40, .96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 20px 44px rgba(4, 10, 26, .48);
  overflow: hidden;
}

.onboarding-tour-media-shell::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.34), transparent);
  pointer-events: none;
}

.onboarding-tour-media-video,
.onboarding-tour-media-image {
  display: block;
  width: 100%;
  max-height: min(44vh, 320px);
  border-radius: 16px;
  object-fit: contain;
  background: rgba(2, 8, 23, .9);
}

.onboarding-tour-media-video {
  pointer-events: none;
}

.onboarding-tour-media-caption {
  margin: 10px auto 0;
  max-width: 94%;
  font-size: clamp(14px, 2.3vw, 18px);
  line-height: 1.35;
  color: rgba(191, 219, 254, .9);
  text-align: center;
  text-wrap: balance;
}

.onboarding-tour[data-slide="5"] .onboarding-tour-media,
.onboarding-tour[data-slide="6"] .onboarding-tour-media {
  order: 3;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.onboarding-tour[data-slide="5"] .onboarding-tour-media-shell,
.onboarding-tour[data-slide="6"] .onboarding-tour-media-shell {
  width: min(84vw, 42vh, 500px);
  height: auto;
  aspect-ratio: 5 / 6;
  margin: 0 auto;
  padding: 7px;
}

.onboarding-tour[data-slide="5"] .onboarding-tour-media-video,
.onboarding-tour[data-slide="5"] .onboarding-tour-media-image,
.onboarding-tour[data-slide="6"] .onboarding-tour-media-video,
.onboarding-tour[data-slide="6"] .onboarding-tour-media-image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  background: transparent;
}

.onboarding-tour[data-slide="5"] .onboarding-tour-text,
.onboarding-tour[data-slide="6"] .onboarding-tour-text {
  order: 4;
  margin-top: 6px;
  max-width: min(640px, 96%);
}

.onboarding-tour[data-slide="5"] .onboarding-tour-title,
.onboarding-tour[data-slide="6"] .onboarding-tour-title {
  font-size: clamp(30px, 7.2vw, 50px);
  line-height: 1.05;
  max-width: min(660px, 96%);
}

.onboarding-tour-panel {
  position: relative;
  z-index: 1;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.3vw, 24px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.onboarding-tour[data-slide="5"] .onboarding-tour-panel,
.onboarding-tour[data-slide="6"] .onboarding-tour-panel {
  justify-content: center;
  gap: clamp(12px, 2vw, 18px);
}

.onboarding-tour-slide-icon {
  width: clamp(92px, 12.6vw, 122px);
  height: clamp(92px, 12.6vw, 122px);
  border-radius: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(147, 197, 253, .35);
  color: rgba(240, 249, 255, .95);
  box-shadow:
    0 18px 46px rgba(6, 20, 51, .45),
    inset 0 1px 0 rgba(255, 255, 255, .22);
  background: linear-gradient(145deg, #0f9bb3, #2868f0);
}

.onboarding-tour-slide-icon[data-accent="teal"] {
  background: linear-gradient(145deg, #10b981, #0e8dd4);
}

.onboarding-tour-slide-icon[data-accent="green"] {
  background: linear-gradient(145deg, #14b8a6, #059669);
}

.onboarding-tour-slide-icon[data-accent="sky"] {
  background: linear-gradient(145deg, #0ea5e9, #2563eb);
}

.onboarding-tour-slide-icon svg {
  width: clamp(42px, 6.2vw, 56px);
  height: clamp(42px, 6.2vw, 56px);
}

.onboarding-tour-slide-icon:empty,
.onboarding-tour[data-slide="5"] .onboarding-tour-slide-icon,
.onboarding-tour[data-slide="6"] .onboarding-tour-slide-icon {
  display: none !important;
}

.onboarding-tour-card {
  width: min(720px, 92%);
  padding: clamp(16px, 2.4vw, 24px);
  border-radius: 22px;
  border: 1px solid rgba(56, 189, 248, .42);
  background: rgba(30, 41, 59, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  text-align: center;
}

.onboarding-tour-card-head {
  margin-bottom: 8px;
}

.onboarding-tour-card-title {
  font-size: clamp(21px, 3.6vw, 32px);
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 0;
}

.onboarding-tour-card-happ-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.onboarding-tour-card-happ-inline img {
  width: 1.08em;
  height: 1.08em;
  border-radius: 12px;
  object-fit: cover;
  vertical-align: middle;
  box-shadow: 0 8px 20px rgba(8, 47, 73, .34);
}

.onboarding-tour-card-text {
  font-size: clamp(16px, 2.8vw, 22px);
  color: #34d399;
}

.onboarding-tour-action {
  width: min(640px, 92%);
  min-height: 62px;
  border: 1px solid rgba(66, 153, 225, .7);
  border-radius: 18px;
  background: linear-gradient(90deg, #0ea5a6, #2563eb);
  color: #f8fafc;
  font-size: clamp(20px, 3.7vw, 34px);
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(6, 24, 54, .44);
  transition: transform .18s ease, filter .18s ease;
}

.onboarding-tour-action-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48em;
}

.onboarding-tour-action-icon {
  width: 1.08em;
  height: 1.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.onboarding-tour-action-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.onboarding-tour-action:active {
  transform: scale(.985);
  filter: brightness(1.06);
}

.onboarding-tour-checkpoint {
  position: relative;
  width: min(640px, 92%);
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 18px;
  border: 1px solid rgba(66, 153, 225, .62);
  background: linear-gradient(90deg, rgba(14, 165, 166, .2), rgba(37, 99, 235, .24));
  color: #e5efff;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 28px rgba(3, 20, 46, .32);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.onboarding-tour-checkpoint:active {
  transform: scale(.99);
}

.onboarding-tour-checkpoint-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.onboarding-tour-checkpoint-mark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid rgba(191, 219, 254, .78);
  background: rgba(15, 23, 42, .5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.onboarding-tour-checkpoint-mark::before {
  content: "";
  width: 12px;
  height: 8px;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(-45deg) translateY(-1px);
}

.onboarding-tour-checkpoint-input:checked + .onboarding-tour-checkpoint-mark {
  border-color: rgba(45, 212, 191, .95);
  background: linear-gradient(160deg, rgba(45, 212, 191, .35), rgba(8, 145, 178, .22));
}

.onboarding-tour-checkpoint-input:checked + .onboarding-tour-checkpoint-mark::before {
  border-left-color: #5eead4;
  border-bottom-color: #5eead4;
}

.onboarding-tour-checkpoint.is-invalid {
  border-color: rgba(248, 113, 113, .95);
  box-shadow:
    inset 0 0 0 1px rgba(248, 113, 113, .35),
    0 0 0 2px rgba(248, 113, 113, .22),
    0 12px 28px rgba(62, 17, 17, .36);
}

.onboarding-tour-checkpoint.is-invalid .onboarding-tour-checkpoint-mark {
  border-color: rgba(248, 113, 113, .95);
}

.onboarding-tour-checkpoint-hint {
  margin: 2px 0 0;
  max-width: min(640px, 92%);
  font-size: clamp(13px, 2.2vw, 16px);
  line-height: 1.35;
  color: #fca5a5;
  text-align: center;
  text-wrap: balance;
}

.onboarding-tour:not(.is-slides) .onboarding-tour-checkpoint,
.onboarding-tour:not(.is-slides) .onboarding-tour-checkpoint-hint,
.onboarding-tour[data-slide]:not([data-slide="3"]) .onboarding-tour-checkpoint,
.onboarding-tour[data-slide]:not([data-slide="3"]) .onboarding-tour-checkpoint-hint {
  display: none !important;
}

.onboarding-tour-controls {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(96, 165, 250, .25);
  padding-top: 16px;
}

.onboarding-tour-pagination {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.onboarding-tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .6);
}

.onboarding-tour-dot.is-active {
  width: 20px;
  background: linear-gradient(90deg, #14b8a6, #38bdf8);
}

.onboarding-tour-nav {
  min-height: 62px;
  min-width: 0;
  width: 100%;
  max-width: 220px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .5);
  background: #f8fafc;
  color: #5f85bd;
  font-size: clamp(20px, 3.4vw, 32px);
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(2, 6, 23, .26);
  transition: transform .18s ease, opacity .18s ease;
}

.onboarding-tour-prev {
  justify-self: start;
}

.onboarding-tour-next {
  justify-self: end;
}

.onboarding-tour-nav:active {
  transform: scale(.985);
}

.onboarding-tour-nav:disabled,
.onboarding-tour-nav.is-disabled {
  opacity: .45;
  cursor: default;
  transform: none;
}

.onboarding-tour[data-slide="1"] .onboarding-tour-title {
  font-size: clamp(42px, 7.4vw, 72px);
}

.onboarding-tour[data-slide="1"] .onboarding-tour-text {
  font-size: clamp(18px, 3vw, 26px);
}

@media (max-width: 640px) {
  .onboarding-tour-stage {
    inset: 4px;
    padding: 16px 14px;
    border-radius: 18px;
  }

  .onboarding-tour-controls {
    gap: 10px;
  }

  .onboarding-tour-pagination {
    gap: 6px;
  }

  .onboarding-tour-dot {
    width: 7px;
    height: 7px;
  }

  .onboarding-tour-dot.is-active {
    width: 18px;
  }

  .onboarding-tour-nav {
    min-height: 54px;
    border-radius: 14px;
    font-size: 14px;
    min-width: 0;
    padding: 0 8px;
  }

  .onboarding-tour-action {
    min-height: 56px;
    border-radius: 14px;
    font-size: 14px;
  }

  .onboarding-tour-title {
    font-size: clamp(34px, 10.2vw, 48px);
  }

  .onboarding-tour-text {
    font-size: 15px;
  }

  .onboarding-tour-card-title {
    font-size: 22px;
  }

  .onboarding-tour-card-text {
    font-size: 16px;
  }
}

/* HEADER */
.app-header {
  position: relative;
  height: var(--header-height);
  overflow: hidden;
  border-bottom: 1px solid rgba(56,189,248,.24);
  background: transparent;
}

.header-logo-wrap {
  display: none;
}

.header-logo {
  display: block;
  height: 100%;
  width: auto;
  max-width: min(68vw, 340px);
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(3,9,22,.55)) drop-shadow(0 10px 18px rgba(14,165,233,.26)) drop-shadow(0 10px 18px rgba(34,197,94,.2));
}

.header-bar {
  height: 100%;
  padding: max(8px, env(safe-area-inset-top)) 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 3;
  background: transparent;
}

.menu-btn {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 17px;
  border: 1px solid rgba(56,189,248,.56);
  background:
    radial-gradient(120% 120% at 100% 0, rgba(45,212,191,.16), transparent 56%),
    linear-gradient(145deg, rgba(6,24,44,.92), rgba(7,19,36,.95));
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  isolation: isolate;
  box-shadow:
    0 14px 30px rgba(2,6,23,.44),
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 0 0 1px rgba(5,150,105,.09);
  transition: transform .18s ease, border-color .22s ease, box-shadow .24s ease, filter .24s ease;
}

.menu-btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(103,232,249,.62), rgba(45,212,191,.22), rgba(125,211,252,.52));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .58;
  pointer-events: none;
}

.menu-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 38%, rgba(255,255,255,.16) 50%, transparent 62%);
  transform: translateX(-120%);
  opacity: .68;
}

.menu-btn__line {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d5ecff, #b9e7ff);
  box-shadow: 0 0 10px rgba(125,211,252,.3);
}

.menu-btn__line:nth-child(2) {
  width: 20px;
}

.menu-btn__line:nth-child(3) {
  width: 17px;
}

.menu-btn:hover {
  border-color: rgba(103,232,249,.88);
  box-shadow:
    0 18px 32px rgba(2,6,23,.54),
    0 0 0 2px rgba(14,165,233,.2),
    inset 0 1px 0 rgba(255,255,255,.2);
  filter: brightness(1.05);
}

.menu-btn:hover::after {
  animation: menuBtnShine 1.4s ease;
}

.menu-btn:active {
  transform: scale(.96);
}

.menu-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(56,189,248,.32),
    0 14px 30px rgba(2,6,23,.44),
    inset 0 1px 0 rgba(255,255,255,.18);
}

@keyframes menuBtnShine {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(140%);
  }
}

.balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(14,24,44,.92);
  border-radius: 999px;
  border: 1px solid rgba(56,189,248,.32);
  box-shadow: 0 0 20px rgba(34,197,94,.16);
}

.balance span {
  color: #ffd54a;
  font-weight: 600;
}

.balance .plus {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}

.balance .plus:active {
  transform: scale(.92);
  filter: brightness(1.1);
}

/* DRAWER */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .64);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
  z-index: 40;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  transform: translateX(-108%);
  width: min(82vw, 340px);
  height: 100dvh;
  background:
    radial-gradient(140% 88% at 100% 0, rgba(99,102,241,.24), transparent 64%),
    radial-gradient(128% 84% at 0 100%, rgba(8,145,178,.2), transparent 70%),
    linear-gradient(180deg, rgba(6,13,33,.985) 0%, rgba(4,11,28,.99) 54%, rgba(3,8,22,.995) 100%);
  border-right: 1px solid rgba(56,189,248,.3);
  box-shadow: 30px 0 58px rgba(2,6,23,.72);
  transition: transform .3s cubic-bezier(.18,.84,.25,1);
  will-change: transform;
  backface-visibility: hidden;
  contain: paint;
  z-index: 41;
}

.drawer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(34,211,238,.68), rgba(20,184,166,.48));
}

.drawer.open {
  transform: translateX(0);
}

.drawer-inner {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  scrollbar-gutter: stable;
  gap: 9px;
  padding: clamp(12px, 2vh, 16px) 12px calc(12px + env(safe-area-inset-bottom));
}

.drawer-anim {
  opacity: 0;
  transform: translateY(10px) scale(.985);
}

.drawer.open .drawer-anim {
  animation: drawerItemIn .34s cubic-bezier(.22,.8,.24,1) both;
  animation-delay: var(--drawer-delay, 0s);
}

.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 18px;
  border: 1px solid rgba(96,165,250,.34);
  background:
    radial-gradient(240px 120px at 100% 0, rgba(99,102,241,.24), transparent 72%),
    linear-gradient(146deg, rgba(14,23,49,.92), rgba(8,18,38,.93));
  box-shadow:
    0 14px 26px rgba(2,6,23,.34),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.drawer-user-card img {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  border: 1px solid rgba(148,163,184,.34);
  object-fit: cover;
  background: rgba(15,23,42,.9);
}

.drawer-user-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.drawer-user-name {
  font-size: clamp(17px, 4.8vw, 20px);
  font-weight: 760;
  line-height: 1.12;
  color: #f8fafc;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: .005em;
}

.drawer-user-id {
  color: rgba(191,219,254,.64);
  font-size: 13px;
  letter-spacing: .03em;
}

.drawer-user-qr-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(45,212,191,.52);
  background:
    radial-gradient(150% 110% at 50% 0, rgba(56,189,248,.18), transparent 76%),
    linear-gradient(145deg, rgba(12,46,76,.92), rgba(10,31,56,.92));
  color: #67e8f9;
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 8px 20px rgba(6,182,212,.16),
    inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .16s ease, border-color .22s ease, filter .22s ease, box-shadow .22s ease;
}

.drawer-user-qr-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, transparent 44%, rgba(94,234,212,.45) 50%, transparent 56%);
  background-size: 220% 220%;
  background-position: -140% 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, background-position .28s ease;
}

.drawer-user-qr-btn::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: linear-gradient(150deg, rgba(6,78,99,.2), rgba(30,64,175,.08));
  pointer-events: none;
  z-index: 0;
}

.drawer-user-qr-btn svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.drawer-user-qr-btn:hover {
  border-color: rgba(94,234,212,.88);
  filter: brightness(1.12);
  box-shadow:
    0 10px 24px rgba(6,182,212,.24),
    inset 0 1px 0 rgba(255,255,255,.16);
}

.drawer-user-qr-btn:hover::before {
  opacity: .72;
  background-position: 56% 50%;
}

.drawer-user-qr-btn:active {
  transform: scale(.96);
}

@keyframes drawerQrBreath {
  0%, 100% {
    box-shadow:
      0 8px 20px rgba(6,182,212,.16),
      inset 0 1px 0 rgba(255,255,255,.12);
  }
  50% {
    box-shadow:
      0 12px 26px rgba(6,182,212,.28),
      0 0 0 3px rgba(45,212,191,.12),
      inset 0 1px 0 rgba(255,255,255,.18);
  }
}

@keyframes drawerQrScan {
  0%, 30% {
    background-position: -140% 50%;
    opacity: 0;
  }
  42% {
    opacity: .86;
  }
  56% {
    background-position: 180% 50%;
    opacity: 0;
  }
  100% {
    background-position: 180% 50%;
    opacity: 0;
  }
}

.drawer-balance-card {
  background:
    radial-gradient(260px 132px at 100% 0, rgba(56,189,248,.24), transparent 74%),
    linear-gradient(168deg, rgba(14,22,47,.965), rgba(8,16,34,.965));
  border-radius: 19px;
  padding: 12px 12px 11px;
  border: 1px solid rgba(56,189,248,.34);
  box-shadow:
    0 15px 28px rgba(2,6,23,.35),
    inset 0 1px 0 rgba(255,255,255,.1);
}

.drawer-balance-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: rgba(191,219,254,.68);
  margin-bottom: 3px;
}

.drawer-balance-value {
  font-weight: 800;
  font-size: clamp(24px, 6.3vw, 30px);
  color: #f8fafc;
  line-height: 1.04;
  margin-bottom: 7px;
  text-shadow: 0 6px 16px rgba(2,6,23,.42);
}

.drawer-support-btn {
  margin-top: 8px;
  width: 100%;
  min-height: 62px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(16,185,129,.46);
  background:
    radial-gradient(280px 120px at 100% 0, rgba(34,197,94,.24), transparent 72%),
    linear-gradient(130deg, rgba(8,39,42,.92), rgba(8,28,49,.92));
  color: #ecfdf5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(2,6,23,.34), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .16s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.drawer-support-btn:hover {
  border-color: rgba(74,222,128,.66);
  box-shadow: 0 14px 26px rgba(16,185,129,.24), inset 0 1px 0 rgba(255,255,255,.18);
}

.drawer-support-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid rgba(110,231,183,.42);
  display: grid;
  place-items: center;
  background: rgba(3,105,87,.28);
}

.drawer-support-icon svg {
  width: 19px;
  height: 19px;
}

.drawer-support-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.drawer-support-title {
  font-size: 16px;
  font-weight: 760;
  color: #ecfeff;
}

.drawer-support-subtitle {
  font-size: 11px;
  color: rgba(209,250,229,.82);
}

.drawer-section-title {
  margin-top: 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: rgba(186,230,253,.62);
  padding: 0 1px;
}

.drawer-nav {
  display: grid;
  gap: 5px;
}

.drawer-item {
  width: 100%;
  min-height: 66px;
  border: 1px solid rgba(96,165,250,.32);
  border-radius: 16px;
  background:
    radial-gradient(250px 100px at 100% 0, rgba(56,189,248,.18), transparent 70%),
    linear-gradient(140deg, rgba(12,21,45,.94), rgba(7,14,29,.94));
  color: #e2e8f0;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 7px;
  text-align: left;
  cursor: default;
  transition: border-color .2s ease, transform .18s ease, box-shadow .2s ease, filter .2s ease;
}

.drawer-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(148,163,184,.35);
  background: linear-gradient(145deg, rgba(30,41,59,.74), rgba(15,23,42,.74));
  display: grid;
  place-items: center;
  color: rgba(226,232,240,.85);
}

.drawer-item-icon svg {
  width: 17px;
  height: 17px;
}

.drawer-item-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-item-title {
  font-size: 14px;
  font-weight: 740;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f1f5f9;
}

.drawer-item-subtitle {
  font-size: 10px;
  color: rgba(191,219,254,.72);
  line-height: 1.2;
}

.drawer-item-subtitle-strong {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(186,230,253,.52);
}

.drawer-item-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(163,230,53,.82);
  background: linear-gradient(140deg, rgba(132,204,22,.44), rgba(74,222,128,.26));
  color: #f7fee7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 0 18px rgba(132,204,22,.3);
}

.drawer-item-arrow,
.drawer-item-dash {
  font-size: 20px;
  line-height: 1;
  color: rgba(148,163,184,.72);
  margin-left: 0;
}

.drawer-item[data-drawer-tab],
.drawer-item[data-drawer-action],
.drawer-support-btn[data-drawer-action] {
  cursor: pointer;
}

.drawer-item[data-drawer-tab]:hover,
.drawer-item[data-drawer-action]:hover,
.drawer-support-btn[data-drawer-action]:hover {
  border-color: rgba(125,211,252,.52);
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(2,6,23,.34);
}

.drawer-item[data-drawer-tab]:hover .drawer-item-arrow,
.drawer-item[data-drawer-action]:hover .drawer-item-arrow {
  color: rgba(186,230,253,.94);
  transform: translateX(2px);
}

.drawer-item.active {
  border-color: rgba(34,211,238,.68);
  box-shadow:
    0 14px 24px rgba(8,145,178,.24),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.drawer-item.active .drawer-item-title {
  color: #ecfeff;
}

.drawer-item-disabled {
  opacity: .56;
  filter: saturate(.7);
}

.drawer-spacer {
  margin-top: auto;
  min-height: 2px;
}

.drawer-item:active,
.drawer-support-btn:active {
  transform: translateY(0) scale(.99);
}

@keyframes drawerItemIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* PROMO MODAL */
.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.promo-modal.open {
  display: block;
}

.promo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .78);
  opacity: 0;
  animation: promoFade .2s ease forwards;
}

.promo-modal-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 360px);
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(52,211,153,.38);
  background:
    radial-gradient(260px 120px at 100% 0, rgba(16,185,129,.2), transparent 70%),
    linear-gradient(170deg, #061222 0%, #071427 62%, #050d1a 100%);
  box-shadow: 0 20px 40px rgba(0,0,0,.45);
  transform: translate(-50%, -46%) scale(.96);
  opacity: 0;
  animation: promoPop .24s cubic-bezier(.2,.8,.2,1) forwards;
}

.promo-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(148,163,184,.45);
  background: rgba(15,23,42,.72);
  color: #dbeafe;
  font-size: 15px;
  cursor: pointer;
}

.promo-modal-kicker {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #d1fae5;
  border: 1px solid rgba(16,185,129,.42);
  background: rgba(4,120,87,.22);
}

.promo-modal-title {
  font-size: 24px;
  line-height: 1.08;
  font-weight: 800;
}

.promo-modal-subtitle {
  margin-top: 8px;
  color: rgba(226,232,240,.82);
  font-size: 13px;
  line-height: 1.42;
}

.promo-field-label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 700;
}

.promo-field-input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.4);
  background: rgba(7,15,30,.86);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.promo-field-input:focus {
  border-color: rgba(52,211,153,.8);
  box-shadow: 0 0 0 3px rgba(16,185,129,.2);
}

.promo-modal-error {
  min-height: 18px;
  margin-top: 8px;
  font-size: 12px;
  color: #fda4af;
}

.promo-modal-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.promo-cancel-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.42);
  background: linear-gradient(120deg, rgba(15,23,42,.86), rgba(9,16,30,.86));
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .16s ease, border-color .2s ease, filter .2s ease;
}

.promo-cancel-btn:hover {
  border-color: rgba(125,211,252,.55);
  filter: brightness(1.05);
}

.promo-cancel-btn:active {
  transform: translateY(1px);
}

.promo-apply-btn {
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
}

.promo-apply-btn:disabled {
  cursor: default;
  opacity: .72;
  filter: saturate(.78);
}

/* REFERRAL VIEW */
.profile-history-panel.referral-panel {
  position: relative;
  margin-bottom: 10px;
  padding: 18px 14px 14px;
  border-radius: 24px;
  border: 1px solid rgba(125,211,252,.3);
  background:
    radial-gradient(360px 170px at 112% -8%, rgba(56,189,248,.2), transparent 72%),
    radial-gradient(300px 160px at -14% 108%, rgba(16,185,129,.14), transparent 72%),
    linear-gradient(170deg, rgba(7,15,32,.96), rgba(5,11,24,.95));
  box-shadow: 0 16px 30px rgba(2,6,23,.34);
}

.referral-panel .referral-head {
  margin-bottom: 10px;
}

.referral-panel .referral-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.referral-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.referral-panel .profile-history-head h4 {
  margin: 0;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.05;
}

.referral-qr-open-btn {
  position: relative;
  right: auto;
  top: auto;
  width: 54px;
  height: 54px;
  transform: none;
  flex-shrink: 0;
}

.referral-qr-open-btn svg {
  width: 25px;
  height: 25px;
}

.referral-qr-open-btn:active {
  transform: scale(.96);
}

.referral-head-subtitle {
  margin: 8px 0 0;
  color: rgba(219,234,254,.82);
  font-size: 13px;
  line-height: 1.4;
  max-width: 43ch;
}

.referral-panel .referral-refresh-btn {
  min-height: 54px;
  width: 54px;
  min-width: 54px;
  padding: 0;
  border-radius: 13px;
  border: 1px solid rgba(125,211,252,.34);
  background: linear-gradient(180deg, rgba(8,16,34,.92), rgba(8,17,36,.8));
  color: #e2e8f0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.referral-panel .referral-refresh-btn:hover {
  border-color: rgba(125,211,252,.58);
  background: linear-gradient(180deg, rgba(18,31,55,.95), rgba(10,23,44,.95));
}

.referral-panel .referral-leaderboard-btn {
  border-color: rgba(251,191,36,.48);
  background: linear-gradient(180deg, rgba(62,45,14,.92), rgba(48,35,10,.9));
  color: #fde68a;
}

.referral-panel .referral-leaderboard-btn:hover {
  border-color: rgba(252,211,77,.72);
  background: linear-gradient(180deg, rgba(84,59,16,.94), rgba(66,47,12,.92));
}

.referral-panel .referral-leaderboard-btn.is-loading {
  animation: referralLeaderboardPulse .9s ease-in-out infinite;
}

.referral-stats-grid {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.referral-stat-card {
  min-height: 78px;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.24);
  background: linear-gradient(180deg, rgba(8,14,30,.88), rgba(6,11,24,.9));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.referral-stat-label {
  color: rgba(148,163,184,.9);
  font-size: 11px;
  letter-spacing: .045em;
  text-transform: uppercase;
  font-weight: 700;
}

.referral-stat-card strong {
  font-size: clamp(24px, 4.8vw, 28px);
  line-height: 1;
  font-weight: 800;
  color: #f8fafc;
}

.referral-layout {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

.referral-qr-card {
  width: 100%;
  max-width: min(88vw, 366px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.referral-qr-wrap {
  width: 100%;
  max-width: min(80vw, 338px);
  padding: 10px 10px 12px;
  border-radius: 30px;
  border: 1px solid rgba(191,219,254,.88);
  background:
    radial-gradient(190px 150px at 18% 16%, rgba(99,102,241,.26), transparent 72%),
    radial-gradient(220px 180px at 86% 84%, rgba(56,189,248,.22), transparent 72%),
    linear-gradient(145deg, #f5f9ff, #e8eefb);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    0 14px 28px rgba(15,23,42,.2);
}

.referral-qr-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.06);
  overflow: hidden;
  cursor: pointer;
  transition: transform .16s ease, filter .2s ease, box-shadow .2s ease;
}

.referral-qr-canvas:hover {
  filter: brightness(1.015);
  box-shadow: inset 0 0 0 1px rgba(56,189,248,.2);
}

.referral-qr-canvas:active {
  transform: scale(.992);
}

.referral-qr-image {
  position: absolute;
  top: 10px;
  left: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  z-index: 2;
  object-fit: contain;
  image-rendering: auto;
  background: #ffffff;
  border-radius: 14px;
}

.referral-qr-tint {
  position: absolute;
  top: 10px;
  left: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  z-index: 3;
  pointer-events: none;
  border-radius: 14px;
  mix-blend-mode: screen;
  opacity: .98;
  background: linear-gradient(138deg, #4a5eff 2%, #3f87ff 36%, #2ec5df 64%, #15b7b0 98%);
}

.referral-qr-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  transform: translate(-50%, -50%);
  z-index: 4;
  border-radius: 22px;
  background: transparent;
  border: none;
  box-shadow: 0 10px 24px rgba(15,23,42,.2);
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
}

.referral-qr-center img {
  width: 132%;
  height: 132%;
  object-fit: cover;
  border-radius: 16px;
}

.referral-qr-fallback {
  position: absolute;
  top: 10px;
  left: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  z-index: 5;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
  background: rgba(255,255,255,.92);
  color: rgba(15,23,42,.7);
  font-size: 13px;
  font-weight: 700;
  border-radius: 14px;
}

.referral-owner-handle {
  width: 100%;
  text-align: center;
  font-size: clamp(24px, 5.2vw, 35px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: .02em;
  background: linear-gradient(138deg, #4a5eff 2%, #3f87ff 36%, #2ec5df 64%, #15b7b0 98%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 12px rgba(46,133,222,.2);
  user-select: text;
  padding-bottom: 2px;
}

.referral-qr-fallback::before {
  display: none;
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(91,141,255,.22);
  border-top-color: #5b8dff;
  animation: referralQrSpin .82s linear infinite;
}

.referral-qr-fallback[data-state="loading"] {
  color: transparent;
  font-size: 0;
}

.referral-qr-fallback[data-state="loading"]::before {
  display: block;
}

.referral-qr-fallback[hidden] {
  display: none;
}

.referral-list-table {
  margin-top: 14px;
}

.referral-list-table .profile-history-row {
  grid-template-columns: minmax(0, 1.05fr) minmax(116px, 1.2fr) minmax(76px, auto);
  gap: 12px;
}

.referral-list-table .referral-list-row-head {
  min-height: 46px;
  font-size: 10px;
  letter-spacing: .055em;
}

.referral-list-table .referral-list-row-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-list-table .referral-list-row-head span:nth-child(2) {
  white-space: normal;
  line-height: 1.1;
}

.referral-list-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.referral-list-index {
  flex-shrink: 0;
  color: rgba(148,163,184,.92);
  font-weight: 700;
}

.referral-list-name-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.referral-list-table .profile-history-row > :nth-child(2) {
  white-space: nowrap;
}

.referral-list-table .profile-history-row > :nth-child(3) {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.referral-leaderboard-table {
  margin-top: 14px;
}

.referral-leaderboard-modal-card {
  width: min(94vw, 540px);
  max-height: min(88vh, 760px);
}

.referral-leaderboard-title {
  font-size: clamp(26px, 6vw, 36px);
}

.referral-leaderboard-subtitle {
  margin-top: 8px;
  margin-bottom: 10px;
  color: rgba(186,230,253,.88);
  font-size: 13px;
  line-height: 1.4;
}

.referral-leaderboard-prize-row {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.referral-leaderboard-prize-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(125,211,252,.34);
  background: linear-gradient(140deg, rgba(8,22,42,.86), rgba(8,19,36,.88));
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
}

.referral-leaderboard-modal-table {
  margin-top: 0;
}

.referral-leaderboard-table .profile-history-row {
  grid-template-columns: minmax(90px, .45fr) minmax(0, 1fr) minmax(78px, auto);
  gap: 10px;
}

.referral-leaderboard-table .referral-leaderboard-row-head {
  min-height: 44px;
  font-size: 10px;
  letter-spacing: .055em;
}

.referral-leaderboard-rank {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.referral-leaderboard-rank-num {
  color: rgba(148,163,184,.92);
  font-weight: 800;
  white-space: nowrap;
}

.referral-leaderboard-medal {
  font-size: 18px;
  line-height: 1;
}

.referral-leaderboard-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.referral-leaderboard-row.is-me {
  border-left: 2px solid rgba(56,189,248,.72);
}

.referral-leaderboard-row.is-top-1 {
  border-top-color: rgba(245,158,11,.36);
  background: linear-gradient(90deg, rgba(120,53,15,.24), rgba(12,25,46,.88));
}

.referral-leaderboard-row.is-top-2 {
  border-top-color: rgba(148,163,184,.38);
  background: linear-gradient(90deg, rgba(51,65,85,.3), rgba(11,24,44,.88));
}

.referral-leaderboard-row.is-top-3 {
  border-top-color: rgba(251,146,60,.34);
  background: linear-gradient(90deg, rgba(124,45,18,.24), rgba(11,24,44,.88));
}

.referral-leaderboard-row.is-top-1 .profile-history-amount {
  color: #fde68a;
}

.referral-leaderboard-row.is-top-2 .profile-history-amount {
  color: #e2e8f0;
}

.referral-leaderboard-row.is-top-3 .profile-history-amount {
  color: #fdba74;
}

@media (max-width: 760px) {
  .referral-panel .referral-head-subtitle {
    font-size: 12px;
  }

  .referral-panel .referral-refresh-btn {
    width: 50px;
    min-width: 50px;
    min-height: 50px;
    font-size: 22px;
  }

  .referral-qr-open-btn {
    width: 50px;
    height: 50px;
  }

  .referral-qr-open-btn svg {
    width: 23px;
    height: 23px;
  }

  .referral-stat-card {
    min-height: 70px;
    padding: 8px 6px;
    gap: 4px;
  }

  .referral-stat-label {
    font-size: 10px;
    letter-spacing: .035em;
  }

  .referral-stat-card strong {
    font-size: clamp(20px, 6vw, 25px);
  }

  .referral-qr-wrap {
    max-width: min(82vw, 292px);
  }

  .referral-owner-handle {
    font-size: clamp(21px, 7vw, 30px);
    letter-spacing: .02em;
  }

  .referral-qr-center {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .referral-list-table .profile-history-row {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 1fr) minmax(66px, auto);
    gap: 8px;
    padding: 10px 8px;
    font-size: 12px;
  }

  .referral-leaderboard-table .profile-history-row {
    grid-template-columns: minmax(74px, .48fr) minmax(0, 1fr) minmax(66px, auto);
    gap: 8px;
    padding: 10px 8px;
    font-size: 12px;
  }

  .referral-leaderboard-table .referral-leaderboard-row-head {
    font-size: 9px;
    letter-spacing: .04em;
  }

  .referral-leaderboard-medal {
    font-size: 16px;
  }

  .referral-leaderboard-modal-card {
    width: min(95vw, 520px);
  }

  .referral-leaderboard-subtitle {
    font-size: 12px;
  }

  .referral-leaderboard-prize-chip {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }

  .referral-list-table .referral-list-row-head {
    font-size: 9px;
    letter-spacing: .04em;
  }

  .referral-list-name {
    gap: 5px;
  }
}

@keyframes referralQrSpin {
  to { transform: rotate(360deg); }
}

@keyframes referralLeaderboardPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

/* SUPPORT MODAL */
.support-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.support-modal.open {
  display: block;
}

.support-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .78);
  opacity: 0;
  animation: promoFade .2s ease forwards;
}

.support-modal-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(94vw, 456px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 20px 18px 18px;
  border-radius: 24px;
  border: 1px solid rgba(56,189,248,.32);
  background:
    radial-gradient(320px 160px at 104% -8%, rgba(14,165,233,.24), transparent 72%),
    radial-gradient(300px 170px at -6% 108%, rgba(16,185,129,.14), transparent 72%),
    linear-gradient(170deg, #061224 0%, #061427 58%, #050c18 100%);
  box-shadow: 0 26px 54px rgba(0,0,0,.48);
  transform: translate(-50%, -46%) scale(.96);
  opacity: 0;
  animation: promoPop .24s cubic-bezier(.2,.8,.2,1) forwards;
}

.support-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid rgba(148,163,184,.42);
  background: rgba(15,23,42,.72);
  color: #dbeafe;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .14s ease, border-color .2s ease, background .2s ease;
}

.support-modal-close:hover {
  border-color: rgba(125,211,252,.62);
  background: rgba(15,23,42,.92);
}

.support-modal-close:active {
  transform: scale(.96);
}

.support-modal-kicker {
  width: fit-content;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 11px;
  font-size: 11px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #d9f2ff;
  border: 1px solid rgba(56,189,248,.36);
  background: linear-gradient(120deg, rgba(2,132,199,.3), rgba(6,182,212,.14));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.support-modal-title {
  font-size: clamp(24px, 5.5vw, 30px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: .01em;
}

.support-modal-subtitle {
  margin-top: 8px;
  margin-bottom: 12px;
  color: rgba(226,232,240,.84);
  font-size: 13px;
  line-height: 1.42;
}

.support-contacts {
  margin-top: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(7,14,30,.62);
}

.support-contacts-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: #c7d2fe;
  letter-spacing: .01em;
}

.support-contact-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1.2fr);
  gap: 8px;
  align-items: start;
}

.support-contact-row + .support-contact-row {
  margin-top: 8px;
}

.support-contact-label {
  color: rgba(191,219,254,.78);
  font-size: 12px;
  line-height: 1.45;
}

.support-contact-value {
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.support-contact-link {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.support-contact-link:hover {
  color: #bfdbfe;
}

.support-checklist {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(7,14,30,.62);
}

.support-checklist-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: #c7d2fe;
  letter-spacing: .02em;
}

.support-check-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 26px;
}

.support-check-item + .support-check-item {
  margin-top: 8px;
}

.support-check-num {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(125,211,252,.4);
  background: rgba(14,116,144,.18);
  color: #e0f2fe;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.support-check-item p {
  margin: 0;
  color: rgba(191,219,254,.88);
  font-size: 12px;
  line-height: 1.38;
}

.support-faq-head {
  margin: 0 0 8px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
}

.support-faq-item {
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 15px;
  padding: 10px 12px 11px;
  background: rgba(6,14,30,.72);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.support-faq-item[open] {
  border-color: rgba(125,211,252,.44);
  background: rgba(8,17,34,.9);
}

.support-faq-item + .support-faq-item {
  margin-top: 8px;
}

.support-faq-item summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr 18px;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.36;
}

.support-faq-item summary::-webkit-details-marker {
  display: none;
}

.support-faq-item summary::after {
  content: "+";
  position: static;
  color: #7dd3fc;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  text-align: right;
}

.support-faq-item[open] summary::after {
  content: "−";
}

.support-faq-item p {
  margin-top: 8px;
  color: rgba(191,219,254,.9);
  font-size: 12px;
  line-height: 1.45;
}

/* DOWNLOAD MODAL */
.download-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.download-modal.is-quick-setup {
  z-index: 960;
}

.download-modal.is-over-onboarding {
  z-index: 970;
}

.download-modal.open {
  display: block;
}

.download-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(980px 560px at 50% -12%, rgba(56,189,248,.2), transparent 58%),
    radial-gradient(640px 420px at 92% 112%, rgba(99,102,241,.18), transparent 60%),
    rgba(2, 6, 23, .8);
  backdrop-filter: blur(7px) saturate(118%);
  -webkit-backdrop-filter: blur(7px) saturate(118%);
  opacity: 0;
  animation: promoFade .2s ease forwards;
}

.download-modal-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(94vw, 470px);
  max-height: min(88vh, 740px);
  overflow-y: auto;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid rgba(148,163,184,.34);
  background:
    radial-gradient(210px 120px at 14% 8%, rgba(56,189,248,.22), transparent 70%),
    radial-gradient(250px 145px at 86% 0%, rgba(99,102,241,.2), transparent 72%),
    linear-gradient(170deg, rgba(8,14,30,.97), rgba(5,10,20,.98));
  box-shadow:
    0 26px 60px rgba(2,6,23,.62),
    0 12px 30px rgba(0,0,0,.44);
  backdrop-filter: blur(18px) saturate(138%);
  -webkit-backdrop-filter: blur(18px) saturate(138%);
  isolation: isolate;
  transform: translate(-50%, -46%) scale(.96);
  opacity: 0;
  animation: promoPop .24s cubic-bezier(.2,.8,.2,1) forwards;
}

.download-modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    140deg,
    rgba(125,211,252,.68),
    rgba(129,140,248,.34) 38%,
    rgba(45,212,191,.4) 70%,
    rgba(148,163,184,.22)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.download-modal-card::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  opacity: .7;
  pointer-events: none;
  z-index: 0;
}

.download-modal-card > * {
  position: relative;
  z-index: 1;
}

.download-modal.is-quick-setup .download-modal-card {
  border-color: rgba(56,189,248,.55);
  box-shadow:
    0 0 0 1px rgba(56,189,248,.35),
    0 20px 42px rgba(0,0,0,.5),
    0 0 38px rgba(56,189,248,.27);
}

.download-modal.is-quick-setup .guide-platform {
  position: relative;
  z-index: 3;
  pointer-events: auto;
  cursor: pointer;
}

.download-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.45);
  background: linear-gradient(180deg, rgba(15,23,42,.8), rgba(15,23,42,.58));
  color: #dbeafe;
  font-size: 19px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, filter .2s ease;
}

.download-modal-close:hover {
  transform: translateY(-1px);
  border-color: rgba(125,211,252,.62);
  filter: brightness(1.08);
}

.download-modal-title {
  font-size: clamp(28px, 7.2vw, 44px);
  line-height: 1.08;
  font-weight: 800;
  text-align: center;
  letter-spacing: .01em;
  margin-right: 34px;
  margin-left: 34px;
  background: linear-gradient(135deg, #e2ecff 0%, #dbeafe 24%, #93c5fd 48%, #67e8f9 78%, #a5b4fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.download-modal-subtitle {
  margin: 8px auto 0;
  max-width: 34ch;
  text-align: center;
  color: rgba(226,232,240,.82);
  font-size: 13px;
  line-height: 1.45;
}

.download-modal-card .guide-platform-grid {
  margin-top: 16px;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-modal-card .guide-platform {
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 132px;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,.28);
  background: linear-gradient(180deg, rgba(9,17,35,.86), rgba(8,14,30,.92));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 10px 20px rgba(2,6,23,.36);
}

.download-modal-card .guide-platform:hover {
  transform: translateY(-3px);
  border-color: rgba(103,232,249,.68);
  background: linear-gradient(180deg, rgba(11,21,41,.94), rgba(8,15,31,.99));
  box-shadow:
    0 16px 32px rgba(2,6,23,.48),
    inset 0 1px 0 rgba(255,255,255,.12);
}

.download-modal-card .guide-platform:active {
  transform: translateY(-1px) scale(.995);
}

.download-modal-card .guide-platform-icon {
  --icon-glow-a: rgba(125,211,252,.34);
  --icon-glow-b: rgba(99,102,241,.22);
  width: 76px;
  height: 76px;
  color: #f8fbff;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
}

.download-modal-card .guide-platform-icon::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--icon-glow-a) 0%, var(--icon-glow-b) 42%, transparent 74%);
  filter: blur(2px);
  opacity: .9;
  z-index: -1;
  animation: platformGlowPulse 2.8s ease-in-out infinite;
}

.download-modal-card .guide-platform-icon svg {
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 4px 10px rgba(2,6,23,.52));
}

.download-modal-card .guide-platform:nth-child(2) .guide-platform-icon::before {
  animation-delay: .4s;
}

.download-modal-card .guide-platform:nth-child(3) .guide-platform-icon::before {
  animation-delay: .8s;
}

.download-modal-card .guide-platform:nth-child(4) .guide-platform-icon::before {
  animation-delay: 1.2s;
}

.download-modal-card .guide-platform:nth-child(1) .guide-platform-icon {
  --icon-glow-a: rgba(226,232,240,.34);
  --icon-glow-b: rgba(96,165,250,.2);
}

.download-modal-card .guide-platform:nth-child(2) .guide-platform-icon {
  --icon-glow-a: rgba(125,211,252,.32);
  --icon-glow-b: rgba(34,211,238,.2);
}

.download-modal-card .guide-platform:nth-child(3) .guide-platform-icon {
  --icon-glow-a: rgba(147,197,253,.32);
  --icon-glow-b: rgba(129,140,248,.2);
}

.download-modal-card .guide-platform:nth-child(4) .guide-platform-icon {
  --icon-glow-a: rgba(186,230,253,.34);
  --icon-glow-b: rgba(148,163,184,.22);
}

.download-modal-card .guide-platform-name {
  font-size: 17px;
  font-weight: 760;
  letter-spacing: .01em;
  color: #e8f2ff;
}

@keyframes platformGlowPulse {
  0%, 100% {
    opacity: .68;
    transform: scale(.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

/* PROFILE QR MODAL */
.profile-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 62;
  display: none;
}

.profile-qr-modal.is-over-onboarding {
  z-index: 970;
}

.profile-qr-modal.open {
  display: block;
}

.profile-qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .8);
  opacity: 0;
  animation: promoFade .2s ease forwards;
}

.profile-qr-modal-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 430px);
  max-height: min(90vh, 780px);
  overflow-y: auto;
  padding: 18px 16px 16px;
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,.34);
  background:
    radial-gradient(280px 150px at 0 0, rgba(56,189,248,.18), transparent 72%),
    linear-gradient(170deg, rgba(8,14,30,.97), rgba(5,11,23,.96));
  box-shadow: 0 24px 46px rgba(0,0,0,.48);
  transform: translate(-50%, -46%) scale(.96);
  opacity: 0;
  animation: promoPop .24s cubic-bezier(.2,.8,.2,1) forwards;
}

.profile-qr-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid rgba(148,163,184,.45);
  background: rgba(15,23,42,.78);
  color: #dbeafe;
  font-size: 17px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-qr-title {
  margin-right: 40px;
  font-size: clamp(28px, 6.6vw, 38px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: .02em;
  background: linear-gradient(138deg, #4a5eff 2%, #3f87ff 36%, #2ec5df 64%, #15b7b0 98%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.profile-qr-subtitle {
  margin-top: 8px;
  color: rgba(186,230,253,.86);
  font-size: 13px;
}

.profile-qr-hint {
  margin-top: 4px;
  color: rgba(125,211,252,.92);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
}

.profile-qr-wrap {
  margin: 12px auto 0;
  max-width: min(82vw, 360px);
}

.profile-qr-wrap .referral-qr-canvas {
  cursor: pointer;
  transition: transform .18s ease, box-shadow .2s ease, filter .2s ease;
}

.profile-qr-wrap .referral-qr-canvas:hover {
  filter: brightness(1.02);
  box-shadow: inset 0 0 0 1px rgba(56,189,248,.18);
}

.profile-qr-wrap .referral-qr-canvas:active {
  transform: scale(.992);
}

.profile-qr-handle {
  font-size: clamp(24px, 6vw, 34px);
}

.device-qr-modal .profile-qr-title {
  font-size: clamp(26px, 6.2vw, 34px);
  background: linear-gradient(135deg, #fbbf24 4%, #34d399 52%, #2dd4bf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.device-qr-modal .profile-qr-modal-card {
  border-color: rgba(52,211,153,.34);
  background:
    radial-gradient(300px 170px at 0 0, rgba(251,191,36,.17), transparent 72%),
    radial-gradient(260px 150px at 100% 100%, rgba(45,212,191,.18), transparent 72%),
    linear-gradient(170deg, rgba(9,17,33,.97), rgba(5,11,23,.96));
}

.device-qr-modal .profile-qr-subtitle {
  color: rgba(251,243,219,.9);
}

.device-qr-modal .profile-qr-hint {
  color: rgba(110,231,183,.95);
}

.device-qr-wrap {
  border-color: rgba(251,191,36,.64);
  background:
    radial-gradient(210px 170px at 18% 16%, rgba(234,179,8,.28), transparent 72%),
    radial-gradient(230px 180px at 86% 84%, rgba(16,185,129,.24), transparent 72%),
    linear-gradient(150deg, #f8fbff, #ecfdf5);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.78),
    0 14px 28px rgba(6,95,70,.24);
}

.device-qr-canvas {
  box-shadow:
    inset 0 0 0 1px rgba(15,23,42,.08),
    0 0 0 2px rgba(251,191,36,.18);
}

.device-qr-canvas:hover {
  box-shadow:
    inset 0 0 0 1px rgba(16,185,129,.26),
    0 0 0 2px rgba(251,191,36,.32);
}

.device-qr-tint {
  background: linear-gradient(132deg, #f59e0b 2%, #eab308 30%, #22c55e 64%, #06b6d4 100%);
}

.device-qr-center {
  box-shadow:
    0 10px 24px rgba(15,23,42,.24),
    0 0 0 2px rgba(251,191,36,.34);
}

.device-qr-name {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(20px, 5.8vw, 30px);
  background: linear-gradient(135deg, #f59e0b 6%, #34d399 56%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

@media (max-width: 760px) {
  .profile-qr-modal-card {
    width: min(95vw, 430px);
    padding: 16px 13px 14px;
  }

  .profile-qr-wrap {
    max-width: min(86vw, 332px);
  }

  .profile-qr-handle {
    font-size: clamp(21px, 7vw, 30px);
  }

  .device-qr-name {
    font-size: clamp(18px, 6.4vw, 26px);
  }
}

.support-chat-btn {
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
}

.support-chat-btn-top {
  margin-top: 10px;
  margin-bottom: 12px;
}

@media (max-width: 560px) {
  .support-modal-card {
    width: min(95vw, 456px);
    padding: 16px 12px 14px;
    border-radius: 20px;
  }

  .support-contact-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* MAIN */
.main {
  position: absolute;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  right: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  padding-bottom: calc(98px + env(safe-area-inset-bottom) + var(--footer-extra-bottom) + 16px);
}

.main::before {
  content: none;
}

.view { display: none; }

.view.active {
  display: block;
  animation: tabIn .28s ease;
}

.is-ios .view.active {
  animation: none;
  opacity: 1;
  transform: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head .vpn-kicker,
.section-head .topup-kicker,
.section-head .profile-kicker,
.section-head .guide-kicker {
  margin-bottom: 0;
}

.section-body {
  margin-top: 10px;
}

[data-section] {
  --toggle-accent: #22d3ee;
  --toggle-accent-rgb: 34, 211, 238;
}

[data-section="vpn"] {
  --toggle-accent: #38bdf8;
  --toggle-accent-rgb: 56, 189, 248;
}

[data-section="topup"] {
  --toggle-accent: #22c55e;
  --toggle-accent-rgb: 34, 197, 94;
}

[data-section="profile"] {
  --toggle-accent: #60a5fa;
  --toggle-accent-rgb: 96, 165, 250;
}

[data-section="help"] {
  --toggle-accent: #2dd4bf;
  --toggle-accent-rgb: 45, 212, 191;
}

.toggle-switch {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(8,14,30,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.toggle-switch:disabled {
  cursor: not-allowed;
  opacity: .6;
  transform: none;
}

.toggle-track {
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(15,23,42,.6), rgba(8,16,32,.6));
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
  transition: transform .24s ease, background .24s ease;
}

[data-section]:not(.is-collapsed) .toggle-switch {
  border-color: rgba(var(--toggle-accent-rgb), .6);
  background: linear-gradient(120deg, rgba(var(--toggle-accent-rgb), .26), rgba(8,16,32,.6));
  box-shadow:
    0 8px 16px rgba(var(--toggle-accent-rgb), .25),
    inset 0 1px 0 rgba(255,255,255,.18);
}

[data-section]:not(.is-collapsed) .toggle-thumb {
  transform: translateX(24px);
  background: #f8fafc;
}

.is-collapsed .section-body {
  display: none;
}

.vpn-hero.is-collapsed .section-body {
  display: block;
  margin-top: 10px;
}

.vpn-hero.is-collapsed .section-body > :not(.vpn-actions) {
  display: none;
}

.is-collapsed .toggle-switch {
  border-color: rgba(var(--toggle-accent-rgb), .4);
  animation: togglePulse 2.1s ease-in-out infinite;
}

@keyframes togglePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(var(--toggle-accent-rgb), 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(var(--toggle-accent-rgb), .22);
  }
}

@keyframes tabIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* VPN */
.vpn-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 26px;
  border: 1px solid rgba(34,211,238,.28);
  background:
    radial-gradient(460px 160px at 100% 0, rgba(59,130,246,.27), transparent 70%),
    radial-gradient(420px 180px at 0 100%, rgba(14,165,233,.2), transparent 72%),
    linear-gradient(160deg, #071427 0%, #081327 52%, #050d1f 100%);
  box-shadow: 0 18px 34px rgba(0,0,0,.34);
}

.vpn-kicker {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #d9fafe;
  border: 1px solid rgba(103,232,249,.42);
  background: rgba(14,116,144,.24);
}

.vpn-title {
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 800;
  line-height: 1.08;
  max-width: 14ch;
}

.vpn-subtitle {
  margin-top: 10px;
  color: rgba(224,242,254,.8);
  line-height: 1.42;
  max-width: 46ch;
}

.vpn-pills {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vpn-pill {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(186,230,253,.25);
  background: rgba(8,20,40,.75);
  color: #dbeafe;
}

.vpn-actions {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.vpn-create-btn {
  position: relative;
  border-color: rgba(66, 153, 225, .7);
  background: linear-gradient(90deg, #0ea5a6, #2563eb);
  box-shadow: 0 16px 34px rgba(6, 24, 54, .44);
}

.vpn-create-btn.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.vpn-create-btn.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(226, 232, 240, .42);
  border-top-color: #f8fafc;
  animation: createVpnSpin .8s linear infinite;
}

@keyframes createVpnSpin {
  to {
    transform: rotate(360deg);
  }
}

.vpn-secondary-btn {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(56,189,248,.35);
  background: linear-gradient(120deg, rgba(8,26,52,.9), rgba(8,20,40,.9));
  color: #e0f2fe;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(3,105,161,.2), inset 0 1px 0 rgba(255,255,255,.1);
  transition: transform .16s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.vpn-secondary-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(103,232,249,.62);
  background: linear-gradient(120deg, rgba(10,34,66,.94), rgba(10,26,50,.94));
}

.vpn-devices-panel {
  margin-bottom: 8px;
  padding: 18px 16px 16px;
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,.25);
  background: linear-gradient(180deg, rgba(8,14,30,.95), rgba(6,10,22,.95));
  position: relative;
  overflow: hidden;
}

.vpn-devices-actions {
  margin: 0 0 10px;
}

.vpn-devices-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.vpn-devices-actions .vpn-create-btn {
  margin: 0;
}

.vpn-devices-panel .devices-list {
  margin-top: 8px;
}

.vpn-devices-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  padding: 18px 16px 16px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(8,14,30,.96), rgba(6,10,22,.96));
  pointer-events: none;
}

.vpn-devices-panel.is-loading > :not(.vpn-devices-loading-overlay) {
  opacity: 0;
}

.vpn-devices-panel.is-loading .vpn-devices-loading-overlay {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vpn-devices-loading-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vpn-devices-loading-shape {
  display: block;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .2);
  background: linear-gradient(
    95deg,
    rgba(51, 65, 85, .58) 0%,
    rgba(148, 163, 184, .2) 48%,
    rgba(51, 65, 85, .58) 100%
  );
  background-size: 220% 100%;
  animation: vpnDevicesSkeletonShimmer 1.25s linear infinite;
}

.vpn-devices-loading-title {
  width: 126px;
  height: 24px;
}

.vpn-devices-loading-chip {
  width: 64px;
  height: 24px;
}

.vpn-devices-loading-summary {
  width: 100%;
  height: 52px;
  border-radius: 16px;
}

.vpn-devices-loading-create {
  width: 100%;
  height: 54px;
  border-radius: 18px;
}

.vpn-devices-loading-card {
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(8,16,32,.9);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vpn-devices-loading-card-name {
  width: 58%;
  height: 24px;
}

.vpn-devices-loading-card-name.is-short {
  width: 44%;
}

.vpn-devices-loading-card-meta {
  width: 42%;
  height: 22px;
}

.vpn-devices-loading-card-status {
  width: 52%;
  height: 24px;
}

.vpn-devices-loading-card-status.is-wide {
  width: 64%;
}

@keyframes vpnDevicesSkeletonShimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.vpn-devices-head h4 {
  font-size: 18px;
  font-weight: 800;
}

.vpn-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.vpn-count-chip {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(34,211,238,.35);
  color: #cffafe;
  background: rgba(8,20,40,.85);
  font-size: 12px;
  font-weight: 700;
}

.vpn-head-tools .vpn-refresh-btn {
  min-height: 44px;
  width: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(45,212,191,.44);
  background: linear-gradient(155deg, rgba(8,31,56,.94), rgba(5,16,33,.92));
  color: #ccfbf1;
  font-size: 0;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
  box-shadow:
    0 10px 24px rgba(8,47,73,.22),
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -10px 18px rgba(2,6,23,.28);
  transition:
    transform .16s ease,
    border-color .22s ease,
    filter .22s ease,
    box-shadow .24s ease,
    background .24s ease;
}

.vpn-head-tools .vpn-refresh-btn::before {
  content: "";
  position: absolute;
  inset: -52%;
  background: linear-gradient(120deg, transparent 44%, rgba(186,230,253,.38) 50%, transparent 56%);
  transform: translateX(-48%) rotate(10deg);
  opacity: 0;
  transition: opacity .24s ease, transform .34s ease;
  pointer-events: none;
}

.vpn-head-tools .vpn-refresh-btn::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,.06);
  pointer-events: none;
}

.vpn-head-tools .vpn-refresh-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  line-height: 1;
  transform-origin: 50% 50%;
}

.vpn-head-tools .vpn-refresh-btn:active {
  transform: scale(.96);
}

.vpn-daily-summary {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(56,189,248,.36);
  background:
    radial-gradient(180px 90px at 100% 0, rgba(14,165,233,.16), transparent 72%),
    linear-gradient(135deg, rgba(10,28,52,.9), rgba(7,20,42,.88));
  box-shadow:
    0 10px 22px rgba(2,6,23,.3),
    inset 0 1px 0 rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vpn-daily-summary-label {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .03em;
  color: rgba(191,219,254,.8);
}

.vpn-daily-summary-value {
  font-size: 17px;
  line-height: 1.1;
  font-weight: 800;
  color: #e0f2fe;
  text-shadow: 0 6px 14px rgba(2,6,23,.42);
  white-space: nowrap;
}

.vpn-daily-summary.is-zero {
  border-color: rgba(148,163,184,.34);
}

.vpn-daily-summary.is-zero .vpn-daily-summary-value {
  color: rgba(226,232,240,.85);
}

/* TOPUP */
.topup-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 26px;
  border: 1px solid rgba(34,197,94,.3);
  background:
    radial-gradient(420px 170px at 100% 0, rgba(34,197,94,.22), transparent 70%),
    radial-gradient(360px 190px at 0 100%, rgba(134,239,172,.18), transparent 72%),
    linear-gradient(150deg, #0c1a12 0%, #0a1610 54%, #07110c 100%);
  box-shadow: 0 18px 34px rgba(0,0,0,.34);
}

.topup-kicker {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #dcfce7;
  border: 1px solid rgba(34,197,94,.55);
  background: rgba(22,163,74,.22);
}

.topup-title-main {
  font-size: clamp(24px, 5vw, 33px);
  font-weight: 800;
  line-height: 1.08;
  max-width: 15ch;
}

.topup-sub-main {
  margin-top: 10px;
  color: rgba(220,252,231,.82);
  line-height: 1.4;
  max-width: 45ch;
}

.topup-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topup-tag {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  color: #dcfce7;
  border: 1px solid rgba(34,197,94,.28);
  background: rgba(6,78,45,.45);
}

#topup {
  padding-bottom: 92px;
}

.topup-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 18px 16px 16px;
  border-radius: 26px;
  border: 1px solid rgba(52,211,153,.24);
  background:
    radial-gradient(340px 160px at 105% -12%, rgba(34,197,94,.16), transparent 72%),
    radial-gradient(300px 150px at -10% 115%, rgba(16,185,129,.12), transparent 74%),
    linear-gradient(180deg, rgba(12,26,18,.95), rgba(8,18,12,.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 16px 30px rgba(3,11,7,.28);
}

.topup-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(187,247,208,.06), transparent 46%);
}

.topup-block + .topup-block {
  margin-top: 16px;
}

.topup-block-title {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #e6f9ee;
}

.topup-tariff-note {
  margin: 0 0 11px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid rgba(125,211,252,.18);
  background: linear-gradient(130deg, rgba(10,31,22,.74), rgba(9,25,18,.68));
  color: rgba(220,252,231,.9);
  font-size: 12px;
  line-height: 1.35;
}

.topup-block-head {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topup-block-head .topup-block-title {
  margin-bottom: 0;
}

.topup-payment-head {
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(74,222,128,.24);
  background: linear-gradient(130deg, rgba(9,37,23,.68), rgba(7,24,16,.54));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.topup-payment-title {
  font-size: clamp(18px, 4.9vw, 26px);
  line-height: 1.08;
  letter-spacing: -.01em;
}

.topup-payment-badge {
  width: clamp(100px, 33vw, 144px);
  height: auto;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.topup-method-info {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.topup-method-tags {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.topup-method-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(74,222,128,.18);
  background: rgba(11,33,22,.58);
  color: #f0fdf4;
  font-size: 13px;
  font-weight: 700;
}

.topup-method-tag-combined {
  gap: 8px;
}

.topup-method-side {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topup-method-slash {
  flex-shrink: 0;
  color: rgba(220,252,231,.62);
  font-weight: 600;
}

.topup-method-tag-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(34,197,94,.18);
}

.topup-method-tag-icon-card {
  font-size: 15px;
  line-height: 1;
  background: rgba(250,204,21,.16);
}

.topup-method-icon-img {
  width: 20px;
  height: 20px;
  display: block;
}

.topup-method-commission {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(220,252,231,.88);
  text-align: left;
  letter-spacing: .01em;
}

.topup-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.topup-plan-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(74,222,128,.2);
  background: linear-gradient(165deg, rgba(8,34,20,.6), rgba(7,28,18,.66));
  color: #fff;
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition:
    transform .24s cubic-bezier(.22,.78,.24,1),
    border-color .2s ease,
    background .2s ease,
    box-shadow .24s ease;
}

.topup-plan-card::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(167,243,208,0), rgba(167,243,208,.22), rgba(167,243,208,0));
}

.topup-plan-card.active {
  border-color: rgba(74,222,128,.78);
  background: linear-gradient(160deg, rgba(13,54,32,.78), rgba(10,41,25,.8));
  box-shadow:
    0 10px 18px rgba(16,185,129,.16),
    inset 0 0 0 1px rgba(167,243,208,.18);
  transform: translateY(-2px);
}

.topup-plan-card:hover {
  transform: translateY(-1px);
  border-color: rgba(74,222,128,.58);
}

.topup-plan-card:focus-visible {
  outline: 2px solid rgba(125,211,252,.78);
  outline-offset: 2px;
}

.topup-plan-amount {
  display: block;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.topup-plan-period {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: rgba(236,253,245,.92);
}

.topup-divider {
  position: relative;
  height: 14px;
  margin: 14px 8px 16px;
}

.topup-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
  background: linear-gradient(
    90deg,
    rgba(74,222,128,0) 0%,
    rgba(74,222,128,.5) 18%,
    rgba(187,247,208,.92) 50%,
    rgba(74,222,128,.5) 82%,
    rgba(74,222,128,0) 100%
  );
}

.topup-divider::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: 50%;
  height: 8px;
  transform: translateY(-50%);
  background: radial-gradient(ellipse at center, rgba(74,222,128,.28), rgba(74,222,128,0) 72%);
  filter: blur(2px);
  opacity: .78;
  pointer-events: none;
}

.topup-promo-hint {
  margin-bottom: 10px;
  color: rgba(187,247,208,.82);
  font-size: 13px;
  line-height: 1.35;
}

.topup-promo-open-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(74,222,128,.46);
  background: linear-gradient(120deg, rgba(10,44,25,.9), rgba(8,33,20,.94));
  color: #ecfdf5;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(22,163,74,.24), inset 0 1px 0 rgba(255,255,255,.13);
  transition: transform .18s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.topup-promo-open-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(74,222,128,.72);
  background: linear-gradient(120deg, rgba(12,56,31,.95), rgba(10,42,24,.95));
  box-shadow: 0 10px 22px rgba(22,163,74,.3), inset 0 1px 0 rgba(255,255,255,.14);
}

.topup-promo-open-btn:active {
  transform: translateY(0) scale(.99);
}

.topup-offer-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(34,197,94,.3);
  background: rgba(8,34,20,.45);
  cursor: pointer;
}

.topup-offer-consent.is-invalid {
  border-color: rgba(239,68,68,.9);
  background: rgba(127,29,29,.24);
  box-shadow: 0 0 0 1px rgba(239,68,68,.32) inset;
}

.topup-offer-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: #22c55e;
  cursor: pointer;
}

.topup-offer-consent.is-invalid .topup-offer-checkbox {
  accent-color: #ef4444;
}

.topup-offer-copy {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(220,252,231,.92);
}

.topup-offer-copy a {
  color: #86efac;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.topup-offer-copy a:hover {
  color: #bbf7d0;
}

.topup-offer-error {
  margin-top: 6px;
  margin-left: 30px;
  color: #f87171;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.topup-pay-btn span {
  display: inline-block;
  margin-left: 4px;
  color: #dcfce7;
}

.primary-btn.topup-pay-btn {
  position: fixed;
  left: 12px;
  right: 12px;
  width: auto;
  bottom: calc(env(safe-area-inset-bottom) + var(--footer-extra-bottom) + 98px);
  z-index: 24;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  border: 1px solid rgba(34,197,94,.6);
  background: linear-gradient(110deg, #16a34a 0%, #15803d 56%, #166534 100%);
  box-shadow: 0 10px 22px rgba(34,197,94,.28), inset 0 1px 0 rgba(255,255,255,.18);
  transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}

.topup-pay-btn.is-visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.payment-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(48% 34% at 50% 38%, rgba(34,197,94,.18), rgba(34,197,94,0) 72%),
    rgba(2,6,23,.62);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}

.payment-loading-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.payment-loading-card {
  width: min(90vw, 340px);
  padding: 22px 18px 18px;
  border-radius: 20px;
  border: 1px solid rgba(74,222,128,.34);
  background:
    radial-gradient(180px 88px at 100% 0, rgba(16,185,129,.22), transparent 72%),
    linear-gradient(165deg, rgba(8,26,17,.94), rgba(7,20,14,.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 18px 38px rgba(2,12,8,.46);
  text-align: center;
}

.payment-loading-visual {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
}

.payment-loading-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    rgba(16,185,129,.08),
    rgba(16,185,129,.95),
    rgba(34,211,238,.86),
    rgba(16,185,129,.08)
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 0);
  animation: paymentLoaderSpin 1.1s linear infinite;
}

.payment-loading-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(220,252,231,.95), rgba(16,185,129,.88));
  box-shadow:
    0 0 0 6px rgba(16,185,129,.13),
    0 0 24px rgba(16,185,129,.5);
  animation: paymentLoaderCorePulse 1.25s ease-in-out infinite;
}

.payment-loading-pulse {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(167,243,208,.36);
  animation: paymentLoaderWave 1.55s ease-out infinite;
}

.payment-loading-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #ecfdf5;
}

.payment-loading-subtitle {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.42;
  color: rgba(220,252,231,.82);
}

.happ-loading-overlay {
  background:
    radial-gradient(48% 34% at 50% 38%, rgba(125,211,252,.22), rgba(125,211,252,0) 72%),
    rgba(2,6,23,.62);
}

.happ-loading-card {
  border-color: rgba(125,211,252,.42);
  background:
    radial-gradient(180px 88px at 100% 0, rgba(56,189,248,.26), transparent 72%),
    linear-gradient(165deg, rgba(7,22,42,.94), rgba(6,18,34,.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    0 18px 38px rgba(3,15,32,.5);
}

.happ-loading-card .payment-loading-ring {
  background: conic-gradient(
    from 210deg,
    rgba(56,189,248,.08),
    rgba(56,189,248,.95),
    rgba(147,197,253,.86),
    rgba(56,189,248,.08)
  );
}

.happ-loading-card .payment-loading-core {
  background: radial-gradient(circle at 35% 30%, rgba(224,242,254,.96), rgba(56,189,248,.9));
  box-shadow:
    0 0 0 6px rgba(56,189,248,.14),
    0 0 24px rgba(56,189,248,.52);
}

.happ-loading-card .payment-loading-pulse {
  border-color: rgba(125,211,252,.42);
}

.happ-loading-card .payment-loading-title {
  color: #e0f2fe;
}

.happ-loading-card .payment-loading-subtitle {
  color: rgba(186,230,253,.86);
}

@keyframes paymentLoaderSpin {
  to { transform: rotate(1turn); }
}

@keyframes paymentLoaderCorePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(.92); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes paymentLoaderWave {
  0% {
    opacity: .7;
    transform: scale(.84);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

.glow-btn {
  box-shadow: 0 12px 32px rgba(79,70,229,.45);
}

/* PROFILE */
.profile-hero {
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(96,165,250,.28);
  background:
    radial-gradient(420px 160px at 100% 0, rgba(59,130,246,.2), transparent 70%),
    linear-gradient(150deg, #081425 0%, #09162c 56%, #061022 100%);
  box-shadow: 0 16px 32px rgba(0,0,0,.3);
}

.profile-kicker {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #dbeafe;
  border: 1px solid rgba(96,165,250,.45);
  background: rgba(30,64,175,.24);
}

.profile-title {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 800;
  line-height: 1.1;
}

.profile-subtitle {
  margin-top: 10px;
  color: rgba(219,234,254,.82);
  line-height: 1.4;
}

.profile-history-panel {
  margin-bottom: 10px;
  padding: 18px 16px 14px;
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,.24);
  background: linear-gradient(180deg, rgba(8,14,30,.95), rgba(5,10,22,.95));
}

.profile-history-head {
  margin-bottom: 12px;
}

.profile-history-head h4 {
  margin: 0;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 800;
  line-height: 1.1;
}

.profile-history-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-history-title-two-line {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.04;
}

.profile-history-title-two-line span {
  display: block;
}

.profile-history-actions {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.profile-history-actions-top {
  margin-bottom: 0;
  flex-shrink: 0;
}

.profile-refresh-btn,
.profile-filter-btn {
  min-height: 34px;
  min-width: 112px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.4);
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(10,17,33,.92));
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .16s ease, border-color .2s ease, background .2s ease;
}

.profile-history-actions .history-tool-btn {
  min-height: 54px;
  width: 54px;
  min-width: 54px;
  padding: 0;
  border-radius: 15px;
  border: 1px solid rgba(125,211,252,.46);
  background: linear-gradient(155deg, rgba(8,31,56,.94), rgba(5,16,33,.92));
  color: #e6f5ff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
  box-shadow:
    0 10px 24px rgba(8,47,73,.26),
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -10px 18px rgba(2,6,23,.3);
  transition:
    transform .16s ease,
    border-color .22s ease,
    filter .22s ease,
    box-shadow .24s ease,
    background .24s ease;
}

.profile-history-actions .history-tool-btn::before {
  content: "";
  position: absolute;
  inset: -52%;
  background: linear-gradient(120deg, transparent 44%, rgba(186,230,253,.38) 50%, transparent 56%);
  transform: translateX(-48%) rotate(10deg);
  opacity: 0;
  transition: opacity .24s ease, transform .34s ease;
  pointer-events: none;
}

.profile-history-actions .history-tool-btn::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  pointer-events: none;
}

.profile-history-actions .history-tool-btn:active {
  transform: scale(.96);
}

.profile-history-actions .history-refresh-btn {
  border-color: rgba(45,212,191,.52);
  color: #ccfbf1;
}

.profile-history-actions .history-filter-btn {
  border-color: rgba(129,140,248,.52);
  color: #e0e7ff;
}

.profile-history-actions .history-filter-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .profile-history-actions .history-tool-btn {
    width: 50px;
    min-width: 50px;
    min-height: 50px;
    font-size: 22px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .profile-refresh-btn:hover,
  .profile-filter-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(125,211,252,.58);
    background: linear-gradient(180deg, rgba(18,31,55,.95), rgba(10,23,44,.95));
  }

  .profile-history-actions .history-tool-btn:hover {
    border-color: rgba(125,211,252,.82);
    filter: brightness(1.08);
    box-shadow:
      0 12px 28px rgba(6,182,212,.3),
      0 0 0 3px rgba(56,189,248,.12),
      inset 0 1px 0 rgba(255,255,255,.2),
      inset 0 -10px 18px rgba(2,6,23,.24);
  }

  .profile-history-actions .history-tool-btn:hover::before {
    opacity: .94;
    transform: translateX(-18%) rotate(10deg);
  }

  .profile-history-actions .history-refresh-btn:hover {
    border-color: rgba(94,234,212,.88);
  }

  .profile-history-actions .history-filter-btn:hover {
    border-color: rgba(165,180,252,.84);
  }

  .vpn-head-tools .vpn-refresh-btn:hover {
    border-color: rgba(94,234,212,.82);
    filter: brightness(1.08);
    box-shadow:
      0 12px 28px rgba(6,182,212,.28),
      0 0 0 3px rgba(56,189,248,.1),
      inset 0 1px 0 rgba(255,255,255,.2),
      inset 0 -10px 18px rgba(2,6,23,.24);
  }

  .vpn-head-tools .vpn-refresh-btn:hover::before {
    opacity: .94;
    transform: translateX(-18%) rotate(10deg);
  }
}

.profile-refresh-btn.is-refresh-busy,
.referral-refresh-btn.is-refresh-busy {
  pointer-events: none;
  animation: refreshButtonBusy .74s ease-in-out infinite;
}

.vpn-head-tools .vpn-refresh-btn.is-refresh-busy {
  animation: none;
}

.vpn-head-tools .vpn-refresh-btn.is-refresh-busy .vpn-refresh-btn-icon {
  animation: vpnRefreshIconSpin .74s linear infinite;
}

.profile-history-table.is-refresh-updated,
.referral-stats-grid.is-refresh-updated,
.referral-list-table.is-refresh-updated,
.referral-leaderboard-table.is-refresh-updated,
.vpn-daily-summary.is-refresh-updated,
.balance.is-refresh-updated {
  animation: refreshSurfaceUpdated .56s ease;
}

.profile-history-row.is-refresh-row-updated {
  animation: refreshRowUpdated .5s ease both;
  animation-delay: var(--refresh-row-delay, 0ms);
}

@keyframes refreshButtonBusy {
  0% {
    filter: brightness(1) saturate(1);
    box-shadow: 0 0 0 0 rgba(56,189,248,.0);
  }
  50% {
    filter: brightness(1.08) saturate(1.08);
    box-shadow: 0 0 0 3px rgba(56,189,248,.14);
  }
  100% {
    filter: brightness(1) saturate(1);
    box-shadow: 0 0 0 0 rgba(56,189,248,.0);
  }
}

@keyframes vpnRefreshIconSpin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes refreshSurfaceUpdated {
  0% {
    filter: brightness(.95) saturate(.96);
    transform: translateY(2px);
  }
  55% {
    filter: brightness(1.08) saturate(1.08);
    transform: translateY(0);
  }
  100% {
    filter: brightness(1) saturate(1);
    transform: translateY(0);
  }
}

@keyframes refreshRowUpdated {
  0% {
    opacity: .62;
    transform: translateY(5px);
    filter: brightness(.92);
  }
  65% {
    opacity: 1;
    transform: translateY(0);
    filter: brightness(1.06);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: brightness(1);
  }
}

.profile-history-table {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.2);
}

.profile-history-row {
  min-height: 48px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 118px 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  border-top: 1px solid rgba(148,163,184,.14);
  background: rgba(9,15,30,.86);
}

.profile-history-row:first-child {
  border-top: none;
}

.profile-history-row-head {
  min-height: 40px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(148,163,184,.9);
  background: rgba(10,18,35,.94);
}

.profile-history-amount-head {
  text-align: right;
}

.profile-history-amount {
  text-align: right;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.profile-history-amount.plus {
  color: #86efac;
}

.profile-history-amount.minus {
  color: #fda4af;
}

.profile-history-empty {
  min-height: 56px;
  display: grid;
  place-items: center;
  color: rgba(148,163,184,.9);
  background: rgba(9,15,30,.86);
  border-top: 1px solid rgba(148,163,184,.14);
  font-size: 13px;
}

/* HELP */
.guide-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 26px;
  border: 1px solid rgba(34, 211, 238, .3);
  background:
    radial-gradient(500px 180px at 100% 0, rgba(16,185,129,.25), transparent 70%),
    radial-gradient(420px 190px at -10% 100%, rgba(245,158,11,.14), transparent 72%),
    linear-gradient(150deg, #0b1328 0%, #07101f 52%, #060c1b 100%);
  box-shadow: 0 16px 34px rgba(0,0,0,.32);
}

.guide-kicker {
  width: fit-content;
  padding: 5px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #c7f9ff;
  background: rgba(34,211,238,.16);
  border: 1px solid rgba(34,211,238,.34);
}

.guide-title {
  font-size: clamp(24px, 4.8vw, 33px);
  font-weight: 800;
  line-height: 1.1;
  max-width: 15ch;
}

.guide-subtitle {
  margin-top: 10px;
  color: var(--guide-text-muted);
  line-height: 1.42;
  max-width: 44ch;
}

.guide-pills {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-pill {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(8, 14, 30, .74);
  border: 1px solid var(--guide-border);
  color: #dbeafe;
  font-size: 12px;
}

.guide-flow {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.guide-step {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--guide-border);
  background: var(--guide-surface);
}

.guide-flow .guide-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 36px;
  bottom: -11px;
  width: 2px;
  height: 16px;
  background: linear-gradient(180deg, rgba(34,211,238,.55), rgba(16,185,129,.55));
}

.guide-step-num {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: #dafeff;
  border: 1px solid rgba(34,211,238,.35);
  background: rgba(8,18,36,.85);
}

.guide-step h4 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.guide-step p {
  margin-top: 4px;
  color: var(--guide-text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.download-cta {
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(34,197,94,.6);
  background: linear-gradient(120deg, rgba(34,197,94,.55), rgba(16,185,129,.6));
  color: #ecfdf5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(34,197,94,.25), inset 0 1px 0 rgba(255,255,255,.2);
  animation: downloadPulse 2.2s ease-in-out infinite;
  transition: transform .18s ease, filter .2s ease;
}

.download-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.download-cta:active {
  transform: translateY(0);
}

.create-cta {
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(59,130,246,.62);
  background: linear-gradient(120deg, rgba(59,130,246,.56), rgba(37,99,235,.62));
  color: #eff6ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37,99,235,.24), inset 0 1px 0 rgba(255,255,255,.18);
  animation: createPulse 2.2s ease-in-out infinite;
  transition: transform .18s ease, filter .2s ease;
}

.create-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.create-cta:active {
  transform: translateY(0);
}

.offer-cta {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid rgba(251,146,60,.62);
  background: linear-gradient(120deg, rgba(251,146,60,.56), rgba(245,158,11,.62));
  color: #fff7ed;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(245,158,11,.24), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .18s ease, filter .2s ease;
}

.offer-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.offer-cta:active {
  transform: translateY(0);
}

/* OFFER MODAL */
.offer-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.offer-modal.open {
  display: block;
}

.offer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .84);
  opacity: 0;
  animation: promoFade .2s ease forwards;
}

.offer-modal-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(94vw, 760px);
  max-height: min(90vh, 860px);
  overflow-y: auto;
  padding: 18px 16px 16px;
  border-radius: 24px;
  border: 1px solid rgba(251,146,60,.42);
  background:
    radial-gradient(300px 170px at 100% 0, rgba(251,146,60,.16), transparent 72%),
    radial-gradient(340px 170px at 0 100%, rgba(45,212,191,.14), transparent 74%),
    linear-gradient(168deg, #071122 0%, #091223 52%, #060d19 100%);
  box-shadow: 0 24px 48px rgba(0,0,0,.5);
  transform: translate(-50%, -46%) scale(.96);
  opacity: 0;
  animation: promoPop .24s cubic-bezier(.2,.8,.2,1) forwards;
}

.offer-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid rgba(148,163,184,.45);
  background: rgba(15,23,42,.78);
  color: #e2e8f0;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .14s ease, border-color .2s ease, background .2s ease;
}

.offer-modal-close:hover {
  border-color: rgba(251,191,36,.62);
  background: rgba(15,23,42,.96);
}

.offer-modal-close:active {
  transform: scale(.96);
}

.offer-modal-kicker {
  width: fit-content;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #ffedd5;
  border: 1px solid rgba(251,146,60,.45);
  background: linear-gradient(120deg, rgba(251,146,60,.2), rgba(245,158,11,.14));
}

.offer-modal-title {
  margin: 0;
  margin-right: 38px;
  font-size: clamp(24px, 5.4vw, 32px);
  line-height: 1.06;
  font-weight: 800;
}

.offer-modal-revision {
  margin-top: 8px;
  color: rgba(251,243,219,.86);
  font-size: 13px;
}

.offer-content {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.offer-section {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(6,14,30,.72);
}

.offer-section h4 {
  margin: 0;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: .01em;
}

.offer-section p {
  margin: 0;
  color: rgba(226,232,240,.92);
  font-size: 12px;
  line-height: 1.45;
}

.offer-section p + p {
  margin-top: 8px;
}

.offer-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: rgba(226,232,240,.92);
  font-size: 12px;
  line-height: 1.45;
}

.offer-list li + li {
  margin-top: 5px;
}

@media (max-width: 560px) {
  .offer-modal-card {
    width: min(95vw, 760px);
    padding: 16px 12px 14px;
    border-radius: 20px;
  }
}

@keyframes downloadPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34,197,94,.15), 0 12px 24px rgba(34,197,94,.25);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(34,197,94,.22), 0 16px 30px rgba(34,197,94,.3);
  }
}

@keyframes createPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59,130,246,.15), 0 12px 24px rgba(37,99,235,.24);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(59,130,246,.2), 0 16px 30px rgba(37,99,235,.32);
  }
}

.guide-platforms {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--guide-border);
  background: linear-gradient(180deg, rgba(8,13,28,.96), rgba(6,10,20,.96));
}

.guide-section-head h4 {
  font-size: 19px;
  font-weight: 800;
}

.guide-section-head p {
  margin-top: 4px;
  margin-bottom: 12px;
  color: var(--guide-text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.guide-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guide-platform {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  border: 1px solid var(--guide-border);
  background: rgba(10,16,32,.84);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.guide-platform:hover {
  transform: translateY(-2px);
  border-color: rgba(34,211,238,.6);
  background: rgba(12,20,38,.96);
}

.guide-platform-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  color: #e8f2ff;
}

.guide-platform-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.guide-platform-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.guide-faq {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--guide-border);
  background: linear-gradient(180deg, rgba(7,12,24,.94), rgba(5,9,18,.95));
}

.guide-faq-item {
  background: rgba(10,16,32,.86);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  padding: 12px 14px;
}

.guide-faq-item + .guide-faq-item {
  margin-top: 9px;
}

.guide-faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}

.guide-faq-item summary::after {
  content: "+";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(34,211,238,.18);
  color: #cffafe;
  font-weight: 800;
}

.guide-faq-item[open] summary::after {
  content: "−";
}

.guide-faq-item p {
  margin-top: 9px;
  color: var(--guide-text-muted);
  font-size: 13px;
  line-height: 1.42;
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .6s ease forwards;
}

.reveal.delay-1 { animation-delay: .08s; }
.reveal.delay-2 { animation-delay: .16s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* COMMON BUTTON */
.primary-btn {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(99,102,241,.6);
  background: linear-gradient(110deg, #4f46e5 0%, #4338ca 56%, #3730a3 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(79,70,229,.3), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .18s ease, filter .2s ease, box-shadow .22s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.primary-btn:active {
  transform: translateY(0) scale(.99);
}

.primary-btn:disabled {
  cursor: default;
  opacity: .72;
  filter: saturate(.8);
  transform: none;
}

.primary-btn.vpn-create-btn {
  border-color: rgba(66, 153, 225, .7);
  background: linear-gradient(90deg, #0ea5a6, #2563eb);
  box-shadow: 0 16px 34px rgba(6, 24, 54, .44);
}

/* DEVICES */
.devices-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.devices-list.is-busy {
  pointer-events: none;
}

.devices-list.is-busy .device-card {
  opacity: .58;
  filter: saturate(.78);
}

.devices-list.is-busy::after {
  content: "Создаём подключение...";
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(2, 6, 23, .34);
  color: rgba(226, 232, 240, .96);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  backdrop-filter: blur(2px);
}

.devices-empty {
  color: rgba(226,232,240,.68);
  padding: 10px 2px;
  font-size: 14px;
}

.device-card {
  background: rgba(8,16,32,.92);
  color: #f8fafc;
  border-radius: 18px;
  padding: 12px;
  border: 1px solid rgba(148,163,184,.25);
  position: relative;
  overflow: visible;
  transition: border-color .22s ease, box-shadow .22s ease;
}

.device-card.menu-open {
  border-color: rgba(56,189,248,.46);
  box-shadow: 0 12px 22px rgba(8,145,178,.2);
  z-index: 40;
}

.device-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.device-main {
  flex: 1;
  min-width: 0;
}

.device-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-tools {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.device-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-menu-toggle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(125,211,252,.5);
  background: linear-gradient(180deg, rgba(13,42,71,.96), rgba(10,30,53,.96));
  color: #bae6fd;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding-left: .18em;
  transition: transform .16s ease, border-color .2s ease, filter .2s ease, box-shadow .2s ease, background .2s ease;
}

.device-menu-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(125,211,252,.74);
  filter: brightness(1.08);
  box-shadow: 0 8px 16px rgba(8,145,178,.2);
}

.device-menu-toggle:active {
  transform: translateY(0) scale(.97);
}

.device-card.menu-open .device-menu-toggle,
.device-menu-toggle[aria-expanded="true"] {
  border-color: rgba(103,232,249,.88);
  background: linear-gradient(180deg, rgba(15,52,82,.98), rgba(10,33,57,.98));
  box-shadow: 0 0 0 2px rgba(34,211,238,.14), 0 8px 16px rgba(8,145,178,.22);
}

.device-menu {
  position: fixed;
  left: var(--device-menu-left, 8px);
  top: var(--device-menu-top, 8px);
  width: var(--device-menu-width, min(228px, calc(100vw - 16px)));
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.4);
  background: rgba(18,35,58,.96);
  box-shadow: 0 14px 26px rgba(2,6,23,.46);
  backdrop-filter: blur(8px);
  max-height: var(--device-menu-max-height, min(304px, calc(100vh - 24px)));
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(-5px);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 80;
}

.device-card.menu-open .device-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.device-card.menu-open.menu-open-up .device-menu {
  transform-origin: bottom right;
}

.device-card.menu-open.menu-open-side-left .device-menu {
  transform-origin: center right;
}

.device-card.menu-open.menu-open-side-right .device-menu {
  transform-origin: center left;
}

.device-menu-item {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.02);
  color: #e2e8f0;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .16s ease, color .18s ease;
}

.device-menu-item + .device-menu-item {
  margin-top: 3px;
}

.device-menu-item:hover {
  border-color: rgba(125,211,252,.34);
  background: rgba(125,211,252,.14);
  color: #eff6ff;
  transform: none;
}

.device-menu-item:active {
  transform: scale(.99);
}

.device-menu-label {
  font-size: 13px;
  font-weight: 610;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-menu-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(148,163,184,.34);
  background: rgba(15,23,42,.52);
  display: grid;
  place-items: center;
  position: relative;
  font-size: 12px;
  line-height: 1;
  color: rgba(186,230,253,.92);
}

.device-menu-icon.icon-rename,
.device-menu-icon.icon-copy {
  color: rgba(191,219,254,.95);
}

.device-menu-icon.icon-qr {
  color: rgba(103,232,249,.95);
  border-color: rgba(45,212,191,.44);
  background: rgba(8,48,57,.54);
}

.device-menu-icon.icon-happ {
  color: #e0f2fe;
  border-color: rgba(125,211,252,.62);
  background: rgba(14,116,144,.54);
  font-size: 15px;
  font-weight: 800;
}

.device-menu-item.accent-happ {
  background: rgba(56,189,248,.22);
  border-color: rgba(125,211,252,.42);
  color: #ecfeff;
}

.device-menu-item.accent-happ:hover {
  background: rgba(56,189,248,.3);
  border-color: rgba(125,211,252,.58);
}

.device-menu-item.danger {
  color: #fecaca;
  margin-top: 3px;
  position: relative;
  background: rgba(248,113,113,.12);
  border-color: rgba(248,113,113,.3);
}

.device-menu-item.danger::before {
  display: none;
}

.device-menu-item.danger .device-menu-icon {
  color: #fda4af;
  border-color: rgba(248,113,113,.45);
  background: rgba(88,28,35,.54);
}

.device-menu-item.danger:hover {
  border-color: rgba(248,113,113,.46);
  background: rgba(88,28,35,.42);
}

.device-menu-item.is-locked,
.device-menu-item:disabled {
  cursor: not-allowed;
  color: rgba(148, 163, 184, .9);
  border-color: rgba(148, 163, 184, .28);
  background: rgba(51, 65, 85, .34);
}

.device-menu-item.is-locked:hover,
.device-menu-item:disabled:hover {
  border-color: rgba(148, 163, 184, .28);
  background: rgba(51, 65, 85, .34);
  color: rgba(148, 163, 184, .9);
}

.device-menu-item.is-locked .device-menu-icon,
.device-menu-item:disabled .device-menu-icon {
  color: rgba(148, 163, 184, .88);
  border-color: rgba(148, 163, 184, .32);
  background: rgba(30, 41, 59, .52);
}

.device-menu-item.is-locked.show-lock-hint::after {
  content: "Пополните баланс";
  grid-column: 2 / 3;
  margin-top: -7px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: .01em;
}

.device-menu-item.is-loading {
  pointer-events: none;
  opacity: .92;
}

.device-menu-item.is-loading .device-menu-icon {
  color: transparent;
  border-color: rgba(148,163,184,.4);
}

.device-menu-item.is-loading .device-menu-icon::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(226,232,240,.4);
  border-top-color: #f8fafc;
  animation: createVpnSpin .8s linear infinite;
  flex-shrink: 0;
}

.device-meta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.device-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.device-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(148,163,184,.34);
  color: #cbd5e1;
  background: rgba(15,23,42,.8);
}

.device-status.active {
  color: #86efac;
  border-color: rgba(74,222,128,.42);
  background: rgba(20,83,45,.36);
}

.device-status.inactive {
  color: #fda4af;
  border-color: rgba(248,113,113,.42);
  background: rgba(127,29,29,.32);
}

.device-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.device-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
}

.device-status.active::before {
  background: #22c55e;
  box-shadow: 0 0 0 rgba(34,197,94,0);
  animation: deviceStatusLedPulse 1.7s ease-in-out infinite;
}

.device-status.inactive::before {
  background: #f87171;
  box-shadow: none;
}

.device-disabled-reason {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 600;
  color: #fca5a5;
  letter-spacing: .01em;
  text-shadow: 0 1px 10px rgba(127, 29, 29, .28);
}

@keyframes deviceStatusLedPulse {
  0%,
  100% {
    opacity: .5;
    box-shadow:
      0 0 0 0 rgba(34,197,94,0),
      0 0 0 0 rgba(74,222,128,0);
  }
  50% {
    opacity: 1;
    box-shadow:
      0 0 0 2px rgba(34,197,94,.2),
      0 0 8px 2px rgba(74,222,128,.55);
  }
}

/* FOOTER */
.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 12px calc(env(safe-area-inset-bottom) + var(--footer-extra-bottom) + 16px);
  height: auto;
  background: transparent;
  border-top: none;
  backdrop-filter: none;
  pointer-events: none;
  z-index: 20;
  isolation: isolate;
}

.footer::before,
.footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.footer::before {
  top: calc(74px / 2);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.008) 58%,
    rgba(255,255,255,.015) 100%
  );
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.55) 50%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.55) 50%, #000 100%);
}

.footer::after {
  top: calc(74px / 2 + 12px);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.012) 62%,
    rgba(255,255,255,.022) 100%
  );
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.42) 40%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.42) 40%, #000 100%);
}

.footer-shell {
  pointer-events: auto;
  position: relative;
  z-index: 3;
  overflow: hidden;
  height: 74px;
  border-radius: 20px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background:
    radial-gradient(320px 120px at -6% -30%, rgba(56,189,248,.16), transparent 72%),
    radial-gradient(300px 120px at 106% 120%, rgba(16,185,129,.16), transparent 74%),
    linear-gradient(180deg, rgba(8,15,30,.35), rgba(5,10,20,.35));
  border: 1px solid rgba(148,163,184,.22);
  backdrop-filter: blur(12px);
  box-shadow:
    0 6px 16px rgba(0,0,0,.14),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.footer-glide {
  position: absolute;
  top: 6px;
  left: 0;
  width: calc((100% - 12px) / 3);
  height: calc(100% - 12px);
  border-radius: 14px;
  background:
    radial-gradient(160px 60px at 50% 0, rgba(34,211,238,.24), transparent 75%),
    linear-gradient(180deg, rgba(7,29,42,.95), rgba(6,21,33,.95));
  border: 1px solid rgba(56,189,248,.5);
  box-shadow: 0 14px 28px rgba(6,182,212,.2), inset 0 1px 0 rgba(255,255,255,.14);
  pointer-events: none;
  opacity: 0;
  transform: translateX(0);
  transition: transform .32s cubic-bezier(.2,.82,.2,1), width .32s cubic-bezier(.2,.82,.2,1), opacity .2s ease;
  will-change: transform, width;
}

.footer-item {
  appearance: none;
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  border-radius: 14px;
  color: #8da2c2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .2s ease, color .22s ease, filter .22s ease;
}

.footer-item-icon {
  width: 20px;
  height: 20px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  transition: transform .24s ease, filter .24s ease;
}

.footer-icon-svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
}

.footer-item-label {
  line-height: 1.05;
}

.footer-bonus-sticker {
  position: absolute;
  top: 5px;
  right: 6px;
  min-width: 0;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(163,230,53,.9);
  background:
    radial-gradient(90px 40px at 24% 10%, rgba(163,230,53,.28), transparent 62%),
    linear-gradient(180deg, rgba(56,95,42,.92), rgba(34,72,31,.9));
  box-shadow:
    0 6px 14px rgba(22,101,52,.3),
    inset 0 0 0 1px rgba(190,242,100,.2);
  color: #ecfccb;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}

.footer-item[data-tab="referral"].active .footer-bonus-sticker {
  border-color: rgba(190,242,100,.96);
  box-shadow:
    0 8px 16px rgba(22,101,52,.34),
    0 0 12px rgba(163,230,53,.18),
    inset 0 0 0 1px rgba(217,249,157,.25);
}

.footer-item:hover {
  color: #c9dcf7;
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.footer-item:active {
  transform: translateY(1px);
}

.footer-item.active {
  color: #f0fdff;
  text-shadow: 0 0 12px rgba(34,211,238,.34);
}

.footer-item.active .footer-item-icon {
  transform: translateY(-1px) scale(1.04);
  filter: drop-shadow(0 0 8px rgba(34,211,238,.34));
}

.footer-nav-item.active {
  animation: none;
}

.footer-shell::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226,232,240,.38), transparent);
  pointer-events: none;
}

@media (max-width: 760px) {
  .footer-bonus-sticker {
    top: 4px;
    right: 4px;
    min-width: 0;
    height: 18px;
    padding: 0 4px;
    font-size: 9px;
  }
}

/* DESKTOP PHONE-LIKE FRAME */
@media (min-width: 860px) and (hover: hover) and (pointer: fine) {
  :root {
    --desktop-app-width: min(430px, 100vw);
    --desktop-app-left: max(0px, calc((100vw - var(--desktop-app-width)) / 2));
  }

  html,
  body {
    background: #000;
  }

  body::before,
  body::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: var(--desktop-app-left);
    background: #000;
    pointer-events: none;
    z-index: 1000;
  }

  body::before {
    left: 0;
  }

  body::after {
    right: 0;
  }

  .app-header {
    width: var(--desktop-app-width);
    margin-left: auto;
    margin-right: auto;
  }

  .main,
  .footer {
    width: var(--desktop-app-width);
    left: var(--desktop-app-left);
    right: auto;
  }

  .intro-splash,
  .promo-modal,
  .support-modal,
  .download-modal,
  .offer-modal,
  .profile-qr-modal {
    width: var(--desktop-app-width);
    left: var(--desktop-app-left);
    right: auto;
  }

  .drawer {
    width: min(calc(var(--desktop-app-width) - 36px), 340px);
    left: var(--desktop-app-left);
    right: auto;
  }

  .drawer-overlay {
    width: 100vw;
    left: 0;
    right: 0;
  }
}

@keyframes promoFade {
  to { opacity: 1; }
}

@keyframes promoPop {
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (min-width: 720px) {
  .vpn-actions { grid-template-columns: 1.4fr 1fr; }
  .guide-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-flow .guide-step:not(:last-child)::after { display: none; }
  .guide-platform-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
