:root {
  --production-blue: #55b9ff;
  --production-blue-soft: #9ddcff;
  --production-surface: rgba(18, 52, 82, 0.72);
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(80, 178, 255, 0.28), transparent 42%),
    linear-gradient(180deg, #0d2944 0%, #071827 52%, #06121f 100%) !important;
}

.card,
.hero-card,
.task-card,
.stat-card,
.rocket-stage,
.live-card,
.pvp-card,
.bet-card,
.ref-card {
  border-color: rgba(150, 214, 255, 0.17) !important;
  background: linear-gradient(145deg, rgba(26, 70, 106, 0.76), rgba(7, 24, 40, 0.88)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 45px rgba(0, 8, 20, 0.16) !important;
}

button,
[role="button"],
.nav-item {
  touch-action: manipulation;
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
}

button:active:not(:disabled),
[role="button"]:active {
  transform: scale(0.975);
  filter: brightness(1.08);
}

button:disabled,
[aria-disabled="true"] {
  cursor: default;
  opacity: 0.58;
}

.rocket-art svg {
  width: 74px;
  height: 74px;
  overflow: visible;
  filter: drop-shadow(0 0 12px rgba(90, 194, 255, 0.62));
}

.rocket-stage.flying .rocket-art .rocket-flame {
  transform-origin: 32px 61px;
  animation: mirava-flame 240ms ease-in-out infinite alternate;
}

@keyframes mirava-flame {
  from { transform: scaleY(0.72); opacity: 0.72; }
  to { transform: scaleY(1.14); opacity: 1; }
}

.nav-item[data-page="lottery"] {
  display: none !important;
}

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

/* v5 steel-blue system: shared with the Rocket/PVP release. */
:root {
  --production-blue: #2f98ff;
  --production-blue-soft: #91ceff;
  --production-surface: rgba(14, 42, 72, 0.76);
  --bg-0: #020b16;
  --bg-1: #07182b;
  --bg-2: #0a2340;
  --bg-3: #123c67;
  --bg-4: #020812;
  --glass: rgba(25, 66, 108, 0.38);
  --glass-2: rgba(41, 125, 205, 0.12);
  --glass-3: rgba(9, 28, 50, 0.58);
  --line: rgba(100, 180, 255, 0.25);
  --line-2: rgba(100, 180, 255, 0.12);
  --line-accent: rgba(55, 153, 255, 0.52);
  --accent: #2f98ff;
  --accent-2: #8bc9ff;
  --steel: #49aaff;
  --blue: #167ee8;
  --blue-2: #0c5eb9;
  --mint: #6ec7ff;
}

body {
  background:
    radial-gradient(circle at 50% -12%, rgba(118, 82, 240, 0.28), transparent 38%),
    radial-gradient(circle at 15% 38%, rgba(90, 70, 200, 0.14), transparent 36%),
    linear-gradient(180deg, #16103a 0%, #0c0824 52%, #0c0824 100%) !important;
}

.app-shell {
  background: linear-gradient(180deg, #16103a 0%, #0c0824 48%, #0c0824 100%) !important;
}

.bg {
  background:
    radial-gradient(circle at 50% -4%, rgba(72, 164, 255, 0.27), transparent 34%),
    radial-gradient(circle at 92% 32%, rgba(45, 132, 225, 0.13), transparent 36%) !important;
}

.live-gift-card,
.profile-gifts-card,
.profile-head-card,
.admin-card,
.pvp-bet-card,
.pvp-players-card,
.rocket-bet-card {
  border-color: rgba(104, 183, 255, 0.24) !important;
  background: linear-gradient(145deg, rgba(21, 59, 97, 0.78), rgba(5, 20, 37, 0.86)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 13px 34px rgba(0, 5, 16, 0.22) !important;
}

/* Header strip (EasyGift layout, Mirava cosmic) */
.top-user-panel {
  border: 1px solid rgba(140, 190, 255, 0.22) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(42, 72, 112, 0.72), rgba(24, 48, 82, 0.68)) !important;
  box-shadow: 0 8px 22px rgba(0, 8, 24, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.primary-button,
.topup-submit,
.mini-button:not(.muted-button),
.case-spin-button,
.pvp-bet-btn,
.admin-save,
.profile-admin-btn,
.task-action-btn {
  background: linear-gradient(180deg, #3ba3ff 0%, #167ce7 100%) !important;
  border: 1px solid rgba(122, 199, 255, 0.35) !important;
  box-shadow: 0 8px 24px rgba(25, 130, 237, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.bottom-nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)), rgba(32, 39, 47, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(0, 0, 0, 0.25) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
}

.bottom-nav::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 50%) !important;
  mix-blend-mode: screen !important;
  opacity: 0.6 !important;
}

.nav-pill {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.nav-pill-bubble {
  background: linear-gradient(180deg, rgba(105, 175, 255, 0.3), rgba(105, 175, 255, 0.1)), rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 3px 10px rgba(0, 0, 0, 0.25) !important;
}

.nav-item.active .nav-ico {
  filter: drop-shadow(0 2px 6px rgba(105, 175, 255, 0.45)) !important;
}

.tasks-progress,
.task-claim-btn,
.ref-pill,
.bonus-section--daily .reward-pill {
  color: var(--accent-2) !important;
  border-color: rgba(84, 169, 255, 0.28) !important;
  background: rgba(47, 152, 255, 0.1) !important;
}

.bonus-hero-card,
.bonus-section--daily,
.ref-card {
  border-color: rgba(104, 183, 255, 0.22) !important;
  background:
    radial-gradient(circle at 12% 0, rgba(56, 150, 255, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(20, 57, 95, 0.72), rgba(5, 19, 36, 0.84)) !important;
}

.bonus-hero-kicker,
.task-badge,
.bonus-section--daily .bonus-section-count,
.bonus-section--daily .task-icon {
  color: var(--accent-2) !important;
}

/* Reference-style PVP: calm blue rings while idle, sectors only during play. */
.pvp-stat-pill {
  border-color: rgba(120, 160, 255, 0.26) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(90, 130, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(18, 42, 78, 0.88), rgba(6, 18, 40, 0.94)) !important;
}

.pvp-wheel-wrap {
  overflow: visible !important;
  padding: 28px 10px 26px !important;
}

.pvp-arena,
.pvp-shell {
  overflow: visible !important;
}

/* Never paint a card behind the PVP wheel */
.pvp-arena {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.pvp-arena::before,
.pvp-arena::after {
  content: none !important;
  display: none !important;
}

.pvp-wheel {
  overflow: visible !important;
  filter: drop-shadow(0 14px 28px rgba(0, 8, 24, 0.36)) !important;
}

.pvp-wheel::before {
  inset: -28px !important;
  background: radial-gradient(circle, rgba(70, 180, 255, 0.55) 0%, rgba(45, 150, 255, 0.28) 38%, rgba(45, 150, 255, 0.1) 58%, transparent 74%) !important;
  filter: blur(18px) !important;
  opacity: 0.95 !important;
  border-radius: 50% !important;
}

.pvp-wheel-frame {
  background:
    radial-gradient(circle, transparent 0 33%, rgba(29, 105, 181, 0.14) 33.5% 34%, transparent 34.5% 57%, rgba(53, 145, 237, 0.22) 57.5% 58%, transparent 58.5%),
    radial-gradient(circle at 50% 25%, rgba(52, 137, 222, 0.18), rgba(4, 20, 38, 0.98) 72%) !important;
  box-shadow:
    inset 0 0 0 1px rgba(105, 185, 255, 0.32),
    inset 0 0 0 42px rgba(16, 57, 96, 0.18),
    0 0 28px rgba(45, 150, 255, 0.34),
    0 0 48px rgba(45, 150, 255, 0.16) !important;
}

.pvp-wheel.is-idle .pvp-wheel-spin {
  background:
    radial-gradient(circle, rgba(6, 27, 50, 0.98) 0 34%, transparent 34.5%),
    repeating-radial-gradient(circle, rgba(32, 101, 169, 0.2) 0 1px, transparent 1px 47px),
    radial-gradient(circle, #123a62 0%, #061b32 72%) !important;
}

.pvp-wheel.is-idle .pvp-wheel-dividers,
.pvp-wheel.is-idle .pvp-wheel-avatars {
  opacity: 0;
}

.pvp-wheel-ring {
  border-color: rgba(95, 177, 255, 0.32) !important;
  box-shadow: 0 0 17px rgba(45, 150, 255, 0.24), inset 0 0 18px rgba(45, 150, 255, 0.12) !important;
}

.pvp-center {
  background: radial-gradient(circle at 50% 24%, #173f67, #06172b 72%) !important;
  border-color: rgba(92, 178, 255, 0.32) !important;
  box-shadow: inset 0 0 20px rgba(0, 8, 20, 0.42), 0 0 24px rgba(45, 150, 255, 0.2) !important;
}

.pvp-loader-dot {
  background: #69aff0 !important;
  box-shadow: 0 0 8px rgba(72, 169, 255, 0.42);
}

.pvp-timer,
.countdown-big {
  color: #9ad5ff !important;
  text-shadow: 0 0 14px rgba(54, 163, 255, 0.82), 0 0 34px rgba(33, 112, 210, 0.35) !important;
}

.pvp-bet-status {
  display: block !important;
  min-height: 0;
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
}

.pvp-bet-status:not(:empty) {
  min-height: 18px;
  margin-top: 7px;
}

.pvp-bet-status.success { color: #8ccfff; }
.pvp-bet-status.danger { color: #ff9bad; }

/* Rocket inherits the same blue instrumentation instead of neon green. */
.rocket-stage {
  background-color: rgba(7, 27, 49, 0.88) !important;
  background-image:
    linear-gradient(rgba(60, 148, 235, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 148, 235, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 50% 105%, rgba(46, 151, 255, 0.22), transparent 48%) !important;
  border-color: rgba(89, 176, 255, 0.27) !important;
  box-shadow: inset 0 0 0 1px rgba(48, 143, 235, 0.1), 0 0 28px rgba(27, 119, 224, 0.1) !important;
}

.rocket-stage::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(95, 181, 255, 0.42) 0 3px, transparent 4px),
    radial-gradient(circle at 28% 68%, rgba(95, 181, 255, 0.3) 0 2px, transparent 3px),
    radial-gradient(circle at 52% 22%, rgba(95, 181, 255, 0.34) 0 3px, transparent 4px),
    radial-gradient(circle at 72% 74%, rgba(95, 181, 255, 0.28) 0 3px, transparent 4px),
    radial-gradient(circle at 90% 38%, rgba(95, 181, 255, 0.38) 0 2px, transparent 3px) !important;
  background-size: 230px 180px !important;
  opacity: 0.72 !important;
}

.rocket-stage::after {
  background: radial-gradient(circle at 50% 100%, rgba(57, 157, 255, 0.16), transparent 42%) !important;
  filter: none !important;
}

.rocket-stage.flying .multiplier,
.multiplier,
.rocket-status.success,
.rocket-player-stake small,
.rocket-cashout-toast,
.x-chip.hot {
  color: #83c9ff !important;
}

.multiplier-wrap::before {
  background: radial-gradient(circle, rgba(63, 166, 255, 0.28), rgba(36, 111, 206, 0.12) 40%, transparent 74%) !important;
}

.rocket-cashout-toast,
.player-row.cashed,
.rocket-player-row.cashed {
  border-color: rgba(87, 177, 255, 0.25) !important;
  background: rgba(36, 116, 196, 0.12) !important;
}

/* v5.2 Rocket arena: steel-blue crash-game presentation. */
#page-rocket {
  --rocket-blue: #269cff;
  --rocket-blue-bright: #78d5ff;
  --rocket-panel: #071a31;
}

#page-rocket .rocket-history-strip {
  margin: 8px 2px 10px;
}

#page-rocket .x-chip {
  border-color: rgba(89, 172, 255, 0.24) !important;
  background: rgba(20, 66, 109, 0.48) !important;
  color: #c9e8ff !important;
}

#page-rocket .x-chip.hot {
  border-color: rgba(69, 176, 255, 0.55) !important;
  background: rgba(32, 137, 232, 0.2) !important;
  color: #78d5ff !important;
  box-shadow: 0 0 14px rgba(42, 151, 255, 0.18);
}

#page-rocket .rocket-stage {
  --curve-progress: 0;
  min-height: 348px;
  padding: 0;
  border-radius: 20px;
  border-color: rgba(64, 157, 246, 0.44) !important;
  background:
    radial-gradient(circle at 10% 24%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.6px),
    radial-gradient(circle at 25% 47%, rgba(159, 215, 255, 0.48) 0 1px, transparent 1.8px),
    radial-gradient(circle at 42% 18%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1.7px),
    radial-gradient(circle at 68% 36%, rgba(169, 221, 255, 0.45) 0 1px, transparent 1.8px),
    radial-gradient(circle at 88% 16%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.6px),
    radial-gradient(circle at 82% 64%, rgba(145, 207, 255, 0.4) 0 1px, transparent 1.8px),
    linear-gradient(180deg, #06172c 0%, #081f39 52%, #0b2c4f 100%) !important;
  background-size: 118px 102px, 151px 133px, 173px 121px, 127px 149px, 191px 136px, 163px 142px, 100% 100% !important;
  box-shadow:
    inset 0 0 0 1px rgba(115, 195, 255, 0.09),
    inset 0 -90px 100px rgba(22, 101, 175, 0.18),
    0 18px 42px rgba(2, 10, 25, 0.4) !important;
}

#page-rocket .rocket-stage::before,
#page-rocket .rocket-stage::after {
  content: none !important;
}

.rocket-flight-graph {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.rocket-chart-axis,
.rocket-chart-ticks {
  fill: none;
  stroke: rgba(92, 166, 232, 0.22);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.rocket-chart-ticks {
  stroke: rgba(108, 181, 244, 0.28);
  stroke-width: 1px;
}

.rocket-flight-curve {
  fill: none;
  stroke: url(#miravaCurve);
  stroke-width: 2px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition: opacity 180ms ease, stroke 160ms ease;
}

.rocket-flight-curve--glow {
  stroke-width: 7px;
  filter: url(#miravaCurveGlow);
}

#page-rocket .rocket-stage.waiting .rocket-flight-curve {
  opacity: 0;
}

#page-rocket .rocket-stage.flying .rocket-flight-curve {
  opacity: 1;
}

#page-rocket .rocket-stage.crashed .rocket-flight-curve {
  stroke: #ff4b8a;
  opacity: 1;
}

#page-rocket .multiplier-wrap {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 43%;
  min-height: 0;
  margin: 0;
  transform: translate(-50%, -50%);
}

#page-rocket .multiplier-wrap::before {
  width: 210px;
  height: 96px;
  background: radial-gradient(circle, rgba(57, 171, 255, 0.34), rgba(30, 107, 207, 0.13) 42%, transparent 74%) !important;
  filter: blur(20px);
}

#page-rocket .multiplier {
  color: #63c8ff !important;
  font-size: clamp(48px, 15vw, 68px);
  font-family: var(--font);
  font-style: italic;
  letter-spacing: -0.065em;
  text-shadow: 0 0 15px rgba(69, 181, 255, 0.58), 0 0 38px rgba(33, 111, 215, 0.34) !important;
}

#page-rocket .rocket-stage.flying .multiplier {
  color: #6dd0ff !important;
}

#page-rocket .rocket-stage.crashed .multiplier {
  color: #ff5c91 !important;
  text-shadow: 0 0 18px rgba(255, 75, 138, 0.5) !important;
}

#page-rocket .last-result {
  position: absolute;
  z-index: 8;
  top: calc(43% + 44px);
  left: 20px;
  right: 20px;
  color: rgba(204, 234, 255, 0.7);
}

#page-rocket .rocket-sky {
  position: absolute;
  z-index: 6;
  inset: 0;
  height: auto;
  pointer-events: none;
}

#page-rocket .rocket-trail {
  display: none;
}

#page-rocket .rocket-art {
  --pilot-rotation: -9deg;
  position: absolute;
  z-index: 7;
  left: 8%;
  top: 82%;
  bottom: auto;
  width: 108px;
  height: 120px;
  font-size: 0;
  transform: translate(-50%, -50%) rotate(var(--pilot-rotation));
  transform-origin: 50% 55%;
  isolation: isolate;
  filter: none;
}

#page-rocket .rocket-art::before,
#page-rocket .rocket-art::after {
  content: none;
}

#page-rocket .rocket-art img {
  width: 108px;
  height: 120px;
  object-fit: contain;
  display: block;
  opacity: 1;
  mix-blend-mode: normal;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.34));
}

#page-rocket .rocket-stage.flying .rocket-art,
#page-rocket .rocket-stage.crashed .rocket-art,
#page-rocket .rocket-stage.crashed.rocket-crash-hold .rocket-art,
.rocket-flight-away .rocket-art,
.rocket-ignition .rocket-art,
.rocket-flight-active .rocket-art {
  animation: none !important;
}

.rocket-anim-js .rocket-art {
  transition: none !important;
}

@keyframes mirava-pilot-float {
  from { transform: translate(-50%, -50%) rotate(var(--pilot-rotation)) translateY(1px); }
  to { transform: translate(-50%, -50%) rotate(var(--pilot-rotation)) translateY(-4px); }
}

@keyframes mirava-pilot-crash {
  0% { transform: translate(-50%, -50%) rotate(var(--pilot-rotation)) scale(1); opacity: 1; }
  45% { transform: translate(-50%, -50%) rotate(calc(var(--pilot-rotation) + 16deg)) scale(1.13); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(calc(var(--pilot-rotation) + 65deg)) scale(0.55); opacity: 0; }
}

.rocket-clouds {
  position: absolute;
  z-index: 1;
  left: -10%;
  right: -10%;
  bottom: -38px;
  height: 112px;
  opacity: 0.72;
  pointer-events: none;
  filter: none;
}

.rocket-clouds::before {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -18px;
  height: 92px;
  background:
    radial-gradient(ellipse 44% 92% at 0% 100%, rgba(82, 44, 148, 0.72), transparent 74%),
    radial-gradient(ellipse 44% 92% at 100% 100%, rgba(82, 44, 148, 0.72), transparent 74%),
    radial-gradient(ellipse 34% 78% at 24% 108%, rgba(82, 44, 148, 0.5), transparent 72%),
    radial-gradient(ellipse 38% 82% at 76% 108%, rgba(82, 44, 148, 0.5), transparent 72%),
    radial-gradient(ellipse 52% 68% at 50% 112%, rgba(82, 44, 148, 0.38), transparent 70%);
  background-repeat: no-repeat;
  pointer-events: none;
}

.rocket-clouds i {
  position: absolute;
  bottom: 0;
  width: 34%;
  aspect-ratio: 1.8;
  border-radius: 55% 55% 18% 18%;
  background: linear-gradient(180deg, rgba(96, 52, 168, 0.94), rgba(22, 8, 42, 0.98));
  filter: drop-shadow(0 -6px 14px rgba(100, 50, 200, 0.18));
}

.rocket-clouds i:nth-child(1) { left: -5%; bottom: -8px; transform: scale(1.2); }
.rocket-clouds i:nth-child(2) { left: 17%; bottom: -24px; transform: scale(1.48); }
.rocket-clouds i:nth-child(3) { left: 43%; bottom: -17px; transform: scale(1.22); }
.rocket-clouds i:nth-child(4) { left: 65%; bottom: -25px; transform: scale(1.55); }
.rocket-clouds i:nth-child(5) { left: 88%; bottom: -7px; transform: scale(1.18); }

#page-rocket .rocket-latest-cashout {
  z-index: 12;
  top: 10px;
  bottom: auto;
  align-items: center;
  flex-direction: column;
}

#page-rocket .rocket-cashout-toast {
  width: min(94%, 420px);
  max-width: none;
  height: 62px;
  padding: 5px 6px 5px 15px;
  border-radius: 17px;
  border: 1px solid rgba(81, 178, 255, 0.72) !important;
  color: #fff !important;
  background: linear-gradient(105deg, rgba(8, 32, 59, 0.98) 0 55%, rgba(23, 118, 218, 0.98) 55% 100%) !important;
  box-shadow: 0 0 0 3px rgba(31, 124, 213, 0.2), 0 12px 30px rgba(2, 11, 27, 0.44) !important;
}

.rocket-toast-copy,
.rocket-toast-win {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rocket-toast-copy { width: 55%; }
.rocket-toast-win {
  width: 45%;
  height: 100%;
  align-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #167ce7, #3caeff);
}

.rocket-toast-copy small,
.rocket-toast-win small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.rocket-toast-copy b { font-size: 20px; line-height: 1; }
.rocket-toast-win b { font-family: var(--mono); font-size: 15px; white-space: nowrap; }

#page-rocket .countdown-big {
  color: #8dd9ff !important;
  text-shadow: 0 0 18px rgba(67, 180, 255, 0.68), 0 0 42px rgba(35, 113, 218, 0.36) !important;
  background: none;
}

#page-rocket .countdown-big::before,
#page-rocket .countdown-big::after {
  border-color: rgba(81, 182, 255, 0.52);
  box-shadow: 0 0 0 18px rgba(49, 154, 255, 0.12), 0 0 0 38px rgba(32, 110, 213, 0.07);
}

#page-rocket .rocket-bet-card,
#page-rocket .rocket-players-card {
  border-color: rgba(62, 148, 233, 0.31) !important;
  background: linear-gradient(145deg, rgba(14, 48, 79, 0.88), rgba(5, 20, 38, 0.92)) !important;
}

#page-rocket .rocket-bet-card .pvp-bet-btn {
  background: linear-gradient(135deg, #157ee8, #3aaeff) !important;
  border-color: rgba(129, 207, 255, 0.38) !important;
  box-shadow: 0 9px 24px rgba(29, 130, 232, 0.3) !important;
}

@media (max-width: 390px) {
  #page-rocket .rocket-stage { min-height: 322px; }
  #page-rocket .rocket-art,
  #page-rocket .rocket-art img { width: 94px; height: 104px; }
  #page-rocket .rocket-cashout-toast { width: 96%; }
}

.rocket-particle-canvas {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#page-rocket .rocket-stage.waiting .rocket-sky {
  opacity: 1;
  visibility: visible;
}

.rocket-engine-flame {
  display: none !important;
}

.rocket-flight-reset .rocket-art {
  opacity: 1;
  transition: opacity 260ms ease;
}

.rocket-ignition .rocket-art {
  opacity: 1;
}

.rocket-flight-active .rocket-art {
  opacity: 1;
  transition: opacity 120ms ease;
}

.rocket-flight-active {
  animation: rocket-sky-drift 4.6s linear infinite;
}

.rocket-flight-away .rocket-art {
  animation: none !important;
}

@keyframes rocket-ignition-shake {
  from { transform: translate(-50%, -50%) rotate(calc(var(--pilot-rotation) - 1deg)) translate(-1px, 1px); }
  to { transform: translate(-50%, -50%) rotate(calc(var(--pilot-rotation) + 1deg)) translate(2px, -1px); }
}

@keyframes rocket-sky-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: -118px 102px, -151px 133px, -173px 121px, -127px 149px, -191px 136px, -163px 142px, 0 0; }
}

@keyframes rocket-pilot-away {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--pilot-rotation)) scale(1); }
  48% { opacity: 1; transform: translate(-35%, -65%) rotate(calc(var(--pilot-rotation) - 5deg)) scale(1.08); }
  100% { opacity: 0; transform: translate(95%, -190%) rotate(-48deg) scale(0.62); filter: blur(5px); }
}

@media (prefers-reduced-motion: reduce) {
  .rocket-flight-active,
  .rocket-flight-active .rocket-art,
  .rocket-ignition .rocket-art,
  .rocket-particle-canvas { display: none; }
}

#page-rocket .rocket-history-strip {
  display: block;
  margin: 2px 0 8px;
}

#page-rocket .pvp-fair-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 12px auto 4px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(140, 190, 255, 0.16);
  background: linear-gradient(180deg, rgba(28, 48, 74, 0.92), rgba(16, 30, 50, 0.94));
  color: rgba(180, 205, 230, 0.78);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: filter 0.22s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, color 0.22s ease;
}
#page-rocket .pvp-fair-chip:active { filter: brightness(1.12); transform: scale(0.98); }
#page-rocket .pvp-fair-chip.verified {
  color: #9af3d3;
  border-color: rgba(80, 224, 179, 0.34);
}
#page-rocket #rocketFairChipText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rocket-phase-pill {
  position: absolute;
  z-index: 11;
  top: 10px;
  left: 10px;
  min-height: 25px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(115, 190, 255, 0.2);
  border-radius: 8px;
  background: rgba(5, 17, 32, 0.56);
  color: rgba(220, 239, 255, 0.78);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 900;
}

.rocket-reconnect {
  display: none;
  margin: -4px 0 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 193, 80, 0.22);
  border-radius: 9px;
  background: rgba(255, 193, 80, 0.07);
  color: #ffd789;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.rocket-reconnect.show { display: block; }

.rocket-bets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
  margin-bottom: 8px;
}
.rocket-bets-grid:has(#rocketBetPanel2[hidden]) {
  grid-template-columns: 1fr;
}
#rocketBetPanel2[hidden] {
  display: none !important;
}

#page-rocket .rocket-bet-panel {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border-color: rgba(88, 171, 255, 0.22);
  background:
    radial-gradient(circle at 100% 0, rgba(63, 151, 241, 0.12), transparent 42%),
    linear-gradient(160deg, rgba(19, 44, 70, 0.9), rgba(7, 21, 38, 0.94));
}

.rocket-panel-head {
  min-height: 23px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.rocket-panel-head b { font-size: 12px; }

.rocket-panel-toggle {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.rocket-panel-head-side {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.rocket-panel-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: rgba(205, 234, 255, 0.72);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(180deg);
  transition: transform 240ms ease;
}

.rocket-panel-collapse {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 260ms cubic-bezier(0.2, 0.82, 0.2, 1), opacity 180ms ease;
}

.rocket-panel-body {
  min-height: 0;
  overflow: hidden;
}

.rocket-bet-panel--collapsible {
  transition: border-color 220ms ease, background 220ms ease;
}

.rocket-bet-panel--collapsible.is-collapsed .rocket-panel-head {
  margin-bottom: 0;
}

.rocket-bet-panel--collapsible.is-collapsed .rocket-panel-collapse {
  grid-template-rows: 0fr;
  opacity: 0;
}

.rocket-bet-panel--collapsible.is-collapsed .rocket-panel-chevron {
  transform: rotate(0deg);
}

.rocket-slot-result {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(206, 232, 255, 0.7);
  font: 900 10px/1 var(--mono);
}
.rocket-slot-result .tg-star {
  width: 12px;
  height: 12px;
  margin: 0;
  vertical-align: 0;
}

.rocket-slot-result.won { color: #79efc5; }
.rocket-slot-result.lost { color: #ff7891; }

#page-rocket .rocket-bet-panel .pvp-bet-field { height: 42px; min-width: 0; }
#page-rocket .rocket-bet-panel .pvp-bet-normal { min-width: 0; }
#page-rocket .rocket-bet-panel .pvp-bet-normal input { min-width: 0; font-size: 13px; }

.rocket-bet-panel .rocket-quickbets {
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 6px 0;
}

.rocket-bet-panel .rocket-quickbet {
  min-width: 0;
  height: 28px;
  padding: 0 2px;
  border-radius: 7px;
  font-size: 10px;
}
.rocket-bet-panel .rocket-quickbet.is-max {
  font-weight: 900;
  letter-spacing: 0.04em;
}

.rocket-auto-row {
  display: grid;
  grid-template-columns: 1fr 1fr 54px;
  gap: 5px;
  align-items: center;
  margin: 7px 0;
}

.rocket-auto-row label {
  min-width: 0;
  height: 28px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(128, 190, 247, 0.13);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(211, 233, 253, 0.62);
  font-size: 8.5px;
  font-weight: 850;
  white-space: nowrap;
}

.rocket-auto-row input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #319bff;
}

.rocket-auto-target {
  width: 54px;
  height: 28px;
  padding: 0 5px;
  border: 1px solid rgba(94, 177, 255, 0.25);
  border-radius: 7px;
  background: rgba(2, 12, 24, 0.45);
  color: #cdeaff;
  font: 900 10px/1 var(--mono);
  text-align: center;
}

.rocket-slot-button {
  width: 100%;
  height: 40px;
  border-radius: 9px;
  font-size: 12px;
}

.rocket-slot-button.is-cashout {
  background: linear-gradient(135deg, #21b887, #3ce1aa);
  box-shadow: 0 8px 22px rgba(38, 209, 156, 0.24);
}

.rocket-slot-button.is-won {
  background: rgba(42, 193, 142, 0.13);
  color: #81edca;
}

.rocket-slot-status {
  min-height: 0;
  margin-top: 4px;
  color: rgba(195, 222, 247, 0.58);
  font-size: 9px;
  font-weight: 750;
  text-align: left;
}
.rocket-slot-status:empty {
  display: none;
  margin: 0;
}

.rocket-slot-status.success { color: #7de9c5; }
.rocket-slot-status.danger { color: #ff8298; }

.rocket-balance-line {
  margin: 6px 0 0;
  color: rgba(201, 226, 249, 0.64);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

#page-pvp .pvp-fair-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 12px auto 4px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(140, 190, 255, 0.16);
  background: linear-gradient(180deg, rgba(28, 48, 74, 0.92), rgba(16, 30, 50, 0.94));
  color: rgba(180, 205, 230, 0.78);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: filter 0.22s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease;
}
#page-pvp .pvp-fair-chip:active { filter: brightness(1.12); transform: scale(0.98); }
#page-pvp .pvp-fair-chip-ico { font-size: 13px; line-height: 1; }
#page-pvp #pvpFairChipText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pvp-fair-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(4, 10, 20, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity;
}
.pvp-fair-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}
.pvp-fair-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 121;
  width: min(calc(100% - 36px), 360px);
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(140, 190, 255, 0.16);
  background: linear-gradient(180deg, rgba(36, 54, 78, 0.98), rgba(18, 32, 52, 0.98));
  box-shadow: 0 22px 48px rgba(0, 4, 18, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translate(-50%, calc(-50% + 18px)) scale(0.94);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.pvp-fair-modal.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.pvp-fair-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}
.pvp-fair-modal-head > button,
#pvpFairClose,
#rocketFairClose {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #d7e7f8;
  font-size: 15px;
  transition: background 0.2s ease, transform 0.18s ease;
}
.pvp-fair-modal-head > button:active,
#pvpFairClose:active,
#rocketFairClose:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.12);
}
.pvp-fair-modal-text {
  margin: 0 0 12px;
  color: rgba(200, 220, 242, 0.78);
  font-size: 13px;
  line-height: 1.4;
}
.pvp-fair-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 11px 12px;
  border: 0;
  border-radius: 11px;
  background: rgba(10, 22, 40, 0.72);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.18s ease;
}
.pvp-fair-row:not(.is-static):active {
  background: rgba(18, 36, 62, 0.9);
  transform: scale(0.985);
}
.pvp-fair-row.is-static { cursor: default; }
.pvp-fair-label {
  flex: 0 0 auto;
  color: rgba(170, 195, 220, 0.7);
  font-size: 12px;
  font-weight: 700;
}
.pvp-fair-mono {
  flex: 1;
  min-width: 0;
  color: #7ec8ff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}
.pvp-fair-status {
  min-height: 16px;
  margin: 2px 0 8px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 800;
}
.pvp-fair-how {
  margin: 0;
  color: rgba(170, 195, 220, 0.62);
  font-size: 12px;
  line-height: 1.35;
}
.pvp-fair-how code {
  color: #7ec8ff;
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(45, 156, 255, 0.12);
  padding: 1px 5px;
  border-radius: 5px;
}

/* legacy inline rocket fair panel removed — uses shared .pvp-fair-modal */
#page-rocket .rocket-fair-panel {
  display: none;
  margin: 10px 0 8px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rocket-fair-panel > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.rocket-fair-panel b { font-size: 10px; }
.rocket-fair-panel span {
  overflow: hidden;
  color: rgba(187, 217, 244, 0.52);
  font: 700 8.5px/1.2 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rocket-fair-panel button {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(91, 172, 255, 0.24);
  border-radius: 7px;
  background: rgba(59, 151, 244, 0.1);
  color: #9ed2ff;
  font-size: 9px;
  font-weight: 900;
}

@media (max-width: 420px) {
  .rocket-bets-grid { grid-template-columns: 1fr; }
  #page-rocket .rocket-stage { min-height: 245px; }
  .rocket-auto-row { grid-template-columns: 1fr 1fr 60px; }
  .rocket-auto-target { width: 60px; }
}

/* Top-up sheet — Mirava flat (no gloss) */
#sheetBackdrop {
  background: rgba(2, 8, 15, 0.78);
}

#topupSheet {
  width: min(100%, 520px);
  min-height: 0;
  max-height: calc(100dvh - 12px);
  padding: 9px 22px calc(20px + var(--safe-bot));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #0a2542 0%, #071a30 52%, #020a15 100%);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.32);
}

#topupSheet .grabber {
  width: 42px;
  height: 4px;
  margin: 0 auto 14px;
  background: rgba(120, 180, 255, 0.28);
}

#topupSheet .topup-close {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(112, 178, 245, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(217, 233, 251, 0.72);
}

#topupSheet .balance-center { display: none; }

#topupSheet .topup-tabs {
  height: 45px;
  flex: 0 0 45px;
  margin: 20px 0 16px;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

#topupSheet .topup-tabs .tab {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 950;
  transition: color 0.16s ease, background 0.16s ease;
}

#topupSheet .topup-tabs .tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  box-shadow: none;
}

#topupSheet .topup-bonus {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 74, 0.22);
  background: rgba(255, 201, 74, 0.1);
  color: var(--gold);
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.1;
}

#topupSheet .sheet-body {
  width: 100%;
  height: 185px;
  flex: 0 0 185px;
  overflow: hidden;
}

#topupSheet[data-active-pay-tab="gram"] .sheet-body {
  height: 285px;
  flex-basis: 285px;
}

#topupSheet[data-active-pay-tab="gifts"] .sheet-body {
  height: 210px;
  flex-basis: 210px;
}

#topupSheet .pay-view {
  height: 100%;
  gap: 12px;
}

#topupSheet .topup-field-label,
#topupSheet .topup-gift-title {
  display: block;
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

#topupSheet.topup-sheet .field {
  height: 54px;
  flex: 0 0 54px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

#topupSheet.topup-sheet .field:focus-within {
  border-color: rgba(74, 164, 255, 0.42);
  box-shadow: none;
}

#topupSheet.topup-sheet .field input {
  padding: 0 54px 0 20px;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}

#topupSheet.topup-sheet .field input::placeholder {
  color: rgba(217, 233, 251, 0.28);
}

#topupSheet.topup-sheet .field .tg-star,
#topupSheet.topup-sheet .ton-coin--field,
#topupSheet .ton-coin {
  right: 19px;
  filter: none;
  box-shadow: none;
}

#topupSheet #pay-stars .topup-preview { display: none; }

#topupSheet .hint-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

#topupSheet .result-line {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

#topupSheet .result-line .result-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#topupSheet.topup-sheet .topup-submit {
  width: 100%;
  height: 54px;
  min-height: 54px;
  margin-top: auto;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -0.02em;
  box-shadow: none;
}

#topupSheet.topup-sheet .topup-submit:disabled {
  opacity: 1;
  background: rgba(45, 156, 255, 0.22);
  color: rgba(217, 233, 251, 0.38);
  box-shadow: none;
}

#topupSheet .status-line {
  min-height: 17px;
  text-align: center;
  color: var(--muted);
  font-size: 11.5px;
}

#topupSheet .status-line.success { color: var(--mint); }
#topupSheet .status-line.danger { color: var(--red); }

#topupSheet .wallet-box {
  height: 54px;
  flex: 0 0 54px;
  padding: 0 8px 0 12px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

#topupSheet .wallet-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

#topupSheet .wallet-text {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

#topupSheet .wallet-box .mini-button {
  height: 36px;
  min-width: 92px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #6e43e8;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: none;
}

#topupSheet .wallet-box .mini-button.danger-btn {
  background: rgba(255, 95, 125, 0.14) !important;
  border: 1px solid rgba(255, 95, 125, 0.24) !important;
  color: #ffb8c8 !important;
  box-shadow: none !important;
}

#topupSheet .stars-browser-cta {
  padding: 10px 12px;
  border: 1px solid rgba(112, 178, 245, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

#topupSheet .stars-browser-cta p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

#topupSheet .stars-browser-cta a {
  display: inline-flex;
  margin-top: 8px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

#topupSheet #pay-gram { gap: 8px; }
#topupSheet #pay-gram .topup-submit { min-height: 50px; height: 50px; }
#topupSheet #pay-gifts .hint-line { font-size: 13px; line-height: 1.45; }

@media (max-width: 390px) {
  #topupSheet {
    min-height: 0;
    padding-right: 18px;
    padding-left: 18px;
  }

  #topupSheet .topup-tabs { margin-top: 18px; }
  #topupSheet .topup-tabs .tab { font-size: 12px; }
}

/* Bonus hangar — same violet depth system as referrals. */
#page-tasks {
  --bonus-violet: #7c4dff;
  --bonus-violet-2: #6e43e8;
  --bonus-violet-soft: rgba(124, 77, 255, 0.14);
  --bonus-violet-line: rgba(140, 104, 255, 0.22);
  --bonus-surface: rgba(10, 12, 38, 0.72);
  --bonus-label: rgba(196, 196, 232, 0.55);
  position: relative;
  padding-bottom: 28px;
}

#page-tasks .task-list {
  display: grid;
  gap: 11px;
}

#page-tasks .bonus-hero-card,
#page-tasks .bonus-section,
#page-tasks .ref-card {
  position: relative;
  isolation: isolate;
  overflow: hidden !important;
  border-radius: 18px !important;
  /* Backgrounds are ~opaque — live blur is invisible but costly on first paint */
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
#page-tasks .bonus-section .task-card {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

#page-tasks .bonus-hero-card {
  min-height: 220px;
  padding: 18px 16px 16px !important;
  border: 1px solid rgba(96, 84, 190, 0.22) !important;
  border-radius: 20px !important;
  background: linear-gradient(168deg, rgba(11, 10, 48, 0.97), rgba(5, 5, 30, 0.99)) !important;
  box-shadow: 0 18px 40px rgba(3, 2, 16, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

#page-tasks .bonus-hero-card::before {
  content: none !important;
  display: none !important;
}

/* Baked helmet artwork — ring, stars and planet in one file. */
#page-tasks .bonus-hero__bg {
  position: absolute;
  z-index: 0;
  top: 0;
  right: auto;
  left: 4px;
  height: 228px;
  width: 100%;
  object-fit: cover;
  object-position: 74% 42%;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  pointer-events: none;
}

/* Darkens the left half so the headline stays readable over the artwork. */
#page-tasks .bonus-hero-card::after {
  content: "" !important;
  position: absolute !important;
  z-index: 1;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  bottom: auto !important;
  width: auto !important;
  height: 228px !important;
  border-radius: 0 !important;
  clip-path: none !important;
  background: linear-gradient(96deg, rgba(6, 8, 30, 0.95) 2%, rgba(7, 9, 32, 0.84) 36%, rgba(8, 10, 34, 0.44) 60%, rgba(8, 10, 34, 0.10) 78%, transparent 92%) !important;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  filter: none !important;
  opacity: 1 !important;
  pointer-events: none;
  transform: none !important;
}

#page-tasks .bonus-hero-card > :not(.bonus-hero__bg) {
  position: relative;
  z-index: 2;
}

#page-tasks .bonus-hero-kicker {
  display: inline-flex !important;
  align-items: center;
  height: 24px;
  padding: 0 10px !important;
  border: 1px solid var(--bonus-violet-line) !important;
  border-radius: 8px !important;
  background: var(--bonus-violet-soft) !important;
  color: #c3b2ff !important;
  font: 900 9.5px/1 var(--mono) !important;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  text-shadow: none !important;
}

#page-tasks .bonus-hero-kicker::before {
  content: none !important;
}

#page-tasks .bonus-hero-title {
  max-width: 232px !important;
  margin-top: 12px;
  color: #f4f2ff;
  font-size: 22px !important;
  line-height: 1.1 !important;
  letter-spacing: -0.045em;
  text-shadow: none !important;
}

#page-tasks .bonus-hero-title span {
  background: linear-gradient(96deg, #8f6bff, #6f7dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#page-tasks .bonus-hero-sub {
  max-width: 236px !important;
  margin-top: 10px;
  color: rgba(206, 206, 240, 0.62) !important;
  font-size: 12.5px;
  line-height: 1.4;
}

#page-tasks .bonus-hero-progress {
  width: 100%;
  margin-top: 17px;
}

#page-tasks .bonus-hero-progress__head,
#page-tasks .bonus-hero-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--bonus-label);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.65px;
  text-transform: uppercase;
}

#page-tasks .bonus-hero-progress b {
  color: rgba(198, 198, 234, 0.72);
  font: 950 11px/1 var(--mono);
}

#page-tasks .bonus-progress-track {
  position: relative;
  height: 30px;
  margin: 0 0 1px;
  overflow: visible;
}

#page-tasks .bonus-progress-track__rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(91, 88, 138, 0.52);
}

#page-tasks .bonus-progress-fill {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 1;
  height: 2.5px;
  min-width: 0;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, #7d45ff 0%, #a878ff 55%, #c9a8ff 100%);
  box-shadow:
    0 0 4px rgba(224, 207, 255, 0.55),
    0 0 10px rgba(138, 79, 255, 0.88),
    0 0 20px rgba(138, 79, 255, 0.52);
  transition: width 460ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

#page-tasks .bonus-progress-dot {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: rgba(94, 90, 148, 0.78);
  box-shadow: 0 0 0 1px rgba(138, 132, 196, 0.22);
}

#page-tasks .bonus-progress-dot.is-done {
  width: 9px;
  height: 9px;
  background: radial-gradient(circle at 45% 36%, #f0e6ff 0%, #c4a0ff 48%, #9b72ff 100%);
  box-shadow:
    0 0 6px rgba(200, 170, 255, 0.7),
    0 0 14px rgba(138, 79, 255, 0.42);
}

#page-tasks .bonus-progress-dot.is-current {
  width: 10px;
  height: 10px;
  z-index: 3;
  background: radial-gradient(circle at 45% 36%, #fff 0%, #e0cfff 38%, #c4a8ff 100%);
  box-shadow: none;
}

#page-tasks .bonus-progress-dot.is-current::before {
  display: none;
}

#page-tasks .bonus-hero-meta {
  width: 100%;
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--bonus-label);
  font-size: 10.5px;
  font-weight: 800;
}

#page-tasks .bonus-hero-meta b {
  color: #b79bff;
  font-family: var(--mono);
}

#page-tasks .bonus-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#page-tasks .bonus-hero-meta__pct {
  color: rgba(168, 140, 255, 0.82);
  font-weight: 850;
}

#page-tasks .bonus-section {
  padding: 13px !important;
  border: 1px solid rgba(96, 84, 190, 0.22) !important;
  border-radius: 20px !important;
  background: linear-gradient(168deg, rgba(11, 10, 48, 0.97), rgba(5, 5, 30, 0.99)) !important;
  box-shadow: 0 18px 40px rgba(3, 2, 16, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

#page-tasks .bonus-section--daily {
  border-color: rgba(140, 104, 255, 0.28) !important;
  box-shadow: 0 18px 40px rgba(3, 2, 16, 0.42), 0 0 24px rgba(124, 77, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

#page-tasks .bonus-section--quick {
  border-color: rgba(120, 100, 210, 0.22) !important;
}

#page-tasks .bonus-section::before,
#page-tasks .bonus-section::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: inherit !important;
  clip-path: none !important;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.018) 42%, transparent 64%) !important;
  filter: none !important;
  opacity: 1 !important;
  pointer-events: none;
}

#page-tasks .bonus-section-head {
  position: relative;
  z-index: 2;
  min-height: 43px;
  margin-bottom: 10px;
  display: flex !important;
  align-items: center;
  justify-content: space-between !important;
  gap: 12px;
}

#page-tasks .bonus-section-head > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

#page-tasks .bonus-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f0ecff;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.035em;
  text-shadow: none !important;
}

#page-tasks .bonus-section-title::before {
  content: none !important;
  display: none !important;
}

#page-tasks .bonus-section-ico {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(150, 112, 255, 0.3);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(124, 77, 255, 0.24), rgba(74, 39, 182, 0.12));
  color: #c9b4ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 16px rgba(124, 77, 255, 0.14);
}

#page-tasks .bonus-section-ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

#page-tasks .bonus-section-sub {
  margin: 4px 0 0 32px;
  color: rgba(198, 198, 236, 0.48);
  font-size: 10.8px;
  line-height: 1.25;
}

#page-tasks .bonus-section-count {
  flex: 0 0 auto;
  width: 46px;
  min-width: 46px;
  height: 30px;
  margin-left: auto;
  padding: 0;
  display: inline-flex !important;
  align-items: center;
  align-self: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(139, 108, 255, 0.22) !important;
  border-radius: 10px;
  background: rgba(110, 74, 230, 0.10) !important;
  color: rgba(201, 184, 255, 0.55) !important;
  box-shadow: none !important;
  font: 800 10px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  text-shadow: none !important;
}

#page-tasks .bonus-section-count b {
  color: #c9b8ff;
  font-size: 13px;
  line-height: 1;
}

#page-tasks .bonus-section-count span {
  display: inline-block;
  line-height: 1;
}

#page-tasks .bonus-section-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
}

#page-tasks .bonus-section .task-card {
  min-height: 132px;
  padding: 12px !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  grid-template-areas:
    "icon main reward"
    "actions actions actions" !important;
  align-items: center !important;
  gap: 10px 11px !important;
  border: 1px solid rgba(132, 108, 235, 0.16) !important;
  border-radius: 14px !important;
  background:
    radial-gradient(circle at 0 0, rgba(124, 77, 255, 0.10), transparent 32%),
    linear-gradient(145deg, rgba(30, 34, 82, 0.72), rgba(13, 17, 46, 0.82)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 8px 20px rgba(1, 4, 16, 0.16) !important;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease !important;
}

#page-tasks .bonus-section .task-card::before {
  content: none !important;
}

#page-tasks .bonus-section .task-card:not(.claimed):active {
  transform: scale(0.992);
  border-color: rgba(150, 112, 255, 0.32) !important;
}

#page-tasks .bonus-section .task-side {
  display: contents !important;
}

#page-tasks .bonus-section .task-icon {
  grid-area: icon;
  width: 46px !important;
  height: 46px !important;
  display: grid;
  place-items: center;
  border: 1px solid rgba(146, 112, 250, 0.24) !important;
  border-radius: 13px !important;
  background: linear-gradient(145deg, rgba(124, 77, 255, 0.18), rgba(74, 39, 182, 0.10)) !important;
  color: #c4b1ff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 16px rgba(124, 77, 255, 0.07) !important;
}

#page-tasks .bonus-section .task-icon svg {
  width: 26px !important;
  height: 26px !important;
  fill: currentColor !important;
  stroke: none !important;
  stroke-width: 0 !important;
}

#page-tasks .bonus-section .task-icon--daily_rocket_2x {
  color: #ffc078 !important;
  border-color: rgba(255, 168, 88, 0.34) !important;
  background: linear-gradient(145deg, rgba(255, 140, 64, 0.24), rgba(124, 55, 12, 0.12)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 16px rgba(255, 140, 64, 0.10) !important;
}

#page-tasks .bonus-section .task-icon--daily_brand_case {
  color: #d4c4ff !important;
  border-color: rgba(167, 139, 250, 0.34) !important;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.26), rgba(74, 39, 182, 0.12)) !important;
}

#page-tasks .bonus-section .task-icon--daily_upgrade_win {
  color: #8dffd4 !important;
  border-color: rgba(101, 240, 192, 0.30) !important;
  background: linear-gradient(145deg, rgba(57, 255, 152, 0.18), rgba(12, 90, 70, 0.12)) !important;
}

#page-tasks .bonus-section .task-icon--daily_topup {
  color: #ffe08a !important;
  border-color: rgba(255, 211, 107, 0.34) !important;
  background: linear-gradient(145deg, rgba(255, 201, 74, 0.22), rgba(120, 80, 8, 0.12)) !important;
}

#page-tasks .bonus-section .task-icon--channel,
#page-tasks .bonus-section .task-icon--chat {
  color: #9bd8ff !important;
  border-color: rgba(87, 177, 255, 0.28) !important;
  background: linear-gradient(145deg, rgba(87, 177, 255, 0.18), rgba(20, 60, 120, 0.12)) !important;
}

#page-tasks .bonus-section .task-icon--story,
#page-tasks .bonus-section .task-icon--invite {
  color: #ffb4e0 !important;
  border-color: rgba(255, 120, 190, 0.28) !important;
  background: linear-gradient(145deg, rgba(255, 90, 170, 0.18), rgba(90, 20, 70, 0.12)) !important;
}

#page-tasks .bonus-section .task-main {
  grid-area: main !important;
  min-width: 0;
  padding: 0 !important;
  text-align: left;
}

#page-tasks .bonus-section .task-title {
  display: block;
  color: #f2eeff;
  font-size: 15.5px !important;
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.03em;
}

#page-tasks .bonus-section .task-sub {
  display: -webkit-box;
  max-width: 100%;
  margin-top: 5px;
  overflow: hidden;
  color: rgba(198, 198, 236, 0.52);
  font-size: 11.5px !important;
  line-height: 1.28;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#page-tasks .bonus-section .task-status {
  margin-top: 5px;
  color: rgba(167, 139, 250, 0.72);
  font-size: 10px;
}

#page-tasks .bonus-section .reward-pill {
  grid-area: reward;
  min-width: 53px !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 8px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid rgba(139, 108, 255, 0.22) !important;
  border-radius: 10px !important;
  background: rgba(110, 74, 230, 0.11) !important;
  color: #c9b8ff !important;
  box-shadow: none !important;
  font: 950 11.5px/1 var(--mono);
  text-shadow: none !important;
}

#page-tasks .bonus-section .reward-pill .tg-star {
  width: 14px;
  height: 14px;
}

#page-tasks .bonus-section .task-action-row {
  grid-area: actions !important;
  width: 100%;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.42fr) !important;
  gap: 7px !important;
}

#page-tasks .bonus-section .task-card[data-task-action="story"] .task-action-row,
#page-tasks .bonus-section .task-card[data-task-action="invite"] .task-action-row {
  grid-template-columns: 1fr !important;
}

#page-tasks .bonus-section .task-action-btn,
#page-tasks .bonus-section .task-claim-btn,
#page-tasks .bonus-section .task-disabled-pill {
  height: 39px !important;
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 950;
}

#page-tasks .bonus-section .task-action-btn {
  border: 0 !important;
  background: linear-gradient(96deg, #8256ff, #6a3ee6) !important;
  color: #fff;
  box-shadow: 0 10px 22px rgba(88, 46, 220, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  text-shadow: none !important;
}

#page-tasks .bonus-section .task-claim-btn {
  border: 1px solid var(--bonus-violet-line) !important;
  background: rgba(124, 77, 255, 0.08) !important;
  color: #c9b8ff !important;
  box-shadow: none !important;
}

#page-tasks .bonus-section .task-claim-btn:disabled {
  color: rgba(198, 184, 240, 0.38) !important;
  background: rgba(82, 68, 140, 0.08) !important;
}

#page-tasks .task-badge {
  display: none !important;
}

#page-tasks .task-state-mark {
  position: absolute;
  z-index: 4;
  left: 43px;
  top: 43px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 2px solid #131a44;
  border-radius: 50%;
  background: #9b7cff;
  color: #150a38;
  font-size: 10px;
  font-weight: 950;
  box-shadow: 0 0 11px rgba(140, 100, 255, 0.5);
}

#page-tasks .bonus-section .task-card.claimed {
  opacity: 0.66 !important;
  filter: saturate(0.72) !important;
  border-color: rgba(128, 112, 200, 0.14) !important;
}

#page-tasks .ref-card {
  margin-top: 11px !important;
  padding: 16px !important;
  border: 1px solid rgba(76, 164, 238, 0.22) !important;
  background:
    radial-gradient(ellipse 70% 60% at 96% 0%, rgba(51, 151, 233, 0.14), transparent 68%),
    linear-gradient(145deg, rgba(10, 38, 65, 0.96), rgba(4, 18, 34, 0.99)) !important;
  box-shadow: 0 14px 32px rgba(0, 8, 22, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

#page-tasks .ref-card::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  padding: 0 !important;
  border-radius: inherit !important;
  clip-path: none !important;
  background:
    radial-gradient(circle at 10% 18%, rgba(163, 220, 255, 0.32) 0 0.9px, transparent 1.6px),
    radial-gradient(circle at 82% 25%, rgba(97, 185, 255, 0.28) 0 0.9px, transparent 1.6px),
    radial-gradient(circle at 92% 72%, rgba(163, 220, 255, 0.22) 0 0.9px, transparent 1.6px) !important;
  -webkit-mask: none !important;
  mask: none !important;
  opacity: 0.6 !important;
  pointer-events: none;
}

#page-tasks .ref-card::after {
  content: "" !important;
  position: absolute !important;
  right: 2% !important;
  top: 0% !important;
  width: 46% !important;
  height: 44% !important;
  border-radius: 50% !important;
  clip-path: none !important;
  background: radial-gradient(circle at 70% 30%, rgba(65, 168, 247, 0.22), rgba(65, 168, 247, 0.07) 46%, transparent 76%) !important;
  filter: none !important;
  pointer-events: none;
  opacity: 0.9 !important;
}

#page-tasks .ref-card > * {
  position: relative;
  z-index: 2;
}

#page-tasks .ref-title-row {
  margin-bottom: 10px;
}

#page-tasks .ref-card .kicker {
  margin-bottom: 7px;
  color: #82cfff;
  font-size: 9px;
  letter-spacing: 1.7px;
}

#page-tasks .ref-title {
  color: #eff8ff !important;
  font-size: 19px;
  line-height: 1.06;
  text-shadow: none !important;
}

#page-tasks .ref-lead,
#page-tasks .ref-note {
  color: rgba(196, 219, 238, 0.56) !important;
}

#page-tasks .ref-pill {
  height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(88, 185, 249, 0.22) !important;
  border-radius: 7px;
  background: rgba(49, 151, 231, 0.1) !important;
  color: #9cdbff !important;
  box-shadow: none !important;
}

#page-tasks .ref-stats-grid {
  gap: 8px;
}

#page-tasks .ref-stat {
  border: 1px solid rgba(84, 161, 222, 0.14);
  border-radius: 11px;
  background: rgba(3, 16, 30, 0.36);
}

#page-tasks .ref-stat b {
  color: #b4e2ff;
}

#page-tasks .ref-link-box {
  border: 1px solid rgba(79, 158, 222, 0.14) !important;
  border-radius: 10px !important;
  background: rgba(2, 14, 27, 0.42) !important;
  color: rgba(175, 211, 238, 0.6) !important;
}

#page-tasks .ref-actions {
  gap: 7px;
}

#page-tasks .ref-actions .mini-button {
  height: 44px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
}

#page-tasks .ref-actions #inviteFriends {
  border: 1px solid rgba(117, 204, 255, 0.22) !important;
  background: linear-gradient(135deg, #168ddd, #2daeff) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(29, 145, 226, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  filter: none !important;
}

#page-tasks .ref-actions #copyInviteLink {
  border: 1px solid rgba(92, 174, 235, 0.18) !important;
  background: rgba(50, 142, 214, 0.08) !important;
  color: #a9d9fb !important;
  box-shadow: none !important;
}

.nav-bonus.active .nav-ico,
.nav-bonus.nav-hot .nav-ico {
  color: #b9a3ff !important;
}

@keyframes bonus-launch-in {
  from { opacity: 0; transform: translate3d(-8px, 12px, 0) scale(0.99); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes bonus-card-in {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

#page-tasks .bonus-hero-card.bonus-enter {
  animation: bonus-launch-in 420ms cubic-bezier(0.2, 0.86, 0.2, 1) both;
}
#page-tasks .bonus-section.bonus-enter {
  animation: bonus-card-in 360ms cubic-bezier(0.2, 0.86, 0.2, 1) both;
}
#page-tasks .bonus-section.bonus-enter.bonus-section--daily { animation-delay: 60ms; }
#page-tasks .bonus-section.bonus-enter.bonus-section--quick { animation-delay: 110ms; }
#page-tasks .ref-card.bonus-enter {
  animation: bonus-card-in 360ms 150ms cubic-bezier(0.2, 0.86, 0.2, 1) both;
}

/* Cheap paint for enter — blur is invisible under near-opaque fills */
#page-tasks .bonus-hero-card,
#page-tasks .bonus-section,
#page-tasks .ref-card,
#page-tasks .bonus-section .task-card {
  contain: layout paint;
  transform: translateZ(0);
}

@media (max-width: 390px) {
  #page-tasks .bonus-hero-card {
    min-height: 202px;
    padding: 17px 15px 15px !important;
  }

  #page-tasks .bonus-hero-title {
    max-width: 210px !important;
    font-size: 20px !important;
  }

  #page-tasks .bonus-hero-sub {
    max-width: 220px !important;
  }

  #page-tasks .bonus-hero-progress,
  #page-tasks .bonus-hero-meta {
    max-width: none !important;
    width: 100% !important;
  }

  #page-tasks .bonus-hero__bg,
  #page-tasks .bonus-hero-card::after {
    height: 210px !important;
  }

  #page-tasks .bonus-hero__bg {
    object-position: 80% 44%;
  }

  #page-tasks .bonus-section {
    padding: 11px !important;
  }

  #page-tasks .bonus-section .task-card {
    grid-template-columns: 42px minmax(0, 1fr) auto !important;
    padding: 10px !important;
    gap: 9px !important;
  }

  #page-tasks .bonus-section .task-icon {
    width: 42px !important;
    height: 42px !important;
  }

  #page-tasks .task-state-mark {
    left: 38px;
    top: 39px;
  }

  #page-tasks .bonus-section .task-title { font-size: 14.5px !important; }
  #page-tasks .bonus-section .task-sub { font-size: 10.8px !important; }
  #page-tasks .bonus-section .reward-pill { min-width: 47px !important; padding: 0 6px !important; }
  #page-tasks .ref-actions { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  #page-tasks .bonus-enter {
    animation: none !important;
  }
}

/* EasyGift-like top bar — cosmic Mirava palette */
.app-content {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.app-content::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
.app-content.is-page-switching {
  overflow: hidden !important;
}

/* During enter fade content is opacity:0 → skip live blur for that window only (no visual change) */
.app-content.is-page-switching #page-tasks.active .bonus-hero-card,
.app-content.is-page-switching #page-tasks.active .bonus-section,
.app-content.is-page-switching #page-tasks.active .ref-card,
.app-content.is-page-switching #page-tasks.active .task-card,
.app-content.is-page-switching #page-lottery.active .lottery-hero-card,
.app-content.is-page-switching #page-lottery.active .lottery-card {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.app-content.is-page-switching #page-tasks.active .bonus-hero-card::after,
.app-content.is-page-switching #page-tasks.active .ref-card::after {
  filter: none !important;
}

.app-content > .top-user-panel {
  min-width: 0;
}

.top-user-panel .top-user-panel__user {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.top-user-panel .identity {
  min-width: 0;
  overflow: hidden;
}

.top-user-panel .name {
  max-width: none;
}

.top-user-panel .earned {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-user-panel .top-user-panel__stars {
  flex: 0 0 auto;
  max-width: none;
}

.top-user-panel #balanceStars {
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.top-user-panel .plus {
  flex: 0 0 auto;
}

.top-user-panel .avatar {
  border-radius: 50% !important;
  overflow: hidden !important;
  isolation: isolate;
  transform: translateZ(0);
  box-shadow: none !important;
  border: 2px solid rgba(180, 220, 255, 0.32) !important;
}

.top-user-panel .avatar img {
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit !important;
  object-fit: cover !important;
  display: block !important;
}

/* PVP sector dividers run cleanly into the wheel rim. */
.pvp-wheel .pvp-wheel-dividers {
  inset: 4px !important;
}

.pvp-wheel .pvp-wheel-divider {
  top: 0;
  width: 4px;
  height: 50%;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(180deg, #09121c 0%, #040a11 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.035), 0 0 9px rgba(0, 0, 0, 0.46);
}

.pvp-center-player {
  display: none;
  width: 108px;
  min-width: 0;
  text-align: center;
}

.pvp-wheel.is-spinning .pvp-center-player,
.pvp-wheel.is-finished .pvp-center-player {
  display: grid;
  justify-items: center;
  gap: 7px;
}

.pvp-wheel.is-spinning .pvp-timer,
.pvp-wheel.is-finished .pvp-timer {
  display: none !important;
  background: none !important;
}

.pvp-wheel .pvp-timer {
  background: none !important;
}

.pvp-center-player strong {
  display: block;
  max-width: 108px;
  overflow: hidden;
  color: #f4f8ff;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
}

.pvp-center-player span {
  color: #9ecfff;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 14px rgba(64, 164, 255, 0.42);
}

.pvp-center-player.is-changing {
  animation: pvp-center-player-change 180ms ease-out;
}

.pvp-wheel.is-finished .pvp-center-player span {
  color: #7dffd8;
  text-shadow: 0 0 14px rgba(72, 255, 175, 0.38);
}

@keyframes pvp-center-player-change {
  from { opacity: 0.55; transform: translateY(3px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Compact EasyGift-inspired case catalog in Mirava steel-blue colors. */
#page-home {
  min-height: calc(var(--vh) - var(--nav-h) + 90px) !important;
}

#page-home .live-gift-card,
#page-upgrade .live-gift-card,
#page-pvp .live-gift-card {
  position: relative;
  height: 58px;
  margin-bottom: 10px;
  padding: 7px 8px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  border-color: rgba(120, 152, 255, 0.28);
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(120% 160% at 10% -10%, rgba(96, 128, 255, 0.22), transparent 46%),
    radial-gradient(130% 170% at 96% 120%, rgba(126, 66, 214, 0.2), transparent 52%),
    linear-gradient(180deg, rgba(15, 41, 80, 0.9), rgba(6, 17, 38, 0.97));
  box-shadow: inset 0 0 24px rgba(64, 112, 232, 0.14), 0 10px 24px rgba(0, 6, 26, 0.42);
}

#page-home .live-gift-card::before,
#page-upgrade .live-gift-card::before,
#page-pvp .live-gift-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 16% 28%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1.2px 1.2px at 58% 66%, rgba(184, 212, 255, 0.85), transparent),
    radial-gradient(1px 1px at 82% 22%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.3px 1.3px at 40% 82%, rgba(205, 224, 255, 0.72), transparent),
    radial-gradient(1px 1px at 28% 56%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.1px 1.1px at 72% 44%, rgba(255, 255, 255, 0.66), transparent),
    radial-gradient(1px 1px at 92% 74%, rgba(190, 215, 255, 0.6), transparent);
  animation: live-star-twinkle 3.6s ease-in-out infinite;
}

#page-home .live-gift-rail,
#page-upgrade .live-gift-rail,
#page-pvp .live-gift-rail {
  position: relative;
  z-index: 1;
  justify-content: center;
  align-items: center;
}

#page-home .live-gift-live,
#page-upgrade .live-gift-live,
#page-pvp .live-gift-live {
  font-size: 11px;
  letter-spacing: 1.4px;
}

#page-home .live-gift-area,
#page-upgrade .live-gift-area,
#page-pvp .live-gift-area {
  position: relative;
  z-index: 1;
  height: 44px;
  gap: 6px;
}

#page-home .live-gift-slot,
#page-upgrade .live-gift-slot,
#page-pvp .live-gift-slot {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  flex-basis: 44px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(49, 61, 73, 0.85), rgba(20, 36, 58, 0.9));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  padding: 5px;
  box-sizing: border-box;
}

#page-home .live-gift-slot .gift-img,
#page-upgrade .live-gift-slot .gift-img,
#page-pvp .live-gift-slot .gift-img,
#page-home .live-gift-slot.has-img img,
#page-upgrade .live-gift-slot.has-img img,
#page-pvp .live-gift-slot.has-img img {
  padding: 0 !important;
}

#page-home .home-case-lobby {
  gap: 10px;
  margin-top: 12px;
  padding: 0 0 18px;
  overflow: visible;
  position: relative;
  z-index: 30;
}

@font-face {
  font-family: "Kontrabanda";
  src: url("/static/fonts/Kontrabanda-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

#page-home .home-case-toolbar {
  width: 100%;
  padding: 0;
  position: relative;
  z-index: 40;
}

/* EasyGift-style sliding sort dropdown */
#page-home .custom-dropdown.home-case-sort {
  position: relative;
  width: 100%;
  height: 48px;
  margin: 0;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#page-home .dropdown-button {
  width: 100%;
  height: 100%;
  padding: 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(140, 190, 255, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(42, 72, 112, 0.82), rgba(24, 48, 82, 0.78));
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.18s, transform 0.12s;
}

#page-home .dropdown-button:active {
  transform: scale(0.99);
}

#page-home .custom-dropdown.is-open .dropdown-button {
  border-color: rgba(86, 184, 255, 0.45);
}

#page-home .dropdown-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.1;
  min-width: 0;
  overflow: hidden;
}

#page-home .dropdown-subtitle {
  font-size: 10px;
  color: rgba(170, 205, 245, 0.72);
  font-weight: 700;
  line-height: 1;
}

#page-home .dropdown-selected {
  font-size: 14px;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#page-home .arrow-icon {
  margin-left: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(165, 174, 184, 0.95);
  pointer-events: none;
  flex: 0 0 auto;
}

#page-home .arrow-icon .arrow-icon-up {
  transform: translateY(5px);
}

#page-home .arrow-icon .arrow-icon-down {
  transform: translateY(-5px);
}

#page-home .dropdown-list {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  z-index: 120;
  border: 1px solid rgba(140, 190, 255, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(28, 48, 78, 0.98), rgba(14, 28, 48, 0.98));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  animation: case-sort-fade-in-up 0.18s ease;
}

#page-home .dropdown-list[hidden] {
  display: none !important;
}

#page-home .dropdown-item {
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

#page-home .dropdown-item:active,
#page-home .dropdown-item.active {
  background: rgba(0, 152, 235, 0.14);
  color: #2ba6f2;
}

#page-home .dropdown-item .checkmark {
  margin-left: 8px;
  color: #2ba6f2;
  font-size: 16px;
}

@keyframes case-sort-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#page-home .home-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  width: 100%;
  justify-items: stretch;
  align-items: stretch;
}

/* Case catalog — epic layout, Mirava glass cards (bonuses / tasks style) */
#page-home .case-shop-card--catalog {
  --case-accent: #56b8ff;
  --case-glow: rgba(45, 156, 255, 0.14);
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: none;
  isolation: isolate;
  text-align: left;
  transition: filter 0.16s ease, border-color 0.16s ease;
}

#page-home .case-shop-card--catalog::before,
#page-home .case-shop-card--catalog::after {
  content: none !important;
  display: none !important;
}

#page-home .case-shop-card--limited {
  grid-column: auto;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

#page-home .case-shop-card--catalog .case-shop-card__visual {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--case-accent, #56b8ff) 14%, transparent), transparent 64%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(45, 156, 255, 0.04));
}

#page-home .case-shop-card--catalog .case-shop-card__visual::before,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 58%,
    color-mix(in srgb, var(--case-accent, #56b8ff) 18%, transparent),
    transparent 70%
  );
}

#page-home .case-shop-card--catalog .case-shop-card__img {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 1 !important;
  width: 78% !important;
  height: 78% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: translate(-50%, -50%) !important;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28)) !important;
  animation: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

#page-home .case-shop-card--catalog .case-shop-card__img--lottie svg,
#page-home .case-shop-card--catalog .case-shop-card__img--lottie canvas,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__img--lottie svg,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__img--lottie canvas {
  width: 100% !important;
  height: 100% !important;
}

#page-home .case-shop-card--catalog .case-shop-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 211, 107, 0.22);
  border-radius: 7px;
  background: rgba(255, 211, 107, 0.1);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: none;
}

#page-home .case-shop-card--catalog .case-shop-card__head {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 9px 12px 8px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.028);
  border-bottom: 1px solid var(--line-2);
}

#page-home .case-shop-card--catalog .case-shop-card__head .case-shop-card__title {
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  text-align: center;
}

#page-home .case-shop-card--catalog .case-shop-card__flakes,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flakes {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  border-radius: 0;
}

#page-home .case-shop-card--catalog.case-shop-card--particle-free .case-shop-card__visual,
#page-home .case-shop-card--catalog.case-shop-card--particle-promo .case-shop-card__visual,
#page-home .case-shop-card--catalog.case-shop-card--particle-stars .case-shop-card__visual,
#page-home .case-shop-card--catalog.case-shop-card--particle-sparkle .case-shop-card__visual,
#page-home .case-shop-card--catalog.case-shop-card--particle-emoji .case-shop-card__visual,
#page-home .case-shop-card--catalog.case-shop-card--particle-custom .case-shop-card__visual,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-free .case-shop-card__visual,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-promo .case-shop-card__visual,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-stars .case-shop-card__visual,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-sparkle .case-shop-card__visual,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-emoji .case-shop-card__visual,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-custom .case-shop-card__visual {
  background:
    radial-gradient(ellipse 120% 100% at 50% 72%, color-mix(in srgb, var(--case-accent, #56b8ff) 18%, transparent), transparent 72%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(45, 156, 255, 0.04));
}

#page-home .case-shop-card--catalog.case-shop-card--particle-free .case-shop-card__visual::before,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-free .case-shop-card__visual::before {
  background:
    radial-gradient(ellipse 130% 110% at 50% 78%, rgba(93, 255, 160, 0.18), transparent 70%),
    radial-gradient(ellipse 100% 80% at 50% 42%, rgba(93, 255, 160, 0.08), transparent 78%);
}

#page-home .case-shop-card--catalog.case-shop-card--particle-promo .case-shop-card__visual::before,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-promo .case-shop-card__visual::before {
  background:
    radial-gradient(ellipse 130% 110% at 50% 78%, rgba(167, 139, 250, 0.2), transparent 70%),
    radial-gradient(ellipse 100% 80% at 50% 42%, rgba(142, 82, 255, 0.1), transparent 78%);
}

#page-home .case-shop-card--catalog .case-shop-card__flake,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flake {
  position: absolute;
  left: var(--flake-x, 50%);
  top: var(--flake-y, 64%);
  font: 800 clamp(7px, 2.2vw, 9px) / 1 var(--font, system-ui, sans-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
  animation-name: casePromoFloat;
  animation-duration: var(--flake-duration, 3.4s);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-delay: var(--flake-delay, 0s);
}

#page-home .case-shop-card--catalog .case-shop-card__flakes--free .case-shop-card__flake,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flakes--free .case-shop-card__flake {
  animation-name: caseFreeFloat;
  color: #5dffa0;
  text-shadow:
    0 0 6px rgba(93, 255, 160, 0.95),
    0 0 14px rgba(93, 255, 160, 0.48),
    0 0 24px rgba(46, 220, 120, 0.22);
  filter: brightness(1.08) saturate(1.25) drop-shadow(0 0 3px rgba(80, 220, 120, 0.75));
}

#page-home .case-shop-card--catalog .case-shop-card__flakes--promo .case-shop-card__flake,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flakes--promo .case-shop-card__flake {
  color: #d59bff;
  text-shadow:
    0 0 6px rgba(213, 155, 255, 0.9),
    0 0 14px rgba(142, 82, 255, 0.42);
  filter: brightness(1.05) saturate(1.15) drop-shadow(0 0 3px rgba(142, 82, 255, 0.55));
}

#page-home .case-shop-card--catalog .case-shop-card__flakes--stars .case-shop-card__flake,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flakes--stars .case-shop-card__flake {
  color: #ffd56a;
  font-size: clamp(9px, 2.4vw, 12px);
  text-shadow:
    0 0 6px rgba(255, 213, 106, 0.95),
    0 0 14px rgba(255, 180, 40, 0.45);
  filter: brightness(1.08) saturate(1.2) drop-shadow(0 0 3px rgba(255, 200, 60, 0.65));
  animation-name: caseFreeFloat;
}

#page-home .case-shop-card--catalog .case-shop-card__flakes--sparkle .case-shop-card__flake,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flakes--sparkle .case-shop-card__flake {
  color: #9fd0ff;
  font-size: clamp(8px, 2.2vw, 11px);
  text-shadow:
    0 0 6px rgba(159, 208, 255, 0.9),
    0 0 14px rgba(86, 184, 255, 0.42);
  filter: brightness(1.06) saturate(1.15) drop-shadow(0 0 3px rgba(86, 184, 255, 0.55));
}

#page-home .case-shop-card--catalog .case-shop-card__flakes--emoji .case-shop-card__flake,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flakes--emoji .case-shop-card__flake {
  width: auto;
  height: auto;
  font-size: 0;
  line-height: 0;
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

#page-home .case-shop-card--catalog .case-shop-card__flake--emoji img,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flake--emoji img,
#page-home .case-shop-card--catalog .case-shop-card__flake--emoji video,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flake--emoji video {
  width: clamp(22px, 7vw, 32px);
  height: clamp(22px, 7vw, 32px);
  object-fit: contain;
  display: block;
}

#page-home .case-shop-card--catalog .case-shop-card__flake--unicode,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flake--unicode {
  font-size: clamp(18px, 5.4vw, 26px);
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
}

#page-home .case-shop-card--catalog .case-shop-card__flake--emoji .case-particle-lottie,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flake--emoji .case-particle-lottie {
  width: clamp(22px, 7vw, 32px);
  height: clamp(22px, 7vw, 32px);
  display: block;
}

#page-home .case-shop-card--catalog.case-shop-card--particle-stars .case-shop-card__visual::before,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-stars .case-shop-card__visual::before {
  background:
    radial-gradient(ellipse 130% 110% at 50% 78%, rgba(255, 213, 106, 0.18), transparent 70%),
    radial-gradient(ellipse 100% 80% at 50% 42%, rgba(255, 200, 60, 0.08), transparent 78%);
}

#page-home .case-shop-card--catalog.case-shop-card--particle-sparkle .case-shop-card__visual::before,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-sparkle .case-shop-card__visual::before {
  background:
    radial-gradient(ellipse 130% 110% at 50% 78%, rgba(159, 208, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 100% 80% at 50% 42%, rgba(86, 184, 255, 0.08), transparent 78%);
}

#page-home .case-shop-card--catalog.case-shop-card--particle-emoji .case-shop-card__visual::before,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-emoji .case-shop-card__visual::before {
  background:
    radial-gradient(ellipse 130% 110% at 50% 78%, rgba(213, 155, 255, 0.16), transparent 70%),
    radial-gradient(ellipse 100% 80% at 50% 42%, rgba(142, 82, 255, 0.08), transparent 78%);
}

#page-home .case-shop-card--catalog.case-shop-card--particle-custom .case-shop-card__visual::before,
.admin-case-preview-stage .case-shop-card--catalog.case-shop-card--particle-custom .case-shop-card__visual::before {
  background:
    radial-gradient(ellipse 130% 110% at 50% 78%, color-mix(in srgb, var(--particle-glow-color, var(--case-accent, #56b8ff)) 20%, transparent), transparent 70%),
    radial-gradient(ellipse 100% 80% at 50% 42%, color-mix(in srgb, var(--particle-glow-color, var(--case-accent, #56b8ff)) 10%, transparent), transparent 78%);
}

#page-home .case-shop-card--catalog .case-shop-card__flakes--custom .case-shop-card__flake,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flakes--custom .case-shop-card__flake {
  color: var(--particle-color, #d59bff);
  text-shadow:
    0 0 6px color-mix(in srgb, var(--particle-color, #d59bff) 90%, transparent),
    0 0 14px color-mix(in srgb, var(--particle-color, #d59bff) 42%, transparent);
  filter: brightness(1.05) saturate(1.15) drop-shadow(0 0 3px color-mix(in srgb, var(--particle-color, #d59bff) 55%, transparent));
}

#page-home .case-shop-card--catalog .case-shop-card__flakes--anim-float .case-shop-card__flake,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flakes--anim-float .case-shop-card__flake {
  animation-name: casePromoFloat;
}

#page-home .case-shop-card--catalog .case-shop-card__flakes--anim-soft .case-shop-card__flake,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flakes--anim-soft .case-shop-card__flake {
  animation-name: caseFreeFloat;
}

#page-home .case-shop-card--catalog .case-shop-card__flakes--anim-drift .case-shop-card__flake,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flakes--anim-drift .case-shop-card__flake {
  animation-name: caseDriftFloat;
}

#page-home .case-shop-card--catalog .case-shop-card__flakes--anim-pulse .case-shop-card__flake,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__flakes--anim-pulse .case-shop-card__flake {
  animation-name: casePulseFloat;
}

@keyframes caseDriftFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 0) scale(0.55);
  }
  12% {
    opacity: 0.95;
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(14px, -34px) scale(0.96);
  }
  65% {
    opacity: 0.82;
    transform: translate(-50%, -50%) translate(-10px, -72px) scale(0.92);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(8px, -128px) scale(0.78);
  }
}

@keyframes casePulseFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 0) scale(0.5);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(0, -24px) scale(1.04);
  }
  38% {
    opacity: 0.92;
    transform: translate(-50%, -50%) translate(0, -42px) scale(0.9);
  }
  58% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(0, -58px) scale(1.02);
  }
  82% {
    opacity: 0.35;
    transform: translate(-50%, -50%) translate(0, -96px) scale(0.86);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, -118px) scale(0.72);
  }
}

@keyframes caseFreeFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 0) scale(0.55);
  }
  10% {
    opacity: 0.95;
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(4px, -18px) scale(0.9);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(-3px, -56px) scale(1);
  }
  60% {
    opacity: 0.82;
    transform: translate(-50%, -50%) translate(5px, -88px) scale(0.95);
  }
  80% {
    opacity: 0.38;
    transform: translate(-50%, -50%) translate(-2px, -118px) scale(0.85);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, -148px) scale(0.7);
  }
}

@keyframes casePromoFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 0) scale(0.55);
  }
  12% {
    opacity: 0.92;
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(-4px, -22px) scale(0.9);
  }
  42% {
    opacity: 0.96;
    transform: translate(-50%, -50%) translate(3px, -54px) scale(1);
  }
  62% {
    opacity: 0.78;
    transform: translate(-50%, -50%) translate(-4px, -86px) scale(0.94);
  }
  82% {
    opacity: 0.32;
    transform: translate(-50%, -50%) translate(2px, -114px) scale(0.84);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, -142px) scale(0.72);
  }
}

#page-home .case-shop-card--catalog .case-shop-card__foot {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px 10px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.14);
  border-top: 1px solid var(--line-2);
  isolation: isolate;
}

#page-home .case-shop-card--catalog .case-shop-card__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-align: center;
  text-transform: none;
  text-shadow: none;
  transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#page-home .case-shop-card--catalog .case-shop-card__price {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  height: 28px;
  min-width: 0;
  margin: 0;
  padding: 0 9px;
  border: 1px solid rgba(255, 201, 74, 0.22);
  border-radius: 11px;
  background: rgba(255, 201, 74, 0.075);
  color: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
}

#page-home .case-shop-card--catalog .case-shop-card__go,
#page-home .case-shop-card--catalog .case-shop-card__tag,
#page-home .case-shop-card--catalog .case-shop-card__content,
#page-home .case-shop-card--catalog .case-shop-card__media {
  display: none !important;
}

#page-home .case-shop-card--catalog .case-shop-card__price b {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  color: var(--gold);
  text-shadow: none;
}

#page-home .case-shop-card--catalog .case-shop-card__price .tg-star {
  width: 13px;
  height: 13px;
  filter: none;
}

#page-home .case-shop-card--catalog:active {
  filter: brightness(1.05);
  transform: none;
}

#page-home .case-shop-card--catalog.case-shop-card--custom {
  border-color: color-mix(in srgb, var(--case-accent, #56b8ff) 22%, var(--line));
}

#page-home .case-shop-card--catalog .case-shop-card__price--promo b {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

@media (max-width: 390px) {
  #page-home .home-case-grid { gap: 10px; }
  #page-home .case-shop-card--catalog .case-shop-card__head { padding: 8px 10px 7px; min-height: 34px; }
  #page-home .case-shop-card--catalog .case-shop-card__title { font-size: 14px; }
  #page-home .case-shop-card--catalog .case-shop-card__foot { padding: 7px 10px 9px; min-height: 38px; }
  #page-home .case-shop-card--catalog .case-shop-card__price {
    height: 26px;
    padding: 0 8px;
  }
  #page-home .case-shop-card--catalog .case-shop-card__price b { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  #page-home .case-shop-card--catalog .case-shop-card__flake {
    animation: none !important;
    opacity: 0 !important;
  }
}

.admin-case-color-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.admin-case-color {
  width: 48px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(140, 190, 255, 0.28);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  overflow: hidden;
}
.admin-case-color::-webkit-color-swatch-wrapper { padding: 3px; }
.admin-case-color::-webkit-color-swatch { border: 0; border-radius: 7px; }
.admin-case-color::-moz-color-swatch { border: 0; border-radius: 7px; }
#adminCaseColorReset {
  width: auto;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  font-size: 12px;
}

@keyframes case-nebula-pulse {
  0%, 100% { opacity: 0.62; filter: saturate(1); }
  50% { opacity: 1; filter: saturate(1.25); }
}

@keyframes case-star-twinkle {
  0%, 100% { background-position: 0 0; }
  50% { background-position: 1px -1px; }
}

@media (prefers-reduced-motion: reduce) {
  #page-home .case-shop-card--catalog::before { animation: none; }
}

/* Cosmic backdrop — Mirava blue nebula (matches site shell) */
.app-shell.home-cosmos .bg {
  background:
    radial-gradient(circle at 50% -8%, rgba(72, 164, 255, 0.28), transparent 38%),
    radial-gradient(circle at 12% 42%, rgba(40, 110, 200, 0.14), transparent 40%),
    radial-gradient(circle at 90% 18%, rgba(90, 70, 200, 0.12), transparent 36%),
    radial-gradient(circle at 74% 88%, rgba(30, 100, 190, 0.14), transparent 46%),
    linear-gradient(180deg, #16103a 0%, #0c0824 52%, #0c0824 100%);
}

.app-shell.home-cosmos .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1.1px 1.1px at 120px 80px, rgba(190, 215, 255, 0.7), transparent),
    radial-gradient(1.4px 1.4px at 205px 150px, rgba(255, 255, 255, 0.72), transparent),
    radial-gradient(1px 1px at 80px 205px, rgba(210, 225, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 262px 258px, rgba(255, 255, 255, 0.78), transparent),
    radial-gradient(1px 1px at 300px 44px, rgba(200, 220, 255, 0.55), transparent),
    radial-gradient(1px 1px at 44px 288px, rgba(255, 255, 255, 0.5), transparent);
  background-size: 340px 340px;
  background-repeat: repeat;
  animation: home-star-drift 90s linear infinite, home-star-twinkle 6s ease-in-out infinite;
  opacity: 0.85;
}

@keyframes home-star-drift {
  from { background-position: 0 0; }
  to { background-position: 340px 680px; }
}

@keyframes home-star-twinkle {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell.home-cosmos .bg::after { animation: none; }
}


/* Cosmic case-game interface — Mirava palette + EasyGift layout */
#homeCaseGame.home-case-game {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 2px;
  padding: 14px 12px 16px;
  border: 1px solid rgba(110, 160, 255, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(1.3px 1.3px at 10% 14%, rgba(255, 255, 255, 0.92), transparent),
    radial-gradient(1px 1px at 26% 28%, rgba(210, 230, 255, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 48% 10%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 66% 34%, rgba(190, 220, 255, 0.65), transparent),
    radial-gradient(1.2px 1.2px at 84% 16%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 92% 52%, rgba(200, 225, 255, 0.55), transparent),
    radial-gradient(1.1px 1.1px at 18% 58%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 40% 74%, rgba(180, 210, 255, 0.5), transparent),
    radial-gradient(1.3px 1.3px at 62% 88%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 78% 68%, rgba(210, 230, 255, 0.45), transparent),
    radial-gradient(ellipse 70% 42% at 12% 0%, rgba(80, 120, 255, 0.18), transparent 62%),
    radial-gradient(ellipse 60% 48% at 96% 8%, rgba(140, 70, 220, 0.16), transparent 60%),
    radial-gradient(ellipse 55% 40% at 100% 78%, rgba(90, 60, 210, 0.18), transparent 58%),
    radial-gradient(ellipse 50% 36% at 0% 100%, rgba(40, 170, 220, 0.12), transparent 55%),
    linear-gradient(168deg, rgba(8, 20, 46, 0.96), rgba(2, 8, 22, 0.98) 52%, rgba(1, 4, 12, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 48px rgba(50, 110, 220, 0.08),
    0 16px 34px rgba(0, 3, 14, 0.48);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
}

#homeCaseGame.home-case-game::before,
#homeCaseGame.home-case-game:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  height: auto;
  background:
    radial-gradient(1.1px 1.1px at 34% 44%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 70% 56%, rgba(210, 235, 255, 0.65), transparent),
    radial-gradient(ellipse 55% 40% at 8% 30%, rgba(90, 140, 255, 0.1), transparent 70%),
    radial-gradient(ellipse 50% 38% at 92% 62%, rgba(150, 80, 230, 0.1), transparent 68%);
  animation: none;
  filter: none;
  opacity: 1;
}

#homeCaseGame.home-case-game > * {
  position: relative;
  z-index: 1;
}

#homeCaseGame .case-game-head {
  display: none !important;
}

#homeCaseGame .case-game-title {
  font-size: clamp(22px, 6.2vw, 28px);
  color: #ffe08a;
  text-shadow: none;
  filter: none;
  background: none;
  -webkit-text-fill-color: unset;
}

#homeCaseGame .case-roll {
  margin: 7px auto 18px;
  border: 0;
  border-radius: 10px;
  background: #0f1030;
  box-shadow: none;
}

#homeCaseGame .case-roll::before,
#homeCaseGame .case-roll::after {
  filter: none;
  border-left-width: 12px;
  border-right-width: 12px;
}

#homeCaseGame .case-roll::before { border-top-color: #8b5cf6; }
#homeCaseGame .case-roll::after { border-bottom-color: #8b5cf6; }

#homeCaseGame .roll-prize {
  border: 0;
  background: #171838;
  box-shadow: none;
}

#homeCaseGame .case-spin-button {
  height: auto;
  margin-top: 0 !important;
  margin-bottom: 10px !important;
  padding: 12px 0;
  border-radius: 8px;
  border: 0;
  background: #6a35e8;
  font-size: 15px;
  box-shadow: none;
  text-shadow: none;
}

#homeCaseGame .case-spin-button[disabled] {
  background: #3a4250;
  color: #7b7e87;
  opacity: 0.7;
}

#homeCaseGame .case-options {
  margin: 5px auto 10px !important;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

#homeCaseGame .case-demo-row {
  margin: 0 auto 14px;
  padding-left: 4px;
  max-width: 355px;
}

#homeCaseGame .case-count-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  border: 2px solid #171838;
  background: #0f1030;
  box-shadow: none;
}

#homeCaseGame .case-count-btn.active {
  border-color: #6a35e8;
  background: #6a35e8;
  box-shadow: none;
}

#page-home.case-single-open .case-counts {
  display: none !important;
}

#homeCaseGame .case-fill-toggle,
#homeCaseGame .case-demo-toggle {
  border: 0;
  background: transparent;
  border-radius: 0;
}

#homeCaseGame .case-fill-toggle.active {
  border: 0;
  box-shadow: none;
}

#homeCaseGame .case-roll[data-count="1"] { height: 148px; }
#homeCaseGame .case-roll[data-count="2"] { height: 178px; }
#homeCaseGame .case-roll[data-count="3"] { height: 214px; }
#homeCaseGame .case-roll[data-count="4"] { height: 246px; }
#homeCaseGame .case-roll[data-count="5"] { height: 268px; }

#homeCaseGame .case-roll-track {
  justify-content: center;
  overflow: visible;
}

#homeCaseGame .roll-row {
  flex: 0 0 auto !important;
  width: max-content !important;
  min-width: max-content !important;
  overflow: visible !important;
  min-height: 0;
}

#homeCaseGame .case-roll[data-count="1"] .roll-row { height: 128px; }
#homeCaseGame .case-roll[data-count="2"] .roll-row { height: 74px; }
#homeCaseGame .case-roll[data-count="3"] .roll-row { height: 60px; }
#homeCaseGame .case-roll[data-count="4"] .roll-row { height: 50px; }
#homeCaseGame .case-roll[data-count="5"] .roll-row { height: 44px; }

#homeCaseGame .roll-prize {
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

#homeCaseGame .home-prize-block .prize-heading {
  margin: 0 0 8px 4px;
  color: #fff;
  font-size: 18px;
  text-shadow: none;
}

#homeCaseGame .prizes-block-section:first-child .prize-heading {
  color: #fff;
}

#homeCaseGame .case-prize-card {
  border: 0;
  border-radius: 12px;
  background: #0f1030;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.13);
}

#homeCaseGame .case-prize-main {
  min-height: 68px;
  padding: 10px 14px;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: #0f1030;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.13);
}

#homeCaseGame .case-prize-main::before,
#homeCaseGame .case-prize-main::after {
  content: none;
  animation: none;
}

#homeCaseGame .case-prize-main .case-prize-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 0;
  background: #171838;
  box-shadow: none;
}

#homeCaseGame .case-prize-main .case-prize-name {
  color: #fff;
  font-size: 15px;
  text-shadow: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#homeCaseGame .case-prize-main .prize-price {
  color: #fff;
  font-weight: 900;
}

#homeCaseGame .case-prize-thumb {
  border: 0;
  background: #171838;
}

#homeCaseGame .other-prizes-panel {
  border: 0;
  border-radius: 12px;
  padding: 0 8px;
  background: #0f1030;
  box-shadow: none;
}

#homeCaseGame .other-prizes-list .case-prize-card {
  background: transparent;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  min-height: 64px;
  padding: 8px 0;
}

#homeCaseGame .other-prizes-list .case-prize-card:last-child {
  border-bottom: 0;
}

#homeCaseGame .other-prizes-list .case-prize-thumb {
  border-radius: 12px;
  border: 0;
  background: #171838;
}

#homeCaseGame .other-prizes-list .case-prize-name {
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#homeCaseGame .other-prizes-list .prize-price {
  color: var(--text-soft, #b8cee6);
}

#homeCaseGame .promo-case-bar {
  max-width: 355px;
  margin: -8px auto 10px;
  padding: 0 0 16px;
}

#homeCaseGame .promo-case-mode-row,
#homeCaseGame .promo-case-mode-left,
#homeCaseGame .promo-case-switch,
#homeCaseGame .promo-case-ticket-badge {
  display: none !important;
}

#homeCaseGame .promo-case-input {
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 8px;
  background: #171838;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  outline: 0;
  box-sizing: border-box;
}

#homeCaseGame .promo-case-input:focus {
  outline: none;
  box-shadow: none;
  border: none;
}

#homeCaseGame .promo-case-activate-btn {
  width: 100%;
  padding: 12px 0;
  margin-bottom: 4px;
  border: 0;
  border-radius: 8px;
  background: #6a35e8;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
}

#homeCaseGame .promo-case-bar.is-hidden {
  display: none !important;
}

@media (max-width: 390px) {
  #homeCaseGame.home-case-game { padding: 11px 10px 13px; }
  #homeCaseGame .case-roll[data-count="1"] { height: 140px; }
  #homeCaseGame .case-roll[data-count="2"] { height: 168px; }
  #homeCaseGame .case-roll[data-count="3"] { height: 202px; }
  #homeCaseGame .case-roll[data-count="4"] { height: 232px; }
  #homeCaseGame .case-roll[data-count="5"] { height: 252px; }
  #homeCaseGame .case-spin-button { height: 48px; }
  #homeCaseGame .case-count-btn { width: 34px; height: 36px; flex-basis: 34px; font-size: 14px; }
}

/* Cosmic daily-case sheet — EasyGift layout, Mirava blue-steel */
.daily-case-backdrop {
  background: rgba(4, 10, 22, 0.82) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  z-index: 10020 !important;
}

#dailyCaseSheet.daily-case-sheet,
.daily-case-sheet {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: 520px !important;
  max-height: none !important;
  z-index: 10021 !important;
  margin: 0 !important;
  transform: translate(-50%, 110%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: visible !important;
  padding: 18px 20px calc(28px + var(--safe-bot, 0px)) !important;
  border-radius: 22px 22px 0 0 !important;
  border-top: 1px solid rgba(130, 185, 255, 0.22) !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  background:
    radial-gradient(1.1px 1.1px at 12% 16%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 78% 12%, rgba(190,220,255,.55), transparent),
    radial-gradient(1.2px 1.2px at 42% 78%, rgba(255,255,255,.4), transparent),
    radial-gradient(ellipse 90% 42% at 50% -12%, rgba(55,130,240,.22), transparent 60%),
    radial-gradient(ellipse 50% 36% at 100% 80%, rgba(40,90,200,.12), transparent 55%),
    linear-gradient(180deg, #13233c 0%, #0c1830 46%, #081222 100%) !important;
  box-shadow: 0 -12px 40px rgba(0, 4, 18, 0.55), inset 0 1px 0 rgba(255,255,255,.06) !important;
  transition: transform .3s ease-out, opacity .2s ease-out !important;
  isolation: auto !important;
}

#dailyCaseSheet.daily-case-sheet.open,
.daily-case-sheet.open {
  transform: translate(-50%, var(--daily-drag-y, 0px)) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#dailyCaseSheet.daily-case-sheet.open.dragging,
.daily-case-sheet.open.dragging {
  transition: none !important;
}

.daily-case-head {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 0 14px !important;
  /* Bigger grab hit-area for pull-to-dismiss */
  padding: 6px 0 10px !important;
  margin-top: -4px !important;
  cursor: grab !important;
  touch-action: none !important;
}
.daily-case-head .grabber {
  width: 36px !important;
  height: 4px !important;
  margin: 0 auto !important;
  border-radius: 2px !important;
  background: rgba(140, 175, 220, 0.38) !important;
  pointer-events: none !important;
}

.daily-case-sheet::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  border-radius: inherit !important;
  background: radial-gradient(ellipse 70% 40% at 50% 8%, rgba(70,150,255,.1), transparent 65%) !important;
  animation: none !important;
  filter: none !important;
  clip-path: none !important;
  -webkit-mask: none !important;
  mask: none !important;
  padding: 0 !important;
}

.daily-case-sheet::after {
  content: none !important;
  display: none !important;
}

.daily-case-sheet > * { position: relative; z-index: 1; }

#dailyCaseSheet .daily-case-close,
.daily-case-close {
  display: flex !important;
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 32px !important;
  height: 32px !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  border: 1px solid rgba(130, 180, 255, 0.16) !important;
  background: rgba(8, 18, 36, 0.72) !important;
  color: rgba(180, 205, 235, 0.72) !important;
  font-size: 15px !important;
  line-height: 1 !important;
  z-index: 2 !important;
  cursor: pointer !important;
  padding: 0 !important;
}

.daily-case-prizes {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 6px !important;
  margin: 4px 0 18px !important;
  padding: 10px 4px 0 !important;
  overflow: visible !important;
}

.daily-case-prize {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
}

.daily-case-prize-img {
  position: relative !important;
  z-index: 1 !important;
  width: 56px !important;
  height: 56px !important;
  object-fit: contain !important;
  display: block !important;
  filter: none !important;
}

.daily-case-prize-img--case {
  width: 86px !important;
  height: 96px !important;
  animation: dailyCaseFloat 3.6s ease-in-out infinite !important;
  will-change: transform !important;
  filter: drop-shadow(0 8px 14px rgba(80, 40, 160, 0.32)) !important;
  clip-path: none !important;
}

/* EasyGift prize ground shadow (exact) — prizes only */
.daily-case-prize-shadow {
  width: 70% !important;
  height: 8px !important;
  margin-top: -10px !important;
  border-radius: 50% !important;
  background: #00000059 !important;
  filter: blur(4px) !important;
  pointer-events: none !important;
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 0 !important;
  transform: none !important;
  opacity: 1 !important;
}

.daily-case-prize-shadow--case {
  display: none !important;
}

@keyframes dailyCaseFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .daily-case-prize-img--case { animation: none !important; }
}

.daily-case-title {
  margin: 0 0 8px !important;
  font-size: 22px !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
  letter-spacing: -.03em !important;
  color: #f4f8ff !important;
  text-align: center !important;
  text-shadow: 0 0 24px rgba(90, 160, 255, 0.18) !important;
}

.daily-case-text {
  margin: 0 0 22px !important;
  padding: 0 8px !important;
  max-width: none !important;
  color: rgba(170, 195, 225, 0.78) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

.daily-case-text .daily-case-nft {
  color: #5cbcff !important;
  font-weight: 950 !important;
}

.daily-case-open {
  margin-top: 0 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 52px !important;
  padding: 16px 0 !important;
  border-radius: 12px !important;
  border: 1px solid rgba(150, 210, 255, 0.28) !important;
  background: linear-gradient(180deg, #2aa6f5, #1188e0) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  box-shadow: 0 6px 20px rgba(20, 130, 230, 0.38) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.daily-case-badge,
.daily-case-stage,
.daily-case-art,
.daily-case-cluster,
.daily-case-copy,
.daily-case-gift-wrap,
.daily-case-main,
.daily-case-box-wrap { display: none !important; }

@media (max-width: 420px) {
  #dailyCaseSheet.daily-case-sheet {
    padding: 16px 14px calc(22px + var(--safe-bot, 0px)) !important;
  }
  .daily-case-prizes { gap: 4px !important; }
  .daily-case-prize-img { width: 50px !important; height: 50px !important; }
  .daily-case-prize-img--case { width: 78px !important; height: 88px !important; }
  .daily-case-title { font-size: 20px !important; }
  .daily-case-text { font-size: 13px !important; margin-bottom: 18px !important; }
}

/* Perf: kill heavy cosmic loops on low-end Telegram WebViews */
.app-shell.home-cosmos .bg::after,
#page-home .case-shop-card--catalog::before,
#homeCaseGame.home-case-game::before,
#homeCaseGame.home-case-game:before {
  animation: none !important;
}

#page-home .case-shop-card--catalog .case-shop-card__img {
  animation: none !important;
  will-change: auto;
}
#homeCaseGame .roll-prize {
  will-change: auto;
}
#homeCaseGame .case-roll {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
#homeCaseGame .case-roll[data-count="1"] .roll-row:nth-child(n+2),
#homeCaseGame .case-roll[data-count="2"] .roll-row:nth-child(n+3),
#homeCaseGame .case-roll[data-count="3"] .roll-row:nth-child(n+4),
#homeCaseGame .case-roll[data-count="4"] .roll-row:nth-child(n+5) {
  display: none !important;
}
#homeCaseGame .case-roll[data-count="5"] .roll-row {
  display: flex !important;
}

#page-home .live-gift-card::before,
#page-upgrade .live-gift-card::before,
#page-pvp .live-gift-card::before {
  animation: none !important;
}


/* Lottery cosmic page */
#page-lottery.lottery-cosmos .lottery-list { gap: 12px; }
#page-lottery.lottery-cosmos .lottery-empty {
  padding: 24px 16px;
  text-align: center;
  color: rgba(201, 168, 255, 0.72);
  border: 1px dashed rgba(142, 82, 255, 0.24);
  border-radius: 14px;
  background: rgba(142, 82, 255, 0.04);
}

/* Modes hub — EasyGift reference: featured + horizontal grid cards */
.bottom-nav .nav-ico--img {
  display: grid;
  place-items: center;
  width: var(--icon-size, 22px);
  height: var(--icon-size, 22px);
}
.bottom-nav .nav-ico--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.78;
}
.bottom-nav .nav-item.active .nav-ico--img img,
.bottom-nav .nav-item.nav-hot .nav-ico--img img {
  opacity: 1;
}

.modes-hub {
  padding: 0 0 28px;
}

.modes-hub__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  padding: 6px 0 8px;
  overflow: visible;
}

.modes-hub__list .modes-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modes-hub__list .modes-card {
  --mode-from: #2f98ff;
  --mode-to: #167ce7;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(139, 190, 244, 0.16);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: #fff;
  background:
    radial-gradient(circle at 92% 45%, color-mix(in srgb, var(--mode-to) 18%, transparent), transparent 58%),
    linear-gradient(150deg, rgba(20, 49, 81, 0.95), rgba(5, 14, 29, 0.985));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    inset 0 -1px 0 rgba(54, 132, 214, 0.06),
    0 18px 40px rgba(0, 5, 19, 0.36),
    0 5px 14px rgba(0, 9, 28, 0.24);
  transition: transform 0.15s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Soft directed edge light. */
.modes-hub__list .modes-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5%;
  bottom: 5%;
  width: 3px;
  border-radius: 999px;
  z-index: 4;
  background: linear-gradient(180deg, transparent, var(--mode-from) 12%, var(--mode-to) 86%, transparent);
  box-shadow:
    0 0 8px color-mix(in srgb, var(--mode-from) 72%, transparent),
    3px 0 18px color-mix(in srgb, var(--mode-to) 42%, transparent);
  pointer-events: none;
}

.modes-hub__list .modes-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), transparent 22%),
    linear-gradient(110deg, rgba(108,187,255,.035), transparent 42%);
  pointer-events: none;
}

.modes-hub__list .modes-card:active:not(.modes-card--soon) {
  transform: scale(0.985);
  filter: brightness(1.04);
}

.modes-hub__list .modes-card__glow {
  position: absolute;
  right: -24px;
  top: 50%;
  width: 160px;
  height: 160px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--mode-to) 0%, transparent 70%);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

.modes-hub__list .modes-card__body {
  position: relative;
  z-index: 4;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px 8px 14px 14px;
}

.modes-hub__list .modes-card__name {
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 2px 10px rgba(2, 6, 18, .55);
}

.modes-hub__list .modes-card__sub {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 850;
  color: #86c8ff;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(2, 6, 18, .5);
}

.modes-hub__list .modes-card--lottery .modes-card__sub { color: #c2b0ff; }
.modes-hub__list .modes-card--rocket .modes-card__sub { color: #79d0ff; }
.modes-hub__list .modes-card--upgrade .modes-card__sub { color: #d59bff; }

.modes-hub__list .modes-card__foot {
  margin-top: 7px;
  margin-bottom: 13px;
  font-size: 11.5px;
  line-height: 1.32;
  font-weight: 700;
  color: rgba(203, 219, 240, 0.8);
  max-width: 46%;
  text-shadow: 0 1px 6px rgba(2, 6, 18, .55);
}

.modes-hub__list .modes-card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 108px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, var(--mode-from), var(--mode-to));
  box-shadow:
    0 6px 16px color-mix(in srgb, var(--mode-to) 46%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .32);
  pointer-events: none;
  white-space: nowrap;
}

.modes-hub__list .modes-card__cta-chevron {
  font-size: 14px;
  line-height: 1;
  margin-top: -1px;
}

.modes-hub__list .modes-card__badge {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(180, 200, 225, 0.68);
  font-size: 12px;
  font-weight: 900;
}

/* Full-bleed artwork: the illustration IS the card background (as in the mockup). */
.modes-hub__list .modes-card__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.modes-hub__list .modes-card__img {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: 50% 50%;
}

/* Left readability scrim under the text block. */
.modes-hub__list .modes-card__art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(4, 7, 22, .55), rgba(4, 7, 22, .24) 27%, transparent 46%);
  pointer-events: none;
}

/* Featured — Лотерея (wide horizontal) */
.modes-hub__list .modes-card--featured {
  min-height: 0;
  aspect-ratio: 2.55 / 1;
  background:
    radial-gradient(ellipse at -3% -8%, rgba(153, 92, 255, 0.34), transparent 48%),
    radial-gradient(ellipse at 86% 52%, rgba(143, 94, 255, 0.34), transparent 49%),
    linear-gradient(145deg, rgba(24, 45, 85, 0.97), rgba(8, 15, 34, 0.99));
  border-color: rgba(163, 136, 255, 0.2);
  box-shadow:
    inset 1px 0 0 rgba(160, 112, 255, .22),
    inset 0 1px 0 rgba(211, 199, 255, .09),
    0 20px 44px rgba(4, 5, 27, .4),
    0 7px 18px rgba(50, 22, 112, .14);
}

.modes-hub__list .modes-card--featured::before {
  background: linear-gradient(180deg, #8b6cff, #b48cff);
  box-shadow: 0 0 12px rgba(140, 110, 255, 0.5);
}

.modes-hub__list .modes-card--featured .modes-card__glow {
  right: -5%;
  width: 52%;
  height: 150%;
  background: radial-gradient(ellipse, rgba(161, 112, 255, 0.46) 0%, rgba(119, 77, 220, .17) 40%, transparent 72%);
  opacity: 0.5;
  filter: blur(9px);
}

.modes-hub__list .modes-card--featured .modes-card__body {
  padding: 17px 5px 16px 19px;
}

.modes-hub__list .modes-card--featured .modes-card__foot {
  max-width: 200px;
}

.modes-hub__list .modes-card--featured .modes-card__cta {
  background: linear-gradient(180deg, #a98cff, #8b63f5);
  box-shadow:
    0 6px 18px rgba(140, 110, 255, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, .34);
}


/* Lottery purple arc sweep + floating TG stars */
.modes-hub__list .modes-card__arc {
  position: absolute;
  z-index: 3;
  left: 45%;
  top: -36%;
  width: 56%;
  height: 172%;
  border-radius: 50%;
  background:
    conic-gradient(from 200deg, transparent 0 60%, rgba(176, 126, 255, .0) 64%, rgba(200, 145, 255, .55) 74%, rgba(224, 185, 255, .18) 86%, transparent 94%);
  -webkit-mask: radial-gradient(circle, transparent 52%, #000 55%, #000 72%, transparent 75%);
  mask: radial-gradient(circle, transparent 52%, #000 55%, #000 72%, transparent 75%);
  filter: blur(.5px) drop-shadow(0 0 14px rgba(160, 110, 255, .55));
  animation: modes-lottery-arc 5.2s linear infinite;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .9;
}

.modes-hub__list .modes-card__lottery-stars {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.modes-hub__list .modes-card__float-star {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: 0;
  filter: drop-shadow(0 3px 6px rgba(10, 4, 30, .5)) drop-shadow(0 0 7px rgba(255, 200, 80, .45));
  animation: modes-float-star 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * -.27s);
  opacity: .95;
}

/* Rocket flyby stars keep the chunky 3D look; lottery floats use the
   Telegram Premium star from the interface (base .tg-star background). */
.modes-hub__list .modes-card__star {
  background-image: url('/assets/modes/tg-star-3d.webp?v=1');
}

.modes-hub__list .modes-card__float-star:nth-child(1) { left: 31%; top: 14%; width: 22px; height: 22px; }
.modes-hub__list .modes-card__float-star:nth-child(2) { left: 41%; top: 6%; width: 15px; height: 15px; }
.modes-hub__list .modes-card__float-star:nth-child(3) { left: 63%; top: 8%; width: 20px; height: 20px; }
.modes-hub__list .modes-card__float-star:nth-child(4) { right: 6%; top: 18%; width: 17px; height: 17px; }
.modes-hub__list .modes-card__float-star:nth-child(5) { right: 3%; top: 50%; width: 24px; height: 24px; }
.modes-hub__list .modes-card__float-star:nth-child(6) { right: 11%; bottom: 12%; width: 15px; height: 15px; }
.modes-hub__list .modes-card__float-star:nth-child(7) { left: 36%; bottom: 10%; width: 19px; height: 19px; }
.modes-hub__list .modes-card__float-star:nth-child(8) { left: 52%; bottom: 5%; width: 14px; height: 14px; }
.modes-hub__list .modes-card__float-star:nth-child(9) { left: 28%; top: 46%; width: 13px; height: 13px; }
.modes-hub__list .modes-card__float-star:nth-child(10) { left: 12%; top: 12%; width: 16px; height: 16px; }

@keyframes modes-lottery-arc {
  to { transform: rotate(360deg); }
}

@keyframes modes-float-star {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); opacity: .55; }
  40% { transform: translateY(-7px) scale(1.14) rotate(12deg); opacity: 1; }
  70% { transform: translateY(3px) scale(.92) rotate(-8deg); opacity: .8; }
}

/* Rocket / Upgrade use the same full-width structure as Lottery. */
.modes-hub__list .modes-card--grid {
  min-height: 0;
  aspect-ratio: 2.55 / 1;
}

.modes-hub__list .modes-card--grid .modes-card__body {
  padding: 17px 5px 16px 19px;
  flex: 1 1 0;
}

.modes-hub__list .modes-card--grid .modes-card__badge {
  margin-top: auto;
  min-width: 108px;
  min-height: 36px;
  padding: 9px 20px;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 999px;
  font-size: 13px;
}

/* The flying pilot from the rocket game — separate animated element over static bg. */
.modes-hub__list .modes-card__pilot {
  position: absolute;
  z-index: 4;
  right: 25%;
  top: 6%;
  width: 24%;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45));
  animation: modes-pilot-hover 2.4s ease-in-out infinite alternate;
  will-change: transform;
}

.modes-hub__list .modes-card__pilot img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes modes-pilot-hover {
  from { transform: translate3d(0, -3%, 0) rotate(-2deg); }
  to { transform: translate3d(2%, 4%, 0) rotate(2.5deg); }
}

.modes-hub__list .modes-card__pilot.is-away {
  animation: modes-pilot-away .9s cubic-bezier(.45, -.12, .85, .45) both;
}

@keyframes modes-pilot-away {
  0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 1; }
  22% { transform: translate3d(-6%, 5%, 0) rotate(-7deg); opacity: 1; }
  100% { transform: translate3d(200%, -200%, 0) rotate(24deg) scale(.6); opacity: 0; }
}

.modes-hub__list .modes-card__pilot.is-return {
  animation: modes-pilot-return .75s cubic-bezier(.17, .9, .32, 1.14) both;
}

@keyframes modes-pilot-return {
  0% { transform: translate3d(-180%, 190%, 0) rotate(-18deg) scale(.7); opacity: 0; }
  100% { transform: translate3d(0, 0, 0) rotate(0) scale(1); opacity: 1; }
}

/* Tilted 3D glass "1.00X" plate — copy of the mockup's plate, live value on top. */
.modes-hub__list .modes-card__mult {
  position: absolute;
  z-index: 5;
  left: auto;
  right: 5.5%;
  top: 9%;
  min-width: 92px;
  padding: 10px 14px 9px;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  border-radius: 14px;
  border: 1.5px solid rgba(178, 216, 255, .62);
  background:
    linear-gradient(165deg, rgba(112, 148, 255, .30), rgba(72, 88, 208, .26) 48%, rgba(28, 35, 108, .44));
  box-shadow:
    -4px 5px 0 rgba(22, 36, 105, .5),
    -7px 10px 22px rgba(4, 18, 60, .55),
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -12px 24px rgba(52, 110, 245, .22),
    0 0 30px rgba(90, 170, 255, .35);
  color: #fff;
  backdrop-filter: blur(7px) saturate(150%);
  -webkit-backdrop-filter: blur(7px) saturate(150%);
  pointer-events: none;
  transform: rotate(-5deg) skewX(-8deg);
  transform-origin: 50% 50%;
}

/* Glass shine across the plate */
.modes-hub__list .modes-card__mult::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .06) 34%, transparent 52%, rgba(120, 170, 255, .14) 100%);
  pointer-events: none;
}

/* Gold star sitting on the plate corner, like in the mockup */
.modes-hub__list .modes-card__mult::after {
  content: '';
  position: absolute;
  top: -12px;
  right: -9px;
  width: 24px;
  height: 24px;
  background: url('/assets/modes/tg-star-3d.webp?v=1') center / contain no-repeat;
  transform: skewX(8deg) rotate(10deg);
  filter: drop-shadow(0 3px 6px rgba(10, 4, 30, .55));
  pointer-events: none;
}

.modes-hub__list .modes-card__mult b,
.modes-hub__list .modes-card__mult small {
  font-style: italic;
  /* Italic glyphs overflow the line box by ~3px, and background-clip:text paints
     only inside it — the padding grows the paint area, the margin undoes the layout. */
  padding: 0.3em 0.14em;
  margin: -0.3em -0.14em;
  background: linear-gradient(180deg, #ffffff 29%, #c9edff 51.5%, #7ed3ff 83%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 9px rgba(110, 210, 255, .6)) drop-shadow(0 2px 3px rgba(8, 26, 84, .55));
}

.modes-hub__list .modes-card__mult b {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.modes-hub__list .modes-card__mult small {
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
  opacity: 1;
  text-transform: uppercase;
}

.modes-hub__list .modes-card__mult.is-pop {
  animation: modes-mult-pop .72s cubic-bezier(.16, .9, .24, 1.15) both;
}

.modes-hub__list .modes-card__mult.is-crash {
  animation: modes-mult-crash .38s ease-in both;
}

@keyframes modes-mult-crash {
  0% { transform: rotate(-5deg) skewX(-8deg) scale(1.1); opacity: 1; filter: brightness(1.3); }
  55% { transform: rotate(4deg) skewX(-8deg) scale(1.42); opacity: .85; filter: brightness(1.65); box-shadow: 0 0 38px rgba(255, 150, 90, .75); }
  100% { transform: rotate(-20deg) skewX(-8deg) scale(.25); opacity: 0; filter: brightness(.6); }
}


@keyframes modes-mult-pop {
  0% { transform: rotate(-5deg) skewX(-8deg) scale(1); filter: brightness(1); }
  28% { transform: rotate(-8deg) skewX(-8deg) scale(1.24); filter: brightness(1.4); box-shadow: 0 0 30px rgba(120, 210, 255, .9), 0 10px 20px rgba(10, 55, 130, .35); }
  55% { transform: rotate(-2deg) skewX(-8deg) scale(1.07); }
  100% { transform: rotate(-5deg) skewX(-8deg) scale(1); filter: brightness(1); }
}

.modes-hub__list .modes-card__rocket-canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.modes-hub__list .modes-card__upgrade-orbit {
  position: absolute;
  z-index: 3;
  left: 73%;
  top: 40%;
  width: 46%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  animation: modes-upgrade-orbit 5.2s linear infinite;
}

.modes-hub__list .modes-card__upgrade-orbit .tg-star {
  position: absolute;
  width: 13px;
  height: 13px;
  margin: 0;
  filter: drop-shadow(0 0 6px rgba(255, 215, 69, .92));
  animation: modes-star-twinkle 1.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -.18s);
}

.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(1) { left: 48%; top: -5%; }
.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(2) { right: -3%; top: 28%; width: 10px; height: 10px; }
.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(3) { right: 6%; bottom: 4%; width: 12px; height: 12px; }
.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(4) { left: 20%; bottom: -2%; width: 9px; height: 9px; }
.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(5) { left: -4%; top: 34%; width: 11px; height: 11px; }
.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(6) { left: 17%; top: 7%; width: 8px; height: 8px; }
.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(7) { right: 13%; top: 8%; width: 9px; height: 9px; }
.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(8) { left: 2%; bottom: 18%; width: 7px; height: 7px; }
.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(9) { left: 34%; top: -8%; width: 10px; height: 10px; }
.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(10) { right: -2%; bottom: 28%; width: 8px; height: 8px; }
.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(11) { left: 8%; top: 58%; width: 12px; height: 12px; }
.modes-hub__list .modes-card__upgrade-orbit .tg-star:nth-child(12) { right: 24%; top: -2%; width: 9px; height: 9px; }

.modes-hub__list .modes-card__upgrade-pulse {
  position: absolute;
  z-index: 2;
  left: 73%;
  top: 40%;
  width: 34%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(190, 130, 255, .32), transparent 68%);
  filter: blur(9px);
  animation: modes-upgrade-pulse 2.3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes modes-upgrade-orbit {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes modes-star-twinkle {
  0%, 100% { opacity: .55; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.18); }
}

@keyframes modes-upgrade-pulse {
  0%, 100% { opacity: .35; transform: translate(-50%, -50%) scale(.92); }
  50% { opacity: .85; transform: translate(-50%, -50%) scale(1.12); }
}

.modes-hub__list .modes-card--grid .modes-card__glow {
  right: -20px;
  top: 55%;
  width: 140px;
  height: 140px;
  opacity: 0.18;
}

.modes-hub__list .modes-card--rocket {
  background:
    radial-gradient(ellipse at -5% 108%, rgba(0, 153, 255, .38), transparent 48%),
    radial-gradient(ellipse at 88% 48%, rgba(33, 126, 232, .21), transparent 51%),
    linear-gradient(145deg, rgba(16, 55, 91, .97), rgba(4, 15, 30, .99));
  box-shadow:
    inset 1px 0 0 rgba(58, 178, 255, .24),
    inset 0 -1px 0 rgba(43, 156, 255, .14),
    0 20px 42px rgba(0, 7, 24, .39),
    0 8px 20px rgba(0, 85, 168, .12);
}

.modes-hub__list .modes-card--rocket .modes-card__glow {
  left: -24%;
  right: auto;
  top: auto;
  bottom: -29%;
  width: 112%;
  height: 79%;
  transform: none;
  background: radial-gradient(ellipse, rgba(0, 159, 255, .42), rgba(0, 110, 235, .13) 46%, transparent 72%);
  opacity: .58;
  filter: blur(12px);
}

.modes-hub__list .modes-card--upgrade {
  background:
    radial-gradient(ellipse at 112% 108%, rgba(24, 188, 255, .33), transparent 51%),
    radial-gradient(ellipse at 92% 42%, rgba(48, 126, 224, .17), transparent 48%),
    linear-gradient(145deg, rgba(17, 47, 78, .96), rgba(5, 15, 29, .99));
  box-shadow:
    inset -1px 0 0 rgba(72, 188, 255, .15),
    inset 0 -1px 0 rgba(53, 167, 255, .12),
    0 20px 42px rgba(0, 7, 24, .39),
    0 8px 20px rgba(0, 100, 171, .1);
}

.modes-hub__list .modes-card--upgrade .modes-card__glow {
  right: -27%;
  top: auto;
  bottom: -27%;
  width: 110%;
  height: 82%;
  transform: none;
  background: radial-gradient(ellipse, rgba(29, 198, 255, .42), rgba(17, 119, 226, .12) 46%, transparent 72%);
  opacity: .54;
  filter: blur(13px);
}

.modes-hub__list .modes-card--soon {
  cursor: default;
  opacity: 0.9;
}

.modes-hub__list .modes-card--soon:active {
  transform: none;
  filter: none;
}

.modes-hub__list .modes-card--soon::before {
  opacity: 0.45;
}

.modes-hub__list .modes-card--soon .modes-card__glow {
  opacity: 0.08;
}

.modes-hub__list .modes-card--upgrade.modes-card--soon .modes-card__glow {
  opacity: .54;
}

/* Telegram Stars waterfall around the Rocket artwork. */
.modes-hub__list .modes-card__starfall {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 90%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 90%, transparent 100%);
}

.modes-hub__list .modes-card__star {
  --star-x: 70%;
  --star-delay: 0s;
  --star-duration: 4s;
  --star-scale: .5;
  --star-drift: 0px;
  --star-rotate: 150deg;
  position: absolute;
  top: auto;
  bottom: -26px;
  left: var(--star-x);
  width: 20px;
  height: 20px;
  opacity: 0;
  margin: 0;
  filter: drop-shadow(0 3px 6px rgba(10, 4, 30, .5)) drop-shadow(0 0 6px rgba(255, 200, 80, .4));
  animation: modes-star-flyby var(--star-duration) linear var(--star-delay) infinite;
  will-change: transform, opacity;
}

/* Stars sweep diagonally up-right — the same direction the rocket flies. */
@keyframes modes-star-flyby {
  0% {
    opacity: 0;
    transform: translate3d(-24px, 20px, 0) rotate(0) scale(var(--star-scale));
  }
  12% { opacity: .95; }
  74% { opacity: .78; }
  100% {
    opacity: 0;
    transform: translate3d(calc(170px + var(--star-drift)), -240px, 0) rotate(var(--star-rotate)) scale(var(--star-scale));
  }
}

.modes-hub__list .modes-card__ico {
  width: 72px;
  height: 72px;
  color: #6eb8ff;
  filter: drop-shadow(0 0 14px rgba(80, 170, 255, 0.35));
}

.modes-hub__list .modes-card__ico--upgrade {
  opacity: 0.7;
}

@media (max-width: 390px) {
  .modes-hub__list .modes-card__name { font-size: 17px; }
  .modes-hub__list .modes-card__sub { font-size: 12px; }
  .modes-hub__list .modes-card__foot { font-size: 10.5px; }
  .modes-hub__list .modes-card__cta,
  .modes-hub__list .modes-card--grid .modes-card__badge { min-width: 92px; padding: 8px 16px; font-size: 12px; }
  .modes-hub__list .modes-card__mult { min-width: 80px; padding: 8px 11px 7px; }
  .modes-hub__list .modes-card__mult b { font-size: 18px; }
  .modes-hub__list .modes-card__mult small { font-size: 14px; }
  .modes-hub__list .modes-card__ico { width: 64px; height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .modes-hub__list .modes-card__star {
    animation: none;
    opacity: .28;
    transform: translate3d(40px, -70px, 0) scale(var(--star-scale));
  }
  .modes-hub__list .modes-card__pilot,
  .modes-hub__list .modes-card__upgrade-orbit,
  .modes-hub__list .modes-card__arc,
  .modes-hub__list .modes-card__float-star,
  .modes-hub__list .modes-card__upgrade-pulse,
  .modes-hub__list .modes-card__mult {
    animation: none;
  }
  .modes-hub__list .modes-card__rocket-canvas { display: none; }
}

/* NFT upgrader */
#page-upgrade.upgrade-game {
  --upgrade-chance-angle: 180deg;
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  padding-bottom: 20px;
  color: #f4f8ff;
}

#page-upgrade .upgrade-shell {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

#page-upgrade .upgrade-shell > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#page-upgrade .upgrade-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 0;
}

#page-upgrade .upgrade-kicker {
  margin-bottom: 3px;
  color: #73baff;
  font: 900 10px/1.2 var(--mono);
  letter-spacing: .16em;
}

#page-upgrade .upgrade-head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.045em;
}

#page-upgrade .upgrade-head p {
  margin: 6px 0 0;
  color: rgba(190, 211, 235, .65);
  font-size: 12px;
  font-weight: 750;
}

#page-upgrade .upgrade-fair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid rgba(87, 210, 158, .2);
  border-radius: 999px;
  color: #92e8c2;
  background: rgba(47, 178, 123, .08);
  font-size: 10px;
  font-weight: 900;
}

#page-upgrade .upgrade-fair span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #61e3a8;
  box-shadow: 0 0 10px rgba(97, 227, 168, .85);
}

#page-upgrade .upgrade-arena {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  display: grid;
  place-items: start center;
  padding-top: 18px;
  border: 1px solid rgba(112, 174, 245, .16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 15%, rgba(90, 115, 255, .2), transparent 38%),
    linear-gradient(160deg, rgba(16, 36, 64, .94), rgba(4, 12, 25, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 18px 45px rgba(0, 4, 18, .3);
}

#page-upgrade .upgrade-arena::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image: radial-gradient(circle, #b4d8ff 0 1px, transparent 1.4px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 72%);
  mask-image: linear-gradient(180deg, #000, transparent 72%);
}

#page-upgrade .upgrade-ambient {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(42px);
  opacity: .17;
}

#page-upgrade .upgrade-ambient--one { left: -95px; top: 62px; background: #246dff; }
#page-upgrade .upgrade-ambient--two { right: -90px; top: 88px; background: #985dff; }

#page-upgrade .upgrade-wheel {
  --upgrade-win: #5a8fff;
  position: relative;
  z-index: 2;
  width: 214px;
  height: 214px;
  box-sizing: border-box;
  border: 1px solid rgba(150, 199, 255, .2);
  border-radius: 50%;
  background:
    radial-gradient(circle, #081423 0 48%, transparent 49%),
    conic-gradient(from 0deg, var(--upgrade-win) 0 var(--upgrade-chance-angle), rgba(39, 57, 82, .8) var(--upgrade-chance-angle) 360deg);
  box-shadow:
    0 0 0 8px rgba(35, 78, 132, .13),
    0 0 50px rgba(62, 124, 255, .24),
    inset 0 0 28px rgba(101, 164, 255, .2);
}

#page-upgrade .upgrade-wheel::before,
#page-upgrade .upgrade-wheel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

#page-upgrade .upgrade-wheel::before {
  inset: 12px;
  border: 1px solid rgba(212, 233, 255, .16);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, .48);
}

#page-upgrade .upgrade-wheel::after {
  inset: 50px;
  background: radial-gradient(circle at 45% 36%, rgba(38, 66, 104, .95), rgba(4, 13, 25, .98));
  border: 1px solid rgba(143, 196, 255, .18);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
}

#page-upgrade .upgrade-wheel__ticks {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  opacity: .26;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.85) 0 1deg, transparent 1deg 10deg);
  -webkit-mask: radial-gradient(circle, transparent 0 87%, #000 88%);
  mask: radial-gradient(circle, transparent 0 87%, #000 88%);
}

#page-upgrade .upgrade-wheel__needle {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 50%;
  transform: translate(-50%, -100%) rotate(0deg);
  transform-origin: 50% 100%;
  transition: transform 2.7s cubic-bezier(.12, .72, .13, 1);
}

#page-upgrade .upgrade-wheel__needle i {
  position: absolute;
  left: 50%;
  top: -7px;
  width: 16px;
  height: 21px;
  transform: translateX(-50%);
  clip-path: polygon(50% 0, 100% 100%, 50% 78%, 0 100%);
  background: linear-gradient(180deg, #fff, #a5d6ff 55%, #478fff);
  filter: drop-shadow(0 0 7px rgba(118, 189, 255, .85));
}

#page-upgrade .upgrade-wheel__core {
  position: absolute;
  z-index: 4;
  inset: 58px;
  display: grid;
  align-content: center;
  justify-items: center;
  border-radius: 50%;
}

#page-upgrade .upgrade-wheel__core strong {
  font: 950 25px/1 var(--mono);
  letter-spacing: -.06em;
  color: #fff;
  text-shadow: 0 0 16px rgba(102, 169, 255, .5);
}

#page-upgrade .upgrade-wheel__core span {
  margin-top: 6px;
  color: rgba(164, 192, 224, .58);
  font: 900 7px/1 var(--mono);
  letter-spacing: .12em;
}

#page-upgrade .upgrade-match {
  position: absolute;
  z-index: 6;
  left: 14px;
  right: 14px;
  bottom: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
}

#page-upgrade .upgrade-match-card {
  position: relative;
  height: 86px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(99, 168, 255, .19);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(35, 68, 111, .7), rgba(11, 25, 44, .88));
}

#page-upgrade .upgrade-match-card--target {
  border-color: rgba(158, 115, 255, .23);
  background: linear-gradient(145deg, rgba(72, 49, 125, .7), rgba(20, 17, 46, .9));
}

#page-upgrade .upgrade-match-card img {
  width: 68px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .4));
}

#page-upgrade .upgrade-match-card small {
  position: absolute;
  left: 8px;
  bottom: 6px;
  color: rgba(193, 215, 240, .55);
  font: 850 7px/1 var(--mono);
  letter-spacing: .08em;
}

#page-upgrade .upgrade-match-card__plus {
  color: rgba(151, 196, 245, .5);
  font: 300 28px/1 sans-serif;
}

#page-upgrade .upgrade-match-arrow {
  color: rgba(153, 195, 240, .7);
  font-size: 24px;
  text-align: center;
}

#page-upgrade .upgrade-proof {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(91, 160, 238, .12);
  border-radius: 12px;
  background: rgba(15, 34, 57, .62);
  color: rgba(177, 202, 229, .6);
  font-size: 10px;
}

#page-upgrade .upgrade-proof span {
  padding: 4px 6px;
  border-radius: 6px;
  color: #87bfff;
  background: rgba(75, 143, 226, .13);
  font: 900 9px/1 var(--mono);
}

#page-upgrade .upgrade-proof b { font-weight: 750; }

#page-upgrade .upgrade-panel {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(108, 172, 245, .14);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(16, 36, 61, .92), rgba(6, 17, 31, .97));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 14px 35px rgba(0, 4, 15, .22);
}

#page-upgrade .upgrade-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 10px;
}

#page-upgrade .upgrade-section-head--chance { margin-top: 16px; }

#page-upgrade .upgrade-section-head > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

#page-upgrade .upgrade-section-head span {
  color: #6aaeff;
  font: 900 9px/1 var(--mono);
}

#page-upgrade .upgrade-section-head b { font-size: 12px; }
#page-upgrade .upgrade-section-head small { color: rgba(176, 202, 230, .48); font-size: 9px; }

#page-upgrade .upgrade-gift-strip {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 112px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 5px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

#page-upgrade .upgrade-gift-strip::-webkit-scrollbar { display: none; }

#page-upgrade .upgrade-gift-option {
  position: relative;
  width: 88px;
  min-width: 88px;
  height: 106px;
  overflow: hidden;
  scroll-snap-align: start;
  padding: 6px;
  border: 1px solid rgba(100, 165, 238, .15);
  border-radius: 13px;
  color: #f4f8ff;
  background: linear-gradient(150deg, rgba(31, 61, 98, .72), rgba(9, 22, 39, .92));
  text-align: left;
}

#page-upgrade .upgrade-gift-option.selected {
  border-color: rgba(100, 176, 255, .72);
  box-shadow: 0 0 0 2px rgba(71, 146, 241, .13), 0 9px 22px rgba(31, 112, 224, .18);
}

#page-upgrade .upgrade-gift-option img {
  display: block;
  width: 100%;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .38));
}

#page-upgrade .upgrade-gift-option strong {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#page-upgrade .upgrade-gift-option span {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  color: #ffd86c;
  font: 900 10px/1 var(--mono);
}

#page-upgrade .upgrade-gift-option span .tg-star { width: 10px; height: 10px; margin: 0; }

#page-upgrade .upgrade-empty {
  width: 100%;
  min-height: 106px;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px dashed rgba(107, 166, 232, .18);
  border-radius: 13px;
  color: rgba(180, 204, 231, .5);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

#page-upgrade .upgrade-chance-picks {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 17px;
}

#page-upgrade .upgrade-chance-picks button {
  height: 35px;
  border: 1px solid rgba(105, 166, 236, .14);
  border-radius: 10px;
  color: rgba(193, 216, 242, .68);
  background: rgba(255, 255, 255, .035);
  font: 900 11px/1 var(--mono);
}

#page-upgrade .upgrade-chance-picks button.active {
  border-color: rgba(95, 167, 255, .55);
  color: #fff;
  background: linear-gradient(135deg, rgba(55, 136, 239, .85), rgba(83, 100, 226, .72));
  box-shadow: 0 8px 18px rgba(43, 112, 224, .2);
}

#page-upgrade .upgrade-launch {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #318df4, #6558e7);
  box-shadow: 0 12px 28px rgba(53, 112, 232, .28), inset 0 1px 0 rgba(255, 255, 255, .2);
  font-size: 14px;
  font-weight: 950;
}

#page-upgrade .upgrade-launch:disabled {
  color: rgba(190, 211, 235, .4);
  background: rgba(255, 255, 255, .055);
  box-shadow: none;
}

#page-upgrade .upgrade-launch i { font-style: normal; font-size: 19px; }

#page-upgrade .upgrade-status {
  min-height: 16px;
  padding-top: 8px;
  color: rgba(184, 207, 233, .62);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

#page-upgrade .upgrade-status.won { color: #74e3ad; }
#page-upgrade .upgrade-status.lost { color: #ff8f9e; }
#page-upgrade .upgrade-arena.won { box-shadow: inset 0 0 60px rgba(56, 217, 145, .12), 0 18px 45px rgba(0, 4, 18, .3); }
#page-upgrade .upgrade-arena.lost { box-shadow: inset 0 0 60px rgba(255, 72, 107, .1), 0 18px 45px rgba(0, 4, 18, .3); }

@media (max-width: 360px) {
  #page-upgrade .upgrade-wheel { width: 198px; height: 198px; }
  #page-upgrade .upgrade-match-card { height: 80px; }
  #page-upgrade .upgrade-arena { min-height: 312px; }
  #page-upgrade .upgrade-section-head small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #page-upgrade .upgrade-wheel__needle { transition-duration: .01s; }
}

/* ==========================================================================
   v786 — modes moved to home, own PVP card, Referrals + Leaders pages
   ========================================================================== */

/* --- Home: modes strip above the case lobby --- */
#page-home .home-modes {
  margin: 14px 0 0;
}

#page-home.case-game-open .home-modes {
  display: none !important;
}

.home-modes__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 3px 11px;
}

.home-modes__title {
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -0.035em;
  color: #fff;
}

.home-modes__hint {
  color: rgba(216, 232, 251, 0.48);
  font-size: 11.5px;
  font-weight: 800;
}

/* --- PVP card: gold arena, no baked artwork --- */
.modes-hub__list .modes-card--pvp {
  background:
    radial-gradient(ellipse at 84% 46%, rgba(255, 138, 45, 0.32), transparent 52%),
    radial-gradient(ellipse at -6% 112%, rgba(255, 201, 74, 0.2), transparent 48%),
    linear-gradient(145deg, rgba(72, 43, 12, 0.96), rgba(21, 11, 4, 0.99));
  border-color: rgba(255, 190, 90, 0.24);
  box-shadow:
    inset 1px 0 0 rgba(255, 190, 90, 0.24),
    inset 0 -1px 0 rgba(255, 150, 60, 0.12),
    0 20px 42px rgba(24, 6, 0, 0.42),
    0 8px 20px rgba(168, 78, 0, 0.14);
}

.modes-hub__list .modes-card--pvp::before {
  background: linear-gradient(180deg, transparent, #ffc94a 12%, #ff6a3d 86%, transparent);
  box-shadow: 0 0 12px rgba(255, 170, 60, 0.55);
}

.modes-hub__list .modes-card--pvp .modes-card__glow {
  right: -16%;
  width: 76%;
  height: 152%;
  background: radial-gradient(ellipse, rgba(255, 163, 60, 0.44), rgba(255, 110, 40, 0.14) 44%, transparent 72%);
  opacity: 0.52;
  filter: blur(11px);
}

.modes-hub__list .modes-card--pvp .modes-card__sub { color: #ffd08a; }

.modes-hub__list .modes-card--pvp .modes-card__cta {
  color: #2a1400;
  background: linear-gradient(180deg, #ffca63, #f59021);
  box-shadow:
    0 6px 18px rgba(255, 150, 50, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.modes-hub__list .modes-card--pvp .modes-card__art::after {
  background: linear-gradient(90deg, rgba(20, 8, 2, 0.6), rgba(20, 8, 2, 0.24) 30%, transparent 50%);
}

.modes-hub__list .modes-card__pvp {
  position: absolute;
  z-index: 3;
  right: 22px;
  top: 50%;
  width: 88px;
  height: 88px;
  transform: translateY(-50%);
}

.modes-hub__list .modes-card__pvp-wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ffc94a 0 20%, #ff6a3d 0 40%, #ff4f8b 0 60%, #7d7bff 0 80%, #37d6a6 0 100%);
  box-shadow:
    0 0 0 3px rgba(14, 7, 2, 0.8),
    0 0 26px rgba(255, 150, 50, 0.4),
    inset 0 0 22px rgba(0, 0, 0, 0.5);
  animation: pvpWheelSpin 9s linear infinite;
}

.modes-hub__list .modes-card__pvp-wheel.is-spin {
  animation-duration: 0.85s;
}

.modes-hub__list .modes-card__pvp-wheel-ring {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(12, 6, 2, 0.97) 60%, rgba(12, 6, 2, 0.62) 100%);
  box-shadow: inset 0 0 14px rgba(255, 150, 50, 0.28);
}

.modes-hub__list .modes-card__pvp-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 21px;
  font-style: italic;
  font-weight: 950;
  letter-spacing: -0.05em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(255, 140, 40, 0.75);
}

.modes-hub__list .modes-card__pvp-marker {
  position: absolute;
  left: 50%;
  top: -7px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid #ffe6a8;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
}

.modes-hub__list .modes-card__pvp-orbit {
  position: absolute;
  inset: 0;
  animation: pvpOrbit 16s linear infinite;
}

.modes-hub__list .modes-card__pvp-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 214, 150, 0.75);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 196, 116, 0.6));
  box-shadow: 0 0 12px rgba(255, 170, 70, 0.55);
  transform: rotate(calc(var(--i) * 72deg)) translateY(-54px);
}

.modes-hub__list .modes-card__pvp-chip:nth-child(2) { background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 122, 92, 0.6)); }
.modes-hub__list .modes-card__pvp-chip:nth-child(3) { background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(150, 138, 255, 0.6)); }
.modes-hub__list .modes-card__pvp-chip:nth-child(4) { background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(88, 226, 182, 0.6)); }
.modes-hub__list .modes-card__pvp-chip:nth-child(5) { background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 154, 208, 0.6)); }

.modes-hub__list .modes-card__pvp-sparks {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.modes-hub__list .modes-card__pvp-spark {
  position: absolute;
  right: calc(6% + var(--i) * 13%);
  bottom: -14px;
  width: 13px;
  height: 13px;
  opacity: 0;
  animation: pvpSpark 4.2s ease-in infinite;
  animation-delay: calc(var(--i) * -0.72s);
}

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

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

@keyframes pvpSpark {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.5); }
  18% { opacity: 0.85; }
  100% { opacity: 0; transform: translate3d(-26px, -104px, 0) rotate(150deg) scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .modes-hub__list .modes-card__pvp-wheel,
  .modes-hub__list .modes-card__pvp-orbit,
  .modes-hub__list .modes-card__pvp-spark {
    animation: none;
  }
  .modes-hub__list .modes-card__pvp-spark { opacity: 0.3; }
}

/* --- Admin: referral milestones + premium emoji --- */
#admin-pane-referrals .admin-milestone-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

#admin-pane-referrals .admin-milestone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
  align-items: end;
  gap: 8px;
}

#admin-pane-referrals .admin-milestone-row .admin-delete {
  height: 42px;
  padding: 0;
  font-size: 15px;
}

#admin-pane-referrals .admin-ref-emoji-preview {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin-top: 10px;
  border: 1px solid rgba(144, 198, 255, 0.14);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
}

#admin-pane-referrals .admin-ref-emoji-preview svg,
#admin-pane-referrals .admin-ref-emoji-preview canvas,
#admin-pane-referrals .admin-ref-emoji-preview video,
#admin-pane-referrals .admin-ref-emoji-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#admin-pane-referrals .admin-ref-emoji-preview .admin-empty {
  padding: 8px;
  border: 0;
  background: none;
  font-size: 11px;
  text-align: center;
}

#admin-pane-leaders .admin-leader-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

#admin-pane-leaders .admin-leader-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(144, 198, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

#admin-pane-leaders .admin-leader-preview {
  margin-top: 0;
}

#admin-pane-leaders .admin-leader-gift-field {
  grid-column: 1 / -1;
}

.admin-leader-gift-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid rgba(144, 198, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  text-align: left;
}

.admin-leader-gift-thumb {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.admin-leader-gift-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-leader-gift-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-leader-gift-copy b {
  font-size: 13px;
  line-height: 1.2;
}

.admin-leader-gift-copy small {
  color: rgba(216, 232, 251, 0.62);
  font-size: 11px;
}

#adminCaseSlots .admin-slot-gift-btn {
  min-width: 0;
  min-height: 42px;
  padding: 4px 8px;
  gap: 8px;
}

#adminCaseSlots .admin-slot-gift-btn .admin-leader-gift-thumb {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}

#adminCaseSlots .admin-slot-gift-btn .admin-leader-gift-copy b {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adminCaseSlots .admin-slot-gift-btn .admin-leader-gift-copy small {
  font-size: 10px;
}

.admin-gift-pick-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px calc(18px + var(--safe-bot, 0px));
  background: rgba(2, 8, 15, 0.72);
}

.admin-gift-pick-overlay[hidden] {
  display: none !important;
}

.admin-gift-pick {
  width: min(100%, 520px);
  max-height: min(78dvh, 640px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px 14px 12px;
  border-radius: 18px 18px 14px 14px;
  border: 1px solid rgba(144, 198, 255, 0.16);
  background: rgba(8, 14, 28, 0.98);
}

.admin-gift-pick__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-gift-pick__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.admin-gift-pick__grid {
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 4px;
}

.admin-gift-pick__item {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 92px;
  padding: 8px 6px;
  border-radius: 12px;
  border: 1px solid rgba(144, 198, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.admin-gift-pick__item.is-selected {
  border-color: rgba(142, 82, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(142, 82, 255, 0.35);
}

.admin-gift-pick__item small {
  display: block;
  margin-top: 2px;
  color: rgba(216, 232, 251, 0.58);
}

.admin-gift-pick__thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.admin-gift-pick__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#page-leaders .leaders-prize-lottie {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Referrals page — violet redesign
   The page owns its palette via --ref-* so the shared gold/blue card themes
   defined earlier in the cascade stay out of the way.
   ========================================================================== */

#page-referrals {
  --ref-violet: #7c4dff;
  --ref-violet-2: #6e43e8;
  --ref-violet-soft: rgba(124, 77, 255, 0.14);
  --ref-violet-line: rgba(140, 104, 255, 0.22);
  --ref-surface: rgba(10, 12, 38, 0.72);
  --ref-surface-2: rgba(255, 255, 255, 0.035);
  --ref-label: rgba(196, 196, 232, 0.55);
  padding-bottom: 96px;
}

/* Tuned to the deep indigo baked into the hero artwork so the point where the
   image fades out doesn't read as a seam across the card. */
#page-referrals .card {
  border: 1px solid rgba(96, 84, 190, 0.22) !important;
  border-radius: 20px !important;
  background: linear-gradient(168deg, rgba(11, 10, 48, 0.97), rgba(5, 5, 30, 0.99)) !important;
  box-shadow: 0 18px 40px rgba(3, 2, 16, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

#page-referrals .ref-kicker {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--ref-violet-line);
  border-radius: 8px;
  background: var(--ref-violet-soft);
  color: #c3b2ff;
  font: 900 9.5px/1 var(--mono);
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

/* ---------- Hero card ---------- */

#page-referrals .ref-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 18px 16px 16px;
}

#page-referrals .ref-hero > *:not(.ref-hero__bg) {
  position: relative;
  z-index: 2;
}

/* Single baked artwork: star, orbit ring, planet limb and starfield in one file.
   It is pinned to the headline area and faded out before the stat tiles. */
#page-referrals .ref-hero__bg {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: 208px;
  width: 100%;
  object-fit: cover;
  object-position: center right;
  -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
  pointer-events: none;
}

/* Darkens the left half so the headline stays readable over the artwork. */
#page-referrals .ref-hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 208px;
  background: linear-gradient(96deg, rgba(6, 8, 30, 0.95) 4%, rgba(7, 9, 32, 0.82) 38%, rgba(8, 10, 34, 0.40) 62%, rgba(8, 10, 34, 0.10) 78%, transparent 90%);
  /* Must fade out on the same curve as the artwork, otherwise the overlay's
     bottom edge draws a hard line right across the card. */
  -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
  pointer-events: none;
}

#page-referrals .ref-hero__title {
  max-width: 232px;
  margin: 12px 0 0;
  color: #f4f2ff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

#page-referrals .ref-hero__title span {
  background: linear-gradient(96deg, #8f6bff, #6f7dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#page-referrals .ref-hero__lead {
  max-width: 236px;
  margin: 10px 0 0;
  color: rgba(206, 206, 240, 0.62);
  font-size: 12.5px;
  line-height: 1.4;
}

#page-referrals .ref-pill {
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: #ffc94a !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: 900 !important;
}

/* ---------- Stat tiles ---------- */

#page-referrals .ref-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 16px 0 0;
}

#page-referrals .ref-stat {
  display: block !important;
  padding: 11px 4px 9px !important;
  border: 1px solid rgba(104, 92, 190, 0.2) !important;
  border-top: 1px solid rgba(104, 92, 190, 0.2) !important;
  border-radius: 13px !important;
  background: rgba(255, 255, 255, 0.032) !important;
  text-align: center;
}

#page-referrals .ref-stat__ico {
  display: grid;
  place-items: center;
  height: 22px;
  margin-bottom: 7px;
  color: #9d7bff;
}

#page-referrals .ref-stat__ico svg {
  width: 21px;
  height: 21px;
}

#page-referrals .ref-stat__ico .tg-star {
  width: 21px;
  height: 21px;
}

#page-referrals .ref-stat b {
  display: block !important;
  margin: 0 !important;
  color: #fff !important;
  font-family: var(--font) !important;
  font-size: 17px !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.03em;
}

#page-referrals .ref-stat__label {
  display: block;
  margin-top: 4px;
  color: var(--ref-label);
  font-size: 8.4px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: none;
  white-space: nowrap;
}

/* ---------- Link + invite ---------- */

#page-referrals .ref-link-label {
  margin: 15px 0 7px;
  color: var(--ref-label);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

#page-referrals .ref-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
}

#page-referrals .ref-link-box {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-width: 0;
  height: 46px;
  margin: 0 !important;
  padding: 0 11px !important;
  border: 1px solid rgba(104, 92, 190, 0.2) !important;
  border-radius: 13px !important;
  background: rgba(0, 0, 0, 0.3) !important;
}

#page-referrals .ref-link-box__ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #9d7bff;
}

#page-referrals .ref-link-box__ico svg {
  width: 19px;
  height: 19px;
}

#page-referrals .ref-link-box__text {
  min-width: 0;
  overflow: hidden;
  color: rgba(226, 226, 248, 0.82) !important;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#page-referrals .ref-copy {
  display: grid;
  place-items: center;
  height: 46px;
  border: 1px solid rgba(150, 116, 255, 0.34);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(124, 77, 255, 0.42), rgba(88, 52, 210, 0.32));
  color: #dcd0ff;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

#page-referrals .ref-copy svg {
  width: 20px;
  height: 20px;
}

#page-referrals .ref-copy:active {
  transform: scale(0.95);
  filter: brightness(1.12);
}

#page-referrals .ref-invite {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 50px;
  margin-top: 10px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(96deg, #8256ff, #6a3ee6);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(88, 46, 220, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.14s ease, filter 0.14s ease;
}

#page-referrals .ref-invite svg {
  width: 20px;
  height: 20px;
}

#page-referrals .ref-invite:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(1.06);
}

/* ---------- Next reward ---------- */

#page-referrals .ref-reward {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
  padding: 15px 14px;
  overflow: visible;
  z-index: 3;
}

#page-referrals .ref-reward__kicker-row {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#page-referrals .ref-reward .leaders-prize-note__btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

#page-referrals .ref-reward .leaders-prize-note__ico {
  width: 16px;
  height: 16px;
  display: block;
  color: rgba(210, 196, 255, 0.88);
  transition: color 0.16s ease;
}

#page-referrals .ref-reward .leaders-prize-note__ico svg {
  width: 16px;
  height: 16px;
  display: block;
}

#page-referrals .ref-reward .leaders-prize-note__btn.is-open .leaders-prize-note__ico,
#page-referrals .ref-reward .leaders-prize-note__btn:active .leaders-prize-note__ico {
  color: rgba(228, 220, 255, 0.96);
}

#page-referrals .ref-reward__title {
  margin-top: 10px;
  color: #fff;
  font-size: 16.5px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

#page-referrals .ref-reward__sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: rgba(200, 200, 236, 0.6);
  font-size: 12px;
}

#page-referrals .ref-reward__sub .tg-star {
  width: 14px;
  height: 14px;
}

#page-referrals .ref-reward__sub b {
  color: #ffc94a;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 950;
}

#page-referrals .ref-reward__progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
}

#page-referrals .ref-reward__track {
  flex: 1;
  min-width: 0;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
}

#page-referrals .ref-reward__track i {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, #6b3fe6, #a37cff);
  box-shadow: 0 0 12px rgba(134, 92, 255, 0.6);
  transition: width 460ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

#page-referrals .ref-reward__count {
  flex: none;
  color: rgba(198, 198, 234, 0.62);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

#page-referrals .ref-reward__emoji {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
}

#page-referrals .ref-reward__emoji svg,
#page-referrals .ref-reward__emoji canvas,
#page-referrals .ref-reward__emoji img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Placeholder while no premium emoji is configured in the admin panel */
#page-referrals .ref-reward__emoji:empty {
  border-radius: 22px;
  background: radial-gradient(circle at 50% 40%, rgba(140, 96, 255, 0.3), transparent 68%);
}

/* ---------- How it works ---------- */

#page-referrals .ref-how {
  margin-top: 11px;
  padding: 15px 14px 8px;
}

#page-referrals .ref-how__title {
  color: var(--ref-label);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

#page-referrals .ref-how__list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

#page-referrals .ref-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 40px;
  align-items: start;
  gap: 12px;
  padding-bottom: 0;
}

#page-referrals .ref-step__track {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 30px;
}

#page-referrals .ref-step__connector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 30px;
  margin: 5px 0 5px;
  color: rgba(183, 156, 255, 0.88);
}

#page-referrals .ref-step__connector svg {
  width: 12px;
  height: 30px;
  display: block;
}

#page-referrals .ref-step__num {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(150, 116, 255, 0.32);
  border-radius: 50%;
  background: rgba(88, 58, 190, 0.32);
  color: #e2d8ff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  padding: 0;
  text-align: center;
}

#page-referrals .ref-step__text b {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

#page-referrals .ref-step__text small {
  display: block;
  margin-top: 3px;
  color: rgba(196, 196, 232, 0.52);
  font-size: 11.5px;
  line-height: 1.34;
}

#page-referrals .ref-percent-inline {
  color: #ffc94a;
  font-weight: 800;
}

#page-referrals .ref-step__ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(120, 96, 210, 0.24);
  border-radius: 12px;
  background: rgba(124, 77, 255, 0.1);
  color: #9d7bff;
}

#page-referrals .ref-step__ico svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 370px) {
  #page-referrals .ref-stats { gap: 5px; }
  #page-referrals .ref-stat b { font-size: 15.5px !important; }
  #page-referrals .ref-stat__label { font-size: 8px; }
  #page-referrals .ref-hero__title { font-size: 20px; max-width: 205px; }
  #page-referrals .ref-reward { grid-template-columns: minmax(0, 1fr) 78px; }
  #page-referrals .ref-reward__emoji { width: 78px; height: 78px; }
}

/* ==========================================================================
   Leaders page — violet redesign
   Like the referrals page, this one owns its palette via --lead-* so the
   shared gold/blue card themes defined earlier in the cascade stay away.
   ========================================================================== */

#page-leaders {
  --lead-violet: #7c4dff;
  --lead-violet-soft: rgba(124, 77, 255, 0.14);
  --lead-violet-line: rgba(140, 104, 255, 0.22);
  --lead-label: rgba(196, 196, 232, 0.55);
  padding-bottom: 96px;
}

#page-leaders .card {
  border: 1px solid rgba(96, 84, 190, 0.22) !important;
  border-radius: 20px !important;
  background: linear-gradient(168deg, rgba(17, 17, 54, 0.96), rgba(6, 8, 28, 0.98)) !important;
  box-shadow: 0 18px 40px rgba(3, 2, 16, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* ---------- Hero ---------- */

/* Headline, cup and prize tiers share one card; the inner panel nests the podium
   like the mockup. Glow lives on the outer shell so it isn't clipped by hero. */
#page-leaders .lead-block {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
}

#page-leaders .lead-block::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: -26px;
  right: -35px;
  width: 230px;
  border-radius: 50%;
  background: radial-gradient(ellipse closest-side, rgba(150, 90, 240, 0.5) 0%, rgba(146, 88, 238, 0.34) 34%, rgba(126, 74, 224, 0.08) 58%, transparent 74%);
  pointer-events: none;
}

#page-leaders .lead-block::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -2px;
  bottom: 96px;
  width: 196px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(168, 112, 255, 0.32), rgba(124, 77, 255, 0.1) 58%, transparent 100%);
  pointer-events: none;
}

#page-leaders .lead-hero {
  position: relative;
  z-index: 2;
  min-height: 172px;
  padding: 18px 16px 10px;
}

#page-leaders .lead-hero > *:not(.lead-hero__trophy) {
  position: relative;
  z-index: 2;
}

/* The 196x207 frame carries ~38px of empty space above the cup and ~28px to its
   right, so these offsets land the cup itself where the mockup has it. Its
   bottom rows fade to zero alpha, so the hero's clip never shows an edge. */
#page-leaders .lead-hero__trophy {
  position: absolute;
  z-index: 1;
  top: -10px;
  right: -12px;
  width: 196px;
  height: 207px;
  object-fit: contain;
  pointer-events: none;
}

#page-leaders .lead-kicker {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--lead-violet-line);
  border-radius: 8px;
  background: var(--lead-violet-soft);
  color: #c3b2ff;
  font: 900 9.5px/1 var(--mono);
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

#page-leaders .lead-hero__title {
  max-width: 178px;
  margin: 11px 0 0;
  color: #f4f2ff;
  font-size: 27px;
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

#page-leaders .lead-hero__title span {
  background: linear-gradient(96deg, #8f6bff, #6f7dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#page-leaders .lead-hero__lead {
  max-width: 202px;
  margin: 10px 0 0;
  color: rgba(206, 206, 240, 0.62);
  font-size: 12.5px;
  line-height: 1.4;
}

/* ---------- Prize tiers ---------- */

#page-leaders .leaders-prize-card {
  position: relative;
  z-index: 2;
  margin: 2px 12px 14px;
  padding: 12px 10px 10px;
  border: 1px solid rgba(88, 102, 158, 0.34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(10, 14, 38, 0.78), rgba(6, 9, 28, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

/* Bottom-aligned so the taller gold tier grows upwards out of the row. */
#page-leaders .leaders-prize-row {
  display: grid;
  grid-template-columns: 1fr 1.13fr 1fr;
  align-items: end;
  gap: 19px;
}

#page-leaders .leaders-prize {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 13px 4px 10px;
  border: 1px solid var(--tone-line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--tone-fill), rgba(255, 255, 255, 0.012));
}

#page-leaders .leaders-prize--silver {
  --tone-line: rgba(168, 190, 234, 0.26);
  --tone-fill: rgba(140, 168, 222, 0.07);
  --tone-ink: #eef4ff;
  --tone-unit: #b9c8ee;
  --coin-hi: #dde6f7;
  --coin-lo: #7f92ba;
  --coin-ink: #2b3448;
}

#page-leaders .leaders-prize--bronze {
  --tone-line: rgba(224, 148, 112, 0.28);
  --tone-fill: rgba(214, 130, 92, 0.075);
  --tone-ink: #ffe2cd;
  --tone-unit: #f0a892;
  --coin-hi: #e5a184;
  --coin-lo: #8d5136;
  --coin-ink: #3d1d10;
}

#page-leaders .leaders-prize--gold {
  --tone-line: rgba(255, 196, 58, 0.7);
  --tone-fill: rgba(255, 172, 34, 0.19);
  --tone-ink: #ffd76b;
  --tone-unit: #f5c563;
  --coin-hi: #ffd44a;
  --coin-lo: #d98708;
  --coin-ink: #4a2c00;
  padding: 19px 4px 8px;
  border-width: 1.5px;
  border-radius: 20px;
  box-shadow: 0 0 28px rgba(255, 178, 40, 0.22), inset 0 0 34px rgba(255, 178, 40, 0.15);
}

/* Medal straddling the card's top edge; the face carries the winner-pool size. */
#page-leaders .leaders-prize-mult {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(158deg, var(--coin-hi), var(--coin-lo));
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.34), inset 0 -2px 4px rgba(0, 0, 0, 0.32), 0 4px 11px rgba(0, 0, 0, 0.45);
  color: var(--coin-ink);
  font: 950 9px/1 var(--mono);
  letter-spacing: -0.03em;
}

#page-leaders .leaders-prize--gold .leaders-prize-mult {
  width: 40px;
  height: 40px;
  font-size: 11px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.38), inset 0 -2px 5px rgba(140, 72, 0, 0.4), 0 5px 14px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 190, 60, 0.38);
}

#page-leaders .leaders-prize-art {
  display: grid;
  place-items: center;
  width: 100%;
  height: 56px;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

#page-leaders .leaders-prize--gold .leaders-prize-art { height: 68px; }

#page-leaders .leaders-prize-art img,
#page-leaders .leaders-prize-art video,
#page-leaders .leaders-prize-art .gift-img,
#page-leaders .leaders-prize-art .leaders-prize-lottie {
  width: auto !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  object-fit: contain;
  object-position: center;
  background: transparent !important;
  mix-blend-mode: normal;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

#page-leaders .leaders-prize-art .tg-star {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.45));
}

#page-leaders .leaders-prize--gold .leaders-prize-art .tg-star { width: 44px; height: 44px; }

/* The shared star art ships gold. CSS filters can't hit the mockup's periwinkle
   and salmon without blowing out the highlights, so those two tiers swap in
   copies of the same art recoloured in HSV. */
#page-leaders .leaders-prize--silver .leaders-prize-art .tg-star {
  background-image: url("/assets/leaders/star-silver.webp?v=1");
}

#page-leaders .leaders-prize--bronze .leaders-prize-art .tg-star {
  background-image: url("/assets/leaders/star-bronze.webp?v=1");
}

/* Laurel branches straddle the highlighted tier's side edges. */
#page-leaders .leaders-prize--gold::before,
#page-leaders .leaders-prize--gold::after {
  content: "";
  position: absolute;
  top: 31px;
  width: 21px;
  height: 49px;
  background: url("/assets/leaders/laurel.svg") center/contain no-repeat;
  opacity: 0.95;
  pointer-events: none;
}

#page-leaders .leaders-prize--gold::before { left: -2px; transform: scaleX(-1); }
#page-leaders .leaders-prize--gold::after { right: -2px; }

#page-leaders .leaders-prize-stars {
  margin-top: 9px;
  color: var(--tone-ink);
  font: 950 16px/1 var(--mono);
  letter-spacing: -0.03em;
}

#page-leaders .leaders-prize--gold .leaders-prize-stars { font-size: 20px; }

#page-leaders .leaders-prize-unit {
  margin-top: 6px;
  color: var(--tone-unit);
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1;
}

#page-leaders .leaders-prize-note {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  padding: 0 6px;
  color: #9ba2bf;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

#page-leaders .leaders-prize-note__btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

#page-leaders .leaders-prize-note__ico {
  width: 16px;
  height: 16px;
  display: block;
  color: rgba(198, 202, 230, 0.52);
  transition: color 0.16s ease;
}

#page-leaders .leaders-prize-note__ico svg {
  width: 16px;
  height: 16px;
  display: block;
}

#page-leaders .leaders-prize-note__btn.is-open .leaders-prize-note__ico,
#page-leaders .leaders-prize-note__btn:active .leaders-prize-note__ico {
  color: rgba(228, 220, 255, 0.92);
}

#page-leaders .leaders-prize-pop,
.leaders-prize-pop {
  position: fixed;
  z-index: 200;
  left: 12px;
  width: min(calc(100% - 24px), 340px);
  padding: 12px 13px;
  border: 1px solid rgba(140, 104, 255, 0.34);
  border-radius: 14px;
  background: #1a1238;
  box-shadow: 0 14px 34px rgba(4, 2, 18, 0.55);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.97);
  transform-origin: bottom center;
  transition:
    opacity 0.26s ease,
    transform 0.26s cubic-bezier(0.2, 0.85, 0.18, 1),
    visibility 0.26s ease;
  pointer-events: none;
}

#page-referrals .ref-reward .leaders-prize-pop,
#page-leaders .leaders-prize-note .leaders-prize-pop {
  position: absolute;
  z-index: 8;
  left: 0;
  right: auto;
  top: auto;
  bottom: calc(100% + 8px);
  width: min(280px, calc(100vw - 48px));
  transform-origin: left bottom;
}

#page-leaders .leaders-prize-pop[hidden],
.leaders-prize-pop[hidden] {
  display: none !important;
}

#page-leaders .leaders-prize-pop.is-open,
.leaders-prize-pop.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#page-leaders .leaders-prize-pop__title,
.leaders-prize-pop__title {
  margin: 0;
  color: #ece8ff;
  font-size: 12px;
  font-weight: 900;
}

#page-leaders .leaders-prize-pop__list,
.leaders-prize-pop__list {
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

#page-leaders .leaders-prize-pop__list li,
.leaders-prize-pop__list li {
  position: relative;
  padding-left: 12px;
  color: rgba(198, 198, 232, 0.78);
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.35;
}

#page-leaders .leaders-prize-pop__list li + li,
.leaders-prize-pop__list li + li { margin-top: 5px; }

#page-leaders .leaders-prize-pop__list li::before,
.leaders-prize-pop__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(168, 132, 255, 0.85);
}

#page-leaders .leaders-prize-pop__list b,
.leaders-prize-pop__list b { color: #f0ebff; font-weight: 900; }

#page-leaders .leaders-prize-pop__foot,
.leaders-prize-pop__foot {
  margin: 9px 0 0;
  color: rgba(168, 168, 210, 0.55);
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.3;
}

.leaders-prize-pop__text {
  margin: 8px 0 0;
  color: rgba(198, 198, 232, 0.84);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.42;
}

/* ---------- Your standing ---------- */

#page-leaders .leaders-me {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  margin: 12px 0;
  padding: 12px 14px;
}

#page-leaders .leaders-me:empty { display: none; }

#page-leaders .leaders-me__who {
  display: flex;
  align-items: center;
  gap: 10px;
}

#page-leaders .leaders-me__ava {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(150, 110, 255, 0.7);
  background: rgba(124, 77, 255, 0.16);
  box-shadow: 0 0 14px rgba(124, 77, 255, 0.34);
  color: #d3c6ff;
  font-size: 16px;
  font-weight: 950;
}

#page-leaders .leaders-me__ava img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

#page-leaders .leaders-me__badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #0a0c26;
  border-radius: 999px;
  background: linear-gradient(180deg, #9d7bff, #6f45e6);
  color: #fff;
  font: 950 10px/1 var(--mono);
}

#page-leaders .leaders-me__label span {
  display: block;
  color: var(--lead-label);
  font-size: 12.5px;
  font-weight: 800;
}

#page-leaders .leaders-me__label b {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

#page-leaders .leaders-me__label--first b {
  margin-top: 0;
  font-size: 16px;
  line-height: 1.15;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

#page-leaders .leaders-me--first {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

#page-leaders .leaders-me__main {
  min-width: 0;
}

#page-leaders .leaders-me--first .leaders-me__track {
  margin-top: 6px;
}

#page-leaders .leaders-me--first .leaders-me__hint {
  margin-top: 2px;
}

#page-leaders .leaders-me__goal { min-width: 0; }

#page-leaders .leaders-me__goal-title {
  color: #e9e7ff;
  font-size: 12.5px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#page-leaders .leaders-me__track {
  height: 8px;
  margin: 7px 0 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
}

#page-leaders .leaders-me__track i {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, #6b3fe6, #a37cff);
  box-shadow: 0 0 12px rgba(134, 92, 255, 0.55);
  transition: width 460ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

#page-leaders .leaders-me__track.is-full i {
  background: linear-gradient(90deg, #8f6bff, #c3a2ff);
}

#page-leaders .leaders-me__hint {
  color: var(--lead-label);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#page-leaders .leaders-me__hint--plain {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

#page-leaders .leaders-me__chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--lead-violet-line);
  border-radius: 12px;
  background: rgba(124, 77, 255, 0.12);
  color: #fff;
  font: 950 13px/1 var(--mono);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

#page-leaders .leaders-me__chip.is-empty {
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Period tabs + list ---------- */

#page-leaders .leader-scope-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

#page-leaders .leader-scope {
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(196, 196, 232, 0.58);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

#page-leaders .leader-scope.active {
  color: #fff;
  background: linear-gradient(96deg, #8256ff, #6a3ee6);
  box-shadow: 0 10px 22px rgba(88, 46, 220, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

#page-leaders .leader-scope:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(1.04);
}

#page-leaders .leader-list { gap: 9px; }

#page-leaders .leader-row {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  padding: 11px 13px;
  border-radius: 18px;
  border-color: rgba(96, 84, 190, 0.2);
  background: rgba(255, 255, 255, 0.045);
}

#page-leaders .leader-ava {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--lead-violet-line);
  background: rgba(124, 77, 255, 0.14);
  color: #d3c6ff;
  font-size: 16px;
  font-weight: 950;
}

#page-leaders .leader-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#page-leaders .leader-name {
  font-size: 15.5px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#page-leaders .leader-sub {
  color: rgba(196, 196, 232, 0.5);
}

#page-leaders .leader-rank {
  width: auto;
  min-height: 0;
  border-radius: 0;
  background: none;
  color: rgba(196, 196, 232, 0.44);
  font-size: 14px;
}

#page-leaders .leader-row--top { border-color: rgba(255, 211, 107, 0.2); }
#page-leaders .leader-row--1 { background: linear-gradient(120deg, rgba(255, 211, 107, 0.12), rgba(255, 255, 255, 0.05) 46%); }
#page-leaders .leader-row--1 .leader-rank { color: #ffd36b; }
#page-leaders .leader-row--1 .leader-ava { border-color: rgba(255, 211, 107, 0.55); box-shadow: 0 0 16px rgba(255, 211, 107, 0.22); }
#page-leaders .leader-row--2 { background: linear-gradient(120deg, rgba(190, 208, 230, 0.1), rgba(255, 255, 255, 0.05) 46%); }
#page-leaders .leader-row--2 .leader-rank { color: #cfe0f2; }
#page-leaders .leader-row--2 .leader-ava { border-color: rgba(190, 208, 230, 0.4); }
#page-leaders .leader-row--3 { background: linear-gradient(120deg, rgba(224, 148, 112, 0.1), rgba(255, 255, 255, 0.05) 46%); }
#page-leaders .leader-row--3 .leader-rank { color: #f2ac8c; }
#page-leaders .leader-row--3 .leader-ava { border-color: rgba(224, 148, 112, 0.4); }

@keyframes leaders-block-in {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes leaders-row-in {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

#page-leaders .lead-block.leaders-enter {
  animation: leaders-block-in 420ms cubic-bezier(0.2, 0.86, 0.2, 1) both;
}

#page-leaders .leaders-me.leaders-enter {
  animation: leaders-block-in 360ms 80ms cubic-bezier(0.2, 0.86, 0.2, 1) both;
}

#page-leaders .leader-scope-tabs.leaders-enter {
  animation: leaders-block-in 360ms 120ms cubic-bezier(0.2, 0.86, 0.2, 1) both;
}

#page-leaders .leader-row.leaders-enter {
  animation: leaders-row-in 320ms cubic-bezier(0.2, 0.86, 0.2, 1) both;
}

#page-leaders .lead-block,
#page-leaders .leaders-me,
#page-leaders .leader-scope-tabs,
#page-leaders .leader-row {
  contain: layout paint;
  transform: translateZ(0);
}

@media (prefers-reduced-motion: reduce) {
  #page-leaders .leaders-enter {
    animation: none !important;
  }
}

/* Base sizes target a 390pt screen; only narrower phones need to shed a few px. */
@media (max-width: 372px) {
  #page-leaders .lead-hero { min-height: 162px; }
  #page-leaders .lead-hero__title { font-size: 24px; max-width: 156px; }
  #page-leaders .lead-hero__lead { max-width: 172px; }
  #page-leaders .lead-hero__trophy { width: 180px; height: 190px; }
  #page-leaders .leaders-prize-card { margin-left: 10px; margin-right: 10px; padding-left: 8px; padding-right: 8px; }
  #page-leaders .leaders-prize-row { gap: 13px; }
  #page-leaders .leaders-prize-art { height: 50px; }
  #page-leaders .leaders-prize--gold .leaders-prize-art { height: 60px; }
  #page-leaders .leaders-prize-art .tg-star { width: 32px; height: 32px; }
  #page-leaders .leaders-prize--gold .leaders-prize-art .tg-star { width: 40px; height: 40px; }
  #page-leaders .leaders-prize-stars { font-size: 15px; }
  #page-leaders .leaders-prize--gold .leaders-prize-stars { font-size: 18px; }
  #page-leaders .leaders-prize-note { font-size: 10.5px; }
  #page-leaders .leaders-me { gap: 9px; padding: 12px 11px; }
  #page-leaders .leaders-me__label b { font-size: 15.5px; }
  #page-referrals .ref-perk b { font-size: 19px; }
}

@media (max-width: 360px) {
  #page-leaders .leaders-me__chip { display: none; }
  #page-leaders .leaders-me { grid-template-columns: auto minmax(0, 1fr); }
}

/* The cup eats most of the width here, so the copy column has to give way. */
@media (max-width: 344px) {
  #page-leaders .lead-hero__title { font-size: 22px; max-width: 134px; }
  #page-leaders .lead-hero__lead { max-width: 148px; font-size: 12px; }
  #page-leaders .lead-hero__trophy { width: 158px; height: 167px; top: -4px; }
  #page-leaders .leaders-prize-row { gap: 10px; }
  #page-leaders .leaders-prize-mult { width: 27px; height: 27px; font-size: 8px; }
  #page-leaders .leaders-prize--gold .leaders-prize-mult { width: 36px; height: 36px; font-size: 10px; }
}

/* ==========================================================================
   v790 — epicgift-sized mode banners: no heading, PVP + Upgrade share a row
   ========================================================================== */

#page-home .home-modes { margin: 12px 0 0; }

#page-home .home-modes .modes-hub__list {
  padding-bottom: 0;
}

/* Wide banners keep title + subtitle + button only, so they fit the shorter box. */
.modes-hub__list .modes-card--featured,
.modes-hub__list .modes-card--grid { aspect-ratio: 3.25 / 1; }

.modes-hub__list .modes-card:not(.modes-card--half) .modes-card__foot { display: none; }

.modes-hub__list .modes-card--featured .modes-card__body,
.modes-hub__list .modes-card--grid .modes-card__body { padding: 15px 5px 14px 18px; }

.modes-hub__list .modes-grid--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modes-hub__list .modes-card--half {
  aspect-ratio: 2.57 / 1;
  min-height: 0;
}

.modes-hub__list .modes-card--half .modes-card__body {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 0 12px 0 15px;
}

.modes-hub__list .modes-card--half .modes-card__name {
  font-size: 18px;
  letter-spacing: -0.04em;
}

.modes-hub__list .modes-card--half .modes-card__cta-chevron {
  margin-top: 0;
  font-size: 18px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.55);
}

/* Compact art: only the identity element survives at this size. */
.modes-hub__list .modes-card--half .modes-card__pvp {
  right: 10px;
  width: 52px;
  height: 52px;
}

.modes-hub__list .modes-card--half .modes-card__pvp-core { font-size: 14px; }
.modes-hub__list .modes-card--half .modes-card__pvp-wheel-ring { inset: 7px; }
.modes-hub__list .modes-card--half .modes-card__pvp-marker {
  top: -5px;
  border-left-width: 4px;
  border-right-width: 4px;
  border-top-width: 6px;
}
.modes-hub__list .modes-card--half .modes-card__pvp-chip {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  transform: rotate(calc(var(--i) * 72deg)) translateY(-30px);
}
.modes-hub__list .modes-card--half .modes-card__pvp-sparks { display: none; }

.modes-hub__list .modes-card--half.modes-card--upgrade .modes-card__img {
  object-position: 86% 50%;
}

.modes-hub__list .modes-card--half .modes-card__upgrade-orbit,
.modes-hub__list .modes-card--half .modes-card__upgrade-pulse { display: none; }

.modes-hub__list .modes-card--half .modes-card__art::after {
  background: linear-gradient(90deg, rgba(4, 7, 22, .82), rgba(4, 7, 22, .5) 48%, rgba(4, 7, 22, .1) 82%);
}

/* ==========================================================================
   v800 — цветотип из макета: глубокий индиго + фиолетовый акцент.
   Steel-blue slabs above are flattened to near-black navy; the primary accent
   moves from #2f98ff to violet, the Rocket keeps blue as its own signature.
   ========================================================================== */

:root {
  --ink-0: #050b22;
  --ink-1: #03091f;
  --ink-2: #0c0824;
  --surface-line: rgba(126, 116, 232, 0.16);
  --violet: #7c4dff;
  --violet-soft: #a78bfa;
  --violet-deep: #4a27b6;
  --rocket-blue: #3e97f0;
  --rocket-blue-deep: #0f52c4;
  --rocket-blue-soft: #6ea8fb;
  --accent: #7c4dff;
  --accent-2: #a78bfa;
  --line: rgba(126, 116, 232, 0.22);
  --line-2: rgba(126, 116, 232, 0.11);
  --line-accent: rgba(139, 108, 255, 0.38);
}

/* Game screens: rocket + PVP + lottery + upgrade — фиолетовый цветотип. */
#page-rocket,
#page-pvp,
#page-lottery,
#page-upgrade {
  --accent: #8e52ff;
  --accent-2: #b48cff;
  --line: rgba(142, 82, 255, 0.22);
  --line-2: rgba(142, 82, 255, 0.10);
  --line-accent: rgba(160, 110, 255, 0.36);
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(112, 76, 232, 0.20), transparent 44%),
    radial-gradient(circle at 88% 26%, rgba(48, 74, 190, 0.10), transparent 40%),
    linear-gradient(180deg, var(--ink-0) 0%, var(--ink-1) 46%, var(--ink-2) 100%) !important;
}

.app-shell {
  background: linear-gradient(180deg, var(--ink-0) 0%, var(--ink-1) 44%, var(--ink-2) 100%) !important;
}

.bg {
  background:
    radial-gradient(circle at 50% -4%, rgba(118, 82, 240, 0.18), transparent 36%),
    radial-gradient(circle at 92% 32%, rgba(52, 80, 200, 0.10), transparent 38%) !important;
}

/* Shared card surfaces */
.card,
.hero-card,
.task-card,
.stat-card,
.rocket-stage,
.live-card,
.pvp-card,
.bet-card,
.ref-card,
.live-gift-card,
.profile-gifts-card,
.profile-head-card,
.admin-card,
.pvp-bet-card,
.pvp-players-card,
.rocket-bet-card,
.bonus-hero-card,
.bonus-section--daily {
  border-color: var(--surface-line) !important;
  background: linear-gradient(180deg, rgba(17, 24, 60, 0.90), rgba(7, 11, 34, 0.94)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 14px 34px rgba(1, 4, 16, 0.42) !important;
}

/* Header strip */
.top-user-panel {
  border: 1px solid rgba(132, 120, 248, 0.20) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(19, 30, 74, 0.94), rgba(9, 16, 44, 0.94)) !important;
  box-shadow: 0 10px 26px rgba(1, 4, 18, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.top-user-panel .avatar {
  border-color: rgba(148, 120, 255, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(96, 66, 200, 0.22) !important;
}

.top-user-panel__stars {
  border-radius: 12px !important;
  border-color: rgba(126, 116, 232, 0.18) !important;
  background: linear-gradient(180deg, rgba(26, 36, 82, 0.9), rgba(14, 21, 54, 0.9)) !important;
}

.plus {
  border-radius: 12px !important;
  background: linear-gradient(180deg, #8b5cff, #5a2fd6) !important;
  box-shadow: 0 6px 16px rgba(96, 52, 220, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.26) !important;
}

/* Primary actions */
.primary-button,
.topup-submit,
.mini-button:not(.muted-button),
.case-spin-button,
.pvp-bet-btn,
.admin-save,
.profile-admin-btn,
.task-action-btn {
  background: linear-gradient(180deg, #8153f2 0%, var(--violet-deep) 100%) !important;
  border: 1px solid rgba(167, 139, 250, 0.32) !important;
  box-shadow: 0 8px 22px rgba(76, 40, 182, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.tasks-progress,
.task-claim-btn,
.ref-pill,
.bonus-section--daily .reward-pill,
.bonus-hero-kicker,
.task-badge,
.bonus-section--daily .bonus-section-count,
.bonus-section--daily .task-icon {
  color: var(--violet-soft) !important;
}

.tasks-progress,
.task-claim-btn,
.ref-pill,
.bonus-section--daily .reward-pill {
  border-color: rgba(139, 108, 255, 0.28) !important;
  background: rgba(110, 74, 230, 0.12) !important;
}

#page-tasks .bonus-section .task-action-btn {
  border: 1px solid rgba(167, 139, 250, 0.28) !important;
  background: linear-gradient(135deg, var(--violet-deep), #8153f2) !important;
  box-shadow: 0 8px 18px rgba(76, 40, 182, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

#page-tasks .bonus-section .task-claim-btn {
  border: 1px solid rgba(139, 108, 255, 0.22) !important;
  background: rgba(110, 74, 230, 0.1) !important;
  color: #c9b8ff !important;
}

/* Bottom nav: dark bar with a glowing violet disc under the active tab */
.bottom-nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)), rgba(11, 18, 47, 0.86) !important;
  border-color: rgba(126, 116, 232, 0.16) !important;
  box-shadow: 0 10px 26px rgba(0, 2, 12, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.bottom-nav::before {
  opacity: 0.28 !important;
}

.nav-pill {
  align-items: center !important;
  justify-content: center !important;
}

.nav-pill-bubble {
  flex: 0 0 auto !important;
  width: 48px !important;
  height: 48px !important;
  margin: 0 auto !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 50% 34%, rgba(140, 96, 255, 0.34), rgba(70, 40, 170, 0.16) 62%, rgba(40, 22, 110, 0.06)) !important;
  border: 1px solid rgba(167, 139, 250, 0.55) !important;
  box-shadow:
    0 0 18px rgba(124, 77, 255, 0.45),
    inset 0 0 14px rgba(150, 110, 255, 0.24) !important;
}

.nav-pill-bubble::after {
  inset: -10px !important;
  background: radial-gradient(circle at center, rgba(124, 77, 255, 0.34) 0%, transparent 68%) !important;
  opacity: 0.9 !important;
}

.nav-item.active .nav-ico {
  filter: drop-shadow(0 2px 8px rgba(150, 110, 255, 0.6)) !important;
}

/* Segmented controls */
.profile-tab.active {
  background: linear-gradient(180deg, #8153f2, var(--violet-deep)) !important;
  border-color: transparent !important;
}

/* --------------------------------------------------------------------------
   Режимы: пропорции и кнопки из макета
   -------------------------------------------------------------------------- */

.modes-hub__list .modes-card--featured,
.modes-hub__list .modes-card--grid { aspect-ratio: 2.98 / 1; }

.modes-hub__list .modes-card {
  border-color: rgba(126, 116, 232, 0.16);
  border-radius: 22px;
  box-shadow: 0 16px 36px rgba(1, 4, 16, 0.46);
}

/* The mockup has no rail light on the card edge. */
.modes-hub__list .modes-card::before { display: none; }

.modes-hub__list .modes-card--featured .modes-card__body,
.modes-hub__list .modes-card--grid .modes-card__body { padding: 17px 5px 16px 20px; }

.modes-hub__list .modes-card__name { font-size: 18.5px; }
.modes-hub__list .modes-card__sub { margin-top: 4px; font-size: 11px; font-weight: 800; }

.modes-hub__list .modes-card__cta {
  min-width: 0;
  gap: 7px;
  padding: 9px 14px;
  font-size: 11.5px;
  font-weight: 800;
}

.modes-hub__list .modes-card__cta-chevron {
  margin-top: 0;
  font-size: 13px;
  font-weight: 600;
}

/* Лотерея */
.modes-hub__list .modes-card--lottery {
  border-color: rgba(148, 118, 255, 0.20);
  background:
    radial-gradient(ellipse at 84% 50%, rgba(124, 77, 255, 0.22), transparent 52%),
    linear-gradient(150deg, rgba(16, 22, 60, 0.97), rgba(6, 10, 32, 0.99));
  box-shadow: 0 16px 36px rgba(3, 4, 24, 0.48);
}

.modes-hub__list .modes-card--lottery .modes-card__sub { color: var(--violet-soft); }

.modes-hub__list .modes-card--lottery .modes-card__cta {
  background: linear-gradient(180deg, #7b4ce6, var(--violet-deep));
  box-shadow: 0 8px 20px rgba(83, 44, 200, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

/* Ракета */
.modes-hub__list .modes-card--rocket {
  border-color: rgba(96, 132, 240, 0.18);
  background:
    radial-gradient(ellipse at 78% 56%, rgba(62, 110, 235, 0.18), transparent 54%),
    linear-gradient(150deg, rgba(11, 20, 58, 0.97), rgba(4, 9, 30, 0.99));
  box-shadow: 0 16px 36px rgba(2, 5, 24, 0.48);
}

.modes-hub__list .modes-card--rocket .modes-card__sub { color: var(--rocket-blue-soft); }

.modes-hub__list .modes-card--rocket .modes-card__cta {
  background: linear-gradient(180deg, var(--rocket-blue), var(--rocket-blue-deep));
  box-shadow: 0 8px 20px rgba(21, 84, 200, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

/* Множитель: плоская стеклянная плашка вместо наклонного золотого шильдика */
.modes-hub__list .modes-card__mult {
  right: 6%;
  top: 50%;
  min-width: 0;
  padding: 8px 12px;
  align-items: baseline;
  border-radius: 14px;
  border: 1px solid rgba(126, 166, 240, 0.34);
  background: linear-gradient(180deg, rgba(30, 48, 104, 0.42), rgba(12, 22, 62, 0.5));
  box-shadow:
    0 10px 24px rgba(1, 6, 28, 0.42),
    inset 0 1px 0 rgba(150, 190, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateY(-52%);
}

.modes-hub__list .modes-card__mult::before,
.modes-hub__list .modes-card__mult::after { content: none; }

.modes-hub__list .modes-card__mult b,
.modes-hub__list .modes-card__mult small {
  font-style: normal;
  padding: 0;
  margin: 0;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--rocket-blue-soft);
  filter: none;
  text-shadow: 0 0 16px rgba(70, 140, 255, 0.45);
}

.modes-hub__list .modes-card__mult b {
  font-size: 18px;
  letter-spacing: -0.01em;
}

.modes-hub__list .modes-card__mult small {
  font-size: 14.5px;
  text-transform: lowercase;
}

@keyframes modes-mult-pop {
  0% { transform: translateY(-52%) scale(1); filter: brightness(1); }
  30% { transform: translateY(-52%) scale(1.12); filter: brightness(1.35); }
  100% { transform: translateY(-52%) scale(1); filter: brightness(1); }
}

@keyframes modes-mult-crash {
  0% { transform: translateY(-52%) scale(1.06); opacity: 1; }
  55% { transform: translateY(-52%) scale(1.3); opacity: .8; filter: brightness(1.5); }
  100% { transform: translateY(-52%) scale(.3); opacity: 0; }
}

/* Artwork sits deeper in the dark so the left text column reads as flat navy. */
.modes-hub__list .modes-card__img {
  filter: brightness(0.8) saturate(0.92);
}

.modes-hub__list .modes-card:not(.modes-card--half) .modes-card__art::after {
  background:
    linear-gradient(90deg, rgba(5, 9, 32, .96) 0 24%, rgba(5, 9, 32, .74) 38%, rgba(5, 9, 32, .24) 56%, transparent 74%),
    linear-gradient(180deg, rgba(4, 8, 28, .3), transparent 34%, rgba(4, 8, 28, .34));
}

.modes-hub__list .modes-card--lottery .modes-card__glow { opacity: 0.34; }
.modes-hub__list .modes-card__arc { opacity: 0.42; }

/* Small gold stars, none of them over the title. */
.modes-hub__list .modes-card__float-star:nth-child(1) { left: 52%; top: 12%; width: 13px; height: 13px; }
.modes-hub__list .modes-card__float-star:nth-child(2) { left: 62%; top: 5%; width: 11px; height: 11px; }
.modes-hub__list .modes-card__float-star:nth-child(3) { left: 46%; top: 62%; width: 14px; height: 14px; }
.modes-hub__list .modes-card__float-star:nth-child(4) { right: 5%; top: 14%; width: 15px; height: 15px; }
.modes-hub__list .modes-card__float-star:nth-child(5) { right: 2%; top: 52%; width: 16px; height: 16px; }
.modes-hub__list .modes-card__float-star:nth-child(6) { right: 13%; bottom: 9%; width: 12px; height: 12px; }
.modes-hub__list .modes-card__float-star:nth-child(7) { left: 55%; bottom: 6%; width: 13px; height: 13px; }
.modes-hub__list .modes-card__float-star:nth-child(8) { left: 71%; bottom: 3%; width: 10px; height: 10px; }
.modes-hub__list .modes-card__float-star:nth-child(9) { left: 48%; top: 32%; width: 10px; height: 10px; }
.modes-hub__list .modes-card__float-star:nth-child(10) { left: 87%; top: 32%; width: 11px; height: 11px; }

/* Frame the calm left half of the rocket plate — clouds and stars, no neon runway. */
.modes-hub__list .modes-card--rocket .modes-card__img {
  filter: brightness(0.6) saturate(0.78);
  transform: scale(1.45);
  transform-origin: 14% 62%;
}

.modes-hub__list .modes-card--rocket .modes-card__pilot { right: 26%; width: 30%; top: 4%; }
.modes-hub__list .modes-card--rocket .modes-card__mult { right: 4%; }
.modes-hub__list .modes-card__star { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   v801 — порядок: Ракета и PVP на всю ширину, ниже пара Лотерея + Апгрейд
   -------------------------------------------------------------------------- */

/* PVP во всю ширину: тёмная база общего цветотипа, золото остаётся акцентом. */
.modes-hub__list .modes-card--pvp {
  border-color: rgba(214, 160, 74, 0.24);
  background:
    radial-gradient(ellipse at 82% 48%, rgba(255, 158, 52, 0.18), transparent 54%),
    linear-gradient(150deg, rgba(34, 26, 46, 0.97), rgba(8, 8, 26, 0.99));
  box-shadow: 0 16px 36px rgba(10, 5, 20, 0.5);
}

.modes-hub__list .modes-card--pvp .modes-card__glow {
  right: -12%;
  width: 62%;
  opacity: 0.34;
}

.modes-hub__list .modes-card--pvp .modes-card__cta {
  background: linear-gradient(180deg, #ffc45c, #e8871a);
  box-shadow: 0 8px 20px rgba(200, 116, 20, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

/* Половинная Лотерея: только билет, без дуги и звёздной россыпи. */
.modes-hub__list .modes-card--half.modes-card--lottery .modes-card__arc,
.modes-hub__list .modes-card--half.modes-card--lottery .modes-card__lottery-stars { display: none; }

/* The ticket sits at 57–86% of the plate. Cover alone lands it under the title,
   so the plate is drawn wider than the card and bleeds off the right edge. */
.modes-hub__list .modes-card--half.modes-card--lottery .modes-card__img {
  width: 118%;
  object-position: 50% 50%;
  filter: brightness(0.88);
}

.modes-hub__list .modes-card--half .modes-card__name { font-size: 17px; }

.modes-hub__list .modes-card--half .modes-card__art::after {
  background: linear-gradient(90deg, rgba(4, 7, 22, .92) 0 28%, rgba(4, 7, 22, .46) 48%, transparent 76%);
}

.modes-hub__list .modes-card--half.modes-card--lottery .modes-card__cta-chevron {
  color: rgba(214, 198, 255, 0.72);
}

.modes-hub__list .modes-card--half.modes-card--upgrade .modes-card__cta-chevron {
  color: rgba(214, 190, 255, 0.72);
}

@media (max-width: 390px) {
  .modes-hub__list .modes-card__name { font-size: 17.5px; }
  .modes-hub__list .modes-card__sub { font-size: 10.5px; }
  .modes-hub__list .modes-card__cta { padding: 8px 13px; font-size: 11px; }
  .modes-hub__list .modes-card__mult { padding: 7px 11px; }
  .modes-hub__list .modes-card__mult b { font-size: 17px; }
  .modes-hub__list .modes-card__mult small { font-size: 13.5px; }
}

/* ==========================================================================
   v803 — кольцо у аватара и переключатель языка на нём
   ========================================================================== */

.avatar-slot {
  position: relative;
  display: flex;
  flex: 0 0 auto;
}

/* The name already clips itself, so the row can let the badge hang off the avatar. */
.top-user-panel .top-user-panel__user { overflow: visible; }

.top-user-panel .avatar {
  border-width: 2px !important;
  border-color: #8a80e0 !important;
  box-shadow:
    0 0 0 1px rgba(8, 12, 34, 0.9),
    0 0 14px rgba(124, 77, 255, 0.3) !important;
}

.lang-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 3;
  width: 20px;
  height: 20px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.72);
  background: #171f4d;
  color: #c3aeff;
  box-shadow: 0 0 10px rgba(124, 77, 255, 0.35);
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

/* The dot itself is tiny, so the touch target is grown invisibly around it. */
.lang-badge::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}

/* Hand-drawn strokes turn to mush at this size, so the mark uses real glyphs. */
.lang-badge__glyph {
  display: flex;
  align-items: center;
  gap: 0.5px;
  line-height: 1;
}

.lang-badge__glyph b {
  font-size: 10px;
  font-weight: 800;
}

.lang-badge__glyph i {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 600;
  font-family: "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.lang-badge:active { transform: scale(0.9); }

.lang-badge.is-open {
  background: linear-gradient(180deg, #8b5cff, #5a2fd6);
  border-color: rgba(190, 165, 255, 0.7);
  color: #fff;
}

.lang-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(3, 6, 22, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.lang-modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.lang-modal {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 50%;
  z-index: 10041;
  max-width: 330px;
  margin: 0 auto;
  padding: 22px 18px 16px;
  text-align: center;
  border-radius: 24px;
  border: 1px solid rgba(139, 108, 255, 0.3);
  background:
    radial-gradient(120% 84% at 50% -14%, rgba(124, 77, 255, 0.28), transparent 62%),
    linear-gradient(180deg, #1a2358, #0b1030);
  box-shadow:
    0 30px 70px rgba(1, 3, 14, 0.66),
    0 0 44px rgba(96, 60, 220, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-46%) scale(0.9);
  transition:
    opacity 0.2s ease,
    transform 0.34s cubic-bezier(0.2, 0.9, 0.26, 1.1);
}

.lang-modal.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.lang-modal__mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.5);
  background: linear-gradient(180deg, rgba(139, 92, 255, 0.34), rgba(74, 39, 182, 0.24));
  box-shadow: 0 0 26px rgba(124, 77, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #dbcdff;
}

.lang-modal__mark b { font-size: 25px; font-weight: 800; }

.lang-modal__mark i {
  font-style: normal;
  font-size: 24px;
  font-weight: 600;
  font-family: "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.lang-modal h2 {
  margin: 0 0 5px;
  font-size: 23px;
  letter-spacing: -0.04em;
}

.lang-modal p {
  margin: 0 0 16px;
  color: rgba(198, 208, 245, 0.66);
  font-size: 13.5px;
}

.lang-modal__list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.lang-option {
  height: 56px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  border-radius: 15px;
  border: 1px solid rgba(139, 108, 255, 0.2);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 232, 255, 0.86);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}

.lang-option:active { transform: scale(0.98); }

.lang-option__code {
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(139, 108, 255, 0.24);
  background: rgba(110, 74, 230, 0.16);
  color: #b9a4ff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.lang-option__name {
  font-size: 15.5px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

/* Checkmark drawn from two borders so the row needs no icon asset. */
.lang-option__tick {
  justify-self: center;
  width: 8px;
  height: 14px;
  border: solid transparent;
  border-width: 0 2.4px 2.4px 0;
  transform: rotate(42deg) translateY(-2px);
  transition: border-color 0.16s ease;
}

.lang-option.is-active {
  border-color: rgba(167, 139, 250, 0.62);
  background: linear-gradient(180deg, rgba(129, 83, 242, 0.3), rgba(74, 39, 182, 0.2));
  color: #fff;
}

.lang-option.is-active .lang-option__code {
  border-color: rgba(190, 165, 255, 0.5);
  background: rgba(139, 92, 255, 0.34);
  color: #efe8ff;
}

.lang-option.is-active .lang-option__tick { border-color: #c4b1ff; }

.lang-modal__close {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: rgba(198, 208, 245, 0.6);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lang-modal__close:active { background: rgba(255, 255, 255, 0.05); }

@media (prefers-reduced-motion: reduce) {
  .lang-modal { transition: opacity 0.01s linear; }
}

/* ==========================================================================
   v806 — карточка PVP по макету: арт с эмблемой VS, крупный заголовок,
   описание под ним и золотая кнопка.
   ========================================================================== */

/* Макет выше остальных карточек: под заголовком помещается описание. */
.modes-hub__list .modes-card--pvp { aspect-ratio: 2.2 / 1; }

.modes-hub__list .modes-card--pvp,
.modes-hub__list .modes-card--pvp.modes-card--grid,
.modes-hub__list .modes-card--pvp.modes-card--featured {
  border-color: transparent;
  background:
    radial-gradient(ellipse at 78% 52%, rgba(255, 150, 44, 0.10), transparent 56%),
    radial-gradient(ellipse at 62% 46%, rgba(112, 74, 240, 0.10), transparent 54%),
    linear-gradient(180deg, #0a0f2c 0%, #05081e 100%);
  box-shadow: 0 16px 36px rgba(4, 3, 18, 0.52);
}

/* Рамка макета — градиент от фиолетового к золоту. */
.modes-hub__list .modes-card--pvp::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  /* The shared rule draws a 3px rail; this one is a full ring instead. */
  width: auto;
  height: auto;
  z-index: 5;
  border-radius: inherit;
  box-shadow: none;
  padding: 1px;
  background: linear-gradient(118deg, #5b46d8 0%, #3b2f7e 34%, #6b4a2a 66%, #f0a13a 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

.modes-hub__list .modes-card--pvp .modes-card__glow { display: none; }

/* Эмблема прижата к правому краю, левая половина остаётся под текст. */
.modes-hub__list .modes-card--pvp .modes-card__art {
  left: auto;
  right: 0;
  width: 52%;
}

.modes-hub__list .modes-card--pvp .modes-card__art::after { content: none; }

.modes-hub__list .modes-card--pvp .modes-card__img {
  object-fit: contain;
  object-position: 98% 60%;
  filter: none;
  transform: scale(1.02);
}

.modes-hub__list .modes-card--pvp .modes-card__body {
  padding: 14px 4px 13px 18px;
  justify-content: center;
  gap: 0;
}

/* Крупный наклонный логотип из макета. */
.modes-hub__list .modes-card--pvp .modes-card__name {
  font-size: 30px;
  font-style: italic;
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(168deg, #ffffff 22%, #b9c6ee 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 10px rgba(6, 10, 40, 0.7));
}

.modes-hub__list .modes-card--pvp .modes-card__sub {
  margin-top: 5px;
  color: #ffc158;
  font-size: 11.5px;
  font-weight: 900;
}

.modes-hub__list .modes-card--pvp:not(.modes-card--half) .modes-card__foot {
  display: block;
  max-width: 164px;
  margin-top: 6px;
  color: rgba(197, 208, 240, 0.78);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.32;
}

.modes-hub__list .modes-card--pvp:not(.modes-card--half) .modes-card__foot::after {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-left: 4px;
  vertical-align: -0.14em;
  background: url('/assets/modes/tg-star.webp?v=1') center/contain no-repeat;
}

.modes-hub__list .modes-card--pvp .modes-card__cta {
  margin-top: 11px;
  gap: 9px;
  padding: 10px 17px;
  border-radius: 999px;
  color: #3a1f02;
  font-size: 12.5px;
  background: linear-gradient(180deg, #ffcb63 0%, #f8a723 54%, #f0980f 100%);
  box-shadow:
    0 8px 22px rgba(214, 130, 14, 0.42),
    0 0 20px rgba(255, 176, 48, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.modes-hub__list .modes-card--pvp .modes-card__cta-chevron {
  color: #3a1f02;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 390px) {
  .modes-hub__list .modes-card--pvp .modes-card__name { font-size: 27px; }
  .modes-hub__list .modes-card--pvp .modes-card__sub { font-size: 11px; }
  .modes-hub__list .modes-card--pvp:not(.modes-card--half) .modes-card__foot { max-width: 132px; font-size: 9.5px; }
  .modes-hub__list .modes-card--pvp .modes-card__cta { padding: 9px 15px; font-size: 12px; }
}

/* ==========================================================================
   v807 — SVG-стрелка в кнопках режимов и читаемый заголовок PVP
   ========================================================================== */

.modes-hub__list .modes-card__cta-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.modes-hub__list .modes-card__cta-chevron svg {
  width: 15px;
  height: 15px;
  display: block;
}

/* У Geist нет курсива и веса 950, поэтому браузер синтезировал наклон и жирность —
   такие глифы выходят за коробку фона, и background-clip срезал им верхушки.
   Рисуем прямым весом 900 и наклоняем уже готовый результат через skewX. */
.modes-hub__list .modes-card--pvp .modes-card__name {
  display: inline-block;
  font-style: normal;
  font-weight: 900;
  padding: 0.3em 0.34em 0.24em 0.12em;
  margin: -0.3em -0.34em -0.24em -0.12em;
  line-height: 1.08;
  transform: skewX(-11deg);
  transform-origin: 0 100%;
  background: linear-gradient(172deg, #ffffff 0%, #ffffff 58%, #f5f8ff 80%, #e4ebff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  /* Заливка прозрачная, поэтому базовая text-shadow легла бы тёмным пятном
     прямо на градиент внутри букв — объём даёт drop-shadow ниже. */
  text-shadow: none;
  filter: drop-shadow(0 0 9px rgba(158, 186, 255, 0.5)) drop-shadow(0 2px 7px rgba(4, 8, 32, 0.72));
}

.modes-hub__list .modes-card--pvp .modes-card__sub { color: #ffc862; }

.modes-hub__list .modes-card--pvp:not(.modes-card--half) .modes-card__foot {
  color: rgba(219, 228, 255, 0.92);
}

.modes-hub__list .modes-card--pvp .modes-card__cta-chevron svg {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}

/* ==========================================================================
   Profile page — violet hero card + gifts
   ========================================================================== */

#page-profile {
  --profile-violet: #7c4dff;
  --profile-violet-soft: rgba(124, 77, 255, 0.14);
  --profile-violet-line: rgba(140, 104, 255, 0.22);
  padding-bottom: 96px;
}

#page-profile .profile-pane { display: none; }
#page-profile .profile-pane.active { display: block; }

#page-profile .profile-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 0;
  border-radius: 20px !important;
  border: 1px solid rgba(126, 116, 232, 0.18) !important;
  background: #07091f !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 34px rgba(1, 4, 16, 0.38) !important;
}

#page-profile .profile-hero__bg {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}

#page-profile .profile-hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 8, 30, 0.72) 0%, rgba(7, 9, 32, 0.34) 30%, rgba(8, 10, 34, 0.10) 48%, transparent 64%);
  pointer-events: none;
}

#page-profile .profile-hero__body,
#page-profile .profile-history-btn,
#page-profile .profile-logout {
  position: relative;
  z-index: 2;
}

#page-profile .profile-hero__body {
  padding: 12px 12px 8px;
}

#page-profile .profile-display-name {
  margin-top: 0;
  max-width: 62%;
  min-width: 0;
  color: #f4f2ff;
  font-size: 26px;
  font-weight: 950;
  line-height: 1.06;
  letter-spacing: -0.045em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#page-profile .profile-stats {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  max-width: 62%;
}

#page-profile .profile-stat {
  display: flex;
  align-items: center;
  gap: 8px;
}

#page-profile .profile-stat--rank {
  align-items: flex-start;
}

#page-profile .profile-stat--rank .profile-stat__ico {
  margin-top: 1px;
}

#page-profile .profile-stat__stack {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#page-profile .profile-stat--days {
  margin-top: 6px;
}

#page-profile .profile-stat--days .profile-stat__text b,
#page-profile .profile-stat--days .profile-stat__text span {
  color: #fff;
  font-family: var(--mono);
  font-weight: 900;
}

#page-profile .profile-stat__ico {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: #b79cff;
}

#page-profile .profile-stat__ico svg {
  width: 18px;
  height: 18px;
  display: block;
}

#page-profile .profile-stat__ico--star .tg-star {
  width: 18px;
  height: 18px;
}

#page-profile .profile-stat__text {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(226, 222, 255, 0.88);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.28;
}

#page-profile .profile-stat__text b {
  color: #fff;
  font-family: var(--mono);
  font-weight: 900;
}

#page-profile .profile-stat__ico--star + .profile-stat__text b {
  color: #ffdf85;
  text-shadow: 0 0 10px rgba(255, 215, 120, 0.28);
}

#page-profile .profile-stat__sub {
  color: rgba(196, 196, 232, 0.52);
  font-size: 11px;
  line-height: 1.34;
}

#page-profile .profile-history-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% - 24px);
  margin: 6px 12px 12px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(126, 116, 232, 0.20);
  background: rgba(8, 10, 30, 0.58);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #f5f2ff;
  font-size: 14px;
  font-weight: 750;
  text-align: left;
}

#page-profile .profile-history-btn__lead {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#page-profile .profile-history-btn__ico {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.92);
}

#page-profile .profile-history-btn__ico svg {
  width: 20px;
  height: 20px;
  display: block;
}

#page-profile .profile-history-btn__label {
  color: #f7f4ff;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
}

#page-profile .profile-history-btn__chev {
  flex: 0 0 auto;
  color: rgba(138, 130, 168, 0.62);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

#page-profile .profile-logout {
  width: calc(100% - 32px);
  margin: 0 16px 14px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(144, 198, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-weight: 950;
  font-size: 13px;
}

#page-profile .profile-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 8px 12px 8px 10px;
  border: 1px solid rgba(126, 116, 232, 0.22);
  border-radius: 12px;
  background: rgba(124, 77, 255, 0.10);
  color: #d8c8ff;
  font-size: 13px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#page-profile .profile-back-btn span {
  font-size: 20px;
  line-height: 1;
  color: #c9b8ff;
}

#page-profile .history-list {
  display: grid;
  gap: 8px;
}

#page-profile .history-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid rgba(126, 116, 232, 0.18);
  border-radius: 16px;
  background: #07091f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(1, 4, 16, 0.28);
}

#page-profile .history-num {
  min-width: 58px;
  width: max-content;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 11px;
  border: 1px solid rgba(126, 116, 232, 0.16);
  background: rgba(88, 58, 190, 0.14);
  display: grid;
  place-items: center;
  color: #c9b8ff;
  font-family: var(--mono);
  font-weight: 900;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

#page-profile .history-num small {
  display: block;
  margin-top: 2px;
  color: rgba(196, 196, 232, 0.48);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.1;
}

#page-profile .history-title {
  color: #f4f2ff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

#page-profile .history-sub {
  color: rgba(196, 196, 232, 0.54);
  font-size: 11.5px;
  line-height: 1.35;
  margin-top: 2px;
}

#page-profile .history-amount {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ffdf85;
  font-family: var(--mono);
  font-weight: 900;
  font-size: 13px;
  text-shadow: 0 0 10px rgba(255, 215, 120, 0.18);
}

#page-profile .history-loading {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(126, 116, 232, 0.22);
  border-radius: 14px;
  background: rgba(88, 58, 190, 0.06);
  color: rgba(196, 196, 232, 0.58);
  font-size: 13px;
}

#page-profile .profile-gifts-card {
  margin-bottom: 12px;
  padding: 14px 14px 12px;
  border-radius: 20px !important;
  border: 1px solid rgba(126, 116, 232, 0.18) !important;
  background: #07091f !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 34px rgba(1, 4, 16, 0.38) !important;
}

#page-profile .profile-promo-card { display: none !important; }

#adminPromoMinDepositWrap[hidden] { display: none !important; }

#page-profile .profile-gifts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

#page-profile .profile-gifts-head h3 {
  margin: 0;
  color: #c9b8ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

#page-profile .profile-gifts-head span {
  color: #c9b8ff;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 900;
}

#page-profile .profile-empty-gifts {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 128px;
  padding: 20px 14px 18px;
  border: 1px dashed rgba(126, 116, 232, 0.28);
  border-radius: 16px;
  background: rgba(88, 58, 190, 0.06);
  color: rgba(196, 196, 232, 0.58);
  font-size: 12.5px;
  line-height: 1.35;
  text-align: center;
}

#page-profile .profile-empty-gifts__ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(126, 116, 232, 0.20);
  background: rgba(124, 77, 255, 0.12);
  color: rgba(201, 184, 255, 0.55);
}

#page-profile .profile-empty-gifts__ico svg {
  width: 22px;
  height: 22px;
}

#page-profile .profile-gift-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#page-profile .profile-gifts-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 8px;
}

#page-profile .profile-gifts-pager.is-hidden {
  display: none !important;
}

#page-profile .profile-gifts-page-btn {
  width: 36px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(126, 116, 232, 0.28);
  background: rgba(18, 8, 36, 0.75);
  color: #efe7ff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

#page-profile .profile-gifts-page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

#page-profile .profile-gifts-pager span {
  min-width: 64px;
  text-align: center;
  color: #c9b8ff;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

#page-profile .profile-gift-card {
  min-width: 0;
  padding: 8px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(126, 116, 232, 0.18) !important;
  background: rgba(124, 77, 255, 0.08) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #f4f2ff;
  text-align: left;
}

#page-profile .profile-gift-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 11px !important;
  border: 1px solid rgba(126, 116, 232, 0.16) !important;
  background: rgba(88, 58, 190, 0.14) !important;
  display: grid;
  place-items: center;
  color: rgba(201, 184, 255, 0.45);
  font-family: var(--mono);
  font-weight: 950;
  font-size: 12px;
  overflow: hidden;
}

#page-profile .profile-gift-thumb.has-img {
  padding: 0 !important;
  color: transparent;
  background: radial-gradient(circle at 50% 28%, rgba(201, 184, 255, 0.14), rgba(88, 58, 190, 0.10)) !important;
}

#page-profile .profile-gift-thumb.has-img img,
#page-profile .profile-gift-thumb.has-img svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: inherit;
  padding: 4px;
  box-sizing: border-box;
}

#page-profile .profile-gift-name {
  margin-top: 7px;
  color: #ece8ff;
  font-size: 11.5px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#page-profile .profile-gift-price {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ffdf85;
  font-family: var(--mono);
  font-weight: 900;
  font-size: 11.5px;
  text-shadow: 0 0 8px rgba(255, 215, 120, 0.16);
}

#page-profile .withdraw-card {
  margin-top: 0;
}

@media (max-width: 390px) {
  #page-profile .profile-display-name { font-size: 22px; }
  #page-profile .profile-stats { max-width: 64%; }
}

@media (max-width: 360px) {
  #page-profile .profile-display-name { font-size: 20px; }
  #page-profile .profile-stat__text { font-size: 12.5px; }
  #page-profile .profile-stats { max-width: 66%; }
}

/* ==========================================================================
   v821 — режимы в стиле epicgift.app
   ========================================================================== */

.modes-hub__list .modes-card--epic {
  display: block;
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 20px;
  overflow: visible;
  cursor: pointer;
  text-align: left;
  color: #fff;
  background: transparent;
  box-shadow: none;
  aspect-ratio: auto;
  min-height: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.modes-hub__list .modes-card--epic::before,
.modes-hub__list .modes-card--epic::after,
.modes-hub__list .modes-card--epic .modes-card__glow,
.modes-hub__list .modes-card--epic .modes-card__body,
.modes-hub__list .modes-card--epic .modes-card__art {
  display: none !important;
}

.modes-hub__list .modes-card--epic:active:not(.modes-card--soon) {
  transform: scale(0.985);
  filter: brightness(1.03);
}

/* --- Ракета --- */
.modes-hub__list .modes-card--epic.modes-card--rocket {
  height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: url('/assets/modes/epicgift/bg-rocket.png?v=2') center/cover no-repeat;
  background-clip: padding-box;
  box-shadow: 0 10px 28px rgba(40, 12, 80, 0.35);
  isolation: isolate;
}

.modes-hub__list .modes-card--epic.modes-card--rocket::before {
  display: block !important;
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  width: auto;
  height: auto;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(8, 2, 24, 0.18) 0%, transparent 46%);
  pointer-events: none;
  box-shadow: none;
}

.modes-hub__list .modes-epic__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.modes-hub__list .modes-epic__badge svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.modes-hub__list .modes-epic__badge--hot {
  color: #4a90e2;
}

.modes-hub__list .modes-epic__badge--new {
  color: #ffb257;
}

.modes-hub__list .modes-epic__badge--soon {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.14);
}

.modes-hub__list .modes-epic__title {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modes-hub__list .modes-epic__title-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.modes-hub__list .modes-epic__title-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.modes-hub__list .modes-epic__title-text {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(8, 30, 80, 0.35);
}

.modes-hub__list .modes-epic__rocket-wrap {
  position: absolute;
  top: -4px;
  right: 32px;
  z-index: 20;
  width: 112px;
  height: 112px;
  transform: rotate(-8deg);
  pointer-events: none;
}

.modes-hub__list .modes-epic__rocket {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(74, 144, 226, 0.4));
}

.modes-hub__list .modes-epic__pills {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
  transform: translateX(10%);
}

.modes-hub__list .modes-epic__pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(0, 255, 47, 0.3);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  transform: rotate(10deg);
  animation: modes-epic-pill-float 3.6s ease-in-out infinite;
}

/* Позиции как на epicgift.app (clamp от ширины карточки) */
.modes-hub__list .modes-epic__pill--pos-1 {
  left: clamp(140px, 42%, 200px);
  top: clamp(10px, 20%, 8px);
}

.modes-hub__list .modes-epic__pill--pos-2 {
  left: clamp(270px, 78%, 320px);
  top: clamp(45px, 50%, 65px);
}

.modes-hub__list .modes-epic__pill--pos-3 {
  left: clamp(170px, 45%, 220px);
  top: clamp(55px, 58%, 70px);
}

.modes-hub__list .modes-epic__pill--pos-4 {
  left: clamp(230px, 73%, 290px);
  top: clamp(75px, 80%, 95px);
}

.modes-hub__list .modes-epic__pill--lg {
  min-width: clamp(56px, 16vw, 64px);
  width: auto;
  max-width: 72px;
  height: clamp(18px, 5vw, 22px);
  padding: 0 8px;
  font-size: clamp(12px, 3.5vw, 16px);
  background: rgba(0, 255, 47, 0.5);
  backdrop-filter: blur(17px);
  -webkit-backdrop-filter: blur(17px);
}

.modes-hub__list .modes-epic__pill--md {
  min-width: clamp(32px, 10vw, 37px);
  width: auto;
  max-width: 48px;
  height: clamp(12px, 3.5vw, 14px);
  padding: 0 6px;
  font-size: clamp(10px, 2.8vw, 14px);
}

.modes-hub__list .modes-epic__pill--sm {
  min-width: clamp(34px, 10.5vw, 39px);
  width: auto;
  max-width: 50px;
  height: clamp(12px, 3.5vw, 14px);
  padding: 0 6px;
  font-size: clamp(10px, 2.8vw, 14px);
}

.modes-hub__list .modes-epic__pill--xs {
  min-width: clamp(20px, 6.5vw, 24px);
  width: auto;
  max-width: 36px;
  height: clamp(8px, 2.5vw, 9px);
  padding: 0 4px;
  font-size: clamp(8px, 2.2vw, 12px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modes-hub__list .modes-epic__pill--pos-2 { animation-delay: 0.8s; }
.modes-hub__list .modes-epic__pill--pos-3 { animation-delay: 1.6s; }
.modes-hub__list .modes-epic__pill--pos-4 { animation-delay: 2.4s; }

.modes-hub__list .modes-epic__pill-x {
  font-size: 0.78em;
  opacity: 0.92;
}

.modes-hub__list .modes-epic__pill b {
  font-weight: 900;
  font-style: normal;
}

.modes-hub__list .modes-epic__sparkles {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 12%, rgba(255,255,255,.55) 0 1px, transparent 2px),
    radial-gradient(circle at 32% -2%, rgba(255,255,255,.45) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 78% 5%, rgba(255,255,255,.4) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 15% 32%, rgba(255,255,255,.5) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 58% 28%, rgba(255,255,255,.35) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 88% 38%, rgba(255,255,255,.4) 0 1px, transparent 2px);
}

@keyframes modes-epic-pill-float {
  0%, 100% { transform: rotate(10deg) translateY(0); }
  50% { transform: rotate(10deg) translateY(-4px); }
}

/* --- PVP --- */
.modes-hub__list .modes-card--epic.modes-card--pvp {
  height: 110px;
  border: 1px solid rgba(255, 228, 198, 0.45);
  background: url('/assets/modes/epicgift/bg-pvp.png?v=2') center/cover no-repeat;
  background-clip: padding-box;
  box-shadow: 0 10px 28px rgba(180, 110, 0, 0.28);
  isolation: isolate;
}

.modes-hub__list .modes-card--epic.modes-card--pvp::before {
  display: block !important;
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  width: auto;
  height: auto;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(48, 18, 0, 0.12) 0%, transparent 42%);
  pointer-events: none;
  box-shadow: none;
}

.modes-hub__list .modes-epic__pvp-strip {
  position: absolute;
  top: 50%;
  right: 0;
  left: 29%;
  z-index: 10;
  height: clamp(82px, 28.13vw, 110px);
  overflow: hidden;
  transform: translateY(-50%);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 15%, rgba(0,0,0,0.3) 30%, rgba(0,0,0,0.6) 45%, rgba(0,0,0,0.85) 55%, rgba(0,0,0,1) 65%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 15%, rgba(0,0,0,0.3) 30%, rgba(0,0,0,0.6) 45%, rgba(0,0,0,0.85) 55%, rgba(0,0,0,1) 65%);
}

.modes-hub__list .modes-epic__pvp-track {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: absolute;
  left: 0;
  top: 50%;
  animation: modes-epic-pvp-slide 15s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.modes-hub__list .modes-epic__pvp-card {
  flex: 0 0 56px;
  width: 56px;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 4px solid var(--pvp-accent, #06b6d4);
  background: rgba(34, 35, 37, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
  animation: modes-epic-pvp-wave 4s ease-in-out infinite;
  animation-delay: var(--pvp-delay, 0s);
}

.modes-hub__list .modes-epic__pvp-avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.6px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.modes-hub__list .modes-epic__pvp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modes-hub__list .modes-epic__pvp-name {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.modes-hub__list .modes-epic__pvp-pct {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.2;
}

.modes-hub__list .modes-epic__pvp-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(29% + (100% - 29%) * 0.66);
  z-index: 30;
  width: 14px;
  height: auto;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, #fff 18%, #fff 82%, transparent);
  opacity: 0.9;
  clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35));
}

@keyframes modes-epic-pvp-slide {
  0% { transform: translate3d(calc(-100% / 3), -50%, 0); }
  100% { transform: translate3d(0, -50%, 0); }
}

@keyframes modes-epic-pvp-wave {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-4px) rotate(2deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(4px) rotate(-2deg); }
}

/* --- Нижняя пара (лотерея / апгрейд) --- */
.modes-hub__list .modes-grid--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modes-hub__list .modes-card--epic.modes-card--half {
  height: 66px;
  border-radius: 16px;
  overflow: visible;
  isolation: isolate;
}

.modes-hub__list .modes-card--epic.modes-card--half.modes-card--lottery {
  background: url('/assets/modes/epicgift/bg-lottery.png?v=2') center/cover no-repeat;
  box-shadow: 0 8px 22px rgba(61, 42, 141, 0.42);
}

.modes-hub__list .modes-card--epic.modes-card--half.modes-card--upgrade {
  background: url('/assets/modes/epicgift/bg-upgrade.png?v=2') center/cover no-repeat;
  box-shadow: 0 8px 22px rgba(20, 140, 74, 0.35);
}

.modes-hub__list .modes-card--epic.modes-card--half::before {
  display: block !important;
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  width: auto;
  height: auto;
  border-radius: inherit;
  opacity: 0.22;
  pointer-events: none;
  box-shadow: none;
}

.modes-hub__list .modes-card--epic.modes-card--half.modes-card--lottery::before {
  background: linear-gradient(90deg, rgba(8, 2, 24, 0.14) 0%, transparent 55%);
}

.modes-hub__list .modes-card--epic.modes-card--half.modes-card--upgrade::before {
  background: linear-gradient(90deg, rgba(0, 24, 10, 0.12) 0%, transparent 55%);
}

.modes-hub__list .modes-epic__half-icon {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.modes-hub__list .modes-epic__half-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.modes-hub__list .modes-epic__half-title {
  position: absolute;
  left: 9px;
  bottom: 6px;
  z-index: 2;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.22);
}

.modes-hub__list .modes-epic__half-chevron {
  position: absolute;
  right: 16px;
  bottom: 13px;
  z-index: 2;
  width: 9px;
  height: 13px;
  color: rgba(255, 255, 255, 0.82);
  opacity: 0.8;
}

.modes-hub__list .modes-epic__half-chevron svg {
  width: 9px;
  height: 13px;
  display: block;
}

@media (max-width: 390px) {
  .modes-hub__list .modes-epic__title-text { font-size: 22px; }
  .modes-hub__list .modes-epic__rocket-wrap { right: 24px; width: 100px; height: 100px; }
  .modes-hub__list .modes-epic__pvp-strip { left: 26%; }
}

@media (prefers-reduced-motion: reduce) {
  .modes-hub__list .modes-epic__pill,
  .modes-hub__list .modes-epic__pvp-track,
  .modes-hub__list .modes-epic__pvp-card {
    animation: none !important;
  }
}

/* ==========================================================================
   v822 — цветотип ракетки и PVP по макетам (фиолетовая космическая тема)
   ========================================================================== */

#page-rocket {
  --rocket-violet: #8e52ff;
  --rocket-violet-bright: #b48cff;
  --rocket-violet-deep: #6b3fd4;
  --rocket-panel: #12081f;
  --rocket-blue: var(--rocket-violet);
  --rocket-blue-bright: var(--rocket-violet-bright);
  --rocket-blue-soft: #c9a8ff;
  --rocket-blue-deep: var(--rocket-violet-deep);
}

#page-rocket .x-chip {
  border-color: rgba(142, 82, 255, 0.28) !important;
  background: rgba(18, 8, 36, 0.72) !important;
  color: rgba(230, 220, 255, 0.88) !important;
}

#page-rocket .x-chip.hot {
  border-color: rgba(180, 120, 255, 0.55) !important;
  background: rgba(142, 82, 255, 0.18) !important;
  color: #d4b8ff !important;
  box-shadow: 0 0 14px rgba(142, 82, 255, 0.22);
}

#page-rocket .rocket-stage {
  border-color: rgba(142, 82, 255, 0.38) !important;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.6px),
    radial-gradient(circle at 28% 42%, rgba(200, 170, 255, 0.35) 0 1px, transparent 1.7px),
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.3) 0 1px, transparent 1.6px),
    radial-gradient(circle at 86% 58%, rgba(180, 140, 255, 0.32) 0 1px, transparent 1.7px),
    linear-gradient(180deg, #0d051a 0%, #12081f 48%, #1a0b2e 100%) !important;
  background-size: 118px 102px, 151px 133px, 173px 121px, 163px 142px, 100% 100% !important;
  box-shadow:
    inset 0 0 0 1px rgba(142, 82, 255, 0.12),
    inset 0 -90px 100px rgba(80, 30, 160, 0.16),
    0 18px 42px rgba(4, 2, 14, 0.48) !important;
}

#page-rocket .rocket-chart-axis,
#page-rocket .rocket-chart-ticks {
  stroke: rgba(142, 82, 255, 0.18) !important;
}

#page-rocket .multiplier-wrap::before {
  background: radial-gradient(circle, rgba(142, 82, 255, 0.38), rgba(90, 40, 180, 0.14) 42%, transparent 74%) !important;
}

#page-rocket .multiplier {
  color: #b48cff !important;
  text-shadow: 0 0 18px rgba(142, 82, 255, 0.72), 0 0 42px rgba(100, 50, 200, 0.38) !important;
}

#page-rocket .rocket-stage.flying .multiplier {
  color: #c9a8ff !important;
}

#page-rocket .rocket-stage.crashed .multiplier {
  color: #ff5c91 !important;
  text-shadow: 0 0 18px rgba(255, 75, 138, 0.5) !important;
}

#page-rocket .last-result {
  color: rgba(210, 195, 255, 0.72);
}

#page-rocket .rocket-art {
  filter: none !important;
}

#page-rocket .rocket-art img {
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.34)) !important;
}

#page-rocket .countdown-big {
  color: #c9a8ff !important;
  text-shadow: 0 0 18px rgba(142, 82, 255, 0.68), 0 0 42px rgba(100, 50, 200, 0.36) !important;
}

#page-rocket .countdown-big::before,
#page-rocket .countdown-big::after {
  border-color: rgba(142, 82, 255, 0.48);
  box-shadow: 0 0 0 18px rgba(142, 82, 255, 0.1), 0 0 0 38px rgba(100, 50, 200, 0.06);
}

#page-rocket .rocket-phase-pill {
  border-color: rgba(142, 82, 255, 0.28);
  background: rgba(13, 5, 26, 0.62);
  color: rgba(225, 210, 255, 0.82);
}

#page-rocket .rocket-bet-panel,
#page-rocket .rocket-players-card,
#page-rocket .pvp-players-card {
  border-color: rgba(142, 82, 255, 0.26) !important;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(142, 82, 255, 0.12), transparent 55%),
    linear-gradient(165deg, rgba(18, 8, 36, 0.94), rgba(8, 4, 18, 0.97)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 26px rgba(4, 2, 14, 0.34) !important;
}

#page-rocket .rocket-bet-panel .pvp-bet-field,
#page-rocket .rocket-quickbet {
  border-color: rgba(142, 82, 255, 0.24) !important;
  background: rgba(10, 4, 22, 0.55) !important;
}

#page-rocket .rocket-auto-row label,
#page-rocket .rocket-balance-line,
#page-rocket .rocket-panel-head b {
  color: rgba(210, 195, 255, 0.82);
}

#page-rocket .rocket-bet-panel .pvp-bet-btn,
#page-rocket .rocket-slot-button {
  background: linear-gradient(135deg, #9b59ff, #7b3fe8) !important;
  border-color: rgba(180, 130, 255, 0.38) !important;
  box-shadow: 0 10px 24px rgba(120, 60, 220, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

#page-rocket .pvp-fair-chip {
  border-color: rgba(142, 82, 255, 0.2);
  background: linear-gradient(180deg, rgba(22, 10, 40, 0.92), rgba(12, 6, 26, 0.94));
  color: rgba(200, 180, 240, 0.78);
}

#page-rocket .rocket-player-row,
#page-rocket .pvp-empty {
  border-color: rgba(142, 82, 255, 0.16) !important;
  background: rgba(12, 6, 26, 0.45) !important;
  color: rgba(190, 175, 230, 0.62) !important;
}

/* PVP page — фиолетовый космос */
#page-pvp.pvp-cosmos {
  --pvp-violet: #8e52ff;
  --pvp-violet-bright: #b48cff;
  --pvp-violet-deep: #6b3fd4;
}

#page-pvp.pvp-cosmos .pvp-stat-pill {
  height: 42px;
  border-radius: 12px;
  padding: 0 12px;
  border-color: rgba(142, 82, 255, 0.26) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(142, 82, 255, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(18, 8, 36, 0.9), rgba(8, 4, 18, 0.94)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 18px rgba(4, 2, 14, 0.28) !important;
}

#page-pvp.pvp-cosmos .pvp-stat-pill b,
#page-pvp.pvp-cosmos .pvp-stat-pill span {
  color: #ebe0ff !important;
}

#page-pvp.pvp-cosmos .pvp-wheel {
  filter: drop-shadow(0 14px 28px rgba(4, 2, 14, 0.42)) !important;
}

#page-pvp.pvp-cosmos .pvp-wheel:before,
#page-pvp.pvp-cosmos .pvp-wheel::before {
  background: radial-gradient(circle, rgba(142, 82, 255, 0.55) 0%, rgba(120, 60, 220, 0.28) 38%, rgba(100, 50, 200, 0.1) 58%, transparent 74%) !important;
}

#page-pvp.pvp-cosmos .pvp-wheel-frame {
  background:
    radial-gradient(circle, transparent 0 33%, rgba(100, 50, 200, 0.14) 33.5% 34%, transparent 34.5% 57%, rgba(142, 82, 255, 0.2) 57.5% 58%, transparent 58.5%),
    radial-gradient(circle at 50% 25%, rgba(100, 50, 200, 0.16), rgba(8, 4, 18, 0.98) 72%) !important;
  box-shadow:
    inset 0 0 0 1px rgba(180, 130, 255, 0.3),
    inset 0 0 0 42px rgba(40, 16, 80, 0.18),
    0 0 28px rgba(142, 82, 255, 0.32),
    0 0 48px rgba(100, 50, 200, 0.14) !important;
}

#page-pvp.pvp-cosmos .pvp-wheel.is-idle .pvp-wheel-spin {
  background:
    radial-gradient(circle, rgba(8, 4, 18, 0.98) 0 34%, transparent 34.5%),
    repeating-radial-gradient(circle, rgba(100, 50, 200, 0.18) 0 1px, transparent 1px 47px),
    radial-gradient(circle, #1a0b2e 0%, #0d051a 72%) !important;
  box-shadow: inset 0 0 0 1px rgba(180, 130, 255, 0.12), 0 0 26px rgba(142, 82, 255, 0.14) !important;
}

#page-pvp.pvp-cosmos .pvp-wheel-ring {
  border-color: rgba(180, 130, 255, 0.32) !important;
  box-shadow: 0 0 17px rgba(142, 82, 255, 0.24), inset 0 0 18px rgba(142, 82, 255, 0.12) !important;
}

#page-pvp.pvp-cosmos .pvp-center {
  background: radial-gradient(circle at 50% 24%, #2a1248, #0d051a 72%) !important;
  border-color: rgba(180, 130, 255, 0.32) !important;
  box-shadow: inset 0 0 20px rgba(4, 2, 14, 0.42), 0 0 24px rgba(142, 82, 255, 0.2) !important;
}

#page-pvp.pvp-cosmos .pvp-loader-dot {
  background: #b48cff !important;
  box-shadow: 0 0 8px rgba(142, 82, 255, 0.42);
}

#page-pvp.pvp-cosmos .pvp-bet-card,
#page-pvp.pvp-cosmos .pvp-players-card {
  border-color: rgba(142, 82, 255, 0.24) !important;
  background:
    radial-gradient(1.2px 1.2px at 14% 20%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(142, 82, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 100%, rgba(100, 50, 200, 0.12), transparent 60%),
    linear-gradient(165deg, rgba(18, 8, 36, 0.94), rgba(8, 4, 18, 0.97)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 26px rgba(4, 2, 14, 0.32) !important;
}

#page-pvp.pvp-cosmos .pvp-bet-field {
  border-color: rgba(142, 82, 255, 0.24) !important;
  background: rgba(10, 4, 22, 0.55) !important;
}

#page-pvp.pvp-cosmos .pvp-bet-btn {
  background: linear-gradient(135deg, #9b59ff, #7b3fe8) !important;
  box-shadow: 0 10px 24px rgba(120, 60, 220, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

#page-pvp.pvp-cosmos .pvp-gift-toggle {
  border-color: rgba(142, 82, 255, 0.22) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

#page-pvp.pvp-cosmos .pvp-balance-line {
  color: rgba(210, 195, 255, 0.82) !important;
}

#page-pvp.pvp-cosmos .pvp-players-head span {
  color: rgba(180, 160, 230, 0.55) !important;
}

#page-pvp.pvp-cosmos .pvp-player-row {
  border-color: rgba(142, 82, 255, 0.16) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)) !important;
}

#page-pvp.pvp-cosmos .pvp-empty {
  border-color: rgba(142, 82, 255, 0.18) !important;
  background: rgba(10, 4, 22, 0.45) !important;
  color: rgba(180, 165, 230, 0.55) !important;
}

#page-pvp.pvp-cosmos .pvp-fair-chip {
  border-color: rgba(142, 82, 255, 0.2);
  background: linear-gradient(180deg, rgba(22, 10, 40, 0.92), rgba(12, 6, 26, 0.94));
  color: rgba(200, 180, 240, 0.78);
}

/* ==========================================================================
   v826 — ракетка: фиолетовый фон страницы + прозрачный пилот
   ========================================================================== */

#page-rocket {
  background: transparent !important;
}

#page-rocket .rocket-stage {
  background-color: #12081f !important;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.38) 0 1px, transparent 1.6px),
    radial-gradient(circle at 28% 42%, rgba(200, 170, 255, 0.3) 0 1px, transparent 1.7px),
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1.6px),
    radial-gradient(circle at 86% 58%, rgba(180, 140, 255, 0.26) 0 1px, transparent 1.7px),
    linear-gradient(180deg, #0d051a 0%, #12081f 48%, #1a0b2e 100%) !important;
  background-size: 118px 102px, 151px 133px, 173px 121px, 163px 142px, 100% 100% !important;
  box-shadow:
    inset 0 0 0 1px rgba(142, 82, 255, 0.14),
    inset 0 -90px 100px rgba(80, 30, 160, 0.14),
    0 18px 42px rgba(4, 2, 14, 0.42) !important;
}

#page-rocket .rocket-sky {
  background: transparent !important;
}

#page-rocket .rocket-art img {
  background: transparent !important;
}

/* ==========================================================================
   v827 — ракетка: убрать сетку, непрозрачный пилот
   ========================================================================== */

#page-rocket .rocket-chart-axis,
#page-rocket .rocket-chart-ticks {
  display: none !important;
}

#page-rocket .rocket-art,
#page-rocket .rocket-flight-reset .rocket-art,
#page-rocket .rocket-flight-active .rocket-art,
#page-rocket .rocket-ignition .rocket-art {
  opacity: 1 !important;
}

#page-rocket .rocket-art img {
  opacity: 1 !important;
}

/* ==========================================================================
   v831 — ракетка: цвета с макета (пипетка), фон звёзд — общий cosmos
   ========================================================================== */

:root {
  --rocket-ink-0: #09082a;
  --rocket-ink-1: #0a082f;
  --rocket-ink-2: #0b0930;
  --rocket-panel: #131139;
  --rocket-panel-field: #121037;
  --rocket-chip: #08062a;
  --rocket-line: #272355;
  --rocket-line-soft: rgba(39, 35, 85, 0.42);
  --rocket-accent: #8d60e8;
  --rocket-accent-bright: #cc9df5;
  --rocket-accent-deep: #6236d3;
  --rocket-btn-start: #6045ac;
  --rocket-btn-end: #593ca6;
}

#page-rocket {
  --rocket-violet: var(--rocket-accent);
  --rocket-violet-bright: var(--rocket-accent-bright);
  --rocket-violet-deep: var(--rocket-accent-deep);
  --rocket-panel: var(--rocket-panel);
  background: transparent !important;
}

#page-rocket .x-chip {
  border-color: var(--rocket-line-soft) !important;
  background: var(--rocket-chip) !important;
  color: rgba(204, 190, 245, 0.88) !important;
}

#page-rocket .x-chip.hot {
  border-color: rgba(141, 96, 232, 0.42) !important;
  background: rgba(98, 54, 211, 0.16) !important;
  color: var(--rocket-accent-bright) !important;
  box-shadow: 0 0 12px rgba(98, 54, 211, 0.18);
}

#page-rocket .rocket-stage {
  border-color: var(--rocket-line) !important;
  background-color: var(--rocket-ink-1) !important;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.34) 0 1px, transparent 1.6px),
    radial-gradient(circle at 28% 42%, rgba(190, 180, 230, 0.2) 0 1px, transparent 1.7px),
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.26) 0 1px, transparent 1.6px),
    radial-gradient(circle at 86% 58%, rgba(170, 160, 210, 0.18) 0 1px, transparent 1.7px),
    linear-gradient(180deg, var(--rocket-ink-0) 0%, var(--rocket-ink-1) 52%, var(--rocket-ink-2) 100%) !important;
  background-size: 118px 102px, 151px 133px, 173px 121px, 163px 142px, 100% 100% !important;
  box-shadow:
    inset 0 0 0 1px rgba(39, 35, 85, 0.28),
    inset 0 -90px 100px rgba(14, 11, 54, 0.22),
    0 18px 42px rgba(4, 2, 12, 0.42) !important;
}

#page-rocket .rocket-chart-axis,
#page-rocket .rocket-chart-ticks {
  display: none !important;
}

#page-rocket .multiplier-wrap::before {
  background: radial-gradient(circle, rgba(141, 96, 232, 0.34), rgba(98, 54, 211, 0.12) 42%, transparent 74%) !important;
}

#page-rocket .multiplier {
  color: var(--rocket-accent-bright) !important;
  text-shadow: 0 0 18px rgba(204, 157, 245, 0.62), 0 0 42px rgba(141, 96, 232, 0.32) !important;
}

#page-rocket .rocket-stage.flying .multiplier {
  color: #d8b2ff !important;
}

#page-rocket .last-result {
  color: rgba(180, 168, 220, 0.66);
}

#page-rocket .countdown-big {
  color: var(--rocket-accent-bright) !important;
  text-shadow: 0 0 18px rgba(204, 157, 245, 0.55), 0 0 42px rgba(141, 96, 232, 0.26) !important;
}

#page-rocket .countdown-big::before,
#page-rocket .countdown-big::after {
  border-color: rgba(141, 96, 232, 0.36);
  box-shadow: 0 0 0 18px rgba(98, 54, 211, 0.08), 0 0 0 38px rgba(39, 35, 85, 0.06);
}

#page-rocket .rocket-phase-pill {
  border-color: var(--rocket-line-soft);
  background: rgba(8, 6, 42, 0.72);
  color: rgba(204, 190, 245, 0.82);
}

#page-rocket .rocket-bet-panel,
#page-rocket .rocket-players-card,
#page-rocket .pvp-players-card,
#page-rocket .rocket-bet-card {
  border-color: var(--rocket-line) !important;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(98, 54, 211, 0.08), transparent 55%),
    linear-gradient(165deg, rgba(19, 17, 57, 0.96), rgba(11, 9, 48, 0.98)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 26px rgba(4, 2, 12, 0.32) !important;
}

#page-rocket .rocket-bet-panel .pvp-bet-field,
#page-rocket .rocket-quickbet {
  border-color: var(--rocket-line-soft) !important;
  background: var(--rocket-panel-field) !important;
}

#page-rocket .rocket-auto-row label,
#page-rocket .rocket-balance-line {
  color: #b48cfe;
}

#page-rocket .rocket-panel-head b {
  color: #fefdff;
}

#page-rocket .rocket-bet-panel .pvp-bet-btn,
#page-rocket .rocket-slot-button,
#page-rocket .rocket-bet-card .pvp-bet-btn {
  background: linear-gradient(135deg, var(--rocket-btn-start), var(--rocket-btn-end)) !important;
  border-color: rgba(141, 96, 232, 0.34) !important;
  box-shadow: 0 10px 24px rgba(98, 54, 211, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

#page-rocket .pvp-fair-chip {
  border-color: var(--rocket-line-soft);
  background: linear-gradient(180deg, rgba(19, 17, 57, 0.92), rgba(11, 9, 48, 0.94));
  color: rgba(180, 168, 220, 0.72);
}

#page-rocket .rocket-player-row,
#page-rocket .pvp-empty {
  border-color: var(--rocket-line-soft) !important;
  background: rgba(8, 6, 42, 0.45) !important;
  color: rgba(170, 160, 210, 0.58) !important;
}

#page-rocket .rocket-clouds {
  opacity: 0.68;
  filter: none;
}

#page-rocket .rocket-clouds::before {
  background:
    radial-gradient(ellipse 44% 92% at 0% 100%, rgba(82, 44, 148, 0.68), transparent 74%),
    radial-gradient(ellipse 44% 92% at 100% 100%, rgba(82, 44, 148, 0.68), transparent 74%),
    radial-gradient(ellipse 34% 78% at 24% 108%, rgba(82, 44, 148, 0.46), transparent 72%),
    radial-gradient(ellipse 38% 82% at 76% 108%, rgba(82, 44, 148, 0.46), transparent 72%),
    radial-gradient(ellipse 52% 68% at 50% 112%, rgba(82, 44, 148, 0.34), transparent 70%);
}

#page-rocket .rocket-clouds i {
  background: linear-gradient(180deg, rgba(82, 44, 148, 0.94), rgba(18, 8, 40, 0.98));
  filter: drop-shadow(0 -6px 14px rgba(100, 50, 200, 0.16));
}

/* ==========================================================================
   v836 — лотерея: фиолетовый цветотип (как rocket / referrals / leaders)
   ========================================================================== */

#page-lottery {
  --lot-violet: #8e52ff;
  --lot-violet-bright: #cc9df5;
  --lot-violet-soft: #c9a8ff;
  --lot-violet-muted: #b48cff;
  --lot-violet-deep: #6045ac;
  --lot-violet-btn: #593ca6;
  --lot-panel: #131139;
  --lot-panel-2: #0a082f;
  --lot-ink: #09082a;
  --lot-line: rgba(142, 82, 255, 0.22);
  --lot-line-soft: rgba(140, 104, 255, 0.16);
}

#page-lottery .lottery-hero-sub,
#page-lottery .lottery-detail-sub,
#page-lottery .lottery-info-row span,
#page-lottery .lottery-qty-label,
#page-lottery .lottery-card-status,
#page-lottery .lottery-card-prize-label,
#page-lottery .lottery-detail-on,
#page-lottery .lottery-winner-sub,
#page-lottery .lottery-winner-modal-sub,
#page-lottery .lottery-winner-modal-title {
  color: var(--lot-violet-soft) !important;
}

#page-lottery .lottery-card-foot {
  color: rgba(201, 168, 255, 0.68) !important;
}

#page-lottery .lottery-qty-input {
  border-color: rgba(167, 139, 250, 0.32) !important;
  background: rgba(12, 8, 36, 0.78) !important;
}

#page-lottery .lottery-qty-input:focus {
  border-color: rgba(180, 140, 255, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.2) !important;
}

#page-lottery.lottery-cosmos {
  overflow: visible !important;
  contain: none !important;
}

#page-lottery.lottery-cosmos.active {
  overflow: visible !important;
}

#page-lottery.lottery-cosmos .lottery-hero-card {
  display: flex !important;
  align-items: center;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 11px !important;
  padding: 15px 14px !important;
  border: 1px solid rgba(96, 84, 190, 0.22) !important;
  border-radius: 20px !important;
  background: linear-gradient(168deg, rgba(11, 10, 48, 0.97), rgba(5, 5, 30, 0.99)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  overflow: visible !important;
  filter: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

#page-lottery.lottery-cosmos .lottery-hero-inner {
  gap: 12px !important;
  width: 100%;
}

#page-lottery.lottery-cosmos .lottery-hero-ico {
  width: auto !important;
  height: auto !important;
  min-width: 30px !important;
  min-height: 30px !important;
  padding: 10px !important;
  border: 1px solid rgba(140, 104, 255, 0.22) !important;
  border-radius: 14px !important;
  background: rgba(124, 77, 255, 0.14) !important;
  color: #c3b2ff !important;
}

#page-lottery.lottery-cosmos .lottery-hero-ico svg {
  width: 22px !important;
  height: 22px !important;
}

#page-lottery.lottery-cosmos .lottery-hero-title {
  font-size: 16.5px !important;
  font-weight: 950 !important;
  letter-spacing: -0.03em;
  color: #fff !important;
}

#page-lottery.lottery-cosmos .lottery-hero-sub {
  margin-top: 4px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: rgba(200, 200, 236, 0.6) !important;
}

#page-lottery .lottery-card {
  border-color: var(--lot-line-soft) !important;
  background: linear-gradient(165deg, rgba(19, 17, 57, 0.94), rgba(9, 8, 42, 0.98)) !important;
  box-shadow: 0 14px 30px rgba(4, 2, 16, 0.32) !important;
}

#page-lottery .lottery-card-glow {
  background: radial-gradient(ellipse at 50% 100%, rgba(124, 77, 255, 0.16), transparent 70%) !important;
}

#page-lottery .lottery-prize-badge {
  border-color: rgba(167, 139, 250, 0.28) !important;
  background: rgba(96, 52, 220, 0.18) !important;
  color: var(--lot-violet-bright) !important;
}

#page-lottery .lottery-card-prize,
#page-lottery .lottery-detail-prize,
#page-lottery .lottery-winner-modal-prize {
  border-color: rgba(167, 139, 250, 0.24) !important;
  background: radial-gradient(circle at 50% 30%, rgba(124, 77, 255, 0.18), rgba(0, 0, 0, 0.22)) !important;
}

#page-lottery .lottery-card-prize-wrap.is-link .lottery-card-prize,
#page-lottery .lottery-detail-prize.is-link {
  border-color: rgba(180, 140, 255, 0.42) !important;
  box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.1) !important;
}

#page-lottery .lottery-prize-ph {
  color: rgba(201, 168, 255, 0.42) !important;
}

#page-lottery .lottery-progress i {
  background: linear-gradient(90deg, #7c4dff, #b48cff) !important;
}

#page-lottery .lottery-card-cta,
#page-lottery .lottery-buy-main,
#page-lottery .lottery-winner-continue {
  border-color: rgba(167, 139, 250, 0.32) !important;
  background: linear-gradient(135deg, var(--lot-violet-deep), var(--lot-violet-btn)) !important;
  box-shadow: 0 10px 24px rgba(96, 52, 220, 0.28) !important;
}

#page-lottery .lottery-detail-shell {
  border-color: var(--lot-line-soft) !important;
  background:
    radial-gradient(1px 1px at 18% 12%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(124, 77, 255, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(19, 17, 57, 0.96), rgba(9, 8, 42, 0.98)) !important;
}

#page-lottery .lottery-detail-on b {
  color: #f0e6ff !important;
}

#page-lottery .lottery-info-row,
#page-lottery .lottery-qty-card,
#page-lottery .lottery-qty-value {
  border-color: var(--lot-line-soft) !important;
  background: rgba(19, 17, 57, 0.62) !important;
}

#page-lottery .lottery-range {
  accent-color: var(--lot-violet) !important;
}

#page-lottery .lottery-range::-webkit-slider-runnable-track,
#page-lottery .lottery-range::-moz-range-track {
  border-color: rgba(167, 139, 250, 0.16) !important;
}

#page-lottery .lottery-range::-webkit-slider-thumb,
#page-lottery .lottery-range::-moz-range-thumb {
  border-color: rgba(240, 230, 255, 0.95) !important;
  background: linear-gradient(180deg, #fff, #e8dcff) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 0 10px rgba(124, 77, 255, 0.1) !important;
}

#page-lottery .lottery-range-ends {
  color: rgba(201, 168, 255, 0.46) !important;
}

/* EasyGift lottery card layout; Mirava chrome; NFT stage + glass CTA unchanged */
#page-lottery .lottery-list,
#page-lottery.lottery-cosmos .lottery-list {
  gap: 16px !important;
}

#page-lottery .lottery-card.lottery-mg {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  isolation: isolate;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

#page-lottery .lottery-card.lottery-mg::after {
  display: none;
}

#page-lottery .lottery-card.lottery-mg.is-finished {
  opacity: 1;
}

#page-lottery .lottery-mg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  margin: 0;
  background: linear-gradient(168deg, rgba(11, 10, 48, 0.97), rgba(5, 5, 30, 0.99)) !important;
  border-radius: 12px 12px 0 0;
  box-shadow: none !important;
}

#page-lottery .lottery-mg-title {
  margin: 0;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0;
  line-height: 1.2;
}

#page-lottery .lottery-mg-status {
  color: #c9a8ff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap;
}

#page-lottery .lottery-mg-kicker-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#page-lottery .lottery-mg-kicker {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(140, 104, 255, 0.22);
  border-radius: 8px;
  background: rgba(124, 77, 255, 0.14);
  color: #c3b2ff;
  font: 900 9.5px/1 var(--mono);
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

#page-lottery .lottery-mg-stage {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: 110px;
  min-height: 110px;
  margin: -1px 0 0;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(to right, var(--lot-nft-to, #6045ac), var(--lot-nft-from, #8153f2)) !important;
}

#page-lottery .lottery-mg-stage.is-link,
#page-lottery .lottery-mg-dstage.is-link {
  cursor: pointer;
}

#page-lottery .lottery-mg-symbol {
  position: absolute;
  width: 25px;
  height: 25px;
  pointer-events: none;
  object-fit: contain;
  z-index: 0;
  filter: brightness(0);
}

#page-lottery .lottery-mg-cta {
  position: absolute;
  left: 16px;
  top: 50%;
  z-index: 2;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 10px 20px !important;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  box-shadow: none !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0;
  line-height: 1.2;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#page-lottery .lottery-mg-cta:disabled {
  opacity: 0.5;
  filter: none;
  cursor: not-allowed;
}

#page-lottery .lottery-mg-cta:active {
  transform: translateY(-50%) scale(0.98);
}

#page-lottery .lottery-mg-prize {
  position: absolute;
  right: 16px;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  transform: translateY(-50%);
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#page-lottery .lottery-mg-prize.is-link {
  cursor: pointer;
}

#page-lottery .lottery-mg-prize.is-link:active {
  transform: translateY(-50%) scale(0.97);
}

#page-lottery .lottery-mg-prize img,
#page-lottery .lottery-mg-prize video,
#page-lottery .lottery-mg-prize .lottery-lottie {
  width: 80px !important;
  height: 80px !important;
  object-fit: contain;
  pointer-events: auto;
}

#page-lottery .lottery-mg-prize .lottery-prize-stars {
  display: none !important;
}

#page-lottery .lottery-mg-foot {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 16px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(to right, var(--lot-nft-to-a, #6045acdd), var(--lot-nft-from-a, #8153f2dd)) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

#page-lottery .lottery-mg-foot-text {
  color: #fff !important;
}

#page-lottery .lottery-mg-foot .tg-star {
  width: 16px;
  height: 16px;
}

#page-lottery .lottery-detail-shell.lottery-mg-detail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 0 8px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#page-lottery .lottery-mg-detail .lottery-detail-head {
  width: 100%;
  text-align: left;
  margin: 0 0 12px !important;
}

#page-lottery .lottery-mg-detail .lottery-detail-title {
  margin-top: 10px !important;
  font-size: 20px !important;
  font-weight: 950 !important;
  line-height: 1.12 !important;
  letter-spacing: -0.04em !important;
  color: #fff !important;
}

#page-lottery .lottery-mg-dstage {
  position: relative;
  width: 100% !important;
  min-height: 168px !important;
  height: auto !important;
  aspect-ratio: auto !important;
  margin: 0 0 12px !important;
  padding: 16px !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 0 !important;
  border-radius: 20px !important;
  background: radial-gradient(circle, var(--lot-nft-from, #8153f2), var(--lot-nft-to, #6045ac) 70%) !important;
  box-shadow: 0 18px 40px rgba(3, 2, 16, 0.42) !important;
}

#page-lottery .lottery-mg-dstage::after {
  display: none;
}

#page-lottery .lottery-mg-dstage .lottery-mg-symbol {
  width: 30px;
  height: 30px;
}

#page-lottery .lottery-mg-dprize {
  position: relative;
  z-index: 1;
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
}

#page-lottery .lottery-mg-dprize img,
#page-lottery .lottery-mg-dprize video,
#page-lottery .lottery-mg-dprize .lottery-lottie {
  width: 128px !important;
  height: 128px !important;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4));
}

#page-lottery .lottery-mg-detail .lottery-info-row,
#page-lottery .lottery-mg-detail .lottery-qty-card {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border: 1px solid rgba(104, 92, 190, 0.2) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.032) !important;
  box-sizing: border-box;
}

#page-lottery .lottery-mg-detail .lottery-info-row {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
  padding: 14px 16px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#page-lottery .lottery-mg-detail .lottery-info-row--tickets {
  margin-bottom: 10px !important;
}

#page-lottery .lottery-mg-detail .lottery-info-row span,
#page-lottery .lottery-mg-detail .lottery-qty-label,
#page-lottery .lottery-mg-detail .lottery-range-ends {
  color: rgba(200, 200, 236, 0.6) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

#page-lottery .lottery-mg-detail .lottery-info-row b {
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  background: transparent !important;
  border: 0 !important;
}

#page-lottery .lottery-mg-detail .lottery-mytickets-main {
  display: flex;
  gap: 8px;
  align-items: center;
}

#page-lottery .lottery-mg-detail .lottery-mytickets-info {
  padding: 4px !important;
  color: #c3b2ff !important;
}

#page-lottery .lottery-mg-detail .lottery-mytickets-info svg {
  width: 18px;
  height: 18px;
}

#page-lottery .lottery-mg-detail .lottery-qty-card {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  padding: 16px !important;
}

#page-lottery .lottery-mg-detail .lottery-qty-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

#page-lottery .lottery-mg-detail .lottery-qty-value {
  width: 70px !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(104, 92, 190, 0.2) !important;
  background: rgba(0, 0, 0, 0.28) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  text-align: center;
  box-sizing: border-box;
}

#page-lottery .lottery-mg-detail .lottery-range-wrap {
  margin-top: 0 !important;
  padding: 8px 0 0 !important;
  min-height: 0 !important;
}

#page-lottery .lottery-mg-detail .lottery-range {
  width: 100% !important;
  height: 20px !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  background: transparent !important;
  accent-color: #8e52ff !important;
}

#page-lottery .lottery-mg-detail .lottery-range::-webkit-slider-runnable-track {
  height: 8px !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.42) !important;
  border: 0 !important;
}

#page-lottery .lottery-mg-detail .lottery-range::-moz-range-track {
  height: 8px !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.42) !important;
  border: 0 !important;
}

#page-lottery .lottery-mg-detail .lottery-range::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  margin-top: -6px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(180deg, #a37cff, #6b3fe6) !important;
  box-shadow: 0 0 12px rgba(134, 92, 255, 0.6) !important;
}

#page-lottery .lottery-mg-detail .lottery-range::-moz-range-thumb {
  width: 20px !important;
  height: 20px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(180deg, #a37cff, #6b3fe6) !important;
  box-shadow: 0 0 12px rgba(134, 92, 255, 0.6) !important;
}

#page-lottery .lottery-mg-detail .lottery-range-ends {
  font-size: 11px !important;
  color: rgba(198, 198, 234, 0.62) !important;
  font-weight: 800 !important;
  font-family: var(--mono);
}

#page-lottery .lottery-mg-detail .lottery-buy-main {
  width: 100% !important;
  max-width: none !important;
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 20px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(96deg, #8256ff, #6a3ee6) !important;
  box-shadow: 0 12px 26px rgba(88, 46, 220, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: -0.01em;
  box-sizing: border-box;
}

#page-lottery .lottery-winner-modal {
  border-color: rgba(167, 139, 250, 0.28) !important;
  background:
    radial-gradient(circle at 50% 0, rgba(124, 77, 255, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(15, 12, 48, 0.98), rgba(6, 5, 24, 0.98)) !important;
}

#page-lottery .lottery-winner-modal-kicker {
  color: var(--lot-violet-muted) !important;
}

/* ==========================================================================
   v837 — epic-кнопки: не клипать свечение и PVP-луч
   ========================================================================== */

#page-home .modes-hub,
#page-home .modes-hub__list,
#page-home .modes-grid,
#page-home .modes-grid--pair {
  overflow: visible;
}

.modes-hub__list .modes-card--epic.modes-card--half.modes-card--lottery,
.modes-hub__list .modes-card--epic.modes-card--half.modes-card--upgrade {
  background-clip: padding-box;
}

/* ==========================================================================
   v838 — апгрейд epicgift layout + фиолетовый цветотип Mirava
   ========================================================================== */

#page-upgrade.upgrade-game {
  --upgrade-violet: #8e52ff;
  --upgrade-violet-bright: #cc9df5;
  --upgrade-violet-soft: #c9a8ff;
  --upgrade-violet-deep: #6045ac;
  --upgrade-violet-btn: #593ca6;
  --upgrade-panel: #131139;
  --upgrade-panel-2: #0a082f;
  --upgrade-chance-angle: 180deg;
  --upgrade-win: #8e52ff;
  padding-bottom: 24px;
  color: #f4f0ff;
}

#page-upgrade .upgrade-shell--epic {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

#page-upgrade .upgrade-topbar {
  display: none;
}

#page-upgrade .upgrade-arena.upgrade-arena--epic {
  position: relative;
  min-height: 0;
  padding: 4px 0 2px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  display: block;
}

#page-upgrade .upgrade-arena.upgrade-arena--epic::before,
#page-upgrade .upgrade-arena.upgrade-arena--epic .upgrade-ambient {
  display: none;
}

#page-upgrade .upgrade-wheel-stage {
  width: 100%;
  padding: 8px 10px 10px;
  box-sizing: border-box;
}

#page-upgrade .upgrade-wheel-hud {
  --wheel-size: min(220px, calc(100vw - 10.5rem));
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
  min-height: var(--wheel-size);
  margin: 0 auto;
  overflow: visible;
}

#page-upgrade .upgrade-wheel-side {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  width: max-content;
  min-width: 0;
  min-height: 0;
  padding: 0;
  transform: translateY(-50%);
  text-align: center;
  pointer-events: none;
  overflow: visible;
}

#page-upgrade .upgrade-wheel-side strong {
  color: #fff;
  font: 900 clamp(15px, 4.1vw, 22px)/1.15 var(--font, system-ui, sans-serif);
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 14px rgba(124, 77, 255, 0.22);
}

#page-upgrade .upgrade-wheel-side--chance {
  right: calc(50% + var(--wheel-size) / 2 + 8px);
  left: auto;
  justify-content: flex-end;
}

#page-upgrade .upgrade-wheel-side--mult {
  left: calc(50% + var(--wheel-size) / 2 + 8px);
  right: auto;
  justify-content: flex-start;
}

#page-upgrade .upgrade-wheel-side--mult strong {
  color: rgba(240, 232, 255, 0.96);
}

/* ==========================================================================
   Колесо апгрейда — геометрия и слои перенесены из epicgift.app
   (рамка с насечками → кольцо → циферблат из 100 секторов → ступица),
   указатель вращается поверх круга. Палитра — фиолетовая Mirava.
   Пропорции epicgift: рамка 6%, ступица 35%, указатель 6%×8%, насечка 3%.
   ========================================================================== */

#page-upgrade .upgrade-wheel--epic {
  --frame-thickness: calc(var(--wheel-size) * 0.06);
  --hub-size: calc(var(--wheel-size) * 0.35);
  --pointer-w: calc(var(--wheel-size) * 0.06);
  --pointer-h: calc(var(--wheel-size) * 0.08);
  --notch-h: calc(var(--wheel-size) * 0.03);
  position: relative;
  width: var(--wheel-size, 220px);
  height: var(--wheel-size, 220px);
  margin: 0 auto;
  flex-shrink: 0;
  border: none;
  background: none;
  box-shadow: none;
  pointer-events: none;
}

#page-upgrade .upgrade-wheel--epic::before,
#page-upgrade .upgrade-wheel--epic::after {
  display: none;
}

/* ---------- Ореол вокруг круга (только когда собран апгрейд) ---------- */

#page-upgrade .upgrade-wheel__halo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.35s ease;
  pointer-events: none;
}

#page-upgrade .upgrade-wheel__halo--outer {
  width: calc(var(--wheel-size) + 40px);
  height: calc(var(--wheel-size) + 40px);
  background: radial-gradient(circle, rgba(142, 82, 255, 0.2), rgba(124, 77, 255, 0.06) 58%, transparent 74%);
  filter: blur(28px);
}

#page-upgrade .upgrade-wheel__halo--inner {
  width: calc(var(--wheel-size) + 60px);
  height: calc(var(--wheel-size) + 60px);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.12), transparent 68%);
  filter: blur(20px);
}

#page-upgrade .upgrade-wheel--epic.is-ready .upgrade-wheel__halo {
  opacity: 1;
  animation: upgrade-wheel-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

#page-upgrade .upgrade-wheel--epic.is-ready .upgrade-wheel__halo--inner {
  animation-delay: 0.15s;
}

@keyframes upgrade-wheel-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---------- Внешняя рамка ---------- */

#page-upgrade .upgrade-wheel__frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #4c3f6b 0%, #5b4c80 50%, #443861 100%);
  box-shadow:
    0 20px 42px rgba(6, 3, 20, 0.6),
    0 6px 14px rgba(6, 3, 20, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

#page-upgrade .upgrade-wheel__notches {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

/* Насечка крутится вокруг центра круга: обёртка на всю площадь, штрих у края. */
#page-upgrade .upgrade-wheel__notch {
  position: absolute;
  inset: 0;
  transform: rotate(var(--notch-rot, 0deg));
  pointer-events: none;
}

#page-upgrade .upgrade-wheel__notch i {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 2px;
  height: var(--notch-h);
  margin-left: -1px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(202, 186, 240, 0.8), rgba(112, 94, 150, 0.4));
}

/* ---------- Кольцо между рамкой и циферблатом ---------- */

#page-upgrade .upgrade-wheel__ring {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--wheel-size) - var(--frame-thickness));
  height: calc(var(--wheel-size) - var(--frame-thickness));
  box-sizing: border-box;
  border: 2px solid rgba(124, 104, 162, 0.85);
  border-radius: 50%;
  background: linear-gradient(135deg, #2b2143 0%, #3b3059 50%, #2b2143 100%);
}

/* ---------- Циферблат с секторами ---------- */

#page-upgrade .upgrade-wheel__dial {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--wheel-size) - var(--frame-thickness) * 2);
  height: calc(var(--wheel-size) - var(--frame-thickness) * 2);
  box-sizing: border-box;
  overflow: hidden;
  border: 2px solid rgba(124, 104, 162, 0.85);
  border-radius: 50%;
  background: linear-gradient(135deg, #140d24 0%, #1d1431 50%, #140d24 100%);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

#page-upgrade .upgrade-wheel__segments {
  position: absolute;
  inset: 0;
}

#page-upgrade .upgrade-wheel__segments,
#page-upgrade .upgrade-wheel__svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Ступица с превью подарка ---------- */

#page-upgrade .upgrade-wheel__hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--hub-size);
  height: var(--hub-size);
  box-sizing: border-box;
  border: 2px solid rgba(124, 104, 162, 0.85);
  border-radius: 50%;
  background: linear-gradient(135deg, #2b2143 0%, #3b3059 50%, #2b2143 100%);
  box-shadow: 0 12px 26px rgba(6, 3, 20, 0.55);
  transform: translate(-50%, -50%);
}

#page-upgrade .upgrade-wheel__hub-ring {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(150, 128, 196, 0.3);
  border-radius: 50%;
  pointer-events: none;
}

#page-upgrade .upgrade-wheel__hub-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(38, 26, 64, 0.92), rgba(8, 5, 18, 0.98));
}

#page-upgrade .upgrade-wheel__hub-core img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

#page-upgrade .upgrade-wheel__hub-core .upgrade-stake-star {
  display: grid;
  place-items: center;
}

#page-upgrade .upgrade-wheel__hub-core .upgrade-stake-amount {
  font: 900 clamp(11px, 3.4vw, 15px)/1 var(--mono, ui-monospace, monospace);
  color: #ffe4a8;
}

#page-upgrade .upgrade-wheel__placeholder {
  color: rgba(201, 168, 255, 0.34);
  font-size: clamp(20px, 6vw, 28px);
  font-weight: 300;
  line-height: 1;
}

#page-upgrade .upgrade-wheel__hub-core .upgrade-wheel__coin,
#page-upgrade .upgrade-wheel__hub-core [data-gift-lottie] {
  width: 72%;
  height: 72%;
  display: grid;
  place-items: center;
}

#page-upgrade .upgrade-wheel__hub-core .upgrade-wheel__coin svg,
#page-upgrade .upgrade-wheel__hub-core [data-gift-lottie] svg,
#page-upgrade .upgrade-wheel__hub-core .upgrade-wheel__coin img,
#page-upgrade .upgrade-pick-fan__item [data-gift-lottie],
#page-upgrade .upgrade-pick-fan__item [data-gift-lottie] svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

#page-upgrade .upgrade-wheel--epic.is-ready .upgrade-wheel__hub-core::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142, 82, 255, 0.14), transparent 70%);
  animation: upgrade-wheel-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}

/* ---------- Указатель: вращается вокруг круга, старт — 12 часов ---------- */

#page-upgrade .upgrade-wheel__orbit {
  position: absolute;
  inset: 0;
  z-index: 4;
  transform: rotate(0deg);
  transform-origin: center center;
  transition: transform 4.8s cubic-bezier(0.165, 0.84, 0.44, 1);
  will-change: transform;
  pointer-events: none;
}

#page-upgrade .upgrade-wheel__pointer {
  position: absolute;
  top: calc(var(--frame-thickness) / 2);
  left: 50%;
  width: var(--pointer-w);
  height: var(--pointer-h);
  transform: translateX(-50%);
}

#page-upgrade .upgrade-wheel__pointer-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #facc15, #f59e0b);
  clip-path: polygon(50% 0%, 85% 25%, 65% 100%, 35% 100%, 15% 25%);
  filter: blur(6px);
  opacity: 0.8;
  transform: scale(1.5);
}

#page-upgrade .upgrade-wheel__pointer-gem {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid rgba(254, 240, 138, 0.8);
  background: linear-gradient(180deg, #fde047 0%, #fbbf24 50%, #eab308 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  clip-path: polygon(50% 0%, 85% 25%, 65% 100%, 35% 100%, 15% 25%);
}

#page-upgrade .upgrade-wheel__pointer-shine {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 2;
  width: 60%;
  height: 70%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(254, 249, 195, 0.8), transparent);
  clip-path: polygon(50% 0%, 75% 20%, 60% 80%, 40% 80%, 25% 20%);
}

#page-upgrade .upgrade-wheel__pointer-cap {
  position: absolute;
  top: calc(var(--pointer-h) * 0.15);
  left: 50%;
  z-index: 3;
  width: calc(var(--pointer-w) * 0.4);
  height: calc(var(--pointer-w) * 0.4);
  transform: translateX(-50%);
  border: 1px solid rgba(254, 249, 195, 0.5);
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, #fcd34d);
}

/* ---------- Искры по углам (как у epicgift, при собранном апгрейде) ---------- */

#page-upgrade .upgrade-wheel__spark {
  position: absolute;
  z-index: 3;
  width: calc(var(--wheel-size) * 0.04);
  height: calc(var(--wheel-size) * 0.04);
  border-radius: 50%;
  background: linear-gradient(135deg, #b48cff, #8e52ff);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

#page-upgrade .upgrade-wheel__spark--tl { top: 2%; left: 2%; }
#page-upgrade .upgrade-wheel__spark--br { right: 2%; bottom: 2%; }

#page-upgrade .upgrade-wheel__spark--tr,
#page-upgrade .upgrade-wheel__spark--bl {
  width: calc(var(--wheel-size) * 0.03);
  height: calc(var(--wheel-size) * 0.03);
}

#page-upgrade .upgrade-wheel__spark--tr { top: 2%; right: 2%; }
#page-upgrade .upgrade-wheel__spark--bl { bottom: 2%; left: 2%; }

#page-upgrade .upgrade-wheel--epic.is-ready .upgrade-wheel__spark {
  opacity: 0.6;
  animation: upgrade-wheel-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

#page-upgrade .upgrade-wheel--epic.is-ready .upgrade-wheel__spark--tr { animation-delay: 0.075s; opacity: 0.4; }
#page-upgrade .upgrade-wheel--epic.is-ready .upgrade-wheel__spark--bl { animation-delay: 0.15s; opacity: 0.4; }
#page-upgrade .upgrade-wheel--epic.is-ready .upgrade-wheel__spark--br { animation-delay: 0.3s; }

/* ---------- Пока апгрейд не собран — круг притушен ---------- */

#page-upgrade .upgrade-wheel--epic:not(.is-ready) .upgrade-wheel__frame {
  background: linear-gradient(135deg, #322850 0%, #3b3160 50%, #2c2447 100%);
  box-shadow:
    0 14px 30px rgba(6, 3, 20, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#page-upgrade .upgrade-wheel--epic:not(.is-ready) .upgrade-wheel__notches {
  opacity: 0.5;
}

#page-upgrade .upgrade-wheel--epic:not(.is-ready) .upgrade-wheel__segments {
  opacity: 0.72;
}

#page-upgrade .upgrade-launch--epic {
  width: 100%;
  height: 50px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--upgrade-violet-deep), var(--upgrade-violet-btn));
  box-shadow: 0 10px 24px rgba(96, 52, 220, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 15px;
  font-weight: 950;
}

#page-upgrade .upgrade-cta {
  margin-top: 12px;
}
#page-upgrade .upgrade-cta .upgrade-launch {
  margin-top: 0;
}
#page-upgrade .upgrade-result-actions {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
#page-upgrade .upgrade-cta.is-result .upgrade-launch,
#page-upgrade .upgrade-cta.is-result .upgrade-launch--epic {
  display: none !important;
}
#page-upgrade .upgrade-cta.is-result .upgrade-result-actions {
  display: grid;
}
#page-upgrade .upgrade-result-btn {
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 950;
  padding: 0 12px;
  color: #fff;
  border: 1px solid rgba(167, 139, 250, 0.42);
  background: linear-gradient(135deg, #7c4dff, #9b6dff);
  box-shadow: 0 10px 24px rgba(96, 52, 220, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
#page-upgrade .upgrade-result-btn:disabled {
  opacity: 0.55;
}

#page-upgrade .upgrade-launch--epic:disabled {
  color: rgba(201, 168, 255, 0.42);
  background: rgba(19, 17, 57, 0.72);
  border-color: rgba(142, 82, 255, 0.14);
  box-shadow: none;
}

#page-upgrade .upgrade-pay-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(142, 82, 255, 0.18);
  background: rgba(19, 17, 57, 0.72);
}

#page-upgrade .upgrade-pay-toggle button {
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(201, 168, 255, 0.58);
  font-size: 13px;
  font-weight: 850;
}

#page-upgrade .upgrade-pay-toggle button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--upgrade-violet-deep), #7c4dff);
  box-shadow: 0 6px 16px rgba(96, 52, 220, 0.24);
}

#page-upgrade .upgrade-pay-toggle button:disabled {
  opacity: 0.45;
}

#page-upgrade .upgrade-pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#page-upgrade .upgrade-pick-card {
  min-height: 132px;
  padding: 12px 10px 10px;
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: center;
  border: 1px solid rgba(142, 82, 255, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 17, 57, 0.92), rgba(9, 8, 42, 0.98));
  color: #fff;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#page-upgrade .upgrade-pick-card.active {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.12), 0 10px 24px rgba(76, 40, 182, 0.18);
}

#page-upgrade .upgrade-pick-card.is-disabled {
  opacity: 0.55;
}

#page-upgrade .upgrade-pick-card__visual {
  width: 100%;
  min-height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}
#page-upgrade .upgrade-pick-card__visual:has(.upgrade-pick-fan) {
  min-height: 88px;
}

#page-upgrade .upgrade-pick-card__visual img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

#page-upgrade .upgrade-pick-card__price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: 950 14px/1 var(--mono, ui-monospace, monospace);
  color: #ffe4a8;
}

#page-upgrade .upgrade-pick-card__price .tg-star {
  width: 12px;
  height: 12px;
}

#page-upgrade .upgrade-pick-card__plus {
  color: rgba(201, 168, 255, 0.42);
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
}

#page-upgrade .upgrade-pick-card__label {
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  color: rgba(220, 200, 255, 0.88);
}

#page-upgrade .upgrade-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(142, 82, 255, 0.18);
  background: rgba(19, 17, 57, 0.72);
}

#page-upgrade .upgrade-tabs button {
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(201, 168, 255, 0.55);
  font-size: 12px;
  font-weight: 850;
}

#page-upgrade .upgrade-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--upgrade-violet-deep), #7c4dff);
  box-shadow: 0 6px 16px rgba(96, 52, 220, 0.24);
}

#page-upgrade .upgrade-inventory {
  min-height: 148px;
  padding: 12px;
  border: 1px solid rgba(142, 82, 255, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 17, 57, 0.88), rgba(9, 8, 42, 0.96));
}

#page-upgrade .upgrade-empty {
  grid-column: 1 / -1;
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 18px 12px;
  border: 1px dashed rgba(142, 82, 255, 0.18);
  border-radius: 12px;
  color: rgba(201, 168, 255, 0.55);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

#page-upgrade .upgrade-arena.upgrade-arena--epic.won .upgrade-wheel__frame {
  box-shadow:
    0 20px 42px rgba(6, 3, 20, 0.6),
    0 0 32px rgba(124, 77, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#page-upgrade .upgrade-arena.upgrade-arena--epic.won .upgrade-wheel__hub {
  border-color: rgba(180, 140, 255, 0.85);
  box-shadow: 0 12px 26px rgba(6, 3, 20, 0.55), 0 0 22px rgba(142, 82, 255, 0.45);
}

#page-upgrade .upgrade-arena.upgrade-arena--epic.lost .upgrade-wheel__segments {
  filter: saturate(0.55) brightness(0.88);
}

#page-upgrade .upgrade-gift-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#page-upgrade .upgrade-grid-item {
  position: relative;
  min-height: 108px;
  padding: 8px 6px 7px;
  display: grid;
  gap: 4px;
  align-content: start;
  justify-items: center;
  border: 1px solid rgba(142, 82, 255, 0.14);
  border-radius: 12px;
  background: rgba(12, 8, 36, 0.72);
  color: #fff;
  text-align: center;
}

#page-upgrade .upgrade-grid-item.selected {
  border-color: rgba(167, 139, 250, 0.62);
  box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.14), 0 8px 18px rgba(76, 40, 182, 0.18);
}

#page-upgrade .upgrade-grid-item__check {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid rgba(201, 168, 255, 0.38);
  background: rgba(12, 8, 36, 0.88);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

#page-upgrade .upgrade-grid-item.selected .upgrade-grid-item__check {
  border-color: rgba(201, 164, 255, 0.95);
  background: linear-gradient(135deg, #9b59ff, #7b3fe8);
}

#page-upgrade .upgrade-grid-item.selected .upgrade-grid-item__check::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

#page-upgrade .upgrade-pick-fan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 52px;
  padding: 0 4px;
  box-sizing: border-box;
}
#page-upgrade .upgrade-pick-fan__item {
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 9px;
  overflow: hidden;
  flex: 0 0 auto;
  background: radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.12), rgba(14, 10, 40, 0.96));
  border: 1px solid rgba(186, 164, 255, 0.38);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}
#page-upgrade .upgrade-pick-fan[data-count="2"] .upgrade-pick-fan__item {
  width: 40px;
  height: 40px;
}
#page-upgrade .upgrade-pick-fan[data-count="3"] .upgrade-pick-fan__item {
  width: 34px;
  height: 34px;
}
#page-upgrade .upgrade-pick-fan[data-count="4"] .upgrade-pick-fan__item {
  width: 30px;
  height: 30px;
}
#page-upgrade .upgrade-pick-fan[data-count="5"] .upgrade-pick-fan__item {
  width: 24px;
  height: 24px;
}
#page-upgrade .upgrade-pick-card__visual .upgrade-pick-fan img,
#page-upgrade .upgrade-wheel__hub-core .upgrade-pick-fan img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 2px;
  box-sizing: border-box;
}
#page-upgrade .upgrade-wheel__hub-core .upgrade-pick-fan {
  min-height: 0;
  gap: 3px;
  padding: 0 6px;
}
#page-upgrade .upgrade-wheel__hub-core .upgrade-pick-fan__item {
  width: 18px;
  height: 18px;
  border-radius: 6px;
}
#page-upgrade .upgrade-wheel__hub-core .upgrade-pick-fan[data-count="2"] .upgrade-pick-fan__item {
  width: 26px;
  height: 26px;
}

#page-upgrade .upgrade-multi-hint {
  margin: 0 0 8px;
  color: rgba(201, 168, 255, 0.62);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

#page-upgrade .upgrade-grid-item img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

#page-upgrade .upgrade-grid-item__plus {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: rgba(201, 168, 255, 0.42);
  font-size: 24px;
}

#page-upgrade .upgrade-grid-item strong {
  width: 100%;
  overflow: hidden;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#page-upgrade .upgrade-grid-item span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #ffe4a8;
  font: 900 10px/1 var(--mono);
}

#page-upgrade .upgrade-grid-item__chance {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(124, 77, 255, 0.22);
  color: var(--upgrade-violet-bright);
  font: 900 8px/1 var(--mono);
}

#page-upgrade .upgrade-gift-grid.is-hidden,
#page-upgrade .upgrade-target-list.is-hidden,
#page-upgrade .upgrade-stake-panel.is-hidden,
#page-upgrade .upgrade-target-toolbar.is-hidden,
#page-upgrade .upgrade-inventory.is-hidden,
#page-upgrade .upgrade-load-more.is-hidden,
#page-upgrade .upgrade-multi-hint.is-hidden,
#page-upgrade .upgrade-wins-pager.is-hidden {
  display: none !important;
}

#page-upgrade .upgrade-stake-panel {
  margin-top: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(142, 82, 255, 0.18);
  background: rgba(12, 8, 36, 0.72);
}

#page-upgrade .upgrade-stake-title {
  margin-bottom: 8px;
  color: rgba(201, 168, 255, 0.82);
  font-size: 12px;
  font-weight: 850;
}

#page-upgrade .upgrade-stake-input-wrap {
  margin-bottom: 8px;
}

#page-upgrade .upgrade-stake-input {
  width: 100%;
  height: 56px;
  border: 1px solid rgba(142, 82, 255, 0.28);
  border-radius: 12px;
  background: rgba(8, 6, 28, 0.92);
  color: #fff;
  text-align: center;
  font: 950 28px/1 var(--mono);
  outline: none;
}

#page-upgrade .upgrade-stake-balance {
  margin-bottom: 10px;
  color: rgba(201, 168, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

#page-upgrade .upgrade-stake-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

#page-upgrade .upgrade-stake-presets button {
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(142, 82, 255, 0.22);
  background: rgba(124, 77, 255, 0.12);
  color: #d8c2ff;
  font: 900 11px/1 var(--mono);
}

#page-upgrade .upgrade-stake-star {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

#page-upgrade .upgrade-stake-star .tg-star {
  width: 34px;
  height: 34px;
}

#page-upgrade .upgrade-stake-amount {
  display: block;
  margin-top: 2px;
  font: 950 14px/1 var(--mono);
  color: #ffe4a8;
}

#page-upgrade .upgrade-target-toolbar {
  margin-top: 8px;
}

#page-upgrade .upgrade-sort {
  display: grid;
  grid-template-columns: 1fr 1fr 40px 40px;
  gap: 6px;
}

#page-upgrade .upgrade-sort-input {
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(142, 82, 255, 0.18);
  background: rgba(12, 8, 36, 0.72);
  color: #fff;
  padding: 0 10px;
  font: 850 12px/1 var(--mono);
  outline: none;
}

#page-upgrade .upgrade-sort-btn {
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(142, 82, 255, 0.18);
  background: rgba(12, 8, 36, 0.72);
  color: #d8c2ff;
  font-weight: 950;
}

#page-upgrade .upgrade-sort-btn.active {
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(124, 77, 255, 0.24);
  color: #fff;
}

#page-upgrade .upgrade-target-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

#page-upgrade .upgrade-target-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(142, 82, 255, 0.14);
  background: rgba(12, 8, 36, 0.72);
  color: #fff;
  text-align: left;
}

#page-upgrade .upgrade-target-row.selected {
  border-color: rgba(167, 139, 250, 0.58);
  box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.12);
}

#page-upgrade .upgrade-target-row__thumb {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(124, 77, 255, 0.08);
  overflow: hidden;
}

#page-upgrade .upgrade-target-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#page-upgrade .upgrade-target-row__meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#page-upgrade .upgrade-target-row__meta strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#page-upgrade .upgrade-target-row__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffe4a8;
  font: 900 12px/1 var(--mono);
}

#page-upgrade .upgrade-target-row__chance {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(124, 77, 255, 0.18);
  color: #d8c2ff;
  font: 900 10px/1 var(--mono);
  white-space: nowrap;
}

#page-upgrade .upgrade-target-row__pick {
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(124, 77, 255, 0.18);
  color: #efe6ff;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

#page-upgrade .upgrade-load-more {
  width: 100%;
  margin-top: 8px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(142, 82, 255, 0.22);
  background: rgba(124, 77, 255, 0.12);
  color: #efe6ff;
  font-weight: 900;
}

#page-upgrade .upgrade-empty {
  padding: 18px 12px;
  border: 1px dashed rgba(142, 82, 255, 0.22);
  border-radius: 12px;
  color: rgba(201, 168, 255, 0.72);
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
}


#page-upgrade .upgrade-status.won { color: #b8ffd8; }
#page-upgrade .upgrade-status.lost { color: #ffb0c0; }

@media (max-width: 360px) {
  #page-upgrade .upgrade-gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #page-upgrade .upgrade-pick-card { min-height: 118px; }
  #page-upgrade .upgrade-wheel-hud { --wheel-size: min(188px, calc(100vw - 9.5rem)); }
  #page-upgrade .upgrade-wheel-side strong { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  #page-upgrade .upgrade-wheel__halo,
  #page-upgrade .upgrade-wheel__spark,
  #page-upgrade .upgrade-wheel--epic.is-ready .upgrade-wheel__hub-core::after {
    animation: none !important;
  }
}

/* Case screen overrides — EasyGift flat panel (synced with easygift.site CSS) */
#homeCaseGame .case-roll {
  border: 0 !important;
  background: #0f1030 !important;
  box-shadow: none !important;
}
#homeCaseGame .case-roll::before { border-top-color: #8b5cf6 !important; filter: none !important; }
#homeCaseGame .case-roll::after { border-bottom-color: #8b5cf6 !important; filter: none !important; }
#homeCaseGame .roll-prize {
  border: 0 !important;
  background: #171838 !important;
  box-shadow: none !important;
}
#homeCaseGame .case-spin-button {
  border: 0 !important;
  border-radius: 8px !important;
  background: #8b5cf6 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
#homeCaseGame .case-spin-button[disabled] {
  background: #3a4250 !important;
  color: #7b7e87 !important;
  opacity: 0.7 !important;
}
#homeCaseGame .case-options {
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}
#homeCaseGame .case-count-btn {
  border: 2px solid #171838 !important;
  background: #0f1030 !important;
  box-shadow: none !important;
}
#homeCaseGame .case-count-btn.active {
  border-color: #6a35e8 !important;
  background: #6a35e8 !important;
  box-shadow: none !important;
}
#homeCaseGame .case-prize-card,
#homeCaseGame .case-prize-main,
#homeCaseGame .other-prizes-panel {
  border: 0 !important;
  background: #0f1030 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.13) !important;
}
#homeCaseGame .other-prizes-list .case-prize-card {
  background: transparent !important;
  box-shadow: none !important;
}
#homeCaseGame .case-prize-thumb,
#homeCaseGame .case-prize-main .case-prize-thumb,
#homeCaseGame .other-prizes-list .case-prize-thumb {
  background: #171838 !important;
  border: 0 !important;
}
#homeCaseGame .promo-case-input {
  border: 0 !important;
  background: #171838 !important;
}
#homeCaseGame .promo-case-activate-btn {
  background: #6a35e8 !important;
}

/* ==========================================================================
   v851 — home: stop neon bleed between blocks + epic-style case tiles
   ========================================================================== */

#page-home {
  isolation: isolate;
}

#page-home > .live-gift-card,
#page-home > .home-modes,
#page-home > .home-case-lobby {
  position: relative;
  isolation: isolate;
}

/* LIVE strip: glow stays inside the card */
#page-home .live-gift-card {
  margin-bottom: 12px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 18px rgba(80, 120, 200, 0.08) !important;
}

/* Mode banners: clip section, no outward neon */
#page-home .home-modes {
  margin: 12px 0 0 !important;
  padding: 2px 0 0;
  overflow: hidden;
}

.modes-hub__list {
  overflow: hidden !important;
  padding: 4px 0 0 !important;
  gap: 10px !important;
}

.modes-hub__list .modes-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22) !important;
}

.modes-hub__list .modes-card::before {
  box-shadow: none !important;
  width: 2px !important;
}

.modes-hub__list .modes-card__glow {
  opacity: 0.1 !important;
  filter: none !important;
}

.modes-hub__list .modes-card--featured .modes-card__glow,
.modes-hub__list .modes-card--rocket .modes-card__glow,
.modes-hub__list .modes-card--upgrade .modes-card__glow {
  filter: none !important;
  opacity: 0.08 !important;
}

.modes-hub__list .modes-card__arc {
  filter: none !important;
  mix-blend-mode: normal !important;
}

.modes-hub__list .modes-card__mult {
  box-shadow: none !important;
}

/* Case catalog overrides — beat inline .case-shop-card base styles */
#page-home .home-case-lobby {
  overflow: hidden !important;
  margin-top: 12px !important;
  padding-top: 0 !important;
  z-index: 1 !important;
}

#page-home .home-case-grid {
  gap: 10px !important;
}

#page-home .case-shop-card--catalog {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--glass) !important;
  -webkit-backdrop-filter: blur(18px) saturate(130%) !important;
  backdrop-filter: blur(18px) saturate(130%) !important;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  overflow: hidden !important;
  isolation: isolate !important;
  text-align: left !important;
}

#page-home .case-shop-card--catalog::before,
#page-home .case-shop-card--catalog::after {
  content: none !important;
  display: none !important;
}

#page-home .case-shop-card--catalog .case-shop-card__visual {
  background:
    radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--case-accent, #56b8ff) 14%, transparent), transparent 64%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(45, 156, 255, 0.04)) !important;
}

#page-home .case-shop-card--catalog .case-shop-card__visual::before {
  background: radial-gradient(
    circle at 50% 58%,
    color-mix(in srgb, var(--case-accent, #56b8ff) 18%, transparent),
    transparent 70%
  ) !important;
}

#page-home .case-shop-card--catalog .case-shop-card__img {
  width: 78% !important;
  height: 78% !important;
  animation: none !important;
  transform: translate(-50%, -50%) !important;
}

#page-home .case-shop-card--catalog .case-shop-card__badge {
  border: 1px solid rgba(255, 211, 107, 0.22) !important;
  background: rgba(255, 211, 107, 0.1) !important;
  color: var(--gold) !important;
  font-family: var(--mono) !important;
}

#page-home .case-shop-card--catalog .case-shop-card__foot {
  min-height: 44px !important;
  padding: 10px 12px !important;
  background: rgba(255, 255, 255, 0.034) !important;
  border-top: 1px solid var(--line-2) !important;
}

#page-home .case-shop-card--catalog .case-shop-card__title {
  color: var(--text) !important;
  font-family: var(--font) !important;
  font-size: 15px !important;
  font-style: normal !important;
  font-weight: 950 !important;
  letter-spacing: -0.035em !important;
  text-transform: none !important;
  text-shadow: none !important;
  transform: none !important;
}

#page-home .case-shop-card--catalog .case-shop-card__price {
  position: static !important;
  height: 28px !important;
  padding: 0 9px !important;
  border: 1px solid rgba(255, 201, 74, 0.22) !important;
  border-radius: 11px !important;
  background: rgba(255, 201, 74, 0.075) !important;
  color: var(--gold) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transform: none !important;
}

#page-home .case-shop-card--catalog .case-shop-card__price b {
  font-family: var(--mono) !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  color: var(--gold) !important;
  text-shadow: none !important;
}

#page-home .case-shop-card--catalog .case-shop-card__price .tg-star {
  width: 13px !important;
  height: 13px !important;
}

#page-home .case-shop-card--catalog:active {
  filter: brightness(1.05) !important;
  transform: none !important;
}

@media (max-width: 390px) {
  #page-home .case-shop-card--catalog .case-shop-card__title { font-size: 14px !important; }
  #page-home .case-shop-card--catalog .case-shop-card__foot { padding: 9px 10px !important; min-height: 42px !important; }
  #page-home .case-shop-card--catalog .case-shop-card__price { height: 26px !important; padding: 0 8px !important; }
  #page-home .case-shop-card--catalog .case-shop-card__price b { font-size: 12px !important; }
}

/* Topup sheet — violet brand, no leftover EasyGift blue */
#topupSheet {
  --accent: #8e52ff;
  --accent-2: #b48cff;
  --blue: #7c4dff;
  --line: rgba(142, 82, 255, 0.22);
  --line-2: rgba(142, 82, 255, 0.12);
  --line-accent: rgba(160, 110, 255, 0.36);
  background: linear-gradient(180deg, #16103a 0%, #0c0824 52%, #060412 100%) !important;
  border-color: rgba(142, 82, 255, 0.22) !important;
}

#topupSheet .grabber {
  background: rgba(167, 139, 250, 0.34) !important;
}

#topupSheet .topup-close {
  border-color: rgba(167, 139, 250, 0.22) !important;
  color: rgba(212, 196, 255, 0.78) !important;
}

#topupSheet .topup-tabs {
  border-color: rgba(142, 82, 255, 0.18) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

#topupSheet .topup-tabs .tab.active {
  color: #fff !important;
  background: linear-gradient(180deg, #8153f2 0%, var(--violet-deep) 100%) !important;
  box-shadow: none !important;
}

#topupSheet .topup-field-label,
#topupSheet .topup-gift-title {
  color: #b48cff !important;
}

#topupSheet.topup-sheet .field {
  border-color: rgba(142, 82, 255, 0.28) !important;
}

#topupSheet.topup-sheet .field:focus-within {
  border-color: rgba(167, 139, 250, 0.55) !important;
}

#topupSheet .stars-browser-cta a {
  color: #b48cff !important;
}

#topupSheet .topup-submit {
  box-shadow: none !important;
}

#topupSheet .topup-submit:disabled {
  background: rgba(129, 83, 242, 0.18) !important;
  border: 1px solid rgba(167, 139, 250, 0.2) !important;
  color: rgba(217, 233, 251, 0.38) !important;
  box-shadow: none !important;
}

/* Daily 1-star case — entry sheet + opening screen, violet brand */
.daily-case-backdrop {
  background: rgba(6, 4, 18, 0.78) !important;
}

#dailyCaseSheet.daily-case-sheet,
.daily-case-sheet {
  border-top-color: rgba(142, 82, 255, 0.28) !important;
  background:
    radial-gradient(1.1px 1.1px at 12% 16%, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 78% 12%, rgba(196, 170, 255, .5), transparent),
    radial-gradient(1.2px 1.2px at 42% 78%, rgba(255,255,255,.32), transparent),
    radial-gradient(ellipse 90% 42% at 50% -12%, rgba(124, 77, 255, .28), transparent 60%),
    radial-gradient(ellipse 50% 36% at 100% 80%, rgba(74, 39, 182, .18), transparent 55%),
    linear-gradient(180deg, #16103a 0%, #0c0824 46%, #060412 100%) !important;
  box-shadow: 0 -12px 40px rgba(4, 2, 16, 0.55), inset 0 1px 0 rgba(255,255,255,.06) !important;
}

.daily-case-sheet::before {
  background: radial-gradient(ellipse 70% 40% at 50% 8%, rgba(129, 83, 242, .16), transparent 65%) !important;
}

.daily-case-head .grabber {
  background: rgba(167, 139, 250, 0.38) !important;
}

#dailyCaseSheet .daily-case-close,
.daily-case-close {
  border-color: rgba(167, 139, 250, 0.22) !important;
  background: rgba(12, 8, 36, 0.72) !important;
  color: rgba(212, 196, 255, 0.78) !important;
}

.daily-case-title {
  text-shadow: 0 0 24px rgba(139, 92, 246, 0.28) !important;
}

.daily-case-text .daily-case-nft {
  color: #c4b0ff !important;
}

.daily-case-open {
  border: 1px solid rgba(167, 139, 250, 0.32) !important;
  background: linear-gradient(180deg, #8153f2 0%, #4a27b6 100%) !important;
  box-shadow: 0 8px 22px rgba(76, 40, 182, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

#page-home.case-daily #homeCaseGame {
  --case-accent: #8b5cf6;
  --case-accent-2: #a78bfa;
}

#page-home.case-daily #homeCaseGame .case-game-title {
  color: #c4b0ff !important;
}

#page-home .case-shop-card--catalog[data-open-case="daily"] {
  --case-accent: #8b5cf6 !important;
  --case-glow: rgba(139, 92, 246, 0.22) !important;
}

#page-home .case-shop-card--catalog[data-open-case="daily"] .case-shop-card__visual {
  background:
    radial-gradient(circle at 50% 62%, rgba(139, 92, 246, 0.18), transparent 64%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(124, 77, 255, 0.06)) !important;
}

/* v869 — case row spacing matches mode banner gaps (12px) */
#page-home > .home-case-lobby {
  margin-top: 12px !important;
  padding-top: 0 !important;
}

/* v891 — PVP arena from epicgift.app CSS (no wheel) */
#page-pvp .pvp-wheel-wrap,
#page-pvp .pvp-pointer-top,
#page-pvp .pvp-stats-row {
  display: none !important;
}

/* PvPHighlights: last game left, rotating best bank right */
#page-pvp .pvp-last {
  position: relative;
  display: block;
  padding: 0 4px 0;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: transparent;
}
#page-pvp .pvp-last::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 1px;
  transform: translateX(-50%);
  background: rgba(196, 184, 232, 0.38);
  pointer-events: none;
}
#page-pvp .pvp-last::after {
  display: none !important;
}
#page-pvp .pvp-last-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
}
#page-pvp .pvp-last-row::before {
  content: none !important;
  display: none !important;
}
#page-pvp .pvp-last-col--game,
#page-pvp .pvp-last-col--best {
  min-width: 0;
  flex: 1 1 0;
}
#page-pvp .pvp-last-col--best {
  text-align: right;
}
#page-pvp .pvp-last-col--best .pvp-last-name {
  text-align: right;
}
#page-pvp .pvp-last-col--best .pvp-last-stats {
  justify-content: flex-end;
}
#page-pvp .pvp-last-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
#page-pvp .pvp-last-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  min-width: 0;
}
#page-pvp .pvp-last-amt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: #c9a8ff;
  font-size: 14px;
  font-weight: 600;
}
#page-pvp .pvp-last-amt .tg-star,
#page-pvp .pvp-best-amt .tg-star { width: 12px; height: 12px; }
#page-pvp .pvp-last-pct {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
}
#page-pvp .pvp-last-label,
#page-pvp .pvp-best-label {
  margin-top: 4px;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}
#page-pvp .pvp-best-swap {
  transition: opacity .4s ease, transform .4s ease;
  will-change: opacity, transform;
}
#page-pvp .pvp-best-swap.is-leave {
  opacity: 0;
  transform: translateY(6px);
}
#page-pvp .pvp-best-swap.is-enter {
  opacity: 0;
  transform: translateY(-6px);
}
#page-pvp .pvp-last::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.12);
}

/* Players left · countdown center · bank right */
#page-pvp .pvp-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 2px 0 6px;
  padding: 0 2px;
  text-align: center;
  overflow: visible;
}
#page-pvp .pvp-hud-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#page-pvp .pvp-hud-side--players { align-items: flex-start; text-align: left; }
#page-pvp .pvp-hud-side--bank { align-items: flex-end; text-align: right; }
#page-pvp .pvp-hud-kicker {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#page-pvp .pvp-hud-value,
#page-pvp .pvp-hud-pool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}
#page-pvp .pvp-hud-clock {
  position: relative;
  min-height: 28px;
  min-width: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
#page-pvp .pvp-win-burst {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  z-index: 3;
}
#page-pvp .pvp-win-burst[hidden] { display: none !important; }
#page-pvp .pvp-win-name {
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 2;
}
#page-pvp .pvp-win-popper {
  font-size: 16px;
  line-height: 1;
  position: relative;
  z-index: 2;
  display: inline-block;
  animation: pvpWinPop 0.55s cubic-bezier(0.2, 0.9, 0.2, 1.2) both;
}
#page-pvp .pvp-win-popper--right { animation-name: pvpWinPopR; }
.pvp-win-confetti-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 230;
}
@keyframes pvpWinPop {
  from { opacity: 0; transform: scale(0.45) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes pvpWinPopR {
  from { opacity: 0; transform: scaleX(-1) scale(0.45) translateY(6px); }
  to { opacity: 1; transform: scaleX(-1) scale(1) translateY(0); }
}
#page-pvp .pvp-timer {
  position: static !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  min-width: 4ch;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  filter: none !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
  text-shadow: none !important;
  font-variant-numeric: tabular-nums;
}
#page-pvp .pvp-timer:before,
#page-pvp .pvp-timer:after { display: none !important; content: none !important; }
#page-pvp .pvp-loader,
#page-pvp .pvp-loader-dot { display: none !important; }
#page-pvp .pvp-phase { display: none !important; }

/* Strip: compact phone row, no leftover wheel shadow */
#page-pvp .pvp-strip-wrap {
  position: relative;
  height: 112px;
  max-height: 112px;
  margin: 0 -14px 4px;
  width: calc(100% + 28px);
  overflow: hidden;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
#page-pvp .pvp-strip-glow,
#page-pvp .pvp-strip-glow::before {
  display: none !important;
  opacity: 0 !important;
  filter: none !important;
  background: none !important;
  box-shadow: none !important;
}
#page-pvp .pvp-strip-wrap.is-spinning .pvp-strip-glow::before { display: none !important; }
#page-pvp .pvp-strip-pointer {
  display: flex !important;
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  z-index: 30;
  width: 16px;
  margin-left: -8px;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
#page-pvp .pvp-strip-wrap.is-spinning .pvp-strip-pointer { display: flex !important; }
#page-pvp .pvp-strip-pointer span:first-child,
#page-pvp .pvp-strip-pointer span:last-child {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  filter: drop-shadow(0 0 8px rgba(180, 140, 255, 0.8));
}
#page-pvp .pvp-strip-pointer span:first-child { border-top: 10px solid #b48cff; }
#page-pvp .pvp-strip-pointer span:last-child { border-bottom: 10px solid #b48cff; }
#page-pvp .pvp-strip-pointer i {
  flex: 1;
  width: 2px;
  margin: -1px 0;
  background: linear-gradient(180deg, #b48cff 0%, rgba(180, 140, 255, 0.85) 100%);
  box-shadow: 0 0 12px rgba(180, 140, 255, 0.6);
}

#page-pvp .pvp-strip {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  padding: 10px 0;
  overflow: hidden;
  background: transparent !important;
}
#page-pvp .pvp-strip-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  width: max-content;
  height: auto;
  will-change: auto;
  backface-visibility: hidden;
  animation: none;
  transform: translate3d(0, 0, 0);
  transition: none;
}
#page-pvp .pvp-strip-unit {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding-right: 0;
}
#page-pvp .pvp-strip-track--spin {
  align-items: stretch;
  gap: 4px;
}

/* Seats: 80×full, gap 4, rounded-2xl, white/10, 4px top accent, ava 50 */
#page-pvp .pvp-seat {
  flex: 0 0 72px;
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  height: 100px;
  max-height: 100px;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px 4px;
  border: 0 !important;
  border-radius: 16px !important;
  border-top: 4px solid var(--pvp-accent, #8e52ff) !important;
  background: #1c1833 !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: hidden;
  margin: 0 !important;
  animation: none !important;
  transform: none;
}
#page-pvp .pvp-seat.is-hot,
#page-pvp .pvp-seat.is-win {
  background: #1c1833 !important;
  box-shadow: none !important;
  filter: none !important;
}
#page-pvp .pvp-seat--ghost {
  opacity: 0.45;
  border-top-color: rgba(255, 255, 255, 0.18) !important;
}
#page-pvp .pvp-seat-ava,
#page-pvp .pvp-seat .pvp-seat-ava {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
#page-pvp .pvp-seat-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#page-pvp .pvp-seat-name {
  max-width: 60px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
#page-pvp .pvp-seat-pct {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
#page-pvp .pvp-seat-bets {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 0;
}
#page-pvp .pvp-seat-gift,
#page-pvp .pvp-row-gift {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
#page-pvp .pvp-row-gift { width: 22px; height: 22px; flex-basis: 22px; border-radius: 7px; }
#page-pvp .pvp-seat-gift img,
#page-pvp .pvp-row-gift img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
#page-pvp .pvp-stars-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 6px;
  border-radius: 7px;
  color: #faf9f6;
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(142, 82, 255, 0.22), rgba(142, 82, 255, 0.1));
  border: 1.5px solid rgba(142, 82, 255, 0.4);
}
#page-pvp .pvp-player-bets .pvp-stars-chip {
  height: 22px;
  padding: 0 6px;
  font-size: 11px;
}
#page-pvp .pvp-gift-more {
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  font-weight: 700;
}
#page-pvp .pvp-kind-ico {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: #ffd36a;
}
#page-pvp .pvp-kind-ico--gift { color: #c9a8ff; }
#page-pvp .pvp-kind-ico svg { width: 14px; height: 14px; display: block; }
#page-pvp .pvp-kind-ico .tg-star { width: 12px; height: 12px; }

/* Players list — PvPPlayerRow: rounded-xl, white/10, 5px color bar, ava 50 */
#page-pvp .pvp-players-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 12px;
}
#page-pvp .pvp-players-head b {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
#page-pvp .pvp-players-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
}
#page-pvp .pvp-players-count svg { width: 16px; height: 16px; }
#page-pvp .pvp-player-list { display: grid; gap: 6px; }
#page-pvp .pvp-player-row {
  position: relative !important;
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 12px !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  transform: none !important;
}
#page-pvp .pvp-player-row::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--pvp-row-color, #8e52ff);
}
#page-pvp .pvp-player-row .pvp-list-avatar {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px;
  border: 1.5px solid var(--pvp-row-color, #8e52ff) !important;
  box-shadow: none !important;
}
#page-pvp .pvp-player-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#page-pvp .pvp-player-name {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#page-pvp .pvp-player-bets { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; }
#page-pvp .pvp-player-odds {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
#page-pvp .pvp-player-pct {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
#page-pvp .pvp-player-stake {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
}

#page-pvp.pvp-cosmos .pvp-player-row {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 0 !important;
}
#page-pvp.pvp-cosmos .pvp-players-count {
  color: #6b7280 !important;
}

@media (max-width: 390px) {
  #page-pvp .pvp-strip-wrap {
    margin-left: -11px;
    margin-right: -11px;
    width: calc(100% + 22px);
  }
}

/* v893 — compact phone PVP + gift chips (no star price for gift bets) */
#page-pvp.pvp-cosmos .pvp-shell { gap: 8px; }
#page-pvp .pvp-last {
  order: -1;
  padding: 0 4px 0;
}
#page-pvp .pvp-last::after { display: none !important; }
#page-pvp .pvp-hud {
  margin: 0 0 4px;
}
#page-pvp .pvp-strip-wrap {
  height: 112px !important;
  max-height: 112px !important;
  min-height: 0 !important;
  margin: 0 -14px 4px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
#page-pvp .pvp-strip {
  height: 112px !important;
  max-height: 112px !important;
  padding: 6px 0;
}
#page-pvp .pvp-strip-track,
#page-pvp .pvp-strip-unit {
  height: 100px !important;
  max-height: 100px !important;
  align-items: center;
}
#page-pvp .pvp-seat {
  height: 100px !important;
  max-height: 100px !important;
  min-height: 0 !important;
  padding: 4px 3px;
  gap: 2px;
  justify-content: center;
}
#page-pvp .pvp-seat-ava,
#page-pvp .pvp-seat .pvp-seat-ava {
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px;
}
#page-pvp .pvp-seat-bets { min-height: 0; max-height: 22px; }
#page-pvp .pvp-seat-gift {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border-radius: 7px;
}
#page-pvp .pvp-row-gift { width: 22px; height: 22px; flex-basis: 22px; }
#page-pvp .pvp-seat-gift svg,
#page-pvp .pvp-row-gift svg,
#page-pvp .pvp-seat-gift .pvp-kind-ico,
#page-pvp .pvp-row-gift .pvp-kind-ico {
  width: 22px;
  height: 22px;
}
#page-pvp .pvp-seat-gift[data-pvp-lottie] svg,
#page-pvp .pvp-row-gift[data-pvp-lottie] svg {
  width: 100%;
  height: 100%;
}
#page-pvp .pvp-bet-card,
#page-pvp .pvp-players-card { padding: 10px !important; }
#page-pvp .pvp-empty { min-height: 44px !important; }
#page-pvp .pvp-players-head { margin-bottom: 8px; }
#page-pvp .pvp-fair-chip { margin-top: 2px; }

/* Bottom of the viewport: keep indigo behind the dock — no black hole */
:root { --ink-2: #0c0824; }
html, body {
  background-color: #0c0824 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}
.app-shell,
.app-shell.home-cosmos {
  max-width: 100% !important;
  overflow-x: hidden !important;
  background: linear-gradient(180deg, #16103a 0%, #0c0824 52%, #0c0824 100%) !important;
}
.app-content {
  max-width: min(560px, 100%) !important;
  overflow-x: hidden !important;
}
.app-shell.home-cosmos .bg {
  background:
    radial-gradient(circle at 50% -8%, rgba(118, 82, 240, 0.22), transparent 38%),
    radial-gradient(circle at 90% 18%, rgba(90, 70, 200, 0.14), transparent 36%),
    linear-gradient(180deg, #16103a 0%, #0c0824 48%, #0c0824 100%) !important;
}
.bg:before,
.app-shell.home-cosmos .bg::before {
  background: linear-gradient(180deg, rgba(6, 4, 22, 0.32) 0%, transparent 40%, transparent 100%) !important;
}
.app-content {
  background-color: transparent;
}
#page-home.case-game-open {
  background: #0f1030 !important;
  margin-bottom: calc(-1 * (var(--nav-h) + 8px + var(--safe-bot)));
  padding-bottom: calc(var(--nav-h) + 40px + var(--safe-bot)) !important;
}
#homeCaseGame .other-prizes-panel {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Case open: one flat EasyGift layer. Kill the cosmic card that sat underneath. */
#page-home #homeCaseGame.home-case-game {
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 355px !important;
  width: 100% !important;
  overflow: hidden !important;
  isolation: auto !important;
  filter: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
#page-home #homeCaseGame.home-case-game::before,
#page-home #homeCaseGame.home-case-game::after {
  content: none !important;
  display: none !important;
  background: none !important;
  animation: none !important;
}
#page-home #homeCaseGame .case-roll {
  contain: none !important;
  transform: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
#page-home #homeCaseGame .case-prize-card,
#page-home #homeCaseGame .case-prize-main,
#page-home #homeCaseGame .other-prizes-panel {
  box-shadow: none !important;
}
#page-home #homeCaseGame .promo-case-bar,
#page-home #homeCaseGame .promo-case-mode-row,
#page-home #homeCaseGame .case-options,
#page-home #homeCaseGame .case-demo-row {
  max-width: none;
  padding-left: 0;
}

/* v937 — post-win flow (EasyGift logic, Mirava violet) */
#homeCaseGame .case-win-actions {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 10px;
}
#homeCaseGame.is-after-win .case-spin-button {
  display: none !important;
}
#homeCaseGame.is-after-win .case-win-actions:not(.is-hidden) {
  display: grid;
}
#homeCaseGame.is-after-win .case-win-actions.is-demo {
  grid-template-columns: 1fr;
}
#homeCaseGame .case-win-btn {
  min-height: 48px;
  padding: 12px 8px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #8b5cf6 !important;
  font-weight: 950;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
#homeCaseGame .case-win-btn:active {
  transform: scale(.985);
}

.sell-suggest-backdrop,
.mg-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2400;
  background: rgba(8, 4, 22, 0.86);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.sell-suggest-backdrop {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(10, 6, 22, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.sell-suggest-backdrop.show,
.mg-popup-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}
.mg-popup-backdrop {
  z-index: 2700;
  background: rgba(8, 4, 22, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.sell-suggest-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 2401;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, 520px);
  padding: 20px 20px calc(32px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-bottom: 0;
  background: linear-gradient(180deg, #2a1a3d 0%, #160c24 100%);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 110%);
  transition: transform .3s ease-out;
  pointer-events: none;
  text-align: center;
}
.sell-suggest-sheet.show {
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.sell-suggest-sheet.dragging {
  transition: none;
}
.sell-suggest-grabber {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  margin: 0 auto 12px;
  background: rgba(196, 176, 255, 0.28);
}
.sell-suggest-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(196, 176, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 1;
}
.sell-suggest-star {
  display: block;
  width: 100px;
  height: 100px;
  margin: -2px auto 10px;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(255, 196, 74, 0.35));
}
.sell-suggest-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 950;
  text-align: center;
  letter-spacing: -0.03em;
}
.sell-suggest-sub {
  margin: 0 0 24px;
  padding: 0 10px;
  color: rgba(196, 176, 255, 0.72);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}
.sell-suggest-cancel,
.sell-suggest-sell,
.sell-suggest-withdraw {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 16px 12px;
  font-size: 16px;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sell-suggest-cancel,
.sell-suggest-sell {
  margin-bottom: 8px;
  color: #fff;
  background: linear-gradient(180deg, #8e52ff 0%, #6534c4 100%);
}
.sell-suggest-sell .tg-star {
  width: 18px;
  height: 18px;
  margin: 0;
  filter: drop-shadow(0 1px 2px rgba(40, 8, 70, 0.35));
}
.sell-suggest-cancel:active,
.sell-suggest-sell:active,
.sell-suggest-withdraw:active {
  transform: scale(.98);
}
.sell-suggest-withdraw {
  color: rgba(176, 158, 214, 0.78);
  background: rgba(54, 40, 78, 0.92);
}

.mg-popup {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 50%;
  z-index: 2701;
  max-width: 340px;
  margin: 0 auto;
  padding: 18px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(22, 16, 36, 0.96);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  transform: translateY(-48%) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
  text-align: center;
}
.mg-popup.show {
  transform: translateY(-50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.mg-popup-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.03em;
}
.mg-popup-title:empty,
.mg-popup-title[hidden] {
  display: none;
}
.mg-popup-message {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-line;
  text-align: left;
}
.mg-popup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mg-popup.is-stack .mg-popup-actions {
  grid-template-columns: 1fr;
}
.mg-popup.is-stack .mg-popup-btn:first-child {
  border-radius: 14px;
  background: linear-gradient(180deg, #8e52ff 0%, #6534c4 100%);
}
.mg-popup-btn {
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  font-weight: 850;
}
.mg-popup-btn.is-danger {
  color: #ff6b7a;
  background: rgba(255, 255, 255, 0.05);
}

.star-tasks-overlay {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.star-tasks-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.star-tasks-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 24px 20px 20px;
  border-radius: 20px;
  background: #1b1733;
  border: 1px solid rgba(168, 85, 255, .16);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .45);
}
.star-tasks-close {
  position: absolute;
  top: 12px;
  right: 16px;
  padding: 4px 8px;
  border: 0;
  background: none;
  color: #9b8ec4;
  font-size: 20px;
  line-height: 1;
}
.star-tasks-title {
  margin: 0 0 4px;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  text-align: center;
  letter-spacing: -.03em;
}
.star-tasks-sub {
  margin: 0 0 20px;
  color: #9b8ec4;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}
.star-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 20px;
  overflow: hidden;
  border-radius: 14px;
  background: #261f45;
}
.star-task {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  border: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #261f45;
  cursor: pointer;
}
.star-task:active { background: #2f2654; }
.star-task.is-done { opacity: .72; cursor: default; }
.star-task.is-done:active { background: #261f45; }
.star-task.is-off { display: none !important; }
.star-task-ico {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.star-task-ico svg { display: block; }
.star-task-ico--share { background: #7c6cff; }
.star-task-ico--channel { background: #c084fc; }
.star-task-ico--chat { background: #6d5cff; }
.star-task-ico--visit { background: #d946ef; }
.star-task-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.star-task-name {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.star-task-desc {
  color: #9b8ec4;
  font-size: 11px;
  font-weight: 750;
}
.star-task-arrow {
  width: 24px;
  flex: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.star-task-chevron { color: #9b8ec4; font-size: 22px; line-height: 1; }
.star-task-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4caf50;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}
.star-task.is-done .star-task-chevron { display: none; }
.star-task:not(.is-done) .star-task-check { display: none; }
.star-tasks-done {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: #3d3758;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
}
.star-tasks-done.is-active {
  background: linear-gradient(180deg, #b57cff, #8b5cf6);
}
.star-tasks-done:disabled { opacity: .6; }

/* Admin stats dashboard — phone-first, never widen the Mini App */
#page-admin,
.admin-page,
.admin-pane,
.admin-card,
.admin-stats-body {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.admin-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
}
.admin-tab {
  flex: none;
  width: auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 32px;
  padding: 6px 3px;
  font-size: 11px;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
  overflow: hidden;
}
.admin-stats-periods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.admin-stats-periods .admin-save {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  font-size: 12px;
}
.admin-stats-periods .admin-save.active {
  color: #fff;
  border-color: rgba(139, 108, 255, 0.42);
  background: linear-gradient(135deg, rgba(139, 108, 255, 0.58), rgba(45, 156, 255, 0.38));
}
.admin-kpi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
#page-admin .admin-kpi-grid--users {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#page-admin .admin-kpi-grid--users > .admin-kpi:last-child {
  grid-column: auto;
}
.admin-kpi {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(144, 198, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.admin-kpi span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.admin-kpi b {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.admin-kpi small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.admin-kpi.is-hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(139, 108, 255, 0.16), rgba(45, 156, 255, 0.08));
}
.admin-stats-signed {
  display: inline;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.admin-stats-signed.is-plus,
.admin-kpi .is-plus { color: var(--mint); }
.admin-stats-signed.is-minus,
.admin-kpi .is-minus { color: var(--red); }
.admin-stats-subgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.admin-stats-mini {
  min-width: 0;
  max-width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(144, 198, 255, 0.10);
  background: rgba(0, 0, 0, 0.14);
  overflow: hidden;
}
.admin-stats-mini span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.admin-stats-mini b {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (min-width: 400px) {
  .admin-kpi-grid,
  .admin-stats-subgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-stats-periods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-kpi-grid > .admin-kpi:last-child:nth-child(even) {
    grid-column: 1 / -1;
  }
}
.admin-stats-chart {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  align-items: flex-end;
  min-height: 108px;
  padding: 4px 0 2px;
  scrollbar-width: thin;
}
.admin-stats-day {
  flex: 1 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 18px;
}
.admin-stats-bars {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 76px;
}
.admin-stats-bars i {
  width: 5px;
  border-radius: 2px 2px 0 0;
  display: block;
  min-height: 2px;
}
.admin-stats-bars .dep { background: #7cffc4; }
.admin-stats-bars .case { background: #8b6cff; }
.admin-stats-bars .bon { background: #ffd36b; }
.admin-stats-day span { font-size: 8px; color: var(--muted); font-weight: 800; }
.admin-stats-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.admin-stats-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}
.admin-stats-legend .dep { background: #7cffc4; }
.admin-stats-legend .case { background: #8b6cff; }
.admin-stats-legend .bon { background: #ffd36b; }
.admin-stats-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch;
}
.admin-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.admin-stats-table th,
.admin-stats-table td {
  padding: 7px 6px;
  border-bottom: 1px solid rgba(144, 198, 255, 0.10);
  text-align: left;
  white-space: nowrap;
  vertical-align: top;
}
.admin-stats-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.admin-stats-table td:last-child,
.admin-stats-table th:last-child { text-align: right; }
.admin-stats-h {
  margin: 12px 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.admin-stats-name { font-weight: 900; }
.admin-stats-uid {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-family: var(--mono);
}
#admin-pane-players,
#admin-pane-promos,
#admin-pane-broadcast {
  overflow-x: hidden;
  max-width: 100%;
}
.admin-player-row,
.admin-promo-row,
.admin-broadcast-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  margin-top: 8px;
  border-radius: 11px;
  border: 1px solid rgba(144, 198, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  width: 100%;
  color: inherit;
  font: inherit;
}
.admin-player-row { cursor: pointer; }
.admin-player-row.is-active,
.admin-broadcast-audience .admin-save.active {
  color: #fff;
  border-color: rgba(139, 108, 255, 0.42);
  background: linear-gradient(135deg, rgba(139, 108, 255, 0.58), rgba(45, 156, 255, 0.38));
}
.admin-player-row b,
.admin-promo-row b { font-weight: 950; }
.admin-player-meta,
.admin-promo-meta,
.admin-broadcast-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.admin-broadcast-text {
  min-height: 110px;
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.35;
  white-space: pre-wrap;
}
.admin-broadcast-progress {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.profile-admin-btn {
  display: none !important;
}

.case-demo-row { display: none !important; }
#page-panel { padding-bottom: 8px; }
#page-panel .creator-page {
  display: grid;
  gap: 14px;
  padding: 0 0 8px;
  overflow: visible;
}
#page-panel #panelBody {
  display: grid;
  gap: 14px;
}
#page-panel #panelBody[hidden] {
  display: none !important;
}
#page-panel .creator-page .admin-card {
  padding: 14px;
  overflow: visible;
}
#page-panel .kicker {
  margin: 0 0 4px;
  letter-spacing: 2.2px;
}
#page-panel h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
#page-panel .section-title { margin: 0 0 8px; }
#page-panel .admin-note {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
}
#page-panel .creator-hero .admin-note { margin-bottom: 12px; }
#page-panel .admin-note + .admin-field,
#page-panel .admin-note + .creator-2col,
#page-panel .admin-note + .creator-switch { margin-top: 10px; }
#page-panel .creator-switch {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  border-radius: 12px;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
#page-panel .creator-switch.active {
  border-color: rgba(167, 139, 250, 0.5);
  color: #efe7ff;
  background: linear-gradient(180deg, rgba(129, 83, 242, 0.28), rgba(90, 47, 214, 0.16));
}
#page-panel .creator-switch.active .case-switch-knob {
  background: rgba(180, 140, 255, 0.7);
}
#page-panel .creator-demo-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}
#page-panel .creator-star-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 0;
}
#page-panel .creator-star-chips button {
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(110, 74, 230, 0.14);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}
#page-panel .creator-add-row,
#page-panel .creator-actions,
#page-panel .creator-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
#page-panel .creator-add-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
#page-panel .creator-add-row .admin-save {
  padding: 0 14px;
  white-space: nowrap;
}
#page-panel .creator-add-row .admin-input,
#page-panel .creator-actions .admin-save,
#page-panel .creator-actions .admin-delete {
  width: 100%;
}
#page-panel .creator-force-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  min-height: 0;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  background: rgba(255, 255, 255, 0.04);
}
#page-panel .creator-force-preview:empty { display: none; }
#page-panel .creator-force-preview .thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: grid;
  place-items: center;
}
#page-panel .creator-force-preview .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#page-panel .creator-force-preview .meta b {
  display: block;
  font-size: 13px;
  font-weight: 900;
}
#page-panel .creator-force-preview .meta span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
}
#page-panel #panelStatus {
  margin-top: 2px;
  min-height: 16px;
}
@media (max-width: 360px) {
  #page-panel .creator-star-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
#panelUpgradeWinToggle.active,
#panelRocketCrashSave {
  border-color: rgba(167, 139, 250, 0.45);
}

/* LIVE strip — violet, matches Mirava branding */
.live-gift-card,
#page-home .live-gift-card,
#page-upgrade .live-gift-card,
#page-pvp .live-gift-card {
  border-color: rgba(186, 164, 255, 0.38) !important;
  background:
    radial-gradient(120% 160% at 8% -20%, rgba(186, 164, 255, 0.34), transparent 48%),
    radial-gradient(130% 170% at 100% 120%, rgba(129, 83, 242, 0.32), transparent 54%),
    linear-gradient(180deg, rgba(62, 36, 128, 0.96), rgba(24, 12, 56, 0.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 22px rgba(129, 83, 242, 0.22),
    0 10px 24px rgba(18, 6, 48, 0.42) !important;
}

#page-home .live-gift-card::before,
#page-upgrade .live-gift-card::before,
#page-pvp .live-gift-card::before {
  background-image:
    radial-gradient(1.5px 1.5px at 16% 28%, rgba(255, 240, 255, 0.95), transparent),
    radial-gradient(1.2px 1.2px at 58% 66%, rgba(216, 180, 255, 0.85), transparent),
    radial-gradient(1px 1px at 82% 22%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.3px 1.3px at 40% 82%, rgba(196, 164, 255, 0.72), transparent),
    radial-gradient(1px 1px at 28% 56%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.1px 1.1px at 72% 44%, rgba(232, 210, 255, 0.66), transparent),
    radial-gradient(1px 1px at 92% 74%, rgba(186, 164, 255, 0.6), transparent);
}

.live-gift-live,
#page-home .live-gift-live,
#page-upgrade .live-gift-live,
#page-pvp .live-gift-live {
  background: linear-gradient(180deg, #f6eeff, #d4b8ff 55%, #b48cff) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  filter: drop-shadow(0 0 6px rgba(180, 140, 255, 0.78)) !important;
}

.live-gift-dot {
  background: radial-gradient(circle at 35% 30%, #f3e8ff, #b48cff 58%, #7c4dff) !important;
  box-shadow: 0 0 8px rgba(180, 140, 255, 0.95), 0 0 16px rgba(124, 77, 255, 0.55) !important;
}

#page-home .live-gift-slot,
#page-upgrade .live-gift-slot,
#page-pvp .live-gift-slot,
.live-gift-slot {
  border-color: rgba(186, 164, 255, 0.28) !important;
  background: linear-gradient(180deg, rgba(78, 52, 138, 0.88), rgba(36, 20, 78, 0.94)) !important;
}

.live-gift-slot.live-new {
  box-shadow: 0 0 0 1px rgba(186, 164, 255, 0.5), 0 0 22px rgba(129, 83, 242, 0.32) !important;
}

.app-toast {
  position: fixed;
  left: 50%;
  z-index: 140;
  pointer-events: none;
  bottom: calc(56px + max(16px, calc(var(--safe-bot, 0px) + 10px)) + 12px);
  transform: translateX(-50%) translateY(10px);
  min-width: 118px;
  max-width: min(78vw, 240px);
  padding: 10px 18px;
  border-radius: 999px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: .02em;
  color: #f6f0ff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)), rgba(38, 24, 72, .82);
  border: 1px solid rgba(186, 164, 255, .32);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .38);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.app-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* v1019 — catalog chest neon, cheap paint: gradients only, no blur/blend/pulse */
#page-home .case-shop-card--catalog,
#page-home .case-shop-card--catalog[data-open-case="daily"],
.admin-case-preview-stage .case-shop-card--catalog {
  --case-glow: color-mix(in srgb, var(--case-accent, #8b5cf6) 28%, transparent);
  contain: layout paint;
  border-color: color-mix(in srgb, var(--case-accent, #8b5cf6) 38%, var(--line)) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

#page-home .case-shop-card--catalog .case-shop-card__visual,
#page-home .case-shop-card--catalog[data-open-case="daily"] .case-shop-card__visual,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__visual {
  background:
    radial-gradient(ellipse 70% 52% at 50% 58%, color-mix(in srgb, var(--case-accent, #8b5cf6) 46%, transparent), transparent 68%),
    radial-gradient(ellipse 108% 82% at 50% 78%, color-mix(in srgb, var(--case-accent, #8b5cf6) 22%, transparent), transparent 76%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(8, 6, 22, 0.12)) !important;
}

#page-home .case-shop-card--catalog .case-shop-card__visual::before,
#page-home .case-shop-card--catalog[data-open-case="daily"] .case-shop-card__visual::before,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__visual::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: 18% 16% 22%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 68%,
    color-mix(in srgb, var(--case-accent, #8b5cf6) 58%, transparent),
    transparent 72%
  ) !important;
  filter: none;
  mix-blend-mode: normal;
  animation: none;
}

#page-home .case-shop-card--catalog .case-shop-card__visual::after,
#page-home .case-shop-card--catalog[data-open-case="daily"] .case-shop-card__visual::after,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__visual::after {
  content: none !important;
  display: none !important;
}

#page-home .case-shop-card--catalog .case-shop-card__img,
#page-home .case-shop-card--catalog[data-open-case="daily"] .case-shop-card__img,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__img {
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28)) !important;
}

#page-home .case-shop-card--catalog .case-shop-card__flake {
  will-change: auto !important;
  filter: none !important;
}

#page-home:not(.active) .case-shop-card__flake,
#page-home.case-game-open .case-shop-card__flake,
#homeCaseLobby.is-hidden .case-shop-card__flake {
  animation: none !important;
}

/* v1023 title stickers — fixed left/right of case name */
#page-home .case-shop-card--catalog .case-shop-card__head,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__head {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  align-items: center;
  justify-content: stretch;
  gap: 4px 6px;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

#page-home .case-shop-card--catalog .case-shop-card__head .case-shop-card__title,
.admin-case-preview-stage .case-shop-card--catalog .case-shop-card__head .case-shop-card__title {
  width: auto !important;
  flex: none !important;
  min-width: 0;
  text-align: center;
}

.case-shop-card__title-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  pointer-events: none;
  flex: none;
}

.case-shop-card__title-mark-media,
.case-shop-card__title-mark-emoji {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  line-height: 1;
  font-size: 16px;
}

.case-shop-card__title-mark img,
.case-shop-card__title-mark video,
.case-shop-card__title-mark .case-particle-lottie,
.case-shop-card__title-mark .case-particle-lottie svg,
.case-shop-card__title-mark .case-particle-lottie canvas {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain;
}

/* v1028 upgrade wins: purple Mirava, not rocket mint/blue */
#page-upgrade .upgrade-status.is-hidden {
  display: none !important;
}

#page-upgrade .upgrade-wins,
#page-upgrade .upgrade-wins.rocket-players-card {
  margin: 8px 0 4px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(142, 82, 255, 0.28) !important;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(142, 82, 255, 0.16), transparent 55%),
    linear-gradient(165deg, rgba(19, 17, 57, 0.96), rgba(10, 8, 47, 0.98)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 26px rgba(4, 2, 14, 0.34);
}

#page-upgrade .upgrade-wins .pvp-players-head {
  margin-bottom: 10px;
}

#page-upgrade .upgrade-wins .pvp-players-head b {
  color: #efe7ff;
}

#page-upgrade .upgrade-wins .pvp-players-head span {
  color: rgba(201, 168, 255, 0.72);
}

#page-upgrade .upgrade-wins .rocket-player-row,
#page-upgrade .upgrade-wins .rocket-player-row.cashed {
  border-color: rgba(142, 82, 255, 0.24) !important;
  background: linear-gradient(180deg, rgba(142, 82, 255, 0.16), rgba(12, 6, 32, 0.5)) !important;
  box-shadow: inset 0 1px 0 rgba(201, 168, 255, 0.08);
}

#page-upgrade .upgrade-wins .rocket-player-avatar {
  color: #efe7ff !important;
  background: radial-gradient(circle at 50% 22%, rgba(204, 157, 245, 0.28), rgba(89, 60, 166, 0.34)) !important;
  border-color: rgba(201, 168, 255, 0.28) !important;
}

#page-upgrade .upgrade-wins .rocket-player-name {
  color: #f4f0ff !important;
}

#page-upgrade .upgrade-wins .rocket-player-meta {
  color: rgba(201, 168, 255, 0.7) !important;
}

#page-upgrade .upgrade-wins .rocket-player-stake {
  color: #ffe4a8;
}

#page-upgrade .upgrade-wins .rocket-player-stake small {
  color: var(--upgrade-violet-soft, #c9a8ff) !important;
}

#page-upgrade .upgrade-wins .pvp-empty {
  min-height: 56px;
  border-color: rgba(142, 82, 255, 0.22) !important;
  color: rgba(201, 168, 255, 0.55) !important;
  background: rgba(12, 6, 32, 0.4) !important;
}

#page-upgrade .upgrade-wins-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 8px;
}

#page-upgrade .upgrade-wins-page-btn {
  width: 36px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(142, 82, 255, 0.28);
  background: rgba(18, 8, 36, 0.75);
  color: #efe7ff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

#page-upgrade .upgrade-wins-page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

#page-upgrade .upgrade-wins-pager span {
  min-width: 64px;
  text-align: center;
  color: rgba(201, 168, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
