:root {
  --bg: #08090b;
  --surface: #0e1014;
  --surface-2: #15181d;
  --line: #242831;
  --text: #f4f5f7;
  --muted: #878d98;
  --accent: #67e8b9;
  --danger: #d4636f;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  --border: var(--line);
  --panel: #0e1014;
  --panel-2: #111419;
  --accent-2: var(--accent);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
}

a { color: var(--text); }
button, input {
  font: inherit;
}

.miniapp-shell {
  padding: 18px 18px 110px;
}

.rakes-app {
  min-height: 100vh;
  overflow-x: hidden;
  padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  background: #08090b;
  color: var(--text);
}

.sheet {
  position: fixed;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 10px;
  background: rgba(0, 0, 0, 0.58);
  z-index: 60;
}

.sheet.hidden {
  display: none;
}

.sheet-card.compact-sheet {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1014;
  box-shadow: var(--shadow);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-head h2 {
  font-size: 16px;
}

.icon-button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111318;
  color: var(--muted);
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wallet-grid button,
.sheet-action {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15181d;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
}

.wallet-grid svg {
  width: 15px;
  height: 15px;
}

.compact-sheet input {
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0b0d11;
}

.compact-list {
  display: grid;
  gap: 6px;
}

.line-item {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.line-item strong,
.line-item a {
  color: var(--text);
}

/* Rakes Mini App v2. Mobile-first game screen inspired by the provided reference. */
body.rakes-app {
  min-height: 100vh;
  overflow-x: hidden;
  padding: 0;
  color: #f5f7f6;
  font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 16%, rgba(117, 229, 149, 0.12) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 24%, rgba(255, 255, 255, 0.20) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 72%, rgba(117, 229, 149, 0.10) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 86%, rgba(255, 255, 255, 0.16) 0 1px, transparent 2px),
    #030805;
  background-size: 220px 220px, 180px 180px, 260px 260px, 210px 210px, auto;
}

.rakes-app button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.rakes-mobile {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 6px calc(92px + env(safe-area-inset-bottom));
}

.casino-topbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.brand-mark {
  min-width: 78px;
  color: #f7faf8;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.top-cluster {
  display: flex;
  align-items: center;
  gap: 7px;
}

.balance-chip,
.avatar-chip {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 255, 163, 0.08);
  border-radius: 12px;
  background: #09140d;
  color: #6df28e;
}

.balance-chip {
  gap: 7px;
  padding: 0 11px;
  color: #75f096;
  font-size: 14px;
  font-weight: 800;
}

.balance-chip small {
  color: rgba(117, 240, 150, 0.72);
  font-size: 10px;
  font-weight: 700;
}

.avatar-chip {
  width: 34px;
  border-radius: 50%;
  color: #07100b;
  background: #f97373;
}

.balance-chip svg,
.avatar-chip svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.round-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 32px 0 10px;
  padding: 0 1px;
}

.round-head div:last-child {
  text-align: right;
}

.round-head span,
.round-strip span {
  display: block;
  color: rgba(245, 247, 246, 0.62);
  font-size: 15px;
  line-height: 1.1;
}

.round-head strong {
  display: block;
  margin-top: 4px;
  color: #f8faf9;
  font-size: clamp(29px, 8.3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.round-head strong small {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  margin-left: 4px;
  border-radius: 50%;
  background: #4ee781;
  color: #06220f;
  font-size: 10px;
  letter-spacing: -0.02em;
  vertical-align: 5px;
}

.round-head em {
  display: block;
  max-width: 100%;
  margin-top: 12px;
  overflow: hidden;
  color: rgba(245, 247, 246, 0.52);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wheel-arena {
  position: relative;
  width: min(86vw, 382px);
  aspect-ratio: 1;
  margin: 16px auto 18px;
  display: grid;
  place-items: center;
}

.wheel-arena::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: #050b07;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 26px 70px rgba(0, 0, 0, 0.54);
}

.wheel-pointer {
  position: absolute;
  top: -9px;
  left: 50%;
  z-index: 3;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 0;
  border-bottom: 22px solid #f3f5f2;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.42));
}

#round-wheel {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
}

.stake-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  margin: 0 0 20px;
}

.stake-presets button {
  height: 28px;
  background: transparent;
  color: rgba(245, 247, 246, 0.68);
  font-size: 15px;
  font-weight: 600;
}

.stake-presets button:active {
  color: #70ee91;
}

.bet-dock {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 0;
  height: 52px;
  margin: 0 0 14px;
  border-radius: 10px;
  overflow: hidden;
  background: #111713;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.bet-dock label {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: #111713;
}

.bet-dock input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f5f7f6;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.bet-dock input::placeholder {
  color: rgba(245, 247, 246, 0.76);
}

.bet-dock label span {
  color: rgba(245, 247, 246, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.bet-dock button {
  background: #52e87c;
  color: #06200e;
  font-size: 15px;
  font-weight: 800;
}

.bet-dock button:disabled {
  background: #243029;
  color: rgba(245, 247, 246, 0.36);
}

.round-strip {
  height: 42px;
  display: grid;
  grid-template-columns: 0.9fr 1.35fr 1fr;
  align-items: center;
  margin: 0 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(5, 9, 7, 0.74);
}

.round-strip div {
  min-width: 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.round-strip div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.round-strip span {
  font-size: 11px;
  text-transform: uppercase;
}

.round-strip strong {
  overflow: hidden;
  color: rgba(245, 247, 246, 0.86);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-note {
  min-height: 16px;
  margin: 0 8px;
  color: rgba(245, 247, 246, 0.42);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: min(100%, 460px);
  height: calc(72px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 4px max(8px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #040806;
}

.bottom-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  background: transparent;
  color: rgba(245, 247, 246, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.bottom-nav button.active {
  color: #56ef7f;
}

.bottom-nav button:disabled {
  opacity: 0.68;
}

.bottom-nav svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
}

.rakes-app .sheet {
  align-items: end;
  padding: 10px 8px calc(82px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.64);
}

.rakes-app .sheet-card.compact-sheet {
  width: min(100%, 444px);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: #0d120f;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.rakes-app .sheet-head h2 {
  color: #f5f7f6;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.rakes-app .icon-button,
.rakes-app .wallet-grid button,
.rakes-app .sheet-action,
.rakes-app .line-item {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #111713;
  color: #f5f7f6;
}

.rakes-app .sheet-action {
  background: #52e87c;
  color: #06200e;
  font-weight: 800;
}

.rakes-app .compact-sheet input {
  height: 48px;
  padding: 0 13px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #070b08;
  color: #f5f7f6;
}

@media (max-height: 700px) {
  .round-head {
    margin-top: 18px;
  }

  .wheel-arena {
    width: min(78vw, 330px);
    margin-bottom: 10px;
  }

  .stake-presets {
    margin-bottom: 12px;
  }

  .round-note {
    display: none;
  }
}

/* Rakes Mini App v3. Independent product direction, not a reference clone. */
body.rakes-app {
  --r-bg: #050607;
  --r-panel: #0b0d0f;
  --r-panel-2: #111418;
  --r-line: rgba(255, 255, 255, 0.075);
  --r-line-strong: rgba(255, 255, 255, 0.12);
  --r-text: #f4f6f3;
  --r-muted: rgba(244, 246, 243, 0.54);
  --r-soft: rgba(244, 246, 243, 0.30);
  --r-accent: #7cff9b;
  --r-accent-dark: #0d2b17;
  --r-red: #ff6f6f;
  min-height: 100vh;
  padding: 0;
  background-color: var(--r-bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 34px 34px;
  color: var(--r-text);
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

.rakes-mobile {
  width: min(100%, 470px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 12px calc(94px + env(safe-area-inset-bottom));
}

.casino-topbar {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--r-text);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.brand-mark b {
  width: 22px;
  height: 22px;
  display: block;
  border: 2px solid var(--r-accent);
  border-radius: 8px 8px 8px 2px;
  transform: rotate(45deg);
  background: #08100a;
  box-shadow: inset 0 0 0 4px var(--r-bg);
}

.top-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.balance-chip,
.avatar-chip {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--r-line);
  background: rgba(11, 13, 15, 0.92);
}

.balance-chip {
  gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--r-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.balance-chip svg {
  color: var(--r-accent);
}

.balance-chip small {
  color: var(--r-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.avatar-chip {
  width: 36px;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  color: var(--r-text);
  background: #171a1f;
}

.avatar-chip img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.avatar-chip img[hidden] {
  display: none;
}

.balance-chip svg,
.avatar-chip svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.round-head {
  margin: 26px 0 12px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
}

.round-kicker {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.round-kicker span {
  color: var(--r-text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.round-kicker em {
  overflow: hidden;
  color: var(--r-muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.round-ledger {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  border: 1px solid var(--r-line);
  border-radius: 18px;
  background: rgba(11, 13, 15, 0.78);
  overflow: hidden;
}

.round-ledger div {
  min-width: 0;
  padding: 12px 14px;
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: left;
}

.round-ledger div + div {
  border-left: 1px solid var(--r-line);
}

.round-ledger span {
  color: var(--r-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.round-ledger strong {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--r-text);
  font-size: clamp(24px, 7vw, 32px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.92;
}

.round-ledger strong > span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.round-ledger small {
  color: var(--r-accent);
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.wheel-arena {
  position: relative;
  width: min(84vw, 376px);
  aspect-ratio: 1;
  margin: 18px auto 22px;
  display: grid;
  place-items: center;
}

.wheel-arena::before {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid var(--r-line);
  border-radius: 50%;
  background: #07090a;
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.45), inset 0 0 0 12px rgba(255, 255, 255, 0.012);
}

.wheel-arena::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(0, 0, 0, 0.38);
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
}

.wheel-pointer {
  position: absolute;
  top: -13px;
  left: 50%;
  z-index: 4;
  width: 34px;
  height: 26px;
  transform: translateX(-50%);
  border: 0;
  background: var(--r-text);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

#round-wheel {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: clamp(82px, 25vw, 112px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 50%;
  background: #050607;
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.012);
  pointer-events: none;
}

.wheel-hub span {
  max-width: 96%;
  overflow: hidden;
  color: var(--r-text);
  font-size: clamp(25px, 8vw, 38px);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.9;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wheel-hub small {
  color: var(--r-accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
}

.stake-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 0 0 14px;
}

.stake-presets button {
  height: 34px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--r-muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.stake-presets button:active {
  border-color: var(--r-line);
  background: var(--r-panel-2);
  color: var(--r-accent);
}

.bet-dock {
  height: 58px;
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 8px;
  margin: 0 0 12px;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.bet-dock label,
.bet-dock button {
  border: 1px solid var(--r-line);
  border-radius: 18px;
}

.bet-dock label {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: var(--r-panel);
}

.bet-dock input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--r-text);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.bet-dock input::placeholder {
  color: rgba(244, 246, 243, 0.56);
}

.bet-dock label span {
  color: var(--r-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.bet-dock button {
  background: var(--r-accent);
  color: #061007;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.bet-dock button:disabled {
  background: #161a18;
  color: var(--r-soft);
}

.round-strip {
  min-height: 46px;
  height: auto;
  display: grid;
  grid-template-columns: 0.82fr 1.28fr 1fr;
  align-items: stretch;
  margin: 0 0 10px;
  border: 1px solid var(--r-line);
  border-radius: 18px;
  background: rgba(6, 8, 9, 0.76);
}

.round-strip div {
  min-width: 0;
  padding: 9px 10px;
  display: grid;
  align-content: center;
  gap: 3px;
}

.round-strip div + div {
  border-left: 1px solid var(--r-line);
}

.round-strip span {
  color: var(--r-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.round-strip strong {
  overflow: hidden;
  color: var(--r-text);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-note {
  margin: 0 8px;
  color: rgba(244, 246, 243, 0.36);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: min(100%, 470px);
  height: calc(76px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 12px max(9px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border-top: 1px solid var(--r-line);
  background: rgba(5, 6, 7, 0.96);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border-radius: 16px;
  background: transparent;
  color: var(--r-muted);
  font-size: 10px;
  font-weight: 800;
}

.bottom-nav button.active {
  background: rgba(124, 255, 155, 0.08);
  color: var(--r-accent);
}

.bottom-nav button:disabled {
  opacity: 0.58;
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.6;
}

.rakes-app .sheet {
  padding: 10px 10px calc(86px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.68);
}

.rakes-app .sheet-card.compact-sheet {
  width: min(100%, 450px);
  padding: 16px;
  border: 1px solid var(--r-line);
  border-radius: 22px;
  background: #090b0c;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.rakes-app .sheet-head h2 {
  color: var(--r-text);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.rakes-app .icon-button,
.rakes-app .wallet-grid button,
.rakes-app .line-item {
  border-color: var(--r-line);
  border-radius: 15px;
  background: var(--r-panel);
  color: var(--r-text);
}

.rakes-app .sheet-action {
  min-height: 46px;
  border: 0;
  border-radius: 15px;
  background: var(--r-accent);
  color: #061007;
  font-weight: 900;
}

.rakes-app .compact-sheet input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--r-line);
  border-radius: 15px;
  background: #050607;
  color: var(--r-text);
  font-weight: 800;
}

@media (max-width: 360px) {
  .rakes-mobile {
    padding-left: 9px;
    padding-right: 9px;
  }

  .round-ledger strong {
    font-size: 27px;
  }

  .bet-dock {
    grid-template-columns: 1fr 92px;
  }
}

/* Rakes Mini App v4. Screen-matched premium wheel layout. */
body.rakes-app {
  --r-bg: #030706;
  --r-card: rgba(6, 16, 13, 0.84);
  --r-card-2: rgba(10, 22, 18, 0.92);
  --r-line: rgba(97, 255, 137, 0.20);
  --r-line-soft: rgba(255, 255, 255, 0.075);
  --r-text: #f4f7f3;
  --r-muted: rgba(244, 247, 243, 0.56);
  --r-accent: #4fff7c;
  --r-accent-2: #1fd85c;
  min-height: 100vh;
  color: var(--r-text);
  background:
    radial-gradient(circle at 9% 4%, rgba(68, 255, 118, 0.20), transparent 24%),
    radial-gradient(circle at 84% 0%, rgba(68, 255, 118, 0.10), transparent 22%),
    linear-gradient(rgba(93, 255, 133, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 255, 133, 0.03) 1px, transparent 1px),
    #030706;
  background-size: auto, auto, 38px 38px, 38px 38px, auto;
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

.rakes-mobile {
  width: min(100%, 736px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(23px, env(safe-area-inset-top)) 38px calc(116px + env(safe-area-inset-bottom));
  border-left: 1px solid rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.02);
}

.casino-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.brand-mark b {
  width: 49px;
  height: 49px;
  border: 4px solid var(--r-accent);
  border-radius: 15px 15px 15px 5px;
  transform: rotate(45deg);
  background: rgba(24, 255, 96, 0.06);
  box-shadow: 0 0 24px rgba(79, 255, 124, 0.58), inset 0 0 0 7px #040a07;
}

.top-cluster {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.balance-chip,
.avatar-chip {
  height: 64px;
  border: 1px solid var(--r-line);
  background: rgba(7, 14, 12, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 0 22px rgba(58, 255, 105, 0.08);
}

.balance-chip {
  min-width: 183px;
  gap: 13px;
  padding: 0 19px;
  border-radius: 18px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.balance-chip svg {
  width: 29px;
  height: 29px;
  color: var(--r-accent);
}

.balance-chip small {
  color: rgba(244, 247, 243, 0.70);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.avatar-chip {
  width: 64px;
  border-radius: 18px;
  color: var(--r-text);
}

.avatar-chip svg {
  width: 29px;
  height: 29px;
}

.round-head {
  margin: 52px 0 18px;
  display: grid;
  gap: 19px;
}

.round-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.round-kicker span {
  color: var(--r-text);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.round-kicker em {
  position: relative;
  padding: 8px 31px 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  background: rgba(8, 15, 13, 0.88);
  color: rgba(244, 247, 243, 0.68);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.round-kicker em::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--r-accent);
  box-shadow: 0 0 12px rgba(79, 255, 124, 0.85);
}

.round-ledger {
  min-height: 116px;
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  border: 1px solid var(--r-line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 0%, rgba(83, 255, 129, 0.17), transparent 34%),
    radial-gradient(circle at 86% 0%, rgba(83, 255, 129, 0.10), transparent 31%),
    var(--r-card);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 0 34px rgba(42, 255, 101, 0.13);
  overflow: hidden;
}

.round-ledger .stat-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  text-align: left;
}

.round-ledger .stat-card + .stat-card {
  border-left: 1px solid rgba(255, 255, 255, 0.085);
}

.stat-icon {
  width: 72px;
  height: 72px;
  padding: 20px;
  border: 1px solid rgba(79, 255, 124, 0.22);
  border-radius: 50%;
  color: var(--r-accent);
  background: rgba(8, 16, 13, 0.86);
  box-shadow: inset 0 -13px 32px rgba(79, 255, 124, 0.09), 0 0 20px rgba(79, 255, 124, 0.10);
}

.round-ledger section {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.round-ledger span {
  color: var(--r-muted);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.round-ledger strong {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--r-text);
  font-size: clamp(34px, 8vw, 42px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.round-ledger strong > span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-ledger small {
  padding: 5px 9px;
  border: 1px solid rgba(79, 255, 124, 0.35);
  border-radius: 999px;
  color: var(--r-accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wheel-arena {
  position: relative;
  width: min(78vw, 532px);
  aspect-ratio: 1;
  margin: 23px auto 21px;
  display: grid;
  place-items: center;
}

.wheel-arena::before {
  content: "";
  position: absolute;
  inset: -19px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 63%, rgba(255, 255, 255, 0.20) 64%, rgba(4, 7, 6, 1) 69%, rgba(255, 255, 255, 0.15) 70%, rgba(8, 12, 11, 1) 75%, rgba(0, 0, 0, 0) 76%),
    #050807;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.74), 0 0 42px rgba(79, 255, 124, 0.16);
}

.wheel-arena::after {
  content: "";
  position: absolute;
  inset: 22px;
  z-index: 3;
  border: 2px solid rgba(79, 255, 124, 0.34);
  border-radius: 50%;
  box-shadow: inset 0 0 22px rgba(79, 255, 124, 0.12), 0 0 18px rgba(79, 255, 124, 0.18);
  pointer-events: none;
}

.wheel-pointer {
  position: absolute;
  top: -21px;
  left: 50%;
  z-index: 7;
  width: 54px;
  height: 62px;
  transform: translateX(-50%);
  border: 0;
  background: linear-gradient(160deg, #ffffff, #a9aaa7 46%, #ffffff 100%);
  clip-path: polygon(50% 100%, 6% 8%, 94% 8%);
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.64)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.32));
}

#round-wheel {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: clamp(108px, 27vw, 144px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(79, 255, 124, 0.36);
  border-radius: 50%;
  background: radial-gradient(circle, #08120d 0 58%, #030706 59% 100%);
  box-shadow: 0 0 22px rgba(79, 255, 124, 0.20), inset 0 0 0 12px rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.wheel-hub span {
  max-width: 94%;
  overflow: hidden;
  color: var(--r-text);
  font-size: clamp(42px, 10vw, 58px);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.82;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wheel-hub small {
  color: var(--r-accent);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
}

.stake-presets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 15px;
  margin: 0 10px 14px;
}

.stake-presets button {
  height: 35px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(7, 13, 11, 0.86);
  color: rgba(244, 247, 243, 0.86);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  box-shadow: inset 0 -12px 24px rgba(79, 255, 124, 0.025);
}

.stake-presets button:active,
.stake-presets button.is-active {
  border-color: rgba(79, 255, 124, 0.60);
  color: var(--r-text);
  box-shadow: 0 0 18px rgba(79, 255, 124, 0.18), inset 0 -12px 24px rgba(79, 255, 124, 0.08);
}

.bet-dock {
  height: 87px;
  display: grid;
  grid-template-columns: 1fr 199px;
  gap: 14px;
  margin: 0 0 18px;
  padding: 9px;
  border: 1px solid var(--r-line);
  border-radius: 20px;
  background: rgba(6, 14, 11, 0.92);
  box-shadow: 0 0 30px rgba(79, 255, 124, 0.10), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.bet-dock label,
.bet-dock button {
  border-radius: 15px;
}

.bet-dock label {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(5, 9, 8, 0.94);
}

.bet-dock input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--r-text);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.065em;
}

.bet-dock label span {
  color: rgba(244, 247, 243, 0.74);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.bet-dock button {
  border: 1px solid rgba(190, 255, 202, 0.42);
  background: linear-gradient(145deg, #67ff8a 0%, #29df5b 48%, #91ffaa 100%);
  color: #061008;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.045em;
  box-shadow: 0 0 28px rgba(79, 255, 124, 0.36), inset 0 -18px 32px rgba(0, 0, 0, 0.12);
}

.bet-dock button:disabled {
  border-color: rgba(255, 255, 255, 0.07);
  background: #131916;
  color: rgba(244, 247, 243, 0.30);
  box-shadow: none;
}

.round-strip {
  min-height: 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 13px;
  border: 1px solid var(--r-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 15%, rgba(79, 255, 124, 0.12), transparent 34%),
    rgba(7, 15, 12, 0.92);
  box-shadow: 0 0 28px rgba(79, 255, 124, 0.11), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.round-strip div {
  min-width: 0;
  padding: 18px 17px;
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.round-strip div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.round-strip i {
  width: 45px;
  height: 45px;
  padding: 10px;
  border-radius: 50%;
  color: var(--r-accent);
  background: rgba(79, 255, 124, 0.09);
  box-shadow: 0 0 18px rgba(79, 255, 124, 0.16);
}

.round-strip section {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.round-strip span {
  color: var(--r-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.round-strip strong {
  overflow: hidden;
  color: var(--r-text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-note {
  min-height: 22px;
  margin: 0 8px;
  color: rgba(244, 247, 243, 0.55);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}

.round-note strong,
.round-note a {
  color: var(--r-accent);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 50;
  width: min(calc(100% - 28px), 708px);
  height: calc(76px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 7px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(7, 11, 10, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.50), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border-radius: 14px;
  background: transparent;
  color: rgba(244, 247, 243, 0.64);
  font-size: 13px;
  font-weight: 500;
}

.bottom-nav button.active {
  border: 1px solid rgba(79, 255, 124, 0.20);
  background: rgba(79, 255, 124, 0.08);
  color: var(--r-accent);
  box-shadow: inset 0 0 0 1px rgba(79, 255, 124, 0.05), 0 0 18px rgba(79, 255, 124, 0.12);
}

.bottom-nav svg {
  width: 27px;
  height: 27px;
  stroke-width: 2.3;
}

@media (max-width: 540px) {
  .rakes-mobile {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-mark {
    gap: 12px;
    font-size: 22px;
  }

  .brand-mark b {
    width: 39px;
    height: 39px;
  }

  .balance-chip {
    min-width: 126px;
    height: 48px;
    padding: 0 12px;
    font-size: 17px;
  }

  .balance-chip small {
    font-size: 10px;
  }

  .avatar-chip {
    width: 48px;
    height: 48px;
  }

  .round-head {
    margin-top: 32px;
  }

  .round-ledger {
    min-height: 92px;
  }

  .round-ledger .stat-card {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 13px;
    padding: 16px 15px;
  }

  .stat-icon {
    width: 54px;
    height: 54px;
    padding: 15px;
  }

  .round-ledger strong {
    font-size: 30px;
  }

  .round-ledger small {
    font-size: 11px;
  }

  .wheel-arena {
    width: min(82vw, 420px);
  }

  .stake-presets {
    gap: 8px;
    margin-left: 0;
    margin-right: 0;
  }

  .bet-dock {
    grid-template-columns: 1fr 132px;
    height: 74px;
  }

  .bet-dock input {
    font-size: 28px;
  }

  .bet-dock button {
    font-size: 19px;
  }

  .round-strip {
    min-height: 78px;
  }

  .round-strip div {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    padding: 14px 10px;
  }

  .round-strip i {
    width: 36px;
    height: 36px;
    padding: 8px;
  }
}

@media (max-width: 380px) {
  .casino-topbar {
    gap: 8px;
  }

  .brand-mark span {
    display: none;
  }

  .round-ledger {
    grid-template-columns: 1fr;
  }

  .round-ledger .stat-card + .stat-card {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .bet-dock {
    grid-template-columns: 1fr 112px;
  }

  .round-strip {
    grid-template-columns: 1fr;
  }

  .round-strip div + div {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* v4.5 final stat scale and neutral bet dock. Must stay at EOF. */
.rakes-app .round-ledger {
  min-height: 102px !important;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  border-radius: 18px !important;
}

.rakes-app .round-ledger .stat-card {
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 13px !important;
  padding: 17px 15px !important;
  place-items: center start !important;
  text-align: left !important;
}

.rakes-app .round-ledger .stat-card + .stat-card {
  border-left-color: rgba(255, 255, 255, 0.10) !important;
}

.rakes-app .stat-icon {
  width: 48px !important;
  height: 48px !important;
  padding: 12px !important;
}

.rakes-app .round-ledger section {
  height: 58px !important;
  grid-template-rows: 22px 32px !important;
  gap: 4px !important;
  place-items: start !important;
  align-content: center !important;
}

.rakes-app .round-ledger span {
  height: 22px !important;
  color: rgba(244, 247, 243, 0.78) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  line-height: 22px !important;
}

.rakes-app .round-ledger strong {
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: start !important;
  gap: 8px !important;
  overflow: visible !important;
  font-size: 31px !important;
  font-weight: 800 !important;
  letter-spacing: -0.015em !important;
  line-height: 32px !important;
  text-align: left !important;
}

.rakes-app .round-ledger strong > span {
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  overflow: visible !important;
  padding-right: 2px !important;
  line-height: 32px !important;
}

.rakes-app .round-ledger .token-logo {
  width: 25px !important;
  height: 25px !important;
}

.rakes-app .bet-dock {
  height: 68px !important;
  grid-template-columns: 1fr 112px !important;
  gap: 8px !important;
  padding: 8px !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  background: rgba(7, 11, 10, 0.92) !important;
  box-shadow: none !important;
}

.rakes-app .bet-dock label,
.rakes-app .bet-dock button {
  min-height: 52px !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  box-shadow: none !important;
}

.rakes-app .bet-dock label {
  padding: 0 18px !important;
  background: rgba(4, 7, 6, 0.96) !important;
}

.rakes-app .bet-dock input {
  height: 52px !important;
  line-height: 52px !important;
  font-size: 26px !important;
}

.rakes-app .bet-dock button {
  border: 0 !important;
  background: #f4f7f3 !important;
  color: #050706 !important;
  font-size: 17px !important;
}

@media (max-width: 380px) {
  .rakes-app .round-ledger .stat-card {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 14px 10px !important;
  }

  .rakes-app .stat-icon {
    width: 42px !important;
    height: 42px !important;
    padding: 11px !important;
  }

  .rakes-app .round-ledger span {
    font-size: 12px !important;
  }

  .rakes-app .round-ledger strong {
    font-size: 27px !important;
  }

  .rakes-app .bet-dock {
    grid-template-columns: 1fr 100px !important;
  }
}

/* v4.8 EOF: balanced panel, real spacing, neutral bet controls. */
.rakes-app .round-head {
  margin: 22px 0 20px !important;
  gap: 12px !important;
}

.rakes-app .round-ledger {
  min-height: 88px !important;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr) !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  border-radius: 17px !important;
  background:
    linear-gradient(180deg, rgba(13, 22, 18, 0.96), rgba(6, 11, 9, 0.96)) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 14px 34px rgba(0, 0, 0, 0.28) !important;
}

.rakes-app .round-ledger .stat-card {
  grid-template-columns: 40px minmax(0, 1fr) !important;
  gap: 11px !important;
  padding: 14px !important;
  place-items: center start !important;
  text-align: left !important;
}

.rakes-app .round-ledger .stat-card + .stat-card {
  border-left-color: rgba(255, 255, 255, 0.075) !important;
}

.rakes-app .stat-icon {
  width: 40px !important;
  height: 40px !important;
  padding: 10px !important;
  border-color: rgba(79, 255, 124, 0.16) !important;
  box-shadow: none !important;
}

.rakes-app .round-ledger section {
  height: 48px !important;
  grid-template-rows: 18px 28px !important;
  gap: 2px !important;
  place-items: start !important;
  align-content: center !important;
}

.rakes-app .round-ledger span {
  height: 18px !important;
  color: rgba(244, 247, 243, 0.66) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.09em !important;
  line-height: 18px !important;
}

.rakes-app .round-ledger strong {
  height: 28px !important;
  gap: 7px !important;
  font-size: 27px !important;
  font-weight: 800 !important;
  line-height: 28px !important;
}

.rakes-app .round-ledger strong > span {
  height: 28px !important;
  line-height: 28px !important;
}

.rakes-app .round-ledger .token-logo {
  width: 22px !important;
  height: 22px !important;
}

.rakes-app .wheel-arena {
  margin: 20px auto 22px !important;
}

.rakes-app .stake-presets {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
}

.rakes-app .bet-dock {
  height: 68px !important;
  grid-template-columns: 1fr 112px !important;
  gap: 8px !important;
  padding: 8px !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  background: rgba(7, 11, 10, 0.92) !important;
  box-shadow: none !important;
}

.rakes-app .bet-dock label,
.rakes-app .bet-dock button {
  min-height: 52px !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  box-shadow: none !important;
}

.rakes-app .bet-dock label {
  padding: 0 18px !important;
  background: rgba(4, 7, 6, 0.96) !important;
}

.rakes-app .bet-dock input {
  height: 52px !important;
  line-height: 52px !important;
  font-size: 26px !important;
}

.rakes-app .bet-dock button {
  border: 0 !important;
  background: #f4f7f3 !important;
  color: #050706 !important;
  font-size: 17px !important;
}

@media (max-width: 380px) {
  .rakes-app .round-ledger {
    min-height: 82px !important;
  }

  .rakes-app .round-ledger .stat-card {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 12px 9px !important;
  }

  .rakes-app .stat-icon {
    width: 34px !important;
    height: 34px !important;
    padding: 8px !important;
  }

  .rakes-app .round-ledger span {
    font-size: 10px !important;
  }

  .rakes-app .round-ledger strong {
    font-size: 23px !important;
  }

  .rakes-app .round-ledger .token-logo {
    width: 19px !important;
    height: 19px !important;
  }

  .rakes-app .bet-dock {
    grid-template-columns: 1fr 100px !important;
  }
}

/* v4.7 balanced pool panel and wheel spacing. */
.rakes-app .round-head {
  margin: 22px 0 20px !important;
  gap: 12px !important;
}

.rakes-app .round-ledger {
  min-height: 88px !important;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr) !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  border-radius: 17px !important;
  background:
    linear-gradient(180deg, rgba(13, 22, 18, 0.96), rgba(6, 11, 9, 0.96)) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 14px 34px rgba(0, 0, 0, 0.28) !important;
}

.rakes-app .round-ledger .stat-card {
  grid-template-columns: 40px minmax(0, 1fr) !important;
  gap: 11px !important;
  padding: 14px 14px !important;
  place-items: center start !important;
  text-align: left !important;
}

.rakes-app .round-ledger .stat-card + .stat-card {
  border-left-color: rgba(255, 255, 255, 0.075) !important;
}

.rakes-app .stat-icon {
  width: 40px !important;
  height: 40px !important;
  padding: 10px !important;
  border-color: rgba(79, 255, 124, 0.16) !important;
  box-shadow: none !important;
}

.rakes-app .round-ledger section {
  height: 48px !important;
  grid-template-rows: 18px 28px !important;
  gap: 2px !important;
  place-items: start !important;
  align-content: center !important;
}

.rakes-app .round-ledger span {
  height: 18px !important;
  color: rgba(244, 247, 243, 0.66) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.09em !important;
  line-height: 18px !important;
}

.rakes-app .round-ledger strong {
  height: 28px !important;
  gap: 7px !important;
  font-size: 27px !important;
  font-weight: 800 !important;
  line-height: 28px !important;
}

.rakes-app .round-ledger strong > span {
  height: 28px !important;
  line-height: 28px !important;
}

.rakes-app .round-ledger .token-logo {
  width: 22px !important;
  height: 22px !important;
}

.rakes-app .wheel-arena {
  margin: 20px auto 22px !important;
}

.rakes-app .stake-presets {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
}

.rakes-app .bet-dock {
  border-color: rgba(255, 255, 255, 0.09) !important;
  box-shadow: none !important;
}

@media (max-width: 380px) {
  .rakes-app .round-ledger {
    min-height: 82px !important;
  }

  .rakes-app .round-ledger .stat-card {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 12px 9px !important;
  }

  .rakes-app .stat-icon {
    width: 34px !important;
    height: 34px !important;
    padding: 8px !important;
  }

  .rakes-app .round-ledger span {
    font-size: 10px !important;
  }

  .rakes-app .round-ledger strong {
    font-size: 23px !important;
  }

  .rakes-app .round-ledger .token-logo {
    width: 19px !important;
    height: 19px !important;
  }
}

/* v4.4 token logo and sharper stat/input geometry. Keep this block last. */
.rakes-app .token-logo {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-block;
  object-fit: contain;
  border-radius: 50%;
  image-rendering: auto;
}

.rakes-app .balance-chip {
  min-width: 138px;
  height: 44px;
  gap: 8px;
  padding: 0 13px;
  font-size: 16px;
  line-height: 1;
}

.rakes-app .balance-chip .token-logo {
  width: 20px;
  height: 20px;
}

.rakes-app .round-ledger {
  min-height: 92px;
  border-radius: 18px;
}

.rakes-app .round-ledger .stat-card {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 14px;
}

.rakes-app .stat-icon {
  width: 44px;
  height: 44px;
  padding: 11px;
}

.rakes-app .round-ledger section {
  height: 52px;
  grid-template-rows: 18px 30px;
  gap: 4px;
  place-items: start;
}

.rakes-app .round-ledger span {
  height: 18px;
  color: rgba(244, 247, 243, 0.68);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 18px;
}

.rakes-app .round-ledger strong {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: visible;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.018em;
  line-height: 30px;
  filter: none;
  transform: translateZ(0);
}

.rakes-app .round-ledger strong > span {
  height: 30px;
  display: inline-flex;
  align-items: center;
  overflow: visible;
  padding-right: 2px;
  line-height: 30px;
}

.rakes-app .round-ledger strong .token-logo {
  width: 24px;
  height: 24px;
  margin-left: 1px;
}

.rakes-app .round-ledger small {
  display: none;
}

.rakes-app .bet-dock {
  height: 66px;
  grid-template-columns: 1fr 110px;
  padding: 8px;
}

.rakes-app .bet-dock label {
  min-height: 50px;
  padding: 0 17px;
  align-items: center;
}

.rakes-app .bet-dock input {
  height: 50px;
  line-height: 50px;
  font-size: 25px;
}

.rakes-app .bet-dock label span {
  align-self: center;
  font-size: 12px;
}

.rakes-app .bet-dock button {
  min-height: 50px;
}

@media (max-width: 380px) {
  .rakes-app .round-ledger .stat-card {
    grid-template-columns: 38px minmax(0, 1fr);
    place-items: center start;
    gap: 9px;
    padding: 12px 9px;
    text-align: left;
  }

  .rakes-app .stat-icon {
    width: 38px;
    height: 38px;
    padding: 10px;
  }

  .rakes-app .round-ledger section {
    height: 46px;
    grid-template-rows: 16px 26px;
    place-items: start;
  }

  .rakes-app .round-ledger span {
    height: 16px;
    font-size: 10px;
    line-height: 16px;
  }

  .rakes-app .round-ledger strong {
    height: 26px;
    justify-content: start;
    font-size: 24px;
    line-height: 26px;
  }

  .rakes-app .round-ledger strong > span {
    height: 26px;
    line-height: 26px;
  }

  .rakes-app .round-ledger strong .token-logo {
    width: 21px;
    height: 21px;
  }

  .rakes-app .bet-dock {
    grid-template-columns: 1fr 98px;
  }
}

/* v4 geometry fixes: strict stat alignment and contained bottom navigation. */
.round-ledger {
  min-height: 104px;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
}

.round-ledger .stat-card {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 24px;
}

.round-ledger .stat-card + .stat-card {
  border-left: 1px solid rgba(255, 255, 255, 0.075);
}

.stat-icon {
  width: 58px;
  height: 58px;
  padding: 16px;
}

.round-ledger section {
  min-width: 0;
  height: 58px;
  display: grid;
  grid-template-rows: 18px 34px;
  align-content: center;
  gap: 6px;
}

.round-ledger span {
  height: 18px;
  display: block;
  font-size: 13px;
  line-height: 18px;
}

.round-ledger strong {
  height: 34px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: start;
  gap: 9px;
  font-size: 34px;
  line-height: 34px;
  letter-spacing: -0.055em;
}

.round-ledger strong > span {
  display: block;
  height: 34px;
  line-height: 34px;
}

.round-ledger small {
  height: 24px;
  display: inline-grid;
  place-items: center;
  align-self: center;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.bottom-nav {
  height: calc(72px + env(safe-area-inset-bottom));
  padding: 6px;
  border-color: rgba(255, 255, 255, 0.075);
  border-radius: 17px;
  overflow: hidden;
}

.bottom-nav button {
  min-width: 0;
  height: 100%;
  border: 1px solid transparent;
  border-radius: 13px;
  box-shadow: none;
}

.bottom-nav button.active {
  border-color: rgba(79, 255, 124, 0.13);
  background: rgba(79, 255, 124, 0.075);
  box-shadow: inset 0 0 0 1px rgba(79, 255, 124, 0.035);
}

@media (max-width: 540px) {
  .round-ledger {
    min-height: 86px;
  }

  .round-ledger .stat-card {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 11px;
    padding: 14px 12px;
  }

  .stat-icon {
    width: 46px;
    height: 46px;
    padding: 12px;
  }

  .round-ledger section {
    height: 46px;
    grid-template-rows: 15px 27px;
    gap: 4px;
  }

  .round-ledger span {
    height: 15px;
    font-size: 10px;
    line-height: 15px;
  }

  .round-ledger strong {
    height: 27px;
    gap: 6px;
    font-size: 27px;
    line-height: 27px;
  }

  .round-ledger strong > span {
    height: 27px;
    line-height: 27px;
  }

  .round-ledger small {
    height: 20px;
    padding: 0 6px;
    font-size: 9px;
  }

  .bottom-nav {
    width: min(calc(100% - 24px), 708px);
    height: calc(70px + env(safe-area-inset-bottom));
    bottom: 10px;
  }
}

@media (max-width: 380px) {
  .round-ledger {
    grid-template-columns: 1fr 1fr;
  }

  .round-ledger .stat-card + .stat-card {
    border-left: 1px solid rgba(255, 255, 255, 0.075);
    border-top: 0;
  }

  .round-ledger .stat-card {
    grid-template-columns: 1fr;
    place-items: center;
    gap: 8px;
    padding: 12px 8px;
    text-align: center;
  }

  .round-ledger section {
    place-items: center;
  }

  .round-ledger strong {
    justify-content: center;
  }
}

.page-shell {
  padding: 28px;
}

.hero, .auth-wrap, .admin-layout, .wheel-layout {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.hero {
  display: grid;
  gap: 28px;
  padding-top: 48px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.brand-logo.small {
  width: 52px;
  height: 52px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
}

h1, h2 {
  margin: 0;
}

.lede {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.lede.small {
  max-width: 420px;
}

.card-grid, .metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.panel, .auth-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.panel {
  padding: 24px;
}

.auth-wrap {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(440px, 100%);
  padding: 32px;
}

.auth-form, .inline-form {
  display: grid;
  gap: 14px;
}

.auth-form label, .inline-form {
  display: grid;
  gap: 8px;
}

input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

button {
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--text);
  color: #0d1016;
  cursor: pointer;
  font-weight: 600;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.notice {
  padding: 14px 16px;
  border-radius: 14px;
  margin: 16px 0;
}

.notice.error {
  background: rgba(219, 102, 114, 0.12);
  border: 1px solid rgba(219, 102, 114, 0.28);
}

.topbar {
  width: min(1320px, 100%);
  margin: 0 auto 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.topbar-brand, .topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-layout {
  display: grid;
  gap: 20px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.metric {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-size: 28px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

td .row-actions {
  display: flex;
  gap: 8px;
}

.muted {
  color: var(--muted);
}

.wheel-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.miniapp-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0 18px;
  background: linear-gradient(180deg, rgba(9, 11, 15, 0.98) 72%, rgba(9, 11, 15, 0));
}

.miniapp-main {
  display: grid;
  gap: 16px;
}

.mobile-panel {
  padding: 18px;
  border-radius: 22px;
}

.miniapp-balance {
  display: grid;
  gap: 6px;
  min-width: 118px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.miniapp-balance span {
  color: var(--muted);
  font-size: 12px;
}

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

.wide-action {
  min-height: 72px;
  border-radius: 18px;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.room-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sheet {
  position: fixed;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 12px;
  background: rgba(0, 0, 0, 0.48);
  z-index: 40;
}

.sheet.hidden {
  display: none;
}

.sheet-card {
  padding: 18px;
  border-radius: 24px 24px 18px 18px;
  background: #10151c;
  border: 1px solid var(--border);
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}

.mobile-nav {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(15, 18, 24, 0.92);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  z-index: 30;
}

.nav-btn {
  min-height: 52px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav-btn.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.wheel-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 80vh;
}

#wheel-canvas {
  width: min(78vh, 80vw);
  height: min(78vh, 80vw);
  max-width: 900px;
  max-height: 900px;
}

.pointer {
  position: absolute;
  top: 42px;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 28px solid #ffffff;
  z-index: 2;
}

.winner-badge {
  position: absolute;
  bottom: 32px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.winner-badge.hidden {
  display: none;
}

.meta-stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.player-chip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 960px) {
  .page-shell { padding: 16px; }
  .wheel-layout { grid-template-columns: 1fr; }
  .brand-block { flex-direction: column; align-items: flex-start; }
  .section-head { flex-direction: column; align-items: stretch; }
  .action-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .action-grid { grid-template-columns: 1fr; }
  .miniapp-top h1 {
    font-size: 28px;
  }
}

.rakes-app .sheet {
  position: fixed;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 10px;
  background: rgba(0, 0, 0, 0.58);
  z-index: 60;
}

.rakes-app .sheet.hidden {
  display: none;
}

.rakes-app .sheet-card.compact-sheet {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1014;
  box-shadow: var(--shadow);
}

.rakes-app button {
  border-radius: 8px;
}

.rakes-app input {
  border-color: var(--line);
}

/* v4.1 final alignment fixes. Keep this block last. */
.rakes-app .round-ledger,
.rakes-app .round-ledger * {
  box-sizing: border-box;
}

.rakes-app .round-ledger .stat-card {
  justify-items: start;
  text-align: left;
}

.rakes-app .round-ledger .stat-card:nth-child(2),
.rakes-app .round-ledger .stat-card:nth-child(2) section,
.rakes-app .round-ledger .stat-card:nth-child(2) span,
.rakes-app .round-ledger .stat-card:nth-child(2) strong {
  text-align: left;
  justify-content: start;
  justify-items: start;
}

.rakes-app .round-ledger section {
  width: 100%;
}

.rakes-app .round-ledger strong {
  align-items: center;
  vertical-align: middle;
}

.rakes-app .round-ledger strong > span {
  display: inline-flex;
  align-items: center;
}

.rakes-app .round-ledger small {
  position: relative;
  top: 0;
  margin: 0;
  transform: none;
}

.rakes-app .stake-presets button {
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  line-height: 1;
  text-align: center;
}

.rakes-app .bottom-nav {
  height: calc(82px + env(safe-area-inset-bottom));
  padding: 10px;
  align-items: stretch;
  overflow: hidden;
}

.rakes-app .bottom-nav button {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 5px;
  border-radius: 14px;
  line-height: 1;
  text-align: center;
}

.rakes-app .bottom-nav button.active {
  border: 1px solid rgba(79, 255, 124, 0.12);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(79, 255, 124, 0.025);
}

.rakes-app .bottom-nav svg {
  display: block;
  margin: 0 auto;
}

.rakes-app .bottom-nav span {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1;
}

@media (max-width: 540px) {
  .rakes-app .bottom-nav {
    height: calc(78px + env(safe-area-inset-bottom));
    padding: 9px;
  }

  .rakes-app .stake-presets button {
    height: 34px;
    min-height: 34px;
  }
}

/* v4.2 typography and numeric rendering fixes. Keep this block last. */
body.rakes-app {
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
}

.rakes-app .round-ledger strong,
.rakes-app .round-ledger strong > span,
.rakes-app .balance-chip,
.rakes-app .bet-dock input,
.rakes-app .round-strip strong,
.rakes-app .wheel-hub span {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.rakes-app .round-ledger strong {
  overflow: visible;
  letter-spacing: -0.018em;
}

.rakes-app .round-ledger strong > span {
  overflow: visible;
  padding-right: 3px;
  letter-spacing: -0.018em;
  text-overflow: clip;
}

.rakes-app .round-ledger small {
  flex: 0 0 auto;
  align-self: center;
}

.rakes-app .balance-chip,
.rakes-app .bet-dock input,
.rakes-app .wheel-hub span {
  letter-spacing: -0.025em;
}

.rakes-app .wheel-hub span {
  font-size: clamp(32px, 8vw, 52px);
}

/* v5.0 admin control center refresh */
body.admin-shell {
  padding: 18px;
}

.admin-frame {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 36px);
}

.admin-sidebar,
.admin-toolbar-card,
.admin-card,
.admin-table-card,
.admin-mini-kpi {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0f1318;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.admin-sidebar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 22px 18px;
  border-radius: 28px;
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
}

.admin-sidebar-copy {
  margin: 10px 0 0;
  color: rgba(244, 247, 243, 0.54);
  font-size: 13px;
  line-height: 1.5;
}

.admin-nav {
  display: grid;
  gap: 8px;
  align-content: start;
}

.admin-nav-btn {
  min-height: 46px;
  justify-content: flex-start;
  padding: 0 14px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(244, 247, 243, 0.7);
  text-align: left;
}

.admin-nav-btn.active {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f4f7f3;
}

.admin-sidebar-bottom {
  display: grid;
  gap: 12px;
}

.admin-operator {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 6px;
}

.admin-operator span {
  color: rgba(244, 247, 243, 0.5);
  font-size: 12px;
}

.admin-sidebar-logout {
  width: 100%;
}

.admin-main {
  display: grid;
  align-content: start;
  gap: 18px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 8px 4px;
}

.admin-header h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.admin-summary-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.admin-mini-kpi {
  padding: 14px;
  border-radius: 18px;
  display: grid;
  gap: 8px;
}

.admin-mini-kpi span {
  color: rgba(244, 247, 243, 0.5);
  font-size: 12px;
}

.admin-mini-kpi strong {
  font-size: 19px;
  letter-spacing: -0.03em;
}

.admin-toolbar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.admin-toolbar-card,
.admin-card,
.admin-table-card {
  padding: 18px;
  border-radius: 26px;
}

.admin-toolbar-card {
  display: grid;
  align-content: start;
}

.admin-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-card-head h3 {
  margin: 0;
  font-size: 18px;
}

.admin-card-head span {
  color: rgba(244, 247, 243, 0.48);
  font-size: 13px;
}

.admin-stack-form {
  display: grid;
  gap: 10px;
}

.admin-input-with-action {
  position: relative;
}

.admin-stack-form input,
.admin-panel-head input {
  min-height: 46px;
  border-radius: 14px;
  background: #0b0f13;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f4f7f3;
  padding: 0 14px;
}

.admin-input-with-action input {
  width: 100%;
  padding-right: 56px;
}

.admin-stack-form button {
  min-height: 46px;
  border-radius: 14px;
}

.admin-icon-button {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 32px;
  min-width: 32px;
  min-height: 32px !important;
  height: 32px;
  padding: 0;
  border-radius: 10px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-icon-button svg {
  width: 16px;
  height: 16px;
}

.admin-inline-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: rgba(244, 247, 243, 0.48);
  font-size: 13px;
}

.admin-inline-status.good {
  color: #82f3aa;
}

.admin-inline-status.bad {
  color: #ff8888;
}

.admin-toolbar-note {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 6px;
}

.admin-toolbar-note strong {
  font-size: 14px;
}

.admin-toolbar-note span {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.admin-toolbar-note small {
  color: rgba(244, 247, 243, 0.5);
  line-height: 1.45;
}

.admin-panel {
  display: grid;
  gap: 18px;
}

.admin-panel[hidden] {
  display: none !important;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-kpi-card {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #10151b;
  display: grid;
  gap: 8px;
}

.admin-kpi-card span,
.admin-kpi-card small {
  color: rgba(244, 247, 243, 0.52);
}

.admin-kpi-card strong {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.admin-overview-grid,
.admin-games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-span-2 {
  grid-column: span 2;
}

.admin-queue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-queue-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 6px;
}

.admin-queue-card b {
  font-size: 15px;
}

.admin-queue-card p {
  margin: 0;
  color: rgba(244, 247, 243, 0.58);
}

.admin-list,
.admin-log-list {
  display: grid;
  gap: 10px;
}

.admin-list-row,
.admin-log-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.admin-list-row strong,
.admin-log-row strong,
.admin-primary-cell strong {
  display: block;
  font-size: 14px;
}

.admin-list-row small,
.admin-log-row small,
.admin-primary-cell small {
  color: rgba(244, 247, 243, 0.5);
  font-size: 12px;
}

.admin-list-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  text-transform: capitalize;
}

.admin-badge.good {
  color: #86f3af;
  background: rgba(85, 255, 129, 0.08);
}

.admin-badge.warn {
  color: #ffd46f;
  background: rgba(255, 212, 111, 0.08);
}

.admin-badge.bad {
  color: #ff8d8d;
  background: rgba(255, 141, 141, 0.08);
}

.admin-badge.neutral {
  color: rgba(244, 247, 243, 0.72);
  background: rgba(255, 255, 255, 0.04);
}

.admin-table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.admin-table th {
  color: rgba(244, 247, 243, 0.46);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-actions .ghost,
.admin-link-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.admin-actions .danger {
  color: #ff9999;
  border-color: rgba(255, 120, 120, 0.2);
}

.admin-panel-head {
  margin: 0;
}

.admin-pre,
.admin-mono {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.admin-pre {
  margin: 0;
  max-width: 320px;
  white-space: pre-wrap;
  color: rgba(244, 247, 243, 0.7);
}

.admin-empty {
  margin: 0;
  color: rgba(244, 247, 243, 0.52);
}

@media (max-width: 1240px) {
  .admin-frame {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-summary-strip,
  .admin-kpi-grid,
  .admin-overview-grid,
  .admin-games-grid,
  .admin-toolbar-grid,
  .admin-queue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  body.admin-shell {
    padding: 12px;
  }

  .admin-frame {
    gap: 12px;
  }

  .admin-summary-strip,
  .admin-kpi-grid,
  .admin-overview-grid,
  .admin-games-grid,
  .admin-toolbar-grid,
  .admin-queue-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-sidebar,
  .admin-toolbar-card,
  .admin-card,
  .admin-table-card {
    border-radius: 20px;
  }
}

.rakes-app .wheel-hub small {
  max-width: 86%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* v4.3 compact Telegram density, ticket feed and final mobile overrides. Keep this block last. */
.rakes-app .rakes-mobile {
  width: min(100%, 480px);
  padding: max(14px, env(safe-area-inset-top)) 13px calc(92px + env(safe-area-inset-bottom));
  border: 0;
}

.rakes-app .casino-topbar {
  height: 46px;
  gap: 10px;
}

.rakes-app .brand-mark {
  gap: 10px;
  font-size: 20px;
}

.rakes-app .brand-mark b {
  width: 34px;
  height: 34px;
  border-width: 3px;
  border-radius: 11px 11px 11px 4px;
  box-shadow: 0 0 16px rgba(79, 255, 124, 0.34), inset 0 0 0 5px #040a07;
}

.rakes-app .balance-chip,
.rakes-app .avatar-chip {
  height: 42px;
  border-radius: 14px;
}

.rakes-app .balance-chip {
  min-width: 124px;
  gap: 8px;
  padding: 0 12px;
  font-size: 16px;
}

.rakes-app .balance-chip svg,
.rakes-app .avatar-chip svg {
  width: 20px;
  height: 20px;
}

.rakes-app .balance-chip small {
  font-size: 10px;
}

.rakes-app .avatar-chip {
  width: 42px;
}

.rakes-app .round-head {
  margin: 22px 0 12px;
  gap: 12px;
}

.rakes-app .round-kicker span {
  font-size: 15px;
}

.rakes-app .round-kicker em {
  padding: 5px 24px 5px 10px;
  font-size: 10px;
}

.rakes-app .round-ledger {
  min-height: 78px;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  border-radius: 16px;
}

.rakes-app .round-ledger .stat-card {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  padding: 12px 11px;
}

.rakes-app .stat-icon {
  width: 38px;
  height: 38px;
  padding: 10px;
}

.rakes-app .round-ledger section {
  height: 42px;
  grid-template-rows: 14px 24px;
  gap: 4px;
  align-content: center;
}

.rakes-app .round-ledger span {
  height: 14px;
  font-size: 9px;
  line-height: 14px;
}

.rakes-app .round-ledger strong {
  height: 24px;
  gap: 5px;
  font-size: 24px;
  line-height: 24px;
}

.rakes-app .round-ledger strong > span {
  height: 24px;
  line-height: 24px;
}

.rakes-app .round-ledger small {
  height: 18px;
  padding: 0 5px;
  font-size: 8px;
}

.rakes-app .wheel-arena {
  width: min(78vw, 344px);
  margin: 15px auto 14px;
}

.rakes-app .wheel-arena::before {
  inset: -12px;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.68), 0 0 30px rgba(79, 255, 124, 0.12);
}

.rakes-app .wheel-arena::after {
  inset: 15px;
  border-width: 1px;
}

.rakes-app .wheel-pointer {
  top: -14px;
  width: 36px;
  height: 40px;
}

.rakes-app .wheel-hub {
  width: clamp(86px, 22vw, 104px);
  gap: 4px;
  border-width: 1px;
  box-shadow: 0 0 18px rgba(79, 255, 124, 0.16), inset 0 0 0 8px rgba(255, 255, 255, 0.014);
}

.rakes-app .wheel-hub span {
  font-size: clamp(27px, 7vw, 36px);
}

.rakes-app .wheel-hub small {
  font-size: 10px;
  letter-spacing: 0.10em;
}

.rakes-app .stake-presets {
  gap: 7px;
  margin: 0 0 10px;
}

.rakes-app .stake-presets button {
  height: 30px;
  min-height: 30px;
  font-size: 13px;
}

.rakes-app .bet-dock {
  height: 60px;
  grid-template-columns: 1fr 108px;
  gap: 8px;
  margin: 0 0 10px;
  padding: 6px;
  border-radius: 16px;
}

.rakes-app .bet-dock label,
.rakes-app .bet-dock button {
  border-radius: 12px;
}

.rakes-app .bet-dock label {
  padding: 0 13px;
}

.rakes-app .bet-dock input {
  font-size: 24px;
}

.rakes-app .bet-dock label span {
  font-size: 11px;
}

.rakes-app .bet-dock button {
  font-size: 16px;
}

.rakes-app .round-strip {
  min-height: 58px;
  margin: 0 0 10px;
  border-radius: 15px;
}

.rakes-app .round-strip div {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px;
  padding: 10px 8px;
}

.rakes-app .round-strip i {
  width: 28px;
  height: 28px;
  padding: 7px;
}

.rakes-app .round-strip span {
  font-size: 9px;
}

.rakes-app .round-strip strong {
  font-size: 12px;
}

.bets-feed {
  max-height: 188px;
  display: grid;
  gap: 7px;
  margin: 0 0 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.bets-feed::-webkit-scrollbar {
  display: none;
}

.bet-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(5, 10, 8, 0.86);
}

.bet-row.is-winner {
  border-color: rgba(79, 255, 124, 0.42);
  background: rgba(18, 48, 26, 0.52);
}

.bet-row-empty {
  justify-content: center;
  color: rgba(244, 247, 243, 0.42);
  font-size: 12px;
  font-weight: 700;
}

.bet-player {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.bet-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(79, 255, 124, 0.22);
  border-radius: 50%;
  background: #101613;
  color: var(--r-text);
  font-size: 12px;
  font-weight: 800;
}

.bet-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.bet-name,
.bet-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.bet-name strong,
.bet-meta strong {
  overflow: hidden;
  color: var(--r-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-name small,
.bet-meta small {
  overflow: hidden;
  color: rgba(244, 247, 243, 0.50);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-meta {
  flex: 0 0 auto;
  justify-items: end;
  text-align: right;
}

.bet-meta small {
  color: var(--r-accent);
}

.rakes-app .bottom-nav {
  width: min(calc(100% - 22px), 458px);
  height: calc(64px + env(safe-area-inset-bottom));
  bottom: 8px;
  padding: 7px;
  border-radius: 16px;
}

.rakes-app .bottom-nav button {
  border-radius: 12px;
  font-size: 10px;
  gap: 4px;
}

.rakes-app .bottom-nav svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 380px) {
  .rakes-app .brand-mark span {
    display: none;
  }

  .rakes-app .round-ledger .stat-card {
    grid-template-columns: 1fr;
    place-items: center;
    gap: 5px;
    padding: 10px 6px;
    text-align: center;
  }

  .rakes-app .round-ledger section {
    place-items: center;
  }

  .rakes-app .round-ledger strong {
    justify-content: center;
    font-size: 22px;
  }

  .rakes-app .bet-dock {
    grid-template-columns: 1fr 96px;
  }

  .rakes-app .round-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .rakes-app .round-strip div + div {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  .rakes-app .round-strip div {
    grid-template-columns: 1fr;
    place-items: center;
    gap: 5px;
    text-align: center;
  }
}

/* v4.6 absolute final overrides: no green bet border, larger POOL/PLAYERS. */
.rakes-app .round-ledger {
  min-height: 104px !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr) !important;
  border-color: rgba(255, 255, 255, 0.11) !important;
  border-radius: 18px !important;
}

.rakes-app .round-ledger .stat-card {
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 13px !important;
  padding: 17px 15px !important;
  place-items: center start !important;
  text-align: left !important;
}

.rakes-app .round-ledger .stat-card + .stat-card {
  border-left-color: rgba(255, 255, 255, 0.10) !important;
}

.rakes-app .stat-icon {
  width: 48px !important;
  height: 48px !important;
  padding: 12px !important;
}

.rakes-app .round-ledger section {
  height: 58px !important;
  grid-template-rows: 22px 32px !important;
  gap: 4px !important;
  place-items: start !important;
  align-content: center !important;
}

.rakes-app .round-ledger span {
  height: 22px !important;
  color: rgba(244, 247, 243, 0.80) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  line-height: 22px !important;
}

.rakes-app .round-ledger strong {
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: start !important;
  gap: 8px !important;
  overflow: visible !important;
  color: var(--r-text) !important;
  font-size: 31px !important;
  font-weight: 800 !important;
  letter-spacing: -0.015em !important;
  line-height: 32px !important;
  text-align: left !important;
}

.rakes-app .round-ledger strong > span {
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  overflow: visible !important;
  padding-right: 2px !important;
  line-height: 32px !important;
}

.rakes-app .round-ledger .token-logo {
  width: 25px !important;
  height: 25px !important;
}

.rakes-app .bet-dock {
  height: 68px !important;
  grid-template-columns: 1fr 112px !important;
  gap: 8px !important;
  padding: 8px !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  background: rgba(7, 11, 10, 0.92) !important;
  box-shadow: none !important;
}

.rakes-app .bet-dock label,
.rakes-app .bet-dock button {
  min-height: 52px !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  box-shadow: none !important;
}

.rakes-app .bet-dock label {
  padding: 0 18px !important;
  background: rgba(4, 7, 6, 0.96) !important;
}

.rakes-app .bet-dock input {
  height: 52px !important;
  line-height: 52px !important;
  font-size: 26px !important;
}

.rakes-app .bet-dock button {
  border: 0 !important;
  background: #f4f7f3 !important;
  color: #050706 !important;
  font-size: 17px !important;
}

@media (max-width: 380px) {
  .rakes-app .round-ledger .stat-card {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 14px 10px !important;
  }

  .rakes-app .stat-icon {
    width: 42px !important;
    height: 42px !important;
    padding: 11px !important;
  }

  .rakes-app .round-ledger span {
    font-size: 12px !important;
  }

  .rakes-app .round-ledger strong {
    font-size: 27px !important;
  }

  .rakes-app .bet-dock {
    grid-template-columns: 1fr 100px !important;
  }
}

/* v4.9 real EOF: balanced pool panel, spacing, neutral bet controls. */
.rakes-app .round-head {
  margin: 22px 0 20px !important;
  gap: 12px !important;
}

.rakes-app .round-ledger {
  min-height: 88px !important;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr) !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  border-radius: 17px !important;
  background: linear-gradient(180deg, rgba(13, 22, 18, 0.96), rgba(6, 11, 9, 0.96)) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 14px 34px rgba(0, 0, 0, 0.28) !important;
}

.rakes-app .round-ledger .stat-card {
  grid-template-columns: 40px minmax(0, 1fr) !important;
  gap: 11px !important;
  padding: 14px !important;
  place-items: center start !important;
  text-align: left !important;
}

.rakes-app .round-ledger .stat-card + .stat-card {
  border-left-color: rgba(255, 255, 255, 0.075) !important;
}

.rakes-app .stat-icon {
  width: 40px !important;
  height: 40px !important;
  padding: 10px !important;
  border-color: rgba(79, 255, 124, 0.16) !important;
  box-shadow: none !important;
}

.rakes-app .round-ledger section {
  height: 48px !important;
  grid-template-rows: 18px 28px !important;
  gap: 2px !important;
  place-items: start !important;
  align-content: center !important;
}

.rakes-app .round-ledger span {
  height: 18px !important;
  color: rgba(244, 247, 243, 0.66) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.09em !important;
  line-height: 18px !important;
}

.rakes-app .round-ledger strong {
  height: 28px !important;
  gap: 7px !important;
  font-size: 27px !important;
  font-weight: 800 !important;
  line-height: 28px !important;
}

.rakes-app .round-ledger strong > span {
  height: 28px !important;
  line-height: 28px !important;
}

.rakes-app .round-ledger .token-logo {
  width: 22px !important;
  height: 22px !important;
}

.rakes-app .wheel-arena {
  margin: 20px auto 22px !important;
}

.rakes-app .stake-presets {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
}

.rakes-app .bet-dock {
  height: 68px !important;
  grid-template-columns: 1fr 112px !important;
  gap: 8px !important;
  padding: 8px !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  background: rgba(7, 11, 10, 0.92) !important;
  box-shadow: none !important;
}

.rakes-app .bet-dock label,
.rakes-app .bet-dock button {
  min-height: 52px !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  box-shadow: none !important;
}

.rakes-app .bet-dock label {
  padding: 0 18px !important;
  background: rgba(4, 7, 6, 0.96) !important;
}

.rakes-app .bet-dock input {
  height: 52px !important;
  line-height: 52px !important;
  font-size: 26px !important;
}

.rakes-app .bet-dock button {
  border: 0 !important;
  background: #f4f7f3 !important;
  color: #050706 !important;
  font-size: 17px !important;
}

@media (max-width: 380px) {
  .rakes-app .round-ledger {
    min-height: 82px !important;
  }

  .rakes-app .round-ledger .stat-card {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 12px 9px !important;
  }

  .rakes-app .stat-icon {
    width: 34px !important;
    height: 34px !important;
    padding: 8px !important;
  }

  .rakes-app .round-ledger span {
    font-size: 10px !important;
  }

  .rakes-app .round-ledger strong {
    font-size: 23px !important;
  }

  .rakes-app .round-ledger .token-logo {
    width: 19px !important;
    height: 19px !important;
  }

  .rakes-app .bet-dock {
    grid-template-columns: 1fr 100px !important;
  }
}

/* v4.10 result popup and play-only wheel hub. */
.rakes-app .wheel-hub svg,
.rakes-app .wheel-hub [data-lucide] {
  width: 34px;
  height: 34px;
  display: none;
  color: var(--r-accent);
  stroke-width: 2.4;
}

.rakes-app .wheel-hub[data-mode="play"] span,
.rakes-app .wheel-hub[data-mode="play"] small,
.rakes-app .wheel-hub[data-mode="result"] span,
.rakes-app .wheel-hub[data-mode="result"] small,
.rakes-app .wheel-hub[data-mode="result"] svg,
.rakes-app .wheel-hub[data-mode="result"] [data-lucide] {
  display: none !important;
}

.rakes-app .wheel-hub[data-mode="play"] svg,
.rakes-app .wheel-hub[data-mode="play"] [data-lucide] {
  display: block !important;
}

.rakes-app .wheel-hub[data-mode="result"] {
  opacity: 0;
}

.result-popover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 9;
  width: min(68%, 232px);
  display: grid;
  gap: 8px;
  padding: 16px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(5, 8, 7, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  text-align: center;
  backdrop-filter: blur(10px);
  animation: result-pop 260ms ease-out both;
}

.result-popover.hidden {
  display: none;
}

.result-popover > span {
  color: rgba(244, 247, 243, 0.56);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.result-popover > strong {
  overflow: hidden;
  color: var(--r-text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-popover div {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.result-popover small {
  color: rgba(244, 247, 243, 0.52);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.result-popover b {
  color: var(--r-accent);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.result-verify-form,
.duel-verify-form {
  display: inline-flex;
  justify-content: center;
}

.result-verify-form[hidden],
.duel-verify-form[hidden] {
  display: none !important;
}

.result-verify,
.duel-verify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: var(--r-text);
  font-size: 12px;
  font-weight: 900;
}

.result-verify[hidden],
.duel-verify[hidden] {
  display: none !important;
}

.result-verify svg,
.duel-verify svg {
  width: 14px;
  height: 14px;
}

@keyframes result-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* v4.11 above-the-fold mobile layout: bet input visible without scrolling. */
.rakes-app .rakes-mobile {
  min-height: 100svh !important;
  padding: max(8px, env(safe-area-inset-top)) 12px calc(78px + env(safe-area-inset-bottom)) !important;
}

.rakes-app .casino-topbar {
  height: 42px !important;
}

.rakes-app .brand-wordmark {
  display: block !important;
  width: auto !important;
  height: 24px !important;
  max-width: min(42vw, 150px) !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;
}

.rakes-app .brand-mark {
  font-size: 18px !important;
  gap: 9px !important;
}

.rakes-app .brand-mark b {
  width: 30px !important;
  height: 30px !important;
}

.rakes-app .balance-chip,
.rakes-app .avatar-chip {
  height: 38px !important;
}

.rakes-app .avatar-chip {
  width: 38px !important;
}

.rakes-app .round-head {
  margin: 12px 0 12px !important;
  gap: 8px !important;
}

.rakes-app .round-kicker {
  min-height: 18px !important;
}

.rakes-app .round-kicker span {
  font-size: 12px !important;
}

.rakes-app .round-kicker em {
  padding: 4px 18px 4px 8px !important;
  font-size: 9px !important;
}

.rakes-app .round-ledger {
  min-height: 74px !important;
  border-radius: 15px !important;
}

.rakes-app .round-ledger .stat-card {
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 9px !important;
  padding: 10px 11px !important;
}

.rakes-app .stat-icon {
  width: 34px !important;
  height: 34px !important;
  padding: 8px !important;
}

.rakes-app .round-ledger section {
  height: 42px !important;
  grid-template-rows: 15px 25px !important;
  gap: 2px !important;
}

.rakes-app .round-ledger span {
  height: 15px !important;
  font-size: 10px !important;
  line-height: 15px !important;
}

.rakes-app .round-ledger strong {
  height: 25px !important;
  gap: 6px !important;
  font-size: 24px !important;
  line-height: 25px !important;
}

.rakes-app .round-ledger strong > span {
  height: 25px !important;
  line-height: 25px !important;
}

.rakes-app .round-ledger .token-logo {
  width: 20px !important;
  height: 20px !important;
}

.rakes-app .wheel-arena {
  width: min(70vw, 310px, calc(100svh - 312px)) !important;
  min-width: 238px !important;
  margin: 12px auto 14px !important;
}

.rakes-app .wheel-arena::before {
  inset: -10px !important;
}

.rakes-app .wheel-arena::after {
  inset: 13px !important;
}

.rakes-app .wheel-pointer {
  top: -12px !important;
  width: 30px !important;
  height: 34px !important;
}

.rakes-app .wheel-hub {
  width: clamp(74px, 20vw, 92px) !important;
}

.rakes-app .stake-presets {
  gap: 6px !important;
  margin: 0 0 8px !important;
}

.rakes-app .stake-presets button {
  height: 28px !important;
  min-height: 28px !important;
  font-size: 12px !important;
}

.rakes-app .bet-dock {
  height: 58px !important;
  grid-template-columns: 1fr 104px !important;
  gap: 7px !important;
  margin-bottom: 8px !important;
  padding: 6px !important;
}

.rakes-app .bet-dock label,
.rakes-app .bet-dock button {
  min-height: 46px !important;
}

.rakes-app .bet-dock label {
  padding: 0 15px !important;
}

.rakes-app .bet-dock input {
  height: 46px !important;
  line-height: 46px !important;
  font-size: 23px !important;
}

.rakes-app .bet-dock button {
  font-size: 16px !important;
}

.rakes-app .round-strip {
  min-height: 50px !important;
  margin-top: 8px !important;
}

.rakes-app .bets-feed {
  max-height: 150px !important;
}

@media (max-height: 640px) {
  .rakes-app .rakes-mobile {
    padding-top: max(6px, env(safe-area-inset-top)) !important;
  }

  .rakes-app .round-kicker {
    display: none !important;
  }

  .rakes-app .round-head {
    margin-top: 8px !important;
  }

  .rakes-app .wheel-arena {
    width: min(66vw, 286px, calc(100svh - 270px)) !important;
    min-width: 220px !important;
    margin-top: 10px !important;
    margin-bottom: 12px !important;
  }

  .rakes-app .round-strip {
    display: none !important;
  }

  .rakes-app .bets-feed {
    max-height: 112px !important;
  }
}

@media (max-height: 590px) {
  .rakes-app .round-ledger {
    min-height: 68px !important;
  }

  .rakes-app .wheel-arena {
    width: min(62vw, 250px, calc(100svh - 246px)) !important;
    min-width: 205px !important;
  }

  .rakes-app .stake-presets button {
    height: 26px !important;
    min-height: 26px !important;
  }

  .rakes-app .bet-dock {
    height: 54px !important;
  }
}

/* v4.12 wait icon and balanced bet dock padding. */
.rakes-app .wheel-hub[data-mode="wait"] span,
.rakes-app .wheel-hub[data-mode="wait"] small,
.rakes-app .wheel-hub[data-mode="wait"] #round-play-icon,
.rakes-app .wheel-hub[data-mode="wait"] svg:not(#round-wait-icon svg) {
  display: none !important;
}

.rakes-app .wheel-hub[data-mode="wait"] #round-wait-icon,
.rakes-app .wheel-hub[data-mode="wait"] #round-wait-icon svg,
.rakes-app .wheel-hub[data-mode="wait"] > svg {
  display: block !important;
}

.rakes-app .wheel-hub[data-mode="wait"] [data-lucide="hourglass"] {
  display: block !important;
}

.rakes-app .bet-dock {
  align-items: center !important;
  padding: 7px !important;
  height: 60px !important;
}

.rakes-app .bet-dock label,
.rakes-app .bet-dock button {
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  align-self: center !important;
}

.rakes-app .bet-dock label {
  display: grid !important;
  align-items: center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.rakes-app .bet-dock input {
  height: 46px !important;
  line-height: 46px !important;
  padding: 0 !important;
}

.rakes-app .bet-dock button {
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* v4.13 profile screen and exact wheel hub icon modes. */
.view-hidden {
  display: none !important;
}

.rakes-app .wheel-hub[data-mode="play"] svg,
.rakes-app .wheel-hub[data-mode="wait"] svg {
  display: none !important;
}

.rakes-app .wheel-hub[data-mode="play"] #round-play-icon,
.rakes-app .wheel-hub[data-mode="wait"] #round-wait-icon {
  display: block !important;
}

.profile-view {
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 12px calc(86px + env(safe-area-inset-bottom));
  color: var(--r-text);
}

.profile-top {
  height: 44px;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
}

.profile-top strong {
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.profile-back,
.profile-wallet {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 14px !important;
  background: rgba(7, 11, 10, 0.88) !important;
  color: var(--r-text) !important;
}

.profile-back svg,
.profile-wallet svg {
  width: 19px;
  height: 19px;
}

.profile-hero {
  min-height: 92px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 14px 0 10px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(13, 22, 18, 0.96), rgba(6, 11, 9, 0.96));
}

.profile-avatar {
  width: 74px;
  height: 74px;
  overflow: hidden;
  border: 1px solid rgba(79, 255, 124, 0.18);
  border-radius: 22px;
  background: #101613;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-main span,
.profile-main strong,
.profile-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-main span {
  color: var(--r-text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.profile-main strong {
  color: rgba(244, 247, 243, 0.62);
  font-size: 13px;
  font-weight: 800;
}

.profile-main small {
  color: rgba(244, 247, 243, 0.42);
  font-size: 11px;
  font-weight: 800;
}

.profile-balance-card,
.promo-card,
.profile-games-card {
  margin: 10px 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(7, 11, 10, 0.92);
}

.profile-balance-card {
  display: grid;
  gap: 5px;
}

.profile-balance-card > span,
.promo-card span,
.profile-section-head span {
  color: rgba(244, 247, 243, 0.62);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.profile-balance-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--r-text);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.profile-balance-card .token-logo {
  width: 25px;
  height: 25px;
}

.profile-balance-card small,
.promo-card small,
.profile-section-head small {
  color: rgba(244, 247, 243, 0.42);
  font-size: 11px;
  font-weight: 700;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.profile-stats div {
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(5, 8, 7, 0.86);
}

.profile-stats span {
  color: rgba(244, 247, 243, 0.48);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-stats strong {
  overflow: hidden;
  color: var(--r-text);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-card {
  display: grid;
  gap: 11px;
}

.promo-card > div {
  display: grid;
  gap: 4px;
}

.promo-card form {
  height: 48px;
  display: grid;
  grid-template-columns: 1fr 124px;
  gap: 8px;
}

.promo-card input,
.promo-card button {
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  font-weight: 900;
}

.promo-card input {
  min-width: 0;
  padding: 0 13px;
  outline: 0;
  background: rgba(4, 7, 6, 0.96);
  color: var(--r-text);
  text-transform: uppercase;
}

.promo-card button {
  background: #f4f7f3;
  color: #050706;
  font-size: 12px;
}

.promo-card button:disabled {
  opacity: 0.52;
}

#promo-status {
  min-height: 16px;
  margin: 0;
  color: rgba(244, 247, 243, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.profile-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.profile-games-list {
  display: grid;
  gap: 7px;
}

.profile-game-row {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.02);
}

.profile-game-row.empty {
  justify-content: center;
  color: rgba(244, 247, 243, 0.42);
  font-size: 12px;
  font-weight: 800;
}

.profile-game-row div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-game-row div:last-child {
  justify-items: end;
  text-align: right;
}

.profile-game-row strong,
.profile-game-row span,
.profile-game-row b {
  color: var(--r-text);
  font-size: 13px;
  font-weight: 900;
}

.profile-game-row small {
  color: rgba(244, 247, 243, 0.42);
  font-size: 10px;
  font-weight: 800;
}

.profile-game-row b {
  color: rgba(244, 247, 243, 0.58);
}

.profile-game-row.win b {
  color: var(--r-accent);
}

@media (max-width: 380px) {
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .promo-card form {
    grid-template-columns: 1fr 108px;
  }
}

/* v4.14 profile cleanup: no games block, balanced promo card, centered icon buttons. */
.profile-back,
.profile-wallet {
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
}

.profile-back svg,
.profile-wallet svg {
  display: block !important;
  width: 19px !important;
  height: 19px !important;
  margin: 0 !important;
  transform: none !important;
}

.profile-stats strong,
.profile-stats strong span,
#profile-wagered,
#profile-best-win {
  color: var(--r-text) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
}

.promo-card {
  gap: 10px !important;
  margin: 10px 0 0 !important;
  padding: 14px !important;
}

.promo-card > div {
  gap: 3px !important;
}

.promo-card form {
  height: 48px !important;
  margin: 0 !important;
}

#promo-status {
  min-height: 0 !important;
  margin: -2px 0 0 !important;
  line-height: 1.25 !important;
}

#promo-status:empty {
  display: none !important;
}

.profile-games-card,
.profile-games-list {
  display: none !important;
}

/* v4.15 mutually exclusive wheel hub icons and random-sector stop support. */
.rakes-app .wheel-hub #round-play-icon,
.rakes-app .wheel-hub #round-wait-icon {
  display: none !important;
}

.rakes-app .wheel-hub[data-mode="play"] #round-play-icon {
  display: block !important;
}

.rakes-app .wheel-hub[data-mode="play"] #round-wait-icon,
.rakes-app .wheel-hub[data-mode="wait"] #round-play-icon,
.rakes-app .wheel-hub[data-mode="timer"] #round-play-icon,
.rakes-app .wheel-hub[data-mode="timer"] #round-wait-icon,
.rakes-app .wheel-hub[data-mode="result"] #round-play-icon,
.rakes-app .wheel-hub[data-mode="result"] #round-wait-icon {
  display: none !important;
}

.rakes-app .wheel-hub[data-mode="wait"] #round-wait-icon {
  display: block !important;
}

/* v4.16 remove green round-id dot. */
.rakes-app .round-kicker em {
  padding-right: 10px !important;
}

.rakes-app .round-kicker em::after {
  display: none !important;
  content: none !important;
}

/* v4.17 Duels coinflip mode. */
.duels-view {
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 12px calc(86px + env(safe-area-inset-bottom));
  color: var(--r-text);
}

.duels-casino-topbar {
  margin-bottom: 12px;
}

.duels-top {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.duels-top div {
  display: grid;
  gap: 3px;
}

.duels-top > div > span {
  color: rgba(244, 247, 243, 0.54);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.duels-top strong {
  color: var(--r-text);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.duels-top button {
  height: 42px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,0.09) !important;
  border-radius: 14px !important;
  background: #f4f7f3 !important;
  color: #050706 !important;
  font-size: 13px;
  font-weight: 900;
}

.duels-top button span {
  color: #050706 !important;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1;
  text-transform: none;
}

.duels-top svg {
  width: 16px;
  height: 16px;
}

.duels-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.duel-card {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(13, 22, 18, 0.96), rgba(6, 11, 9, 0.96));
}

.duel-card.empty {
  display: grid;
  place-items: center;
  color: rgba(244,247,243,0.44);
  font-size: 13px;
  font-weight: 800;
}

.duel-card-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.duel-card-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: #111713;
  color: var(--r-text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.duel-card-avatar.blue {
  border-color: rgba(88, 168, 255, 0.72);
}

.duel-card-avatar.yellow {
  border-color: rgba(255, 211, 69, 0.82);
}

.duel-card-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.duel-coin {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #050706;
  font-size: 16px;
  font-weight: 1000;
}

.duel-coin.blue,
.coin-face.blue {
  background: linear-gradient(145deg, #58a8ff, #1f63ff);
}

.duel-coin.yellow,
.coin-face.yellow {
  background: linear-gradient(145deg, #ffe16a, #ffb21f);
}

.duel-card-main strong {
  color: var(--r-text);
  font-size: 19px;
  font-weight: 900;
}

.duel-card-main small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(244,247,243,0.50);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duel-card-actions {
  display: grid;
  gap: 6px;
  align-content: center;
}

.duel-card-actions button {
  width: 82px;
  height: 31px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.09) !important;
  border-radius: 11px !important;
  background: rgba(255,255,255,0.04) !important;
  color: var(--r-text) !important;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  appearance: none;
}

.duel-card-actions button[data-duel-join] {
  background: #f4f7f3 !important;
  color: #050706 !important;
}

.duel-card-actions button:disabled {
  cursor: not-allowed;
  border-color: rgba(255,255,255,0.06) !important;
  background: rgba(255,255,255,0.035) !important;
  color: rgba(244,247,243,0.34) !important;
  opacity: 1;
}

.duel-create-form {
  display: grid;
  gap: 12px;
}

.duel-create-form label {
  display: grid;
  gap: 7px;
}

.duel-create-form label span {
  color: rgba(244,247,243,0.58);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coin-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.coin-picker button {
  height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.09) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,0.04) !important;
  color: var(--r-text) !important;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1;
  appearance: none;
}

.coin-picker button.active {
  border-color: rgba(82, 232, 124, 0.92) !important;
  background: rgba(82, 232, 124, 0.08) !important;
  color: var(--r-text) !important;
  box-shadow: inset 0 0 0 1px rgba(82, 232, 124, 0.72), 0 0 0 1px rgba(82, 232, 124, 0.10) !important;
}

.rakes-app .avatar-chip {
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  line-height: 0 !important;
}

.rakes-app .avatar-chip svg {
  width: 19px !important;
  height: 19px !important;
  display: block !important;
  margin: 0 !important;
  color: var(--r-text) !important;
}

.rakes-app .avatar-chip img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
}

.rakes-app .avatar-chip img[hidden] {
  display: none !important;
}

#duel-create-status,
#duel-watch-result {
  min-height: 16px;
  margin: 0;
  color: rgba(244,247,243,0.60);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

#duel-watch-join[hidden] {
  display: none !important;
}

.duel-watch-card {
  gap: 14px !important;
}

.duel-watch-players {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.duel-player {
  min-width: 0;
  min-height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.025);
  text-align: center;
}

.duel-player.winner {
  border-color: rgba(79,255,124,0.42);
}

.duel-player img,
.duel-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
}

.duel-avatar {
  display: grid;
  place-items: center;
  color: rgba(244,247,243,0.50);
  font-weight: 900;
}

.duel-player strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--r-text);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duel-player small {
  color: rgba(244,247,243,0.48);
  font-size: 10px;
  font-weight: 800;
}

.coin-stage {
  position: relative;
  width: 100%;
  height: 128px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 800px;
}

.coin-disc {
  position: relative;
  width: 94px;
  height: 94px;
  transform-style: preserve-3d;
  will-change: transform;
}

.coin-side,
.coin-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 1000;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: inset 0 0 32px rgba(255,255,255,0.20), inset 0 -14px 30px rgba(0,0,0,0.28), 0 20px 50px rgba(0,0,0,0.45);
}

.coin-side::after {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 50%;
  content: "";
}

.coin-side-blue {
  color: #ffffff;
  background: linear-gradient(145deg, #58a8ff, #1f63ff);
}

.coin-side-yellow {
  color: #050706;
  background: linear-gradient(145deg, #ffe16a, #ffb21f);
  transform: rotateY(-180deg);
}

.coin-disc.show-blue {
  transform: rotateY(0deg);
}

.coin-disc.show-yellow {
  transform: rotateY(180deg);
}

.coin-countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--r-text);
  font-size: 58px;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1;
  animation: duel-count-pulse 0.86s cubic-bezier(.2,.8,.2,1) infinite;
}

.coin-countdown[hidden] {
  display: none;
}

.coin-stage.is-counting .coin-disc {
  opacity: 0;
  transform: scale(0.9);
}

.coin-disc.flip-blue {
  animation: duel-coin-flip-blue 3.8s ease-out forwards;
}

.coin-disc.flip-yellow {
  animation: duel-coin-flip-yellow 3.8s ease-out forwards;
}

.duel-roulette {
  position: relative;
  width: 100%;
  height: 132px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.duel-roulette[hidden] {
  display: none !important;
}

.duel-roulette-window {
  width: 100%;
  height: 92px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 18px 46px rgba(0,0,0,0.36);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.duel-roulette-pointer {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 3;
  width: 2px;
  height: 112px;
  border-radius: 999px;
  background: var(--r-accent);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.42), 0 0 18px rgba(82,232,124,0.45);
  transform: translateX(-50%);
}

.duel-roulette-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.duel-roulette-strip.animate {
  animation: duel-case-roll 10s cubic-bezier(0.08, 0.76, 0.08, 1) forwards;
}

.duel-roulette-item {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.10);
  border-radius: 50%;
  background: #101511;
  color: var(--r-text);
  font-size: 14px;
  font-weight: 900;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.duel-roulette-item.blue {
  border-color: rgba(88,168,255,0.48);
}

.duel-roulette-item.yellow {
  border-color: rgba(255,211,69,0.52);
}

.duel-roulette-item.is-winner {
  border-color: var(--r-accent);
  box-shadow: 0 0 0 2px rgba(82,232,124,0.18), 0 0 22px rgba(82,232,124,0.32);
  transform: scale(1.06);
}

.duel-roulette-item img,
.duel-roulette-item div {
  width: 100%;
  height: 100%;
}

.duel-roulette-item img {
  display: block;
  object-fit: cover;
}

.duel-roulette.is-counting .duel-roulette-window,
.duel-roulette.is-counting .duel-roulette-pointer {
  opacity: 0;
}

.duel-watch-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
}

.duel-watch-meta span {
  color: rgba(244,247,243,0.52);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.duel-watch-meta strong {
  color: var(--r-text);
  font-size: 15px;
  font-weight: 900;
}

@keyframes coin-idle {
  0%, 100% { transform: translateY(0) rotateY(0deg); }
  50% { transform: translateY(-5px) rotateY(18deg); }
}

@keyframes coin-flip {
  0% { transform: rotateX(0deg) rotateY(0deg) scale(1); }
  70% { transform: rotateX(900deg) rotateY(720deg) scale(1.08); }
  100% { transform: rotateX(1080deg) rotateY(720deg) scale(1); }
}

@keyframes duel-count-pulse {
  0% { opacity: 0; transform: scale(0.82); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.25; transform: scale(1.08); }
}

@keyframes duel-coin-flip-blue {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(1800deg); }
}

@keyframes duel-coin-flip-yellow {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(1980deg); }
}

@keyframes duel-case-roll {
  0% { transform: translate3d(0, 0, 0); filter: blur(0); }
  12% { filter: blur(1.15px); }
  46% { filter: blur(0.8px); }
  72% { filter: blur(0.35px); }
  100% { transform: translate3d(var(--duel-roulette-x), 0, 0); filter: blur(0); }
}

/* v4.18 wheel breathing room. */
.rakes-app .wheel-arena {
  margin-top: 22px !important;
  margin-bottom: 22px !important;
}

.rakes-app .stake-presets {
  margin-top: 0 !important;
}

/* v4.19 premium wallet sheet. */
.wallet-sheet {
  gap: 14px !important;
}

.wallet-balance-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  background: radial-gradient(circle at 18% 0%, rgba(82,232,124,0.12), transparent 34%), #070a08;
}

.wallet-balance-card > span {
  grid-column: 1 / -1;
  color: rgba(244,247,243,0.52);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wallet-balance-card > strong {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--r-text);
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1;
}

.wallet-balance-card .token-logo {
  width: 24px;
  height: 24px;
}

.wallet-balance-card div {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background: rgba(255,255,255,0.025);
}

.wallet-balance-card small {
  color: rgba(244,247,243,0.46);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.wallet-balance-card b {
  color: var(--r-text);
  font-size: 13px;
  font-weight: 900;
}

.wallet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wallet-actions button {
  min-height: 78px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--r-line);
  border-radius: 18px;
  background: var(--r-panel);
  color: var(--r-text);
  text-align: left;
}

.wallet-actions svg {
  width: 18px;
  height: 18px;
  color: var(--r-accent);
}

.wallet-actions span {
  font-size: 14px;
  font-weight: 900;
}

.wallet-actions small {
  color: rgba(244,247,243,0.46);
  font-size: 11px;
  font-weight: 800;
}

.wallet-history {
  display: grid;
  gap: 9px;
}

.wallet-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 0;
}

.wallet-section-head span {
  color: rgba(244,247,243,0.62);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.wallet-section-head button {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--r-line);
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  color: var(--r-text);
}

.wallet-section-head svg {
  width: 14px;
  height: 14px;
  display: block;
  margin: 0;
}

.wallet-history-list {
  display: grid;
  gap: 7px;
}

.wallet-history-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background: rgba(255,255,255,0.022);
}

.wallet-history-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(82,232,124,0.08);
  color: var(--r-accent);
}

.wallet-history-icon svg {
  width: 16px;
  height: 16px;
}

.wallet-history-row section {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.wallet-history-row strong {
  overflow: hidden;
  color: var(--r-text);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-history-row span {
  color: rgba(244,247,243,0.45);
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}

.wallet-history-row > b {
  color: var(--r-text);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.wallet-history-row.paid > b,
.wallet-history-row.completed > b,
.wallet-history-row.success > b,
.wallet-history-row.done > b {
  color: var(--r-accent);
}

.wallet-history-row.pending > b,
.wallet-history-row.processing > b {
  color: #ffd35a;
}

.wallet-history-row.failed > b,
.wallet-history-row.cancelled > b,
.wallet-history-row.rejected > b {
  color: #ff8f8f;
}

.wallet-empty {
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 16px;
  color: rgba(244,247,243,0.42);
  font-size: 12px;
  font-weight: 800;
}

.wallet-load-more {
  height: 42px;
  border: 1px solid var(--r-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  color: var(--r-text);
  font-size: 12px;
  font-weight: 900;
}

.wallet-load-more[hidden] {
  display: none !important;
}

/* v4.20 crash mode */
.crash-view {
  min-height: 100svh;
  padding: max(8px, env(safe-area-inset-top)) 12px calc(78px + env(safe-area-inset-bottom));
}

.crash-head {
  margin: 12px 0 14px;
}

.crash-ledger {
  min-height: 72px;
}

.crash-history-strip {
  display: flex;
  gap: 7px;
  margin: -4px 0 12px;
  padding: 0 1px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.crash-history-strip::-webkit-scrollbar {
  display: none;
}

.crash-history-pill {
  flex: 0 0 auto;
  min-width: 54px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: rgba(244,247,243,0.76);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.crash-history-pill.low {
  color: #ff7171;
  background: rgba(255, 91, 91, 0.08);
  border-color: rgba(255, 91, 91, 0.16);
}

.crash-history-pill.mid {
  color: #71a7ff;
  background: rgba(80, 137, 255, 0.08);
  border-color: rgba(80, 137, 255, 0.16);
}

.crash-history-pill.high {
  color: #b68cff;
  background: rgba(166, 121, 255, 0.09);
  border-color: rgba(166, 121, 255, 0.18);
}

.crash-history-pill.legendary {
  color: #ffd36a;
  background: rgba(255, 190, 74, 0.1);
  border-color: rgba(255, 190, 74, 0.24);
}

.crash-stage {
  position: relative;
  margin: 0 0 14px;
  padding: 10px;
  height: 292px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(112,255,151,0.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
    #080b09;
  overflow: hidden;
}

.crash-center {
  position: absolute;
  inset: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  justify-items: center;
  gap: 0;
  pointer-events: none;
  text-align: center;
  width: auto;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.crash-center span,
.crash-feed-head span {
  color: rgba(244,247,243,0.48);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crash-center strong {
  color: #f6faf6;
  font-size: clamp(40px, 11vw, 64px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.crash-center small {
  color: rgba(244,247,243,0.64);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.crash-center > span,
.crash-center > strong,
.crash-center > small {
  grid-area: 1 / 1;
}

.crash-center[data-state="open"] #crash-status,
.crash-center[data-state="open"] #crash-multiplier,
.crash-center[data-state="running"] #crash-status,
.crash-center[data-state="running"] #crash-substatus,
.crash-center[data-state="crashed"] #crash-status,
.crash-center[data-state="crashed"] #crash-substatus {
  display: none;
}

.crash-center[data-state="open"] #crash-substatus {
  display: block;
  color: #f6faf6;
  font-size: clamp(48px, 14vw, 76px);
  font-weight: 900;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.crash-center[data-state="running"] #crash-multiplier {
  color: #f6faf6;
  font-size: clamp(48px, 14vw, 76px);
}

.crash-center[data-state="crashed"] #crash-multiplier {
  color: #ff5f5f;
  font-size: clamp(34px, 9vw, 54px);
}

#crash-chart {
  position: absolute;
  inset: 10px;
  z-index: 1;
  display: block;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border-radius: 18px;
}

.crash-slots {
  display: grid;
  gap: 9px;
  margin: 0 0 14px;
}

.crash-bet-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 0.7fr) 92px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  background: rgba(255,255,255,0.025);
}

.crash-field {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 52px;
  padding: 8px 11px 9px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 15px;
  background: rgba(6, 9, 7, 0.84);
}

.crash-field span {
  color: rgba(244,247,243,0.46);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crash-field input {
  width: 100%;
  padding: 0 24px 0 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #f7fbf7;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.crash-field small {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: rgba(244,247,243,0.38);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.crash-slot-action {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 0 8px;
  border: 0;
  border-radius: 13px;
  color: #040705;
  background: #f4f7f3;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.crash-slot-action span,
.crash-slot-action b {
  display: block;
  line-height: 1.05;
  pointer-events: none;
  user-select: none;
}

.crash-slot-action span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crash-slot-action b {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.crash-slot-action.is-cashout {
  color: #f5fbf5;
  background: #153522;
}

.crash-slot-action:disabled {
  opacity: 0.42;
}

.crash-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.crash-feed-head strong {
  color: #f4f7f3;
  font-size: 13px;
  font-weight: 900;
}

.crash-bets-feed {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
}

.crash-bet-row.active .bet-meta small {
  color: rgba(244,247,243,0.52);
}

.crash-bet-row.cashed_out .bet-meta strong,
.crash-bet-row.cashed_out .bet-meta small {
  color: #7bffa0;
}

.crash-bet-row.lost .bet-meta small {
  color: #ff7d7d;
}

.rakes-app .bottom-nav {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
}

.rakes-app .bottom-nav button {
  min-width: 0;
}

@media (max-width: 420px) {
  .crash-stage {
    height: 272px;
  }

  .crash-bet-panel {
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 0.66fr) 86px;
    gap: 8px;
    padding: 7px;
  }

  .crash-field {
    min-height: 50px;
    padding: 8px 10px 9px;
  }

  .crash-field input {
    font-size: 17px;
  }

  .crash-slot-action {
    min-height: 50px;
    font-size: 11px;
    padding: 0 6px;
  }

  .crash-slot-action b {
    font-size: 12px;
  }
}

/* v4.21 Mines mode */
.mines-view {
  width: min(100%, 460px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(8px, env(safe-area-inset-top)) 12px calc(78px + env(safe-area-inset-bottom));
  color: var(--r-text);
}

.mines-hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 12px 0 10px;
}

.mines-hero div {
  display: grid;
  gap: 3px;
}

.mines-hero span,
.mines-section-title span,
.mines-stats span,
.mines-field span {
  color: rgba(244,247,243,0.48);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mines-hero strong {
  color: var(--r-text);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.mines-reset {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 14px;
  background: rgba(255,255,255,0.028);
  color: var(--r-text);
}

.mines-reset svg {
  width: 16px;
  height: 16px;
}

.mines-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 11px;
}

.mines-stats article {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px 9px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background: rgba(255,255,255,0.024);
}

.mines-stats strong {
  overflow: hidden;
  color: var(--r-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.mines-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124,255,155,0.06), transparent 36%),
    #070a08;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.018);
}

.mines-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)),
    #101411;
  color: rgba(244,247,243,0.62);
  box-shadow: 0 8px 18px rgba(0,0,0,0.22), inset 0 -9px 16px rgba(0,0,0,0.16);
  transition: transform 0.16s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.mines-cell:not(:disabled):active {
  transform: translateY(1px) scale(0.985);
}

.mines-cell:disabled {
  cursor: default;
}

.mines-cell svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.mines-cell.safe {
  border-color: rgba(124,255,155,0.34);
  background:
    radial-gradient(circle at 50% 35%, rgba(124,255,155,0.14), transparent 48%),
    #0b1710;
  color: #7cff9b;
}

.mines-cell.safe.just-revealed {
  animation: mines-safe-pop 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.mines-cell.mine {
  border-color: rgba(255,108,108,0.28);
  background:
    radial-gradient(circle at 50% 38%, rgba(255,108,108,0.15), transparent 50%),
    #170d0d;
  color: #ff7777;
}

.mines-cell.hit.just-revealed {
  animation: mines-hit-shake 0.34s ease both;
}

.mines-ladder-wrap {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.mines-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.mines-section-title b {
  color: rgba(244,247,243,0.62);
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.mines-ladder {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 1px 5px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mines-ladder::-webkit-scrollbar {
  display: none;
}

.mines-ladder span {
  flex: 0 0 auto;
  min-width: 66px;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.065);
  border-radius: 14px;
  background: rgba(255,255,255,0.024);
}

.mines-ladder small {
  color: rgba(244,247,243,0.38);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.mines-ladder b {
  color: rgba(244,247,243,0.72);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.mines-ladder .passed {
  opacity: 0.56;
}

.mines-ladder .next {
  border-color: rgba(255,255,255,0.14);
}

.mines-ladder .current {
  border-color: rgba(124,255,155,0.36);
  background: rgba(124,255,155,0.105);
}

.mines-ladder .current b {
  color: #7cff9b;
}

.mines-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 94px;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 8px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  background: rgba(255,255,255,0.024);
}

.mines-field {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 6px;
  min-height: 52px;
  padding: 8px 11px 9px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 15px;
  background: rgba(6, 9, 7, 0.84);
}

.mines-field input {
  width: 100%;
  padding: 0 31px 0 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #f7fbf7;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.mines-field small {
  position: absolute;
  right: 11px;
  bottom: 11px;
  color: rgba(244,247,243,0.38);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.mines-field input:disabled {
  color: rgba(244,247,243,0.5);
}

.mines-action {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 0 8px;
  border-radius: 13px;
  background: #f4f7f3;
  color: #040705;
  font-size: 12px;
  font-weight: 900;
}

.mines-action.is-cashout {
  color: #f5fbf5;
  background: #153522;
}

.mines-action span,
.mines-action b {
  display: block;
  line-height: 1.05;
  pointer-events: none;
}

.mines-action span {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mines-action b {
  margin-top: 3px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.mines-action:disabled {
  opacity: 0.42;
}

.mines-status {
  min-height: 17px;
  margin: 0;
  color: rgba(244,247,243,0.48);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.mines-status.lost {
  color: #ff8f8f;
}

.mines-status.cashed_out {
  color: #7cff9b;
}

@keyframes mines-safe-pop {
  0% { opacity: 0.35; transform: scale(0.72) rotate(-7deg); }
  64% { opacity: 1; transform: scale(1.07) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes mines-hit-shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-3px); }
  36% { transform: translateX(3px); }
  54% { transform: translateX(-2px); }
  72% { transform: translateX(2px); }
}

@media (max-width: 380px) {
  .mines-view {
    padding-left: 10px;
    padding-right: 10px;
  }

  .mines-board {
    gap: 7px;
    padding: 9px;
  }

  .mines-cell {
    border-radius: 15px;
  }

  .mines-controls {
    grid-template-columns: minmax(0, 1fr) 78px 86px;
  }
}

.duel-roulette { position: relative; }
.duel-roulette-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 6;
}
.duel-roulette.is-finished .duel-roulette-window {
  filter: blur(7px) brightness(0.65);
  transition: filter 0.35s ease;
}
.duel-roulette.is-finished .duel-roulette-overlay { display: flex; }
.duel-play-again {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.duel-play-again:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); }
.duel-play-again:active { transform: translateY(1px) scale(0.98); }
.duel-play-again:disabled { opacity: 0.6; cursor: default; }

/* ===== Jackpot redesign 20260706 ===== */
.ui-ic { width: 20px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.wallet-ic { width: 18px; height: 18px; }

/* --- top info card --- */
.jackpot-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 8px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  background:
    linear-gradient(120deg, rgba(143, 234, 99, 0.06), transparent 34%),
    linear-gradient(160deg, #12171d 0%, #0b0f13 58%, #080b0e 100%);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.jp-bank { display: grid; align-content: center; gap: 3px; min-width: 0; }
.jp-bank > span { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #8d929b; }
.jp-bank strong { display: flex; align-items: center; gap: 7px; font-size: clamp(22px, 6.4vw, 30px); font-weight: 800; color: #f4f4f5; font-variant-numeric: tabular-nums; }
.jp-bank strong .token-logo { width: 22px; height: 22px; }
.jp-bank small { font-size: 10px; letter-spacing: 0.14em; color: #8d929b; }
.jp-badge {
  align-self: center;
  display: grid;
  place-items: center;
  width: clamp(64px, 18vw, 84px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(143, 234, 99, 0.30);
  background: radial-gradient(circle at 50% 40%, #10161a 0 58%, #080b0e 60% 100%);
  box-shadow: 0 0 20px rgba(143, 234, 99, 0.15), inset 0 0 0 6px rgba(255, 255, 255, 0.02);
}
.jp-badge img { width: 58%; object-fit: contain; }
.jp-side { display: grid; align-content: center; gap: 8px; min-width: 0; }
.jp-side-item { display: flex; align-items: center; gap: 9px; justify-content: flex-start; padding-left: 12%; }
.jp-side-item .ui-ic { opacity: 0.85; }
.jp-side-item section { display: grid; gap: 1px; min-width: 0; }
.jp-side-item span { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #8d929b; white-space: nowrap; }
.jp-side-item strong { font-size: 15px; font-weight: 800; color: #f4f4f5; font-variant-numeric: tabular-nums; }
.jp-side-item:last-child strong { color: #8fea63; text-shadow: 0 0 14px rgba(143, 234, 99, 0.35); }

/* --- wheel: neon timer hub + side lights --- */
.wheel-hub i, .wheel-hub svg { display: none !important; }
.wheel-hub {
  width: clamp(118px, 30vw, 158px);
  gap: 2px;
  border: 2px solid rgba(143, 234, 99, 0.38);
  background: radial-gradient(circle at 50% 36%, #0d1712 0 46%, #060909 72% 100%);
  box-shadow:
    0 0 26px rgba(143, 234, 99, 0.22),
    0 0 60px rgba(143, 234, 99, 0.08),
    inset 0 0 26px rgba(0, 0, 0, 0.78),
    inset 0 0 0 10px rgba(255, 255, 255, 0.015);
}
#round-timer {
  font-size: clamp(34px, 9.6vw, 46px);
  font-weight: 800;
  line-height: 1;
  color: #eafff0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(143, 234, 99, 0.65), 0 0 42px rgba(143, 234, 99, 0.28);
}
#round-timer:empty::before { content: "•"; color: #8fea63; text-shadow: 0 0 18px rgba(143, 234, 99, 0.8); }
#round-timer-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  color: #8fea63;
  opacity: 0.85;
}
.wheel-light {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 5px;
  height: 36px;
  border-radius: 4px;
  background: linear-gradient(180deg, #b6ff8f, #6ed13f);
  box-shadow: 0 0 12px rgba(143, 234, 99, 0.95), 0 0 30px rgba(143, 234, 99, 0.45);
  transform: translateY(-50%);
  pointer-events: none;
}
.wheel-light.left { left: 5px; }
.wheel-light.right { right: 5px; }

/* --- round strip icons --- */
.round-strip .ui-ic { width: 22px; height: 22px; opacity: 0.85; }
.round-strip svg { display: none !important; }

/* --- bottom nav with PNG icons --- */
.bottom-nav { grid-template-columns: repeat(5, 1fr); }
.bottom-nav svg { display: none !important; }
.nav-ic { width: 24px; height: 24px; object-fit: contain; opacity: 0.66; transition: opacity 0.18s ease, filter 0.18s ease, transform 0.18s ease; }
.bottom-nav button.active { color: #8fea63; }
.bottom-nav button.active .nav-ic {
  opacity: 1;
  transform: translateY(-1px);
  filter: sepia(1) saturate(2.6) hue-rotate(58deg) brightness(1.4) drop-shadow(0 0 9px rgba(143, 234, 99, 0.65));
}

/* ============ PIXEL MATCH 20260706 — reference #070A0D theme ============ */
body.rakes-app {
  --r-bg: #070A0D;
  --r-card: #101419;
  --r-card-2: #15191F;
  --r-line: rgba(255, 255, 255, 0.07);
  --r-line-soft: rgba(255, 255, 255, 0.06);
  --r-text: #F4F4F5;
  --r-muted: #8D929B;
  --r-soft: #8D929B;
  --r-accent: #8FEA63;
  --r-accent-2: #57B33E;
  background: #070A0D;
  background-image: none;
  font-family: "Inter", "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
.rakes-mobile,
.crash-view,
.duels-view,
.mines-view,
.profile-view {
  border-left: 0;
  border-right: 0;
}
.rakes-mobile { padding-left: 16px; padding-right: 16px; }

/* --- kicker --- */
.round-kicker span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #F4F4F5;
}
.round-kicker span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8FEA63;
  box-shadow: 0 0 10px rgba(143, 234, 99, 0.9);
}
.round-kicker em {
  padding: 0;
  border: 0;
  background: transparent;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8D929B;
}

/* --- top card: flat neutral --- */
.jackpot-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(160deg, #12171D 0%, #0E1216 60%, #0B0F13 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}
.jp-badge {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: radial-gradient(circle at 50% 40%, #12171D 0 58%, #0A0E12 60% 100%);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.02), 0 6px 18px rgba(0, 0, 0, 0.45);
}
.jp-side-item:last-child strong { text-shadow: 0 0 12px rgba(143, 234, 99, 0.3); }

/* --- wheel: neutral arena, no dup lights --- */
.wheel-light { display: none; }
.wheel-arena::before { display: none; }
.wheel-hub {
  border: 2px solid rgba(255, 255, 255, 0.10);
  background: radial-gradient(circle at 50% 36%, #10151B 0 46%, #07090C 74% 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 24px rgba(0, 0, 0, 0.8), inset 0 0 0 9px rgba(255, 255, 255, 0.015);
}
#round-timer {
  color: #F4F4F5;
  text-shadow: 0 0 16px rgba(143, 234, 99, 0.42), 0 0 40px rgba(143, 234, 99, 0.16);
}
#round-timer-label { color: #8FEA63; opacity: 0.8; }

/* --- presets: rounded-rect chips --- */
.stake-presets { gap: 8px; }
.stake-presets button {
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 13px;
  background: #101419;
  color: #F4F4F5;
  font-size: 15px;
  font-weight: 700;
  box-shadow: none;
}
.stake-presets button.active {
  border-color: rgba(143, 234, 99, 0.55);
  color: #8FEA63;
  background: linear-gradient(180deg, rgba(143, 234, 99, 0.10), rgba(143, 234, 99, 0.03)), #101419;
  box-shadow: 0 0 16px rgba(143, 234, 99, 0.12), inset 0 0 0 1px rgba(143, 234, 99, 0.12);
}

/* --- bet dock: dark input + green CTA --- */
.bet-dock label {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: #101419;
  box-shadow: none;
}
.bet-dock input { color: #F4F4F5; font-weight: 700; }
.bet-dock label span { color: #8D929B; font-weight: 600; }
.bet-dock button {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #98EF6A 0%, #5FBE43 78%, #4EA83C 100%);
  color: #0B2409;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 24px rgba(87, 179, 62, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.bet-dock button:disabled {
  background: #1A1F26;
  color: #566069;
  box-shadow: none;
}

/* --- stats strip: single card, dividers --- */
.round-strip {
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
  background: #101419;
  box-shadow: none;
}
.round-strip div { background: transparent; border: 0; }
.round-strip div + div { border-left: 1px solid rgba(255, 255, 255, 0.06); }
.round-strip span { color: #8D929B; font-size: 10px; letter-spacing: 0.13em; }
.round-strip strong { color: #F4F4F5; }
.round-strip div:last-child strong { color: #8FEA63; text-shadow: 0 0 10px rgba(143, 234, 99, 0.28); }

/* --- bets feed cards --- */
.bets-feed > * {
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: #101419 !important;
  box-shadow: none !important;
}

/* --- bottom nav: flat dark bar --- */
.bottom-nav {
  bottom: 10px;
  width: min(calc(100% - 20px), 700px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(11, 15, 19, 0.97);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.bottom-nav button { color: #8D929B; border: 0; box-shadow: none; background: transparent; }
.bottom-nav button.active {
  color: #8FEA63;
  background: rgba(143, 234, 99, 0.07);
  border-radius: 13px;
}

/* --- topbar pills neutral --- */
.balance-chip, .avatar-chip {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: #101419 !important;
  box-shadow: none !important;
}

/* ===== WHEEL SKIN + CARD ALIGN 20260706 ===== */
.wheel-hub {
  width: clamp(88px, 22vw, 114px);
  border: 0;
  background: transparent;
  box-shadow: none;
}
.wheel-arena { background: transparent; }

/* top card: reference layout */
.jackpot-card { grid-template-columns: 1.02fr auto 1.1fr; gap: 6px; padding: 14px 12px; }
.jp-bank { justify-items: start; text-align: left; padding: 4px 0 4px 10px; align-content: center; gap: 4px; }
.jp-bank > span { font-size: 10px; }
.jp-bank strong { font-size: clamp(24px, 7vw, 32px); letter-spacing: -0.02em; }
.jp-bank small { opacity: 0.9; }
.jp-badge { position: relative; border-color: rgba(255, 255, 255, 0.06); }
.jp-badge::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 140deg, #8FEA63 0 54deg, rgba(255, 255, 255, 0.06) 54deg 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
}
.jp-side { gap: 0; align-content: center; justify-items: stretch; }
.jp-side-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 10px;
  align-items: center;
  justify-content: start;
  padding: 7px 0 7px 16px;
}
.jp-side-item + .jp-side-item { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.jp-side-item section { text-align: left; display: grid; gap: 2px; }
.jp-side-item span { font-size: 10px; }
.jp-side-item strong { font-size: 16px; line-height: 1; }

/* ===== timer size bump 20260706 ===== */
.wheel-hub { gap: 0; }
#round-timer {
  font-size: clamp(25px, 6.6vw, 33px) !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em;
  line-height: 0.9;
}
#round-timer-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  margin-top: 1px;
}

/* ===== compact layout 20260706 — less scrolling ===== */
/* bottom stats strip duplicates the top jackpot-card -> remove it */
.round-strip { display: none !important; }

/* tighter vertical rhythm on the jackpot screen */
.rakes-mobile { padding-top: max(12px, env(safe-area-inset-top)) !important; }
.round-head { margin-bottom: 8px !important; }
.jackpot-card { margin-top: 8px !important; }
.rakes-app .wheel-arena {
  width: min(62vw, 262px, calc(100svh - 372px)) !important;
  min-width: 210px !important;
  margin: 6px auto 10px !important;
}
.stake-presets { margin: 2px 0 8px !important; }
.bet-dock { margin-bottom: 10px !important; }

/* ===== antislop contrast 20260706 ===== */
/* readable small notes/labels: lift from ~0.36 alpha to a legible muted */
.round-note { color: #7f858e !important; }
/* placeholder text must meet the same contrast as body, not default gray */
.bet-dock input::placeholder,
#mines-amount::placeholder,
#mines-count::placeholder { color: #6c727b !important; }

/* ===== ui fix 20260706 ===== */
/* green CTA (was overridden white by .rakes-app .bet-dock button {#f4f7f3}) */
.rakes-app .bet-dock button {
  background: linear-gradient(180deg, #98EF6A 0%, #5FBE43 78%, #4EA83C 100%) !important;
  color: #0B2409 !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  box-shadow: 0 10px 24px rgba(87, 179, 62, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
.rakes-app .bet-dock button:hover { filter: brightness(1.04); }
.rakes-app .bet-dock button:active { transform: translateY(1px) scale(0.99); }
.rakes-app .bet-dock button:disabled {
  background: #1A1F26 !important;
  color: #566069 !important;
  box-shadow: none !important;
}

/* kill number-input spinner arrows (bet + mines) */
.rakes-app input[type="number"]::-webkit-inner-spin-button,
.rakes-app input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
}
.rakes-app input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* ===== ui polish 20260706b ===== */
/* 1. top card badge: clean symmetric bottom gauge arc + faint full ring */
.jp-badge::before {
  background: conic-gradient(from 132deg,
    #8FEA63 0deg, #8FEA63 88deg,
    rgba(255,255,255,0.08) 88deg, rgba(255,255,255,0.08) 360deg) !important;
  filter: drop-shadow(0 0 6px rgba(143, 234, 99, 0.35));
}
/* align both sides of the card to vertical center */
.jackpot-card { align-items: center !important; }
.jp-bank, .jp-side { align-content: center !important; }

/* 2. presets: 6 equal columns so $100 never clips */
.stake-presets {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 7px !important;
}
.stake-presets button {
  padding: 0 !important;
  font-size: 14px !important;
  min-width: 0 !important;
}

/* 3. header: a little air, balance pill off the edge */
.top-cluster { gap: 10px !important; align-items: center !important; }
.casino-topbar { gap: 12px !important; }

/* 4. empty state: real placeholder, not a bare line */
.bet-row-empty {
  display: grid !important;
  place-items: center !important;
  gap: 4px;
  padding: 18px 12px !important;
  border: 1px dashed rgba(255,255,255,0.09) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,0.015) !important;
}
.bet-row-empty span {
  color: #8D929B !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}

/* ===== fit above nav 20260706 ===== */
/* shrink wheel + tighten so the bet dock always clears the bottom nav */
.rakes-app .wheel-arena {
  width: min(56vw, 236px, calc(100svh - 402px)) !important;
  min-width: 196px !important;
  margin: 4px auto 8px !important;
}
.rakes-app .round-head { margin-bottom: 6px !important; }
.rakes-app .jackpot-card { margin-top: 6px !important; }
.rakes-app .stake-presets { margin: 2px 0 8px !important; }
.rakes-app .bet-dock { margin-bottom: 8px !important; }
/* reserve room for the fixed nav so bottom content never hides under it */
.rakes-app .rakes-mobile {
  padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important;
}

/* ===== strict green + card 20260706 ===== */
:root, body.rakes-app { --r-accent: #8FE84F !important; --r-accent-2: #7FB331 !important; }

/* top card: clean 3-column stat strip with dividers */
.jackpot-card {
  grid-template-columns: repeat(3, 1fr) !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 13px 4px !important;
}
.jp-stat {
  display: grid !important;
  align-content: center !important;
  justify-items: start !important;
  gap: 8px !important;
  padding: 2px 8px 2px 15px !important;
  min-width: 0 !important;
}
.jp-stat + .jp-stat { border-left: 1px solid rgba(255,255,255,0.07) !important; }
.jp-stat-head { display: flex; align-items: center; gap: 7px; }
.jp-stat-head .ui-ic { width: 15px; height: 15px; opacity: 0.6; }
.jp-stat-head span {
  font-size: 10px; font-weight: 700; letter-spacing: 0.11em;
  text-transform: uppercase; color: #8D929B; white-space: nowrap;
}
.jp-stat > strong {
  display: flex; align-items: center; gap: 6px;
  font-size: 21px; font-weight: 800; color: #F4F4F5;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.jp-stat > strong .token-logo { width: 17px; height: 17px; }
.jp-stat-accent > strong { color: var(--r-accent) !important; text-shadow: none !important; }

/* strict (non-neon) green across visible accents */
.rakes-app .bet-dock button {
  background: linear-gradient(180deg, #8FE84F 0%, #7FB331 78%, #6E9E2A 100%) !important;
  box-shadow: 0 8px 18px rgba(120,170,50,0.22), inset 0 1px 0 rgba(255,255,255,0.16) !important;
}
#round-timer { text-shadow: 0 0 8px rgba(164,255,106,0.30), 0 0 22px rgba(164,255,106,0.12) !important; }
#round-timer-label { color: var(--r-accent) !important; opacity: 0.85; }
.round-kicker span::before { background: var(--r-accent) !important; box-shadow: 0 0 6px rgba(164,255,106,0.5) !important; }
.stake-presets button.active {
  border-color: rgba(164,255,106,0.5) !important;
  color: var(--r-accent) !important;
  background: linear-gradient(180deg, rgba(164,255,106,0.09), rgba(164,255,106,0.03)), #101419 !important;
  box-shadow: none !important;
}
.bottom-nav button.active { color: var(--r-accent) !important; background: rgba(164,255,106,0.06) !important; }
.bottom-nav button.active .nav-ic { filter: sepia(1) saturate(1.4) hue-rotate(58deg) brightness(1.0) !important; }
/* mute wheel outer glows */
.rakes-app .wheel-arena::before { box-shadow: 0 22px 56px rgba(0,0,0,0.68), 0 0 20px rgba(150,200,70,0.07) !important; }
.rakes-app .wheel-arena::after { border-color: rgba(160,200,120,0.15) !important; box-shadow: none !important; }

/* ===== premium wheel size 20260706 ===== */
.rakes-app .wheel-arena {
  width: min(80vw, 320px, calc(100svh - 334px)) !important;
  min-width: 244px !important;
  margin: 8px auto 14px !important;
}
/* bet block a touch lower, using the freed space */
.rakes-app .stake-presets { margin-top: 10px !important; margin-bottom: 10px !important; }
.rakes-app .bet-dock { margin-bottom: 14px !important; }

/* ===== electric lime 20260706 (soft neon glow) ===== */
:root, body.rakes-app { --r-accent: #8FE84F !important; }
.rakes-app .bet-dock button {
  background: linear-gradient(180deg, #9AF05A 0%, #8AE84F 52%, #80DD4B 100%) !important;
  color: #123008 !important;
  box-shadow: 0 10px 26px rgba(138,232,79,0.34), 0 0 20px rgba(164,255,106,0.30), inset 0 1px 0 rgba(255,255,255,0.38) !important;
}
#round-timer { text-shadow: 0 0 12px rgba(164,255,106,0.52), 0 0 30px rgba(143,232,79,0.30) !important; }
#round-timer-label { color: #8FE84F !important; }
.jp-stat-accent > strong { color: #8FE84F !important; text-shadow: 0 0 12px rgba(143,232,79,0.32) !important; }
.round-kicker span::before { background: #8FE84F !important; box-shadow: 0 0 8px rgba(164,255,106,0.7) !important; }
.stake-presets button.active {
  border-color: rgba(143,232,79,0.6) !important;
  color: #8FE84F !important;
  box-shadow: 0 0 14px rgba(143,232,79,0.22) !important;
}
.bottom-nav button.active { color: #8FE84F !important; }
.bottom-nav button.active .nav-ic {
  filter: sepia(1) saturate(2.4) hue-rotate(50deg) brightness(1.3) drop-shadow(0 0 7px rgba(143,232,79,0.55)) !important;
}
.rakes-app .wheel-arena::before { box-shadow: 0 22px 56px rgba(0,0,0,0.68), 0 0 26px rgba(143,232,79,0.12) !important; }

/* ===== fit-no-scroll 20260706 (bet visible without scrolling) ===== */
.rakes-app .wheel-arena {
  width: min(70vw, 300px, calc(100svh - 452px)) !important;
  min-width: 200px !important;
  margin: 6px auto 8px !important;
}
.rakes-app .round-head { margin-bottom: 4px !important; }
.rakes-app .jackpot-card { margin-top: 4px !important; }
.rakes-app .stake-presets { margin: 6px 0 8px !important; }
.rakes-app .bet-dock { margin-bottom: 8px !important; }
.rakes-app .rakes-mobile { padding-bottom: calc(94px + env(safe-area-inset-bottom)) !important; }
/* empty bets placeholder must not eat the fold on the jackpot screen */
#view-game .bets-feed .bet-row-empty { display: none !important; }

/* ===== fill free space 20260706 (bigger wheel, still no scroll) ===== */
.rakes-app .wheel-arena {
  width: min(84vw, 348px, calc(100svh - 402px)) !important;
  min-width: 220px !important;
  margin: 12px auto 16px !important;
}

/* ===== bigger wheel + lower bet 20260706 ===== */
.rakes-app .wheel-arena {
  width: min(86vw, 366px, calc(100svh - 394px)) !important;
  min-width: 224px !important;
  margin: 10px auto 14px !important;
}
/* nudge the bet block a bit lower (closer to the nav) */
.rakes-app .stake-presets { margin-top: 14px !important; }
.rakes-app .rakes-mobile { padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important; }

/* ===== bigger wheel v3 20260706 ===== */
.rakes-app .wheel-arena {
  width: min(90vw, 380px, calc(100svh - 384px)) !important;
  min-width: 230px !important;
  margin: 8px auto 12px !important;
}
.rakes-app .stake-presets { margin-top: 16px !important; }
.rakes-app .rakes-mobile { padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important; }

/* ===== compact card + bigger wheel 20260706 ===== */
.jackpot-card { padding: 9px 4px !important; border-radius: 16px !important; }
.jp-stat { gap: 5px !important; padding: 1px 8px 1px 14px !important; }
.jp-stat-head { gap: 6px !important; }
.jp-stat-head .ui-ic { width: 13px !important; height: 13px !important; }
.jp-stat-head span { font-size: 9px !important; letter-spacing: 0.09em !important; }
.jp-stat > strong { font-size: 18px !important; }
.jp-stat > strong .token-logo { width: 15px !important; height: 15px !important; }
.rakes-app .round-head { margin-bottom: 4px !important; }
.rakes-app .jackpot-card { margin-top: 2px !important; }
/* wheel grows into the freed space */
.rakes-app .wheel-arena {
  width: min(92vw, 396px, calc(100svh - 352px)) !important;
  min-width: 236px !important;
  margin: 8px auto 12px !important;
}

/* ===== manrope font 20260706 ===== */
@font-face{font-family:"Manrope";font-style:normal;font-weight:400;font-display:swap;src:url("/app-assets/fonts/manrope-400.woff2") format("woff2");}
@font-face{font-family:"Manrope";font-style:normal;font-weight:500;font-display:swap;src:url("/app-assets/fonts/manrope-500.woff2") format("woff2");}
@font-face{font-family:"Manrope";font-style:normal;font-weight:600;font-display:swap;src:url("/app-assets/fonts/manrope-600.woff2") format("woff2");}
@font-face{font-family:"Manrope";font-style:normal;font-weight:700;font-display:swap;src:url("/app-assets/fonts/manrope-700.woff2") format("woff2");}
@font-face{font-family:"Manrope";font-style:normal;font-weight:800;font-display:swap;src:url("/app-assets/fonts/manrope-800.woff2") format("woff2");}

body.rakes-app, .rakes-app, .rakes-app button, .rakes-app input, .rakes-app strong, .rakes-app span, .rakes-app small {
  font-family: "Manrope", "SF Pro Display", -apple-system, system-ui, "Segoe UI", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* softer, less blocky uppercase labels */
.round-kicker span { font-weight: 700 !important; letter-spacing: 0.05em !important; }
.round-kicker em { font-weight: 600 !important; letter-spacing: 0.05em !important; }
.jp-stat-head span { font-weight: 600 !important; letter-spacing: 0.035em !important; }
.stake-presets button { font-weight: 700 !important; }
.bottom-nav button { font-weight: 600 !important; }
.jp-stat > strong { font-weight: 800 !important; }

/* ===== breathing room: gap above (pointer/card) and below (bet/nav) ===== */
.rakes-app .wheel-arena {
  width: min(90vw, 366px, calc(100svh - 398px)) !important;
  min-width: 226px !important;
  margin: 22px auto 12px !important;
}
.rakes-app .stake-presets { margin-top: 12px !important; }
.rakes-app .rakes-mobile { padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }

/* ===== flexfit robust 20260706 (bet pinned to bottom, wheel fills) ===== */
.rakes-app #view-game {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100svh !important;
}
/* pin the bet controls to the bottom; leftover space becomes air above them */
.rakes-app #view-game .stake-presets { margin-top: auto !important; }
/* wheel as big as width allows, but never taller than the space (no overlap) */
.rakes-app .wheel-arena {
  width: min(92vw, 392px, calc(100svh - 366px)) !important;
  min-width: 226px !important;
  margin: 18px auto 4px !important;
}
.rakes-app .stake-presets { padding-top: 0 !important; margin-bottom: 10px !important; }
.rakes-app .bet-dock { margin-bottom: 0 !important; }
/* fixed comfortable gap under the bet block, above the nav */
.rakes-app .rakes-mobile { padding-bottom: calc(94px + env(safe-area-inset-bottom)) !important; }
/* remove the little icons before БАНК / ИГРОКОВ / ВАШ ШАНС */
.jp-stat-head .ui-ic { display: none !important; }
.jp-stat-head { gap: 0 !important; }

/* ===== half gap 20260706 (tighten gap under bet ~half) ===== */
.rakes-app .rakes-mobile { padding-bottom: calc(74px + env(safe-area-inset-bottom)) !important; }

/* ===== jackpot roulette v2 (wheel fades, avatar strip decides) ===== */
#view-game.jp-rolling .wheel-arena canvas,
#view-game.jp-rolling .wheel-pointer,
#view-game.jp-rolling .wheel-hub {
  opacity: 0 !important;
  transform: scale(0.9);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.jp-roulette {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  width: min(96vw, 560px);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
#view-game.jp-rolling .jp-roulette { opacity: 1; }
.jp-roulette-window {
  overflow: hidden;
  padding: 26px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.jp-roulette-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  will-change: transform;
}
.jp-roll-item {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0b0e12;
  border: 3px solid var(--c, #3E7BD6);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55), 0 0 14px color-mix(in srgb, var(--c, #3E7BD6) 55%, transparent);
  overflow: hidden;
}
.jp-roll-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.jp-roll-item span { color: #f4f6f3; font-weight: 800; font-size: 20px; }
.jp-roll-item.is-winner {
  border-color: #8FE84F;
  box-shadow: 0 0 0 3px rgba(143, 232, 79, 0.35), 0 0 26px rgba(164, 255, 106, 0.75);
  animation: jpWinPulse 1.1s ease-in-out infinite;
}
@keyframes jpWinPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.jp-roulette-pointer {
  position: absolute;
  left: 50%;
  top: 6px;
  bottom: 6px;
  z-index: 3;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(180deg, #A4FF6A, rgba(164, 255, 106, 0.25));
  box-shadow: 0 0 12px rgba(164, 255, 106, 0.8);
  pointer-events: none;
}
.jp-roulette-pointer::before,
.jp-roulette-pointer::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}
.jp-roulette-pointer::before { top: -8px; border-top: 9px solid #A4FF6A; }
.jp-roulette-pointer::after { bottom: -8px; border-bottom: 9px solid #A4FF6A; }
#view-game .result-popover { z-index: 9; }
@media (prefers-reduced-motion: reduce) {
  .jp-roll-item.is-winner { animation: none; }
}

/* ===== ring center 20260706 (canvas draws bank in center) ===== */
#view-game .wheel-hub { display: none !important; }

/* ===== tweaks 20260706 ===== */
/* 1. compact top card ~15% shorter */
.jackpot-card { padding-top: 6px !important; padding-bottom: 6px !important; }
.jp-stat { padding-top: 0 !important; padding-bottom: 0 !important; gap: 4px !important; }
.jp-stat > strong { font-size: 16px !important; }
.jp-stat-head span { font-size: 9px !important; }

/* 2. bottom nav — no neon glow, calm active state */
.bottom-nav button.active .nav-ic { filter: sepia(1) saturate(1.5) hue-rotate(60deg) brightness(1.02) !important; }
.bottom-nav button.active { box-shadow: none !important; background: transparent !important; color: #8FE84F !important; }

/* 3. seamless, instant tab switching (no motion) */
.app-view { transition: none !important; }
.bottom-nav button, .bottom-nav .nav-ic { transition: none !important; }

/* ===== polish2 20260706 ===== */
/* pointer now drawn by canvas — hide the DOM triangle on the jackpot screen */
#view-game .wheel-pointer { display: none !important; }

/* viewfix: flex layout must not defeat view-hidden */
.rakes-app #view-game.view-hidden { display: none !important; }

/* ===== bet stepper 20260706 ===== */
.bet-dock label { display: flex !important; align-items: center !important; gap: 8px !important; }
.bet-dock #bet-amount { flex: 1 1 auto !important; min-width: 0 !important; text-align: center !important; }
.bet-dock label > span { flex: 0 0 auto !important; color: #8D929B !important; }
.bet-step {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #1a1f26;
  border: 1px solid rgba(255,255,255,0.09);
  color: #F4F4F5;
  font-size: 22px; font-weight: 700; line-height: 1;
  display: grid; place-items: center;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
  transition: background .1s ease, transform .1s ease;
}
.bet-step:hover { background: #202730; }
.bet-step:active { background: #26303a; transform: scale(0.93); }
.bet-step:focus-visible { outline: 2px solid var(--r-accent, #8FE84F); outline-offset: 2px; }

/* ===== stepper reset 20260706 (kill CTA styling on -/+ buttons) ===== */
.rakes-app .bet-dock button.bet-step {
  width: 38px !important;
  height: 38px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 10px !important;
  background: #1a1f26 !important;
  color: #F4F4F5 !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  box-shadow: none !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  flex: 0 0 auto !important;
}
.rakes-app .bet-dock button.bet-step:hover { background: #202730 !important; filter: none !important; }
.rakes-app .bet-dock button.bet-step:active { background: #26303a !important; transform: scale(0.93) !important; }

/* ===== tiny arrows 20260706 ===== */
.bet-dock label { display: flex !important; align-items: center !important; gap: 8px !important; }
.bet-dock #bet-amount { flex: 1 1 auto !important; min-width: 0 !important; text-align: left !important; }
.bet-dock .bet-unit { flex: 0 0 auto !important; color: #8D929B !important; }
.bet-steps { display: flex !important; flex-direction: column; gap: 3px; flex: 0 0 auto; }
.rakes-app .bet-dock button.bet-arrow {
  width: 26px !important; height: 17px !important; min-height: 0 !important;
  padding: 0 !important; border-radius: 6px !important;
  background: #1a1f26 !important; color: #9aa3ad !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: none !important; font-size: 9px !important; font-weight: 700 !important;
  line-height: 1 !important; letter-spacing: 0 !important;
  display: grid !important; place-items: center !important;
}
.rakes-app .bet-dock button.bet-arrow:hover { background: #222a33 !important; color: #cfd5db !important; filter: none !important; }
.rakes-app .bet-dock button.bet-arrow:active { background: #2a333d !important; transform: scale(0.92) !important; }

/* ===== arrows inside field 20260706 (absolute, inside the input box) ===== */
.bet-dock label { position: relative !important; display: block !important; }
.bet-dock #bet-amount {
  width: 100% !important;
  box-sizing: border-box !important;
  padding-right: 96px !important;
  text-align: left !important;
}
.bet-dock .bet-unit {
  position: absolute !important;
  right: 44px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  pointer-events: none;
}
.bet-steps {
  position: absolute !important;
  right: 9px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

/* ===== pm stepper 20260706 (minus | amount+USDT | plus) ===== */
.bet-dock label {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}
.bet-mid {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}
.bet-dock #bet-amount {
  width: 100% !important;
  padding: 0 !important;
  text-align: center !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  background: transparent !important;
}
.bet-mid .bet-unit {
  position: static !important;
  transform: none !important;
  margin-top: -1px !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #8D929B !important;
  pointer-events: none;
}
.rakes-app .bet-dock button.bet-step-btn {
  width: 32px !important;
  height: 32px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 9px !important;
  background: #1a1f26 !important;
  color: #e6eaee !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  box-shadow: none !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 auto !important;
}
.rakes-app .bet-dock button.bet-step-btn:hover { background: #202730 !important; filter: none !important; }
.rakes-app .bet-dock button.bet-step-btn:active { background: #262f39 !important; transform: scale(0.93) !important; }

/* ===== pm stepper specificity 20260706 (beat .rakes-app .bet-dock label) ===== */
.rakes-app .bet-dock label {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}
.rakes-app .bet-dock .bet-mid {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}
.rakes-app .bet-dock #bet-amount {
  width: 100% !important;
  padding: 0 !important;
  text-align: center !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  background: transparent !important;
}
.rakes-app .bet-dock .bet-mid .bet-unit {
  position: static !important;
  transform: none !important;
  margin-top: -1px !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #8D929B !important;
}

/* ===== wallet glow 20260706 ===== */
.wallet-ic {
  width: 20px !important;
  height: 20px !important;
  filter: drop-shadow(0 0 3px rgba(143,232,79,0.95)) drop-shadow(0 0 7px rgba(143,232,79,0.45)) brightness(1.08) !important;
}

/* wallet glow off 20260706 */
.wallet-ic { filter: none !important; }

/* ===== separate stat cards 20260706 ===== */
.rakes-app .jackpot-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  align-items: stretch !important;
}
.rakes-app .jp-stat {
  border: 1px solid rgba(255,255,255,0.06) !important;
  background: linear-gradient(160deg, #12171d, #0e1216 60%, #0b0f13) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35) !important;
  padding: 10px 14px !important;
}
/* no inner divider — each is its own card now */
.rakes-app .jp-stat + .jp-stat { border-left: 1px solid rgba(255,255,255,0.06) !important; }
/* percent color like the reference (muted green, not neon lime) */
.rakes-app .jp-stat-accent > strong { color: #64BE55 !important; text-shadow: none !important; }

/* ===== bet field center 20260706 ===== */
.rakes-app .bet-dock .bet-mid {
  justify-content: center !important;
  align-items: center !important;
}
.rakes-app .bet-dock #bet-amount {
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center !important;
  line-height: 1 !important;
  font-size: 22px !important;
  font-weight: 800 !important;
}

/* ===== boss battle 20260709 ===== */
#view-crash:not(.view-hidden){display:flex !important;flex-direction:column !important;}
.rakes-app #view-crash{padding:10px 14px calc(86px + env(safe-area-inset-bottom)) !important;min-height:100svh;gap:10px;}
.bbx{display:flex;flex-direction:column;gap:10px;flex:1 1 auto;min-height:0;max-width:470px;width:100%;margin:0 auto;}
.bb-arena{position:relative;flex:1 1 auto;min-height:270px;border-radius:20px;overflow:hidden;
  border:1px solid rgba(255,255,255,.09);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.6),inset 0 0 60px rgba(0,0,0,.55),0 16px 40px rgba(0,0,0,.5);}
.bb-arena::after{content:"";position:absolute;inset:6px;border:1px solid rgba(143,232,79,.10);border-radius:15px;pointer-events:none;}
#boss-cv{position:absolute;inset:0;width:100%;height:100%;display:block;}
.bb-ui{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;text-align:center;padding:16px 14px;pointer-events:none;}
.bb-orna{display:flex;align-items:center;gap:8px;color:#63BE55;font-size:10px;letter-spacing:.4em;text-transform:uppercase;}
.bb-orna::before,.bb-orna::after{content:"";width:40px;height:1px;background:linear-gradient(90deg,transparent,rgba(143,232,79,.7));}
.bb-orna::after{transform:scaleX(-1);}
.bb-name{font-family:"Palatino Linotype","Book Antiqua",Georgia,serif;font-size:clamp(24px,7vw,36px);font-weight:700;
  letter-spacing:.06em;line-height:1.05;color:#eef1f4;
  text-shadow:0 1px 0 #9aa3ad,0 2px 6px rgba(0,0,0,.8),0 0 24px rgba(143,232,79,.18);}
.bb-sub{display:flex;align-items:center;gap:10px;font-size:9px;letter-spacing:.3em;text-transform:uppercase;color:#63BE55;margin-top:3px;}
.bb-sub::before,.bb-sub::after{content:"\25C6";font-size:6px;color:rgba(143,232,79,.7);}
.bb-mid{margin:auto 0;}
.bb-mult{font-size:clamp(46px,15vw,84px);font-weight:800;line-height:1;font-variant-numeric:tabular-nums;
  text-shadow:0 0 28px rgba(143,232,79,.45);}
.bb-mult small{display:block;font-size:10px;letter-spacing:.3em;font-weight:700;color:#8D929B;margin-top:6px;}
.bb-cd{font-size:clamp(38px,12vw,60px);font-weight:800;color:#8FE84F;text-shadow:0 0 24px rgba(143,232,79,.55);}
.bb-out{font-family:"Palatino Linotype","Book Antiqua",Georgia,serif;font-size:clamp(28px,8vw,44px);font-weight:700;}
.bb-out.win{color:#8FE84F;text-shadow:0 0 28px rgba(143,232,79,.5);}
.bb-out.lose{color:#ff4d4d;text-shadow:0 0 28px rgba(255,70,60,.4);}
.bb-outsub{font-size:12px;color:#8D929B;margin-top:5px;}
.bb-wait{margin-top:auto;font-size:12px;letter-spacing:.06em;color:#8D929B;padding:9px 16px;border:1px solid rgba(255,255,255,.08);
  border-radius:12px;background:rgba(10,13,17,.72);}
.bb-ctl{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:0 0 auto;}
.bb-field{border:1px solid rgba(255,255,255,.08);border-radius:14px;background:linear-gradient(165deg,#12171d,#0c1014);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);padding:9px 10px;display:grid;gap:6px;}
.bb-field>label{font-size:8.5px;letter-spacing:.16em;text-transform:uppercase;color:#8D929B;}
.bb-step{display:flex;align-items:center;gap:6px;}
.rakes-app .bb-step button{flex:0 0 auto;width:30px;height:30px;min-height:0;padding:0;border:1px solid rgba(255,255,255,.09);
  background:#1a1f26;color:#F4F4F5;border-radius:9px;font-size:17px;font-weight:600;display:grid;place-items:center;box-shadow:none;}
.rakes-app .bb-step button:active{transform:scale(.93);background:#26303a;}
.bb-step b{flex:1;text-align:center;font-size:17px;font-weight:800;font-variant-numeric:tabular-nums;color:#F4F4F5;}
.rakes-app .bb-step input.bb-bet-input{flex:1;width:100%;min-width:0;text-align:center;font-size:17px;font-weight:800;font-variant-numeric:tabular-nums;color:#F4F4F5;background:transparent;border:0;outline:none;padding:0;margin:0;font-family:inherit;-moz-appearance:textfield;appearance:textfield;}
.rakes-app .bb-step input.bb-bet-input:focus{color:#8FE84F;}
.rakes-app .bb-step input.bb-bet-input::-webkit-outer-spin-button,.rakes-app .bb-step input.bb-bet-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
.bb-presets{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;}
.rakes-app .bb-presets button{border:1px solid rgba(255,255,255,.08);background:#101419;color:#F4F4F5;border-radius:8px;
  padding:6px 0;font-size:11px;font-weight:700;min-height:0;box-shadow:none;}
.rakes-app .bb-presets button.on{border-color:rgba(143,232,79,.65);color:#8FE84F;
  background:linear-gradient(180deg,rgba(143,232,79,.12),transparent);}
.rakes-app .bb-cta{position:relative;width:100%;flex:0 0 auto;border:1px solid rgba(190,255,130,.65);border-radius:16px;
  padding:16px;font-size:18px;font-weight:800;letter-spacing:.04em;color:#0c2408;overflow:hidden;min-height:0;
  background:linear-gradient(180deg,#B8F878 0%,#8FE84F 45%,#6FC93E 100%);
  box-shadow:0 0 0 1px rgba(0,0,0,.4),0 10px 26px rgba(110,200,60,.32),inset 0 2px 0 rgba(255,255,255,.5);}
.rakes-app .bb-cta:active{transform:translateY(1px);}
.rakes-app .bb-cta:disabled{opacity:.55;filter:grayscale(.35);}
.rakes-app .bb-cta.is-cashout{border-color:rgba(255,210,120,.7);color:#3a2400;
  background:linear-gradient(180deg,#ffd97a,#ffb638 50%,#f59a24);
  box-shadow:0 10px 26px rgba(255,160,50,.32),inset 0 2px 0 rgba(255,255,255,.5);animation:bbcash 1s ease-in-out infinite;}
@keyframes bbcash{50%{filter:brightness(1.07)}}
.rakes-app .bb-cta b{font-weight:800;margin-left:8px;}
@media (prefers-reduced-motion:reduce){.rakes-app .bb-cta.is-cashout{animation:none}}

/* ===== mines flair 20260709 ===== */
.mines-cell{ background:linear-gradient(180deg, rgba(143,232,79,.07), rgba(255,255,255,.015)), #0f1712 !important; }
.mines-board:not(.inactive) .mines-cell:not(.revealed):not(:disabled){ cursor:pointer; border-color:rgba(143,232,79,.18); }
.mines-board:not(.inactive) .mines-cell:not(.revealed):not(:disabled)::before{ content:"";
  width:9px;height:9px;border-radius:50%;
  background:radial-gradient(circle, rgba(143,232,79,.55), transparent 70%);
  opacity:.32; transition:opacity .18s ease, transform .18s ease; }
.mines-board:not(.inactive) .mines-cell:not(.revealed):not(:disabled):hover::before{ opacity:.75; transform:scale(1.5); }
.mines-board:not(.inactive) .mines-cell:not(.revealed):not(:disabled):active{ transform:scale(.93); }
.mines-cell.safe{
  border-color:color-mix(in srgb, var(--gem,#8FE84F) 55%, transparent) !important;
  background:radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--gem,#8FE84F) 28%, transparent), transparent 58%), #0b120e !important;
  color:var(--gem,#8FE84F) !important;
  box-shadow:0 0 15px color-mix(in srgb, var(--gem,#8FE84F) 42%, transparent), inset 0 0 10px color-mix(in srgb, var(--gem,#8FE84F) 15%, transparent) !important; }
.mines-cell.safe svg{ color:var(--gem,#8FE84F) !important; filter:drop-shadow(0 0 6px color-mix(in srgb, var(--gem,#8FE84F) 70%, transparent)); }
.mines-cell.safe.just-revealed{ animation:mineGemPop .5s cubic-bezier(.16,1,.3,1) !important; }
@keyframes mineGemPop{ 0%{transform:scale(.35);opacity:.15} 55%{transform:scale(1.2)} 100%{transform:scale(1)} }
.mines-cell.mine{ box-shadow:0 0 16px rgba(255,80,70,.5), inset 0 0 12px rgba(255,80,70,.2) !important; }
.mines-cell.hit{ background:radial-gradient(circle, rgba(255,95,70,.55), #170d0d) !important; border-color:#ff5a46 !important; }
.mines-cell.hit svg{ color:#ffd4c6 !important; filter:drop-shadow(0 0 9px #ff5a46); }
.mines-action:not(.is-cashout):not(:disabled){
  background:linear-gradient(180deg,#B8F878,#8FE84F 55%,#6FC93E) !important; color:#0c2408 !important;
  border:1px solid rgba(190,255,130,.6) !important; }

.game-hint{ margin:0 0 12px; padding:9px 13px; font-size:12px; line-height:1.5; color:#aeb4bd;
  border:1px solid rgba(143,232,79,.14); border-radius:12px;
  background:linear-gradient(180deg, rgba(143,232,79,.05), rgba(255,255,255,.01)); }
.game-hint b{ color:#8FE84F; }

.duels-view{ padding-bottom:calc(150px + env(safe-area-inset-bottom)) !important; }
.duels-createbar{ position:fixed; left:0; right:0; bottom:calc(72px + env(safe-area-inset-bottom));
  display:flex; justify-content:center; padding:0 14px; pointer-events:none; z-index:30; }
.rakes-app .duels-create-cta{ pointer-events:auto; width:100%; max-width:460px; display:flex;
  align-items:center; justify-content:center; gap:8px; border:1px solid rgba(190,255,130,.6);
  border-radius:16px; padding:15px; font-size:17px; font-weight:800; letter-spacing:.02em; color:#0c2408;
  background:linear-gradient(180deg,#B8F878,#8FE84F 55%,#6FC93E);
  box-shadow:0 10px 26px rgba(110,200,60,.32), inset 0 2px 0 rgba(255,255,255,.5); }
.rakes-app .duels-create-cta:active{ transform:translateY(1px); }
.rakes-app .duels-create-cta svg{ width:20px; height:20px; }
