:root {
  --bg: #07060d;
  --bg2: #0d0b14;
  --card: rgba(18, 15, 28, 0.86);
  --card-2: #161221;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f6f3ff;
  --muted: #9a91b3;
  --violet: #8b5cf6;
  --pink: #f472b6;
  --cyan: #22d3ee;
  --gold: #f5c451;
  --green: #34d399;
  --red: #fb7185;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --nav-h: 88px;
  --tg-safe-t: 0px;
  --tg-safe-b: 0px;
  --tg-safe-l: 0px;
  --tg-safe-r: 0px;
  --tg-menu-r: 48px;
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-b));
  --safe-t: max(env(safe-area-inset-top, 0px), var(--tg-safe-t));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html {
  color-scheme: dark;
  background: #12081f;
  background-color: #12081f;
}
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}
body {
  position: fixed;
  inset: 0;
  font-family: Manrope, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  color: var(--text);
  background-color: #12081f;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 14%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 22% 38%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.6px 1.6px at 48% 18%, rgba(196, 181, 253, 0.55), transparent),
    radial-gradient(1px 1px at 72% 28%, rgba(255,255,255,0.28), transparent),
    radial-gradient(2px 2px at 88% 12%, rgba(251, 191, 36, 0.45), transparent),
    radial-gradient(1px 1px at 64% 62%, rgba(255,255,255,0.22), transparent),
    radial-gradient(1.4px 1.4px at 18% 78%, rgba(244, 114, 182, 0.45), transparent),
    radial-gradient(1px 1px at 92% 72%, rgba(34, 211, 238, 0.4), transparent);
}

.scene-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(900px 520px at 110% -8%, rgba(167, 139, 250, 0.38), transparent 58%),
    radial-gradient(700px 480px at -15% 108%, rgba(34, 211, 238, 0.2), transparent 52%),
    radial-gradient(520px 320px at 50% 40%, rgba(236, 72, 153, 0.12), transparent 60%),
    linear-gradient(180deg, #1a0f30 0%, #12081f 42%, #0c0714 100%);
  background-color: #12081f;
}
.scene-bg .blob {
  position: absolute; border-radius: 50%; filter: blur(48px);
}
.scene-bg .b1 { width: 280px; height: 280px; background: #7c3aed; top: -90px; right: -60px; opacity: 0.42; }
.scene-bg .b2 { width: 240px; height: 240px; background: #0891b2; bottom: 90px; left: -90px; opacity: 0.28; }
.scene-bg .b3 { width: 190px; height: 190px; background: #db2777; top: 42%; right: 8%; opacity: 0.2; }
.scene-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 28%, #000 10%, transparent 72%);
}

.wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding: calc(86px + var(--safe-t)) 16px calc(var(--nav-h) + var(--safe-b) + 28px);
}

.topbar {
  position: fixed;
  top: calc(8px + var(--safe-t));
  left: calc(10px + var(--tg-safe-l));
  right: calc(10px + var(--tg-safe-r));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: auto;
  max-width: 460px;
  margin: 0 auto;
  padding: 8px 10px;
  background: rgba(18, 8, 31, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(139, 92, 246, 0.2),
    0 10px 28px rgba(0, 0, 0, 0.38);
}
.top-profile {
  display: flex; align-items: center; gap: 8px;
  min-width: 0; flex: 1 1 0;
  overflow: hidden;
  text-decoration: none; color: inherit;
}
.top-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; display: block; flex: 0 0 auto;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.top-meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.top-meta b {
  font-size: 13px; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.top-meta span { font-size: 10px; color: #c4b5fd; font-weight: 700; letter-spacing: 0.06em; }
.top-lvl-row {
  display: flex; align-items: center; gap: 6px;
  margin-top: 5px;
  width: 100%;
  max-width: 148px;
  min-width: 0;
}
#topLvl,
#topLvlNext {
  font-size: 11px; color: #c4b5fd; font-weight: 800;
  letter-spacing: 0.02em; flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  min-width: 0.9em; line-height: 1;
}
#topLvlNext { color: #9a91b3; }
.top-lvl-bar {
  flex: 1; height: 14px; border-radius: 99px;
  background: rgba(139, 92, 246, 0.2);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.16);
}
.top-lvl-bar i {
  display: block; height: 100%; width: 18%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #8b5cf6 55%, #c4b5fd);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  transition: width 0.35s ease;
}
.brand {
  display: none;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7c3aed, #22d3ee);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
  font-family: Orbitron, Manrope, sans-serif;
  font-size: 13px;
}
.brand b { font-family: Orbitron, Manrope, sans-serif; font-size: 14px; }
.balance-pill {
  display: flex; align-items: center; gap: 6px;
  flex: 0 0 auto;
  max-width: 48%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 10px;
  font-weight: 800;
}
.balance-pill span {
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 4.8em;
}
.plus {
  width: 28px; height: 28px; border-radius: 50%;
  flex: 0 0 auto;
  border: 0; color: #1a1020; font-weight: 900; cursor: pointer;
  background: linear-gradient(135deg, var(--gold), #ffe08a);
}

.hello { margin: 6px 0 16px; }
.hello .kicker {
  color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
}
.hello h1 {
  margin: 4px 0 0;
  font-size: 26px; letter-spacing: -0.04em; font-weight: 800;
}

.live-crash {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  border-radius: 24px;
  padding: 16px 16px 14px;
  text-decoration: none; color: inherit;
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(251, 207, 232, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 20%, rgba(244, 114, 182, 0.42), transparent 56%),
    linear-gradient(165deg, #4a1834 0%, #22101c 48%, #10080e 100%);
  border: 1px solid #f472b6;
  box-shadow:
    inset 0 1px 0 rgba(251, 207, 232, 0.55),
    0 0 0 1px rgba(244, 114, 182, 0.45),
    0 0 22px rgba(244, 114, 182, 0.5),
    0 0 40px rgba(236, 72, 153, 0.22);
  margin-bottom: 16px;
}
.live-crash::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.2), transparent 38%);
}
.live-crash::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 18px;
  border: 1px solid rgba(251, 207, 232, 0.22);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 2;
}
.live-crash > * { position: relative; z-index: 1; }
.live-crash .row { display: flex; justify-content: space-between; align-items: center; }
.badge {
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(52, 211, 153, 0.12); color: var(--green);
}
.badge.wait { background: rgba(245, 196, 81, 0.12); color: var(--gold); }
.badge.dead { background: rgba(251, 113, 133, 0.12); color: var(--red); }
.mult-lg {
  font-family: Orbitron, Manrope, sans-serif;
  font-size: 42px; font-weight: 800; letter-spacing: -0.04em;
  background: linear-gradient(90deg, #fff, #f472b6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mult-lg.down { background: linear-gradient(90deg, #fff, #fb7185); -webkit-background-clip: text; background-clip: text; }
canvas.mini-graph, canvas.crash-graph { width: 100%; display: block; }

.section-h {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 8px 2px 12px;
}
.section-h h2 { margin: 0; font-size: 16px; }
.section-h a, .muted { color: var(--muted); text-decoration: none; font-size: 13px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game-card {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 112px; padding: 14px;
  border-radius: 20px; text-decoration: none; color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 22px rgba(0, 0, 0, 0.28);
}
.game-card::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.34), transparent 38%),
    radial-gradient(circle at 82% 86%, rgba(255, 255, 255, 0.14), transparent 44%);
}
.game-card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  z-index: 2;
}
.game-card b, .game-card span { position: relative; z-index: 1; }
.game-card b { font-size: 16px; }
.game-card span { font-size: 12px; color: rgba(255,255,255,0.78); }
.gc-crash {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(251, 207, 232, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(244, 114, 182, 0.42), transparent 56%),
    linear-gradient(165deg, #4a1834 0%, #22101c 48%, #10080e 100%);
  border-color: #f472b6;
  box-shadow:
    inset 0 1px 0 rgba(251, 207, 232, 0.55),
    0 0 0 1px rgba(244, 114, 182, 0.45),
    0 0 22px rgba(244, 114, 182, 0.5),
    0 0 40px rgba(236, 72, 153, 0.22);
}
.gc-mines {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(165, 243, 252, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(34, 211, 238, 0.4), transparent 56%),
    linear-gradient(165deg, #163848 0%, #102028 48%, #081218 100%);
  border-color: #22d3ee;
  box-shadow:
    inset 0 1px 0 rgba(207, 250, 254, 0.55),
    0 0 0 1px rgba(34, 211, 238, 0.45),
    0 0 22px rgba(34, 211, 238, 0.5),
    0 0 40px rgba(6, 182, 212, 0.22);
}
.gc-cases {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(254, 240, 138, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(250, 204, 21, 0.38), transparent 56%),
    linear-gradient(165deg, #3d2a0c 0%, #22180a 48%, #100c06 100%);
  border-color: #facc15;
  box-shadow:
    inset 0 1px 0 rgba(254, 249, 195, 0.55),
    0 0 0 1px rgba(250, 204, 21, 0.45),
    0 0 22px rgba(250, 204, 21, 0.48),
    0 0 40px rgba(234, 179, 8, 0.2);
}
.gc-farm {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(167, 243, 208, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(52, 211, 153, 0.4), transparent 56%),
    linear-gradient(165deg, #163828 0%, #102018 48%, #08140e 100%);
  border-color: #34d399;
  box-shadow:
    inset 0 1px 0 rgba(209, 250, 229, 0.55),
    0 0 0 1px rgba(52, 211, 153, 0.45),
    0 0 22px rgba(52, 211, 153, 0.5),
    0 0 40px rgba(16, 185, 129, 0.22);
}
.gc-shop {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(221, 214, 254, 0.52), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(167, 139, 250, 0.42), transparent 56%),
    linear-gradient(165deg, #2a1a58 0%, #18102e 48%, #0c0818 100%);
  border-color: #a78bfa;
  box-shadow:
    inset 0 1px 0 rgba(237, 233, 254, 0.55),
    0 0 0 1px rgba(167, 139, 250, 0.48),
    0 0 22px rgba(167, 139, 250, 0.52),
    0 0 40px rgba(139, 92, 246, 0.24);
}
.gc-dice {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(254, 205, 211, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(251, 113, 133, 0.4), transparent 56%),
    linear-gradient(165deg, #481820 0%, #241016 48%, #10080c 100%);
  border-color: #fb7185;
  box-shadow:
    inset 0 1px 0 rgba(254, 226, 226, 0.5),
    0 0 0 1px rgba(251, 113, 133, 0.45),
    0 0 22px rgba(251, 113, 133, 0.5),
    0 0 40px rgba(244, 63, 94, 0.22);
}
.gc-rate {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(254, 240, 138, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(250, 204, 21, 0.38), transparent 56%),
    linear-gradient(165deg, #3d2a0c 0%, #22180a 48%, #100c06 100%);
  border-color: #facc15;
  box-shadow:
    inset 0 1px 0 rgba(254, 249, 195, 0.55),
    0 0 0 1px rgba(250, 204, 21, 0.45),
    0 0 22px rgba(250, 204, 21, 0.48),
    0 0 40px rgba(234, 179, 8, 0.2);
}
.game-card i {
  position: absolute; right: -6px; bottom: -10px;
  font-style: normal; font-size: 52px; opacity: 0.28;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; font-weight: 800; padding: 5px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.chip.lo { color: var(--red); }
.chip.mid { color: var(--gold); }
.chip.hi { color: var(--green); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 48px; border: 0; border-radius: 14px;
  font-weight: 800; font-size: 15px; cursor: pointer; color: #fff;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-gold { background: linear-gradient(135deg, #f5c451, #e09a2a); color: #2a1b05; }
.btn-green { background: linear-gradient(135deg, #34d399, #059669); color: #06281c; }
.btn-violet { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.btn-ghost { background: rgba(255,255,255,0.06); border: 1px solid var(--line); }
.btn-red { background: linear-gradient(135deg, #fb7185, #e11d48); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.preset {
  flex: 1; min-width: 52px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  color: var(--text); font-weight: 700; cursor: pointer;
}
.preset.on { background: rgba(139, 92, 246, 0.25); border-color: rgba(139, 92, 246, 0.6); }
.auto-cash {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 8px; padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.auto-cash.on {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.08);
}
.auto-cash-copy { flex: 1; min-width: 0; }
.auto-cash-copy b { display: block; font-size: 13px; }
.auto-cash-copy span { font-size: 12px; color: var(--muted); font-weight: 700; }
.auto-at { width: 88px; flex: 0 0 88px; height: 40px; text-align: center; padding: 0 8px; }
.auto-at:disabled { opacity: 0.4; }
.auto-presets { margin-top: 0; margin-bottom: 12px; }
.auto-presets .preset.on { background: rgba(52, 211, 153, 0.22); border-color: rgba(52, 211, 153, 0.5); }
.switch {
  position: relative; width: 48px; height: 28px; flex: 0 0 48px;
  cursor: pointer;
}
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 99px;
  transition: background 0.2s ease;
  pointer-events: none;
}
.switch i::before {
  content: "";
  position: absolute; width: 22px; height: 22px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: transform 0.2s ease;
}
.switch input:checked + i { background: #34d399; }
.switch input:checked + i::before { transform: translateX(20px); }
.input {
  width: 100%; height: 46px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0,0,0,0.25);
  color: var(--text); padding: 0 12px; font-size: 16px; font-weight: 700;
  outline: none;
}

.tabbar {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(10px + var(--safe-b));
  z-index: 30;
  max-width: 456px; margin: 0 auto;
  padding: 7px;
  background: rgba(16, 10, 28, 0.78);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.tab-row {
  display: flex; gap: 4px;
  position: relative; z-index: 1;
}
.tab-pill {
  position: absolute; top: 0; bottom: 0; left: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(167,139,250,0.48), rgba(109,40,217,0.2));
  box-shadow: inset 0 0 0 1px rgba(196,181,253,0.3);
  transition: transform 0.38s cubic-bezier(.22,1,.36,1), width 0.38s cubic-bezier(.22,1,.36,1);
  pointer-events: none; z-index: 0;
}
.tab {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--muted);
  font-size: 10px; font-weight: 700;
  border-radius: 16px; padding: 7px 2px 6px;
}
.tab svg { width: 20px; height: 20px; }
.tab.on { color: #fff; background: transparent; box-shadow: none; }
.tab.on svg { color: #f5c451; filter: drop-shadow(0 0 8px rgba(245,196,81,0.55)); }

.crash-stage {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #100e18;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.crash-hud {
  position: absolute; inset: 14px 14px auto 14px;
  display: flex; justify-content: space-between; align-items: flex-start;
  pointer-events: none;
}
.crash-x {
  font-family: Orbitron, Manrope, sans-serif;
  font-size: 48px; font-weight: 800; line-height: 1;
  text-shadow: 0 8px 30px rgba(244, 114, 182, 0.35);
}
.crash-x.boom { color: var(--red); }
.players { max-height: 220px; overflow: auto; }
.player {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.player:last-child { border-bottom: 0; }
.win { color: var(--green); }
.lose { color: var(--red); }
.crash-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  margin-bottom: 8px;
}
.crash-table::-webkit-scrollbar { width: 0; height: 0; }
.crash-seat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(18, 15, 28, 0.9);
  border: 1.5px solid rgba(255,255,255,0.1);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.crash-seat.me { background: rgba(139, 92, 246, 0.12); }
.crash-seat.wait {
  border-color: rgba(196, 181, 253, 0.28);
}
.crash-seat.win {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  box-shadow: inset 0 0 16px rgba(52, 211, 153, 0.42);
}
.crash-seat.lose {
  border-color: #fb7185;
  background: rgba(251, 113, 133, 0.1);
  box-shadow: inset 0 0 16px rgba(251, 113, 133, 0.4);
}
.crash-seat.me.win {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  box-shadow: inset 0 0 20px rgba(52, 211, 153, 0.55);
}
.crash-seat.me.lose {
  border-color: #fb7185;
  background: rgba(251, 113, 133, 0.16);
  box-shadow: inset 0 0 20px rgba(251, 113, 133, 0.52);
}
.crash-seat.win .crash-ava { box-shadow: inset 0 0 0 2px #34d399; }
.crash-seat.lose .crash-ava { box-shadow: inset 0 0 0 2px #fb7185; }
.crash-ava {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #2a2150;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
}
.crash-ava.letter {
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #22d3ee);
}
.crash-ava.letter[hidden] { display: none !important; }
.crash-seat-meta { flex: 1; min-width: 0; }
.crash-seat-meta b {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crash-seat-meta em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.crash-seat-sum {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.mines {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px;
}
.mines.sz-3 { grid-template-columns: repeat(3, 1fr); }
.mines.sz-5 { grid-template-columns: repeat(5, 1fr); }
.mines.sz-10 { grid-template-columns: repeat(10, 1fr); gap: 4px; }
.mines.sz-10 .cell { border-radius: 8px; font-size: 12px; }
.cell {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px;
  background: #161221; color: var(--text); font-size: 18px; font-weight: 800;
  cursor: pointer;
}
.cell.safe { background: rgba(52, 211, 153, 0.18); border-color: rgba(52,211,153,0.4); }
.cell.boom { background: rgba(251, 113, 133, 0.22); border-color: rgba(251,113,133,0.5); }
.cell:disabled { cursor: default; }

.reel-wrap { overflow: hidden; border-radius: 16px; position: relative; }
.reel-wrap::before, .reel-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 48px; z-index: 2; pointer-events: none;
}
.reel-wrap::before { left: 0; background: linear-gradient(90deg, #120f1a, transparent); }
.reel-wrap::after { right: 0; background: linear-gradient(270deg, #120f1a, transparent); }
.reel { display: flex; gap: 8px; }
.item {
  flex: 0 0 88px; width: 88px; height: 96px; border-radius: 16px; padding: 8px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; isolation: isolate; overflow: hidden;
  background: #1a1624; border: 1px solid var(--line); font-size: 11px;
}
.reel .item.drop-cell {
  flex: 0 0 88px;
  width: 88px;
  height: 96px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}
.item.hit {
  z-index: 4;
  animation: case-hit 0.45s cubic-bezier(.2, 1.4, .3, 1);
  box-shadow: 0 0 22px rgba(245, 196, 81, 0.55), inset 0 0 0 2px #f5c451;
}
@keyframes case-hit {
  0% { transform: scale(1); }
  45% { transform: scale(1.12); }
  100% { transform: scale(1.04); }
}
.item::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.38), transparent 36%, transparent 62%, rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.22), transparent 44%);
}
.item > * { position: relative; z-index: 1; }
.item.common,
.drop-cell.common {
  border-color: rgba(233, 213, 255, 0.42);
  background:
    radial-gradient(140% 110% at 50% -8%, rgba(255, 255, 255, 0.5), transparent 48%),
    radial-gradient(95% 85% at 50% 36%, rgba(196, 181, 253, 0.48), transparent 62%),
    linear-gradient(165deg, #5a3d88 0%, #2a1848 48%, #140c22 100%);
}
.item.rare,
.drop-cell.rare {
  border-color: rgba(125, 211, 252, 0.85);
  background:
    radial-gradient(140% 110% at 50% -8%, rgba(224, 242, 254, 0.55), transparent 48%),
    radial-gradient(95% 85% at 50% 36%, rgba(34, 211, 238, 0.5), transparent 62%),
    linear-gradient(165deg, #176a8a 0%, #0d3550 48%, #071824 100%);
  box-shadow:
    inset 0 1px 0 rgba(224, 242, 254, 0.45),
    inset 0 -18px 28px rgba(14, 165, 233, 0.22),
    0 0 0 1px rgba(56, 189, 248, 0.28),
    0 8px 20px rgba(34, 211, 238, 0.28);
}
.item.epic,
.drop-cell.epic {
  border-color: rgba(196, 181, 253, 0.9);
  background:
    radial-gradient(140% 110% at 50% -8%, rgba(237, 233, 254, 0.55), transparent 48%),
    radial-gradient(95% 85% at 50% 36%, rgba(168, 85, 247, 0.58), transparent 62%),
    linear-gradient(165deg, #6d28d9 0%, #3b1574 48%, #1a0838 100%);
  box-shadow:
    inset 0 1px 0 rgba(237, 233, 254, 0.42),
    inset 0 -18px 28px rgba(139, 92, 246, 0.28),
    0 0 0 1px rgba(167, 139, 250, 0.32),
    0 8px 22px rgba(139, 92, 246, 0.36);
}
.item.legendary,
.drop-cell.legendary {
  border-color: rgba(253, 224, 71, 0.92);
  background:
    radial-gradient(140% 110% at 50% -8%, rgba(254, 249, 195, 0.62), transparent 48%),
    radial-gradient(95% 85% at 50% 36%, rgba(251, 191, 36, 0.5), transparent 62%),
    linear-gradient(165deg, #c98912 0%, #7a4a0a 48%, #2a1606 100%);
  box-shadow:
    inset 0 1px 0 rgba(254, 249, 195, 0.5),
    inset 0 -18px 28px rgba(245, 158, 11, 0.28),
    0 0 0 1px rgba(245, 196, 81, 0.36),
    0 8px 22px rgba(245, 196, 81, 0.32);
}
.pointer {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: #fff; z-index: 3; transform: translateX(-50%);
  box-shadow: 0 0 12px #fff;
}

.case-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block;
  min-height: 176px;
  padding: 18px 16px;
  border-radius: 20px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: var(--card-2);
  color: inherit;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.45);
}
.case-card::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.22), transparent 38%);
}
.case-card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  z-index: 2;
}
.case-card h3 { margin: 0 0 4px; position: relative; z-index: 1; }
.case-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 58%;
}
.case-rares {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.case-rares img {
  position: absolute;
  width: 108px;
  height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.48));
}
.scatter-0 img:nth-child(1) {
  right: -10px; top: -18px; width: 102px; height: 102px;
  transform: rotate(16deg); z-index: 1;
}
.scatter-0 img:nth-child(2) {
  right: 88px; top: 42px; width: 120px; height: 120px;
  transform: rotate(-26deg); z-index: 3;
}
.scatter-0 img:nth-child(3) {
  right: 6px; bottom: -22px; width: 96px; height: 96px;
  transform: rotate(34deg); z-index: 2;
}
.scatter-1 img:nth-child(1) {
  right: 118px; top: -14px; width: 100px; height: 100px;
  transform: rotate(-30deg); z-index: 2;
}
.scatter-1 img:nth-child(2) {
  right: -16px; top: 22px; width: 128px; height: 128px;
  transform: rotate(12deg); z-index: 3;
}
.scatter-1 img:nth-child(3) {
  right: 54px; bottom: -24px; width: 108px; height: 108px;
  transform: rotate(-16deg); z-index: 1;
}
.scatter-2 img:nth-child(1) {
  right: 28px; top: -22px; width: 122px; height: 122px;
  transform: rotate(-18deg); z-index: 3;
}
.scatter-2 img:nth-child(2) {
  right: -20px; bottom: 20px; width: 110px; height: 110px;
  transform: rotate(28deg); z-index: 2;
}
.scatter-2 img:nth-child(3) {
  right: 96px; bottom: -18px; width: 98px; height: 98px;
  transform: rotate(-36deg); z-index: 1;
}
.scatter-3 img:nth-child(1) {
  right: -14px; top: 4px; width: 116px; height: 116px;
  transform: rotate(22deg); z-index: 2;
}
.scatter-3 img:nth-child(2) {
  right: 92px; top: -10px; width: 104px; height: 104px;
  transform: rotate(-22deg); z-index: 1;
}
.scatter-3 img:nth-child(3) {
  right: 24px; bottom: -20px; width: 124px; height: 124px;
  transform: rotate(8deg); z-index: 3;
}
.case-rares.hero {
  position: relative;
  inset: auto;
  flex: 0 0 210px;
  width: 210px;
  height: 168px;
  align-self: center;
}
.case-rares.hero.scatter-0 img:nth-child(1) { right: -6px; top: -8px; }
.case-rares.hero.scatter-0 img:nth-child(2) { right: 78px; top: 36px; left: auto; }
.case-rares.hero.scatter-0 img:nth-child(3) { right: 4px; bottom: -10px; }
.case-rares.hero.scatter-1 img:nth-child(1) { right: 102px; top: -6px; }
.case-rares.hero.scatter-1 img:nth-child(2) { right: -8px; top: 18px; }
.case-rares.hero.scatter-1 img:nth-child(3) { right: 48px; bottom: -12px; }
.case-rares.hero.scatter-2 img:nth-child(1) { right: 20px; top: -12px; }
.case-rares.hero.scatter-2 img:nth-child(2) { right: -12px; bottom: 16px; }
.case-rares.hero.scatter-3 img:nth-child(1) { right: -8px; top: 2px; }
.case-rares.hero.scatter-3 img:nth-child(2) { right: 80px; top: -6px; }
.case-rares.hero.scatter-3 img:nth-child(3) { right: 18px; bottom: -10px; }
.case-card.cc-free,
.case-card.free {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(167, 243, 208, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(52, 211, 153, 0.4), transparent 56%),
    linear-gradient(165deg, #163828 0%, #102018 48%, #08140e 100%);
  border-color: #34d399;
  box-shadow:
    inset 0 1px 0 rgba(209, 250, 229, 0.55),
    0 0 0 1px rgba(52, 211, 153, 0.45),
    0 0 26px rgba(52, 211, 153, 0.5),
    0 0 44px rgba(16, 185, 129, 0.22);
}
.case-card.cc-void {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(221, 214, 254, 0.52), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(167, 139, 250, 0.42), transparent 56%),
    linear-gradient(165deg, #2a1a58 0%, #18102e 48%, #0c0818 100%);
  border-color: #a78bfa;
  box-shadow:
    inset 0 1px 0 rgba(237, 233, 254, 0.55),
    0 0 0 1px rgba(167, 139, 250, 0.48),
    0 0 26px rgba(167, 139, 250, 0.52),
    0 0 44px rgba(139, 92, 246, 0.24);
}
.case-card.cc-neon {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(165, 243, 252, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(34, 211, 238, 0.4), transparent 56%),
    linear-gradient(165deg, #163848 0%, #102028 48%, #081218 100%);
  border-color: #22d3ee;
  box-shadow:
    inset 0 1px 0 rgba(207, 250, 254, 0.55),
    0 0 0 1px rgba(34, 211, 238, 0.45),
    0 0 26px rgba(34, 211, 238, 0.5),
    0 0 44px rgba(6, 182, 212, 0.22);
}
.case-card.cc-legend {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(254, 240, 138, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(250, 204, 21, 0.38), transparent 56%),
    linear-gradient(165deg, #3d2a0c 0%, #22180a 48%, #100c06 100%);
  border-color: #facc15;
  box-shadow:
    inset 0 1px 0 rgba(254, 249, 195, 0.55),
    0 0 0 1px rgba(250, 204, 21, 0.45),
    0 0 26px rgba(250, 204, 21, 0.48),
    0 0 44px rgba(234, 179, 8, 0.2);
}
.home-daily {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block;
  min-height: 118px;
  padding: 16px 14px;
  margin-bottom: 14px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(167, 243, 208, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 110%, rgba(52, 211, 153, 0.4), transparent 56%),
    linear-gradient(165deg, #163828 0%, #102018 48%, #08140e 100%);
  border: 1px solid #34d399;
  box-shadow:
    inset 0 1px 0 rgba(209, 250, 229, 0.55),
    0 0 0 1px rgba(52, 211, 153, 0.45),
    0 0 22px rgba(52, 211, 153, 0.48),
    0 0 40px rgba(16, 185, 129, 0.18);
}
.home-daily::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.2), transparent 38%);
}
.home-daily::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 15px;
  border: 1px solid rgba(110, 231, 183, 0.28);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 2;
}
.home-daily-copy {
  position: relative;
  z-index: 1;
  max-width: 52%;
}
.home-daily-copy span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #86efac;
}
.home-daily-copy h3 {
  margin: 4px 0 2px;
  font-size: 20px;
}
.home-daily-copy em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: rgba(187, 247, 208, 0.72);
}
.home-daily-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.home-daily-art img {
  position: absolute;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4));
}
.home-daily-art img:nth-child(1) {
  right: -6px;
  top: -10px;
  width: 72px;
  height: 72px;
  transform: rotate(16deg);
  z-index: 1;
}
.home-daily-art img:nth-child(2) {
  right: 78px;
  top: 28px;
  width: 82px;
  height: 82px;
  transform: rotate(-22deg);
  z-index: 3;
}
.home-daily-art img:nth-child(3) {
  right: 10px;
  bottom: -16px;
  width: 68px;
  height: 68px;
  transform: rotate(28deg);
  z-index: 2;
}
.price,
.free-tag {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.price {
  color: #fde68a;
  border: 1px solid rgba(253, 224, 71, 0.88);
  background:
    radial-gradient(140% 160% at 14% 0%, rgba(254, 249, 195, 0.5), transparent 58%),
    linear-gradient(165deg, rgba(201, 137, 18, 0.62), rgba(42, 22, 6, 0.5));
  box-shadow:
    inset 0 1px 0 rgba(254, 249, 195, 0.5),
    0 0 0 1px rgba(245, 196, 81, 0.24),
    0 6px 16px rgba(245, 196, 81, 0.26);
}
.free-tag {
  color: #bbf7d0;
  border: 1px solid rgba(110, 231, 183, 0.78);
  background:
    radial-gradient(140% 160% at 14% 0%, rgba(209, 250, 229, 0.48), transparent 58%),
    linear-gradient(165deg, rgba(16, 185, 129, 0.55), rgba(6, 28, 20, 0.46));
  box-shadow:
    inset 0 1px 0 rgba(209, 250, 229, 0.45),
    0 0 0 1px rgba(52, 211, 153, 0.22),
    0 6px 16px rgba(52, 211, 153, 0.22);
}
.back-link {
  display: inline-block;
  margin-bottom: 8px;
  color: #c4b5fd;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}
.drop-title {
  margin: 20px 0 10px;
  font-size: 16px;
  font-weight: 800;
}
.drop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(18, 8, 31, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(139, 92, 246, 0.18);
}
.drop-cell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 16px;
  padding: 12px 8px 14px;
  text-align: center;
  background:
    radial-gradient(140% 110% at 50% -8%, rgba(255, 255, 255, 0.46), transparent 48%),
    radial-gradient(95% 85% at 50% 36%, rgba(192, 132, 252, 0.55), transparent 62%),
    linear-gradient(165deg, #5b35a8 0%, #2c1658 48%, #140824 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -18px 28px rgba(76, 29, 149, 0.28),
    0 8px 18px rgba(139, 92, 246, 0.22);
}
.drop-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.38), transparent 36%, transparent 62%, rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.22), transparent 44%);
}
.drop-cell > * { position: relative; z-index: 1; }
.drop-cell b {
  display: block;
  font-size: 11px;
  margin-top: 6px;
  line-height: 1.25;
}
.drop-cell span {
  display: block;
  font-size: 11px;
  color: var(--gold);
  font-weight: 800;
  margin-top: 2px;
}
.drop-cell img,
.drop-cell tgs-player {
  width: 48px; height: 48px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}
.orb {
  position: relative;
  width: 168px; height: 168px; margin: 10px auto 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff, transparent 18%),
    radial-gradient(circle at 50% 50%, #a78bfa, #6d28d9 45%, #0b0812 70%);
  box-shadow: 0 0 60px rgba(139, 92, 246, 0.45), inset 0 0 30px rgba(255,255,255,0.15);
  display: grid; place-items: center;
  font-family: Orbitron, sans-serif; font-size: 28px; font-weight: 800;
  animation: pulse 2.2s ease-in-out infinite;
  user-select: none; cursor: pointer; border: 0; color: #fff;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.energy { height: 8px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; }
.energy > i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet)); width: 0; }

.ach {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.ach:last-child { border-bottom: 0; }
.ach .dot {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center; background: rgba(255,255,255,0.05);
}
.ach.on .dot { background: rgba(139,92,246,0.25); }
.ach.off { opacity: 0.45; }

.toast-box {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 10px);
  z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; padding: 0 16px;
}
.toast {
  pointer-events: none;
  min-width: 180px; max-width: 360px;
  background: rgba(22, 18, 34, 0.96);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 14px; border-radius: 14px;
  font-weight: 700; font-size: 13px; text-align: center;
  box-shadow: var(--shadow);
  animation: toast-in 0.22s ease;
}
.toast.ok { border-color: rgba(52,211,153,0.4); }
.toast.err { border-color: rgba(251,113,133,0.45); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

.modal-back {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  width: min(480px, 100%);
  background: #14111c;
  border: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  padding: 18px 16px calc(16px + var(--safe-b));
  animation: up 0.22s ease;
}
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.modal h3 { margin: 0 0 8px; }
.skel {
  height: 14px; border-radius: 8px; background: linear-gradient(90deg, #1a1624, #241e32, #1a1624);
  background-size: 200% 100%; animation: shine 1.2s infinite;
}
@keyframes shine { to { background-position: -200% 0; } }

.gate {
  position: fixed; inset: 0; z-index: 40;
  display: none; align-items: flex-end; justify-content: center;
  background: linear-gradient(180deg, transparent, rgba(7,6,13,0.92) 55%);
  padding: 16px;
}
.gate.show { display: flex; }
.gate .card { width: min(420px, 100%); }

.lb-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.rank { width: 22px; color: var(--gold); font-weight: 800; }
.avatar {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center; background: #2a2150; font-weight: 800;
}
.float-gain {
  position: absolute; color: var(--green); font-weight: 800; pointer-events: none;
  animation: rise 0.7s ease forwards;
}
@keyframes rise { to { transform: translateY(-36px); opacity: 0; } }

.history-row { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; overscroll-behavior-y: auto; touch-action: pan-x pan-y; padding-bottom: 4px; }
.history-row::-webkit-scrollbar { display: none; }

.brand-duck {
  width: 38px; height: 38px; border-radius: 12px;
  object-fit: cover; box-shadow: 0 0 18px rgba(245, 196, 81, 0.35);
}
.bal-ico { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; display: block; }

.hello { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hello-copy { flex: 1; min-width: 0; }
.hello-art {
  width: 86px; height: 86px; object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(139, 92, 246, 0.35));
  animation: bob 3s ease-in-out infinite;
}
body[data-page="shop"] .hello-art,
body[data-page="shop"] .cover,
body[data-page="games"] .hello-art,
body[data-page="home"] .hello-art,
body[data-page="rating"] .hello-art,
body[data-page="cases"] .hello-art,
body[data-page="case"] .hello-art {
  animation: none;
}
body[data-page="rating"] .hello-art {
  filter: drop-shadow(0 10px 22px rgba(245, 196, 81, 0.45));
}
body[data-page="home"] .float-field .fx {
  animation: none;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}

.live-crash {
  min-height: 168px;
}
.live-crash .hero-art {
  position: absolute; right: -8px; bottom: -18px;
  width: 148px; height: 148px; pointer-events: none;
  filter: drop-shadow(0 12px 24px rgba(244, 114, 182, 0.35));
}
@keyframes fly {
  0%, 100% { transform: translate(0, 0) rotate(-12deg); }
  50% { transform: translate(-10px, -12px) rotate(-4deg); }
}

.gift-strip {
  display: flex; gap: 8px; overflow-x: auto;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y;
  padding: 4px 0 12px; scrollbar-width: none;
}
.gift-strip::-webkit-scrollbar { display: none; }
.gift-chip {
  flex: 0 0 auto;
  width: 72px; padding: 8px 6px 6px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  text-align: center;
}
.gift-chip img,
.gift-chip tgs-player { width: 52px; height: 52px; object-fit: contain; display: block; margin: 0 auto 4px; }
.gift-chip span { font-size: 10px; color: var(--muted); font-weight: 700; }

.game-card img.tile-art,
.game-card tgs-player.tile-art {
  position: absolute; right: -8px; bottom: -10px;
  width: 86px; height: 86px; object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.35));
  pointer-events: none;
}
.game-card i { display: none; }

.crash-stage {
  height: 340px;
  background: #05030c;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
}
.crash-stage canvas.crash-graph { height: 340px; }
.crash-flash {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at var(--bx, 70%) var(--by, 35%), rgba(255, 236, 180, 0.92), rgba(251, 113, 133, 0.35) 28%, transparent 62%);
}
.crash-stage.exploding .crash-flash { animation: crash-flash 1.15s ease-out forwards; }
@keyframes crash-flash {
  0% { opacity: 1; }
  18% { opacity: 0.85; }
  55% { opacity: 0.35; }
  100% { opacity: 0; }
}
.rocket-ship {
  position: absolute; width: 72px; height: 72px;
  object-fit: contain; pointer-events: none; z-index: 4;
  overflow: hidden;
  filter: drop-shadow(0 8px 18px rgba(244, 114, 182, 0.5)) drop-shadow(-10px 6px 16px rgba(251, 146, 60, 0.35));
  will-change: transform, opacity;
  left: 0; top: 0;
}
.rocket-ship.fly {
  filter: drop-shadow(0 8px 18px rgba(244, 114, 182, 0.5)) drop-shadow(-12px 8px 16px rgba(251, 146, 60, 0.45));
}
.rocket-ship.boom { opacity: 0; filter: none; animation: none; }
.crash-x.boom { animation: x-boom 0.55s ease; }
@keyframes x-boom {
  0% { transform: scale(1.18); text-shadow: 0 0 28px #fb7185; }
  100% { transform: none; }
}
.crash-deco {
  position: absolute; pointer-events: none; z-index: 1;
}
.crash-deco.left { left: 8px; bottom: 8px; width: 56px; opacity: 0.85; }
.crash-deco.g1 { right: 16px; top: 56px; width: 34px; opacity: 0.55; animation: bob 4s ease-in-out infinite; }
.crash-deco.g2 { right: 64px; bottom: 36px; width: 28px; opacity: 0.4; animation: bob 5s ease-in-out infinite 0.6s; }

.case-card .cover {
  width: 64px; height: 64px; object-fit: contain; flex: 0 0 64px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.35));
}
.item { align-items: center; text-align: center; }
.item img,
.item tgs-player { width: 48px; height: 48px; object-fit: contain; display: block; margin: 0 auto; }

.orb {
  width: 196px; height: 196px;
  background: radial-gradient(circle at 50% 40%, rgba(167,139,250,0.2), transparent 62%);
  box-shadow: none;
}
.orb img,
.orb tgs-player { width: 168px; height: 168px; object-fit: contain; pointer-events: none; }
.orb #tapPow {
  position: absolute; bottom: 10px; font-size: 16px;
  background: rgba(0,0,0,0.35); padding: 2px 8px; border-radius: 999px;
}

.cell { background-size: 68%; background-repeat: no-repeat; background-position: center; }
.cell.safe { background-image: url("/assets/gifts/webp/HangingStar.webp"); color: transparent; }
.cell.boom { background-image: url("/assets/gifts/webp/CookieHeart.webp"); color: transparent; filter: grayscale(0.15) saturate(1.2); }

.drop-art { width: 120px; height: 120px; object-fit: contain; display: block; margin: 8px auto; }
.drop-art.pop { animation: drop-pop 0.55s cubic-bezier(.2, 1.35, .3, 1); }
@keyframes drop-pop {
  0% { transform: scale(0.42) rotate(-10deg); opacity: 0; }
  58% { transform: scale(1.12) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
tgs-player {
  display: block;
  box-sizing: border-box;
  width: 64px;
  height: 64px;
  overflow: hidden;
  line-height: 0;
  flex: 0 0 auto;
  contain: layout paint;
}
tgs-player img.tgs-still {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
tgs-player picture,
tgs-player canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}
tgs-player.hello-art { width: 86px; height: 86px; }
tgs-player.cover { width: 64px; height: 64px; }
tgs-player.profile-duck { width: 92px; height: 92px; }
tgs-player.hero-art { width: 148px; height: 148px; }
tgs-player.tile-art { width: 86px; height: 86px; }
tgs-player.drop-art { width: 120px; height: 120px; }
tgs-player.rocket-ship { width: 72px; height: 72px; display: block; overflow: hidden; }
.profile-duck { width: 92px; height: 92px; object-fit: contain; }

.float-field { position: relative; }
.float-field .fx {
  position: absolute; width: 36px; opacity: 0.45; pointer-events: none;
  animation: bob 4.5s ease-in-out infinite;
}
.fx.a { left: 8px; top: -6px; }
.fx.b { right: 10px; top: 8px; animation-delay: 0.8s; width: 30px; }
.fx.c { right: 28%; bottom: -4px; width: 28px; animation-delay: 1.4s; }

.sticker, .cover, .hello-art, .tile-art, .hero-art, .gift-chip img, .gift-chip tgs-player,
.brand-duck, .bal-ico, .drop-art, .orb img, .orb tgs-player, .crash-deco, .rocket-ship {
  background: transparent !important;
}

.tg-emoji,
.gift-still {
  background: transparent !important;
  image-rendering: auto;
  -webkit-user-drag: none;
  pointer-events: none;
}
body[data-page="games"] .hello-art,
body[data-page="games"] .play-hero img,
body[data-page="games"] .play-tile img,
body[data-page="games"] .gift-still,
body[data-page="home"] .hello-art,
body[data-page="home"] .hero-art,
body[data-page="home"] .game-card .tile-art,
body[data-page="cases"] .hello-art,
body[data-page="cases"] .cover,
body[data-page="cases"] .gift-still,
body[data-page="cases"] .case-rares img,
body[data-page="case"] .hello-art,
body[data-page="case"] .gift-still:not(.pop),
body[data-page="case"] .drop-art:not(.pop),
body[data-page="case"] .item:not(.hit) img {
  animation: none !important;
}

.lobby-head { margin-bottom: 14px; }
.lobby-live {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 8px 0 0; padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.22);
  color: #bbf7d0; font-size: 12px; font-weight: 700;
}
.lobby-live b { font-family: Orbitron, Manrope, sans-serif; color: #fff; font-size: 13px; }
.lobby-live i, .on-pill i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: live-dot 1.6s ease-out infinite;
}
@keyframes live-dot {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.on-pill {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(6, 10, 16, 0.55);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  color: #d1fae5; font-size: 11px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.on-pill.empty { color: rgba(255,255,255,0.45); }
.on-pill.empty i { background: #6b7280; animation: none; box-shadow: none; }

.play-hero {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; color: inherit;
  min-height: 148px; padding: 22px 16px 16px;
  border-radius: 26px; margin-bottom: 14px; overflow: hidden;
  isolation: isolate;
  border: 1px solid #f472b6;
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(251, 207, 232, 0.48), transparent 50%),
    radial-gradient(90% 80% at 96% 20%, rgba(244, 114, 182, 0.4), transparent 56%),
    linear-gradient(165deg, #4a1834 0%, #22101c 48%, #10080e 100%);
  box-shadow:
    inset 0 1px 0 rgba(251, 207, 232, 0.55),
    0 0 0 1px rgba(244, 114, 182, 0.45),
    0 0 26px rgba(244, 114, 182, 0.5),
    0 0 44px rgba(236, 72, 153, 0.22);
}
.play-hero::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.18), transparent 38%);
}
.play-hero::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  z-index: 2;
}
.play-hero .ph-copy { position: relative; z-index: 1; max-width: 62%; }
.play-hero span { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #f9a8d4; font-weight: 800; }
.play-hero b { display: block; font-family: Orbitron, Manrope, sans-serif; font-size: 30px; margin: 6px 0 4px; }
.play-hero em { font-style: normal; color: var(--muted); font-size: 13px; line-height: 1.35; }
.play-hero img {
  width: 108px; height: 108px; margin-right: 2px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(244,114,182,0.45));
}
.play-hero .on-pill { top: 12px; left: 14px; }

.play-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.play-tile {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 148px; padding: 14px;
  border-radius: 22px; text-decoration: none; color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 28px rgba(0, 0, 0, 0.28);
  animation: tile-in 0.45s ease both;
  animation-delay: calc(var(--d, 0) * 0.06s);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.play-tile::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.22), transparent 38%);
}
.play-tile::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  z-index: 2;
}
.play-tile:active { transform: scale(0.975); }
@keyframes tile-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.play-tile span, .play-tile b { position: relative; z-index: 1; }
.play-tile img, .play-tile .on-pill { z-index: 1; }
.play-tile span { font-size: 11px; color: rgba(255,255,255,0.78); font-weight: 700; }
.play-tile b { font-size: 20px; line-height: 1.15; letter-spacing: -0.02em; }
.play-tile img {
  position: absolute; right: 8px; top: 28px;
  width: 72px; height: 72px; object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,0.4));
}
.pt-bombs {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(165, 243, 252, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 20%, rgba(34, 211, 238, 0.4), transparent 56%),
    linear-gradient(165deg, #163848 0%, #102028 48%, #081218 100%);
  border-color: #22d3ee;
  box-shadow:
    inset 0 1px 0 rgba(207, 250, 254, 0.55),
    0 0 0 1px rgba(34, 211, 238, 0.45),
    0 0 22px rgba(34, 211, 238, 0.5),
    0 0 40px rgba(6, 182, 212, 0.22);
}
.pt-upgrade {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(254, 240, 138, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 20%, rgba(250, 204, 21, 0.38), transparent 56%),
    linear-gradient(165deg, #3d2a0c 0%, #22180a 48%, #100c06 100%);
  border-color: #facc15;
  box-shadow:
    inset 0 1px 0 rgba(254, 249, 195, 0.55),
    0 0 0 1px rgba(250, 204, 21, 0.45),
    0 0 22px rgba(250, 204, 21, 0.48),
    0 0 40px rgba(234, 179, 8, 0.2);
}
.pt-plinko {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(221, 214, 254, 0.52), transparent 50%),
    radial-gradient(90% 80% at 96% 20%, rgba(167, 139, 250, 0.42), transparent 56%),
    linear-gradient(165deg, #2a1a58 0%, #18102e 48%, #0c0818 100%);
  border-color: #a78bfa;
  box-shadow:
    inset 0 1px 0 rgba(237, 233, 254, 0.55),
    0 0 0 1px rgba(167, 139, 250, 0.48),
    0 0 22px rgba(167, 139, 250, 0.52),
    0 0 40px rgba(139, 92, 246, 0.24);
}
.pt-arena {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(251, 207, 232, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 20%, rgba(244, 114, 182, 0.42), transparent 56%),
    linear-gradient(165deg, #4a1834 0%, #22101c 48%, #10080e 100%);
  border-color: #f472b6;
  box-shadow:
    inset 0 1px 0 rgba(251, 207, 232, 0.55),
    0 0 0 1px rgba(244, 114, 182, 0.45),
    0 0 22px rgba(244, 114, 182, 0.5),
    0 0 40px rgba(236, 72, 153, 0.22);
}
.pt-dice {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(254, 205, 211, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 20%, rgba(251, 113, 133, 0.4), transparent 56%),
    linear-gradient(165deg, #481820 0%, #241016 48%, #10080c 100%);
  border-color: #fb7185;
  box-shadow:
    inset 0 1px 0 rgba(254, 226, 226, 0.5),
    0 0 0 1px rgba(251, 113, 133, 0.45),
    0 0 22px rgba(251, 113, 133, 0.5),
    0 0 40px rgba(244, 63, 94, 0.22);
}
.pt-farm {
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(167, 243, 208, 0.5), transparent 50%),
    radial-gradient(90% 80% at 96% 20%, rgba(52, 211, 153, 0.4), transparent 56%),
    linear-gradient(165deg, #163828 0%, #102018 48%, #08140e 100%);
  border-color: #34d399;
  box-shadow:
    inset 0 1px 0 rgba(209, 250, 229, 0.55),
    0 0 0 1px rgba(52, 211, 153, 0.45),
    0 0 22px rgba(52, 211, 153, 0.5),
    0 0 40px rgba(16, 185, 129, 0.22);
}

.play-panel { overflow: hidden; }
.bombs-panel { background: linear-gradient(180deg, rgba(22,54,74,0.35), var(--card)); }

.up-ring, .up-wheel {
  position: relative;
  width: 220px; height: 220px; margin: 8px auto 16px;
}
.up-pie {
  position: absolute; inset: 0;
  border-radius: 50%;
  transform: none;
  transform-origin: 50% 50%;
  background: conic-gradient(from 0deg, #22c55e 0%, #22c55e 50%, #ef4444 50%, #ef4444 100%);
  box-shadow:
    0 10px 28px rgba(0,0,0,0.38),
    inset 0 0 0 1px rgba(255,255,255,0.12);
}
.up-hub {
  position: absolute; inset: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #2a1a38, #12081f 68%);
  display: grid; place-items: center;
  z-index: 2;
  box-shadow:
    0 0 0 3px rgba(12, 7, 20, 0.92),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.up-hub b {
  font-family: Orbitron, sans-serif; font-size: 26px; line-height: 1;
}
.up-hub span {
  position: absolute; bottom: 28px;
  font-size: 11px; color: var(--muted); font-weight: 700;
}
.up-needle {
  position: absolute; inset: 0;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  z-index: 3;
  pointer-events: none;
  background: none;
  box-shadow: none;
}
.up-needle::before {
  content: "";
  position: absolute;
  left: 50%; top: 2px;
  width: 2px; height: 16px;
  margin-left: -1px;
  border-radius: 99px;
  background: linear-gradient(#fff, #f5c451);
  box-shadow: 0 0 8px rgba(245, 196, 81, 0.55);
}
.up-needle::after {
  content: "";
  position: absolute;
  left: 50%; top: -1px;
  width: 6px; height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255,255,255,0.7);
}
.up-tick {
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid rgba(255,255,255,0.92);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
.up-wheel.live .up-hub { box-shadow: 0 0 0 5px rgba(18, 8, 31, 0.88), 0 0 28px rgba(52, 211, 153, 0.25); }
.up-wheel.spin .up-needle { filter: drop-shadow(0 0 10px #f5c451); }
.up-wheel.bust .up-hub { box-shadow: 0 0 0 5px rgba(18, 8, 31, 0.88), 0 0 24px rgba(251, 113, 133, 0.35); }
.up-panel.is-spinning .dice-rail,
.up-panel.is-spinning .dice-chances {
  pointer-events: none;
  opacity: 0.42;
}
.up-panel.is-spinning .dice-rail input { cursor: default; }
.up-ring img,
.up-ring tgs-player,
.up-wheel img,
.up-wheel tgs-player { width: 88px; height: 88px; opacity: 0.9; }
@keyframes spin { to { transform: rotate(360deg); } }

.plinko-panel { padding: 12px; }
.pk-toolbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.pk-risk, .pk-rows { display: flex; gap: 6px; flex-wrap: wrap; }
.pk-chip {
  flex: 1; min-width: 44px; height: 36px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  color: var(--muted); font-weight: 800; font-size: 12px; cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.pk-chip:active { transform: scale(0.96); }
.pk-chip:disabled { opacity: 0.45; cursor: default; transform: none; }
.pk-chip.on {
  color: #fff;
  background: rgba(139,92,246,0.32);
  border-color: rgba(167,139,250,0.55);
}
.pk-risk .pk-chip.on[data-risk="low"] {
  background: rgba(34,211,238,0.26);
  border-color: rgba(34,211,238,0.55);
}
.pk-risk .pk-chip.on[data-risk="medium"] {
  background: rgba(245,196,81,0.22);
  border-color: rgba(245,196,81,0.5);
  color: #fff6d2;
}
.pk-risk .pk-chip.on[data-risk="high"] {
  background: rgba(251,113,133,0.26);
  border-color: rgba(251,113,133,0.55);
}
.pk-hist { min-height: 28px; margin-bottom: 8px; }
.pk-hist .chip { animation: pk-chip-in 0.28s ease; }
@keyframes pk-chip-in {
  from { transform: translateY(-8px) scale(0.8); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.plinko-stage {
  position: relative; width: 100%; height: 420px; margin-bottom: 12px;
  border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow:
    inset 0 0 50px rgba(139,92,246,0.14),
    inset 0 -36px 40px rgba(0,0,0,0.28),
    0 16px 40px rgba(0,0,0,0.28);
  transition: box-shadow 0.3s ease;
}
.plinko-stage[data-risk="low"] {
  box-shadow: inset 0 0 50px rgba(34,211,238,0.16), inset 0 -36px 40px rgba(0,0,0,0.28);
}
.plinko-stage[data-risk="high"] {
  box-shadow: inset 0 0 50px rgba(251,113,133,0.16), inset 0 -36px 40px rgba(0,0,0,0.28);
}
.plinko-stage canvas { display: block; width: 100%; height: 100%; }
.pk-bins {
  position: absolute; left: 6px; right: 6px; bottom: 8px;
  z-index: 2; display: flex; justify-content: center; align-items: stretch;
  gap: 2px; height: 32px; pointer-events: none;
}
.pk-bin {
  flex: 1; max-width: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-weight: 800; font-size: 10px; line-height: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}
.pk-bin.hi { color: #34d399; }
.pk-bin.mid { color: #f5c451; }
.pk-bin.lo { color: #fb7185; }
.pk-bin.on {
  transform: translateY(-2px);
  box-shadow: 0 0 16px currentColor;
  background: rgba(255,255,255,0.12);
}
.pk-pay {
  position: absolute; left: 50%; top: 18px; transform: translateX(-50%);
  z-index: 2; pointer-events: none;
  padding: 7px 14px; border-radius: 999px;
  font-weight: 800; font-size: 15px; letter-spacing: 0.02em;
  animation: pk-pay-in 0.35s ease;
}
.pk-pay.win { background: rgba(16,185,129,0.92); color: #ecfdf5; }
.pk-pay.lose { background: rgba(244,63,94,0.9); color: #fff1f2; }
@keyframes pk-pay-in {
  from { transform: translateX(-50%) translateY(-10px) scale(0.86); opacity: 0; }
  to { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}
.plinko-panel .btn-gold { position: relative; overflow: hidden; }
.plinko-panel .btn-gold::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.28) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: pk-shine 2.8s ease-in-out infinite;
}
@keyframes pk-shine {
  0%, 55% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}

.arena-ring {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center;
  margin-bottom: 12px; padding: 8px 0;
}
.fighter { text-align: center; }
.fighter img,
.fighter tgs-player,
.fighter img { width: 84px; height: 84px; object-fit: contain; }
.fighter b { display: block; font-size: 13px; }
.fighter em { font-style: normal; font-family: Orbitron, sans-serif; font-size: 18px; }
.fighter .power {
  height: 7px; border-radius: 99px; overflow: hidden;
  background: rgba(255,255,255,0.08); margin: 6px 8px;
}
.fighter .power i { display: block; height: 100%; width: 0; transition: width 0.4s ease; }
.fighter.you .power i { background: linear-gradient(90deg, #22d3ee, #8b5cf6); }
.fighter.foe .power i { background: linear-gradient(90deg, #fb7185, #f5c451); }
.arena-vs { font-family: Orbitron, sans-serif; color: var(--gold); font-weight: 800; }
.arena-ring.clash .fighter img,
.arena-ring.clash .fighter tgs-player,
.arena-ring.clash .fighter img { animation: bob 0.2s ease-in-out 3; }
.arena-ring.win .fighter.you img { filter: drop-shadow(0 0 16px #34d399); }
.arena-ring.lose .fighter.you img { filter: grayscale(0.4); }
.weapon-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.weapon {
  height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.04); color: var(--text); font-weight: 800; cursor: pointer;
}
.weapon.on { background: rgba(139,92,246,0.28); border-color: rgba(167,139,250,0.6); }

.dice-panel {
  background:
    radial-gradient(240px 140px at 100% 0%, rgba(244,114,182,0.22), transparent 58%),
    radial-gradient(220px 140px at 0% 100%, rgba(139,92,246,0.2), transparent 58%),
    linear-gradient(180deg, rgba(48, 18, 42, 0.55), var(--card));
}
.dice-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.dice-stat { text-align: center; }
.dice-stat span {
  display: block; font-size: 10px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.dice-stat b {
  font-family: Orbitron, Manrope, sans-serif;
  font-size: 22px; color: var(--gold); line-height: 1.2;
}
.dice-stat.chance b { color: #22d3ee; }
.dice-orb, .dice-face {
  position: relative;
  width: 128px; height: 128px; margin: 0 auto;
  border-radius: 28px;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,0.16), transparent 42%),
    linear-gradient(160deg, #4a2240, #161018);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 16px 40px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.08);
}
.dice-orb span, .dice-face span {
  font-family: Orbitron, sans-serif; font-size: 42px; font-weight: 800;
}
.dice-orb em, .dice-face em {
  position: absolute; bottom: 10px;
  font-style: normal; color: var(--muted); font-size: 11px; font-weight: 700;
}
.dice-orb.spin, .dice-face.spin { animation: bob 0.18s linear infinite; }
.dice-orb.win, .dice-face.win { box-shadow: 0 0 28px rgba(52,211,153,0.4); }
.dice-orb.lose, .dice-face.lose { box-shadow: 0 0 28px rgba(251,113,133,0.32); }
.dice-payout {
  text-align: center; font-size: 13px; color: var(--muted); font-weight: 700;
  margin: 4px 0 12px;
}
.dice-payout b { color: var(--gold); font-family: Orbitron, Manrope, sans-serif; }
.dice-rail {
  position: relative; height: 44px; margin: 8px 2px 4px;
}
.dice-rail-bg {
  position: absolute; left: 0; right: 0; top: 13px;
  display: flex; flex-direction: row;
  height: 16px; border-radius: 999px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.35);
}
.dice-winzone {
  height: 100%; width: 50%; flex: 0 0 auto;
  background: linear-gradient(90deg, #15803d, #4ade80);
  box-shadow: inset 0 0 12px rgba(187, 247, 208, 0.25);
}
.dice-losezone {
  height: 100%; flex: 1 1 auto; min-width: 0;
  background: linear-gradient(90deg, #fb7185, #9f1239);
  box-shadow: inset 0 0 12px rgba(254, 202, 202, 0.18);
}
.dice-rail-bg.reverse { flex-direction: row-reverse; }
.dice-rail input[type="range"] {
  position: absolute; inset: 0; width: 100%; margin: 0;
  background: none; appearance: none; -webkit-appearance: none; z-index: 2;
}
.dice-rail input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff;
  border: 3px solid #a78bfa;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.65);
  cursor: pointer;
}
.dice-rail input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff;
  border: 3px solid #a78bfa;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.65);
}
.dice-scale {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 800; color: var(--muted); margin-bottom: 10px;
}
.dice-scale #dTarget { color: #e9d5ff; }
.dice-chances, .dice-sides {
  display: grid; gap: 6px; margin-bottom: 12px;
}
.dice-chances { grid-template-columns: repeat(5, 1fr); }
.dice-sides { grid-template-columns: 1fr 1fr; }
.dice-chip, .dice-side {
  height: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.04); color: var(--text);
  font-weight: 800; cursor: pointer;
}
.dice-chip.on, .dice-side.on {
  color: #fff;
  background: rgba(139, 92, 246, 0.32);
  border-color: rgba(167, 139, 250, 0.55);
}
.dice-side#dOver.on {
  background: rgba(244, 114, 182, 0.28);
  border-color: rgba(244, 114, 182, 0.5);
}

.q-tabs {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
  margin-bottom: 12px;
}
.q-tab {
  height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.04); color: var(--muted); font-weight: 800; cursor: pointer;
}
.q-tab.on { color: #fff; background: rgba(139,92,246,0.3); border-color: rgba(167,139,250,0.5); }
.quest-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 12px; margin-bottom: 10px;
}
.quest-card.ready { box-shadow: inset 0 0 0 1px rgba(245,196,81,0.35); }
.quest-card.claimed { opacity: 0.55; }
.quest-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.quest-rew { color: var(--gold); font-weight: 800; white-space: nowrap; }
.quest-act { margin-top: 10px; }
.quest-act .btn { height: 40px; }

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 14px;
}
.profile-ava-ring {
  position: relative;
  flex: 0 0 auto;
  width: 86px;
  height: 86px;
  z-index: 1;
}
.profile-ava {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(196, 181, 253, 0.55);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.22),
    0 0 22px rgba(139, 92, 246, 0.4);
}
tgs-player.profile-cat {
  flex: 0 0 auto;
  width: 86px;
  height: 86px;
  margin-left: 4px;
  margin-top: -6px;
  transform: rotate(3deg);
  filter: drop-shadow(0 10px 18px rgba(139, 92, 246, 0.35));
  pointer-events: none;
}
tgs-player.profile-cat picture,
tgs-player.profile-cat canvas {
  transform: none;
}
.profile-lvl-badge {
  position: absolute;
  right: -4px;
  bottom: -2px;
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #22d3ee);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.profile-head { flex: 1; min-width: 0; }
.profile-head h1 {
  margin: 2px 0 2px;
  font-size: 22px;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.profile-xp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.profile-xp-row .top-lvl-bar {
  flex: 1;
  height: 10px;
}
.profile-xp-row span {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  color: #c4b5fd;
  font-variant-numeric: tabular-nums;
}
.profile-actions { margin: 0 0 14px; }
.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.profile-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 12px 10px;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.08);
}
.profile-stat .muted { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.profile-stat b { display: block; margin-top: 4px; font-size: 18px; letter-spacing: -0.03em; }
.ref-row { display: flex; gap: 8px; margin-top: 8px; }
.ref-row .btn { flex: 1; }

@media (max-width: 380px) {
  .topbar { left: calc(7px + var(--tg-safe-l)); right: calc(7px + var(--tg-safe-r)); padding: 7px 8px; gap: 6px; }
  .top-avatar { width: 34px; height: 34px; }
  .plus { width: 26px; height: 26px; }
  .balance-pill { padding: 5px 5px 5px 8px; max-width: 46%; }
  .top-lvl-row { max-width: 100%; }
}

body[data-page="shop"] .wrap {
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 52px);
}
.pay-hero {
  text-align: center;
  margin: 0 0 12px;
}
.pay-star-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(253, 224, 71, 0.42), transparent 62%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.28), transparent 70%);
  box-shadow:
    0 0 0 1px rgba(253, 224, 71, 0.22),
    0 0 36px rgba(245, 196, 81, 0.28);
}
.pay-star,
tgs-player.pay-star {
  width: 108px !important;
  height: 108px !important;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(245, 196, 81, 0.45));
}
tgs-player.pay-star picture,
tgs-player.pay-star canvas {
  width: 108px !important;
  height: 108px !important;
}
.pay-hero h1 {
  margin: 2px 0 4px;
  font-size: 26px;
  letter-spacing: -0.04em;
}
.pay-card {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 16px 14px 14px;
  box-shadow:
    inset 0 0 0 1px rgba(245, 196, 81, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.28);
}
.pay-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2px 2px 10px;
}
.pay-presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.pay-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 74px;
  padding: 8px 4px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}
.pay-chip img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(245, 196, 81, 0.35));
}
.pay-chip b { font-size: 13px; font-weight: 800; }
.pay-chip.on {
  color: #2a1b05;
  background: linear-gradient(180deg, #ffe08a, #f5c451);
  border-color: rgba(255, 224, 138, 0.8);
  box-shadow: 0 8px 20px rgba(245, 196, 81, 0.28);
}
.pay-chip.on img { filter: none; }
.pay-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 6, 16, 0.45);
}
.pay-custom-ico {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}
.pay-custom input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  font-size: 18px;
}
.pay-promo { display: flex; gap: 8px; margin-bottom: 8px; }
.pay-promo .input { flex: 1; margin: 0; }
.pay-promo .btn { width: auto; padding: 0 14px; height: 44px; }
.pay-promo-msg {
  min-height: 18px;
  margin: 0 2px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.pay-promo-msg.ok { color: var(--green); }
.pay-promo-msg.err { color: var(--red); }
.pay-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.22);
}
.pay-sum b {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.pay-sum-tag {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  color: #2a1b05;
  background: linear-gradient(135deg, #f5c451, #ffe08a);
}
.pay-cta { height: 50px; font-size: 16px; }

@media (max-width: 380px) {
  .pay-presets { gap: 6px; }
  .pay-chip { min-height: 68px; padding: 6px 2px; }
  .pay-chip img { width: 24px; height: 24px; }
  .pay-chip b { font-size: 12px; }
}

body[data-page="legal"] .wrap {
  max-width: 640px;
  padding: calc(18px + var(--safe-t)) 18px calc(36px + var(--safe-b));
}
.legal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.legal-brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}
.legal-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.legal-links a {
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.legal-links a.on { color: var(--gold); }
.legal-doc h1 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.03em;
}
.legal-doc .legal-updated {
  margin: 0 0 22px;
  font-size: 12px;
  color: var(--muted);
}
.legal-doc h2 {
  margin: 22px 0 8px;
  font-size: 16px;
  color: #ddd6fe;
}
.legal-doc p,
.legal-doc li {
  font-size: 14px;
  line-height: 1.6;
  color: #c9c2dc;
}
.legal-doc p { margin: 0 0 10px; }
.legal-doc ol,
.legal-doc ul { margin: 0 0 10px; padding-left: 18px; }
.legal-doc li { margin: 0 0 6px; }

#vg-boot {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  place-items: center;
  background:
    radial-gradient(620px 400px at 50% 38%, rgba(139, 92, 246, 0.3), transparent 58%),
    #12081f;
}
html.vg-booting { overflow: hidden; }
html.vg-booting #vg-boot { display: grid; }
#vg-boot.off {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.vg-boot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}
.vg-boot-inner::before {
  content: "";
  position: absolute;
  top: -10px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 196, 81, 0.4), transparent 68%);
  pointer-events: none;
}
.vg-boot-inner img,
.vg-boot-inner svg {
  width: 72px;
  height: 72px;
  display: block;
  position: relative;
  background: transparent !important;
  border: 0;
  outline: 0;
  box-shadow: none;
  filter: none;
  animation: vg-boot-pulse 1.2s ease-in-out infinite;
}
.vg-boot-inner b {
  font-size: 22px;
  letter-spacing: 0.14em;
  color: #f6f3ff;
}
.vg-boot-inner span {
  font-size: 12px;
  color: #9a91b3;
  letter-spacing: 0.1em;
}
.vg-boot-inner i {
  display: block;
  position: relative;
  width: 124px;
  height: 3px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
}
.vg-boot-inner i::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6, #f5c451);
  animation: vg-boot-bar 1.1s ease-in-out infinite;
}
@keyframes vg-boot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.86; }
}
@keyframes vg-boot-bar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

.home-rate {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  min-height: 118px;
  margin: 26px 0 4px;
  padding: 18px 16px;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  background:
    radial-gradient(120% 90% at 12% -16%, rgba(254, 240, 138, 0.48), transparent 52%),
    radial-gradient(90% 80% at 100% 110%, rgba(245, 196, 81, 0.28), transparent 56%),
    linear-gradient(165deg, #3d2a0c 0%, #22180a 48%, #100c06 100%);
  border: 1px solid #facc15;
  box-shadow:
    inset 0 1px 0 rgba(254, 249, 195, 0.5),
    0 0 0 1px rgba(250, 204, 21, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.28);
}
.home-rate-copy span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fde68a;
}
.home-rate-copy h3 {
  margin: 4px 0 2px;
  font-size: 22px;
}
.home-rate-copy em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: rgba(254, 240, 138, 0.72);
}
.home-rate-cup {
  position: absolute;
  right: -8px;
  bottom: -18px;
  width: 124px;
  height: 124px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(245, 196, 81, 0.35));
}

body[data-page="rating"] .scene-bg {
  background:
    radial-gradient(880px 480px at 108% -10%, rgba(245, 196, 81, 0.26), transparent 58%),
    radial-gradient(680px 440px at -18% 110%, rgba(139, 92, 246, 0.24), transparent 54%),
    radial-gradient(460px 280px at 48% 36%, rgba(245, 196, 81, 0.08), transparent 62%),
    linear-gradient(180deg, #1c1220 0%, #12081f 42%, #0c0714 100%);
}
body[data-page="rating"] .scene-bg .b1 { background: #f5c451; opacity: 0.2; }
body[data-page="rating"] .scene-bg .b3 { background: #d97706; opacity: 0.16; }

.rate-hello { margin-bottom: 10px; }
.rate-sub {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: rgba(253, 230, 138, 0.72);
}
.rate-arena {
  position: relative;
  isolation: isolate;
  margin: 4px 0 18px;
  padding: 18px 10px 0;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(250, 204, 21, 0.2), transparent 58%),
    linear-gradient(180deg, rgba(36, 24, 10, 0.72), rgba(12, 8, 18, 0.55));
  border: 1px solid rgba(250, 204, 21, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(254, 249, 195, 0.22),
    0 16px 40px rgba(0, 0, 0, 0.28);
}
.rate-arena::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 112%, rgba(245, 196, 81, 0.18), transparent 46%),
    linear-gradient(180deg, transparent 62%, rgba(7, 6, 13, 0.35) 100%);
}
.rate-arena::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 12px;
  background: linear-gradient(180deg, #3f2a0c, #140c08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.rate-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.16fr 1fr;
  align-items: end;
  gap: 8px;
  min-height: 248px;
}
.rate-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}
.rate-spot-who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 0 2px 10px;
}
.rate-crown {
  height: 22px;
  display: grid;
  place-items: center;
  font-family: Orbitron, Manrope, sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: 0.04em;
}
.rate-crown svg { width: 22px; height: 18px; display: block; }
.rate-spot .rate-ava {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}
.rate-spot.gold .rate-ava {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  color: #1a1004;
  background: linear-gradient(160deg, #ffe27a, #f5c451 48%, #b45309);
  border-color: #fde68a;
  box-shadow:
    0 0 0 4px rgba(245, 196, 81, 0.16),
    0 12px 28px rgba(245, 196, 81, 0.28);
}
.rate-spot.silver .rate-ava {
  background: linear-gradient(160deg, #f4f4f5, #a1a1aa);
  color: #18181b;
  border-color: rgba(244, 244, 245, 0.55);
}
.rate-spot.bronze .rate-ava {
  background: linear-gradient(160deg, #fdba74, #c2410c);
  color: #1c0a04;
  border-color: rgba(253, 186, 116, 0.5);
}
.rate-spot-who b {
  max-width: 100%;
  min-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.rate-spot.gold .rate-spot-who b { font-size: 15px; }
.rate-spot-who em {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  font-family: Orbitron, Manrope, sans-serif;
}
.rate-spot-who em small {
  font-family: Manrope, sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(253, 230, 138, 0.7);
}
.rate-spot.empty .rate-ava {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.28);
  border-style: dashed;
  box-shadow: none;
}
.rate-spot.empty .rate-spot-who b,
.rate-spot.empty .rate-spot-who em { color: var(--muted); }
.rate-spot.you .rate-ava { box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.7), 0 10px 20px rgba(0, 0, 0, 0.25); }

.rate-block {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.rate-block b {
  position: relative;
  z-index: 1;
  font-family: Orbitron, Manrope, sans-serif;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: rgba(7, 6, 13, 0.5);
}
.rate-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 28%, transparent 72%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}
.rate-block::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 140%;
  height: 42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent);
  pointer-events: none;
}
.rate-spot.silver .rate-block {
  height: 76px;
  background: linear-gradient(180deg, #f4f4f5 0%, #a1a1aa 46%, #52525b 100%);
}
.rate-spot.gold .rate-block {
  height: 112px;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, #ffe27a 0%, #f5c451 40%, #b45309 100%);
  box-shadow: 0 -12px 30px rgba(245, 196, 81, 0.28);
}
.rate-spot.bronze .rate-block {
  height: 60px;
  background: linear-gradient(180deg, #fdba74 0%, #ea580c 48%, #9a3412 100%);
}

.rate-board { position: relative; z-index: 1; }
.rate-list { display: flex; flex-direction: column; gap: 8px; }
.rate-row {
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(18, 12, 28, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rate-row::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 0;
  height: 2px;
  width: var(--w, 8%);
  max-width: calc(100% - 24px);
  background: linear-gradient(90deg, rgba(245, 196, 81, 0.15), var(--gold));
  border-radius: 2px;
  opacity: 0.85;
}
.rate-row.you {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(139, 92, 246, 0.14);
}
.rate-num {
  width: 28px;
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--gold);
  font-family: Orbitron, Manrope, sans-serif;
  font-size: 13px;
}
.rate-ava {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #2a2150;
  font-weight: 800;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
img.rate-ava {
  display: block;
  object-fit: cover;
  object-position: center;
  padding: 0;
  background: #2a2150;
}
.rate-who { flex: 1; min-width: 0; }
.rate-who b {
  display: block;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rate-void {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
.rate-void img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.rate-void b {
  font-family: Orbitron, Manrope, sans-serif;
  font-size: 13px;
  color: var(--gold);
}
.rate-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.rate-me[hidden] { display: none !important; }
.rate-me {
  position: static;
  z-index: 1;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 18px;
  background: rgba(18, 12, 28, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 196, 81, 0.4);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.rate-me span { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.rate-me b { margin-left: auto; font-family: Orbitron, Manrope, sans-serif; color: var(--gold); }
.rate-me em { font-style: normal; font-weight: 800; color: #fff; }

.farm-tag { margin: 6px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.farm-stage {
  position: relative;
  margin: 0 0 12px;
  padding: 22px 16px 16px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(167, 139, 250, 0.28), transparent 55%),
    radial-gradient(90% 70% at 80% 110%, rgba(34, 211, 238, 0.16), transparent 50%),
    linear-gradient(180deg, #161025, #0c0914);
  border: 1px solid rgba(167, 139, 250, 0.28);
}
.farm-stage.boosted {
  border-color: rgba(250, 204, 21, 0.55);
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.18);
}
.farm-orbit {
  position: absolute; inset: 8px 10px 52px;
  pointer-events: none;
}
.farm-sat {
  position: absolute; width: 34px; height: 34px; object-fit: contain; opacity: 0.85;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.4));
  animation: farm-bob 4.8s ease-in-out infinite;
}
.farm-sat:nth-child(1) { left: 8px; top: 18%; animation-delay: 0s; }
.farm-sat:nth-child(2) { right: 10px; top: 8%; animation-delay: 0.7s; width: 30px; }
.farm-sat:nth-child(3) { left: 18%; bottom: 6%; animation-delay: 1.3s; width: 28px; }
.farm-sat:nth-child(4) { right: 16%; bottom: 10%; animation-delay: 1.8s; width: 32px; }
@keyframes farm-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.farm-core { position: relative; width: 220px; height: 220px; margin: 0 auto 12px; }
.farm-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(#22d3ee calc(var(--p, 80) * 1%), rgba(255,255,255,0.08) 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  pointer-events: none;
}
.farm-stage .orb {
  position: absolute; inset: 16px;
  width: auto; height: auto; margin: 0;
  animation: pulse 2.2s ease-in-out infinite;
}
.farm-stage .orb.hit { animation: farm-punch 0.28s ease; }
.farm-stage .orb.crit { animation: farm-crit 0.42s ease; }
.farm-stage .orb.boost-hit { animation: farm-punch 0.28s ease; }
@keyframes farm-punch {
  0% { transform: scale(1); }
  45% { transform: scale(0.92); }
  100% { transform: scale(1); }
}
@keyframes farm-crit {
  0% { transform: scale(1); filter: none; }
  40% { transform: scale(1.08); filter: drop-shadow(0 0 18px rgba(250,204,21,0.7)); }
  100% { transform: scale(1); filter: none; }
}
.farm-boost-pill {
  position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  padding: 4px 10px; border-radius: 999px;
  background: rgba(250, 204, 21, 0.2); border: 1px solid rgba(250, 204, 21, 0.5);
  color: #fff6d2; font-size: 11px; font-weight: 800; white-space: nowrap;
}
.farm-energy-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 6px;
}
.farm-energy-row b { color: #fff; font-variant-numeric: tabular-nums; }
.farm-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 12px;
}
.farm-stats > div {
  padding: 10px 6px; border-radius: 14px; text-align: center;
  background: rgba(18, 15, 28, 0.9); border: 1px solid var(--line);
}
.farm-stats em { display: block; font-style: normal; font-size: 10px; font-weight: 800; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.farm-stats b { display: block; margin-top: 4px; font-size: 13px; font-weight: 800; }
.farm-claim { padding: 14px; }
.farm-claim-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 8px; }
.farm-claim-top span { display: block; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.farm-claim-top b { display: block; margin-top: 2px; font-family: Orbitron, Manrope, sans-serif; font-size: 22px; color: var(--gold); }
.farm-claim-top em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.farm-afk { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; margin-bottom: 12px; }
.farm-afk > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f5c451, #34d399); }
.farm-tabs { margin-bottom: 10px; }
.farm-ups { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.farm-mod {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 18px;
  background: rgba(18, 15, 28, 0.92); border: 1px solid var(--line);
}
.farm-mod.off { opacity: 0.72; }
.farm-mod .cover, .farm-mod tgs-player.cover { width: 56px; height: 56px; flex: 0 0 56px; }
.farm-mod-copy { flex: 1; min-width: 0; }
.farm-mod-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.farm-mod-h h3 { margin: 0; font-size: 14px; }
.farm-mod-h span { font-size: 11px; font-weight: 800; color: var(--gold); }
.farm-mod p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.farm-mod .btn { width: auto; height: 40px; padding: 0 12px; flex: 0 0 auto; }
.float-gain.crit { color: #f5c451; }
