:root {
  color-scheme: dark;
  --bg: #06110d;
  --panel: rgba(10, 31, 23, 0.88);
  --panel-border: rgba(233, 194, 110, 0.18);
  --felt: #0b4b35;
  --felt-light: #126044;
  --gold: #e8bf6b;
  --gold-light: #ffe0a0;
  --ink: #f4eedf;
  --muted: #9db6aa;
  --red: #bd3034;
  --black: #14191a;
  --green: #07824f;
  --shadow: rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(25, 96, 68, 0.34), transparent 38rem),
    radial-gradient(circle at 92% 12%, rgba(82, 55, 22, 0.25), transparent 32rem),
    linear-gradient(145deg, #071912, #040b09 76%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.leaderboard-open {
  overflow: hidden;
}

button {
  font: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.16;
}

.ambient-one {
  top: 20%;
  left: -12rem;
  background: #22b47b;
}

.ambient-two {
  right: -10rem;
  bottom: 5%;
  background: #b88338;
}

.topbar,
.game-nav,
.layout,
footer {
  width: min(1480px, calc(100% - 36px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 18px;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--panel-border);
}

.hidden {
  display: none !important;
}

.game-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 0;
}

.game-tab {
  flex: 1 1 118px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid rgba(194, 218, 208, 0.15);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: 150ms ease;
}

.game-tab:hover,
.game-tab[aria-selected="true"] {
  border-color: rgba(232, 191, 107, 0.42);
  color: var(--gold-light);
  background: rgba(232, 191, 107, 0.1);
}

.brand,
.account,
.status-row,
.panel-heading,
.chips,
.result-panel {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-light);
  background: radial-gradient(circle, #138054 0 32%, #073a28 34% 100%);
  box-shadow: 0 0 26px rgba(232, 191, 107, 0.18);
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 700;
}

.brand-mark.large {
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  font-size: 36px;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0.03em;
}

h1 {
  font-size: clamp(17px, 4vw, 21px);
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(19px, 4.5vw, 25px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.brand p,
.identity span,
.result-color,
footer {
  color: var(--muted);
  font-size: 12px;
}

.account {
  display: flex;
  flex: 1 1 280px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.identity {
  display: flex;
  min-width: 0;
  flex: 1 1 180px;
  flex-direction: column;
  margin-right: 0;
  text-align: right;
}

.account-stats {
  display: flex;
  justify-content: flex-end;
  gap: 7px 10px;
  flex-wrap: wrap;
}

.identity strong,
.account-stat span {
  color: var(--gold-light);
  font-size: 14px;
}

.account-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  white-space: normal;
}

.marker-stat {
  align-items: flex-end;
  flex-direction: column;
  gap: 1px;
  color: #d8eee5;
}

.marker-main {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.marker-stat small,
.marker-stat small span {
  color: #ffadad;
  font-size: 10px;
  font-weight: 800;
}

.marker-stat small span {
  color: #ff8e8e;
}

.marker-glyph {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255, 224, 160, 0.82);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, #fff3bf 0 18%, transparent 20%),
    linear-gradient(135deg, #2bd487, #0a5c42);
  box-shadow: 0 0 12px rgba(43, 212, 135, 0.3);
}

.button {
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: 160ms ease;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.button:hover {
  transform: translateY(-1px);
}

.button-gold {
  border-color: rgba(232, 191, 107, 0.45);
  color: #201708;
  background: linear-gradient(135deg, #f4d78e, #c58d37);
}

.button-marker {
  border-color: rgba(43, 212, 135, 0.32);
  color: #d8eee5;
  background: rgba(43, 212, 135, 0.08);
}

.button-trophy {
  border-color: rgba(196, 148, 255, 0.42);
  color: #f7efff;
  background: linear-gradient(135deg, rgba(126, 74, 190, 0.92), rgba(74, 38, 128, 0.96));
  box-shadow: 0 8px 24px rgba(74, 38, 128, 0.28);
}

.button-achievements {
  border-color: rgba(196, 148, 255, 0.42);
  color: #f7efff;
  background: linear-gradient(135deg, rgba(126, 74, 190, 0.92), rgba(74, 38, 128, 0.96));
  box-shadow: 0 8px 24px rgba(74, 38, 128, 0.28);
}

.button-muted {
  border-color: rgba(194, 218, 208, 0.15);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.button:disabled,
.chip:disabled,
.bet-cell:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0 10px;
}

.wheel-column,
.table-column {
  min-width: 0;
}

.status-row {
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 0 8px 6px;
}

.status-row > div:first-child {
  min-width: 0;
  flex: 1 1 180px;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.timer {
  min-width: 104px;
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 45px;
  line-height: 1;
  text-align: right;
}

.wheel-stage {
  position: relative;
  width: min(95%, 660px);
  aspect-ratio: 1;
  margin: 12px auto 8px;
}

.wheel-shadow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  box-shadow: 0 30px 46px var(--shadow), 0 0 76px rgba(215, 170, 76, 0.12);
}

.wheel-spin {
  position: absolute;
  inset: 2.8%;
  will-change: transform;
}

#wheel {
  display: block;
  width: 100%;
  height: 100%;
}

.ball-orbit {
  position: absolute;
  z-index: 7;
  inset: 6.8%;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.ball {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff, #e8dfc7 55%, #827862);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.55), 0 0 8px rgba(255, 255, 255, 0.35);
  transform: translateX(-50%);
}

.wheel-center {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  display: grid;
  width: 29%;
  aspect-ratio: 1;
  place-content: center;
  border: 3px solid rgba(255, 222, 154, 0.65);
  border-radius: 50%;
  color: var(--gold-light);
  background:
    radial-gradient(circle, rgba(20, 100, 68, 0.97) 0 47%, rgba(8, 49, 34, 0.98) 50% 100%);
  box-shadow:
    inset 0 0 0 8px rgba(2, 24, 16, 0.42),
    0 0 18px rgba(0, 0, 0, 0.4);
  text-align: center;
  transform: translate(-50%, -50%);
}

.center-small,
.center-large {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.center-small {
  color: var(--gold);
  font-size: clamp(9px, 1vw, 13px);
}

.center-large {
  font-size: clamp(14px, 1.75vw, 24px);
}

.wheel-stage.landed .wheel-center {
  animation: center-pulse 900ms ease;
}

@keyframes center-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 8px rgba(2, 24, 16, 0.42), 0 0 18px rgba(0, 0, 0, 0.4);
  }
  45% {
    box-shadow: inset 0 0 0 8px rgba(2, 24, 16, 0.42), 0 0 42px rgba(243, 203, 116, 0.72);
  }
}

@keyframes slot-symbol-spin {
  0% {
    transform: translateY(-18px) scale(0.96);
    opacity: 0.6;
  }
  50% {
    transform: translateY(0) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translateY(18px) scale(0.96);
    opacity: 0.6;
  }
}

@keyframes slot-reel-settle {
  0% {
    transform: translateY(-8px);
  }
  65% {
    transform: translateY(4px);
  }
  100% {
    transform: translateY(0);
  }
}

.result-panel {
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  margin: 0 auto 14px;
}

.result-panel .eyebrow {
  margin: 0 8px 0 0;
}

.personal-result {
  display: grid;
  width: min(92%, 540px);
  gap: 4px;
  margin: 0 auto 15px;
  padding: 11px 14px;
  border: 1px solid rgba(232, 191, 107, 0.28);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 13px;
  text-align: center;
}

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

.personal-result strong {
  color: var(--gold-light);
  font-size: 17px;
}

.personal-result.win {
  border-color: rgba(87, 213, 144, 0.46);
}

.personal-result.loss {
  border-color: rgba(237, 98, 98, 0.5);
}

.result-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
}

.result-number.red,
.history-item.red {
  background: var(--red);
}

.result-number.black,
.history-item.black {
  background: var(--black);
}

.result-number.green,
.history-item.green {
  background: var(--green);
}

.history-section {
  padding: 7px 8px;
}

.lobby-section {
  display: grid;
  gap: 9px;
}

.lobby-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(232, 191, 107, 0.3);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 0%, rgba(232, 191, 107, 0.18), transparent 16rem),
    linear-gradient(145deg, rgba(12, 55, 38, 0.96), rgba(5, 20, 15, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 22px 48px rgba(0, 0, 0, 0.25);
}

.lobby-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(232, 191, 107, 0.88), transparent);
  content: "";
}

.lobby-card .card-row-heading {
  padding: 8px 9px;
  border: 1px solid rgba(232, 191, 107, 0.18);
  border-radius: 10px;
  background: rgba(2, 13, 9, 0.35);
}

.lobby-card .card-row-heading .eyebrow {
  margin-bottom: 0;
}

.lobby-card .card-row-heading strong {
  display: inline-grid;
  min-height: 28px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(232, 191, 107, 0.28);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(232, 191, 107, 0.1);
  font-size: 11px;
  white-space: nowrap;
}

.history {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.history-item {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}

.panel {
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.table-column > .panel + .panel,
.lower-tabs {
  margin-top: 16px;
}

.table-panel {
  padding: 18px;
}

.wager-panel,
.slot-panel,
.slot-result-panel,
.blackjack-panel {
  padding: 16px;
}

.leaderboard-panel {
  position: relative;
  isolation: isolate;
  border-color: rgba(232, 191, 107, 0.28);
  background:
    radial-gradient(circle at 12% 0%, rgba(232, 191, 107, 0.16), transparent 18rem),
    radial-gradient(circle at 96% 18%, rgba(43, 212, 135, 0.12), transparent 17rem),
    var(--panel);
}

.leaderboard-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 46%, rgba(255, 255, 255, 0.045) 48%, transparent 58%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 24px);
  content: "";
}

.leaderboard-panel > * {
  position: relative;
}

.panel-heading {
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 15px;
}

.panel-heading > div,
.panel-heading > .admin-actions {
  min-width: 0;
}

.panel-heading.compact {
  margin-bottom: 10px;
}

.leaderboard-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 10px;
  row-gap: 8px;
}

.leaderboard-heading > div:first-child {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.leaderboard-heading .drawer-close {
  grid-column: 2;
  grid-row: 1;
  flex-shrink: 0;
}

.leaderboard-heading .leaderboard-badge {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: start;
}

.leaderboard-badge {
  padding: 6px 9px;
  border: 1px solid rgba(232, 191, 107, 0.34);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(232, 191, 107, 0.1);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leaderboard-weekly {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(232, 191, 107, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.leaderboard-weekly-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.leaderboard-weekly-copy strong {
  display: block;
  margin-top: 6px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.leaderboard-weekly-last {
  margin-top: 12px;
}

.leaderboard-weekly-last ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.leaderboard-weekly-last li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.leaderboard-weekly-last strong {
  color: var(--gold-light);
}

.leader-weekly-prize {
  flex: 1 0 100%;
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.minimum {
  color: var(--muted);
  font-size: 12px;
}

.minimum strong {
  color: var(--gold-light);
}

.chips {
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 12px;
}

.chip {
  width: 52px;
  height: 52px;
  border: 3px dashed rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  color: #2b210f;
  background: radial-gradient(circle, #ffe1a4 0 46%, #c48e3e 48% 100%);
  box-shadow: inset 0 0 0 3px rgba(89, 53, 13, 0.32), 0 5px 10px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: 150ms ease;
}

.chip:not(:disabled):hover,
.chip.selected {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 3px rgba(89, 53, 13, 0.32), 0 8px 16px rgba(238, 197, 108, 0.35);
}

.chip.selected {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.custom-wager {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 0 0 17px;
}

.custom-wager label {
  grid-column: 1 / -1;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.custom-wager input {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(232, 191, 107, 0.28);
  border-radius: 7px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  font: inherit;
}

.custom-wager input:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(232, 191, 107, 0.12);
}

.custom-wager .button.selected {
  border-color: rgba(232, 191, 107, 0.52);
  color: var(--gold-light);
  background: rgba(232, 191, 107, 0.1);
}

.wager-summary {
  color: var(--muted);
  font-size: 12px;
}

.wager-summary strong {
  color: var(--gold-light);
}

.roulette-table {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 6px;
}

.numbers {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(3, 45px);
  gap: 4px;
}

.bet-cell {
  border: 1px solid rgba(238, 219, 175, 0.26);
  border-radius: 4px;
  color: #fff8e9;
  background: rgba(17, 99, 70, 0.78);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: 120ms ease;
}

.bet-cell:hover {
  border-color: var(--gold-light);
  filter: brightness(1.19);
  transform: translateY(-1px);
}

.bet-cell.red {
  background: var(--red);
}

.bet-cell.black {
  background: var(--black);
}

.zero {
  grid-row: span 3;
  color: #f7e0a3;
  background: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.outside-bets {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-top: 4px;
}

.outside {
  min-height: 40px;
  background: rgba(9, 67, 47, 0.92);
}

.outside.wide {
  grid-column: span 2;
}

.red-bet {
  background: linear-gradient(135deg, var(--red), #8d1e24);
}

.black-bet {
  background: linear-gradient(135deg, #222a2c, #0c0f10);
}

.lower-tabs {
  margin-top: 16px;
}

.tab-list {
  display: flex;
  gap: 7px;
  margin: 0 0 9px;
}

.tab-button {
  padding: 9px 12px;
  border: 1px solid rgba(194, 218, 208, 0.15);
  border-radius: 8px 8px 3px 3px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: 150ms ease;
}

.tab-button:hover,
.tab-button[aria-selected="true"] {
  border-color: rgba(232, 191, 107, 0.42);
  color: var(--gold-light);
  background: rgba(232, 191, 107, 0.1);
}

.tab-panel {
  display: grid;
  min-height: 220px;
  padding: 16px;
}

.tab-panel.hidden {
  display: none;
}

.bets-list,
.table-bets-list {
  display: grid;
  gap: 7px;
}

.bet-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.table-action-round,
.lobby-list {
  display: grid;
  gap: 7px;
}

.table-action-round {
  padding: 9px;
  border: 1px solid rgba(194, 218, 208, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.032);
}

.table-action-round + .table-action-round {
  margin-top: 9px;
}

.table-action-heading,
.table-action-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.table-action-heading span {
  color: var(--ink);
  font-weight: 900;
}

.table-action-heading strong,
.table-action-total {
  color: var(--gold-light);
  font-size: 12px;
}

.table-action-total {
  color: var(--muted);
}

.table-action-bets {
  display: grid;
  gap: 6px;
}

.table-bet-line {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(232, 191, 107, 0.12);
  border-radius: 7px;
  color: var(--muted);
  background:
    linear-gradient(90deg, rgba(232, 191, 107, 0.06), transparent 58%),
    rgba(255, 255, 255, 0.032);
  font-size: 11px;
}

.table-bet-line.condensed {
  grid-template-columns: minmax(90px, 0.62fr) minmax(0, 1.5fr) auto;
  align-items: start;
}

.table-bet-player-block {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.table-bet-player-block small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-bet-player,
.table-bet-selection {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-bet-player {
  color: var(--ink);
  font-weight: 800;
}

.table-bet-selection {
  color: var(--gold-light);
}

.table-bet-selections {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.table-bet-selections .table-bet-selection {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border: 1px solid rgba(232, 191, 107, 0.16);
  border-radius: 999px;
  background: rgba(3, 35, 25, 0.68);
  font-size: 10px;
  line-height: 1.2;
}

.table-bet-selections .table-bet-selection small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.table-bet-line strong {
  color: var(--gold-light);
  text-align: right;
  white-space: nowrap;
}

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

.round-summary-stat {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(232, 191, 107, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.round-summary-stat.result-stat {
  cursor: help;
}

.round-summary-stat.result-stat:focus {
  outline: 2px solid rgba(232, 191, 107, 0.55);
  outline-offset: 2px;
}

.round-summary-stat small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.round-summary-stat strong {
  overflow: hidden;
  color: var(--gold-light);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-summary-stat.positive strong {
  color: #77e6a1;
}

.round-summary-stat.negative strong {
  color: #ff8e8e;
}

.round-summary-stat.push strong,
.round-summary-stat.pending strong {
  color: var(--muted);
}

.result-detail-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 15;
  display: grid;
  min-width: 170px;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(232, 191, 107, 0.3);
  border-radius: 10px;
  opacity: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 0%, rgba(232, 191, 107, 0.14), transparent 9rem),
    rgba(5, 20, 15, 0.96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.round-summary-stat.result-stat:hover .result-detail-popover,
.round-summary-stat.result-stat:focus .result-detail-popover,
.round-summary-stat.result-stat:focus-within .result-detail-popover {
  opacity: 1;
  transform: translateY(0);
}

.result-detail-popover span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.result-detail-popover small {
  color: var(--muted);
  font-size: 9px;
}

.result-detail-popover strong {
  color: var(--gold-light);
}

.result-detail-popover strong.positive {
  color: #77e6a1;
}

.result-detail-popover strong.negative {
  color: #ff8e8e;
}

.result-detail-popover strong.push,
.result-detail-popover strong.pending {
  color: var(--muted);
}

.lobby-line {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(74px, auto);
  gap: 4px 14px;
  padding: 11px 12px;
  border: 1px solid rgba(232, 191, 107, 0.18);
  border-radius: 10px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(4, 19, 14, 0.58);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
  font-size: 12px;
}

.lobby-entry {
  position: relative;
  transition: 150ms ease;
}

.lobby-entry:hover {
  border-color: rgba(232, 191, 107, 0.36);
  transform: translateY(-1px);
}

.lobby-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-name::before {
  display: grid;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(232, 191, 107, 0.48);
  border-radius: 50%;
  color: #1f1607;
  background: linear-gradient(135deg, #ffe2a2, #bd8331);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  content: attr(data-initial);
  font-size: 12px;
  font-weight: 900;
}

.lobby-line small {
  grid-column: 1 / 2;
  padding-left: 36px;
}

.lobby-line strong {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  align-self: center;
  min-width: 74px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(232, 191, 107, 0.1);
  text-align: center;
}

.positive {
  color: #77e6a1;
}

.negative {
  color: #ff8e8e;
}

.bet-line strong,
.lobby-line strong,
.leaderboard strong {
  color: var(--gold-light);
}

.lobby-line strong.positive {
  color: #77e6a1;
}

.lobby-line strong.negative {
  color: #ff8e8e;
}

.empty-state {
  padding: 18px 4px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state.compact {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  padding: 8px 10px;
  border: 1px dashed rgba(232, 191, 107, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
}

.lobby-card .empty-state {
  padding: 16px;
  border: 1px dashed rgba(232, 191, 107, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}

.leaderboard {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard .leader-row {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  width: 100%;
  max-height: none;
  overflow: hidden;
  padding: 5px 7px;
  border: 1px solid rgba(194, 218, 208, 0.12);
  border-radius: 8px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  font-size: 10px;
  transition: 160ms ease;
}

.leaderboard .leader-row > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.leaderboard .leader-row:hover {
  border-color: rgba(232, 191, 107, 0.3);
}

.leader-row.leader-first {
  border-color: rgba(232, 191, 107, 0.46);
  background:
    linear-gradient(135deg, rgba(232, 191, 107, 0.16), rgba(24, 83, 59, 0.14)),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 238, 180, 0.12), 0 6px 14px rgba(0, 0, 0, 0.12);
}

.leader-row.leader-first::after,
.leader-row.leader-second::after,
.leader-row.leader-third::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.leader-row.leader-first::after {
  background:
    radial-gradient(circle at 8% 50%, rgba(255, 228, 157, 0.25), transparent 7rem),
    linear-gradient(110deg, transparent 0 40%, rgba(255, 255, 255, 0.1) 47%, transparent 58%);
}

.leader-row.leader-second {
  border-color: rgba(210, 225, 220, 0.36);
  background:
    linear-gradient(135deg, rgba(224, 238, 232, 0.15), rgba(12, 66, 46, 0.13)),
    rgba(255, 255, 255, 0.035);
}

.leader-row.leader-third {
  border-color: rgba(230, 151, 96, 0.34);
  background:
    linear-gradient(135deg, rgba(230, 151, 96, 0.14), rgba(12, 66, 46, 0.13)),
    rgba(255, 255, 255, 0.03);
}

.leader-row.leader-second::after {
  background:
    radial-gradient(circle at 8% 50%, rgba(220, 235, 232, 0.16), transparent 7rem),
    linear-gradient(110deg, transparent 0 44%, rgba(255, 255, 255, 0.06) 51%, transparent 60%);
}

.leader-row.leader-third::after {
  background:
    radial-gradient(circle at 8% 50%, rgba(230, 151, 96, 0.18), transparent 7rem),
    linear-gradient(110deg, transparent 0 46%, rgba(255, 210, 164, 0.055) 52%, transparent 61%);
}

.leader-row-compact {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 7px;
  min-width: 0;
  line-height: 1.25;
}

.leaderboard .leader-rank {
  display: grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(232, 191, 107, 0.26);
  border-radius: 6px;
  color: var(--gold-light);
  background: rgba(232, 191, 107, 0.08);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.leader-first .leader-rank {
  color: #201708;
  background: linear-gradient(135deg, #ffe3a6, #bd8734);
  box-shadow: 0 0 18px rgba(232, 191, 107, 0.28);
}

.leader-second .leader-rank {
  color: #102018;
  background: linear-gradient(135deg, #eef8f4, #8aa098);
  box-shadow: 0 0 16px rgba(210, 225, 220, 0.18);
}

.leader-third .leader-rank {
  color: #211109;
  background: linear-gradient(135deg, #ffc08a, #9d552a);
  box-shadow: 0 0 16px rgba(230, 151, 96, 0.18);
}

.leader-name {
  display: inline;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.leader-title {
  display: inline;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-transform: uppercase;
}

.leader-first .leader-title {
  color: var(--gold-light);
}

.leader-second .leader-title {
  color: #d9ebe4;
}

.leader-third .leader-title {
  color: #ffc08a;
}

.leader-stat-credits {
  display: inline;
  min-width: 0;
  color: var(--gold-light);
  font-size: 9px;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.leader-stat-credits small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.leader-stat-markers {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  color: #c8e6d8;
  font-size: 9px;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#admin-button {
  display: none !important;
}

.leaderboard-tab {
  position: fixed;
  top: 45%;
  right: 0;
  z-index: 70;
  padding: 12px 9px;
  border: 1px solid rgba(232, 191, 107, 0.44);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  color: #201708;
  background: linear-gradient(135deg, #ffe3a6, #bd8734);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.leaderboard-tab[aria-expanded="true"] {
  display: none !important;
}

body.leaderboard-drawer-open .leaderboard-tab {
  display: none !important;
}

.leaderboard-drawer:not(.hidden) ~ .leaderboard-tab {
  display: none !important;
}

.leaderboard-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(2px);
}

.leaderboard-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: min(420px, 100vw);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding:
    max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    14px;
  box-sizing: border-box;
  transform: translateX(0);
  transition: transform 180ms ease, visibility 180ms ease;
}

.leaderboard-drawer.hidden {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(calc(100% + 24px));
}

.leaderboard-drawer .leaderboard-panel {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  padding: 16px;
  overflow: hidden;
}

.leaderboard-drawer .leaderboard-heading {
  flex: 0 0 auto;
}

.leaderboard-drawer .leaderboard {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0 0 8px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.leaderboard-drawer .leaderboard > .leader-row {
  flex-grow: 0;
  flex-shrink: 0;
}

.drawer-close {
  margin-left: auto;
}

.slot-jackpot,
.blackjack-status {
  min-width: 86px;
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
  text-align: right;
}

.blackjack-status {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.blackjack-status span {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.blackjack-status strong {
  display: inline-grid;
  min-width: 126px;
  min-height: 32px;
  place-items: center;
  border: 1px solid rgba(232, 191, 107, 0.34);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(232, 191, 107, 0.08);
  font-size: 16px;
}

.slot-jackpot {
  display: grid;
  min-width: 74px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255, 224, 160, 0.35);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 224, 160, 0.16), transparent),
    rgba(4, 13, 10, 0.52);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 18px rgba(0, 0, 0, 0.2);
  font-size: 26px;
}

.slot-layout {
  width: min(100%, 720px);
  margin: 28px auto 18px;
}

.slot-machine {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 28px 22px 22px;
  border: 1px solid rgba(232, 191, 107, 0.38);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 224, 160, 0.13), transparent 18%),
    linear-gradient(145deg, rgba(13, 64, 46, 0.96), rgba(5, 16, 13, 0.98));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.035), 0 24px 54px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.slot-machine::before {
  position: absolute;
  top: 10px;
  right: 24px;
  left: 24px;
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 224, 160, 0.1), rgba(255, 224, 160, 0.85), rgba(255, 224, 160, 0.1));
  content: "";
}

.slot-machine::after {
  position: absolute;
  right: 20px;
  bottom: 10px;
  left: 20px;
  height: 1px;
  background: rgba(255, 224, 160, 0.2);
  content: "";
}

.slot-machine.spinning {
  border-color: rgba(255, 224, 160, 0.62);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.045), 0 28px 62px rgba(0, 0, 0, 0.36);
}

.slot-action-panel {
  width: min(98%, 900px);
  margin: 0 auto 18px;
}

.slot-result-panel .personal-result {
  width: 100%;
  margin: 0;
}

.slot-reel {
  position: relative;
  display: grid;
  min-height: 156px;
  place-items: center;
  border: 1px solid rgba(82, 50, 16, 0.28);
  border-radius: 12px;
  color: #21170a;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), transparent 30%, rgba(100, 59, 14, 0.08)),
    #ffe4aa;
  box-shadow: inset 0 9px 18px rgba(255, 255, 255, 0.34), inset 0 -12px 26px rgba(81, 45, 7, 0.17);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
}

.slot-reel::before,
.slot-reel::after {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 1;
  height: 22px;
  pointer-events: none;
  content: "";
}

.slot-reel::before {
  top: 0;
  background: linear-gradient(180deg, rgba(33, 23, 10, 0.16), transparent);
}

.slot-reel::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(33, 23, 10, 0.16), transparent);
}

.slot-reel.spinning .slot-symbol {
  animation: slot-symbol-spin 140ms linear infinite;
  filter: blur(1px);
}

.slot-reel.settled {
  animation: slot-reel-settle 320ms cubic-bezier(0.25, 1.6, 0.4, 1);
}

.slot-symbol {
  display: grid;
  justify-items: center;
  gap: 8px;
  line-height: 1;
}

.slot-symbol-icon {
  display: grid;
  min-width: 74px;
  min-height: 74px;
  place-items: center;
  border: 1px solid rgba(105, 63, 13, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 8px 16px rgba(72, 42, 8, 0.16);
  font-size: 38px;
  font-weight: 900;
}

.slot-symbol small {
  color: rgba(33, 23, 10, 0.72);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slot-symbol-seven .slot-symbol-icon {
  color: #bd3034;
  font-size: 48px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
}

.slot-symbol-bar .slot-symbol-icon {
  border-radius: 12px;
  color: #ffe0a0;
  background: linear-gradient(180deg, #2a2013, #090705);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 22px;
  letter-spacing: 0;
}

.slot-symbol-crown .slot-symbol-icon,
.slot-symbol-bell .slot-symbol-icon {
  background: linear-gradient(180deg, rgba(255, 246, 199, 0.86), rgba(232, 191, 107, 0.64));
}

.slot-symbol-cherry .slot-symbol-icon,
.slot-symbol-lemon .slot-symbol-icon {
  background: rgba(255, 255, 255, 0.58);
}

.slot-symbol.compact {
  display: inline-grid;
  vertical-align: middle;
}

.slot-symbol.compact .slot-symbol-icon {
  min-width: 25px;
  min-height: 25px;
  border-radius: 7px;
  box-shadow: none;
  font-size: 15px;
}

.slot-symbol.compact small {
  display: none;
}

.slot-history,
.slot-paytable {
  display: grid;
  gap: 7px;
}

.slot-history-reels,
.pay-symbols {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.slot-history-line,
.pay-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.slot-history-line strong,
.pay-line strong {
  color: var(--gold-light);
}

.blackjack-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  width: min(100%, 980px);
  margin: 18px auto 14px;
}

.blackjack-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 13px;
  width: min(100%, 980px);
  margin: 8px auto 10px;
  padding: 13px 15px;
  border: 1px solid rgba(232, 191, 107, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    rgba(5, 20, 15, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 14px 34px rgba(0, 0, 0, 0.18);
}

.blackjack-alert-label {
  grid-row: span 2;
  align-self: center;
  padding: 8px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(232, 191, 107, 0.08);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.blackjack-alert strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.blackjack-alert small {
  color: var(--muted);
  font-size: 12px;
}

.blackjack-alert.live {
  border-color: rgba(255, 224, 160, 0.42);
  background:
    radial-gradient(circle at 0% 50%, rgba(232, 191, 107, 0.18), transparent 18rem),
    rgba(5, 20, 15, 0.86);
}

.blackjack-alert.win {
  border-color: rgba(119, 230, 161, 0.44);
  background:
    radial-gradient(circle at 0% 50%, rgba(43, 212, 135, 0.24), transparent 18rem),
    rgba(5, 20, 15, 0.86);
}

.blackjack-alert.win .blackjack-alert-label {
  color: #77e6a1;
  background: rgba(43, 212, 135, 0.1);
}

.blackjack-alert.loss {
  border-color: rgba(255, 142, 142, 0.42);
  background:
    radial-gradient(circle at 0% 50%, rgba(189, 48, 52, 0.24), transparent 18rem),
    rgba(5, 20, 15, 0.86);
}

.blackjack-alert.loss .blackjack-alert-label {
  color: #ffadad;
  background: rgba(189, 48, 52, 0.1);
}

.blackjack-alert.push,
.blackjack-alert.ended {
  border-color: rgba(194, 218, 208, 0.24);
}

.blackjack-lobby,
.blackjack-table {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(232, 191, 107, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(21, 104, 70, 0.36), transparent 34rem),
    rgba(8, 41, 29, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 20px 46px rgba(0, 0, 0, 0.22);
}

.blackjack-action-bar {
  width: min(98%, 900px);
  margin: 0 auto 18px;
}

.card-row-section {
  display: grid;
  gap: 10px;
}

.card-row-heading,
.blackjack-hand-top,
.hand-meta,
.blackjack-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-row-heading strong,
.blackjack-hand-top strong,
.hand-meta strong {
  color: var(--gold-light);
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 92px;
}

.playing-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 64px;
  height: 90px;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 7px;
  color: #182019;
  background: #fbf3df;
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.22);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  overflow: hidden;
}

.card-corner {
  display: grid;
  justify-items: start;
  gap: 1px;
}

.card-corner strong {
  font-size: 20px;
}

.card-corner small {
  font-size: 15px;
  font-weight: 800;
}

.card-center-suit {
  place-self: center;
  font-size: 30px;
  opacity: 0.92;
}

.card-corner-bottom {
  justify-self: end;
  transform: rotate(180deg);
}

.playing-card.red-suit {
  color: #aa252c;
}

.playing-card.black-suit {
  color: #15191a;
}

.hidden-card {
  position: relative;
  grid-template-rows: 1fr;
  place-items: center;
  border-color: rgba(232, 191, 107, 0.52);
  color: #f6d58a;
  background:
    radial-gradient(circle at 50% 50%, rgba(232, 191, 107, 0.2) 0 2px, transparent 3px),
    radial-gradient(circle at 18% 18%, rgba(232, 191, 107, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 82%, rgba(232, 191, 107, 0.22) 0 1px, transparent 2px),
    repeating-linear-gradient(45deg, rgba(232, 191, 107, 0.12) 0 1px, transparent 1px 11px),
    repeating-linear-gradient(135deg, rgba(232, 191, 107, 0.1) 0 1px, transparent 1px 11px),
    linear-gradient(180deg, #17130c, #050505 48%, #0d0a07);
  box-shadow:
    inset 0 0 0 2px rgba(4, 3, 2, 0.74),
    inset 0 0 0 3px rgba(232, 191, 107, 0.2),
    0 9px 18px rgba(0, 0, 0, 0.24);
}

.hidden-card::before {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(232, 191, 107, 0.74);
  border-radius: 5px;
  background:
    radial-gradient(circle at 0 0, transparent 0 10px, rgba(232, 191, 107, 0.34) 11px, transparent 12px),
    radial-gradient(circle at 100% 0, transparent 0 10px, rgba(232, 191, 107, 0.34) 11px, transparent 12px),
    radial-gradient(circle at 0 100%, transparent 0 10px, rgba(232, 191, 107, 0.34) 11px, transparent 12px),
    radial-gradient(circle at 100% 100%, transparent 0 10px, rgba(232, 191, 107, 0.34) 11px, transparent 12px);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.8),
    inset 0 0 0 3px rgba(232, 191, 107, 0.11);
  content: "";
}

.hidden-card::after {
  position: absolute;
  inset: 13px 12px;
  border: 1px solid rgba(232, 191, 107, 0.24);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 13%, rgba(232, 191, 107, 0.58) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 87%, rgba(232, 191, 107, 0.58) 0 1px, transparent 2px),
    linear-gradient(90deg, transparent 0 9px, rgba(232, 191, 107, 0.18) 10px 11px, transparent 12px),
    linear-gradient(0deg, transparent 0 9px, rgba(232, 191, 107, 0.18) 10px 11px, transparent 12px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.46);
  content: "";
}

.card-back-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(246, 213, 138, 0.86);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 46%, rgba(246, 213, 138, 0.18) 0 10px, transparent 11px),
    radial-gradient(circle, #11100d 0 52%, #050505 54% 100%);
  box-shadow:
    inset 0 0 0 2px rgba(232, 191, 107, 0.18),
    inset 0 0 13px rgba(232, 191, 107, 0.16),
    0 0 0 3px rgba(0, 0, 0, 0.55),
    0 0 0 4px rgba(232, 191, 107, 0.2);
}

.card-back-mark::before,
.card-back-mark::after {
  position: absolute;
  content: "";
}

.card-back-mark::before {
  z-index: 2;
  top: 50%;
  left: 50%;
  color: #f6d58a;
  content: "\2660";
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1;
  text-shadow:
    0 1px 0 #4e3210,
    0 0 8px rgba(232, 191, 107, 0.38);
  transform: translate(-50%, -50%);
}

.card-back-mark::after {
  z-index: 1;
  inset: -9px;
  border: 1px solid rgba(232, 191, 107, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 0, rgba(246, 213, 138, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 100%, rgba(246, 213, 138, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 0 50%, rgba(246, 213, 138, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 100% 50%, rgba(246, 213, 138, 0.72) 0 1px, transparent 2px);
}

.blackjack-hands {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.blackjack-seats,
.blackjack-rooms {
  display: grid;
  gap: 8px;
}

.blackjack-room {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid rgba(232, 191, 107, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.blackjack-room-copy {
  display: grid;
  gap: 3px;
}

.blackjack-room-copy strong,
.blackjack-room-copy small {
  display: block;
}

.blackjack-room-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.button-small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.blackjack-table-players {
  display: grid;
  gap: 12px;
}

.blackjack-table-player {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(194, 218, 208, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.blackjack-hands.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.blackjack-hand {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(194, 218, 208, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.blackjack-hand.active {
  border-color: rgba(232, 191, 107, 0.5);
  box-shadow: 0 0 0 2px rgba(232, 191, 107, 0.09);
}

.blackjack-hand.win,
.blackjack-hand.blackjack {
  border-color: rgba(87, 213, 144, 0.46);
}

.blackjack-hand.loss,
.blackjack-hand.busted {
  border-color: rgba(237, 98, 98, 0.48);
}

.blackjack-seat {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(78px, auto);
  gap: 4px 14px;
  padding: 11px 12px;
  border: 1px solid rgba(232, 191, 107, 0.18);
  border-radius: 10px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(4, 19, 14, 0.58);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
  font-size: 12px;
}

.blackjack-seat small {
  grid-column: 1 / 2;
  padding-left: 36px;
  color: var(--muted);
}

.blackjack-seat strong {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  align-self: center;
  min-width: 78px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(232, 191, 107, 0.1);
  text-align: center;
}

.blackjack-seat.active {
  border-color: rgba(232, 191, 107, 0.36);
}

.blackjack-seat.settled {
  border-color: rgba(87, 213, 144, 0.26);
}

.hand-meta {
  color: var(--muted);
  font-size: 12px;
}

.blackjack-actions {
  flex-wrap: wrap;
}

.blackjack-actions .button {
  flex: 1 1 94px;
}

footer {
  padding: 18px 0 22px;
  text-align: center;
}

.login-overlay {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 34%, rgba(232, 191, 107, 0.12), transparent 25%),
    linear-gradient(135deg, rgba(1, 15, 11, 0.96), rgba(0, 6, 4, 0.98));
  backdrop-filter: blur(16px);
}

.login-overlay.hidden {
  display: none;
}

body.auth-open {
  overflow: hidden;
}

body.auth-open .leaderboard-drawer,
body.auth-open .leaderboard-tab,
body.auth-open .leaderboard-backdrop,
body.password-reset-open .leaderboard-drawer,
body.password-reset-open .leaderboard-tab,
body.password-reset-open .leaderboard-backdrop {
  display: none !important;
}

body.password-reset-open #player-app {
  pointer-events: none;
}

.login-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid rgba(232, 191, 107, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(11, 43, 31, 0.96), rgba(4, 24, 17, 0.98));
  text-align: center;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
}

.login-card .brand-mark.large {
  margin-inline: auto;
  width: 74px;
  height: 74px;
  font-size: 29px;
}

.login-card h2 {
  margin-top: 8px;
  font-size: 28px;
}

.login-card p {
  max-width: 300px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.login-card strong {
  color: var(--gold-light);
}

.auth-tabs {
  position: relative;
  display: flex;
  margin-top: 20px;
  padding: 4px;
  border: 1px solid rgba(194, 218, 208, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

.auth-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: linear-gradient(180deg, var(--gold-light), #dba84d);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.auth-tabs[data-active-mode="register"]::before {
  transform: translateX(100%);
}

.auth-tab {
  flex: 1;
  position: relative;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
  min-height: 38px;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.auth-tab.selected {
  color: #061910;
}

.login-notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  color: var(--gold-light);
  background: rgba(232, 191, 107, 0.1);
  border: 1px solid rgba(232, 191, 107, 0.22);
}

.login-notice.hidden {
  display: none;
}

.login-notice.error {
  color: #ffb4b4;
  background: rgba(237, 98, 98, 0.12);
  border-color: rgba(237, 98, 98, 0.35);
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  text-align: left;
}

.login-form label {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-form label.login-label-hint {
  position: relative;
  width: fit-content;
  cursor: help;
  text-decoration: underline dotted rgba(232, 191, 107, 0.45);
  text-underline-offset: 3px;
}

.login-form label.login-label-hint::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 10;
  min-width: 180px;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid rgba(232, 191, 107, 0.24);
  border-radius: 8px;
  background: rgba(5, 20, 15, 0.98);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.4;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.login-form label.login-label-hint:hover::after,
.login-form label.login-label-hint:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.login-form input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(232, 191, 107, 0.32);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
}

.login-form input:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(232, 191, 107, 0.12);
}

.login-form .button {
  min-height: 46px;
  margin-top: 4px;
}

.login-card .login-note {
  max-width: 320px;
  margin-top: 16px;
  color: #78978a;
  font-size: 10px;
  line-height: 1.45;
}

.admin-app,
.admin-overlay,
#admin-overlay {
  width: min(1480px, calc(100% - 36px));
  margin-inline: auto;
  padding: 18px 0 28px;
}

.admin-app.hidden,
.admin-overlay.hidden,
#admin-overlay.hidden {
  display: none !important;
}

#player-app {
  width: 100%;
}

.admin-shell,
.admin-panel {
  position: relative;
  width: min(1180px, 100%);
  max-width: 100%;
  padding: 20px;
  border: 1px solid rgba(232, 191, 107, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(232, 191, 107, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(10, 34, 27, 0.98), rgba(7, 20, 15, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  overflow-wrap: anywhere;
}

.admin-header {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(194, 218, 208, 0.1);
}

.admin-header-copy h2 {
  margin: 4px 0 0;
}

.admin-header-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-env-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.admin-env-chip {
  display: grid;
  gap: 2px;
  min-width: 148px;
  padding: 10px 14px;
  border: 1px solid rgba(194, 218, 208, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #d8eee5;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.admin-env-chip span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.admin-env-chip small {
  color: var(--muted);
  font-size: 11px;
}

.admin-env-chip:hover,
.admin-env-chip.active {
  border-color: rgba(232, 191, 107, 0.42);
  background: rgba(232, 191, 107, 0.08);
  transform: translateY(-1px);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-tabs,
.admin-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.admin-tab,
.admin-subtab {
  padding: 10px 16px;
  border: 1px solid rgba(194, 218, 208, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: #d8eee5;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.admin-tab.selected,
.admin-subtab.selected {
  border-color: rgba(232, 191, 107, 0.42);
  background: rgba(232, 191, 107, 0.12);
  color: var(--gold-light);
}

.admin-main {
  margin-top: 18px;
}

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

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

.admin-section-heading h3,
.admin-module-header h4 {
  margin: 4px 0 0;
}

.admin-section-heading p,
.admin-module-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(194, 218, 208, 0.14);
  border-radius: 999px;
  color: var(--gold-light);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-pill.betting,
.admin-pill.playing,
.admin-pill.spinning {
  border-color: rgba(120, 214, 164, 0.35);
  color: #9ef0c5;
}

.admin-pill.cooldown,
.admin-pill.idle {
  border-color: rgba(194, 218, 208, 0.18);
  color: var(--muted);
}

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

.admin-metric-card,
.admin-module,
.admin-card,
.admin-section {
  padding: 16px;
  border: 1px solid rgba(232, 191, 107, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-metric-card.gold strong {
  color: var(--gold-light);
}

.admin-metric-card strong,
.admin-card strong {
  display: block;
  margin-top: 6px;
  color: #eef8f3;
  font-size: 28px;
  line-height: 1.1;
}

.admin-metric-card small,
.admin-card small,
.admin-log-line small,
.admin-row small {
  color: var(--muted);
}

.admin-split-grid,
.admin-detail-grid {
  display: grid;
  gap: 12px;
}

.admin-split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.admin-detail-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
}

.admin-detail-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-detail-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-module {
  margin-top: 0;
}

.admin-module.wide {
  width: 100%;
}

.admin-module-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.admin-achievements-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.admin-achievements-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-achievement-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid rgba(194, 218, 208, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-achievement-item.tier-bronze {
  border-left: 3px solid #c98a5d;
}

.admin-achievement-item.tier-silver {
  border-left: 3px solid #b8c4d4;
}

.admin-achievement-item.tier-gold {
  border-left: 3px solid #e8bf6b;
}

.admin-achievement-item.tier-platinum {
  border-left: 3px solid #d8b7ff;
}

.admin-achievement-copy {
  display: grid;
  gap: 4px;
}

.admin-achievement-copy strong {
  font-size: 14px;
}

.admin-achievement-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-achievement-id {
  color: #6f8f82;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-achievement-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.admin-achievement-unlocks {
  color: var(--muted);
  font-size: 11px;
}

.admin-achievement-pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(168, 120, 255, 0.14);
  color: #d8b7ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .admin-achievement-item {
    grid-template-columns: 1fr;
  }

  .admin-achievement-meta {
    justify-items: start;
    text-align: left;
  }
}

.admin-subsection {
  margin-top: 18px;
}

.admin-subsection h5 {
  margin: 0 0 10px;
  color: var(--gold-light);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-session-list {
  display: grid;
  gap: 12px;
}

.admin-session-list.horizontal {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-session-card {
  padding: 14px;
  border: 1px solid rgba(194, 218, 208, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.admin-session-card.compact {
  padding: 12px;
}

.admin-session-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.admin-session-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-game-panels {
  margin-top: 14px;
}

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

.admin-card.wide {
  grid-column: 1 / -1;
}

.admin-table,
.admin-log-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.admin-actions,
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-row,
.admin-log-line {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(194, 218, 208, 0.1);
  color: #d8eee5;
  font-size: 12px;
}

.admin-row > *,
.admin-log-line > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-row.header {
  padding-top: 0;
  border-top: 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table.accounts .admin-row {
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 0.8fr)) minmax(96px, 0.6fr);
}

.admin-row .positive {
  color: #9ef0c5;
}

.admin-row .negative {
  color: #ffb4b4;
}

.admin-row.header strong {
  font-size: inherit;
  color: inherit;
}

.admin-log-line {
  grid-template-columns: minmax(132px, 0.9fr) minmax(90px, 0.6fr) minmax(0, 2fr);
}

.admin-section {
  margin-top: 10px;
}

body.admin-mode #player-app {
  display: none !important;
}

body.admin-mode .player-footer {
  display: none;
}

body.admin-mode #admin-overlay {
  display: block;
  min-height: calc(100dvh - 96px);
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

body.admin-mode .admin-panel,
body.admin-mode .admin-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.admin-drawer,
.admin-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
}

.admin-drawer-backdrop {
  background: rgba(2, 8, 6, 0.62);
  backdrop-filter: blur(3px);
}

.admin-drawer {
  top: 0;
  right: 0;
  left: auto;
  width: min(420px, 100vw);
  height: 100%;
  padding: 18px;
  border-left: 1px solid rgba(232, 191, 107, 0.18);
  background: linear-gradient(180deg, #0d241d, #07140f);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.42);
  overflow: auto;
}

.admin-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-drawer-body .admin-account-card {
  border: 0;
  padding: 0;
  background: transparent;
}

.admin-account-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.admin-account-card {
  padding: 12px;
  border: 1px solid rgba(194, 218, 208, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-stat-muted {
  color: var(--muted);
  font-size: 11px;
}

.admin-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(194, 218, 208, 0.1);
}

.admin-manage-grid .button,
.admin-manage-grid .button-danger {
  width: 100%;
}

.admin-manage-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-manage-grid input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(194, 218, 208, 0.18);
  border-radius: 6px;
  color: #e8f5ef;
  background: rgba(0, 0, 0, 0.22);
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
}

.button-danger {
  border-color: rgba(237, 98, 98, 0.45);
  color: #ffb4b4;
}

.toast {
  position: fixed;
  z-index: 160;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  max-width: min(390px, calc(100% - 36px));
  padding: 12px 15px;
  border: 1px solid rgba(255, 220, 146, 0.25);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(9, 37, 27, 0.96);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.34);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  border-color: rgba(237, 98, 98, 0.5);
}

@media (max-width: 1160px) {
  .topbar,
  .game-nav,
  .layout,
  .admin-app,
  #admin-overlay,
  footer {
    width: min(1480px, calc(100% - 24px));
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .wheel-stage {
    width: min(82vw, 620px);
  }

  .account {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .identity {
    text-align: left;
  }

  .account-stats {
    justify-content: flex-start;
  }

  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-row,
  .admin-log-line {
    grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(72px, 1fr));
    font-size: 11px;
  }

}

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

  .admin-metric-grid,
  .admin-split-grid,
  .admin-detail-grid,
  .admin-detail-grid.compact,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-row,
  .admin-log-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .admin-manage-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 22px 18px;
  }

  .login-card h2 {
    font-size: clamp(22px, 6vw, 28px);
  }
}

@media (max-width: 670px) {
  .topbar,
  .game-nav,
  .layout,
  .admin-app,
  #admin-overlay,
  footer {
    width: min(100% - 16px, 1480px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0 8px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  h1 {
    font-size: 18px;
  }

  h2 {
    font-size: 21px;
  }

  .game-nav {
    gap: 6px;
    position: sticky;
    z-index: 22;
    top: 0;
    padding: 8px 0;
    background: rgba(6, 17, 13, 0.92);
    backdrop-filter: blur(12px);
  }

  .game-tab {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 8px;
    font-size: 11px;
  }

  .account {
    width: 100%;
    gap: 6px;
    flex-wrap: wrap;
  }

  .identity {
    flex: 1 1 100%;
    min-width: 0;
    margin-right: auto;
    text-align: left;
  }

  .account-stats {
    justify-content: flex-start;
    gap: 3px 8px;
  }

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

  .identity strong,
  .account-stat span {
    font-size: 13px;
  }

  .account .button {
    flex: 1 1 calc(50% - 6px);
    padding: 8px 9px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-app,
  #admin-overlay {
    padding: 10px 0 20px;
  }

  body.admin-mode #admin-overlay {
    min-height: calc(100dvh - 120px);
  }

  .admin-panel,
  .admin-shell {
    padding: 12px;
  }

  .admin-actions,
  .admin-toolbar {
    width: 100%;
  }

  .admin-actions .button,
  .admin-toolbar .button {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  .admin-row,
  .admin-log-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .login-overlay {
    padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom));
  }

  .login-card {
    padding: 22px 16px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 10px;
  }

  .table-column {
    display: contents;
  }

  .wager-panel {
    order: 0;
  }

  .table-panel {
    order: 1;
  }

  .wheel-column.game-panel {
    display: grid;
    order: 2;
    gap: 10px;
  }

  .slot-result-panel {
    order: 3;
  }

  .lower-tabs {
    order: 4;
  }

  .table-column > .panel + .panel,
  .lower-tabs {
    margin-top: 0;
  }

  .panel {
    border-radius: 12px;
  }

  .wager-panel,
  .table-panel,
  .slot-panel,
  .slot-result-panel,
  .blackjack-panel,
  .tab-panel {
    padding: 10px;
  }

  .panel-heading,
  .panel-heading.compact {
    gap: 10px;
    margin-bottom: 8px;
  }

  .minimum {
    font-size: 11px;
  }

  .chips {
    flex-wrap: nowrap;
    gap: 7px;
    margin: 0 0 8px;
    padding: 2px 2px 7px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .chip {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-width: 2px;
    font-size: 10px;
  }

  .custom-wager {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    margin: 0;
  }

  .custom-wager input {
    padding: 8px;
  }

  .custom-wager .button {
    padding: 8px 9px;
    font-size: 10px;
    white-space: nowrap;
  }

  .wager-summary {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .wheel-stage {
    width: min(74vw, 300px);
    margin: 8px auto 6px;
  }

  .status-row {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    padding: 0 2px 4px;
  }

  .status-row > div:first-child {
    min-width: 0;
  }

  .status-row h2 {
    font-size: 20px;
    line-height: 1.05;
  }

  .eyebrow {
    margin-bottom: 3px;
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  .blackjack-status,
  .slot-jackpot {
    min-width: 0;
    font-size: 24px;
    text-align: right;
  }

  .blackjack-status span {
    font-size: 15px;
  }

  .blackjack-status strong {
    min-width: 108px;
    font-size: 13px;
  }

  .slot-jackpot {
    min-width: 58px;
    height: 38px;
    font-size: 20px;
  }

  .timer {
    min-width: auto;
    font-size: 32px;
    text-align: right;
  }

  .result-panel {
    flex-wrap: wrap;
    gap: 8px;
    min-height: auto;
    margin: 0 auto 8px;
  }

  .result-panel .eyebrow {
    width: 100%;
    margin: 0;
    text-align: center;
  }

  .result-number {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .personal-result {
    width: 100%;
    margin-bottom: 10px;
    padding: 9px 10px;
    font-size: 12px;
  }

  .personal-result strong {
    font-size: 15px;
  }

  .table-panel {
    overflow-x: visible;
  }

  .roulette-table {
    grid-template-columns: 36px minmax(0, 1fr);
    min-width: 0;
    gap: 3px;
  }

  .numbers {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(3, 34px);
    gap: 3px;
  }

  .bet-cell {
    min-width: 0;
    padding: 0 1px;
    font-size: 10px;
    line-height: 1.05;
  }

  .zero {
    font-size: 16px;
  }

  .outside-bets {
    gap: 3px;
    margin-top: 3px;
  }

  .outside {
    min-height: 30px;
    font-size: 9px;
  }

  .tab-list {
    margin-bottom: 7px;
    overflow-x: auto;
  }

  .tab-button {
    flex: 1 0 auto;
    padding: 8px 9px;
    font-size: 10px;
    white-space: nowrap;
  }

  .tab-panel {
    min-height: auto;
    max-height: 230px;
    overflow: auto;
  }

  .leaderboard-drawer .leaderboard {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }

  .leaderboard-drawer {
    width: min(100vw, 100%);
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      10px;
  }

  .leaderboard-tab {
    top: auto;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    border: 1px solid rgba(232, 191, 107, 0.44);
    border-radius: 999px;
    writing-mode: horizontal-tb;
  }

  .leaderboard .leader-row,
  .bet-line,
  .table-bet-line,
  .slot-history-line,
  .pay-line {
    padding: 7px 8px;
    font-size: 11px;
  }

  .table-bet-line {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  }

  .table-bet-line.condensed {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-bet-line strong {
    grid-column: 1 / -1;
    text-align: left;
  }

  .leaderboard .leader-rank {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    font-size: 10px;
  }

  .leader-name {
    font-size: 10px;
  }

  .leader-stat-credits,
  .leader-stat-markers {
    font-size: 8px;
  }

  .history-section {
    padding: 8px;
  }

  .lobby-card {
    padding: 10px;
    border-radius: 12px;
  }

  .lobby-card .card-row-heading {
    padding: 6px 7px;
    border-radius: 8px;
  }

  .lobby-card .card-row-heading strong {
    min-height: 24px;
    padding: 0 8px;
    font-size: 10px;
  }

  .lobby-list,
  .blackjack-seats {
    max-height: 118px;
    overflow: auto;
  }

  .lobby-line,
  .blackjack-seat {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    padding: 7px 8px;
    border-radius: 7px;
    font-size: 11px;
    box-shadow: none;
  }

  .lobby-name {
    gap: 7px;
  }

  .lobby-name::before {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .lobby-line small,
  .blackjack-seat small {
    padding-left: 29px;
    font-size: 10px;
  }

  .lobby-line strong,
  .blackjack-seat strong {
    min-width: 58px;
    padding: 5px 7px;
    font-size: 10px;
  }

  .empty-state {
    padding: 10px 4px;
    font-size: 12px;
  }

  .lobby-card .empty-state {
    padding: 10px;
  }

  .history {
    gap: 5px;
  }

  .history-item {
    width: 27px;
    height: 27px;
    font-size: 12px;
  }

  .slot-layout,
  .blackjack-layout {
    display: contents;
  }

  .blackjack-alert {
    grid-template-columns: 1fr;
    gap: 6px;
    width: 100%;
    margin: 2px 0 8px;
    padding: 11px;
  }

  .blackjack-alert-label {
    grid-row: auto;
    justify-self: start;
  }

  .blackjack-alert strong {
    font-size: 18px;
  }

  .slot-machine {
    width: 100%;
    order: 1;
    gap: 6px;
    margin: 8px auto 0;
    padding: 18px 8px 12px;
    border-radius: 12px;
  }

  .slot-machine::before {
    top: 7px;
    right: 16px;
    left: 16px;
  }

  .slot-action-panel {
    order: 2;
    width: 100%;
    margin: 0;
  }

  .slot-reel {
    min-height: 82px;
    border-radius: 9px;
  }

  .slot-symbol {
    gap: 5px;
  }

  .slot-symbol-icon {
    min-width: 44px;
    min-height: 44px;
    font-size: 24px;
  }

  .slot-symbol-seven .slot-symbol-icon {
    font-size: 34px;
  }

  .slot-symbol-bar .slot-symbol-icon {
    font-size: 16px;
  }

  .slot-paytable {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 126px;
    overflow: auto;
  }

  .slot-history-reels,
  .pay-symbols {
    gap: 3px;
  }

  .slot-symbol.compact .slot-symbol-icon {
    min-width: 20px;
    min-height: 20px;
    border-radius: 5px;
    font-size: 12px;
  }

  .blackjack-table {
    order: 1;
    width: 100%;
    gap: 10px;
    margin: 8px auto 0;
    padding: 10px;
    border-radius: 10px;
  }

  .blackjack-action-bar {
    order: 2;
    width: 100%;
    margin: 0;
  }

  .blackjack-lobby {
    order: 3;
  }

  .card-row-section {
    gap: 7px;
  }

  .cards {
    gap: 5px;
    min-height: 72px;
  }

  .playing-card {
    width: 50px;
    height: 72px;
    padding: 6px;
    border-radius: 6px;
  }

  .card-corner strong {
    font-size: 15px;
  }

  .card-corner small {
    font-size: 12px;
  }

  .card-center-suit {
    font-size: 23px;
  }

  .hidden-card::before {
    inset: 5px;
  }

  .hidden-card::after {
    inset: 11px 10px;
  }

  .card-back-mark {
    width: 27px;
    height: 27px;
  }

  .card-back-mark::before {
    font-size: 20px;
  }

  .card-back-mark::after {
    inset: -7px;
  }

  .blackjack-hands {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .blackjack-hand {
    gap: 7px;
    padding: 9px;
  }

  .hand-meta {
    font-size: 11px;
  }

  .blackjack-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .blackjack-actions .button {
    flex: 0 1 auto;
    min-width: 0;
  }

  [data-game-panel="slots"] > .history-section,
  [data-game-panel="roulette"] > .history-section {
    order: 5;
  }

  footer {
    padding: 20px 0 18px;
    font-size: 11px;
  }
}

@media (max-width: 390px) {
  .custom-wager {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #all-in-button {
    grid-column: 2 / 3;
  }

  .wager-summary {
    grid-column: 1 / -1;
  }

  .roulette-table {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .numbers {
    grid-template-rows: repeat(3, 31px);
  }

  .outside {
    min-height: 28px;
    font-size: 8px;
  }

  .playing-card {
    width: 46px;
    height: 67px;
  }

  .slot-reel {
    min-height: 76px;
  }

  .slot-symbol-icon {
    min-width: 40px;
    min-height: 40px;
  }

  .blackjack-actions .button {
    padding-inline: 8px;
  }
}

@media (max-width: 340px) {
  .account {
    flex-wrap: wrap;
  }

  .account .button {
    flex: 1 1 calc(50% - 4px);
  }

  .chip {
    flex-basis: 39px;
    width: 39px;
    height: 39px;
  }

  .custom-wager {
    grid-template-columns: 1fr;
  }

  .custom-wager .button,
  #all-in-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.rewards-overlay,
.achievements-overlay {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  backdrop-filter: blur(16px);
}

.rewards-overlay {
  background:
    radial-gradient(circle at 50% 18%, rgba(232, 191, 107, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(1, 15, 11, 0.96), rgba(0, 6, 4, 0.98));
}

.achievements-overlay {
  background:
    radial-gradient(circle at 18% 12%, rgba(196, 148, 255, 0.18), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(232, 191, 107, 0.1), transparent 22%),
    linear-gradient(145deg, rgba(10, 8, 24, 0.97), rgba(4, 10, 18, 0.98));
}

.rewards-overlay.hidden,
.achievements-overlay.hidden {
  display: none;
}

body.rewards-open,
body.achievements-open {
  overflow: hidden;
}

.jackpot-celebration {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 12, 8, 0.72);
}

.jackpot-celebration.hidden {
  display: none;
}

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

.jackpot-celebration-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 28px 24px 24px;
  border: 2px solid rgba(232, 191, 107, 0.55);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 58, 42, 0.98), rgba(6, 30, 21, 0.99));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: jackpot-card-pop 0.45s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.jackpot-celebration-eyebrow {
  margin: 0;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.jackpot-celebration-card h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 6vw, 36px);
  color: #fff8ea;
}

.jackpot-celebration-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.jackpot-celebration-amount {
  margin: 18px 0 22px;
  color: var(--gold-light);
  font-size: clamp(30px, 7vw, 40px);
  font-weight: 800;
  line-height: 1.1;
}

@keyframes jackpot-card-pop {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.rewards-card {
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(232, 191, 107, 0.24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(11, 43, 31, 0.98), rgba(4, 24, 17, 0.99));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
}

.rewards-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.rewards-header h2 {
  margin-top: 4px;
  font-size: 30px;
}

.rewards-header p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.reward-tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(232, 191, 107, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.reward-tile-copy h3 {
  font-size: 18px;
}

.reward-tile-copy p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.reward-result {
  margin: 0;
  color: var(--gold-light);
  font-size: 13px;
}

.scratch-board {
  margin-top: 4px;
}

.scratch-ticket {
  border: 2px solid rgba(232, 191, 107, 0.42);
  border-radius: 10px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.22)),
    rgba(8, 42, 30, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.scratch-ticket-heading {
  margin: 0 0 10px;
  text-align: center;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.scratch-cell {
  position: relative;
  aspect-ratio: 1;
  min-height: 72px;
  overflow: hidden;
  border: 1px solid rgba(232, 191, 107, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(196, 203, 214, 0.35), rgba(122, 132, 148, 0.45)),
    rgba(8, 58, 41, 0.95);
  user-select: none;
  touch-action: none;
}

.scratch-prize {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
  color: var(--gold-light);
  font-size: clamp(13px, 3.4vw, 16px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  pointer-events: none;
}

.scratch-cell.is-revealed .scratch-prize {
  visibility: visible;
}

.scratch-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.scratch-cell.is-revealed .scratch-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.scratch-cell.is-revealed {
  box-shadow: inset 0 0 0 1px rgba(232, 191, 107, 0.35);
}

.scratch-cell.is-winner {
  box-shadow: inset 0 0 0 2px rgba(232, 191, 107, 0.75);
}

.bonus-wheel {
  position: relative;
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
}

.bonus-wheel-dial {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(232, 191, 107, 0.45);
  box-shadow: inset 0 0 0 8px rgba(0, 0, 0, 0.28);
  transform: rotate(0deg);
  overflow: hidden;
}

.bonus-wheel-dial::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: rgba(4, 24, 17, 0.92);
  border: 2px solid rgba(232, 191, 107, 0.2);
  pointer-events: none;
  z-index: 3;
}

.bonus-wheel-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.bonus-wheel-svg .bonus-wheel-label {
  fill: #f7f2e8;
  font-size: 10px;
  font-weight: 700;
  paint-order: stroke fill;
  stroke: rgba(0, 0, 0, 0.7);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.bonus-wheel-svg .bonus-wheel-label.is-jackpot {
  letter-spacing: -0.03em;
  stroke-width: 2px;
}

.bonus-wheel-pointer {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 18px solid var(--gold);
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  z-index: 4;
}

.achievements-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(196, 148, 255, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(24, 18, 42, 0.98), rgba(8, 14, 28, 0.99)),
    radial-gradient(circle at top right, rgba(196, 148, 255, 0.08), transparent 42%);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.achievements-header-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.achievements-close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(237, 98, 98, 0.4);
  border-radius: 8px;
  background: rgba(237, 98, 98, 0.1);
  color: #ff5c5c;
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.achievements-close:hover {
  background: rgba(237, 98, 98, 0.2);
  border-color: rgba(255, 120, 120, 0.65);
  color: #ff7a7a;
}

.achievements-close:focus-visible {
  outline: 2px solid rgba(255, 120, 120, 0.75);
  outline-offset: 2px;
}

.achievements-header-copy {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.achievements-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: #f8e7b8;
  font-size: 26px;
  background: linear-gradient(145deg, rgba(232, 191, 107, 0.24), rgba(126, 74, 190, 0.34));
  border: 1px solid rgba(232, 191, 107, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.achievements-header-main h2 {
  margin-top: 4px;
  font-size: 30px;
}

.achievements-header-main p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.achievements-eyebrow {
  color: #d8b8ff;
}

.achievements-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.achievements-progress-wrap {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(196, 148, 255, 0.14);
}

.achievements-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #9f6be8, #e8bf6b);
  transition: width 0.35s ease;
}

.achievements-progress-label {
  margin: 0;
  color: #d8b8ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.achievements-panel {
  margin-top: 0;
}

.achievements-header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.achievements-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

.achievement-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  opacity: 0.72;
}

.achievement-item.mystery .achievement-copy strong,
.achievement-item.mystery .achievement-copy span:last-child {
  letter-spacing: 0.08em;
  color: var(--muted);
}

.achievement-tier {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.achievement-item.tier-bronze .achievement-tier {
  color: #f0d2b2;
  background: rgba(176, 112, 64, 0.22);
  border: 1px solid rgba(176, 112, 64, 0.35);
}

.achievement-item.tier-silver .achievement-tier {
  color: #e4ebf5;
  background: rgba(164, 176, 190, 0.2);
  border: 1px solid rgba(164, 176, 190, 0.34);
}

.achievement-item.tier-gold .achievement-tier {
  color: #ffe7b0;
  background: rgba(232, 191, 107, 0.18);
  border: 1px solid rgba(232, 191, 107, 0.34);
}

.achievement-item.tier-platinum .achievement-tier {
  color: #f4e8ff;
  background: rgba(196, 148, 255, 0.18);
  border: 1px solid rgba(196, 148, 255, 0.34);
}

.achievement-item.unlocked {
  opacity: 1;
  border-color: rgba(232, 191, 107, 0.22);
  background: rgba(232, 191, 107, 0.06);
}

.achievement-item.tier-bronze.unlocked {
  border-color: rgba(176, 112, 64, 0.34);
  background: rgba(176, 112, 64, 0.08);
}

.achievement-item.tier-silver.unlocked {
  border-color: rgba(164, 176, 190, 0.34);
  background: rgba(164, 176, 190, 0.08);
}

.achievement-item.tier-gold.unlocked {
  border-color: rgba(232, 191, 107, 0.34);
  background: rgba(232, 191, 107, 0.08);
}

.achievement-item.tier-platinum.unlocked {
  border-color: rgba(196, 148, 255, 0.34);
  background: rgba(196, 148, 255, 0.08);
}

.achievement-copy {
  display: grid;
  gap: 6px;
}

.achievement-copy strong {
  font-size: 14px;
}

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

.achievement-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

.achievement-reward {
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
}

.achievement-status {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 760px) {
  .rewards-grid {
    grid-template-columns: 1fr;
  }

  .achievement-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .achievement-meta {
    justify-items: start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slot-reel.spinning .slot-symbol,
  .slot-reel.settled,
  .wheel-stage.landed .wheel-center {
    animation: none;
  }

  .bonus-wheel-dial {
    transition: none !important;
  }

  .jackpot-celebration-card {
    animation: none;
  }
}
