/* 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 {
  --tour-spot-x: 50vw;
  --tour-spot-y: 50vh;
  --tour-spot-w: 140px;
  --tour-spot-h: 70px;
  --tour-spot-r: 18px;
  position: fixed;
  inset: 0;
  z-index: 920;
  display: none;
  pointer-events: auto;
}

.onboarding-tour.open {
  display: block;
}

.onboarding-tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(680px 420px at 50% 24%, rgba(14,165,233,.12), transparent 72%), rgba(0, 0, 0, .84);
  backdrop-filter: blur(6px);
  transition: background .32s ease, backdrop-filter .32s ease, opacity .32s ease;
}

.onboarding-tour.is-spotlight .onboarding-tour-backdrop {
  background: transparent;
  backdrop-filter: none;
}

.onboarding-tour.no-dim .onboarding-tour-backdrop {
  background: transparent;
  backdrop-filter: none;
}

.onboarding-tour-spotlight {
  position: fixed;
  z-index: 1;
  left: var(--tour-spot-x);
  top: var(--tour-spot-y);
  width: var(--tour-spot-w);
  height: var(--tour-spot-h);
  border-radius: var(--tour-spot-r);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  box-shadow:
    0 0 0 9999px rgba(0,0,0,.82),
    0 0 0 1.5px rgba(255,255,255,.84),
    0 0 30px rgba(148,163,184,.32);
  transition: left .55s cubic-bezier(.22, .61, .36, 1), top .55s cubic-bezier(.22, .61, .36, 1), width .55s cubic-bezier(.22, .61, .36, 1), height .55s cubic-bezier(.22, .61, .36, 1), border-radius .55s cubic-bezier(.22, .61, .36, 1), opacity .2s ease;
}

.onboarding-tour.show-spotlight .onboarding-tour-spotlight {
  opacity: 1;
}

.onboarding-tour.is-quick-setup .onboarding-tour-spotlight {
  pointer-events: auto;
  cursor: pointer;
}

.onboarding-tour-skip {
  position: fixed;
  left: 50%;
  top: max(8px, calc(env(safe-area-inset-top) + 6px));
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(6,10,18,.78);
  color: rgba(241,245,249,.96);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}

.onboarding-tour-skip:active {
  transform: translateX(-50%) scale(.97);
  filter: brightness(1.08);
  border-color: rgba(255,255,255,.42);
}

.onboarding-tour-stage {
  position: fixed;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: min(70.4vw, 256px);
  transform: translate(-50%, -50%);
  transition: left .55s cubic-bezier(.22, .61, .36, 1), top .55s cubic-bezier(.22, .61, .36, 1), width .38s ease, filter .28s ease;
  will-change: left, top, width;
}

.onboarding-tour-content {
  display: none;
  padding: 14px 16px 10px;
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(6,10,18,.82);
  box-shadow: 0 24px 56px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
  color: #e2e8f0;
  text-align: left;
}

.onboarding-tour-title {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 6px;
  letter-spacing: .01em;
}

.onboarding-tour-text {
  font-size: 13.5px;
  line-height: 1.4;
  color: rgba(226,232,240,.92);
}

.onboarding-tour.is-quick-setup .onboarding-tour-stage {
  width: min(84vw, 360px);
}

.onboarding-tour.is-quick-setup .onboarding-tour-content {
  display: block;
}

.onboarding-tour.is-quick-setup .onboarding-tour-video-shell {
  display: none;
}

.onboarding-tour.is-quick-setup .onboarding-tour-next {
  margin-top: 12px;
}

.onboarding-tour.is-download-open .onboarding-tour-content {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(16px);
  filter: blur(2px);
}

.onboarding-tour.is-download-open .onboarding-tour-title {
  font-size: 16px;
}

.onboarding-tour.is-download-open .onboarding-tour-text {
  font-size: 12.5px;
  line-height: 1.3;
}

.onboarding-tour.is-download-open .onboarding-tour-next {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(env(safe-area-inset-bottom) + var(--footer-extra-bottom) + 98px);
  top: auto;
  transform: translateX(-50%);
  width: min(86vw, 360px);
  opacity: 0;
  pointer-events: none;
  filter: blur(2px);
  transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}

.onboarding-tour.is-download-open .onboarding-tour-spotlight {
  pointer-events: none;
}

.onboarding-tour.is-download-open .onboarding-tour-next.is-visible {
  opacity: 1;
  pointer-events: auto;
  filter: none;
}

.onboarding-pulse {
  animation: onboardingPulse 1.1s ease-in-out infinite;
}

@keyframes onboardingPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(56,189,248,.25); }
  50% { transform: scale(1.03); box-shadow: 0 0 16px 4px rgba(56,189,248,.22); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(56,189,248,.25); }
}

.onboarding-tour.is-compact .onboarding-tour-stage {
  width: min(34vw, 132px);
}

.onboarding-tour-video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,.32);
  background: #000;
  box-shadow:
    0 24px 56px rgba(0,0,0,.6),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

.onboarding-tour.is-compact .onboarding-tour-video-shell {
  border-radius: 16px;
}

.onboarding-tour-video {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  background: #000;
  object-fit: cover;
  object-position: 50% 24%;
  transform: scale(1.05);
  transform-origin: center 24%;
}

.onboarding-tour-stage::after {
  content: none;
}

.onboarding-tour-next {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 14px auto 0;
  display: block;
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(10,10,10,.96), rgba(0,0,0,.96));
  color: #f5f5f7;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: transform .25s ease, opacity .25s ease, filter .2s ease;
  box-shadow: 0 12px 24px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
}

.onboarding-tour-next::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -45%;
  width: 34%;
  height: 160%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.88) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(18deg);
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}

.onboarding-tour-next.is-visible::before {
  opacity: .9;
  animation: onboardingNextShine 2.2s ease-in-out infinite;
}

.onboarding-tour-next::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 0 0 0 rgba(255,255,255,.3);
  opacity: 0;
  pointer-events: none;
}

.onboarding-tour-next.is-visible::after {
  opacity: 1;
  animation: onboardingNextPulse 2.2s ease-in-out infinite;
}

.onboarding-tour-next.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.onboarding-tour-next:active {
  transform: translateY(0) scale(.985);
  filter: brightness(1.08);
}

@keyframes onboardingNextShine {
  0% {
    left: -45%;
  }
  30% {
    left: 118%;
  }
  100% {
    left: 118%;
  }
}

@keyframes onboardingNextPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255,255,255,.32);
    border-color: rgba(255,255,255,.5);
  }
  50% {
    box-shadow: 0 0 24px 3px rgba(255,255,255,.24);
    border-color: rgba(255,255,255,.85);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255,255,255,.32);
    border-color: rgba(255,255,255,.5);
  }
}

/* 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(86vw, 360px);
  height: 100dvh;
  background:
    radial-gradient(130% 56% at 110% 0, rgba(34,211,238,.18), transparent 62%),
    radial-gradient(110% 52% at -10% 100%, rgba(16,185,129,.12), transparent 65%),
    linear-gradient(180deg, rgba(8,15,30,.98) 0%, rgba(6,12,25,.98) 56%, rgba(4,9,20,.99) 100%);
  border-right: 1px solid rgba(148,163,184,.25);
  box-shadow: 26px 0 56px rgba(2,6,23,.62);
  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: 2px;
  background: linear-gradient(180deg, rgba(34,211,238,.5), rgba(16,185,129,.35));
}

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

.drawer-inner {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  gap: 12px;
  padding: clamp(14px, 2.2vh, 20px) 16px calc(16px + 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 {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(125,211,252,.26);
  background: linear-gradient(140deg, rgba(14,27,49,.9), rgba(9,19,38,.84));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.drawer-user-meta {
  min-width: 0;
  flex: 1;
  position: relative;
  min-height: 54px;
  padding-right: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.drawer-user-head {
  display: block;
}

.drawer-user-qr-btn {
  position: absolute;
  right: 0;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border-radius: 14px;
  border: 1px solid rgba(45,212,191,.58);
  background: linear-gradient(145deg, rgba(8,42,57,.92), rgba(7,31,52,.9));
  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;
  animation: drawerQrBreath 3.2s ease-in-out infinite;
}

.drawer-user-qr-btn::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: linear-gradient(118deg, transparent 44%, rgba(94,234,212,.45) 50%, transparent 56%);
  transform: translateX(-44%) rotate(10deg);
  opacity: 0;
  pointer-events: none;
  animation: drawerQrScan 4.1s ease-in-out infinite;
}

.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: 22px;
  height: 22px;
  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:active {
  transform: translateY(-50%) 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% {
    transform: translateX(-48%) rotate(10deg);
    opacity: 0;
  }
  42% {
    opacity: .86;
  }
  56% {
    transform: translateX(48%) rotate(10deg);
    opacity: 0;
  }
  100% {
    transform: translateX(48%) rotate(10deg);
    opacity: 0;
  }
}

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

.drawer .user strong {
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: .01em;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer .user small {
  color: rgba(203,213,225,.8);
  font-size: 13px;
}

.drawer .balance-card {
  background:
    radial-gradient(220px 110px at 100% 0, rgba(34,211,238,.2), transparent 70%),
    linear-gradient(170deg, rgba(12,23,44,.95), rgba(8,15,31,.95));
  border-radius: 20px;
  padding: 14px;
  border: 1px solid rgba(56,189,248,.28);
  box-shadow: 0 14px 28px rgba(2,6,23,.34), inset 0 1px 0 rgba(255,255,255,.1);
}

.balance-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(186,230,253,.76);
  margin-bottom: 6px;
}

.balance-card-value {
  font-weight: 800;
  font-size: 24px;
  color: #f8fafc;
  line-height: 1.15;
}

.ghost-btn {
  margin-top: 12px;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 13px;
  border: 1px solid rgba(56,189,248,.42);
  background: linear-gradient(120deg, rgba(8,83,121,.45), rgba(8,56,99,.35));
  color: #e0f2fe;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .16s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.ghost-btn:hover {
  border-color: rgba(125,211,252,.74);
  background: linear-gradient(120deg, rgba(14,116,144,.44), rgba(14,165,233,.3));
  box-shadow: 0 12px 20px rgba(14,165,233,.2), inset 0 1px 0 rgba(255,255,255,.15);
}

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

.drawer-bottom {
  margin-top: auto;
  padding-top: 12px;
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(148,163,184,.14);
}

.drawer .item {
  min-height: 50px;
  padding: 12px 14px 12px 15px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.2);
  background: linear-gradient(140deg, rgba(10,18,35,.76), rgba(7,14,28,.74));
  cursor: default;
  display: flex;
  align-items: center;
  color: #dbe7f5;
  font-size: 15px;
  font-weight: 600;
  transition: color .22s ease, transform .18s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.drawer .item::after {
  content: "›";
  margin-left: auto;
  font-size: 20px;
  line-height: 1;
  color: rgba(148,163,184,.7);
  transform: translateX(0);
  transition: transform .2s ease, color .2s ease;
}

.drawer .item:not([data-drawer-tab]):not([data-drawer-action]) {
  color: rgba(203,213,225,.88);
  border-color: rgba(148,163,184,.16);
}

.drawer .item:not([data-drawer-tab]):not([data-drawer-action])::after {
  content: "";
}

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

.drawer .item[data-drawer-tab]:hover,
.drawer .item[data-drawer-action]:hover,
.drawer .drawer-pick:hover {
  border-color: rgba(125,211,252,.42);
  transform: translateY(-1px);
  box-shadow: 0 12px 18px rgba(2,6,23,.28);
}

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

.drawer-pick {
  border-color: rgba(56,189,248,.4) !important;
  background: linear-gradient(140deg, rgba(7,36,56,.82), rgba(6,29,54,.78)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.drawer-pick.active {
  color: #ecfeff;
  border-color: rgba(34,211,238,.72) !important;
  background: linear-gradient(140deg, rgba(8,83,121,.52), rgba(12,67,131,.44)) !important;
  box-shadow: 0 12px 22px rgba(8,145,178,.28), inset 0 1px 0 rgba(255,255,255,.1);
}

.drawer-pick:active {
  border-color: rgba(34,211,238,.74) !important;
  background: linear-gradient(140deg, rgba(14,116,144,.48), rgba(30,64,175,.46)) !important;
  box-shadow: 0 10px 18px rgba(8,145,178,.24), inset 0 1px 0 rgba(255,255,255,.08);
}

.drawer .item.active {
  color: #ecfeff;
  transform: translateY(-1px);
}

.drawer .item:active,
.ghost-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-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.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.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-faq-item summary {
    font-size: 12px;
  }
}

/* OFFLINE GUARD */
.offline-guard {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  overflow: auto;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(2, 6, 23, .84);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.offline-guard.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.offline-guard-card {
  width: min(100%, 420px);
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(251, 146, 60, .35);
  background:
    radial-gradient(260px 120px at 100% 0, rgba(251,146,60,.16), transparent 70%),
    linear-gradient(170deg, #071225 0%, #08172b 62%, #050d1a 100%);
  box-shadow: 0 24px 44px rgba(0,0,0,.48);
  animation: offlineGuardPop .24s cubic-bezier(.2,.8,.2,1) both;
}

.offline-guard-kicker {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffedd5;
  border: 1px solid rgba(251,146,60,.45);
  background: rgba(194,65,12,.26);
}

.offline-guard-title {
  font-size: 26px;
  line-height: 1.08;
  font-weight: 800;
}

.offline-guard-subtitle {
  margin-top: 8px;
  color: rgba(226,232,240,.86);
  line-height: 1.42;
}

.offline-reload-btn {
  margin-top: 14px;
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(251,146,60,.55);
  background: linear-gradient(110deg, #ea580c 0%, #c2410c 58%, #9a3412 100%);
  box-shadow: 0 12px 26px rgba(249,115,22,.24), inset 0 1px 0 rgba(255,255,255,.15);
}

.offline-guard.is-restored .offline-guard-card {
  border-color: rgba(74,222,128,.6);
  background:
    radial-gradient(280px 130px at 100% 0, rgba(52,211,153,.28), transparent 72%),
    linear-gradient(170deg, #06221f 0%, #073128 58%, #052018 100%);
  box-shadow: 0 24px 44px rgba(0,0,0,.48), 0 0 0 1px rgba(74,222,128,.26) inset;
}

.offline-guard.is-restored .offline-guard-kicker {
  color: #ecfdf5;
  border-color: rgba(110,231,183,.68);
  background: rgba(5,150,105,.38);
}

.offline-guard.is-restored .offline-guard-title {
  color: #ecfdf5;
}

.offline-guard.is-restored .offline-guard-subtitle {
  color: rgba(209,250,229,.92);
}

.offline-guard.is-restored .offline-reload-btn {
  border-color: rgba(110,231,183,.78);
  background: linear-gradient(110deg, #34d399 0%, #10b981 56%, #059669 100%);
  box-shadow: 0 12px 26px rgba(16,185,129,.34), inset 0 1px 0 rgba(255,255,255,.18);
}

.offline-reload-btn.is-pulse {
  animation: offlineReloadPulse 1s ease-in-out infinite;
}

/* MAIN */
.main {
  position: absolute;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  right: 0;
  overflow-y: auto;
  -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 both;
}

.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;
    transform: translateY(14px) scale(.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(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;
  background: linear-gradient(95deg, #0ea5e9, #0284c7);
  box-shadow: 0 10px 24px rgba(14,165,233,.35);
}

.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));
}

.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-head h4 {
  font-size: 18px;
  font-weight: 800;
}

.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;
}

/* 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 {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(34,197,94,.24);
  background: linear-gradient(180deg, rgba(12,26,18,.94), rgba(8,18,12,.95));
}

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

.topup-block-title {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #dcfce7;
}

.topup-method-grid {
  display: grid;
  gap: 10px;
}

.topup-method-card {
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  border: 1px solid rgba(34,197,94,.18);
  background: rgba(8,34,20,.58);
  color: #fff;
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.topup-method-card.active {
  border-color: rgba(34,197,94,.7);
  background: rgba(12,50,29,.68);
  transform: translateY(-1px);
}

.topup-method-card:hover {
  transform: translateY(-1px);
  border-color: rgba(34,197,94,.5);
}

.topup-method-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: rgba(34,197,94,.2);
}

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

.topup-method-body {
  display: grid;
  gap: 2px;
}

.topup-method-name {
  font-size: 15px;
  font-weight: 700;
}

.topup-method-hint {
  font-size: 12px;
  color: rgba(187,247,208,.78);
}

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

.topup-plan-card {
  border: 1px solid rgba(34,197,94,.18);
  background: rgba(8,34,20,.55);
  color: #fff;
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.topup-plan-card.active {
  border-color: rgba(34,197,94,.7);
  background: rgba(12,50,29,.68);
  transform: translateY(-1px);
}

.topup-plan-card:hover {
  transform: translateY(-1px);
  border-color: rgba(34,197,94,.5);
}

.topup-plan-amount {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.topup-plan-period {
  display: block;
  margin-top: 2px;
  font-size: 14px;
}

.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: 42px;
  border-radius: 14px;
  border: 1px solid rgba(34,197,94,.45);
  background: linear-gradient(120deg, rgba(10,44,25,.9), rgba(9,34,20,.92));
  color: #ecfdf5;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(22,163,74,.22), inset 0 1px 0 rgba(255,255,255,.12);
  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-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 {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#topup.view.active ~ #payBtn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.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);
  }
}

.profile-refresh-btn.is-refresh-busy,
.referral-refresh-btn.is-refresh-busy,
.offline-reload-btn.is-refresh-busy {
  pointer-events: none;
  animation: refreshButtonBusy .74s ease-in-out 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,
.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 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);
}

@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;
}

/* 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);
}

.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 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  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-edit {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid rgba(148,163,184,.45);
  background: rgba(15,23,42,.8);
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: transform .16s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.device-edit:hover {
  transform: translateY(-1px);
  border-color: rgba(125,211,252,.65);
  background: rgba(15,35,58,.9);
  color: #e2e8f0;
}

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

.device-copy-tool {
  font-size: 12px;
  line-height: 1;
}

.device-qr-tool {
  border-color: rgba(45,212,191,.48);
  background: linear-gradient(145deg, rgba(6,42,58,.88), rgba(7,28,48,.86));
  color: #67e8f9;
}

.device-qr-tool svg {
  width: 14px;
  height: 14px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.device-qr-tool:hover {
  border-color: rgba(94,234,212,.76);
  background: linear-gradient(145deg, rgba(7,63,71,.92), rgba(8,35,58,.9));
  color: #a5f3fc;
}

.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-delete {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid rgba(248,113,113,.45);
  background: rgba(127,29,29,.24);
  color: #fda4af;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .16s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.device-delete:hover {
  transform: translateY(-1px);
  border-color: rgba(251,113,133,.72);
  background: rgba(127,29,29,.34);
  color: #fecdd3;
}

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

.device-actions {
  margin-top: 12px;
}

.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;
}

@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);
  }
}

.device-add-happ {
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(14,165,233,.55);
  background: linear-gradient(100deg, #0ea5e9 0%, #0284c7 56%, #0369a1 100%);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.device-add-happ:disabled {
  cursor: default;
  opacity: .88;
  filter: saturate(.84);
}

.device-add-happ.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

/* 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-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;
}

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

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

@keyframes offlineGuardPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes offlineReloadPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.03);
    filter: brightness(1.08);
  }
}

@media (min-width: 720px) {
  .vpn-actions { grid-template-columns: 1.4fr 1fr; }
  .topup-method-grid { grid-template-columns: 1fr 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;
  }
}
