:root {
  --bg: #000;
  --text: #fff;
  --muted: #8d8d8d;
  --line: rgba(255, 255, 255, 0.12);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}

body {
  user-select: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.app {
  position: relative;
  width: min(100%, 430px);
  height: 100%;
  height: 100dvh;
  margin: 0 auto;
  background: #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tg-chrome,
.tg-chrome.is-hidden {
  display: none;
}

.tg-chrome__title {
  font-size: 17px;
  font-weight: 600;
}

.tg-chrome__actions {
  display: flex;
}

.tg-chrome__btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.tg-chrome__btn svg {
  width: 22px;
  height: 22px;
}

.screen {
  display: none;
  flex: 1;
  min-height: 0;
}

.screen.is-active {
  display: flex;
  flex-direction: column;
}

.page,
.home {
  flex: 1;
  overflow: auto;
  padding: 8px 16px 24px;
}

.page--tap {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding-bottom: 8px;
}

.coins {
  text-align: center;
  margin: 18px 0 12px;
}

.coins__label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.coins__value {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.goal {
  width: 100%;
  max-width: 320px;
  margin-bottom: 18px;
}

.goal__top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.goal__bar,
.energy__bar {
  height: 8px;
  border-radius: 999px;
  background: #1a1a1a;
  overflow: hidden;
}

.goal__bar i,
.energy__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: inherit;
}

.ape {
  position: relative;
  width: min(66vw, 252px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #030303;
  border: 5px solid rgba(255, 255, 255, 0.58);
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 12px 22px rgba(255, 255, 255, 0.08),
    inset 0 -16px 26px rgba(0, 0, 0, 0.72),
    0 0 18px rgba(255, 255, 255, 0.22),
    0 0 46px rgba(255, 255, 255, 0.09),
    0 18px 34px rgba(0, 0, 0, 0.75);
  touch-action: manipulation;
  isolation: isolate;
  transition:
    opacity 0.25s ease,
    filter 0.25s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.ape:active {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 15px 25px rgba(255, 255, 255, 0.1),
    inset 0 -12px 22px rgba(0, 0, 0, 0.78),
    0 0 22px rgba(255, 255, 255, 0.3),
    0 0 54px rgba(255, 255, 255, 0.12);
}

.ape::before {
  display: none;
}

.ape > * {
  pointer-events: none;
}

.ape__halo {
  display: none;
}

.ape__mascot {
  width: 96%;
  height: 106%;
  margin-top: -8%;
  overflow: visible;
  transform-origin: 50% 82%;
  filter: saturate(0.9) contrast(1.04);
  will-change: transform;
}

.ape__mascot--photo {
  width: 104%;
  height: auto;
  margin-top: -2%;
  object-fit: contain;
  border-radius: 44%;
  user-select: none;
  -webkit-user-drag: none;
  mix-blend-mode: screen;
  filter: brightness(1.08) contrast(1.08) saturate(0.92)
    drop-shadow(0 14px 16px rgba(0, 0, 0, 0.8));
}

.ape__mascot--toon {
  width: 108%;
  height: 112%;
  margin-top: -7%;
  overflow: visible;
  filter: drop-shadow(0 15px 14px rgba(0, 0, 0, 0.75));
  animation: gorilla-breathe 3.2s ease-in-out infinite;
}

.ape__mascot--legacy {
  display: none;
}

.gorilla-frames {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 50%;
  overflow: hidden;
  transform-origin: 50% 78%;
  animation: none;
}

.gorilla-frames::after {
  display: none;
}

.gorilla-motion {
  position: absolute;
  inset: 0;
  display: block;
  transform: translate3d(0, 0, 0) rotate(0deg);
  transform-origin: 50% 78%;
  will-change: transform;
  backface-visibility: hidden;
}

.gorilla-motion.is-sway {
  animation: ape-sway 280ms ease-out;
}

@keyframes ape-sway {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  32% { transform: translate3d(-2px, 3px, 0) rotate(-2deg); }
  68% { transform: translate3d(2px, 1px, 0) rotate(1.5deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

.gorilla-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  will-change: opacity, transform;
}

.gorilla-frame--idle {
  opacity: 1;
  transform: scale(1.22);
  transform-origin: 50% 50%;
}

.gorilla-frame--tap,
.gorilla-frame--rebound {
  opacity: 0;
}

.gorilla__head,
.gorilla__arm,
.gorilla__banana,
.gorilla__body {
  transform-box: fill-box;
  will-change: transform;
}

.gorilla__head {
  transform-origin: 50% 88%;
}

.gorilla__arm--left {
  transform-origin: 84% 18%;
}

.gorilla__arm--right {
  transform-origin: 16% 18%;
}

.gorilla__banana {
  transform-origin: 25% 78%;
}

.gorilla__eye {
  transform-box: fill-box;
  transform-origin: center;
}

.ape__body {
  transform-origin: 50% 82%;
  will-change: transform;
}

.ape__arm,
.ape__eye,
.ape__mouth {
  transform-box: fill-box;
  transform-origin: center;
}

.ape.is-hit .ape__mascot {
  animation: ape-hit 240ms cubic-bezier(.2, .8, .25, 1);
}

.ape.is-hit .ape__body {
  animation: ape-body-hit 240ms ease-out;
}

.ape.is-hit .ape__arm--left {
  animation: arm-left-hit 260ms ease-out;
}

.ape.is-hit .ape__arm--right {
  animation: arm-right-hit 260ms ease-out;
}

.ape.is-hit .ape__eye {
  animation: ape-blink 220ms ease-out;
}

.ape.is-hit .ape__mouth {
  animation: ape-mouth 240ms ease-out;
}

.ape.is-hit .ape__mascot--toon {
  animation: gorilla-tap 360ms cubic-bezier(.18, .82, .3, 1);
}

.ape.is-hit .gorilla__head {
  animation: gorilla-head-tap 360ms ease-out;
}

.ape.is-hit .gorilla__arm--left {
  animation: gorilla-left-arm 380ms cubic-bezier(.2, .75, .3, 1);
}

.ape.is-hit .gorilla__arm--right {
  animation: gorilla-right-arm 380ms cubic-bezier(.2, .75, .3, 1);
}

.ape.is-hit .gorilla__banana {
  animation: banana-hop 420ms ease-out;
}

.ape.is-hit .gorilla__eye {
  animation: gorilla-blink 260ms ease-out;
}

.ape.is-empty {
  opacity: 0.45;
  filter: grayscale(1);
}

.ape__effects {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.tap-ring {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: tap-ring 520ms ease-out forwards;
}

.tap-spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%);
  animation: tap-spark 480ms ease-out forwards;
}

.float {
  position: fixed;
  z-index: 30;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  pointer-events: none;
  text-shadow: 0 2px 12px #000;
  transform: translate(-50%, -50%);
  animation: float-up 0.7s ease-out forwards;
}

@keyframes float-up {
  to {
    opacity: 0;
    transform: translate(-50%, -82px) scale(1.08);
  }
}

@keyframes ape-halo {
  to { transform: rotate(1turn); }
}

@keyframes ape-hit {
  0% { transform: scale(1) translateY(0); }
  38% { transform: scale(0.94, 0.9) translateY(7px); }
  72% { transform: scale(1.035, 1.055) translateY(-4px); }
  100% { transform: scale(1) translateY(0); }
}

@keyframes ape-body-hit {
  0%, 100% { transform: rotate(0); }
  45% { transform: rotate(-2deg); }
  72% { transform: rotate(1.2deg); }
}

@keyframes arm-left-hit {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(8deg) translateY(3px); }
}

@keyframes arm-right-hit {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(-8deg) translateY(3px); }
}

@keyframes ape-blink {
  0%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(0.12); }
}

@keyframes ape-mouth {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12, 1.35); }
}

@keyframes gorilla-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.008); }
}

@keyframes mascot-idle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.008); }
}

@keyframes gorilla-tap {
  0% { transform: translateY(0) scale(1); }
  34% { transform: translateY(8px) scale(.94, .9); }
  67% { transform: translateY(-5px) scale(1.035, 1.055); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes gorilla-head-tap {
  0%, 100% { transform: rotate(0) translateY(0); }
  34% { transform: rotate(-4deg) translateY(7px); }
  68% { transform: rotate(3deg) translateY(-4px); }
}

@keyframes gorilla-left-arm {
  0%, 100% { transform: rotate(0) translate(0, 0); }
  38% { transform: rotate(13deg) translate(5px, 8px); }
  70% { transform: rotate(-4deg) translate(-2px, -4px); }
}

@keyframes gorilla-right-arm {
  0%, 100% { transform: rotate(0) translate(0, 0); }
  38% { transform: rotate(-15deg) translate(-5px, 8px); }
  70% { transform: rotate(5deg) translate(2px, -4px); }
}

@keyframes banana-hop {
  0%, 100% { transform: rotate(0) translateY(0); }
  40% { transform: rotate(18deg) translateY(-10px) scale(1.08); }
  72% { transform: rotate(-6deg) translateY(2px); }
}

@keyframes gorilla-blink {
  0%, 100% { transform: scaleY(1); }
  42% { transform: scaleY(.12); }
}

@keyframes tap-ring {
  0% { opacity: 0.8; transform: translate(-50%, -50%) scale(0.45); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(4.2); }
}

@keyframes tap-spark {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) rotate(var(--a)) translateX(10px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--a)) translateX(48px) scale(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ape__halo,
  .ape__mascot--toon,
  .gorilla-frames,
  .gorilla-motion.is-sway {
    animation: none;
  }
}

.energy {
  width: 100%;
  max-width: 320px;
  margin-top: 22px;
}

.energy__label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.energy__label b {
  color: #fff;
}

.claim {
  width: 100%;
  max-width: 320px;
  margin-top: 14px;
}

.page__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0 6px;
}

.page__lead {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 20px;
}

.plan-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 600;
}

.hero {
  text-align: center;
  padding: 8px 0 28px;
}

.hero__label {
  color: #7dcea0;
  font-size: 13px;
  margin-bottom: 10px;
}

.hero__value {
  font-size: 54px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero__sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
}

.info-card {
  text-align: left;
  background: #1a1a1a;
  border-radius: 24px;
  padding: 16px 14px 14px;
  min-height: 132px;
}

.info-card__kicker,
.key-box__label,
.stat__label {
  color: var(--muted);
  font-size: 13px;
}

.info-card__value {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  word-break: break-all;
}

.info-card__meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat {
  background: #1a1a1a;
  border-radius: 18px;
  padding: 12px 10px;
}

.stat__value {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
}

.stat__value--sm {
  font-size: 14px;
  word-break: break-all;
}

.chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  height: 140px;
  padding: 16px 12px 10px;
  margin-bottom: 16px;
  background: #121212;
  border-radius: 22px;
}

.chart__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}

.chart__bar {
  width: 100%;
  max-width: 18px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #fff 0%, #6e6e6e 100%);
  min-height: 6px;
}

.chart__day {
  color: var(--muted);
  font-size: 11px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: #1a1a1a;
  border-radius: 16px;
}

.session b {
  font-weight: 600;
}

.session span {
  color: var(--muted);
  font-size: 13px;
}

.key-box {
  background: #121212;
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 16px;
}

.key-box__value {
  margin: 10px 0 16px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-all;
  color: #e8e8e8;
}

.key-box__row {
  display: flex;
  gap: 8px;
}

.btn {
  flex: 1;
  padding: 12px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #111;
  font-size: 14px;
  font-weight: 500;
}

.btn--light {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.btn:active {
  transform: scale(0.98);
}

.howto,
.rows {
  background: #1a1a1a;
  border-radius: 22px;
  padding: 16px;
}

.howto__title {
  font-weight: 600;
  margin-bottom: 10px;
}

.howto ol {
  padding-left: 18px;
  color: #cfcfcf;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
}

.profile__name {
  font-size: 20px;
  font-weight: 700;
}

.profile__meta {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

.row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.row b {
  color: #fff;
  font-weight: 600;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 600;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.is-on {
  opacity: 1;
}

.home__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 32px;
}

.brand__face {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

.brand__name,
.brand__vpn {
  display: block;
  margin: 0;
  line-height: 32px;
}

.brand__name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand__vpn {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #b0b0b0;
}

.gift-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
}

.gift-btn svg {
  width: 22px;
  height: 22px;
}

.balance {
  text-align: center;
  padding: 8px 0 28px;
}

.balance__label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.balance__usd {
  font-size: 54px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.balance__rub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 1;
  border-radius: 22px;
  background: linear-gradient(180deg, #2c2c2c 0%, #1a1a1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.action__icon,
.action__icon svg {
  width: 26px;
  height: 26px;
}

.action__label {
  font-size: 13px;
}

.action:active,
.gift-btn:active,
.vcard__add:active,
.asset-card:active {
  transform: scale(0.97);
}

.panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 28px;
  background: #121212;
}

.asset-card,
.vcard {
  text-align: left;
  background: #1a1a1a;
  border-radius: 24px;
  padding: 16px 14px 14px;
  min-height: 148px;
}

.asset-card__token {
  display: flex;
  align-items: center;
  gap: 8px;
}

.usdt {
  position: relative;
  width: 36px;
  height: 36px;
}

.usdt svg {
  width: 36px;
  height: 36px;
  display: block;
}

.usdt__badge {
  position: absolute;
  right: -3px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e53935;
  color: #fff;
  font-size: 8px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px #1a1a1a;
}

.asset-card__name {
  font-size: 16px;
  font-weight: 600;
}

.chevron {
  color: #8a8a8a;
  font-size: 12px;
}

.asset-card__amount {
  margin-top: 18px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.asset-card__fiat {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.vcard {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.vcard__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}

.vcard__icon svg {
  width: 22px;
  height: 22px;
}

.vcard__add {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #fff;
  background: #0b0b0b;
  font-size: 14px;
}

.stub {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
}

.stub__title {
  font-size: 28px;
  font-weight: 700;
}

.stub__text {
  color: var(--muted);
  margin-bottom: 12px;
}

.tabbar-wrap {
  background: #000;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  padding: 8px 6px 4px;
  border-top: 1px solid var(--line);
}

.bot-handle {
  text-align: center;
  color: #6a6a6a;
  font-size: 13px;
  padding: 4px 0 calc(10px + var(--safe-bottom));
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #7a7a7a;
  font-size: 11px;
}

.tab svg {
  width: 24px;
  height: 24px;
}

.tab.is-active {
  color: #fff;
}

.tab--scan {
  top: -6px;
  position: relative;
}

.tab__scan {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
}

.tab__scan svg {
  width: 26px;
  height: 26px;
}

/* Visual refresh */
:root {
  --bg: #050505;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.1);
  --muted: #92959b;
  --accent: #f2c94c;
}

html,
body {
  background: #000;
}

body {
  background: #000;
}

.app {
  position: relative;
  isolation: isolate;
  background: #000;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.75);
}

.app::before {
  display: none;
}

.tg-chrome {
  position: relative;
  z-index: 10;
  padding: calc(10px + var(--safe-top)) 12px 10px 18px;
  background: rgba(4, 4, 4, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.tg-chrome__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tg-chrome__btn {
  border-radius: 50%;
  color: #c8c8c8;
  transition: background 0.16s ease, color 0.16s ease;
}

.tg-chrome__btn:active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.screen.is-active {
  animation: screen-in 260ms cubic-bezier(.2, .7, .25, 1);
}

.page,
.home {
  scrollbar-width: none;
  padding: 18px 18px 30px;
}

.page::-webkit-scrollbar,
.home::-webkit-scrollbar {
  display: none;
}

.page--tap {
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  height: 36px;
  gap: 9px;
  padding: 0 2px;
}

.brand__face {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
}

.brand__name {
  font-size: 27px;
  line-height: 36px;
  letter-spacing: -0.045em;
}

.brand__vpn {
  line-height: 22px;
  align-self: center;
  padding: 1px 7px 0;
  border-radius: 7px;
  background: var(--accent);
  color: #090909;
  font-size: 10px;
  letter-spacing: 0.12em;
  box-shadow: 0 0 16px rgba(242, 201, 76, 0.18);
}

.coins {
  margin: 20px 0 14px;
}

.subscription-card {
  width: 100%;
  max-width: 340px;
  margin: 20px 0 20px;
  padding: 15px 16px 13px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 22px rgba(255, 255, 255, 0.055),
    0 14px 28px rgba(0, 0, 0, 0.42);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.subscription-card__icon {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffd8de;
  background:
    radial-gradient(circle at 36% 25%, rgba(255, 255, 255, 0.18), transparent 35%),
    rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.06);
}

.subscription-card__icon svg {
  width: 32px;
  height: 32px;
}

.subscription-card .coins {
  margin: 0;
  min-width: 0;
  text-align: left;
}

.subscription-card .coins__label {
  margin-bottom: 2px;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.subscription-card .coins__value {
  font-size: clamp(20px, 6.8vw, 29px);
  letter-spacing: -0.04em;
}

.subscription-card .goal {
  grid-column: 1 / -1;
  max-width: none;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.subscription-card .goal__top {
  display: none;
}

.subscription-card .goal__bar {
  height: 5px;
}

.coins__sub {
  margin-top: 3px;
  color: #d6d7d9;
  font-size: 12px;
  font-weight: 650;
}

.coins__label {
  margin-bottom: 7px;
  color: #83868c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.coins__value {
  max-width: 100%;
  font-size: clamp(34px, 12vw, 52px);
  font-weight: 850;
  letter-spacing: -0.055em;
  white-space: nowrap;
  text-shadow: 0 8px 30px rgba(255, 255, 255, 0.12);
}

.goal {
  max-width: 340px;
  margin-bottom: 20px;
  padding: 11px 13px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.goal__top {
  margin-bottom: 9px;
  font-size: 11px;
  font-weight: 600;
}

.goal__bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.09);
}

.goal__bar i {
  background: linear-gradient(90deg, #dcae27 0%, #f8d864 58%, #fff1ae 100%);
  box-shadow: 0 0 12px rgba(242, 201, 76, 0.38);
  transition: width 0.28s ease;
}

.ape {
  width: min(69vw, 268px);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 12px 22px rgba(255, 255, 255, 0.075),
    inset 0 -16px 26px rgba(0, 0, 0, 0.78),
    0 0 21px rgba(255, 255, 255, 0.18),
    0 0 58px rgba(255, 255, 255, 0.065),
    0 22px 42px rgba(0, 0, 0, 0.82);
}

.ape:active {
  border-color: rgba(255, 255, 255, 0.86);
}

.tap-hint {
  margin-top: 17px;
  color: #777a80;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.claim {
  width: 100%;
  max-width: 340px;
  flex: 0;
  margin-top: 14px;
}

.page__title {
  margin: 4px 0 7px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.page__lead {
  max-width: 330px;
  margin-bottom: 24px;
  color: #85888e;
  font-size: 14px;
  line-height: 1.5;
}

.stat-row {
  gap: 10px;
  margin-bottom: 14px;
}

.stat,
.chart,
.session,
.key-box,
.howto,
.rows {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 14px 36px rgba(0, 0, 0, 0.2);
}

.stat {
  min-width: 0;
  padding: 14px 11px;
  border-radius: 18px;
}

.stat__label,
.key-box__label,
.info-card__kicker {
  color: #85888e;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.035em;
}

.stat__value {
  margin-top: 9px;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.chart {
  height: 158px;
  padding: 18px 14px 12px;
  border-radius: 22px;
}

.chart__bar {
  max-width: 20px;
  background: linear-gradient(180deg, #fff 0%, #9a9da3 55%, #55585e 100%);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
}

.chart__day {
  font-weight: 600;
}

.list {
  gap: 10px;
}

.session {
  align-items: center;
  padding: 15px 16px;
  border-radius: 17px;
}

.session b {
  font-size: 14px;
}

.key-note {
  margin: 4px 0 16px;
  color: #cfcfcf;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.key-term {
  margin: 0 0 20px;
}

.key-term b {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.key-term span {
  display: block;
  margin-top: 6px;
  color: #8d8d8d;
  font-size: 13px;
  font-weight: 600;
}

.key-box {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 22px;
}

.key-box.is-closed .key-box__value {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
}

.key-closed {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 18px;
  background: rgba(8, 8, 8, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
}

.key-box.is-closed .key-closed {
  display: flex;
}

.key-closed__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.key-closed__icon svg {
  width: 26px;
  height: 26px;
}

.key-closed b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.key-closed span {
  max-width: 240px;
  color: #c8c8c8;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.key-closed .btn {
  width: min(100%, 200px);
  margin-top: 8px;
}

.key-box__value {
  min-height: 42px;
  margin: 12px 0 17px;
  color: #f0f0f0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.key-box__row {
  gap: 10px;
}

.btn {
  min-height: 46px;
  padding: 12px 14px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 650;
  transition: transform 0.14s ease, background 0.14s ease;
}

.btn--light {
  border-color: #fff;
  background: #fff;
  color: #080808;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.09);
}

.howto,
.rows {
  padding: 18px;
  border-radius: 22px;
}

.howto__title {
  margin-bottom: 14px;
  font-size: 15px;
}

.howto ol {
  gap: 11px;
  color: #d1d2d4;
  line-height: 1.4;
}

.profile {
  gap: 14px;
  margin: 12px 0 22px;
  padding: 4px 2px;
}

.avatar {
  width: 58px;
  height: 58px;
  background: linear-gradient(145deg, #fff, #aeb0b5);
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.12);
  font-size: 22px;
}

.profile__name {
  font-size: 21px;
}

.profile__meta {
  margin-top: 4px;
  color: #8b8e94;
}

.section-head {
  margin: 30px 2px 14px;
}

.section-head__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.section-head__text {
  margin-top: 5px;
  color: #85888e;
  font-size: 13px;
  line-height: 1.45;
}

.row {
  min-height: 48px;
  align-items: center;
  padding: 13px 1px;
}

#subscriptionStatus {
  color: #8b8e94;
}

#subscriptionStatus.is-active {
  color: #91dfa9;
}

.toast {
  bottom: 104px;
  padding: 11px 17px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(245, 245, 245, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.tabbar-wrap {
  position: relative;
  z-index: 12;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(5, 5, 5, 0.86);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.tabbar {
  min-height: 66px;
  padding: 8px 8px 3px;
  border-top: 0;
}

.tab {
  min-height: 48px;
  justify-content: center;
  gap: 5px;
  color: #676a70;
  font-size: 10px;
  font-weight: 600;
  transition: color 0.16s ease, transform 0.16s ease;
}

.tab:active {
  transform: scale(0.94);
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab.is-active {
  color: #fff;
}

.tab--scan {
  top: -7px;
  gap: 2px;
}

.tab__scan {
  width: 56px;
  height: 56px;
  border: 4px solid #090909;
  background: linear-gradient(145deg, #fff, #c7c9cd);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 10px 26px rgba(0, 0, 0, 0.55);
}

.tab__scan-label {
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.bot-handle {
  padding: 1px 0 calc(8px + var(--safe-bottom));
  color: #55585d;
  font-size: 11px;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-height: 690px) {
  .page--tap {
    padding-top: 6px;
  }

  .coins {
    margin: 12px 0 10px;
  }

  .coins__value {
    font-size: 44px;
  }

  .goal {
    margin-bottom: 12px;
  }

  .ape {
    width: min(58vw, 226px);
  }

  .tap-hint {
    margin-top: 10px;
  }
}

/* Precision polish */
.page--tap {
  position: relative;
  padding-inline: 20px;
}

.brand {
  flex: 0 0 auto;
  margin-top: 2px;
}

.subscription-card {
  max-width: 360px;
  margin: 22px 0 22px;
  padding: 17px 18px 14px;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  background: #0b0b0c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.5);
}

.subscription-card__icon {
  width: 56px;
  height: 56px;
  color: #f4d06f;
  border-color: rgba(244, 208, 111, 0.22);
  background: #141414;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 18px rgba(244, 208, 111, 0.07);
}

.subscription-card .coins__label {
  color: #8f9297;
  font-weight: 600;
}

.subscription-card .coins__value {
  color: #fff;
  font-size: clamp(21px, 6.9vw, 30px);
  font-weight: 800;
  line-height: 1.08;
  text-shadow: none;
}

.coins__sub {
  margin-top: 5px;
  color: #c7c8cb;
  font-size: 12px;
  font-weight: 600;
}

.subscription-card .goal {
  display: none;
}

.ape {
  width: min(86vw, 340px, 45dvh);
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateZ(0);
  box-shadow:
    inset 0 10px 22px rgba(255, 255, 255, 0.07),
    inset 0 -18px 28px rgba(0, 0, 0, 0.78),
    0 24px 46px rgba(0, 0, 0, 0.82);
  animation: tap-border-breathe 2.8s ease-in-out infinite;
  transition:
    transform 120ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 250ms ease,
    filter 250ms ease;
}

.ape::before {
  display: none;
  content: none;
}

.ape::after {
  display: none;
}

.ape:active {
  transform: scale(0.985);
  border-color: #fff;
  box-shadow:
    inset 0 12px 24px rgba(255, 255, 255, 0.09),
    inset 0 -16px 25px rgba(0, 0, 0, 0.82),
    0 20px 38px rgba(0, 0, 0, 0.78);
}

.tap-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d8d8d8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tap-hint__text {
  animation: hint-soft 2.4s ease-in-out infinite;
}

.tap-hint__plus {
  color: #fff;
  font-weight: 800;
}

@keyframes hint-soft {
  0%, 100% { opacity: 0.62; }
  50% { opacity: 1; }
}

.page:not(.page--tap) {
  padding-inline: 20px;
}

.key-box,
.howto,
.rows,
.chart,
.session,
.stat {
  border-color: rgba(255, 255, 255, 0.085);
  background: #0c0c0d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.section-head {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.tabbar-wrap {
  background: rgba(0, 0, 0, 0.94);
}

.tab__scan {
  border-color: #000;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 10px 28px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(255, 255, 255, 0.08);
}

@keyframes tap-glow {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.035);
  }
}

@keyframes tap-border-breathe {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.3);
  }
  50% {
    border-color: rgba(255, 255, 255, 0.56);
  }
}

@media (max-height: 690px) {
  .subscription-card {
    margin: 12px 0 14px;
    padding-block: 13px 11px;
  }

  .ape {
    width: min(76vw, 274px, 41dvh);
  }

  .tap-hint {
    margin-top: 12px;
  }
}

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

/* Floating bottom navigation */
.tabbar-wrap {
  position: relative;
  z-index: 12;
  flex: 0 0 auto;
  margin: 0 14px calc(12px + var(--safe-bottom));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 25px;
  background: rgba(17, 17, 18, 0.72);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 38px rgba(0, 0, 0, 0.52);
}

.tabbar {
  min-height: 70px;
  padding: 8px 10px 7px;
  border-top: 0;
}

.bot-handle {
  display: none;
}

/* Ape Wallet material: blocks, borders, glow, backgrounds */
:root {
  --block-raised: linear-gradient(180deg, #2c2c2c 0%, #1a1a1a 100%);
  --block-card: #1a1a1a;
  --block-container: #121212;
  --block-line: rgba(255, 255, 255, 0.07);
}

.app,
html,
body {
  background: #000;
}

.brand__vpn {
  padding: 3px 8px 2px;
  border: 1px solid var(--block-line);
  border-radius: 8px;
  background: var(--block-card);
  color: #d8d8d8;
  box-shadow: none;
}

.subscription-card {
  border: 1px solid var(--block-line);
  border-radius: 28px;
  background: var(--block-container);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.subscription-card__icon {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--block-raised);
  color: #e9e9e9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.subscription-card__icon svg {
  filter: none;
}

.subscription-card .goal__bar {
  background: #262626;
}

.subscription-card .goal__bar i,
.goal__bar i {
  background: #fff;
  box-shadow: none;
}

.stat,
.session,
.key-box,
.howto,
.rows,
.chart {
  border: 1px solid var(--block-line);
  background: var(--block-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.chart {
  background: var(--block-container);
}

.btn {
  border: 1px solid var(--block-line);
  background: var(--block-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn--light {
  border-color: #fff;
  background: #fff;
  color: #111;
  box-shadow: none;
}

.avatar {
  background: #fff;
  box-shadow: none;
}

.tabbar-wrap {
  border: 1px solid var(--block-line);
  background: rgba(18, 18, 18, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 16px 38px rgba(0, 0, 0, 0.55);
}

.tab__scan {
  border: 4px solid #0a0a0a;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 22px rgba(255, 255, 255, 0.16),
    0 10px 26px rgba(0, 0, 0, 0.6);
}

.section-head {
  border-top-color: var(--block-line);
}

.page:not(.page--tap) {
  padding-bottom: 34px;
}

.chart {
  height: 168px;
  gap: 10px;
  padding: 20px 16px 12px;
  border-radius: 24px;
  margin-bottom: 12px;
}

.chart__col {
  gap: 9px;
}

.chart__bar {
  max-width: 26px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f4f4f4 0%, #8e9095 100%);
  box-shadow: none;
}

.chart__day {
  color: #8d8d8d;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.list {
  gap: 8px;
}

.session {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 20px;
}

.session__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07);
}

.session__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.session__info b {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.session__info span {
  color: #8d8d8d;
  font-size: 12px;
}

.session__value {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Bottom navigation buttons */
.tabbar {
  align-items: center;
  min-height: 0;
  padding: 10px 10px;
  gap: 6px;
}

.tab {
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 0;
  border-radius: 18px;
}

.tab svg {
  width: 23px;
  height: 23px;
}

.tab span {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.tab--scan {
  top: 0;
  gap: 6px;
}

.tab__scan {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 18px rgba(255, 255, 255, 0.14),
    0 6px 16px rgba(0, 0, 0, 0.55);
}

.tab__scan svg {
  width: 21px;
  height: 21px;
}

.tab__scan-label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

/* Expressive navigation */
.tab {
  position: relative;
  isolation: isolate;
  color: #6c6f75;
  transition:
    color 0.2s ease,
    transform 0.14s ease;
}

.tab::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 18px;
  border: 1px solid transparent;
  background: transparent;
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.22s ease,
    transform 0.22s cubic-bezier(.2, .8, .25, 1),
    background 0.22s ease,
    border-color 0.22s ease;
}

.tab:not(.tab--scan).is-active::before {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(255, 255, 255, 0.1);
  background: var(--block-raised);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 16px rgba(0, 0, 0, 0.4);
}

.tab:not(.tab--scan).is-active {
  color: #fff;
}

.tab:not(.tab--scan).is-active svg {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.28));
}

.tab svg {
  transition: transform 0.2s cubic-bezier(.2, .8, .25, 1), filter 0.2s ease;
}

.tab:not(.tab--scan).is-active svg {
  transform: translateY(-1px) scale(1.06);
}

.tab:active {
  transform: scale(0.95);
}

.tab--scan .tab__scan {
  position: relative;
  background: radial-gradient(circle at 38% 28%, #fff 0%, #f2f2f4 46%, #c9cbd0 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.3),
    0 0 0 5px rgba(255, 255, 255, 0.05),
    0 0 22px rgba(255, 255, 255, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -3px 6px rgba(0, 0, 0, 0.16);
  transition:
    transform 0.16s cubic-bezier(.2, .8, .25, 1),
    box-shadow 0.2s ease;
}

.tab--scan .tab__scan::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
  animation: scan-pulse 3.2s ease-in-out infinite;
}

.tab--scan.is-active .tab__scan {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.42),
    0 0 0 6px rgba(255, 255, 255, 0.07),
    0 0 30px rgba(255, 255, 255, 0.28),
    0 8px 22px rgba(0, 0, 0, 0.62),
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -3px 6px rgba(0, 0, 0, 0.16);
}

.tab--scan .tab__scan-label {
  color: #83868c;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.tab--scan.is-active .tab__scan-label {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.tab--scan:active .tab__scan {
  transform: scale(0.93);
}

@keyframes scan-pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.97);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tab--scan .tab__scan::after,
  .glass-bg__orb {
    animation: none;
  }
}

.glass-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(180deg, #0a0b0d 0%, #040405 48%, #060607 100%);
}

.glass-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.55;
}

.glass-bg__orb--a {
  width: 78%;
  height: 46%;
  left: -18%;
  top: -8%;
  background: rgba(255, 255, 255, 0.1);
  animation: glass-drift-a 18s ease-in-out infinite;
}

.glass-bg__orb--b {
  width: 70%;
  height: 42%;
  right: -16%;
  bottom: 8%;
  background: rgba(186, 188, 194, 0.08);
  animation: glass-drift-b 22s ease-in-out infinite;
}

.glass-bg__sheet {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 26%, rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: blur(28px) saturate(1.05);
  -webkit-backdrop-filter: blur(28px) saturate(1.05);
}

.tg-chrome,
.screen,
.tabbar-wrap {
  position: relative;
  z-index: 2;
}

.tabbar-wrap {
  position: absolute;
  z-index: 20;
}

@keyframes glass-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(8%, 6%, 0) scale(1.08); }
}

@keyframes glass-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-7%, -5%, 0) scale(1.06); }
}

.subscription-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
}

.subscription-card__icon {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.page--profile {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding-top: 12px;
}

.page--profile .page__title {
  margin-top: 0;
  margin-bottom: 16px;
}

.hero-profile {
  display: flex;
  justify-content: center;
  margin: 12px 0 10px;
}

.hero-avatar {
  position: relative;
  width: 148px;
  height: 148px;
}

.hero-avatar__photo,
.hero-avatar__letter {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: #1a1a1a;
  box-shadow:
    0 0 0 6px rgba(8, 8, 8, 0.7),
    0 16px 36px rgba(0, 0, 0, 0.45);
}

.hero-avatar__letter {
  background: linear-gradient(160deg, #fff, #9a9a9a);
  color: #111;
  font-size: 54px;
  font-weight: 800;
}

.hero-avatar__photo[hidden],
.hero-avatar__letter[hidden] {
  display: none;
}

.hero-rank {
  position: absolute;
  left: 50%;
  bottom: -6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: 999px;
  background: #1f6f6a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.hero-rank svg {
  width: 12px;
  height: 12px;
}

.hero-name {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-handle {
  min-height: 18px;
  margin-top: 6px;
  margin-bottom: 20px;
  color: #8d8d8d;
  font-size: 14px;
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .hero-handle {
    margin-bottom: 28px;
  }
}

.hero-banner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin-bottom: 22px;
  padding: 16px 16px;
  border-radius: 22px;
  text-align: left;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

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

.hero-banner__title {
  color: #cfcfcf;
  font-size: 13px;
  font-weight: 700;
}

.hero-banner__time {
  margin-top: 10px;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-banner__meta {
  margin-top: 6px;
  color: #8d8d8d;
  font-size: 13px;
  font-weight: 600;
}

.hero-banner__id {
  color: #7d7d7d;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.hero-banner--ref {
  margin-bottom: 0;
}

.hero-ref-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.hero-ref-btn {
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.hero-taps {
  margin-top: 28px;
  padding: 0 0 10px;
}

.hero-taps b {
  display: block;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.hero-taps span {
  display: block;
  margin-top: 8px;
  color: #8d8d8d;
  font-size: 14px;
  font-weight: 600;
}

.brand {
  align-items: center;
  height: auto;
  min-height: 84px;
}

.brand__logo,
img.brand__logo,
svg.brand__logo {
  display: block;
  height: auto;
  max-height: 84px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

svg.brand__logo {
  height: 84px;
  overflow: visible;
}

.brand__name,
.brand__vpn {
  line-height: 1;
}

.brand__vpn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  margin-top: 1px;
}

/* Separate floating nav blocks */
.tabbar-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  margin: 0;
  padding: 0 12px calc(12px + var(--safe-bottom));
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

.tabbar {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  align-items: stretch;
  gap: 0;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  background: rgba(18, 18, 20, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 26px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  pointer-events: auto;
}

.tab,
.tab.tab--scan {
  position: relative;
  top: 0;
  isolation: isolate;
  min-height: 78px;
  gap: 7px;
  padding: 12px 8px 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
}

.tab + .tab {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.tab::before,
.tab--scan .tab__scan,
.tab--scan .tab__scan::after {
  display: none;
}

.tab svg {
  width: 26px;
  height: 26px;
  color: #fff;
  filter: none;
}

.tab span,
.tab__scan-label {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.tab.is-active {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 28px rgba(0, 0, 0, 0.4);
}

.tab.tab--scan {
  min-height: 78px;
}

.tab.tab--scan svg {
  width: 28px;
  height: 28px;
}

.screen,
.screen.is-active {
  flex: 1;
}

.page,
.home,
.page--tap,
.page:not(.page--tap) {
  padding-bottom: calc(118px + var(--safe-bottom));
}

.page--tap {
  justify-content: flex-start;
  padding-top: 0;
  gap: 0;
}

.page--tap .brand {
  min-height: 0;
  margin: 0 0 2px;
}

.page--tap .subscription-card {
  margin: 2px 0 8px;
}

.page--tap .ape {
  margin-top: 20px;
}

.page--tap .tap-hint {
  margin-top: 20px;
}

.tasks-fab {
  position: absolute;
  right: 16px;
  bottom: calc(112px + var(--safe-bottom));
  z-index: 22;
  width: 86px;
  min-height: 78px;
  padding: 22px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(22, 22, 24, 0.48);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 26px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tasks-fab__label {
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.gift {
  position: absolute;
  top: -16px;
  left: 50%;
  width: 36px;
  height: 34px;
  transform: translateX(-50%);
  animation: gift-bob 1.6s ease-in-out infinite;
}

.gift__box {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 0;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(180deg, #fff 0%, #cfd2d6 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.gift__box::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 6px;
  transform: translateX(-50%);
  background: #111;
}

.gift__lid {
  position: absolute;
  left: 1px;
  right: 1px;
  top: 8px;
  height: 9px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.gift__lid::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 6px;
  transform: translateX(-50%);
  background: #111;
}

.gift__bow {
  position: absolute;
  left: 50%;
  top: 0;
  width: 16px;
  height: 10px;
  transform: translateX(-50%);
}

.gift__bow::before,
.gift__bow::after {
  content: "";
  position: absolute;
  top: 0;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

.gift__bow::before { left: -1px; }
.gift__bow::after { right: -1px; }

@keyframes gift-bob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-4deg); }
  50% { transform: translateX(-50%) translateY(-4px) rotate(4deg); }
}

.task-group {
  margin-top: 20px;
}

.task-group:first-of-type {
  margin-top: 8px;
}

.task-group__title {
  margin: 0 2px 10px;
  color: #8d8d8d;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.task-group--required {
  padding: 14px 12px 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.task-group--required .task-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 12px;
  color: #fff;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.task-group--required .task-group__title::before {
  content: "обязательно";
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  width: 100%;
  padding: 12px;
  border-radius: 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.task__check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.task__check svg {
  width: 13px;
  height: 13px;
  opacity: 0;
  color: #111;
}

.task__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task__main b {
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}

.task__track {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task__bar {
  flex: 1;
  min-width: 0;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.task__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: inherit;
}

.task__track span:last-child,
.task__hint {
  color: #8d8d8d;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.task__hint--wrap {
  white-space: normal;
  line-height: 1.35;
}

.task__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}

.task__reward {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.task__go {
  height: 34px;
  padding: 0 12px;
  border-radius: 11px;
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.task.is-done .task__go {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.task.is-ready {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.task.is-done .task__check {
  border-color: #fff;
  background: #fff;
}

.task.is-done .task__check svg {
  opacity: 1;
}

.task.is-done .task__main b {
  color: #d8d8d8;
}

.quest-hud {
  width: min(100%, 340px);
  margin: 10px 0 2px;
  padding: 14px 16px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
}

.quest-hud[hidden] {
  display: none;
}

.quest-hud__title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.quest-hud__bar {
  height: 6px;
  margin: 10px 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.quest-hud__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: inherit;
  transition: width 0.18s ease;
}

.quest-hud__meta {
  color: #b0b0b0;
  font-size: 13px;
  font-weight: 700;
}

.quest-hud.is-done .quest-hud__title {
  font-size: 18px;
}

.quest-hud.is-done .quest-hud__meta {
  color: #fff;
}

/* Telegram gate: overlay + glass card */
#tgGate,
.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#tgGate[hidden],
.gate[hidden],
.gate.is-hidden,
#tgGate.is-hidden {
  display: none;
}

.gate__card,
#tgGate .gate__card {
  width: min(100%, 360px);
  padding: 26px 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(8, 8, 8, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 20px 44px rgba(0, 0, 0, 0.55);
  text-align: center;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.gate__title,
#tgGate .gate__title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.gate__text,
.gate__lead,
#tgGate .gate__text {
  margin: 0 0 18px;
  color: #8d8d8d;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.gate__card .btn,
#tgGate .btn {
  width: 100%;
}

.gate__card .btn--light,
#tgGate .btn--light {
  background: #fff;
  color: #111;
  border-color: #fff;
}

/* Key box open vs closed */
.key-box.is-open .key-closed,
.key-box:not(.is-closed) .key-closed {
  display: none;
}

.key-box.is-open .key-box__value,
.key-box:not(.is-closed) .key-box__value {
  filter: none;
  user-select: text;
  -webkit-user-select: text;
  pointer-events: auto;
  color: #f4f4f4;
}

.key-box.is-open,
.key-box:not(.is-closed) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.key-box.is-closed #shareKey,
.key-box.is-closed #copyKey,
.btn:disabled,
.btn[disabled],
.btn.is-disabled,
.btn[aria-disabled="true"],
.hero-ref-btn:disabled,
.hero-ref-btn[disabled],
.hero-ref-btn.is-disabled,
.hero-ref-btn[aria-disabled="true"] {
  opacity: 0.36;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.hero-ref-btn:active {
  transform: scale(0.97);
}

.hero-ref-btn.btn--light,
.hero-ref-btn--light {
  background: #fff;
  color: #111;
}

.hero-extra,
.profile-extra,
.hero-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.hero-extra .hero-ref-btn,
.profile-extra .hero-ref-btn,
.hero-actions .hero-ref-btn {
  width: 100%;
}

.howto a {
  color: #fff;
  text-decoration: underline;
}
