:root {
  --bg: #08060a;
  --sheet: #121014;
  --card: #1a161a;
  --line: rgba(255, 255, 255, 0.08);
  --red: #e30613;
  --red-2: #ff3350;
  --red-d: #8e0b18;
  --text: #f5f5f7;
  --muted: #9a9aa3;
  --ok: #22c55e;
  --gold: #f5c14a;
  --radius: 22px;
  --safe-b: 86px;
  --theme:
    radial-gradient(120% 70% at 88% -8%, rgba(227, 6, 19, 0.46), transparent 52%),
    radial-gradient(90% 46% at 6% 108%, rgba(72, 8, 18, 0.62), transparent 52%),
    radial-gradient(70% 40% at 50% 40%, rgba(227, 6, 19, 0.08), transparent 70%),
    linear-gradient(168deg, #1c0a10 0%, #0a0608 42%, #050506 100%);
  --theme-grid:
    linear-gradient(rgba(255, 51, 80, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 51, 80, 0.07) 1px, transparent 1px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
img { max-width: 100%; display: block; }
.hidden, [hidden] { display: none !important; }

body {
  font-family: "Outfit", system-ui, sans-serif;
  background: #050506;
  color: var(--text);
}

.stage {
  height: 100dvh;
  display: grid;
  place-items: center;
  background: var(--theme), #050506;
  padding: 12px;
  overflow: hidden;
}

.phone {
  position: relative;
  width: min(390px, 100%, calc((100dvh - 24px) * 390 / 844));
  aspect-ratio: 390 / 844;
  height: auto;
  max-height: calc(100dvh - 24px);
  background: var(--theme);
  border-radius: 42px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 43, 69, 0.18),
    0 30px 80px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.phone::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--theme-grid);
  background-size: 32px 32px;
  opacity: 0.55;
  mask-image: radial-gradient(130% 90% at 70% 0%, #000 10%, transparent 72%);
}

.notch {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 118px; height: 22px;
  background: #000;
  border-radius: 16px;
  z-index: 50;
}

/* Splash */
.splash {
  position: absolute; inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: #070708;
  overflow: hidden;
}
.splash.is-done {
  animation: fadeSplash 0.4s ease forwards;
  pointer-events: none;
}
.splash-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 16px;
  gap: 10px;
}
.splash-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.splash-brand .logo-badge {
  width: 108px;
  height: 108px;
  animation: logoGlow 2.2s ease-in-out infinite;
}
.splash-logo {
  width: 124px;
  height: auto;
  object-fit: contain;
  background: none;
  border-radius: 0;
  animation: logoGlow 2.2s ease-in-out infinite;
}
.splash-wordmark {
  width: min(236px, 78%);
  height: auto;
  margin-top: -4px;
  mix-blend-mode: normal;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.45));
}
.splash-brand .logo-type {
  align-items: center;
  text-align: center;
}
.splash-brand .logo-type b {
  font-size: 26px;
  letter-spacing: 0.2em;
  padding-left: 0.2em;
  line-height: 1.1;
  white-space: nowrap;
}
.splash-brand .logo-type small {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  line-height: 1.2;
  white-space: nowrap;
}
.splash-art-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--theme);
}
.splash-art-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--theme-grid);
  background-size: 32px 32px;
  opacity: 0.4;
  mask-image: radial-gradient(120% 80% at 50% 40%, #000 0%, transparent 70%);
}
.splash-art-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(8,6,10,.1) 0%, rgba(8,6,10,.42) 58%, rgba(8,6,10,.78) 100%);
  pointer-events: none;
}
.splash-art { display: none; }
.logo-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-badge {
  width: 40px; height: 40px;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(200,30,58,.45));
  flex: none;
}
.logo-badge.sm {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
}
.logo-round {
  width: 52px;
  height: 52px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  flex: none;
  box-shadow: none;
}
.brand-word {
  height: 36px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  mix-blend-mode: screen;
}
.logo-type {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}
.logo-type b {
  font-family: Orbitron, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  white-space: nowrap;
}
.logo-type small {
  display: block;
  margin-top: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,.78);
  white-space: nowrap;
}
.splash-bar {
  width: 120px; height: 3px; margin: 0 auto;
  background: #2a2a2e; border-radius: 99px; overflow: hidden;
}
.splash-bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--red-d), var(--red-2));
  animation: load 1.5s ease forwards;
}
@keyframes load { to { width: 100%; } }
@keyframes fadeSplash {
  to { opacity: 0; visibility: hidden; }
}
@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 6px 12px rgba(200,30,58,.4)); transform: translateY(0); }
  50% { filter: drop-shadow(0 10px 22px rgba(255,43,69,.7)); transform: translateY(-4px); }
}

.app { height: 100%; position: relative; z-index: 1; }

.screen {
  display: none;
  height: 100%;
  overflow: auto;
  padding-bottom: var(--safe-b);
  background: transparent;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.active { display: block; }
.screen.active[data-screen="home"] {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, transparent 32%, rgba(0,0,0,.42) 100%);
}

/* Home top card */
.home-top {
  position: relative;
  flex: none;
  z-index: 6;
  overflow: hidden;
  margin: 0;
  min-height: 0;
  padding-bottom: 12px;
  border-radius: 0 0 28px 28px;
  background: #070708;
}
.home-banners {
  position: relative;
  z-index: 1;
  margin: 0 12px 2px;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
}
.home-banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s ease;
  will-change: transform;
}
.home-banner-track .banner-slide,
.home-banner-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  display: block;
}
.home-banner-track img {
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
.home-banner-track .banner-slide.is-link { cursor: pointer; }
.home-banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.home-banner-dots button {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: rgba(255,255,255,.4);
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.home-banner-dots button.on {
  width: 18px;
  background: #fff;
}

.store-head {
  flex: none;
  padding: 34px 12px 10px;
  background: transparent;
  z-index: 6;
}
.head-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 7px 8px 7px 8px;
  border-radius: 20px;
  background: rgba(10, 8, 12, 0.72);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 8px 22px rgba(0,0,0,.28);
}
.head-split {
  width: 1px;
  height: 36px;
  flex: none;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.28), transparent);
}
.store-head .fx {
  background: rgba(0,0,0,.45);
}
.round-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.round-btn:hover, .round-btn:active {
  background: rgba(255,255,255,.08);
}
.round-btn svg { width: 22px; height: 22px; }
.home-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 16px calc(var(--safe-b) + 12px);
  scrollbar-width: none;
}
.home-scroll::-webkit-scrollbar { display: none; }
.price-line {
  color: #8d8d96;
  font-size: 12px;
  margin: 2px 0 12px;
}
.home-scroll .home-banners {
  margin: 0 0 16px;
  aspect-ratio: 2 / 1;
}
.home-cta h2 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}
.home-cta h2 span { color: var(--red); }
.home-cta p {
  color: #8d8d96;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 14px;
}
.cta-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.btn-red, .btn-ghost {
  height: 44px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 18px rgba(227,6,19,.35);
}
.btn-red svg { width: 14px; height: 14px; }
.btn-ghost {
  background: rgba(26,26,30,.72);
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
}
.float-spin {
  position: absolute;
  right: 12px;
  bottom: calc(var(--safe-b) + 14px);
  z-index: 18;
  width: 56px;
  touch-action: none;
  user-select: none;
  cursor: grab;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.5));
}
.float-spin:active { cursor: grabbing; }
.float-spin-stage {
  position: relative;
  width: 56px;
  height: 56px;
}
.float-spin canvas {
  width: 56px;
  height: 56px;
  display: block;
  border-radius: 50%;
}
.float-spin em {
  display: block;
  width: max-content;
  margin: 3px auto 0;
  padding: 1px 6px;
  border-radius: 99px;
  font-style: normal;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .03em;
  color: #fff;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.16);
}
.pointer.sm {
  top: -1px;
  border-left-width: 5px;
  border-right-width: 5px;
  border-top-width: 8px;
}

.xchg-card {
  background: rgba(18,18,22,.78);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}
.xchg-head h4 { font-size: 16px; font-weight: 800; }
.xchg-head small { color: var(--muted); font-size: 12px; }
.xchg-rate {
  margin: 10px 0 12px;
  font-size: 13px;
  color: #cfcfd6;
}
.xchg-rate b { color: var(--red-2); }
.xchg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 14px;
  background: #0e0e12;
  border: 1px solid var(--line);
}
.xchg-tabs button {
  padding: 8px 6px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.xchg-tabs button.on { background: var(--red); color: #fff; }
.xchg-out {
  margin: 10px 0 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(227,6,19,.12);
  border: 1px solid rgba(255,43,69,.25);
}
.xchg-out small { display: block; color: var(--muted); font-size: 11px; }
.xchg-out strong { display: block; margin-top: 4px; font-size: 22px; }
.xchg-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.sec-block { margin-top: 4px; }
.sec-copy { margin-bottom: 12px; }
.sec-copy h3 { font-size: 20px; font-weight: 800; }
.sec-copy p { color: #8d8d96; font-size: 12px; margin-top: 3px; }
.packs-grid, .games {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gtile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 22px rgba(0,0,0,.28);
}
.gtile .glogo, .gtile .gmark {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.gtile .gmark {
  display: grid;
  place-items: center;
}
.gtile .gmark .poster {
  position: relative;
  width: 86%;
  height: 70%;
  inset: auto;
}
.gtile.iconish .glogo {
  object-fit: contain;
  padding: 24%;
  background: rgba(0,0,0,.2);
}
.gtile .glogo-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  max-width: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.25);
  background: #111;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
.gtile .tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 9px;
  font-weight: 800;
  font-style: normal;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
}
.gtile span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 10px 10px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.82));
  font-size: 12px;
  font-weight: 700;
}
.pcard {
  background: rgba(20, 20, 22, 0.82);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.pcard .cover {
  height: 92px;
  position: relative;
  overflow: hidden;
}
.pcard .cover .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pcard .off, .pcard .pop {
  position: absolute;
  top: 8px;
  z-index: 2;
  font-size: 9px;
  font-weight: 800;
  font-style: normal;
  letter-spacing: .04em;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
}
.pcard .off { left: 8px; }
.pcard .pop { right: 8px; }
.pcard .meta { padding: 10px; }
.pcard .gname {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #8d8d96;
  margin-bottom: 3px;
}
.pcard h4 {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
}
.pcard .pr {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}
.pcard .now {
  display: block;
  color: var(--red);
  font-size: 16px;
  font-weight: 800;
}
.pcard .old {
  display: block;
  color: #6e6e78;
  font-size: 11px;
  text-decoration: line-through;
}
.pcard .tu {
  flex: none;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pcard .tu svg { width: 10px; height: 10px; }
.profile-top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(90deg, #163a8a, #e11d3a 32%, #ff2b45 50%, #e11d3a 68%, #163a8a);
  box-shadow: 0 0 14px rgba(255, 43, 69, 0.45);
}
.hero {
  position: relative;
  z-index: 1;
  padding: 40px 14px 10px;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(1.1);
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,8,10,.45) 0%, rgba(8,8,10,.2) 42%, rgba(8,8,10,.72) 100%),
    radial-gradient(420px 160px at 18% 100%, rgba(22, 58, 138, 0.28), transparent 62%),
    radial-gradient(500px 180px at 80% 0%, rgba(200,30,58,.38), transparent 60%);
}

.topbar, .profile-row, .brand { position: relative; z-index: 1; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
  overflow: hidden;
}
.logo-round {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 4px 10px rgba(227,6,19,.4));
}
.brand-word {
  height: 36px;
  width: auto;
  max-width: min(230px, 58vw);
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: screen;
  flex: none;
}
.top-actions {
  display: flex;
  gap: 0;
  align-items: center;
  flex: 0 0 auto;
}
.fx {
  display: flex;
  padding: 2px;
  border-radius: 999px;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.14);
}
.fx button {
  padding: 5px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .03em;
  color: #b8b8c0;
  line-height: 1;
}
.fx button.on {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 10px rgba(200,30,58,.35);
}
.icon-btn {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 11px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  color: #fff;
  display: grid; place-items: center;
  flex: none;
}
.icon-btn svg { width: 18px; height: 18px; }
.badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 99px; background: var(--red-2);
  font-size: 9px; font-style: normal; line-height: 14px; font-weight: 700;
}
.dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red-2); box-shadow: 0 0 0 2px #1a0a0e;
}

.profile-row {
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.profile-top {
  padding: 40px 12px 16px;
  min-height: 0;
}
.profile-top .profile-row { margin-top: 0; }
.profile-top .quick { padding-top: 16px; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(145deg, #3a3a44, #1a1a22);
  border: 2px solid rgba(255,255,255,.35);
  font-weight: 800; letter-spacing: .04em;
  position: relative;
  display: grid; place-items: center;
  flex: none;
}
.avatar.lg {
  width: 84px;
  height: 84px;
  font-size: 28px;
  margin: 0 auto 10px;
  cursor: pointer;
}
.avatar-ini { pointer-events: none; }
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar.has-photo .avatar-ini { display: none; }
.avatar-cam {
  position: absolute;
  left: -2px;
  bottom: -2px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  border: 2px solid #1a0d10;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.avatar-cam svg { width: 12px; height: 12px; }
.verified {
  position: absolute; right: -1px; bottom: -1px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M6.5 10.6 3.9 8l-.9.9 3.5 3.5 7-7-.9-.9z'/%3E%3C/svg%3E") center / 12px no-repeat;
  border: 2px solid #1a0d10;
}
.who { min-width: 0; }
.who h2 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 5px;
}
.who .fx { margin-top: 7px; }
.fx-sm button { padding: 4px 8px; font-size: 9px; }
.balance {
  display: flex; align-items: center; gap: 6px;
  color: #ececf1;
  line-height: 1.2;
}
.balance b { font-size: 12px; font-weight: 600; white-space: nowrap; }
.balance svg { width: 15px; height: 15px; opacity: .85; flex: none; }

.cs-mini {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
}
.cs-mini .cs-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(227,6,19,.4);
}
.cs-mini .cs-ico svg { width: 16px; height: 16px; }
.cs-mini .online {
  position: absolute;
  right: 1px;
  bottom: 1px;
  margin: 0;
  width: 9px;
  height: 9px;
  border: 2px solid #1a0d10;
}

.fx-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(18,18,22,.72);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
}
.fx-bar > span {
  font-size: 12px;
  font-weight: 700;
  color: #cfcfd6;
}

.profile-wrap {
  padding: 28px 16px calc(var(--safe-b) + 12px);
}
.profile-card {
  position: relative;
  text-align: center;
  padding: 22px 14px 16px;
  border-radius: 22px;
  background: rgba(14,14,18,.72);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(14px);
  margin-bottom: 14px;
}
.profile-card .cs-mini {
  position: absolute;
  top: 12px;
  right: 12px;
}
.profile-card .avatar.lg {
  margin: 4px auto 10px;
}
.profile-card h2 {
  font-size: 20px;
  margin-bottom: 6px;
}
.profile-card .balance {
  justify-content: center;
  margin: 0 auto 10px;
  color: #fff;
}
.profile-card .balance b { font-size: 14px; }
.profile-card .fx {
  justify-content: center;
  width: fit-content;
  margin: 0 auto 14px;
}
.profile-card .quick {
  padding: 8px 0 0;
}

.cs-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  background: rgba(18,18,22,.72);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  text-align: left;
  max-width: 138px;
  min-width: 0;
}
.cs-ico {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--red);
  display: grid; place-items: center; flex: none;
}
.cs-ico svg { width: 14px; height: 14px; }
.cs-chip small {
  display: block;
  font-size: 9px;
  line-height: 1.25;
  color: var(--muted);
  letter-spacing: 0;
  white-space: nowrap;
}
.cs-chip strong {
  display: block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2px;
  white-space: nowrap;
}
.online {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 8px var(--ok);
  align-self: flex-start; margin-top: 4px;
}

/* Quick actions + sheet */
.quick {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 0;
  padding: 8px 10px 8px;
}
.quick button, .quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: #e8e8ee;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
}
.q-ico {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: #0e0e12;
  border: 1.6px solid var(--red);
  box-shadow: 0 0 0 4px rgba(200,30,58,.08), inset 0 0 12px rgba(200,30,58,.12);
  color: var(--red-2);
  transition: transform .22s ease, box-shadow .22s ease;
}
.q-ico svg { width: 22px; height: 22px; animation: iconWiggle 2.6s ease-in-out infinite; }
.quick > :nth-child(2) .q-ico svg { animation-delay: .25s; }
.quick > :nth-child(3) .q-ico svg { animation-delay: .5s; }
.quick > :nth-child(4) .q-ico svg { animation-delay: .75s; }
.quick button:hover .q-ico, .quick a:hover .q-ico,
.quick button:active .q-ico, .quick a:active .q-ico {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 20px rgba(200,30,58,.4), 0 0 0 4px rgba(200,30,58,.12);
}

.sheet {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-top: -16px;
  background: #1c1c22;
  border-radius: 0;
  padding: 22px 16px calc(var(--safe-b) + 12px);
  box-shadow: none;
  scrollbar-width: none;
}
.sheet::-webkit-scrollbar { display: none; }

.search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: rgba(12,12,16,.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  height: 44px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}
.search-wrap svg { width: 18px; height: 18px; color: var(--red-2); flex: none; }
.search-wrap input {
  flex: 1; background: none; border: 0; outline: 0;
  color: var(--text);
}
.search-wrap input::placeholder { color: #6e6e78; }

.sec-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.sec-head h3 { font-size: 18px; font-weight: 800; }
.see { color: var(--red-2); font-size: 13px; font-weight: 600; }

.games {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gcard {
  position: relative;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  text-align: left;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  cursor: pointer;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.gcard .cover {
  height: 128px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  transition: transform .35s ease;
}
.poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.35));
  animation: iconFloat 2.8s ease-in-out infinite;
  transform-origin: center 60%;
  z-index: 1;
}
.gcard:nth-child(2) .poster { animation-delay: .35s; }
.gcard:nth-child(3) .poster { animation-delay: .7s; }
.gcard:nth-child(4) .poster { animation-delay: 1.05s; }
.gcard:nth-child(5) .poster { animation-delay: .2s; }
.gcard:nth-child(6) .poster { animation-delay: .55s; }
.gcard:hover, .gcard:active {
  transform: translateY(-7px) scale(1.03);
  border-color: rgba(255,43,69,.5);
  box-shadow: 0 18px 36px rgba(200,30,58,.32);
  z-index: 2;
}
.gcard:hover .cover, .gcard:active .cover { transform: scale(1.08); }
.gcard:hover .poster, .gcard:active .poster {
  animation: iconPop .55s ease forwards;
}
.gcard:hover .go, .gcard:active .go {
  transform: translateX(3px) scale(1.08);
}
.go { transition: transform .2s ease; }
.gcard .cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55));
}
.gcard .tag {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  font-size: 9px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 7px; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff;
}
.gcard .meta { padding: 8px 10px 10px; }
.gcard h4 { font-size: 13px; font-weight: 700; line-height: 1.25; }
.buyrow {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px;
}
.buyrow span { font-size: 11px; color: var(--muted); font-weight: 600; }
.go {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--red);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(200,30,58,.45);
}
.go svg { width: 14px; height: 14px; }

@keyframes pulse {
  50% { transform: scale(1.06); }
}
@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg) scale(1); }
  50% { transform: translateY(-8px) rotate(3deg) scale(1.07); }
}
@keyframes iconPop {
  0% { transform: translateY(0) rotate(0) scale(1); }
  40% { transform: translateY(-10px) rotate(-10deg) scale(1.18); }
  100% { transform: translateY(-4px) rotate(4deg) scale(1.1); }
}
@keyframes iconWiggle {
  0%, 100% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-12deg) scale(1.08); }
  60% { transform: rotate(10deg) scale(1.05); }
}

/* Sub screens */
.subhead {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 38px 14px 12px;
  background: rgba(8,8,10,.45);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.subhead h3 { font-size: 16px; font-weight: 700; }
.subhead.root {
  grid-template-columns: 1fr auto;
  padding-left: 16px;
  padding-right: 16px;
}
.subhead.root h3 { text-align: left; }
.back {
  width: 36px; height: 36px; border-radius: 12px;
  background: #1c1c22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M15 5 8 12l7 7' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 18px;
}
.back.light { background-color: rgba(0,0,0,.35); position: absolute; top: 38px; left: 14px; }
.live {
  font-size: 10px; color: var(--ok); font-weight: 700;
  justify-self: end;
}

.pad { padding: 16px 16px 8px; }
.chips { display: flex; gap: 8px; overflow: auto; padding-bottom: 12px; }
.chips button {
  flex: none; padding: 7px 12px; border-radius: 999px;
  background: #1c1c22; font-size: 12px; font-weight: 600; color: #cfcfd6;
  border: 1px solid var(--line);
}
.chips button.on { background: var(--red); color: #fff; border-color: transparent; }

.game-hero {
  height: 148px;
  background: #1a1a22 center / cover no-repeat;
  position: relative;
  display: flex; align-items: flex-end;
}
.game-hero-copy {
  position: relative; z-index: 1;
  padding: 16px 16px 18px;
  width: 100%;
  background: linear-gradient(180deg, transparent, rgba(7,7,8,.92));
}
.game-hero-copy p { font-size: 11px; color: var(--red-2); font-weight: 700; letter-spacing: .12em; }
.game-hero-copy h3 { font-size: 22px; }

.field { display: block; margin-bottom: 10px; position: relative; }
.field-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; min-height: 16px; }
.field-top > span { display: block; font-size: 12px; color: var(--muted); margin: 0; }
.field > span:not(.field-top) { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; height: 44px; padding: 0 14px;
  border-radius: 14px; border: 1px solid var(--line);
  background: #0e0e12; outline: 0;
}
.ids { display: grid; grid-template-columns: 1fr; gap: 8px; }
.ids.one-col { grid-template-columns: 1fr; }
.recent-link {
  background: none; border: 0; padding: 0;
  color: var(--red-2); font-size: 12px; font-weight: 700;
  cursor: pointer; line-height: 1;
}
.recent-link[hidden] { display: none; }
.recent-pop {
  position: absolute; right: 0; top: 22px;
  z-index: 12; width: min(210px, 70vw);
  max-height: 160px; overflow-y: auto;
  padding: 4px; border-radius: 10px;
  border: 1px solid var(--line); background: #141418;
  box-shadow: 0 8px 20px rgba(0,0,0,.45);
}
.recent-pop[hidden] { display: none; }
.recent-ids-list { display: flex; flex-direction: column; gap: 2px; }
.recent-id {
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.recent-id.on { background: rgba(200,30,58,.16); }
.recent-id b {
  display: block; font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nick-status { font-size: 13px; font-weight: 600; margin: 2px 0 8px; }
.nick-status.wait { color: var(--muted); }
.nick-status.ok { color: #7dffb3; }
.nick-status.bad { color: #ff8a8a; }
.nick-status[hidden] { display: none; }
#playerFieldWrap[hidden], #gameIdRow[hidden] { display: none; }
.mini { font-size: 14px; margin: 4px 0 10px; }

.packs, .amounts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 12px;
}
.pack, .amt {
  background: #16161a;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
}
.pack { display: flex; align-items: center; gap: 10px; text-align: left; }
.pack img {
  width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none;
}
.pack b, .amt b { display: block; font-size: 14px; }
.pack small, .amt small { color: var(--muted); font-size: 11px; }
.pack.on, .amt.on, .pay.on {
  border-color: var(--red-2);
  box-shadow: 0 0 0 1px var(--red-2);
  background: rgba(200,30,58,.12);
}

.pays { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.pay {
  display: flex; align-items: center; gap: 8px;
  background: #16161a; border: 1px solid var(--line);
  border-radius: 14px; padding: 10px;
  text-align: left;
}
.pay i {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  font-style: normal; font-weight: 800; font-size: 11px; color: #fff;
}
.pay i img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
.pay i.pay-logo {
  background: #0f0f12;
  overflow: hidden;
  padding: 2px;
}
.pay-info {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 14px;
}
.pay-info img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #111;
}
.pay-info .pay-qr {
  width: 88px;
  height: 88px;
  margin-left: auto;
}
.pay-info b { display: block; font-size: 14px; }
.pay-info p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.pay-acc { display: block; margin-top: 4px; font-size: 15px; letter-spacing: .02em; }
.copy-acc {
  margin-top: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}
.field-hint { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
.slip-pick {
  width: 100%;
  min-height: 120px;
  margin-bottom: 14px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #121218;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  font-weight: 700;
}
.slip-pick.has-file { border-style: solid; border-color: var(--red-2); }
.slip-pick img {
  max-width: 100%;
  max-height: 180px;
  border-radius: 12px;
  object-fit: contain;
}

.cta {
  width: 100%; height: 50px; border-radius: 16px;
  background: linear-gradient(180deg, #e3354d, var(--red-d));
  font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 10px 24px rgba(200,30,58,.35);
}

.wallet-card {
  background:
    linear-gradient(145deg, rgba(227, 6, 19, 0.92) 0%, #3a0c14 46%, #14080c 100%);
  border-radius: 20px; padding: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 16px 36px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.12);
}
.wallet-card small { opacity: .8; font-size: 12px; }
.wallet-card strong { display: block; font-size: 28px; margin: 6px 0 4px; }
.wallet-card p { font-size: 12px; opacity: .75; }

.tx, .note, .coupon, .evt {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}
.tx, .note { display: flex; justify-content: space-between; gap: 10px; }
.tx b, .note b, .evt h4, .coupon h4 { font-size: 13px; }
.muted { color: var(--muted); font-size: 11px; }
.ok { color: var(--ok); font-size: 12px; font-weight: 700; }
.warn { color: var(--gold); font-size: 12px; font-weight: 700; }

.chat {
  height: calc(100% - 150px);
  overflow: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.bubble {
  max-width: 82%; padding: 10px 12px; border-radius: 16px;
  font-size: 13px; line-height: 1.45;
}
.bubble.them { background: #1c1c22; border-bottom-left-radius: 6px; }
.bubble.me {
  align-self: flex-end;
  background: var(--red); border-bottom-right-radius: 6px;
}
.composer {
  position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 8px);
  display: flex; gap: 8px;
}
.composer input {
  flex: 1; height: 44px; border-radius: 999px; border: 1px solid var(--line);
  background: #16161a; padding: 0 14px; outline: 0;
}
.composer button {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--red); font-size: 16px;
}

.gift-banner {
  background: linear-gradient(160deg, #2a0d14, #12080c);
  border: 1px solid rgba(255,43,69,.25);
  border-radius: 20px; padding: 18px;
  margin-bottom: 14px;
}
.gift-banner p { color: var(--muted); font-size: 12px; margin: 4px 0 12px; }

.lb-tabs {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
  background: #0e0e12; padding: 4px; border-radius: 14px;
  border: 1px solid var(--line); margin-bottom: 16px;
}
.lb-tabs button {
  padding: 8px 6px; border-radius: 11px;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.lb-tabs button.on { background: var(--red); color: #fff; }
.podium {
  display: grid; grid-template-columns: 1fr 1.1fr 1fr;
  align-items: end; gap: 8px; margin-bottom: 16px;
}
.pod {
  background: #16161a; border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 8px; text-align: center;
}
.pod.p1 { padding-top: 18px; border-color: var(--gold); background: linear-gradient(180deg, rgba(245,193,74,.18), #16161a); }
.pod .av {
  width: 42px; height: 42px; margin: 6px auto 8px;
  border-radius: 50%; display: grid; place-items: center;
  background: #2a2a32; font-size: 12px; font-weight: 800;
}
.pod.p1 .av { width: 52px; height: 52px; background: #3a2a10; }
.pod strong { display: block; font-size: 11px; }
.pod small { color: var(--muted); font-size: 10px; }
.lb-list { display: grid; gap: 8px; }
.lb-row, .lb-me {
  display: grid; grid-template-columns: 28px 36px 1fr auto;
  gap: 8px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px;
}
.lb-row em, .lb-me em { font-style: normal; font-weight: 800; color: var(--muted); text-align: center; }
.lb-row .av, .lb-me .av {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: #2a2a32; font-size: 11px; font-weight: 800;
}
.lb-row small, .lb-me small { display: block; color: var(--muted); font-size: 10px; }
.lb-row strong, .lb-me strong { font-size: 12px; }
.lb-row.me, .lb-me { border-color: rgba(255,43,69,.4); }
.lb-me { margin-top: 12px; background: linear-gradient(90deg, rgba(200,30,58,.2), #16161a); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days span {
  aspect-ratio: 1; border-radius: 10px;
  background: #1a1a1e; display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
}
.days span.on { background: var(--red); }
.bar { height: 8px; background: #2a2a32; border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--red-2)); }
.list-card { background: var(--card); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.list-card div { display: flex; justify-content: space-between; padding: 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.list-card div:last-child { border: 0; }
.list-card span { color: var(--muted); }

.me { text-align: center; padding: 10px 0 18px; }
.me p { color: var(--muted); font-size: 13px; }
.menu { display: grid; gap: 8px; }
.menu button {
  background: rgba(20,20,24,.78);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 14px; text-align: left; font-weight: 600;
  backdrop-filter: blur(10px);
}
.menu .ghost { color: var(--muted); }

.spin-stage { padding: 16px 16px 8px; text-align: center; }
.spin-count { color: var(--muted); margin-bottom: 8px; }
.wheel-wrap {
  position: relative;
  width: min(300px, 86%);
  aspect-ratio: 1;
  margin: 12px auto;
}
#wheel {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.5));
}
.pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 2;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #fff;
  filter: drop-shadow(0 2px 4px #000);
}
.spin-core {
  position: absolute; inset: 0; margin: auto;
  width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff5a6e, var(--red-d));
  font-weight: 800; letter-spacing: .12em; font-size: 13px;
  box-shadow: 0 0 0 6px #1a1a1e, 0 8px 20px rgba(0,0,0,.4);
}
.hint { color: var(--muted); font-size: 12px; margin-top: 8px; }

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(72px + env(safe-area-inset-bottom));
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
  background: #000;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  z-index: 20;
}
.tabbar button {
  flex: 1;
  color: #8d8d96;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  padding-top: 4px;
}
.tab-ico {
  width: 36px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.tabbar svg { width: 22px; height: 22px; flex: none; }
.tabbar em {
  font-style: normal;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
}
.tabbar button.on {
  color: var(--red);
}
.tabbar button.on .tab-ico {
  color: var(--red);
  background: rgba(227, 6, 19, 0.12);
  box-shadow: 0 0 18px rgba(227, 6, 19, 0.35);
  border: 1px solid var(--red);
}

.drawer {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(0,0,0,.55);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 86%);
  background: #0e0e10;
  border-left: 1px solid rgba(255,255,255,.08);
  padding: 42px 16px 24px;
  display: grid;
  align-content: start;
  gap: 8px;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.drawer-head h3 { font-size: 18px; }
.drawer-panel .fx { width: fit-content; margin-bottom: 8px; }
.drawer-panel > button[data-go] {
  background: #16161a;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  text-align: left;
  font-weight: 600;
}

.toast {
  position: absolute; left: 24px; right: 24px; bottom: 92px;
  background: #fff; color: #111;
  padding: 12px 14px; border-radius: 14px;
  font-size: 13px; font-weight: 650;
  z-index: 30;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}

.login-gate {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(5,5,6,.88);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 320px;
  background: #141416; border: 1px solid #2a2a30;
  border-radius: 18px; padding: 22px 18px;
}
.login-card h3 { margin: 0 0 6px; color: #fff; }
.login-card p { margin: 0 0 14px; color: #aaa; font-size: 13px; }
.login-card .field { margin-bottom: 12px; }
.login-card .cta { width: 100%; margin-top: 4px; }
.gate-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.gate-tabs button {
  flex: 1;
  padding: 8px;
  border-radius: 10px;
  background: #1c1c22;
  color: #aaa;
  font-weight: 650;
}
.gate-tabs button.on { background: #c81e3a; color: #fff; }
.login-err { color: #f87171; font-size: 12px; min-height: 16px; margin: 0 0 8px !important; }

.auth-wrap { padding-top: 28px; }
.auth-card {
  background: rgba(14,12,16,.78);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px;
  padding: 20px 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 28px rgba(0,0,0,.28);
}
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}
.auth-logo { width: 48px; height: 48px; object-fit: contain; }
.auth-word {
  height: 32px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  mix-blend-mode: screen;
}
.auth-lead {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
  line-height: 1.4;
}
.auth-foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0 0;
}
.pw-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pw-row input { flex: 1; }
.pw-toggle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #16161a;
  color: #cfcfd6;
  display: grid;
  place-items: center;
  flex: none;
}
.pw-toggle svg { width: 18px; height: 18px; }
.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  color: #d4d4dc;
  font-size: 13px;
  font-weight: 600;
}
.remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}
#registerFields .field { margin-bottom: 10px; }


@media (max-width: 480px) {
  html, body { overflow: hidden; }
  .stage { padding: 0; background: var(--theme); height: 100dvh; }
  .phone {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
  }
  .notch { display: none; }
  .splash { padding: 0; }
  .home-top {
    margin: 0;
  }
  .store-head { padding-top: max(16px, env(safe-area-inset-top)); }
  .hero { padding-top: max(28px, env(safe-area-inset-top)); }
  .profile-wrap { padding-top: max(18px, env(safe-area-inset-top)); }
  .drawer-panel { padding-top: max(28px, env(safe-area-inset-top)); }
}

.pack-search {
  width: 100%;
  height: 40px;
  margin: 0 0 8px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e0e12;
  outline: 0;
}
.pack-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.pack-cats button {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #16161a;
  font-size: 11px;
  color: var(--muted);
}
.pack-cats button.on {
  color: #fff;
  border-color: var(--red-2);
  background: rgba(200,30,58,.18);
}
.packs { display: block; }
.pack-group { margin-bottom: 12px; }
.pack-group h5 {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Premium top-up */
.fx-pill {
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.08);
  padding: 3px;
  border-radius: 999px;
}
.topup-premium { padding-bottom: 28px; }
.wallet-pro {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow:
    0 18px 40px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.12);
}
.wallet-pro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.wallet-cur {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}
.wallet-live {
  font-size: 11px;
  opacity: .75;
}
.wallet-pro small { opacity: .8; font-size: 12px; }
.wallet-pro strong {
  display: block;
  font-size: 30px;
  letter-spacing: -.03em;
  margin: 4px 0 0;
  font-weight: 800;
}
.topup-block { margin-top: 18px; }
.topup-block-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.topup-block-h h4 { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.topup-block-h small { color: var(--muted); font-size: 11px; }
.amounts-pro {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.amounts-pro .amt {
  text-align: center;
  padding: 12px 6px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1d1d24, #121218);
  border: 1px solid rgba(255,255,255,.07);
}
.amounts-pro .amt b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.amounts-pro .amt small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--muted);
}
.amounts-pro .amt.on {
  background: linear-gradient(180deg, rgba(227,53,77,.4), rgba(155,11,20,.22));
  border-color: var(--red-2);
  box-shadow: 0 8px 20px rgba(200,30,58,.25);
}
.amt-custom {
  display: flex;
  align-items: center;
  gap: 0;
  background: #101014;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  height: 48px;
}
.amt-custom span {
  flex: none;
  width: 64px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  background: rgba(245,193,74,.08);
  border-right: 1px solid var(--line);
}
.amt-custom input {
  flex: 1;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0 14px;
  outline: 0;
}
.pays-pro { margin-bottom: 10px; }
#topPays .pay {
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1d1d24, #121218);
}
#topPays .pay span { display: grid; gap: 2px; }
#topPays .pay span small { color: var(--muted); font-size: 10px; font-weight: 600; }
.pay-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 16px;
}
.pay-info-pro {
  display: block;
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), transparent),
    #141418;
  border: 1px solid rgba(255,255,255,.1);
  margin-bottom: 0;
}
.pay-pro-top {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
}
.pay-info-pro .pay-brand {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 14px;
  background: #0d0d10;
}
.pay-info-pro .pay-brand.ph {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--red);
}
.pay-pro-top em {
  display: block;
  font-style: normal;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}
.pay-pro-top b { font-size: 15px; }
.pay-pro-top p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.pay-info-pro .pay-qr {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
}
.pay-acc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.pay-acc-row code {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
}
.copy-acc {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--red);
  border: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.slip-pro {
  min-height: 132px;
  border-radius: 18px;
  border: 1px dashed rgba(255,43,69,.45);
  background:
    radial-gradient(400px 80px at 50% 0%, rgba(227,53,77,.18), transparent 70%),
    #101014;
  color: #cfcfd6;
  font-weight: 700;
}
.slip-pro.has-file { border-style: solid; }
.topup-cta-wrap {
  position: sticky;
  bottom: 8px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(12,12,16,.92);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
}
.topup-sum { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.topup-sum small { color: var(--muted); }
.topup-sum b { font-size: 18px; }


/* ===== Desktop website mode ===== */
@media (min-width: 900px) {
  :root { --safe-b: 28px; --desk-nav: 68px; }

  html, body {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }
  body { background: #050506; }

  .stage {
    display: block;
    height: auto;
    min-height: 100dvh;
    padding: 0;
    overflow: visible;
    background: var(--theme), #050506;
  }

  .phone {
    width: 100%;
    max-width: none;
    aspect-ratio: auto;
    height: auto;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  .notch { display: none; }

  .app {
    height: auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .splash {
    position: fixed;
    inset: 0;
  }

  .tabbar {
    order: -1;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: var(--desk-nav);
    padding: 0 28px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(8, 6, 10, 0.88);
    border-top: 0;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
  }
  .tabbar button {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    justify-content: center;
  }
  .tabbar em { font-size: 13px; font-weight: 700; }
  .tab-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  .tabbar button.on {
    color: #fff;
    background: rgba(227, 6, 19, 0.16);
  }
  .tabbar button.on .tab-ico {
    box-shadow: none;
  }
  .tabbar { z-index: 40; width: 100%; box-sizing: border-box; }

  .chips { flex-wrap: wrap; overflow: visible; }
  .pack-cats { margin-bottom: 14px; }
  .pack-cats button { font-size: 12px; padding: 7px 12px; }

  .screen {
    height: auto;
    min-height: calc(100dvh - var(--desk-nav));
    overflow: visible;
    padding-bottom: 40px;
  }
  .screen.active[data-screen="home"] {
    overflow: visible;
    min-height: calc(100dvh - var(--desk-nav));
  }

  .store-head {
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    padding: 16px 28px 8px;
  }
  .head-bar {
    min-height: 72px;
    padding: 8px 12px 8px 10px;
    border-radius: 22px;
  }
  .logo-round { width: 60px; height: 60px; }
  .brand-word { height: 42px; max-width: 280px; }
  .head-split { height: 42px; }
  .round-btn { width: 48px; height: 48px; }
  .round-btn svg { width: 24px; height: 24px; }
  .home-scroll {
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    overflow: visible;
    padding: 0 28px 48px;
  }
  .home-scroll .home-banners {
    aspect-ratio: 21 / 8;
    max-height: 340px;
    border-radius: 22px;
  }
  .home-cta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 8px;
  }
  .home-cta h2 { font-size: 36px; margin-bottom: 8px; }
  .home-cta p { font-size: 15px; max-width: 480px; }
  .cta-row {
    min-width: 360px;
    margin-bottom: 0;
  }
  .packs-grid, .games {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }
  .gcard .cover { height: 148px; }
  .gtile { border-radius: 18px; }

  .pad,
  .profile-wrap,
  .spin-stage {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: 28px;
    padding-right: 28px;
  }
  .subhead {
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    padding-top: 16px;
    padding-left: 28px;
    padding-right: 28px;
  }
  .back.light { top: 18px; left: 28px; }

  .game-hero {
    height: 220px;
    max-width: 1180px;
    margin: 0 auto;
    width: calc(100% - 56px);
    border-radius: 22px;
    overflow: hidden;
    margin-top: 12px;
  }

  .game-desk {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas:
      "packs meta"
      "packs pay";
    gap: 18px 28px;
    align-items: start;
  }
  .game-main { grid-area: packs; }
  .game-meta { grid-area: meta; }
  .game-pay {
    grid-area: pay;
    position: sticky;
    top: calc(var(--desk-nav) + 16px);
    padding: 16px;
    border-radius: 18px;
    background: rgba(18, 16, 20, 0.72);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }
  .game-meta {
    padding: 16px;
    border-radius: 18px;
    background: rgba(18, 16, 20, 0.55);
    border: 1px solid var(--line);
  }
  .pack-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .amounts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pays { grid-template-columns: 1fr; }

  .topup-premium {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
    max-width: 1080px;
  }
  .topup-premium > .wallet-pro { grid-column: 1 / -1; }
  .topup-premium > .topup-cta-wrap { grid-column: 1 / -1; position: static; }

  [data-screen="tx"] .pad,
  [data-screen="profile"] .profile-wrap,
  [data-screen="spin"] .spin-stage,
  [data-screen="orders"] .pad,
  [data-screen="alerts"] .pad,
  [data-screen="events"] .pad,
  [data-screen="gifts"] .pad,
  [data-screen="coupons"] .pad,
  [data-screen="board"] .pad {
    max-width: 720px;
  }
  .xchg-card { padding: 22px; }
  .wheel-wrap { width: min(380px, 70%); }

  .float-spin {
    position: fixed;
    right: 28px;
    bottom: 28px;
  }

  .drawer {
    position: fixed;
    z-index: 45;
  }
  .drawer-panel {
    width: min(360px, 40vw);
    padding-top: 24px;
  }
  .toast {
    position: fixed;
    left: auto;
    right: 28px;
    bottom: 28px;
    width: min(360px, 90vw);
  }
  .login-gate {
    position: fixed;
  }
  .login-card { max-width: 380px; padding: 28px 24px; }
  .auth-card { padding: 28px 24px; }
  .auth-logo { width: 56px; height: 56px; }
  .auth-word { height: 36px; max-width: 220px; }

  .chat {
    height: auto;
    min-height: calc(100dvh - var(--desk-nav) - 180px);
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
  }
  .composer {
    position: sticky;
    left: auto;
    right: auto;
    bottom: 16px;
    max-width: 720px;
    margin: 0 auto 16px;
    width: calc(100% - 56px);
  }

  .search-wrap { max-width: 520px; }
}

@media (min-width: 1280px) {
  .packs-grid, .games {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .pack-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 900px) and (max-width: 1100px) {
  .packs-grid, .games {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pack-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-cta { display: block; }
  .cta-row { min-width: 0; margin-bottom: 22px; }
  .game-desk {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}
