:root {
  --bg: #1b1625;
  --surface: #241d30;
  --surface-2: #2d253b;
  --border: #3f344e;
  --text: #ffffff;
  --muted: #acbcc7;
  --accent: #896bab;
  --accent-2: #503f68;
  --win: #51c07d;
  --loss: #ca7168;
  --display: 'Fraunces', Georgia, serif;
  --premium: 'Cormorant Garamond', var(--display);
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --glow-border: rgba(137, 107, 171, 0.14);
  --glow-soft: rgba(137, 107, 171, 0.10);
  --text-glow: 0 0 9.2px rgba(137, 107, 171, 0.46), 0 0 2.3px rgba(255, 255, 255, 0.35);
}

* {
  box-sizing: border-box;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none;
}

button, a, .cat-pill, .wallet-chip, .icon-btn, .bottom-nav-item, .game-card,
.wallet-option, .account-menu-item, [role="button"], [role="option"] {
  outline: none;
}
button:focus, button:focus-visible,
a:focus, a:focus-visible,
.icon-btn:focus, .icon-btn:focus-visible,
.wallet-option:focus, .wallet-option:focus-visible,
.account-menu-item:focus, .account-menu-item:focus-visible,
[role="button"]:focus, [role="button"]:focus-visible,
[role="option"]:focus, [role="option"]:focus-visible {
  outline: none;
}
.cat-pill:focus, .cat-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 8px var(--glow-soft);
}
.wallet-chip:focus, .wallet-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px rgba(137, 107, 171, 0.25), 0 0 10px rgba(137, 107, 171, 0.15);
}
.bottom-nav-item:focus, .bottom-nav-item:focus-visible {
  outline: none;
}
.game-card:focus, .game-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 10px var(--glow-soft);
}

input, textarea, [contenteditable="true"] {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

/* Subtle glow border shared by every card/bar/pill surface (lighter than the balance chip's glow). */
#game-search,
.notif-card {
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 10px var(--glow-soft);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 28px 11px 16px;
  background: var(--surface);
  box-shadow: 0 1px 0 0 var(--glow-border), 0 2px 10px -2px var(--glow-soft);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
}
.brand-mark { height: 42px; width: auto; display: block; }

.nav-right { display: flex; align-items: center; gap: 12px; }

.wallet-select { position: relative; }

.wallet-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #ffffff;
  background: var(--surface-2);
  border: 1.5px solid var(--accent);
  padding: 8px 12px 8px 14px;
  border-radius: 9px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(137, 107, 171, 0.25), 0 0 10px rgba(137, 107, 171, 0.15);
}
@media (hover: hover) { .wallet-chip:hover { border-color: #ffffff; } }
.wallet-chip svg { flex: 0 0 auto; color: var(--accent); }
.chip-coin-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  vertical-align: -3px;
  margin-left: 2px;
}
.wallet-chevron { color: var(--muted); transition: transform 0.15s ease; }
#wallet-btn[aria-expanded="true"] .wallet-chevron { transform: rotate(180deg); }

.wallet-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  max-height: 380px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 0 0 1px rgba(137, 107, 171, 0.18), 0 16px 40px rgba(0, 0, 0, 0.5);
  flex-direction: column;
}
.wallet-dropdown.open { display: flex; }

.wallet-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  flex: 0 0 auto;
}
.wallet-search-wrap svg { flex: 0 0 auto; }
#wallet-search {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.85rem;
  outline: none;
}
#wallet-search::placeholder { color: var(--muted); }

.wallet-options {
  overflow-y: auto;
  flex: 1 1 auto;
}
.wallet-empty {
  padding: 16px 14px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.wallet-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
}
@media (hover: hover) { .wallet-option:hover { background: var(--surface); } }
.wallet-option.is-active { background: var(--surface); color: var(--accent); }

.coin-dot-img {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.wallet-option-name { font-weight: 600; letter-spacing: 0.02em; }
.wallet-option-amount {
  margin-left: auto;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.82rem;
}
.wallet-option.is-active .wallet-option-amount { color: var(--accent); }

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
@media (hover: hover) { .icon-btn:hover { color: var(--text); background: var(--surface-2); } }

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--loss);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--surface);
}

.nav-link { color: var(--muted); font-size: 0.9rem; }
@media (hover: hover) { .nav-link:hover { color: var(--text); } }
.nav-link-accent { color: var(--accent); }

.container { max-width: 1040px; margin: 0 auto; padding: 20px 24px 100px; }

.notif-panel {
  position: fixed;
  top: var(--navbar-h, 65px);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 60;
  flex-direction: column;
  overflow-y: auto;
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.notif-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.notif-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
}
@media (hover: hover) { .notif-close:hover { color: var(--text); background: var(--surface-2); } }

.notif-list { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.notif-empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: 0.9rem; }

.notif-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: default;
  user-select: none;
}
.notif-card-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--win);
}
.notif-type-withdrawal { color: var(--accent); }
.notif-type-level_up { color: var(--accent); }
.notif-type-welcome { color: var(--accent); }

.notif-card-body { flex: 1; min-width: 0; }
.notif-card-title { margin: 0 0 4px; font-weight: 700; font-size: 0.92rem; color: var(--text); }
.notif-card-text { margin: 0; font-size: 0.84rem; color: var(--muted); line-height: 1.4; }

.search-wrap {
  position: relative;
  margin-bottom: 28px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
#game-search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 14px 12px 40px;
  font-size: 0.95rem;
}
#game-search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 20;
}
.search-results.open { display: block; }
.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
@media (hover: hover) { .search-result-item:hover { background: var(--surface-2); } }
.search-result-name { font-weight: 600; font-size: 0.9rem; }
.search-result-cat { font-size: 0.75rem; color: var(--muted); }
.search-empty { padding: 14px; color: var(--muted); font-size: 0.85rem; text-align: center; }

.pill-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 28px;
  scrollbar-width: none;
}
.pill-row::-webkit-scrollbar { display: none; }

.guest-hero {
  position: relative;
  text-align: center;
  padding: 64px 0 40px;
  overflow: hidden;
}
.guest-hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 380px;
  max-width: 140vw;
  background: radial-gradient(ellipse at center, rgba(137, 107, 171, 0.28) 0%, rgba(137, 107, 171, 0.08) 45%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}
.guest-hero-logo {
  position: relative;
  z-index: 1;
  width: 260px;
  max-width: 82%;
  margin: 0 auto 26px;
  display: block;
  filter: drop-shadow(0 6px 30px rgba(137, 107, 171, 0.35));
}
.guest-hero-tag {
  position: relative;
  z-index: 1;
  font-family: var(--premium);
  font-weight: 600;
  font-size: 2.05rem;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.guest-hero-tag span {
  color: var(--accent);
  text-shadow: var(--text-glow);
}
.guest-hero-sub {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 32px;
}
.guest-hero-login, .guest-hero-register {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 14px;
  padding: 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.guest-hero-login:active, .guest-hero-register:active { transform: scale(0.99); }
@media (hover: hover) { .guest-hero-login:hover, .guest-hero-register:hover { filter: brightness(1.08); } }
.guest-hero-login {
  background: rgba(13, 9, 17, 0.4);
  border: 1px solid rgba(137, 107, 171, 0.35);
  color: var(--text);
}
.guest-hero-register {
  background: linear-gradient(180deg, #896bab 0%, #5b427e 100%);
  color: #fff;
  border: 1px solid rgba(137, 107, 171, 0.5);
  box-shadow: 0 0 0 1px rgba(137, 107, 171, 0.3), 0 10px 24px rgba(91, 66, 126, 0.35);
}

.guest-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 999;
  white-space: nowrap;
}
.guest-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.cat-pill {
  flex: 0 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 17px;
  font-size: 0.91rem;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 8px var(--glow-soft);
}
@media (hover: hover) { .cat-pill:hover { color: var(--text); } }
.cat-pill.active { background: var(--accent); color: #0d1a22; border-color: var(--accent); text-shadow: none; }

.game-section { margin-bottom: 34px; }
h1 { font-family: var(--display); font-weight: 600; font-size: 2rem; margin: 0 0 6px; }
.game-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--premium);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: 0.01em;
  margin: 0 0 13px;
  text-shadow: var(--text-glow);
}
.game-section-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--win);
  box-shadow: 0 0 6px rgba(81, 192, 125, 0.6);
}

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

.game-card-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
@media (max-width: 420px) {
  .game-card-fallback { font-size: 0.96rem; }
}

.game-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  text-shadow: var(--text-glow);
}
.meta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--win);
  flex: 0 0 auto;
  box-shadow: 0 0 6px rgba(81, 192, 125, 0.6);
}

.game-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 10px var(--glow-soft);
}
@media (hover: hover) { .game-card:hover { border-color: var(--accent); transform: translateY(-2px); } }

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.game-card-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  background: var(--surface-2);
  color: var(--accent);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
}

.back-link { color: var(--muted); font-size: 0.85rem; display: inline-block; margin-bottom: 14px; }
@media (hover: hover) { .back-link:hover { color: var(--accent); } }

.game-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 680px) {
  .game-layout { grid-template-columns: 1fr; }
}

.bet-panel, .result-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.bet-panel label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 14px 0 6px;
}
.bet-panel label:first-child { margin-top: 0; }

.bet-panel input, .bet-panel select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 9px 10px;
  font-family: var(--mono);
  font-size: 0.9rem;
}
.bet-panel input:focus, .bet-panel select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

#play-btn {
  width: 100%;
  margin-top: 20px;
  background: var(--accent);
  color: #0d1a22;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
@media (hover: hover) { #play-btn:hover { filter: brightness(1.1); } }
#play-btn:active { transform: scale(0.99); }

.result-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}

#result {
  font-family: var(--mono);
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  color: var(--text);
  min-height: 120px;
}

.auth-box {
  max-width: 360px;
  margin: 60px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
}
.auth-box h1 { font-size: 1.5rem; margin-bottom: 20px; }
.auth-box label { display: block; font-size: 0.8rem; color: var(--muted); margin: 14px 0 6px; }
.auth-box input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 10px;
  font-size: 0.95rem;
}
.auth-box input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-box button {
  width: 100%;
  margin-top: 22px;
  background: var(--accent);
  color: #0d1a22;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-weight: 600;
  cursor: pointer;
}
.terms-check {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem !important;
  color: var(--muted);
  margin: 16px 0 0 !important;
}
.terms-check input { width: auto !important; margin: 2px 0 0; flex: 0 0 auto; }
.terms-check a { color: var(--accent); }
.auth-switch { margin-top: 30px; font-size: 0.78rem; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--accent); }
.form-error { color: var(--loss); font-size: 0.85rem; margin-top: -6px; }

/* ---------- Login / Signup modals ---------- */
.auth-modal { max-width: 400px; }
.auth-modal-form .form-error {
  margin: -4px 0 4px;
  padding: 9px 12px;
  background: rgba(202, 113, 104, 0.1);
  border-left: 2px solid var(--loss);
  border-radius: 6px;
}
.auth-modal-input { margin-bottom: 2px; }
.auth-modal .tx-submit-btn:disabled { opacity: 0.7; cursor: default; }

.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 23px;
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 10px var(--glow-soft), 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 30;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 11px 19px;
  color: var(--muted);
  font-size: 0.88rem;
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-shadow: var(--text-glow);
}
.bottom-nav-item svg { width: 23.5px; height: 23.5px; }
.bottom-nav-item.active { color: var(--accent); }
@media (hover: hover) { .bottom-nav-item:hover { color: var(--text); } }

.account-menu-wrap { position: relative; }

.account-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: 200px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(137, 107, 171, 0.18), 0 -16px 40px rgba(0, 0, 0, 0.5);
  flex-direction: column;
  z-index: 40;
}
.account-menu.open { display: flex; }

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}
.account-menu-item svg { flex: 0 0 auto; color: var(--muted); }
@media (hover: hover) { .account-menu-item:hover { background: var(--surface); } }
.account-menu-item-danger { color: var(--loss); border-top: 1px solid var(--border); }
.account-menu-item-danger svg { color: var(--loss); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
  padding: 20px;
  overscroll-behavior: contain;
}
body.scroll-locked { overflow: hidden; height: 100%; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  max-width: 300px;
}
.modal-box p { margin: 0 0 18px; color: var(--text); font-size: 1rem; }
.modal-box p + button,
.modal-box > button {
  background: var(--accent);
  color: #0d1a22;
  border: none;
  border-radius: 6px;
  padding: 10px 24px;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Deposit / Withdraw modal ---------- */
.tx-modal {
  width: 100%;
  max-width: 380px;
  text-align: left;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  box-shadow: 0 0 0 1px rgba(137, 107, 171, 0.22), 0 24px 60px rgba(0, 0, 0, 0.6);
}
.tx-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.tx-modal-title { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--text); }

.tx-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin: 18px 0 7px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tx-field-label:first-of-type { margin-top: 0; }

/* Recessed field surface: near-black, not the same tone as the modal body,
   so every input reads as a distinct control rather than blending in. */
.tx-coin-select,
.tx-input,
.tx-computed,
.tx-network-btn {
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
}

.tx-coin-select {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px;
  padding: 13px 15px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
@media (hover: hover) { .tx-coin-select:hover { border-color: var(--accent); } }
.tx-coin-display { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.tx-coin-display img { width: 22px; height: 22px; border-radius: 50%; }
.tx-coin-display span { color: var(--text); font-weight: 700; letter-spacing: 0.02em; }

.tx-coin-dropdown {
  position: relative;
  top: 6px;
  right: auto;
  width: 100%;
  max-height: 240px;
  margin-bottom: 4px;
  background: var(--bg);
}

.tx-coin-note {
  margin: 8px 0 0;
  padding: 9px 12px;
  background: rgba(137, 107, 171, 0.08);
  border-left: 2px solid var(--accent);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.tx-input {
  width: 100%;
  border-radius: 10px;
  padding: 13px 15px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease;
}
.tx-input:focus { border-color: var(--accent); }
.tx-input::placeholder { color: var(--muted); font-family: var(--sans); font-weight: 400; }

.tx-computed {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
  padding: 13px 15px;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--win);
  font-variant-numeric: tabular-nums;
}
.tx-computed img { width: 20px; height: 20px; border-radius: 50%; }

.tx-network-row { display: flex; gap: 10px; }
.tx-network-btn {
  flex: 1;
  border-radius: 10px;
  padding: 11px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
}
@media (hover: hover) { .tx-network-btn:hover { border-color: var(--accent); color: var(--text); } }
.tx-network-btn.is-active {
  border-color: var(--accent);
  color: #ffffff;
  background: rgba(137, 107, 171, 0.22);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.tx-submit-btn {
  width: 100%;
  margin-top: 24px;
  padding: 16px;
  background: linear-gradient(180deg, #896bab 0%, #5b427e 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(137, 107, 171, 0.4), 0 8px 20px rgba(91, 66, 126, 0.35);
  transition: filter 0.15s ease, transform 0.1s ease;
}
@media (hover: hover) { .tx-submit-btn:hover { filter: brightness(1.1); } }
.tx-submit-btn:active { filter: brightness(0.92); transform: scale(0.995); }
.tx-submit-btn:disabled { cursor: default; opacity: 0.85; }
.tx-submit-btn.is-processing {
  animation: tx-processing-blink 1s ease-in-out infinite;
}
@keyframes tx-processing-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.tx-balance-lines {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--muted);
}
.tx-balance-lines b { color: var(--text); font-weight: 700; font-family: var(--mono); }

.tx-error-note { margin: 6px 0 0; font-size: 0.78rem; color: #e05a5a; }

.withdraw-submitted-text { margin: 0; color: var(--text); font-size: 0.95rem; line-height: 1.5; }

/* ---------- transactions list panel ---------- */
.tx-list-body { padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 0; flex: 1 1 auto; overflow-y: auto; }

.tx-type-select {
  width: 100%;
  max-width: 220px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 16px;
}
@media (hover: hover) { .tx-type-select:hover { border-color: var(--accent); } }
.tx-type-dropdown { position: relative; top: 6px; right: auto; width: 100%; max-width: 220px; margin-bottom: 12px; background: var(--bg); }

.tx-table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tx-card {
  background: rgba(13, 9, 17, 0.4);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  overflow: hidden;
}
.tx-table { width: 100%; min-width: 480px; border-collapse: collapse; }
.tx-table thead th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tx-table tbody td {
  padding: 13px 12px;
  font-size: 0.88rem;
  color: var(--text);
  border-bottom: 1px solid rgba(137, 107, 171, 0.1);
  white-space: nowrap;
  font-family: var(--mono);
}
.tx-payment-id { letter-spacing: 0.03em; color: var(--muted); }

.tx-status { display: inline-block; padding: 3px 10px; border-radius: 20px; font-family: var(--sans); font-size: 0.78rem; font-weight: 600; }
.tx-status-pending, .tx-status-processing { background: rgba(214, 168, 74, 0.15); color: #d6a84a; }
.tx-status-completed, .tx-status-success { background: rgba(74, 194, 129, 0.15); color: #4ac281; }
.tx-status-rejected, .tx-status-failed { background: rgba(214, 74, 74, 0.15); color: #e05a5a; }

.tx-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
}
.tx-empty svg { opacity: 0.5; }
.tx-empty span { font-size: 0.9rem; }

.tx-pagination { display: none; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }
.tx-page-btn {
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
@media (hover: hover) { .tx-page-btn:hover:not(:disabled) { border-color: var(--accent); } }
.tx-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.tx-page-info { color: var(--muted); font-size: 0.82rem; }

/* ---------- my bets: win/loss amount coloring ---------- */
.bets-net-win { color: #4ac281; font-weight: 700; }
.bets-net-loss { color: #e05a5a; font-weight: 700; }

/* ---------- live support modal ---------- */
.support-modal { text-align: center; }
.support-copy {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.support-links { display: flex; justify-content: center; gap: 22px; }
.support-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--muted);
  transition: transform 0.15s ease, color 0.15s ease;
}
@media (hover: hover) { .support-link:hover { transform: translateY(-3px); color: var(--text); } }
.support-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.support-icon-telegram { background: linear-gradient(180deg, #34aadf 0%, #1f8fc4 100%); color: #ffffff; }
.support-icon-x { background: #000000; color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.12); }
.support-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; }

/* ---------- settings modal ---------- */
.settings-modal { padding: 20px; max-width: 340px; }
.settings-list { display: flex; flex-direction: column; gap: 4px; }
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.settings-item svg { flex: 0 0 auto; opacity: 0.6; }
@media (hover: hover) { .settings-item:hover { background: var(--surface-2); color: var(--text); } }
.settings-item.active { background: var(--surface-2); color: var(--text); }

/* ---------- password / offers form modals ---------- */
.form-modal { max-width: 380px; }
.form-modal-rule { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.form-modal-copy { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.form-field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  margin: 16px 0 8px;
}
.form-field-label:first-of-type { margin-top: 0; }
.form-required { color: #e05a5a; }
.form-input-wrap { position: relative; }
.form-input { padding-right: 44px; }
.form-eye-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 50%;
  cursor: pointer;
}
@media (hover: hover) { .form-eye-btn:hover { color: var(--text); background: var(--surface-2); } }
.form-error {
  margin: 10px 0 0;
  color: #e05a5a;
  font-size: 0.82rem;
}
.form-success {
  margin: 10px 0 0;
  color: #4ac281;
  font-size: 0.82rem;
}
.form-modal-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.form-submit-btn {
  background: var(--accent);
  color: #0d1a22;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity .2s;
}
@media (hover: hover) { .form-submit-btn:hover { filter: brightness(1.08); } }
.form-submit-btn.is-locked { opacity: 0.45; cursor: default; }
.form-submit-btn.is-saving { animation: rakeback-blink 0.9s ease-in-out infinite; }
.form-lock-note { margin: 10px 0 0; color: var(--muted); font-size: 0.8rem; }

/* ---------- Account & Security modal (username + password, scrollable) ---------- */
.account-security-modal { display: flex; flex-direction: column; max-height: 82vh; }
.account-security-scroll { overflow-y: auto; padding-right: 2px; -webkit-overflow-scrolling: touch; }
.account-cooldown-notice { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.account-security-scroll fieldset[disabled] { opacity: 0.45; }

/* ---------- KYC / verification page ---------- */
.kyc-page { max-width: 620px; margin: 0 auto; }

.kyc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.kyc-topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--text);
}
.kyc-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
}
@media (hover: hover) { .kyc-close:hover { color: var(--text); background: var(--surface-2); } }

.kyc-subbar { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.kyc-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
@media (hover: hover) { .kyc-back-btn:hover { border-color: var(--accent); } }
.kyc-crumb-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
}

.kyc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.kyc-card-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
}
.kyc-card-title { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.kyc-card-head-right { display: flex; align-items: center; gap: 12px; }
.kyc-status-pill {
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--accent-2);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
#kyc-chevron { color: var(--muted); transition: transform 0.15s ease; flex: 0 0 auto; }

.kyc-card-body { padding: 22px 20px 26px; }
.kyc-section-title {
  margin: 26px 0 16px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
}
.kyc-section-title:first-child { margin-top: 0; }
.kyc-field-hint { margin: 6px 0 0; color: var(--muted); font-size: 0.78rem; }

.kyc-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23acbcc7' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
}
.kyc-select option { background: var(--surface); color: var(--text); }

.kyc-upload-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 16px;
  margin-bottom: 4px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(13, 9, 17, 0.35);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
@media (hover: hover) { .kyc-upload-card:hover { border-color: var(--accent); } }
.kyc-upload-note { font-size: 0.78rem; color: var(--muted); }
.kyc-upload-filename { font-size: 0.82rem; font-weight: 600; color: var(--accent); word-break: break-all; }
.kyc-upload-btn {
  margin-top: 6px;
  padding: 9px 20px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}

.kyc-submit-btn {
  width: 100%;
  margin-top: 30px;
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: var(--accent-2);
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
@media (hover: hover) { .kyc-submit-btn:hover { filter: brightness(1.15); } }

.kyc-copy { margin: 0 0 16px; color: var(--muted); font-size: 0.85rem; line-height: 1.55; }

.kyc-status-pill.status-approved { background: rgba(60, 190, 120, 0.18); color: #4fd691; }
.kyc-status-pill.status-pending { background: rgba(217, 154, 61, 0.18); color: #e0ac5c; }
.kyc-status-pill.status-rejected { background: rgba(220, 70, 70, 0.18); color: #ec6b6b; }

.kyc-locked-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  padding: 13px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.kyc-locked-note.status-approved { border: 1px solid #3cbe78; background: rgba(60, 190, 120, 0.1); color: #4fd691; }
.kyc-locked-note.status-pending { border: 1px solid #d99a3d; background: rgba(217, 154, 61, 0.1); color: #e0ac5c; }
.kyc-locked-note.status-rejected { border: 1px solid #dc4646; background: rgba(220, 70, 70, 0.1); color: #ec6b6b; }

/* ---------- rewards modal ---------- */
.rewards-modal-box { max-width: 340px; text-align: center; }
.rewards-modal-title {
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: 0.04em;
}
.rewards-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 8px;
}
.rewards-modal-icon { color: var(--accent); margin-bottom: 16px; opacity: 0.85; }
.rewards-modal-text { margin: 0 0 6px; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.rewards-modal-subtext { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* ---- Jackpot page ---- */
.jp-page { padding-bottom: 12px; }

.jp-gold-text { color: var(--accent); }

.jp-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 30px 20px 26px;
  margin-bottom: 14px;
  border-radius: 18px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 50% -10%, rgba(224, 178, 63, 0.22), transparent 60%),
    var(--surface);
  box-shadow: 0 0 0 1px rgba(224, 178, 63, 0.35), 0 0 24px rgba(224, 178, 63, 0.14);
}
.jp-hero-label { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.jp-hero-amount {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.4rem;
  color: var(--text);
}
.jp-hero-amount::before { content: '$'; color: var(--accent); }
.jp-usdt-icon { width: 30px; height: 30px; border-radius: 50%; order: 2; }
.jp-hero-sub { font-size: 0.8rem; color: var(--muted); }

.jp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 480px) { .jp-row2 { grid-template-columns: 1fr; } }

.jp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.jp-card-label { display: block; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

.jp-countdown-card { display: flex; flex-direction: column; }
.jp-countdown { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.jp-countdown-unit { flex: 1; display: flex; flex-direction: column; align-items: center; background: var(--bg); border-radius: 10px; padding: 6px 10px; min-width: 46px; }
.jp-countdown-unit span { font-family: var(--mono); font-weight: 600; font-size: 1.15rem; color: var(--accent); }
.jp-countdown-unit small { font-size: 0.62rem; color: var(--muted); margin-top: 2px; }
.jp-countdown-sep { font-weight: 700; color: var(--muted); padding-bottom: 14px; }

.jp-champion-card { position: relative; display: flex; flex-direction: column; }
.jp-champion-tag {
  position: absolute; top: 0; right: 0;
  background: var(--accent); color: #192834;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 0 15px 0 10px;
}
.jp-champion-row { display: flex; align-items: center; gap: 10px; }
.jp-avatar {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--muted);
}
.jp-avatar-gold { box-shadow: 0 0 0 2px var(--accent); color: var(--accent); }
.jp-champion-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jp-champion-id { font-weight: 700; font-size: 0.92rem; }
.jp-champion-prize { font-size: 0.84rem; color: var(--win); }
.jp-champion-prize small { color: var(--muted); }

.jp-you-card { margin-bottom: 12px; }
.jp-you-stats { display: flex; justify-content: space-between; gap: 10px; }
.jp-you-stat { display: flex; flex-direction: column; gap: 4px; }
.jp-you-stat-label { font-size: 0.72rem; color: var(--muted); }
.jp-you-stat-value { font-weight: 700; font-size: 1.05rem; }

.jp-claim-card {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(137, 107, 171, 0.3);
}
.jp-claim-card-title { display: block; font-size: 0.76rem; color: var(--muted); }
.jp-claim-card-amount { display: block; font-weight: 700; font-size: 1.2rem; color: var(--accent); }
.jp-claim-btn {
  background: var(--accent); color: #192834; border: none; border-radius: 10px;
  padding: 10px 18px; font-weight: 700; font-size: 0.88rem; cursor: pointer;
}
@media (hover: hover) { .jp-claim-btn:hover { filter: brightness(1.1); } }

.jp-leaderboard-card { padding: 16px 0 6px; }
.jp-leaderboard-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 10px; }
.jp-live-dot { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 600; color: var(--win); }
.jp-live-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--win); box-shadow: 0 0 6px var(--win); }
.jp-leaderboard-scroll { max-height: 420px; overflow-y: auto; padding: 0 16px 10px; }

.jp-lb-row {
  display: grid;
  grid-template-columns: 26px 26px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
}
.jp-lb-row:last-child { border-bottom: none; }
.jp-lb-you { background: rgba(224, 178, 63, 0.08); border-radius: 10px; }
.jp-lb-rank { display: flex; justify-content: center; }
.jp-lb-rank-num { color: var(--muted); font-weight: 600; }
.jp-lb-medal { display: block; width: 16px; height: 16px; border-radius: 50%; }
.jp-medal-1 { background: var(--accent); }
.jp-medal-2 { background: #b9c2c9; }
.jp-medal-3 { background: #c98a4b; }
.jp-lb-avatar { color: var(--muted); display: flex; }
.jp-lb-id { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jp-lb-wagered { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }
.jp-lb-prize { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; color: var(--win); }
.jp-lb-prize small { font-weight: 500; color: var(--muted); }

/* ---- Level card (dashboard) ---- */
.lvl-card {
  display: block;
  position: relative;
  padding: 19px 21px 21px;
  margin-bottom: 21px;
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 0% -10%, rgba(137, 107, 171, 0.14), transparent 60%),
    var(--surface);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  color: var(--text);
}
.lvl-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.lvl-card-name { font-family: var(--premium); font-weight: 600; font-size: 1.38rem; letter-spacing: 0.01em; text-shadow: var(--text-glow); }
.lvl-card-head svg { color: var(--muted); flex: 0 0 auto; width: 19px; height: 19px; }
.lvl-card-pct { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 1.12rem; color: var(--accent); margin-bottom: 11px; text-shadow: var(--text-glow); }
.lvl-info-icon { display: flex; color: var(--muted); cursor: help; }
.lvl-info-icon svg { width: 15px; height: 15px; }
.lvl-bar-track { width: 100%; height: 9px; border-radius: 999px; background: var(--bg); overflow: hidden; margin-bottom: 11px; }
.lvl-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); width: 0%; transition: width 0.3s ease; }
.lvl-card-next { font-size: 0.91rem; color: var(--muted); }
.lvl-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lvl-rakeback-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--muted); text-transform: uppercase; flex: 0 0 auto;
}
.lvl-rakeback-check-btn {
  background: var(--accent); color: #0d1a22;
  border-radius: 6px; padding: 4px 10px; font-size: 0.7rem; font-weight: 700;
}
@media (hover: hover) { .lvl-rakeback-check:hover .lvl-rakeback-check-btn { filter: brightness(1.1); } }

/* ---- Rakeback modal (per-coin) ---- */
.rakeback-list { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.rakeback-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg);
}
.rakeback-row-coin { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rakeback-row-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: 0 0 auto; }
.rakeback-row-amount-value { font-weight: 700; font-size: 0.9rem; font-family: var(--mono); }
.rakeback-row-amount-label { font-size: 0.68rem; color: var(--muted); }
.rakeback-claim-btn {
  background: var(--accent); color: #0d1a22; border: none; border-radius: 7px;
  padding: 7px 14px; font-weight: 700; font-size: 0.78rem; cursor: pointer; flex: 0 0 auto;
  transition: opacity .2s;
}
@media (hover: hover) { .rakeback-claim-btn:hover { filter: brightness(1.1); } }
.rakeback-claim-btn.is-locked { opacity: 0.45; cursor: default; }
.rakeback-claim-btn.is-claiming { animation: rakeback-blink 0.9s ease-in-out infinite; }
@keyframes rakeback-blink { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.9; } }

/* ---- Site footer (bottom of homepage) ---- */
.site-footer {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.footer-socials { display: flex; align-items: center; gap: 14px; }
.footer-social-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-2); color: var(--text);
}
@media (hover: hover) { .footer-social-btn:hover { background: var(--accent-2); } }
.footer-logo { width: 100%; max-width: 220px; height: auto; }
.footer-cert-label { margin: 0; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.footer-cert-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.footer-cert-badge { height: auto; flex: 1 1 0; min-width: 0; max-width: 194px; }
.footer-gcb-row { display: flex; align-items: center; justify-content: center; gap: 16px; }
.footer-gcb-badge { height: 56px; width: auto; }
.footer-age-badge {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 700; font-size: 1.7rem; color: var(--accent);
}
.footer-age-divider { width: 1px; height: 34px; background: var(--border); }
.footer-age-text { font-family: var(--sans); font-weight: 500; font-size: 0.72rem; line-height: 1.25; color: var(--muted); text-align: left; }
.footer-copyright { margin: 0; font-size: 0.76rem; color: var(--muted); }
.tx-panel-copyright { text-align: center; padding-top: 16px; margin-top: auto; }

/* ---- Level detail modal ---- */
.lvl-modal-box { max-width: 400px; }
.lvl-modal-current {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px rgba(137, 107, 171, 0.3);
}
.lvl-modal-current-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.lvl-modal-current-name { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.lvl-modal-current-rakeback { font-size: 0.86rem; color: var(--accent); font-weight: 600; }

.lvl-ladder { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.lvl-rung {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  opacity: 0.55;
}
.lvl-rung.is-unlocked { opacity: 1; }
.lvl-rung.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(137, 107, 171, 0.35); }
.lvl-rung-icon { display: flex; flex: 0 0 auto; color: var(--muted); }
.lvl-rung.is-unlocked .lvl-rung-icon { color: var(--accent); }
.lvl-rung-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lvl-rung-title { font-weight: 700; font-size: 0.92rem; }
.lvl-rung-req { font-size: 0.76rem; color: var(--muted); font-family: var(--mono); }
.lvl-rung-reward { font-size: 0.8rem; color: var(--win); }

/* ---- Rewards modal (list + redeem) ---- */
.rewards-empty { display: flex; flex-direction: column; align-items: center; padding: 20px 0 8px; }
.rewards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  max-height: calc(3 * 84px + 2 * 10px);
  overflow-y: auto;
  padding-right: 4px;
}
.rewards-list::-webkit-scrollbar { width: 5px; }
.rewards-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.rewards-row {
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.rewards-row-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rewards-row-title { font-weight: 700; font-size: 0.88rem; }
.rewards-row-amount { font-weight: 700; font-size: 0.95rem; color: var(--accent); }
.rewards-redeem-btn {
  width: 100%;
  background: var(--accent);
  color: #192834;
  border: none;
  border-radius: 8px;
  padding: 9px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
@media (hover: hover) { .rewards-redeem-btn:hover { filter: brightness(1.1); } }
.rewards-turnover { display: flex; flex-direction: column; }
.rewards-turnover-track { width: 100%; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 6px; }
.rewards-turnover-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.rewards-turnover-label { font-size: 0.74rem; color: var(--muted); font-family: var(--mono); }

/* ============ Coinflip ============ */
/* Purple trademark color: same override already applied to .cfl-page /
   .bsl-page (Live variants) - .cf-page is shared by plain Coinflip and
   plain Bottle Spin (bs-page extends it), so this covers both. */
.cf-page { --cf-blue: var(--accent); --cf-blue-dim: var(--accent-2); max-width: 480px; margin: 0 auto; }

.cf-stage {
  position: relative;
  height: 320px;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 42%, rgba(137, 107, 171, 0.16) 0%, rgba(10, 16, 22, 0.9) 62%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 900px;
}
.cf-stage-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 205, 86, 0.22) 0%, rgba(255, 205, 86, 0) 68%);
  filter: blur(2px);
  pointer-events: none;
}

.cf-coin-wrap { position: relative; width: 190px; height: 190px; transform-style: preserve-3d; }
.cf-coin {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
}
.cf-coin.flipping { transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1); }

.cf-coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 34% 30%, #ffe9a8 0%, #f0c454 32%, #c8952b 68%, #96691a 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 244, 214, 0.55), inset 0 -10px 22px rgba(80, 52, 8, 0.4), 0 0 30px rgba(240, 196, 84, 0.35);
  color: #5c3d0e;
}
.cf-coin-tails { transform: rotateY(180deg); }
.cf-coin-ring { position: absolute; inset: 10px; opacity: 0.5; }
.cf-coin-glyph { font-family: var(--premium); font-size: 4.2rem; font-weight: 700; }
.cf-coin-edge {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
  transform: translateZ(-1px);
}

.cf-outcome {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.2rem;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--glow-border), 0 6px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.cf-outcome.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.cf-outcome-win { color: var(--win); }
.cf-outcome-lose { color: var(--loss); }

/* ============ Bottle Spin ============ */
.bs-stage { perspective: none; }
.bs-canvas { width: 280px; height: 280px; max-width: 90%; }
@media (max-width: 480px) { .bs-canvas { width: 230px; height: 230px; } }

/* ============ Hi-Lo ============ */
.hl-page { --hl-gold: #d4af37; --hl-purple: #6b4fd6; max-width: 480px; margin: 0 auto; }

.hl-stage {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr 108px 28px;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
}

.hl-rankscale {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 280px;
  color: rgba(137, 107, 171, 0.35);
}
.hl-rankscale-rank { font-family: var(--display); font-size: 1.1rem; font-weight: 700; }
.hl-rankscale-arrow { font-size: 1.3rem; line-height: 1; }

.hl-change-card-btn {
  background: var(--accent); color: #0d1a22;
  border: none; border-radius: 6px;
  padding: 6px 10px; font-family: var(--sans);
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em;
  cursor: pointer; white-space: nowrap;
  transition: filter 0.15s ease;
}
@media (hover: hover) { .hl-change-card-btn:hover { filter: brightness(1.1); } }
.hl-change-card-btn:active { filter: brightness(0.95); }

.hl-cardcol { position: relative; display: flex; flex-direction: column; align-items: center; }

.hl-card { width: 160px; height: 224px; }
.hl-card-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4)); transition: filter 0.2s ease; }
.hl-card-win .hl-card-svg { filter: drop-shadow(0 0 14px rgba(81, 192, 125, 0.55)); }
.hl-card-lose .hl-card-svg { filter: drop-shadow(0 0 14px rgba(202, 113, 104, 0.55)); }
.hl-card-push .hl-card-svg { filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.55)); }
.hl-card-back rect:first-child { fill: #141c24; }

.hl-oddscol { display: flex; flex-direction: column; gap: 10px; }
.hl-odds-btn {
  border: none;
  border-radius: 14px;
  padding: 14px 10px;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(20, 20, 20, 0.72);
  transition: transform 0.12s ease, filter 0.15s ease;
  clip-path: polygon(50% 0%, 100% 22%, 100% 100%, 0% 100%, 0% 22%);
}
.hl-odds-higher { background: linear-gradient(180deg, #c9a53d 0%, #a9862a 100%); }
.hl-odds-lower { background: linear-gradient(180deg, #7a63e0 0%, #5b45c2 100%); color: rgba(255, 255, 255, 0.85); clip-path: polygon(0% 0%, 100% 0%, 100% 78%, 50% 100%, 0% 78%); }
.hl-odds-btn.active { filter: brightness(1.12); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4); }
@media (hover: hover) { .hl-odds-btn:not(.active):hover { filter: brightness(1.06); } }
.hl-odds-btn:active { transform: scale(0.98); }
.hl-odds-label { font-family: var(--sans); font-size: 0.85rem; font-weight: 700; }
.hl-odds-pct { font-family: var(--mono); font-size: 1.05rem; font-weight: 700; }

.hl-profitstack { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.hl-profitbox { width: 100%; }
.hl-profitbox-label { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 600; margin: 0 2px 6px; }
.hl-profitbox-input input { color: var(--text); }

.hl-startpanel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(4, 8, 12, 0.6);
  box-shadow: 0 0 0 1px var(--glow-border);
}
.hl-startpanel .hl-change-card-btn { position: absolute; top: 10px; right: 10px; }
.hl-startpanel-card { width: 62px; height: 86px; flex-shrink: 0; }
.hl-startpanel-card .hl-card-svg { filter: none; }
.hl-startpanel-tag {
  display: inline-flex;
  align-self: flex-end;
  margin-bottom: 4px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: #0d1a10;
  background: var(--win);
  padding: 4px 10px;
  border-radius: 6px;
}

.hl-outcome {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.2rem;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--glow-border), 0 6px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}
.hl-outcome.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hl-outcome-win { color: var(--win); }
.hl-outcome-lose { color: var(--loss); }
.hl-outcome-push { color: var(--hl-gold); }

.hl-picker-overlay { z-index: 75; }
.hl-picker-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--glow-border), 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.hl-picker-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 12px;
}
.hl-picker-title { font-family: var(--display); font-size: 1rem; font-weight: 600; }
.hl-picker-close {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
@media (hover: hover) { .hl-picker-close:hover { color: var(--text); } }

.hl-picker-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 16px 22px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hl-picker-strip::-webkit-scrollbar { display: none; }
.hl-picker-cell {
  flex: 0 0 auto;
  width: 92px;
  height: 128px;
  scroll-snap-align: center;
  border: 2px solid transparent;
  border-radius: 12px;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.hl-picker-cell .hl-card-svg { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)); }
.hl-picker-cell.active { border-color: var(--hl-gold); transform: translateY(-4px); }
@media (hover: hover) { .hl-picker-cell:not(.active):hover { border-color: rgba(137, 107, 171, 0.3); } }

@media (max-width: 520px) {
  .hl-stage { grid-template-columns: 22px 1fr 92px 22px; gap: 6px; }
  .hl-rankscale { height: 240px; }
  .hl-card { width: 130px; height: 182px; }
  .hl-odds-btn { padding: 11px 6px; }
  .hl-odds-pct { font-size: 0.92rem; }
}

/* ============ Wheel ============ */
.wh-stage {
  position: relative;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 42%, rgba(47, 111, 237, 0.16) 0%, rgba(10, 16, 22, 0.9) 62%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 28px 20px 20px;
}
.wh-pin {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  color: #e6455a;
  filter: drop-shadow(0 2px 4px rgba(230, 69, 90, 0.5));
  z-index: 3;
}
.wh-ring-wrap { position: relative; width: 100%; max-width: 340px; margin: 0 auto; }
.wh-ring {
  display: block;
  width: 100%; height: auto;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 12px rgba(47, 111, 237, 0.18));
}
.wh-center {
  position: absolute;
  top: 50%; left: 50%;
  width: 36%; height: 36%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(137, 107, 171, 0.18);
}

.wh-bar { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.wh-chip {
  flex: 1 1 0;
  min-width: 56px;
  text-align: center;
  padding: 14px 6px 10px;
  border-radius: 10px;
  background: rgba(13, 9, 17, 0.55);
  border-bottom: 3px solid transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 700;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.wh-chip-active {
  border-bottom-color: var(--chip-color);
  transform: translateY(-1px);
  box-shadow: 0 0 12px color-mix(in srgb, var(--chip-color) 45%, transparent);
}

@media (max-width: 380px) {
  .wh-chip { font-size: 0.86rem; padding: 12px 4px 8px; }
}

/* ============ Shared: below-minimum-bet notice ============ */
.min-bet-notice {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--loss);
  margin: 8px 2px 0;
}
.min-bet-notice.show { display: flex; }

.cf-panel {
  margin-top: 16px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 10px var(--glow-soft);
  padding: 18px 16px 20px;
}

.cf-bet-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 15px;
  background: linear-gradient(180deg, var(--cf-blue) 0%, var(--cf-blue-dim) 100%);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(137, 107, 171, 0.35);
  transition: filter 0.15s ease, transform 0.05s ease;
}
@media (hover: hover) { .cf-bet-btn:hover:not(:disabled) { filter: brightness(1.08); } }
.cf-bet-btn:active:not(:disabled) { transform: translateY(1px); }
.cf-bet-btn:disabled { opacity: 0.6; cursor: default; }

.cf-field-row { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 8px; }
.cf-field-row:first-of-type { margin-top: 18px; }
.cf-field-label { font-size: 0.88rem; color: var(--muted); font-weight: 600; }
.cf-field-usd { font-family: var(--mono); font-size: 0.9rem; color: var(--muted); }

.cf-amount-row { display: flex; gap: 8px; }
.cf-amount-input {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  padding: 12px 14px;
}
.cf-amount-input input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  min-width: 0;
}
.cf-profit-input input { color: var(--muted); }
.cf-coin-icon { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-left: 8px; }

.cf-amount-actions {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  overflow: hidden;
}
.cf-amt-btn {
  border: none;
  background: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
@media (hover: hover) { .cf-amt-btn:hover { color: var(--accent); background: rgba(137, 107, 171, 0.08); } }
.cf-amt-btn:active { background: rgba(137, 107, 171, 0.14); }
.cf-amt-btn-max { color: var(--cf-blue); }
@media (hover: hover) { .cf-amt-btn-max:hover { color: var(--cf-blue); background: rgba(137, 107, 171, 0.1); } }
.cf-amt-btn-max:active { background: rgba(137, 107, 171, 0.18); }
.cf-amt-divider {
  width: 1px;
  align-self: stretch;
  margin: 8px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(172, 188, 199, 0.4) 20%, rgba(172, 188, 199, 0.4) 80%, transparent 100%);
  flex-shrink: 0;
}

.cf-random-btn {
  width: 100%;
  margin-top: 14px;
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 13px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) { .cf-random-btn:hover { color: var(--text); border-color: rgba(137, 107, 171, 0.3); } }

.cf-side-row { display: flex; gap: 10px; margin-top: 10px; }
.cf-side-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 15px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.cf-side-btn.active { color: var(--text); border-color: var(--cf-blue); background: rgba(137, 107, 171, 0.14); }
@media (hover: hover) { .cf-side-btn:not(.active):hover { color: var(--text); border-color: rgba(137, 107, 171, 0.3); } }
.cf-side-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.cf-side-dot-heads { background: radial-gradient(circle at 35% 30%, #ffe9a8, #c8952b); }
.cf-side-dot-tails { background: radial-gradient(circle at 35% 30%, #d7dee6, #8a97a6); clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }

@media (max-width: 520px) {
  .cf-stage { height: 280px; }
  .cf-coin-wrap { width: 160px; height: 160px; }
  .cf-coin-glyph { font-size: 3.6rem; }
}

body.no-bottom-nav .container { padding-bottom: 20px; }

.cf-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cf-close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); color: var(--muted);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 8px var(--glow-soft);
  transition: color 0.15s ease, background 0.15s ease;
}
@media (hover: hover) { .cf-close-btn:hover { color: var(--text); background: var(--surface-2); } }
.cf-header-title { font-family: var(--display); font-size: 1.05rem; font-weight: 600; }
.cf-header-spacer { width: 36px; }

.cf-quick-row { display: flex; gap: 8px; margin-top: 10px; }
.cf-quick-btn {
  flex: 1;
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 10px;
  background: rgba(13, 9, 17, 0.55);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 4px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) { .cf-quick-btn:hover { color: var(--text); border-color: rgba(137, 107, 171, 0.3); } }
.cf-quick-btn:active { color: var(--text); border-color: var(--cf-blue); }

.dc-bet-btn.bt-locked, .cf-bet-btn.bt-locked {
  opacity: 0.55;
  cursor: default;
  transition: opacity 0.25s ease;
}
.bt-label {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}
.dc-bet-btn.bt-locked .bt-label, .cf-bet-btn.bt-locked .bt-label {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 800;
}

/* ============ Dice ============ */
.dc-page { --dc-blue: #2f6fed; --dc-blue-dim: #1f4fb8; --dc-red: #e6455a; --dc-green: #3ecf6e; max-width: 480px; margin: 0 auto; }

.dc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dc-close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); color: var(--muted);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 8px var(--glow-soft);
  transition: color 0.15s ease, background 0.15s ease;
}
@media (hover: hover) { .dc-close-btn:hover { color: var(--text); background: var(--surface-2); } }
.dc-header-title { font-family: var(--display); font-size: 1.05rem; font-weight: 600; }
.dc-header-spacer { width: 36px; }

.dc-stage {
  position: relative;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 42%, rgba(47, 111, 237, 0.16) 0%, rgba(10, 16, 22, 0.9) 62%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 32px 24px 24px;
}

.dc-ruler { display: flex; justify-content: space-between; margin-bottom: 14px; padding: 0 2px; }
.dc-ruler span { font-family: var(--mono); font-size: 0.92rem; font-weight: 700; color: var(--muted); }

.dc-slider-wrap { padding: 0 2px; touch-action: none; }
.dc-slider-track {
  position: relative;
  height: 44px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--glow-border);
  cursor: pointer;
}
.dc-slider-fill-lose,
.dc-slider-fill-win {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 10px;
  border-radius: 999px;
  pointer-events: none;
}
.dc-slider-fill-lose { background: var(--dc-red); }
.dc-slider-fill-win { background: var(--dc-green); }

.dc-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
  z-index: 3;
}
.dc-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  width: 3px;
  height: 26px;
  border-radius: 2px;
  background: inherit;
  box-shadow: inherit;
}
.dc-marker.show-roll {
  width: 14px;
  height: 14px;
  opacity: 1;
  transition: top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: dc-marker-drop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dc-marker.roll-win { background: var(--win); box-shadow: 0 0 14px var(--win); }
.dc-marker.roll-lose { background: var(--loss); box-shadow: 0 0 14px var(--loss); }
@keyframes dc-marker-drop {
  0% { transform: translate(-50%, -220%) scale(0.6); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.25); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.dc-roll-badge {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translate(-50%, -100%) scale(0.9);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--glow-border), 0 6px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 4;
}
.dc-roll-badge.show { opacity: 1; transform: translate(-50%, -100%) scale(1); }
.dc-roll-badge.win { color: var(--win); }
.dc-roll-badge.lose { color: var(--loss); }

.dc-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--dc-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 4px 12px rgba(47, 111, 237, 0.45);
  cursor: grab;
  z-index: 2;
}
.dc-handle span { width: 2px; height: 16px; border-radius: 1px; background: rgba(255, 255, 255, 0.85); }
.dc-handle.dragging { cursor: grabbing; filter: brightness(1.08); }

.dc-stats { display: flex; gap: 10px; margin-top: 28px; }
.dc-stat { flex: 1; min-width: 0; }
.dc-stat label { display: block; font-size: 0.86rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.dc-stat-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  padding: 12px 12px;
}
.dc-stat-input input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.98rem;
  font-weight: 600;
}
.dc-stat-x, .dc-stat-swap {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--muted);
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  margin-left: 6px;
}
.dc-stat-swap { transition: color 0.15s ease, transform 0.15s ease; }
@media (hover: hover) { .dc-stat-swap:hover { color: var(--dc-blue); } }
.dc-stat-swap:active { transform: rotate(180deg); }
.dc-stat-pct { color: var(--muted); font-family: var(--mono); font-size: 0.9rem; flex-shrink: 0; margin-left: 6px; }

@media (max-width: 380px) {
  .dc-stats { flex-wrap: wrap; }
}

.dc-panel {
  margin-top: 16px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 10px var(--glow-soft);
  padding: 18px 16px 20px;
}

.dc-bet-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 15px;
  background: linear-gradient(180deg, var(--dc-blue) 0%, var(--dc-blue-dim) 100%);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(47, 111, 237, 0.35);
  transition: filter 0.15s ease, transform 0.05s ease;
}
@media (hover: hover) { .dc-bet-btn:hover:not(:disabled) { filter: brightness(1.08); } }
.dc-bet-btn:active:not(:disabled) { transform: translateY(1px); }
.dc-bet-btn:disabled { opacity: 0.6; cursor: default; }

.dc-field-row { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 8px; }
.dc-field-row:first-of-type { margin-top: 18px; }
.dc-field-label { font-size: 0.88rem; color: var(--muted); font-weight: 600; }
.dc-field-usd { font-family: var(--mono); font-size: 0.9rem; color: var(--muted); }

.dc-amount-row { display: flex; gap: 8px; }
.dc-amount-input {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  padding: 12px 14px;
}
.dc-amount-input input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  min-width: 0;
}
.dc-profit-input input { color: var(--muted); }
.dc-coin-icon { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-left: 8px; }

.dc-amount-actions {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  overflow: hidden;
}
.dc-amt-btn {
  border: none;
  background: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
@media (hover: hover) { .dc-amt-btn:hover { color: var(--accent); background: rgba(137, 107, 171, 0.08); } }
.dc-amt-btn:active { background: rgba(137, 107, 171, 0.14); }
.dc-amt-divider {
  width: 1px;
  align-self: stretch;
  margin: 8px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(172, 188, 199, 0.4) 20%, rgba(172, 188, 199, 0.4) 80%, transparent 100%);
  flex-shrink: 0;
}

.dc-quick-row { display: flex; gap: 8px; margin-top: 10px; }
.dc-quick-btn {
  flex: 1;
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 10px;
  background: rgba(13, 9, 17, 0.55);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 4px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) { .dc-quick-btn:hover { color: var(--text); border-color: rgba(137, 107, 171, 0.3); } }
.dc-quick-btn:active { color: var(--text); border-color: var(--dc-blue); }

/* ---------- Limbo ---------- */
.lb-page { --dc-blue: #2f6fed; max-width: 480px; margin: 0 auto; }

.lb-stage {
  position: relative;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 30%, rgba(47, 111, 237, 0.16) 0%, rgba(10, 16, 22, 0.9) 62%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 32px 20px 20px;
}

.lb-result {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 36px 0 32px;
  font-family: var(--display);
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s ease;
}
.lb-result-x { font-size: 2.4rem; opacity: 0.85; }
.lb-result.lb-win { color: var(--win); }
.lb-result.lb-lose { color: var(--loss); }
.lb-result.lb-pop #lb-result-num,
.lb-result.lb-pop .lb-result-x { animation: lb-pop 0.32s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes lb-pop { 0% { transform: scale(0.85); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }

.lb-stats {
  display: flex;
  gap: 10px;
  background: rgba(13, 9, 17, 0.4);
  border: 1px solid rgba(137, 107, 171, 0.12);
  border-radius: 16px;
  padding: 18px;
}
.lb-stat { flex: 1; min-width: 0; }
.lb-stat label { display: block; font-size: 0.86rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

@media (max-width: 380px) {
  .lb-stats { flex-wrap: wrap; }
}

/* ---------- Drill ---------- */
.dr-page { --dr-diamond: #4fb2ff; --dr-circle: #f0b429; --dr-triangle: #3ecf6e; }

.dr-stage {
  position: relative;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 8%, rgba(47, 111, 237, 0.16) 0%, rgba(10, 16, 22, 0.9) 62%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 20px 12px 8px;
  overflow: hidden;
}

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

.dr-drill {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 6px 4px 0;
  border-radius: 14px;
}

.dr-mult {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: inset 0 0 0 1px var(--glow-border);
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.dr-drill[data-shape="diamond"] .dr-mult { color: var(--dr-diamond); }
.dr-drill[data-shape="circle"] .dr-mult { color: var(--dr-circle); }
.dr-drill[data-shape="triangle"] .dr-mult { color: var(--dr-triangle); }
.dr-drill.dr-selected .dr-mult {
  box-shadow: inset 0 0 0 1.5px currentColor, 0 0 12px rgba(137, 107, 171, 0.25);
  background: rgba(13, 9, 17, 0.55);
}
.dr-drill.dr-reading .dr-mult { animation: dr-pulse 0.9s ease-in-out infinite; }
.dr-drill.dr-won .dr-mult { color: var(--win) !important; background: rgba(81, 192, 125, 0.14); box-shadow: inset 0 0 0 1.5px var(--win); animation: dr-bust-pop 0.3s cubic-bezier(0.22, 0.61, 0.36, 1); }
.dr-drill.dr-busted .dr-mult { animation: dr-bust-pop 0.3s cubic-bezier(0.22, 0.61, 0.36, 1); }

.dr-canvas { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }

@keyframes dr-pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@keyframes dr-bust-pop { 0% { transform: scale(0.9); } 55% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ---------- Drill: in-panel shape picker (sits directly under Bet Amount,
   above Target Multiplier / Win Chance - mirrors Coinflip's heads/tails
   row placement) ---------- */
.dr-picker {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  padding: 6px;
}
.dr-picker-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border: none;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
@media (hover: hover) { .dr-picker-btn:hover { color: var(--text); } }
.dr-picker-btn[data-shape="diamond"].active { background: rgba(79, 178, 255, 0.16); color: var(--dr-diamond); }
.dr-picker-btn[data-shape="circle"].active { background: rgba(240, 180, 41, 0.16); color: var(--dr-circle); }
.dr-picker-btn[data-shape="triangle"].active { background: rgba(62, 207, 110, 0.16); color: var(--dr-triangle); }

.dr-stat { margin-top: 16px; }
.dr-stat:first-of-type { margin-top: 18px; }

/* ---------- Mines ---------- */
.mn-page { --dc-blue: #2f6fed; --mn-gem: #3ecf6e; --mn-mine: #e6455a; max-width: 480px; margin: 0 auto; }

.mn-stage {
  position: relative;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 30%, rgba(47, 111, 237, 0.14) 0%, rgba(10, 16, 22, 0.9) 62%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 20px;
}

.mn-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.mn-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: none;
  background: #2c3e4f;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, transform 0.1s ease;
}
@media (hover: hover) { .mn-tile:not(:disabled):hover { background: #35485a; } }
.mn-tile:not(:disabled):active { transform: scale(0.94); }
.mn-tile:disabled { cursor: default; }

.mn-tile svg { width: 46%; height: 46%; opacity: 0; transform: scale(0.5); transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1); }
.mn-tile.revealed svg { opacity: 1; transform: scale(1); }

.mn-tile.gem { background: rgba(62, 207, 110, 0.14); box-shadow: inset 0 0 0 1px rgba(62, 207, 110, 0.45); }
.mn-tile.mine { background: rgba(230, 69, 90, 0.16); box-shadow: inset 0 0 0 1px rgba(230, 69, 90, 0.5); }
.mn-tile.mine-dim { background: rgba(230, 69, 90, 0.08); box-shadow: inset 0 0 0 1px rgba(230, 69, 90, 0.22); }
.mn-tile.mine-dim svg { opacity: 0.55; }

@keyframes mn-reveal-pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.mn-tile.just-revealed svg { animation: mn-reveal-pop 0.28s cubic-bezier(0.22, 0.61, 0.36, 1); }

.mn-select-wrap { position: relative; }
.mn-select {
  width: 100%;
  appearance: none;
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  padding: 13px 40px 13px 14px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
}
.mn-select:disabled { opacity: 0.6; cursor: default; }
.mn-select-caret { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

.mn-gems-box {
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.98rem;
  font-weight: 600;
}

.mn-action-btn-cashout { background: linear-gradient(180deg, var(--win) 0%, #2fa562 100%) !important; }

/* ---------- Tower ---------- */
.tw-page { --dc-blue: #2f6fed; --tw-gem: #3ecf6e; --tw-bomb: #e6455a; max-width: 480px; margin: 0 auto; }

.tw-stage {
  position: relative;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 30%, rgba(47, 111, 237, 0.14) 0%, rgba(10, 16, 22, 0.9) 62%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 20px 20px 16px;
  overflow: hidden;
}


.tw-tower {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  max-height: 58vh;
  overflow-y: auto;
  padding: 4px 2px;
}

.tw-row {
  display: grid;
  grid-template-columns: repeat(var(--tw-cols, 3), 1fr);
  gap: 8px;
  opacity: 0.4;
  transition: opacity 0.15s ease;
}
.tw-row-active { opacity: 1; }
.tw-row-cleared { opacity: 0.85; }
.tw-row-locked { opacity: 0.35; }

.tw-tile {
  position: relative;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: #2c3e4f;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, transform 0.1s ease;
}
@media (hover: hover) { .tw-tile:not(:disabled):hover { background: #35485a; } }
.tw-tile:not(:disabled):active { transform: scale(0.94); }
.tw-tile:disabled { cursor: default; }
.tw-row-active .tw-tile:not(.revealed) { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(137, 107, 171, 0.35); }

.tw-tile svg { width: 42%; height: 42%; opacity: 0; transform: scale(0.5); transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1); }
.tw-tile.revealed svg { opacity: 1; transform: scale(1); }

.tw-tile.gem { background: rgba(62, 207, 110, 0.14); box-shadow: inset 0 0 0 1px rgba(62, 207, 110, 0.45); }
.tw-tile.bomb { background: rgba(230, 69, 90, 0.16); box-shadow: inset 0 0 0 1px rgba(230, 69, 90, 0.5); }
.tw-tile.bomb-dim { background: rgba(230, 69, 90, 0.08); box-shadow: inset 0 0 0 1px rgba(230, 69, 90, 0.22); }
.tw-tile.bomb-dim svg { opacity: 0.55; }

@keyframes tw-reveal-pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.tw-tile.just-revealed svg { animation: tw-reveal-pop 0.28s cubic-bezier(0.22, 0.61, 0.36, 1); }

/* ---------- Keno ---------- */

.kn-page { --dc-blue: #2f6fed; --kn-purple: #8b5cf6; --kn-green: #3ecf6e; max-width: 480px; margin: 0 auto; }

.kn-stage {
  position: relative;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 30%, rgba(47, 111, 237, 0.14) 0%, rgba(10, 16, 22, 0.9) 62%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 20px;
}

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

.kn-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: none;
  background: #2c3e4f;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 700;
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.1s ease;
}
@media (hover: hover) { .kn-tile:not(.selected):not(.result):hover { background: #35485a; } }
.kn-tile:active { transform: scale(0.92); }

.kn-tile.selected { background: rgba(139, 92, 246, 0.22); box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.65); color: #d7c8ff; }

/* Drawn numbers paint green — this wins over the purple "selected" look
   even when the number was also picked by the player, per spec. */
.kn-tile.result { background: rgba(62, 207, 110, 0.16); box-shadow: inset 0 0 0 1px rgba(62, 207, 110, 0.5); color: #bdf5cf; animation: kn-reveal-pop 0.28s cubic-bezier(0.22, 0.61, 0.36, 1); }
.kn-tile.result.result-hit { background: rgba(62, 207, 110, 0.32); box-shadow: inset 0 0 0 1.5px var(--kn-green), 0 0 10px rgba(62, 207, 110, 0.35); color: #fff; }

@keyframes kn-reveal-pop { 0% { transform: scale(0.8); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

.kn-hint { text-align: center; margin-top: 14px; padding: 12px; border-radius: 12px; background: rgba(13, 9, 17, 0.55); border: 1px solid rgba(137, 107, 171, 0.16); color: var(--muted); font-size: 0.92rem; font-weight: 600; }

@media (max-width: 380px) {
  .kn-tile { font-size: 0.76rem; }
  .kn-grid { gap: 6px; }
}

/* ---------- Blackjack ---------- */
.bj-page { --dc-blue: #2f6fed; --dc-blue-dim: #1f4fb8; max-width: 480px; margin: 0 auto; }

.bj-stage {
  position: relative;
  min-height: 340px;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 8%, rgba(47, 111, 237, 0.14) 0%, rgba(10, 16, 22, 0.94) 55%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 22px 16px 20px;
  display: flex;
  flex-direction: column;
}

.bj-dealer-row { display: flex; flex-direction: column; align-items: center; min-height: 96px; }
.bj-hand { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.bj-total {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  min-height: 1.2em;
}

.bj-card { width: 58px; height: 82px; flex-shrink: 0; }
.bj-card-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4)); }
.bj-card-back rect:first-child { fill: #141c24; }
@keyframes bj-card-deal { 0% { transform: translateY(-14px) scale(0.9); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
.bj-card-deal { animation: bj-card-deal 0.22s cubic-bezier(0.22, 0.61, 0.36, 1); }

.bj-ribbon {
  position: relative;
  align-self: center;
  margin: 18px 0 10px;
  padding: 8px 26px;
  background: rgba(13, 9, 17, 0.7);
  box-shadow: 0 0 0 1px var(--glow-border);
  border-radius: 3px;
  text-align: center;
  clip-path: polygon(3% 0%, 97% 0%, 100% 50%, 97% 100%, 3% 100%, 0% 50%);
}
.bj-ribbon span { display: block; }
.bj-ribbon span:first-child { font-family: var(--sans); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; color: var(--muted); }
.bj-ribbon-sub { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.03em; color: rgba(172, 188, 199, 0.65); margin-top: 2px; }

.bj-outcome {
  align-self: center;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  margin-bottom: 4px;
  min-height: 1.6rem;
}
.bj-outcome.show { opacity: 1; transform: translateY(0); }
.bj-outcome-win { color: var(--win); }
.bj-outcome-lose { color: var(--loss); }
.bj-outcome-push { color: var(--muted); }

.bj-player-hands { display: flex; justify-content: center; gap: 16px; margin-top: auto; flex: 1; align-items: flex-end; }
.bj-split-layout { flex-wrap: wrap; }
.bj-hand-block { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 0; opacity: 0.55; transition: opacity 0.15s ease; padding: 8px; border-radius: 14px; }
.bj-hand-block:only-child { opacity: 1; }
.bj-hand-active { opacity: 1; box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.4); background: rgba(47, 111, 237, 0.06); }
.bj-hand-busted { opacity: 0.4; }
.bj-hand-tag { font-size: 0.76rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.03em; }
.bj-player-hand .bj-card { width: 50px; height: 70px; }

.bj-hand-outcome { margin-top: 8px; font-size: 0.82rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(13, 9, 17, 0.6); }
.bj-hand-outcome.bj-outcome-win, .bj-hand-outcome.bj-outcome-blackjack { color: var(--win); }
.bj-hand-outcome.bj-outcome-lose { color: var(--loss); }
.bj-hand-outcome.bj-outcome-push { color: var(--muted); }

.bj-action-grid {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.bj-action-grid.show { display: grid; }
.bj-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 700;
  padding: 15px;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
@media (hover: hover) { .bj-action-btn:not(:disabled):hover { filter: brightness(1.12); } }
.bj-action-btn:active:not(:disabled) { transform: translateY(1px); }
.bj-action-btn:disabled { opacity: 0.4; cursor: default; }
.bj-action-tag { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }

@media (max-width: 380px) {
  .bj-card { width: 50px; height: 70px; }
  .bj-player-hand .bj-card { width: 42px; height: 59px; }
}

/* ---------- Crash ---------- */

.cr-page {
  --dc-blue: var(--accent); --dc-blue-dim: var(--accent-2);
  --cf-blue: var(--accent); /* used by the shared .cfl-roundbar-fill bar */
  --cr-blue: #4fb2ff; --cr-green: #3ecf6e; --cr-purple: #a855f7; --cr-pink: #ec4899; --cr-red: #e6455a;
  --cr-color: var(--cr-blue);
  max-width: 480px; margin: 0 auto;
}
/* --cr-blue stays the original blue on purpose - it's the low-multiplier
   color tier (like green/purple/pink for higher tiers), not a brand
   accent, so it's untouched by this purple rebrand - same convention as
   Drill Live's --cr-blue/--dr-diamond (see .drl-page below). */

.cr-history-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cr-history-chips { flex: 1; display: flex; gap: 8px; overflow: hidden; }
.cr-chip {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  min-width: 62px; height: 40px; padding: 0 14px;
  border-radius: 999px;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 700;
  background: var(--surface-2); color: var(--text);
}
.cr-chip.cr-c-blue   { background: rgba(79, 178, 255, 0.16); color: var(--cr-blue); }
.cr-chip.cr-c-green  { background: rgba(62, 207, 110, 0.16); color: var(--cr-green); }
.cr-chip.cr-c-purple { background: rgba(168, 85, 247, 0.18); color: var(--cr-purple); }
.cr-chip.cr-c-pink   { background: var(--cr-pink); color: #0a1016; }

.cr-history-toggle {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); color: var(--muted); border: none;
  box-shadow: 0 0 0 1px var(--glow-border);
  cursor: pointer;
  transition: transform 0.2s ease, color 0.15s ease;
}
.cr-history-toggle.expanded { transform: rotate(180deg); color: var(--text); }

.cr-history-expanded {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 2px 2px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}
.cr-history-expanded.show { display: flex; max-height: 200px; }
.cr-history-expanded .cr-chip { min-width: 56px; height: 34px; padding: 0 10px; font-size: 0.82rem; }

.cr-stage {
  position: relative;
  margin-top: 10px;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(120% 100% at 50% 30%, rgba(137, 107, 171, 0.16) 0%, rgba(10, 16, 22, 0.94) 62%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  height: 340px;
}

.cr-stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.cr-center {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  pointer-events: none;
}

.cr-multiplier {
  display: none;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 4.8rem;
  letter-spacing: -0.01em;
  color: #ffffff;
  -webkit-text-stroke: 2.5px var(--cr-color);
  paint-order: stroke fill;
  text-shadow: 0 0 18px color-mix(in srgb, var(--cr-color) 55%, transparent), 0 4px 10px rgba(0, 0, 0, 0.4);
}
.cr-mult-x { font-size: 0.75em; opacity: 0.9; }
.cr-stage.cr-running .cr-multiplier,
.cr-stage.cr-crashed .cr-multiplier { display: flex; align-items: baseline; }
.cr-stage.cr-crashed .cr-multiplier { -webkit-text-stroke: 2.5px var(--cr-red); text-shadow: 0 0 18px rgba(230, 69, 90, 0.55), 0 4px 10px rgba(0, 0, 0, 0.4); animation: cr-crash-pop 0.3s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes cr-crash-pop { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes cr-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* "PREPARING" - shown for the full waiting-phase countdown while the
   display is otherwise empty (no numeric countdown here anymore, see
   .cfl-roundbar below for that). Same font/weight as .cr-multiplier
   (var(--sans), 800) per spec, scaled down, blinking continuously. */
.cr-preparing {
  display: none;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 2.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  -webkit-text-stroke: 1.5px var(--accent);
  paint-order: stroke fill;
  text-shadow: 0 0 18px rgba(137, 107, 171, 0.5), 0 4px 10px rgba(0, 0, 0, 0.4);
  animation: cr-blink 0.9s ease-in-out infinite;
}
.cr-stage.cr-waiting .cr-preparing { display: flex; }

/* "GETTING READY" - shown for the fixed 2s buffer between countdown-zero
   and the multiplier actually starting to climb. Blinking text only, no
   dots/icon per spec. */
.cr-getting-ready {
  display: none;
  align-items: center;
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: var(--text-glow);
  animation: cr-blink 0.5s ease-in-out infinite;
}
.cr-stage.cr-getready .cr-getting-ready { display: flex; }

.cr-stage-footer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}
.cr-players { display: flex; align-items: center; gap: 6px; }
.cr-network { display: flex; align-items: center; gap: 6px; }
.cr-network-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--win); box-shadow: 0 0 8px var(--win); }

.cr-panel { margin-top: 14px; }
.cr-panel:first-of-type { margin-top: 16px; }

.cr-topline {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 14px;
}
.cr-autobet-toggle, .cr-autocashout-toggle {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.cr-autocashout-toggle { flex: 1; justify-content: flex-end; }
.cr-autobet-check, .cr-autocashout-check {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; flex-shrink: 0;
  border-radius: 4px;
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.35);
  cursor: pointer;
  position: relative;
}
.cr-autobet-check:checked, .cr-autocashout-check:checked {
  background: var(--dc-blue);
  border-color: var(--dc-blue);
}
.cr-autobet-check:checked::after, .cr-autocashout-check:checked::after {
  content: '';
  position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.cr-autocashout-input {
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 8px;
  padding: 4px 8px;
}
.cr-autocashout-input input {
  width: 46px;
  background: none; border: none; outline: none;
  color: var(--text);
  font-family: var(--mono); font-size: 0.82rem; font-weight: 600;
  text-align: right;
}

.cr-bet-btn.cr-locked-active {
  background: linear-gradient(180deg, var(--win) 0%, #2f9d5a 100%);
  box-shadow: 0 6px 16px rgba(81, 192, 125, 0.35);
}
.cr-bet-btn.cr-locked-active:disabled { opacity: 1; }
.cr-bet-btn .cr-btn-sub { display: block; font-size: 0.72rem; font-weight: 600; opacity: 0.85; margin-top: 1px; }

@media (max-width: 380px) {
  .cr-preparing { font-size: 1.7rem; }
  .cr-multiplier { font-size: 3.9rem; }
  .cr-stage { height: 300px; }
}

/* ---------- Roulette ---------- */
.rl-page { --dc-blue: #2f6fed; --dc-blue-dim: #1f4fb8; --rl-red: #ee3b52; --rl-black: #33424e; --rl-green: #3ecf6e; max-width: 480px; margin: 0 auto; }

.rl-board-wrap {
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 10px var(--glow-soft);
  padding: 14px;
}

.rl-board {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.rl-outside-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 46px;
  flex-shrink: 0;
}
.rl-outside-col-narrow { padding-top: 41px; } /* aligns row 1 with the number grid, below the 0 header */
.rl-outside-col-dozen { padding-top: 41px; }

.rl-outside {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(137, 107, 171, 0.28);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  position: relative;
  min-height: 40px;
}
.rl-outside.rl-vert { writing-mode: vertical-rl; text-orientation: mixed; letter-spacing: 0.02em; }
.rl-color { border: none; }
.rl-color-red { background: var(--rl-red); }
.rl-color-black { background: var(--rl-black); }

.rl-main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.rl-zero {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rl-green);
  color: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  height: 38px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.rl-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 38px;
  gap: 3px;
}
.rl-num {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.rl-num-red { background: var(--rl-red); }
.rl-num-black { background: var(--rl-black); }

.rl-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.rl-col2to1 {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(137, 107, 171, 0.28);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  min-height: 34px;
  position: relative;
}

.rl-zero:active, .rl-outside:active, .rl-num:active, .rl-col2to1:active { filter: brightness(1.15); transform: scale(0.97); }
.rl-win { box-shadow: inset 0 0 0 2px #ffd25e, 0 0 12px rgba(255, 210, 94, 0.55) !important; animation: rl-win-pulse 0.6s ease infinite alternate; }
@keyframes rl-win-pulse { from { filter: brightness(1); } to { filter: brightness(1.25); } }

.rl-chip-stack {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.rl-chip-amt {
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #c8952b);
  color: #2a1c00;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  min-width: 26px;
  height: 26px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.rl-actions-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding: 0 2px; }
.rl-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px;
}
@media (hover: hover) { .rl-action-btn:hover { color: var(--text); } }
.rl-action-btn:active { color: var(--text); }

.rl-panel { margin-top: 14px; }

.rl-chip-input input, .rl-total-input input { color: var(--muted); }
.rl-total-input { justify-content: flex-start; gap: 8px; }
.rl-total-input .dc-coin-icon { margin-left: 0; }
.rl-total-input .dc-amt-btn { padding: 8px 10px; font-size: 0.8rem; }
.rl-total-input .dc-amt-divider { margin: 4px 0; }

.rl-denom-row { display: flex; align-items: stretch; gap: 6px; margin-top: 10px; }
.rl-denom-nav {
  flex-shrink: 0;
  width: 32px;
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 10px;
  background: rgba(13, 9, 17, 0.55);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
@media (hover: hover) { .rl-denom-nav:hover { color: var(--text); } }
.rl-denom-track {
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px;
  scrollbar-width: none;
}
.rl-denom-track::-webkit-scrollbar { display: none; }
.rl-denom-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 2px solid transparent;
  background: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 50%;
}
.rl-denom-coin {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #c8952b);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.5), 0 2px 8px rgba(0, 0, 0, 0.35);
}
.rl-denom-chip.active .rl-denom-coin { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 0 2px var(--dc-blue), 0 2px 8px rgba(47, 111, 237, 0.5); }
.rl-denom-label { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.rl-denom-chip.active .rl-denom-label { color: var(--text); }

@media (max-width: 380px) {
  .rl-board { grid-template-columns: 38px 38px 1fr 38px 38px; }
  .rl-numbers { grid-auto-rows: 34px; }
  .rl-num { font-size: 0.84rem; }
}

/* ---------- Baccarat ---------- */
.bc-page { --dc-blue: #2f6fed; --dc-blue-dim: #1f4fb8; max-width: 480px; margin: 0 auto; }

.bc-stage {
  position: relative;
  min-height: 300px;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 8%, rgba(47, 111, 237, 0.14) 0%, rgba(10, 16, 22, 0.94) 55%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bc-hand-row { display: flex; flex-direction: column; align-items: center; min-height: 96px; justify-content: center; }
.bc-hand { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; min-height: 82px; }
.bc-total {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  min-height: 1.2em;
}

.bc-card { width: 58px; height: 82px; flex-shrink: 0; }
.bc-card-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4)); }
@keyframes bc-card-deal { 0% { transform: translateY(-14px) scale(0.9); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
.bc-card-deal { animation: bc-card-deal 0.22s cubic-bezier(0.22, 0.61, 0.36, 1); }

.bc-outcome {
  align-self: center;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  min-height: 1.6rem;
}
.bc-outcome.show { opacity: 1; transform: translateY(0); }
.bc-outcome-player { color: var(--dc-blue); }
.bc-outcome-banker { color: var(--loss); }
.bc-outcome-tie { color: var(--win); }

.bc-spots { display: flex; gap: 10px; margin-top: 14px; }
.bc-spot {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(137, 107, 171, 0.16);
  cursor: pointer;
  user-select: none;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
@media (hover: hover) { .bc-spot:hover { background: #2c3e4f; } }
.bc-spot:active { filter: brightness(1.1); transform: scale(0.98); }
.bc-spot-active { box-shadow: inset 0 0 0 1.5px var(--dc-blue); }
.bc-spot-win { box-shadow: inset 0 0 0 2px #ffd25e, 0 0 12px rgba(255, 210, 94, 0.55) !important; animation: rl-win-pulse 0.6s ease infinite alternate; }
.bc-spot-label { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--text); }
.bc-spot-amt { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }
.bc-spot-icon { width: 18px; height: 18px; }
.bc-chip-stack { position: absolute; top: -10px; right: -6px; pointer-events: none; }

@media (max-width: 380px) {
  .bc-card { width: 48px; height: 68px; }
  .bc-spot-label { font-size: 0.9rem; }
  .bc-spot-amt { font-size: 0.72rem; }
}

/* ============ Video Poker ============ */
.vp-page { --dc-blue: #2f6fed; --dc-blue-dim: #1f4fb8; max-width: 480px; margin: 0 auto; }

.vp-stage {
  position: relative;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 8%, rgba(47, 111, 237, 0.14) 0%, rgba(10, 16, 22, 0.94) 55%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 18px 16px 22px;
}

.vp-paytable {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--glow-border);
}
.vp-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(13, 9, 17, 0.55);
  border-bottom: 1px solid rgba(137, 107, 171, 0.1);
  transition: background 0.2s ease, color 0.2s ease;
}
.vp-pay-row:nth-child(even) { background: rgba(20, 32, 42, 0.55); }
.vp-pay-row:last-child { border-bottom: none; }
.vp-pay-row span:first-child { display: flex; align-items: center; gap: 4px; }
.vp-pay-row span:last-child { font-family: var(--mono); color: var(--muted); font-weight: 700; }
.vp-pay-floor svg { color: var(--muted); flex-shrink: 0; }
.vp-pay-win {
  background: rgba(81, 192, 125, 0.16) !important;
  color: var(--win);
}
.vp-pay-win span:last-child { color: var(--win); }

.vp-deal-btn {
  display: block;
  margin: 18px auto;
  min-width: 132px;
  border: none;
  border-radius: 12px;
  padding: 13px 28px;
  background: linear-gradient(180deg, var(--dc-blue) 0%, var(--dc-blue-dim) 100%);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(47, 111, 237, 0.35);
  transition: filter 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
}
.vp-deal-btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
@media (hover: hover) { .vp-deal-btn.vp-deal-ready:hover:not(:disabled) { filter: brightness(1.08); } }
.vp-deal-btn.vp-deal-ready:active:not(:disabled) { transform: translateY(1px); }

.vp-hand { display: flex; justify-content: center; gap: 8px; }
.vp-card-slot {
  width: 58px;
  height: 82px;
  flex-shrink: 0;
  position: relative;
  border-radius: 10px;
}
.vp-card-slot.vp-slot-pickable { cursor: pointer; }
.vp-card-back {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(160deg, #2f6fed 0%, #1f4fb8 100%);
  box-shadow: 0 0 0 1.5px rgba(137, 107, 171, 0.3), 0 6px 12px rgba(0, 0, 0, 0.4);
}
.vp-card { width: 100%; height: 100%; }
.vp-card-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4)); }
@keyframes vp-card-deal { 0% { transform: translateY(-14px) scale(0.9); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
.vp-card-deal { animation: vp-card-deal 0.22s cubic-bezier(0.22, 0.61, 0.36, 1); }

.vp-card-slot.vp-slot-pickable .vp-card-back,
.vp-card-slot.vp-slot-pickable .vp-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
@media (hover: hover) {
  .vp-card-slot.vp-slot-pickable:hover .vp-card-back,
  .vp-card-slot.vp-slot-pickable:hover .vp-card { transform: translateY(-4px); }
}
.vp-card-slot.vp-slot-held { transform: translateY(-10px); }
.vp-card-slot.vp-slot-held .vp-card-back,
.vp-card-slot.vp-slot-held .vp-card-svg {
  box-shadow: 0 0 0 2px var(--win), 0 6px 14px rgba(81, 192, 125, 0.4);
  border-radius: 10px;
}
.vp-card-slot.vp-slot-held::after {
  content: 'HOLD';
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--win);
}

.vp-outcome {
  text-align: center;
  margin-top: 26px;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  min-height: 1.6rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.vp-outcome.show { opacity: 1; transform: translateY(0); }
.vp-outcome-win { color: var(--win); }
.vp-outcome-lose { color: var(--loss); }

@media (max-width: 380px) {
  .vp-card-slot { width: 48px; height: 68px; }
  .vp-pay-row { padding: 9px 12px; font-size: 0.84rem; }
}


/* ============ Diamonds ============ */
.dm-page { --dm-purple: #8b5cf6; --dm-pink: #ec4899; max-width: 480px; margin: 0 auto; }

.dm-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dm-close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); color: var(--muted);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 8px var(--glow-soft);
  transition: color 0.15s ease, background 0.15s ease;
}
@media (hover: hover) { .dm-close-btn:hover { color: var(--text); background: var(--surface-2); } }
.dm-header-title { font-family: var(--display); font-size: 1.05rem; font-weight: 600; }
.dm-header-spacer { width: 36px; }

.dm-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: 20px;
  background: radial-gradient(120% 100% at 50% 0%, rgba(139, 92, 246, 0.14) 0%, rgba(10, 16, 22, 0.9) 62%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 10px;
}
.dm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(13, 9, 17, 0.5);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.dm-row.active { background: rgba(139, 92, 246, 0.1); }
.dm-row.win { box-shadow: 0 0 0 1px var(--dm-pink), 0 0 14px rgba(236, 72, 153, 0.35); }
.dm-row-slots { display: flex; gap: 8px; }
.dm-slot {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(172, 188, 199, 0.35);
  transition: color 0.15s ease, transform 0.15s ease;
}
.dm-gem-icon { width: 100%; height: 100%; }
.dm-slot.lit { color: var(--dm-pink); transform: scale(1.15); filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.6)); }
.dm-slot.dim { color: rgba(172, 188, 199, 0.15); }
.dm-row-mult { font-family: var(--mono); font-size: 0.95rem; font-weight: 700; color: var(--text); }
.dm-row.active .dm-row-mult { color: var(--dm-pink); }

.dm-panel {
  margin-top: 16px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 10px var(--glow-soft);
  padding: 18px 16px 20px;
}

.dm-bet-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 15px;
  background: linear-gradient(180deg, var(--dm-purple) 0%, #6d28d9 100%);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
  transition: filter 0.15s ease, transform 0.05s ease;
}
@media (hover: hover) { .dm-bet-btn:hover:not(:disabled) { filter: brightness(1.08); } }
.dm-bet-btn:active:not(:disabled) { transform: translateY(1px); }
.dm-bet-btn:disabled { opacity: 0.6; cursor: default; }
.dm-bet-btn.bt-locked { opacity: 0.55; cursor: default; transition: opacity 0.25s ease; }

.dm-field-row { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 8px; }
.dm-field-row:first-of-type { margin-top: 18px; }
.dm-field-label { font-size: 0.88rem; color: var(--muted); font-weight: 600; }
.dm-field-usd { font-family: var(--mono); font-size: 0.9rem; color: var(--muted); }

.dm-amount-row { display: flex; gap: 8px; }
.dm-amount-input {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  padding: 12px 14px;
}
.dm-amount-input input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  min-width: 0;
}
.dm-coin-icon { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-left: 8px; }

.dm-amount-actions {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  background: rgba(13, 9, 17, 0.55);
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 12px;
  overflow: hidden;
}
.dm-amt-btn {
  border: none;
  background: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
@media (hover: hover) { .dm-amt-btn:hover { color: var(--accent); background: rgba(137, 107, 171, 0.08); } }
.dm-amt-btn:active { background: rgba(137, 107, 171, 0.14); }
.dm-amt-btn-max { color: var(--dm-purple); }
@media (hover: hover) { .dm-amt-btn-max:hover { color: var(--dm-purple); background: rgba(139, 92, 246, 0.1); } }
.dm-amt-btn-max:active { background: rgba(139, 92, 246, 0.18); }
.dm-amt-divider {
  width: 1px;
  align-self: stretch;
  margin: 8px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(172, 188, 199, 0.4) 20%, rgba(172, 188, 199, 0.4) 80%, transparent 100%);
  flex-shrink: 0;
}

.dm-quick-row { display: flex; gap: 8px; margin-top: 10px; }
.dm-quick-btn {
  flex: 1;
  border: 1px solid rgba(137, 107, 171, 0.16);
  border-radius: 10px;
  background: rgba(13, 9, 17, 0.55);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 4px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) { .dm-quick-btn:hover { color: var(--text); border-color: rgba(137, 107, 171, 0.3); } }
.dm-quick-btn:active { color: var(--text); border-color: var(--dm-purple); }

@media (max-width: 380px) {
  .dm-row { padding: 7px 8px; }
  .dm-slot { width: 19px; height: 19px; }
  .dm-row-slots { gap: 6px; }
}

/* ---------- Coinflip Live ---------- */

.cfl-page {
  --cf-blue: var(--accent); --cf-blue-dim: var(--accent-2);
  max-width: 480px; margin: 0 auto;
}
.cfl-stage { position: relative; }
.cfl-countdown {
  position: absolute; top: 14px; right: 16px;
  font-family: var(--mono); font-size: 1rem; font-weight: 700;
  color: var(--muted); background: rgba(10, 16, 22, 0.55);
  padding: 4px 10px; border-radius: 20px; z-index: 2;
}
.cfl-countdown.cfl-hide { display: none; }

.cfl-tossing {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-family: var(--display); font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.02em; color: var(--accent);
  text-shadow: 0 0 14px rgba(137, 107, 171, 0.55);
  opacity: 0; pointer-events: none; z-index: 2;
}
.cfl-tossing.show { opacity: 1; animation: cfl-toss-blink 0.7s ease-in-out infinite; }
@keyframes cfl-toss-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Purple trademark color for every shared .cf-* control reused on this
   live page. .cf-page (plain Coinflip/Bottle Spin) now carries this same
   purple itself, so these overrides are redundant but harmless (same
   values) - kept so this page still renders correctly standalone if
   .cf-page's own vars/rgba() ever change again. Bottle Spin Live
   (.bsl-page) shares every one of these same .cf-* controls, so it gets
   the identical override set - see .bsl-page below. */
.cfl-page .cf-bet-btn, .bsl-page .cf-bet-btn { box-shadow: 0 6px 16px rgba(137, 107, 171, 0.35); }
.cfl-page .cf-amt-btn-max:active, .bsl-page .cf-amt-btn-max:active { background: rgba(137, 107, 171, 0.18); }
.cfl-page .cf-side-btn.active, .bsl-page .cf-side-btn.active { background: rgba(137, 107, 171, 0.14); }
@media (hover: hover) {
  .cfl-page .cf-amt-btn-max:hover, .bsl-page .cf-amt-btn-max:hover { background: rgba(137, 107, 171, 0.1); }
}

/* Both live-game stages (.cfl-stage, shared by Coinflip Live and Bottle
   Spin Live) have their own glow here rather than inheriting .cf-stage's -
   .cf-stage's background is now purple too (rgba(137, 107, 171, ...)),
   so this is redundant but harmless; kept for the same reason as the
   .cf-bet-btn overrides above. */
.cfl-stage {
  background: radial-gradient(120% 100% at 50% 42%, rgba(137, 107, 171, 0.18) 0%, rgba(10, 16, 22, 0.9) 62%, #0a1016 100%);
}

.cfl-roundbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding: 0 2px;
}
.cfl-roundbar-bets {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.95rem; font-weight: 700; color: var(--text);
}
.cfl-roundbar-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--win); box-shadow: 0 0 8px var(--win); flex-shrink: 0;
}
.cfl-roundbar-next { font-size: 0.92rem; color: var(--muted); }
.cfl-roundbar-track {
  margin-top: 10px; height: 6px; border-radius: 3px;
  background: rgba(137, 107, 171, 0.16); overflow: hidden;
}
.cfl-roundbar-fill {
  height: 100%; border-radius: 3px; background: var(--cf-blue);
  width: 100%; transition: width 0.1s linear;
}

.cfl-page .cf-panel { margin-top: 16px; }

.cr-chip.cfl-c-heads { background: rgba(200, 149, 43, 0.18); color: #e8c27a; }
.cr-chip.cfl-c-tails { background: rgba(138, 151, 166, 0.18); color: #c3ccd6; }

.bsl-page {
  --cf-blue: var(--accent); --cf-blue-dim: var(--accent-2);
  max-width: 480px; margin: 0 auto;
}
.cr-chip.bsl-c-up     { background: rgba(106, 143, 46, 0.18); color: #9fce5a; }
.cr-chip.bsl-c-down   { background: rgba(201, 121, 31, 0.18); color: #eaa456; }
.cr-chip.bsl-c-middle { background: rgba(138, 151, 166, 0.18); color: #c3ccd6; }

/* ---------- Keno Live ---------- */

.knl-page { --cf-blue: var(--accent); --cf-blue-dim: var(--accent-2); }
.knl-stage { position: relative; }

/* Last-3-results list, one line per round, numbers space-separated -
   simpler than crash/coinflipl's chip row since keno results are a set
   of 10 numbers rather than a single value. */
.knl-history { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.knl-history-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(13, 9, 17, 0.55); border: 1px solid rgba(137, 107, 171, 0.16);
}
.knl-history-num {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700;
  color: var(--muted); background: rgba(137, 107, 171, 0.14);
  min-width: 22px; text-align: center; padding: 2px 4px; border-radius: 6px;
}

.knl-page .cfl-roundbar { margin-top: 14px; }
.knl-page .dc-panel { margin-top: 16px; }

/* ---------- Drill Live ---------- */

.drl-page {
  --dc-blue: var(--accent); --dc-blue-dim: var(--accent-2);
  --cf-blue: var(--accent); /* used by the shared .cfl-roundbar-fill bar - see .cr-page's identical note */
  --cr-blue: #4fb2ff; --cr-green: #3ecf6e; --cr-purple: #a855f7; --cr-pink: #ec4899; --cr-red: #e6455a;
  --dr-diamond: #4fb2ff; --dr-circle: #f0b429; --dr-triangle: #3ecf6e;
  max-width: 480px; margin: 0 auto;
}
/* --cr-blue/--dr-diamond stay the original blue on purpose - they're the
   "diamond" shape's identity color (like circle=yellow, triangle=green),
   not a brand accent, so they're untouched by this purple rebrand. */

.drl-stage {
  position: relative;
  margin-top: 10px;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(120% 100% at 50% 30%, rgba(137, 107, 171, 0.16) 0%, rgba(10, 16, 22, 0.94) 62%, #0a1016 100%);
  box-shadow: 0 0 0 1px var(--glow-border), 0 0 18px var(--glow-soft);
  padding: 20px 10px 8px;
}

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

.drl-drill {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 0;
  border-radius: 14px;
  transition: filter 0.15s ease;
}

.drl-canvas { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }

.drl-mult {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: inset 0 0 0 1px var(--glow-border);
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  display: flex; align-items: baseline;
}
.drl-mult-x { font-size: 0.8em; opacity: 0.9; }

.drl-drill[data-shape="diamond"] .drl-mult { color: var(--dr-diamond); }
.drl-drill[data-shape="circle"] .drl-mult { color: var(--dr-circle); }
.drl-drill[data-shape="triangle"] .drl-mult { color: var(--dr-triangle); }
.drl-drill.drl-drill-live .drl-mult {
  box-shadow: inset 0 0 0 1.5px currentColor, 0 0 12px rgba(137, 107, 171, 0.25);
  background: rgba(13, 9, 17, 0.55);
}
.drl-drill.drl-drill-crashed .drl-mult { color: var(--cr-red) !important; box-shadow: inset 0 0 0 1.5px var(--cr-red); animation: cr-crash-pop 0.3s cubic-bezier(0.22, 0.61, 0.36, 1); }

/* "GETTING READY" - shown for the fixed 2s buffer between countdown-zero
   and the multipliers actually starting to climb. Blinking text only, no
   dots/icon, sits right under the three drills - same idea/animation as
   Crash's .cr-getting-ready (reuses the global cr-blink keyframe). */
.drl-getting-ready {
  display: none;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: var(--text-glow);
  animation: cr-blink 0.5s ease-in-out infinite;
}
.drl-stage.drl-getready .drl-getting-ready { display: flex; }

.drl-panel { margin-top: 14px; }

.drl-bet-btn.cr-locked-active {
  background: linear-gradient(180deg, var(--win) 0%, #2f9d5a 100%);
  box-shadow: 0 6px 16px rgba(81, 192, 125, 0.35);
}
.drl-bet-btn.cr-locked-active:disabled { opacity: 1; }

/* History chips group all three shapes' bust points per round, each
   shape-colored, so one chip = one round's three outcomes. */
.drl-hist-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 5px 10px;
  box-shadow: inset 0 0 0 1px var(--glow-border);
  white-space: nowrap;
}
.drl-hist-part + .drl-hist-part { margin-left: 2px; }

/* Reuses .dr-picker / .dr-picker-btn styling from the Drill section above;
   --dr-diamond/circle/triangle are defined on .drl-page so those rules
   resolve the same colors here. */

.drl-page .cfl-roundbar { margin-top: 14px; }

@media (max-width: 380px) {
  .drl-getting-ready { font-size: 0.92rem; }
  .drl-mult { font-size: 0.86rem; padding: 5px 9px; }
  .drl-drill { gap: 8px; }
}
