:root {
  /* Retro cabinet palette inspired by classic video poker cabinets */
  --bg-primary: #0017b5;
  --bg-secondary: #0527d6;
  --bg-tertiary: #0d34ec;
  --bg-card: #1329a8;

  --text-primary: #fff54a;
  --text-secondary: #fff085;
  --text-muted: #a6b6ff;

  --gold: #ffed00;
  --gold-bright: #fff958;
  --cyan: #00d4ff;
  --green: #2ecc71;
  --red: #ff2342;
  --suit-red: #d81027;

  --focus-ring: #f5d061;
  --focus-glow: rgba(212, 175, 55, 0.5);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-arcade: "Arial Black", Impact, Haettenschweiler, "Segoe UI", sans-serif;
  --font-pixel: "Press Start 2P", "Lucida Console", Monaco, monospace;
}

button {
  font-family: "Archivo Black", var(--font-arcade);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  background: #000524;
  color: var(--text-primary);
  font-family: var(--font-arcade);
  letter-spacing: 0.01em;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#app {
  width: 600px;
  height: 600px;
  position: relative;
  padding: 0;
  background: transparent;
  flex-shrink: 0;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

.screen {
  position: absolute;
  top: 0; left: 0;
  width: 600px; height: 600px;
  display: flex; flex-direction: column;
}
.screen.hidden { display: none; }
.hidden { display: none !important; }

/* ---------- header ---------- */
.header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  min-height: 56px;
}
.header h1 {
  font-size: 26px;
  font-weight: 700;
  flex: 1;
  letter-spacing: 0.06em;
}
.header .brand {
  color: var(--gold-bright);
  letter-spacing: 0.25em;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
  font-size: 24px;
}
.header-meta {
  font-size: 22px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.header-meta strong { color: var(--gold-bright); }
.back-btn {
  background: transparent;
  color: var(--text-primary);
  font-size: 26px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 44px;
}
.back-btn:focus {
  outline: none;
  border-color: #ffed00;
  background: rgba(255, 237, 0, 0.18);
  color: #fff;
  box-shadow:
    0 0 0 4px rgba(255, 237, 0, 0.85),
    0 0 0 8px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(255, 237, 0, 0.8);
  transform: scale(1.06);
}

/* ---------- focus (critical for D-pad) ---------- */
.focusable {
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  border: 3px solid transparent;
  cursor: pointer;
  min-height: 44px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: inherit;
  position: relative;
}
.focusable:focus {
  outline: none;
  border-color: var(--focus-ring);
  box-shadow:
    0 0 0 5px rgba(255, 237, 0, 0.85),
    0 0 0 9px rgba(0, 0, 0, 0.55),
    0 0 30px rgba(255, 237, 0, 0.7);
  transform: translateY(-2px);
  z-index: 2;
}
.focusable[disabled] {
  opacity: 0.22;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

/* ============================================================ */
/* content + nav                                                */
/* ============================================================ */
.content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nav-bar {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.nav-item {
  flex: 1;
  padding: 14px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.1em;
}
.nav-item:focus { background: var(--bg-card); }
.nav-item.primary {
  background: var(--gold);
  color: #0a0a0f;
}
.nav-item.primary:focus { background: var(--gold-bright); }

/* ============================================================ */
/* BET SCREEN                                                   */
/* ============================================================ */
.bet-content {
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
}
.bet-prompt {
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.4em;
  color: var(--gold);
  font-weight: 700;
  padding: 2px 0;
}
.bet-rack {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 6px 0;
}
.bet-coin {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px dashed var(--gold);
  font-family: inherit;
  position: relative;
  cursor: pointer;
}
.bet-coin__val {
  font-size: 30px;
  font-weight: 800;
  color: var(--gold-bright);
  line-height: 1;
}
.bet-coin__max {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-top: 2px;
}
.bet-coin--max { border-color: var(--gold-bright); box-shadow: 0 0 14px rgba(245,208,97,0.35); }
.bet-coin:focus {
  border-style: solid;
  border-color: var(--focus-ring);
  box-shadow: 0 0 22px var(--focus-glow);
  transform: translateY(-2px);
}
.bet-coin.is-selected {
  background: linear-gradient(135deg, rgba(245,208,97,0.25), rgba(168,138,44,0.25));
  border-style: solid;
}

/* paytable */
.paytable {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(58px, auto);
  gap: 2px;
  padding: 4px;
  background: #00015B;
  border: 3px solid #f8f400;
  border-radius: 0;
  font-family: var(--font-pixel);
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.paytable--matrix {
  grid-template-columns: minmax(160px, 1.5fr) repeat(5, minmax(44px, 1fr));
}
.paytable--arcade {
  margin-bottom: 6px;
}
.paytable__head {
  text-align: center;
  font-size: 20px;
  color: #fff453;
  font-weight: 800;
  padding: 4px 4px;
  background: transparent;
  border: 1px solid rgba(255, 237, 0, 0.35);
}
.paytable__head--spacer {
  text-align: left;
  padding-left: 8px;
}
.paytable__head.is-active {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}
.paytable__head.is-max {
  background: #d10028;
}
.paytable__name {
  color: #f9f349;
  font-weight: 400;
  padding: 6px 8px;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}
.paytable__name::after {
  content: "";
  flex: 1;
  min-width: 16px;
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    rgba(249, 243, 73, 0.85) 0 6px,
    transparent 6px 10px
  );
}
.paytable__pay {
  color: #f9f349;
  font-weight: 400;
  padding: 6px 6px;
  background: transparent;
  border: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.paytable__name--royal,
.paytable__pay--royal {
  color: #fff87d;
  text-shadow: none;
}
.paytable__name.is-highlight,
.paytable__pay.is-highlight {
  color: #fff;
  background: #cb002c;
}

/* hint glow on cards when strategy suggests holding */
.card-toggle.hold-hint {
  box-shadow:
    0 0 0 3px rgba(0, 212, 255, 0.8),
    0 0 12px rgba(0, 212, 255, 0.45),
    0 3px 8px rgba(0,0,0,0.65),
    inset 0 0 0 2px rgba(255,255,255,0.4);
}

/* ============================================================ */
/* GAME SCREEN                                                  */
/* ============================================================ */
.play {
  flex: 1;
  background: #0000FF;
  border: 2px solid rgba(255, 237, 0, 0.75);
  box-shadow: inset 0 0 0 2px rgba(0, 7, 69, 0.55);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.play-corner {
  position: absolute;
  top: 104px;
  z-index: 2;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff454;
  background: rgba(0, 8, 61, 0.65);
  border: 2px solid rgba(255, 237, 0, 0.55);
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
  line-height: 1;
}
.play-corner strong {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  margin-left: 4px;
}
.play-corner--tl { left: 10px; }
.play-corner--tr { right: 10px; }

/* paytable summary line */
.pay-line {
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 4px 12px;
  background: rgba(7, 19, 106, 0.72);
  border: 2px solid rgba(255, 237, 0, 0.45);
  border-radius: 4px;
  min-height: 30px;
  min-width: 220px;
  text-align: center;
}
.pay-line__hint {
  color: #e5ecff;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 15px;
}
.pay-line__hint.is-win {
  color: #9bff8e;
  text-shadow: 0 0 12px rgba(46,204,113,0.55);
}

/* 5-card row */
.hand-row {
  flex: 1;
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  padding: 0 4px;
}
.deal-start-prompt {
  align-self: center;
  margin-top: -2px;
  margin-bottom: 2px;
  padding: 4px 10px;
  background: #0000cc;
  border: 2px solid #0500b8;
  color: #ff2a2a;
  font-family: "Roboto Condensed", "Archivo Black", "Arial Black", "Helvetica Neue Condensed", Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow:
    -2px -2px 0 #ffe200,
     0px -2px 0 #ffe200,
     2px -2px 0 #ffe200,
    -2px  0px 0 #ffe200,
     2px  0px 0 #ffe200,
    -2px  2px 0 #ffe200,
     0px  2px 0 #ffe200,
     2px  2px 0 #ffe200;
  animation: press-deal-flash 0.5s steps(1, end) infinite;
}
.play-meters {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding: 2px 2px 6px;
  margin-top: 2px;
}
.play-meters .meter-chip {
  width: auto;
  min-width: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.play-meters .meter-chip--win {
  grid-column: 1;
  justify-self: start;
  align-items: flex-start;
}
.play-meters .meter-chip--bet {
  grid-column: 2;
  justify-self: center;
}
.play-meters .meter-chip--credits {
  grid-column: 3;
  justify-self: end;
  align-items: flex-end;
}
.play-draw-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 4px 0 0;
}
.play-draw-bar .act--deal {
  width: 190px !important;
  min-height: 64px;
}
.play-draw-bar .act--exit {
  width: 190px !important;
  min-height: 64px;
}
.play-meters .meter-chip__label,
.play-meters .meter-chip__value {
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.08em;
}
.play-meters .meter-chip__value {
  margin-top: 2px;
}
.play-meters .meter-chip--credits .meter-chip__label,
.play-meters .meter-chip--credits .meter-chip__value {
  color: #ff2a2a;
  text-shadow:
    -2px -2px 0 #ffe200,
     0px -2px 0 #ffe200,
     2px -2px 0 #ffe200,
    -2px  0px 0 #ffe200,
     2px  0px 0 #ffe200,
    -2px  2px 0 #ffe200,
     0px  2px 0 #ffe200,
     2px  2px 0 #ffe200;
}
.play-meters .meter-chip--bet .meter-chip__label,
.play-meters .meter-chip--bet .meter-chip__value {
  color: #ffffff;
  text-shadow: none;
}
.play-meters .meter-chip--win .meter-chip__label,
.play-meters .meter-chip--win .meter-chip__value {
  color: #ffffff;
  text-shadow: 0 0 0 transparent;
}
.play-meters .meter-chip--win.is-win-flash .meter-chip__label,
.play-meters .meter-chip--win.is-win-flash .meter-chip__value {
  animation: win-flash 0.55s steps(2, end) infinite;
}
@keyframes win-flash {
  0%, 100% {
    color: #ffffff;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.35);
  }
  50% {
    color: #fff55f;
    text-shadow: 0 0 12px rgba(255, 241, 0, 0.85);
  }
}
.card-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
  max-width: 102px;
  position: relative;
}
.hold-indicator {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  pointer-events: none;
  opacity: 0;
}
.hold-indicator.is-visible {
  opacity: 1;
}
/* Base held state — card sits flat but gets a permanent gold ring so a
   held card always looks distinct from a non-held one even without focus. */
.card-slot.is-held .card {
  transform: none;
  box-shadow:
    0 0 0 3px #ffed00,
    0 0 16px rgba(255, 237, 0, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

/* Held AND hovered/focused → bring back the full lift + thick double-ring.
   Specificity (0,0,3,0) beats the base held rule (0,0,2,1), so this wins. */
.card-slot.is-held .card-toggle:hover,
.card-slot.is-held .card-toggle:focus {
  outline: none;
  transform: translateY(-22px) scale(1.08);
  box-shadow:
    0 0 0 6px #ffed00,
    0 0 0 10px rgba(0, 0, 0, 0.65),
    0 0 44px rgba(255, 237, 0, 1),
    0 14px 22px rgba(0, 0, 0, 0.75),
    inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  z-index: 4;
}

/* The HOLD label rides up with the card so it stays attached when focused. */
.card-slot.is-held:has(.card-toggle:focus) .hold-indicator,
.card-slot.is-held:has(.card-toggle:hover) .hold-indicator {
  transform: translateX(-50%) translateY(-22px);
  color: #ffed00;
  text-shadow: 0 0 12px rgba(255, 237, 0, 0.95);
}
.hold-indicator {
  transition: transform 0.18s cubic-bezier(.32, 1.5, .5, 1), color 0.15s, text-shadow 0.15s;
}

.card {
  width: 92px;
  height: 128px;
  background: linear-gradient(135deg, #f6f1e3 0%, #e7dec5 100%);
  border-radius: 9px;
  border: 1px solid #2a2a2e;
  color: #0a0a0f;
  position: relative;
  font-family: 'Georgia', serif;
  font-weight: 700;
  box-shadow:
    0 3px 8px rgba(0,0,0,0.65),
    inset 0 0 0 2px rgba(255,255,255,0.4);
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(.32, 1.5, .5, 1), box-shadow 0.2s ease;
}
.card-toggle {
  cursor: pointer;
}
.card-toggle:hover,
.card-toggle:focus {
  outline: none;
  box-shadow:
    0 0 0 6px #ffed00,
    0 0 0 10px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(255, 237, 0, 0.95),
    0 14px 22px rgba(0, 0, 0, 0.7),
    inset 0 0 0 2px rgba(255, 255, 255, 0.45);
  transform: translateY(-22px) scale(1.08);
  z-index: 3;
}
.card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.card--enter {
  animation: dealIn 0.32s cubic-bezier(.32, 1.4, .5, 1);
}
@keyframes dealIn {
  0%   { transform: translateY(-60px) translateX(-30px) rotate(-12deg) scale(0.85); opacity: 0; }
  60%  { transform: translateY(4px) translateX(0) rotate(2deg) scale(1.04); opacity: 1; }
  100% { transform: translateY(0) translateX(0) rotate(0) scale(1); opacity: 1; }
}
.card.back {
  background:
    repeating-linear-gradient(45deg, #5b1f8a 0 8px, #3a124e 8px 16px),
    #5b1f8a;
}
.card.back::after {
  content: '\2660';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  font-size: 38px;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}
.card.empty {
  background: rgba(20,20,30,0.4);
  border: 1px dashed rgba(212,175,55,0.4);
  box-shadow: none;
}

/* ---------- action bar with single DEAL button ---------- */
.action-bar {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: transparent;
  margin-top: 2px;
  flex-shrink: 0;
  min-height: 76px;
  align-items: stretch;
}
.meter-chip {
  width: 120px;
  background: #0a10a8;
  border: 3px solid #f7ef00;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.meter-chip--credits {
  border-color: #ffe200;
  align-items: flex-end;
  text-align: right;
  padding-right: 10px;
}
.meter-chip__label {
  font-size: 16px;
  letter-spacing: 0.1em;
  color: #fff45d;
  font-weight: 800;
}
.meter-chip__value {
  font-size: 54px;
  line-height: 0.92;
  color: #fff9b0;
  text-shadow: 2px 2px 0 #d1132f;
  font-variant-numeric: tabular-nums;
}
.act {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: var(--bg-tertiary);
  border-radius: 4px;
  color: var(--text-primary);
  font-weight: 800;
  text-align: center;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-arcade);
  cursor: pointer;
}
.act__label {
  font-size: 56px;
  letter-spacing: 0.06em;
  color: #fff55f;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.act:active { transform: scale(0.98); }
.act[hidden] { display: none !important; }

/* DEAL button - bright green with pulse when waiting for input */
.act--deal {
  background: linear-gradient(180deg, #fff28a 0%, #FFE73B 48%, #e0c900 100%);
  border: 3px solid #6f6100;
  border-radius: 0;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.45),
    inset -2px -2px 0 rgba(84, 72, 0, 0.55);
  color: #0a0a0f;
  animation: none;
}
.act--deal .act__label {
  color: #000000;
  text-shadow: none;
  font-size: 42px;
}
@keyframes press-deal-flash {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.act--deal:focus {
  outline: none;
  border-color: #000000;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.45),
    inset -2px -2px 0 rgba(84, 72, 0, 0.55);
}
.act--deal.no-pulse { animation: none; }
.act--exit {
  background: linear-gradient(180deg, #ff7a7a 0%, #e63535 52%, #b00000 100%);
  border: 3px solid #6e0000;
  border-radius: 0;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.35),
    inset -2px -2px 0 rgba(90, 0, 0, 0.55);
  color: #0a0a0f;
  animation: none;
}
.act--exit .act__label {
  color: #000000;
  text-shadow: none;
  font-size: 42px;
}
.act--exit:focus {
  outline: none;
  border-color: #000000;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.35),
    inset -2px -2px 0 rgba(90, 0, 0, 0.55);
}
@keyframes deal-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.4)) drop-shadow(0 0 18px rgba(46, 204, 113, 0.18));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(46, 204, 113, 0.8)) drop-shadow(0 0 32px rgba(46, 204, 113, 0.4));
    transform: scale(1.015);
  }
}

/* ============================================================ */
/* OVERLAYS / MODALS                                            */
/* ============================================================ */
.overlay {
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.18);
}
.modal__title {
  font-size: 28px;
  color: var(--gold-bright);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.modal__body {
  font-size: 22px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 18px;
}
.modal__body strong { color: var(--gold-bright); }
.modal__actions {
  display: flex;
  gap: 10px;
}
.modal__actions .nav-item { min-height: 52px; }

/* ============================================================ */
/* STATS SCREEN                                                 */
/* ============================================================ */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
}
.stat-card__label {
  font-size: 22px;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 6px;
}
.stat-card__val {
  font-size: 36px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.text-green { color: var(--green) !important; }
.text-red { color: var(--red) !important; }
.text-gold { color: var(--gold-bright) !important; }

.stat-toggles {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* ============================================================ */
/* XP HEADER widgets                                            */
/* ============================================================ */
.lvl-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 10px;
  background: linear-gradient(135deg, #1a1a2e 0%, #2a2a42 100%);
  border: 1px solid var(--gold);
  border-radius: 8px;
  min-width: 56px;
  line-height: 1;
}
.lvl-badge__lbl {
  font-size: 22px;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-weight: 700;
}
.lvl-badge > :last-child {
  font-size: 26px;
  font-weight: 800;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

/* ============================================================ */
/* MOTION GRANT (one-time head-tracking permission gate)         */
/* ============================================================ */
.motion-grant-screen {
  background: var(--bg-primary);
  padding: 0;
  overflow: hidden;
}
.motion-grant__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 36px;
  text-align: center;
}
.motion-grant__icon {
  font-size: 96px;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(255, 237, 0, 0.7));
  animation: motion-bob 2s ease-in-out infinite;
}
@keyframes motion-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-6px) rotate(4deg); }
}
.motion-grant__title {
  font-size: 40px;
  letter-spacing: 0.2em;
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(255, 237, 0, 0.55);
  margin: 4px 0;
}
.motion-grant__body {
  font-size: 22px;
  line-height: 1.4;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  max-width: 460px;
}
.motion-grant__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
}
.motion-grant__actions .nav-item {
  min-height: 64px;
  font-size: 24px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================================ */
/* CREDITS BLOCK (stats screen)                                  */
/* ============================================================ */
.credits-block {
  background: var(--bg-card);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 0 24px rgba(255, 237, 0, 0.18);
}
.credits-block__lbl {
  font-size: 22px;
  letter-spacing: 0.3em;
  color: var(--gold);
  font-weight: 800;
}
.credits-block__val {
  font-size: 64px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(255, 237, 0, 0.6);
  line-height: 1;
  margin: 6px 0 8px;
}
.credits-block__sub {
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.credits-block__sub strong {
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
}

/* ============================================================ */
/* RUN END                                                       */
/* ============================================================ */
.run-end-screen { background: transparent; padding: 0; overflow: hidden; }
.run-end__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 18px;
  padding: 28px 28px;
  text-align: center;
  position: relative;
}
.run-end__title {
  font-size: 44px;
  letter-spacing: 0.12em;
  margin: 0;
  line-height: 1.1;
  background: linear-gradient(90deg, #6ab7ff 0%, #f5d061 50%, #5edc8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(245, 208, 97, 0.4));
}
.run-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.run-summary > div {
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
}
.run-summary > div:nth-child(1) {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.18) 0%, rgba(0, 80, 120, 0.18) 100%);
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.15);
}
.run-summary > div:nth-child(1) .run-summary__lbl { color: #7eeeff; }
.run-summary > div:nth-child(1) .run-summary__val { color: #aef3ff; text-shadow: 0 0 14px rgba(0, 212, 255, 0.55); }
.run-summary > div:nth-child(2) {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(20, 100, 60, 0.18) 100%);
  border-color: rgba(94, 220, 138, 0.5);
  box-shadow: 0 0 24px rgba(94, 220, 138, 0.15);
}
.run-summary > div:nth-child(2) .run-summary__lbl { color: #a8f5c5; }
.run-summary > div:nth-child(2) .run-summary__val { color: #c8ffd8; text-shadow: 0 0 14px rgba(94, 220, 138, 0.55); }
.run-summary__lbl {
  font-size: 22px;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 8px;
}
.run-summary__val {
  font-size: 40px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.run-end__total {
  background:
    linear-gradient(135deg, rgba(245, 208, 97, 0.22) 0%, rgba(168, 138, 44, 0.18) 100%),
    rgba(20, 20, 30, 0.6);
  border: 1px solid rgba(245, 208, 97, 0.55);
  border-radius: 16px;
  padding: 18px 14px;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.run-end__total-lbl {
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}
.run-end__total-val {
  font-size: 56px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: linear-gradient(180deg, #ffe9a8 0%, #f5d061 55%, #d4af37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(245, 208, 97, 0.55));
}
.run-end__levelup {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f1d6ff;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.22) 0%, rgba(126, 58, 191, 0.22) 100%);
  border: 1px solid rgba(192, 132, 252, 0.55);
  align-self: center;
  text-shadow: 0 0 12px rgba(192, 132, 252, 0.55);
  box-shadow: 0 0 22px rgba(192, 132, 252, 0.22);
}
.run-end__levelup strong { color: #ffffff; margin-left: 4px; }
.run-end__actions { display: flex; }
.run-end__actions .nav-item {
  flex: 1;
  min-height: 64px;
  font-size: 24px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #f5d061 0%, #d4af37 60%, #a88a2c 100%);
  color: #0a0a0f;
  border: 1px solid rgba(245, 208, 97, 0.7);
  box-shadow: 0 0 26px rgba(245, 208, 97, 0.35);
}
.run-end__actions .nav-item:focus {
  box-shadow: 0 0 0 3px var(--gold-bright), 0 0 28px rgba(245, 208, 97, 0.55);
}

/* ============================================================ */
/* STATS PROFILE                                                 */
/* ============================================================ */
.stats-content { gap: 12px; }
.lvl-block {
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: center;
}
.lvl-block__lvl {
  font-size: 22px;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 700;
}
.lvl-block__lvl strong {
  font-size: 36px;
  font-weight: 800;
  color: var(--gold-bright);
  margin-left: 10px;
  font-variant-numeric: tabular-nums;
}
.lvl-block__xp {
  font-size: 22px;
  color: var(--text-secondary);
  margin: 8px 0 14px;
}
.lvl-block__xp strong { color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.lvl-bar {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.lvl-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--gold-bright) 100%);
  transition: width 0.4s ease;
}
.lvl-block__next {
  font-size: 22px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.lvl-block__next #stats-toNext {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-grid .stat-card { padding: 14px 10px; }
.stat-grid .stat-card__val { font-size: 30px; }
.stat-grid .stat-card__label {
  font-size: 22px;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

/* ============================================================ */
/* PLAYER CODE / CLOUD SYNC                                     */
/* ============================================================ */
.player-code-block {
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: center;
  margin-top: 6px;
}
.player-code-block__lbl {
  font-size: 22px;
  letter-spacing: 0.2em;
  color: var(--cyan);
  font-weight: 800;
}
.player-code {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--gold-bright);
  font-family: var(--font-arcade);
  padding: 8px 0 4px;
  text-shadow: 0 0 12px rgba(212,175,55,0.4);
}
.player-code-block__hint {
  font-size: 22px;
  line-height: 1.25;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.cloud-status {
  font-size: 22px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 8px;
  min-height: 26px;
}
.cloud-status.ok { color: var(--green); }
.cloud-status.bad { color: var(--red); }

/* ============================================================ */
/* SPLASH                                                        */
/* ============================================================ */
#splash {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 0;
}
.splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  animation: splashIn 0.7s ease-out;
}
.splash__hw {
  display: block;
  width: 84px;
  height: 84px;
  object-fit: contain;
  opacity: 0.9;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.3));
  user-select: none;
  -webkit-user-drag: none;
}
.splash__game {
  display: block;
  width: 320px;
  height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(212, 175, 55, 0.55));
  user-select: none;
  -webkit-user-drag: none;
}
.splash__loader {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
}
.splash__loader span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-bright);
  animation: splashDot 1.4s ease-in-out infinite;
}
.splash__loader span:nth-child(2) { animation-delay: 0.18s; }
.splash__loader span:nth-child(3) { animation-delay: 0.36s; }
@keyframes splashIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes splashDot {
  0%, 80%, 100% { opacity: 0.28; transform: scale(1); }
  40%           { opacity: 1;    transform: scale(1.35); }
}

/* ============================================================ */
/* MAIN MENU                                                    */
/* ============================================================ */
.menu-content {
  gap: 14px;
  justify-content: center;
  align-items: stretch;
}
.menu-logo {
  display: block;
  width: 220px;
  height: 220px;
  margin: -10px auto -10px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(212, 175, 55, 0.5));
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
}
.menu-tile {
  background: var(--bg-card);
  border: 3px solid transparent;
  border-radius: var(--radius-lg);
  padding: 26px 26px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-arcade);
  color: var(--gold-bright);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-align: left;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s, border-color 0.15s, background 0.15s, filter 0.15s;
  min-height: 88px;
  /* Non-focused tiles dim slightly so the focused one pops by contrast */
  filter: brightness(0.78) saturate(0.85);
}
.menu-tile:focus {
  outline: none;
  border-color: #ffed00;
  background: linear-gradient(135deg, rgba(255, 237, 0, 0.18), rgba(255, 249, 88, 0.10));
  box-shadow:
    0 0 0 5px rgba(255, 237, 0, 0.9),
    0 0 0 9px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(255, 237, 0, 0.85);
  transform: translateX(6px) scale(1.02);
  filter: brightness(1.15) saturate(1.2);
}
/* Big yellow chevron on the focused tile — impossible to miss */
.menu-tile::before {
  content: '\25B8';
  position: absolute;
  left: -34px;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
  font-size: 40px;
  color: #ffed00;
  text-shadow: 0 0 14px rgba(255, 237, 0, 0.9);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  pointer-events: none;
}
.menu-tile:focus::before {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  animation: chev-bob 1.1s ease-in-out infinite;
}
@keyframes chev-bob {
  0%, 100% { transform: translateY(-50%) translateX(0) scale(1); }
  50%      { transform: translateY(-50%) translateX(4px) scale(1.05); }
}

.menu-tile__label { flex: 1; }
.menu-tile--primary {
  background: linear-gradient(135deg, #2ecc71 0%, #1f8a4c 100%);
  border-color: rgba(94, 220, 138, 0.55);
  padding: 32px 26px;
  justify-content: center;
  /* Pulse ONLY when not focused — so the focus state stands out clearly */
}
.menu-tile--primary:not(:focus) {
  animation: deal-pulse 1.8s ease-in-out infinite;
}
.menu-tile--primary .menu-tile__label {
  flex: 0 1 auto;
  color: #ffffff;
  filter: none;
  font-size: 64px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.menu-tile--primary:focus {
  background: linear-gradient(135deg, #5edc8a 0%, #2ecc71 100%);
  border-color: #ffed00;
  box-shadow:
    0 0 0 5px rgba(255, 237, 0, 0.95),
    0 0 0 9px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(94, 220, 138, 0.9);
  transform: scale(1.04);
  filter: brightness(1.2) saturate(1.1);
}

.menu-secondary {
  display: flex;
  gap: 10px;
}
.menu-mini {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  background: var(--bg-card);
  border: 3px solid transparent;
  border-radius: var(--radius-md);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s, box-shadow 0.15s, filter 0.15s, background 0.15s;
  /* Dim until focused — focused one will pop dramatically */
  filter: brightness(0.78) saturate(0.85);
}
.menu-mini__icon {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.35));
}
.menu-mini__label {
  font-family: var(--font-arcade);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}
.menu-mini:focus {
  outline: none;
  border-color: #ffed00;
  background: linear-gradient(135deg, rgba(255, 237, 0, 0.32), rgba(255, 249, 88, 0.18));
  box-shadow:
    0 0 0 5px rgba(255, 237, 0, 0.9),
    0 0 0 9px rgba(0, 0, 0, 0.55),
    0 0 32px rgba(255, 237, 0, 0.85);
  transform: scale(1.10);
  filter: brightness(1.25) saturate(1.2);
  z-index: 3;
}
.menu-mini:focus .menu-mini__label,
.menu-mini:focus .menu-mini__icon {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.85);
}
.menu-mini--gold {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22) 0%, rgba(168, 138, 44, 0.22) 100%);
  border-color: rgba(245, 208, 97, 0.45);
}
.menu-mini--gold .menu-mini__icon { color: var(--gold-bright); filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.55)); }
.menu-mini--gold .menu-mini__label { color: var(--gold-bright); }

.menu-mini--purple {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22) 0%, rgba(126, 58, 191, 0.22) 100%);
  border-color: rgba(192, 132, 252, 0.45);
}
.menu-mini--purple .menu-mini__icon { filter: drop-shadow(0 0 10px rgba(192, 132, 252, 0.55)); }
.menu-mini--purple .menu-mini__label { color: #c084fc; }

.menu-mini--grey {
  background: linear-gradient(135deg, rgba(180, 188, 200, 0.14) 0%, rgba(120, 128, 140, 0.14) 100%);
  border-color: rgba(180, 188, 200, 0.35);
}
.menu-mini--grey .menu-mini__icon { color: #c8ccd4; filter: drop-shadow(0 0 8px rgba(200, 204, 212, 0.4)); }
.menu-mini--grey .menu-mini__label { color: #c8ccd4; }

.menu-footer {
  text-align: center;
  padding: 12px 0 6px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.menu-footer__logo {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  opacity: 0.85;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.35));
  user-select: none;
  -webkit-user-drag: none;
}

/* ============================================================ */
/* SETTINGS rows                                                 */
/* ============================================================ */
.settings-content { gap: 12px; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-arcade);
  letter-spacing: 0.16em;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.settings-row__label { font-size: 26px; color: var(--text-primary); }
.settings-row__value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.16em;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.settings-row__value[data-on="1"] {
  background: rgba(46, 204, 113, 0.15);
  color: #5edc8a;
  border-color: rgba(94, 220, 138, 0.5);
}
.settings-row:focus {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow: 0 0 22px rgba(212, 175, 55, 0.55);
}

/* ============================================================ */
/* LEADERBOARD                                                   */
/* ============================================================ */
.leaderboard-content { gap: 10px; }
.lb-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.lb-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-family: var(--font-arcade);
}
.lb-row__rank {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.lb-row__code {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.12em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-row__score {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}
.lb-list .lb-row:nth-child(1) .lb-row__rank { color: var(--gold-bright); }
.lb-list .lb-row:nth-child(2) .lb-row__rank { color: #c0c0c0; }
.lb-list .lb-row:nth-child(3) .lb-row__rank { color: #cd7f32; }
.lb-row--me {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.18) 0%, rgba(20, 100, 60, 0.18) 100%);
  border-color: rgba(94, 220, 138, 0.55);
}
.lb-row--me .lb-row__code { color: #c8ffd8; }
.lb-me-row { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, 0.12); }
.lb-empty {
  list-style: none;
  text-align: center;
  font-size: 22px;
  color: var(--text-muted);
  padding: 28px 14px;
  letter-spacing: 0.04em;
}

/* ============================================================ */
/* FLOAT XP                                                      */
/* ============================================================ */
.float-xp {
  position: absolute;
  top: calc(50% - var(--stack-offset, 0px));
  right: 24px;
  transform: translateY(-50%);
  font-size: 38px;
  font-weight: 800;
  color: var(--gold-bright);
  text-shadow:
    0 0 18px rgba(212, 175, 55, 0.85),
    0 0 40px rgba(212, 175, 55, 0.45);
  letter-spacing: 0.05em;
  pointer-events: none;
  z-index: 60;
  animation: float-up 1.4s cubic-bezier(.32, 1.4, .5, 1) forwards;
  font-variant-numeric: tabular-nums;
}
.float-xp.float-xp--loss {
  color: var(--red);
  text-shadow: 0 0 18px rgba(255, 77, 109, 0.7);
}
@keyframes float-up {
  0%   { opacity: 0; transform: translateY(-45%) scale(0.7); }
  18%  { opacity: 1; transform: translateY(-55%) scale(1.15); }
  40%  { opacity: 1; transform: translateY(-75%) scale(1); }
  100% { opacity: 0; transform: translateY(-140%) scale(0.95); }
}

/* result banner (full hand celebration) */
#result-banner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, transparent 70%);
}
#result-banner.show { opacity: 1; }
#result-banner .banner-text {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  text-shadow:
    0 0 20px rgba(212,175,55,0.7),
    0 0 50px rgba(212,175,55,0.4);
  animation: banner-pop 0.35s ease-out;
  text-align: center;
  line-height: 1;
}
#result-banner.win .banner-text {
  color: var(--green);
  text-shadow: 0 0 24px rgba(46,204,113,0.7), 0 0 50px rgba(46,204,113,0.4);
}
#result-banner.lose .banner-text {
  color: var(--red);
  text-shadow: 0 0 24px rgba(255,77,109,0.7), 0 0 50px rgba(255,77,109,0.4);
}
#result-banner.royal .banner-text {
  font-size: 48px;
  color: var(--gold-bright);
  text-shadow: 0 0 30px var(--gold-bright), 0 0 60px rgba(212,175,55,0.6);
}
@keyframes banner-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Global arcade button skin (game-wide) */
button {
  width: 90px !important;
  height: 31px !important;
  min-height: 31px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: 3px solid #0000cc !important;
  background: #ffea00 !important;
  box-shadow:
    inset 2px 2px 0 #fff6a0,
    inset -2px -2px 0 rgba(5, 0, 184, 0.55) !important;
  color: #000000 !important;
  font-family: "Roboto Condensed", "Archivo Black", "Arial Black", "Helvetica Neue Condensed", Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
button > * {
  color: #000000 !important;
  font-family: "Roboto Condensed", "Archivo Black", "Arial Black", "Helvetica Neue Condensed", Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
}
button:focus {
  outline: none !important;
  border-color: #0500b8 !important;
  box-shadow:
    inset 2px 2px 0 #ffffff,
    inset -2px -2px 0 rgba(5, 0, 184, 0.65) !important;
  transform: none !important;
}

/* Clear hover/focus affordance for DEAL / EXIT */
.play-draw-bar .act {
  transition: transform 0.08s ease, filter 0.08s ease, border-color 0.08s ease;
}
.play-draw-bar .act:hover,
.play-draw-bar .act:focus {
  border-color: #ffffff !important;
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.play-draw-bar .act:active {
  transform: translateY(1px);
  filter: brightness(0.95);
}

/* Winning card animation */
.card-slot.is-win-card .card {
  animation: win-card-celebrate 0.52s ease-in-out infinite alternate;
}
@keyframes win-card-celebrate {
  0% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 3px 8px rgba(0,0,0,0.65),
      inset 0 0 0 2px rgba(255,255,255,0.4);
  }
  100% {
    transform: translateY(-6px) scale(1.04);
    box-shadow:
      0 0 0 2px rgba(255, 231, 59, 0.95),
      0 0 16px rgba(255, 231, 59, 0.75),
      0 4px 10px rgba(0,0,0,0.65),
      inset 0 0 0 2px rgba(255,255,255,0.4);
  }
}

/* Better menu + choose-bet layout while keeping arcade style */
#menu button,
#bet button {
  width: auto !important;
  height: auto !important;
}
#menu .menu-content {
  padding: 16px 16px 10px;
}
#menu .menu-tile {
  width: 100% !important;
  min-height: 92px !important;
}
#menu .menu-secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
#menu .menu-mini {
  width: 100% !important;
  min-height: 76px !important;
}

#bet .bet-content {
  padding: 14px 12px;
}
#bet .bet-rack {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  justify-items: center;
}
#bet .bet-coin {
  width: 82px !important;
  height: 82px !important;
  min-height: 82px !important;
  border-radius: 50% !important;
  background: var(--bg-card) !important;
  border: 4px dashed var(--gold) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}
#bet .bet-coin--max {
  border-color: var(--gold-bright) !important;
}
#bet .bet-coin.is-selected {
  background: linear-gradient(135deg, rgba(245,208,97,0.25), rgba(168,138,44,0.25)) !important;
  border-style: solid !important;
}
#bet .bet-coin:focus {
  border-style: solid !important;
  border-color: var(--focus-ring) !important;
  box-shadow: 0 0 22px var(--focus-glow) !important;
  transform: translateY(-2px) !important;
}

/* ============================================================ */
/* CASINO SETTINGS SCREEN — IGT Game King inspired              */
/* Scoped to .settings-screen-v2 so it overrides the global     */
/* arcade button styles without affecting other screens.        */
/* ============================================================ */

.settings-screen-v2 {
  background: linear-gradient(180deg, #000420 0%, #00073d 100%);
  padding: 8px;
  gap: 0;
}
.settings-screen-v2 .content {
  padding: 12px;
  gap: 12px;
}

/* ---------- HEADER ---------- */
.settings-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin: 2px 0 6px;
  background: linear-gradient(180deg, #0a1f6e 0%, #060c3a 60%, #02041f 100%);
  border: 3px solid #ffed00;
  border-radius: 18px;
  box-shadow:
    0 0 0 2px #000,
    0 0 24px rgba(255, 237, 0, 0.35),
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    inset 0 -3px 0 rgba(0, 0, 0, 0.45);
  overflow: hidden;
  min-height: 78px;
}
.settings-header__suit {
  position: absolute;
  font-size: 42px;
  color: #4d6bff;
  opacity: 0.12;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(77, 107, 255, 0.4);
}
.settings-header__suit--1 { top: 4px;  left: 28%;  transform: rotate(-12deg); }
.settings-header__suit--2 { top: 4px;  right: 30%; color: #ff6b8a; transform: rotate(8deg); }
.settings-header__suit--3 { bottom: 4px; left: 38%; color: #ff6b8a; transform: rotate(14deg); }
.settings-header__suit--4 { bottom: 4px; right: 28%; transform: rotate(-6deg); }
.settings-header__spacer { width: 84px; flex-shrink: 0; }

.settings-back {
  width: 84px !important;
  height: 58px !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #fff958 0%, #ffed00 45%, #d4af37 100%) !important;
  border: 3px solid #060c3a !important;
  color: #0a0a0f !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  box-shadow:
    inset 0 -5px 0 rgba(0, 0, 0, 0.28),
    inset 0 3px 0 rgba(255, 255, 255, 0.55),
    0 4px 0 #060c3a,
    0 6px 10px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease !important;
  padding: 0 !important;
}
.settings-back__arrow {
  font-size: 38px !important;
  font-weight: 900 !important;
  color: #060c3a !important;
  line-height: 1 !important;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.35) !important;
  font-family: 'Arial Black', 'Helvetica Neue Condensed', sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.settings-back:focus {
  outline: none !important;
  border-color: #00ffff !important;
  box-shadow:
    inset 0 -5px 0 rgba(0, 0, 0, 0.28),
    inset 0 3px 0 rgba(255, 255, 255, 0.55),
    0 0 0 4px rgba(0, 255, 255, 0.95),
    0 0 0 8px rgba(0, 0, 0, 0.6),
    0 0 26px rgba(0, 212, 255, 0.85) !important;
  transform: translateY(-2px) !important;
}
.settings-back:active {
  transform: translateY(2px) !important;
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.45) !important;
}

.settings-title {
  flex: 1;
  text-align: center;
  font-family: 'jay-gothic-urw', 'Cinzel', 'Archivo Black', sans-serif;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #fff958 35%, #ffed00 60%, #c89f08 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter:
    drop-shadow(0 2px 0 #000)
    drop-shadow(0 0 14px rgba(255, 237, 0, 0.55));
  position: relative;
  z-index: 1;
}

/* ---------- SETTINGS ROWS ---------- */
.settings-screen-v2 .settings-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  padding: 14px 16px !important;
  background: linear-gradient(180deg, #0e2b9c 0%, #061a6c 60%, #03116a 100%) !important;
  border: 2px solid #00d4ff !important;
  border-radius: 14px !important;
  min-height: 78px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(0, 212, 255, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    inset 0 -3px 0 rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.12s ease, box-shadow 0.12s, border-color 0.12s, filter 0.12s !important;
  filter: brightness(0.92);
  text-transform: none !important;
}
.settings-screen-v2 .settings-row:focus {
  outline: none !important;
  border-color: #ffed00 !important;
  box-shadow:
    0 0 0 4px rgba(255, 237, 0, 0.9),
    0 0 0 8px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(255, 237, 0, 0.7),
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    inset 0 -3px 0 rgba(0, 0, 0, 0.4) !important;
  transform: scale(1.02) !important;
  filter: brightness(1.15) !important;
}

.settings-screen-v2 .settings-row__icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff958 !important;
  filter: drop-shadow(0 0 8px rgba(255, 237, 0, 0.55)) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6));
}
.settings-screen-v2 .settings-row__icon svg {
  width: 100%;
  height: 100%;
}

.settings-screen-v2 .settings-row__label {
  flex: 1;
  text-align: left !important;
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif !important;
  font-size: 26px !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 212, 255, 0.18) !important;
  line-height: 1 !important;
}

/* Pill toggle switch — slides knob based on data-on attribute */
.settings-screen-v2 .settings-toggle {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  width: 130px;
  height: 50px;
  border-radius: 999px !important;
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s !important;
  text-transform: uppercase !important;
}
.settings-screen-v2 .settings-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: left 0.18s cubic-bezier(.32, 1.4, .5, 1);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    inset 0 -3px 0 rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.55);
}
/* OFF state: dark navy pill, gray knob on the left */
.settings-screen-v2 .settings-toggle[data-on="0"] {
  background: linear-gradient(180deg, #0a1242 0%, #03082a 100%) !important;
  border: 3px solid #1b2a6a !important;
  color: #ffffff !important;
  justify-content: flex-end !important;
  padding: 0 14px 0 56px !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7) !important;
}
.settings-screen-v2 .settings-toggle[data-on="0"]::after {
  left: 3px;
  background: linear-gradient(180deg, #a0a8c0 0%, #5c647a 100%);
  border: 2px solid #2a3258;
}
/* ON state: gold pill, dark knob on the right */
.settings-screen-v2 .settings-toggle[data-on="1"] {
  background: linear-gradient(180deg, #fff958 0%, #ffed00 40%, #d4af37 100%) !important;
  border: 3px solid #8a6e1d !important;
  color: #0a0a0f !important;
  justify-content: flex-start !important;
  padding: 0 56px 0 14px !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 0 14px rgba(255, 237, 0, 0.55) !important;
}
.settings-screen-v2 .settings-toggle[data-on="1"]::after {
  left: calc(100% - 47px);
  background: linear-gradient(180deg, #14141f 0%, #06081a 100%);
  border: 2px solid #ffed00;
}

/* ---------- PLAYER CODE PANEL ---------- */
.settings-screen-v2 .player-code-block {
  position: relative;
  margin-top: 4px !important;
  background: radial-gradient(ellipse at top, #0a1f6e 0%, #060c3a 60%, #02041f 100%) !important;
  border: 3px solid #00d4ff !important;
  border-radius: 18px !important;
  padding: 18px 18px 16px !important;
  overflow: hidden;
  box-shadow:
    0 0 0 2px #000,
    0 0 22px rgba(0, 212, 255, 0.5),
    inset 0 0 30px rgba(0, 212, 255, 0.08),
    inset 0 2px 0 rgba(255, 255, 255, 0.1) !important;
}
.player-code-block__suit {
  position: absolute;
  font-size: 60px;
  pointer-events: none;
  opacity: 0.10;
  text-shadow: 0 0 10px currentColor;
}
.player-code-block__suit--1 { top: -4px;    left: 6px;    color: #00d4ff; }
.player-code-block__suit--2 { top: -4px;    right: 6px;   color: #ff6b8a; }
.player-code-block__suit--3 { bottom: -8px; left: 6px;    color: #ff6b8a; }
.player-code-block__suit--4 { bottom: -8px; right: 6px;   color: #00d4ff; }

.settings-screen-v2 .player-code-block__lbl {
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif;
  font-size: 22px;
  letter-spacing: 0.42em;
  color: #00d4ff;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.7), 0 2px 0 rgba(0, 0, 0, 0.7);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.player-code-display {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 12px 0 8px;
  z-index: 1;
}
.player-code-display__star {
  font-size: 32px;
  color: #fff958;
  filter: drop-shadow(0 0 10px rgba(255, 237, 0, 0.85));
  animation: pcode-sparkle 1.6s ease-in-out infinite;
  font-family: 'Arial', sans-serif;
}
.player-code-display__star:first-child { animation-delay: 0.0s; }
.player-code-display__star:last-child  { animation-delay: 0.8s; }
@keyframes pcode-sparkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85) rotate(-12deg); }
  50%      { opacity: 1;    transform: scale(1.2)  rotate(12deg); }
}
.settings-screen-v2 .player-code {
  font-family: 'jay-gothic-urw', 'Cinzel', 'Archivo Black', monospace;
  font-size: 58px;
  font-weight: 900;
  letter-spacing: 0.22em;
  line-height: 1;
  padding: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fff958 35%, #ffed00 60%, #c89f08 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter:
    drop-shadow(0 3px 0 #000)
    drop-shadow(0 0 18px rgba(255, 237, 0, 0.65));
  text-shadow: none;
}

.settings-screen-v2 .player-code-block__hint {
  font-size: 22px;
  line-height: 1.3;
  color: #cdd6ff;
  letter-spacing: 0.04em;
  margin: 6px 8px 12px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  position: relative;
  z-index: 1;
}

/* ---------- ARCADE BUTTONS (Pair / Restore) ---------- */
.settings-screen-v2 .stat-toggles {
  display: flex !important;
  gap: 10px !important;
  margin-top: 4px !important;
  position: relative;
  z-index: 1;
}
.arcade-btn {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 14px 10px !important;
  border-radius: 12px !important;
  border: 3px solid #060c3a !important;
  background: linear-gradient(180deg, #fff958 0%, #ffed00 45%, #d4af37 100%) !important;
  color: #060c3a !important;
  font-family: 'jay-gothic-urw', 'Archivo Black', 'Arial Black', sans-serif !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.05 !important;
  text-transform: uppercase !important;
  cursor: pointer;
  text-align: center !important;
  box-shadow:
    inset 0 -5px 0 rgba(0, 0, 0, 0.28),
    inset 0 3px 0 rgba(255, 255, 255, 0.55),
    0 4px 0 #060c3a,
    0 6px 10px rgba(0, 0, 0, 0.55) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease !important;
}
.arcade-btn:focus {
  outline: none !important;
  border-color: #00ffff !important;
  box-shadow:
    inset 0 -5px 0 rgba(0, 0, 0, 0.28),
    inset 0 3px 0 rgba(255, 255, 255, 0.55),
    0 0 0 4px rgba(0, 255, 255, 0.95),
    0 0 0 8px rgba(0, 0, 0, 0.6),
    0 4px 0 #060c3a,
    0 0 28px rgba(0, 212, 255, 0.7) !important;
  transform: translateY(-2px) !important;
}
.arcade-btn:active {
  transform: translateY(2px) !important;
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 1px 0 #060c3a !important;
}

/* ---------- CLOUD STATUS ---------- */
.settings-screen-v2 .cloud-status {
  font-size: 22px;
  letter-spacing: 0.04em;
  font-weight: 800;
  text-align: center;
  margin-top: 10px;
  min-height: 28px;
  font-family: 'jay-gothic-urw', sans-serif;
  position: relative;
  z-index: 1;
}
.settings-screen-v2 .cloud-status.ok {
  color: #5edc8a;
  text-shadow: 0 0 10px rgba(94, 220, 138, 0.55);
}
.settings-screen-v2 .cloud-status.bad {
  color: #ff4d6d;
  text-shadow: 0 0 12px rgba(255, 77, 109, 0.7), 0 1px 2px rgba(0, 0, 0, 0.7);
}
.settings-screen-v2 .cloud-status.bad::before {
  content: '\26A0  ';
  color: #ffed00;
  text-shadow: 0 0 10px rgba(255, 237, 0, 0.7);
}

/* ============================================================ */
/* STATS SCREEN — IGT Game King session info panel              */
/* ============================================================ */
.stats-screen-v2 {
  background: linear-gradient(180deg, #000420 0%, #00073d 100%);
  padding: 8px;
  gap: 0;
}
.stats-screen-v2 .content {
  padding: 10px 12px;
  gap: 10px;
}

.stats-panel {
  position: relative;
  background: radial-gradient(ellipse at top, #0a1f6e 0%, #060c3a 60%, #02041f 100%);
  border: 3px solid #00d4ff;
  border-radius: 18px;
  padding: 14px 18px;
  overflow: hidden;
  box-shadow:
    0 0 0 2px #000,
    0 0 22px rgba(0, 212, 255, 0.45),
    inset 0 0 30px rgba(0, 212, 255, 0.08),
    inset 0 2px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats-panel__suit {
  position: absolute;
  font-size: 60px;
  pointer-events: none;
  opacity: 0.08;
  text-shadow: 0 0 10px currentColor;
}
.stats-panel__suit--1 { top: -4px;    left: 6px;    color: #00d4ff; }
.stats-panel__suit--2 { top: -4px;    right: 6px;   color: #ff6b8a; }
.stats-panel__suit--3 { bottom: -8px; left: 6px;    color: #ff6b8a; }
.stats-panel__suit--4 { bottom: -8px; right: 6px;   color: #00d4ff; }

.stats-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px;
  position: relative;
  z-index: 1;
}
.stats-row__lbl {
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #cdd6ff;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.stats-row__val {
  font-family: 'jay-gothic-urw', 'Archivo Black', monospace;
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fff958;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 0 12px rgba(255, 237, 0, 0.45);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.stats-row--accent .stats-row__lbl {
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.55), 0 1px 2px rgba(0, 0, 0, 0.6);
}
.stats-row--accent .stats-row__val {
  font-size: 30px;
}
.stats-row__val.is-positive {
  color: #5edc8a;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), 0 0 14px rgba(94, 220, 138, 0.6);
}
.stats-row__val.is-negative {
  color: #ff4d6d;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), 0 0 14px rgba(255, 77, 109, 0.6);
}
.stats-row__val.is-zero {
  color: #cdd6ff;
}

.stats-divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 212, 255, 0.55) 50%,
    transparent 100%);
  margin: 6px 0;
  position: relative;
  z-index: 1;
}

.stats-credits-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: linear-gradient(180deg, #0e2b9c 0%, #061a6c 60%, #03116a 100%);
  border: 2px solid #ffed00;
  border-radius: 14px;
  padding: 10px 8px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(255, 237, 0, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.1);
}
.stats-credits-strip__col {
  text-align: center;
}
.stats-credits-strip__lbl {
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif;
  font-size: 18px;
  letter-spacing: 0.18em;
  color: #cdd6ff;
  font-weight: 800;
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.stats-credits-strip__val {
  font-family: 'jay-gothic-urw', 'Archivo Black', monospace;
  font-size: 32px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 0%, #fff958 40%, #d4af37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 10px rgba(255, 237, 0, 0.5));
  line-height: 1;
}

/* ============================================================ */
/* PREMIUM CASINO MAIN MENU — v3                                */
/* Scoped to .menu-screen-v3 so it overrides #menu overrides.   */
/* ============================================================ */

.menu-screen-v3 {
  background:
    /* gentle radial glow behind the emblem area */
    radial-gradient(ellipse 360px 240px at 50% 30%,
      rgba(22, 61, 204, 0.45) 0%,
      rgba(22, 61, 204, 0.18) 35%,
      transparent 72%),
    /* faint repeating suit pattern */
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg font-family='Georgia, serif' font-size='38' opacity='0.06'%3E%3Ctext x='10' y='45' fill='%23163DCC'%3E%E2%99%A0%3C/text%3E%3Ctext x='100' y='45' fill='%23D62839'%3E%E2%99%A5%3C/text%3E%3Ctext x='10' y='130' fill='%23D62839'%3E%E2%99%A6%3C/text%3E%3Ctext x='100' y='130' fill='%23163DCC'%3E%E2%99%A3%3C/text%3E%3C/g%3E%3C/svg%3E"),
    /* dark navy → near-black vertical gradient */
    linear-gradient(180deg, #0a1e63 0%, #06154a 45%, #02061f 100%);
  background-repeat: no-repeat, repeat, no-repeat;
  padding: 0;
  overflow: hidden;
  position: relative;
  border: 2px solid #F2C94C;
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    inset 0 0 40px rgba(22, 61, 204, 0.18);
}

/* Corner ornaments — two crossed thin gold lines forming an L */
.menu-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  z-index: 2;
  pointer-events: none;
}
.menu-corner::before,
.menu-corner::after {
  content: '';
  position: absolute;
  background: linear-gradient(90deg, #FFD84D, #F2C94C 50%, #c89f08);
  box-shadow: 0 0 8px rgba(242, 201, 76, 0.65);
}
.menu-corner::before { width: 2px;  height: 100%; }
.menu-corner::after  { width: 100%; height: 2px;  }
.menu-corner--tl { top: 8px;    left: 8px; }
.menu-corner--tl::before { left: 0; top: 0; }
.menu-corner--tl::after  { left: 0; top: 0; }
.menu-corner--tr { top: 8px;    right: 8px; }
.menu-corner--tr::before { right: 0; top: 0; }
.menu-corner--tr::after  { right: 0; top: 0; }
.menu-corner--bl { bottom: 8px; left: 8px; }
.menu-corner--bl::before { left: 0; bottom: 0; }
.menu-corner--bl::after  { left: 0; bottom: 0; }
.menu-corner--br { bottom: 8px; right: 8px; }
.menu-corner--br::before { right: 0; bottom: 0; }
.menu-corner--br::after  { right: 0; bottom: 0; }

.menu-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  gap: 8px;
}

/* ---------- CASINO EMBLEM (top focal point) ---------- */
.casino-emblem {
  position: relative;
  width: 238px;
  height: 238px;
  flex-shrink: 0;
  margin-top: 2px;
}
.casino-emblem__glow {
  position: absolute;
  inset: -32px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(59, 130, 246, 0.55) 0%,
    rgba(22, 61, 204, 0.35) 35%,
    transparent 70%);
  filter: blur(4px);
  pointer-events: none;
}
.casino-emblem__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #0a1e63 0%, #06154a 60%, #02061f 100%);
  /* Outer gold ring + dark spacer + inner gold ring built with layered box-shadow */
  box-shadow:
    inset 0 0 0 3px #F2C94C,
    inset 0 0 0 5px #06154a,
    inset 0 0 0 7px #c89f08,
    inset 0 0 0 9px rgba(255, 216, 77, 0.45),
    0 0 0 4px rgba(255, 216, 77, 0.18),
    0 8px 28px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(59, 130, 246, 0.4);
}
.casino-emblem__rim {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 216, 77, 0.7);
  box-shadow:
    inset 0 0 14px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(255, 216, 77, 0.18);
  pointer-events: none;
}
.casino-emblem__inner {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 18px 22px;
  overflow: hidden;
}
.casino-emblem__spade-top {
  font-family: Georgia, serif;
  font-size: 36px;
  color: #FFD84D;
  text-shadow:
    0 2px 0 #000,
    0 0 10px rgba(255, 216, 77, 0.6);
  line-height: 1;
}
.casino-emblem__plaque {
  position: relative;
  width: calc(100% + 60px);
  margin: 0 -30px;
  padding: 7px 30px;
  text-align: center;
  background:
    linear-gradient(180deg, #FFD84D 0%, #F2C94C 50%, #a88a2c 100%);
  border-top: 2px solid #FFE17a;
  border-bottom: 2px solid #6e520c;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}
.casino-emblem__plaque-stud {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, #ffffff 0%, #FFE17a 40%, #6e520c 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.casino-emblem__plaque-stud--l { left: 8px; }
.casino-emblem__plaque-stud--r { right: 8px; }
.casino-emblem__title {
  font-family: 'jay-gothic-urw', 'Cinzel', 'Archivo Black', Georgia, serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: #061133;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 -1px 0 rgba(0, 0, 0, 0.35);
  line-height: 1;
}
.casino-emblem__suits {
  display: flex;
  gap: 6px;
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1;
}
.casino-emblem__suit {
  text-shadow: 0 2px 0 #000;
}
.casino-emblem__suit--black {
  color: #FFD84D;
}
.casino-emblem__suit--red {
  color: #D62839;
  text-shadow: 0 2px 0 #000, 0 0 8px rgba(214, 40, 57, 0.5);
}

/* Floating sparkles around the emblem */
.casino-emblem__sparkle {
  position: absolute;
  font-size: 18px;
  color: #FFD84D;
  text-shadow: 0 0 8px rgba(255, 216, 77, 0.9);
  pointer-events: none;
  animation: emblem-sparkle 2.2s ease-in-out infinite;
  font-family: Arial, sans-serif;
}
.casino-emblem__sparkle--1 { top: -10px;  right: 18px; animation-delay: 0.0s; }
.casino-emblem__sparkle--2 { bottom: 6px; left: -10px; animation-delay: 0.7s; }
.casino-emblem__sparkle--3 { top: 50%;    right: -6px; animation-delay: 1.4s; }
@keyframes emblem-sparkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8) rotate(-8deg); }
  50%      { opacity: 1;    transform: scale(1.25) rotate(8deg); }
}

/* ---------- PRIMARY CTA — PLAY NOW ---------- */
.casino-cta {
  position: relative;
  width: 100% !important;
  min-height: 86px !important;
  padding: 10px 18px !important;
  border-radius: 16px !important;
  border: 3px solid #06154a !important;
  background:
    linear-gradient(180deg,
      #FFE17a 0%,
      #FFD84D 25%,
      #F2C94C 55%,
      #c89f08 100%) !important;
  color: #061133 !important;
  font-family: 'jay-gothic-urw', 'Archivo Black', 'Cinzel', sans-serif !important;
  font-size: 44px !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 0 0 2px rgba(255, 216, 77, 0.55),
    inset 0 -6px 0 rgba(0, 0, 0, 0.28),
    inset 0 4px 0 rgba(255, 255, 255, 0.55),
    0 6px 0 #06154a,
    0 10px 22px rgba(0, 0, 0, 0.55),
    0 0 30px rgba(255, 216, 77, 0.35) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transition: transform 0.1s ease, box-shadow 0.1s, filter 0.1s !important;
}
.menu-screen-v3 .casino-cta__label {
  position: relative;
  z-index: 2;
  line-height: 1 !important;
  font-size: 44px !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
  color: #061133 !important;
  font-family: 'jay-gothic-urw', 'Archivo Black', 'Cinzel', sans-serif !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
.menu-screen-v3 .casino-tile__label {
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
  color: #061133 !important;
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif !important;
  line-height: 1 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
.casino-cta__rule {
  width: 36px;
  height: 3px;
  flex-shrink: 0;
  background: linear-gradient(90deg, transparent, #061133 50%, transparent);
  border-radius: 2px;
  position: relative;
  z-index: 1;
}
.casino-cta__rule::before,
.casino-cta__rule::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #061133;
  transform: translateY(-50%);
}
.casino-cta__rule::before { left: -2px; }
.casino-cta__rule::after  { right: -2px; }

.casino-cta__spark {
  position: absolute;
  font-size: 16px;
  color: #ffffff;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  animation: cta-spark 1.8s ease-in-out infinite;
}
.casino-cta__spark--1 { top: 6px;    left: 12%; animation-delay: 0.0s; }
.casino-cta__spark--2 { bottom: 8px; right: 14%; animation-delay: 0.9s; }
@keyframes cta-spark {
  0%, 100% { opacity: 0.15; transform: scale(0.7) rotate(-15deg); }
  50%      { opacity: 1;    transform: scale(1.3) rotate(15deg); }
}

.menu-screen-v3 .casino-cta:focus,
.menu-screen-v3 .casino-cta:hover {
  outline: none !important;
  border-color: #ffffff !important;
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 8px rgba(255, 216, 77, 0.95),
    0 0 0 12px rgba(0, 0, 0, 0.6),
    inset 0 -6px 0 rgba(0, 0, 0, 0.28),
    inset 0 4px 0 rgba(255, 255, 255, 0.6),
    0 6px 0 #06154a,
    0 0 36px rgba(255, 216, 77, 0.85) !important;
  transform: translateY(-2px) !important;
  filter: brightness(1.05) !important;
}
.menu-screen-v3 .casino-cta:active {
  transform: translateY(3px) !important;
  box-shadow:
    inset 0 -3px 0 rgba(0, 0, 0, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 2px 0 #06154a !important;
}

/* Stop competing pulse if any global rule tries to add one */
.menu-screen-v3 .casino-cta { animation: none !important; }

/* ---------- SECONDARY TRIO ---------- */
.casino-tile-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px !important;
  width: 100%;
}
.casino-tile {
  width: 100% !important;
  min-height: 78px !important;
  padding: 10px 6px !important;
  border-radius: 14px !important;
  border: 3px solid #06154a !important;
  background: linear-gradient(180deg, #FFE17a 0%, #FFD84D 35%, #F2C94C 70%, #b78d10 100%) !important;
  color: #061133 !important;
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  cursor: pointer;
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.25),
    inset 0 3px 0 rgba(255, 255, 255, 0.55),
    0 4px 0 #06154a,
    0 6px 12px rgba(0, 0, 0, 0.55) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transition: transform 0.1s ease, box-shadow 0.1s, border-color 0.1s, filter 0.1s !important;
}
.casino-tile__icon {
  width: 32px;
  height: 32px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #061133 !important;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.4));
}
.casino-tile__icon svg { width: 100%; height: 100%; }
.casino-tile__label {
  color: #061133 !important;
  line-height: 1 !important;
}

.menu-screen-v3 .casino-tile:focus,
.menu-screen-v3 .casino-tile:hover {
  outline: none !important;
  border-color: #ffffff !important;
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 7px rgba(255, 216, 77, 0.95),
    0 0 0 10px rgba(0, 0, 0, 0.6),
    inset 0 -4px 0 rgba(0, 0, 0, 0.25),
    inset 0 3px 0 rgba(255, 255, 255, 0.6),
    0 4px 0 #06154a,
    0 0 26px rgba(255, 216, 77, 0.8) !important;
  transform: translateY(-2px) !important;
  filter: brightness(1.08) !important;
}
.menu-screen-v3 .casino-tile:active {
  transform: translateY(2px) !important;
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 1px 0 #06154a !important;
}

/* ---------- BOTTOM FLOURISH ---------- */
.menu-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}
.menu-flourish__line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 216, 77, 0.4) 20%,
    #F2C94C 50%,
    rgba(255, 216, 77, 0.4) 80%,
    transparent 100%);
  box-shadow: 0 0 8px rgba(255, 216, 77, 0.4);
}
.menu-flourish__suits {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1;
  color: #FFD84D;
  text-shadow: 0 1px 0 #000, 0 0 10px rgba(255, 216, 77, 0.5);
}
.menu-flourish__suit--red {
  color: #D62839;
  text-shadow: 0 1px 0 #000, 0 0 10px rgba(214, 40, 57, 0.55);
}
.menu-flourish__star {
  display: block;
  text-align: center;
  font-size: 16px;
  color: #FFD84D;
  text-shadow: 0 0 12px rgba(255, 216, 77, 0.85);
  margin-top: 4px;
  font-family: Arial, sans-serif;
  animation: emblem-sparkle 2s ease-in-out infinite;
  animation-delay: 0.5s;
}

/* Belt-and-braces overrides for the old #menu rules */
#menu.menu-screen-v3 .casino-cta,
#menu.menu-screen-v3 .casino-tile {
  height: auto !important;
}

/* ============================================================ */
/* PREMIUM CASINO BET SCREEN — v3                               */
/* ============================================================ */

.bet-screen-v3 {
  background:
    radial-gradient(ellipse 420px 240px at 50% 18%,
      rgba(43, 77, 255, 0.32) 0%,
      rgba(22, 61, 204, 0.12) 35%,
      transparent 72%),
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg font-family='Georgia, serif' font-size='38' opacity='0.05'%3E%3Ctext x='10' y='45' fill='%23163DCC'%3E%E2%99%A0%3C/text%3E%3Ctext x='100' y='45' fill='%23D62839'%3E%E2%99%A5%3C/text%3E%3Ctext x='10' y='130' fill='%23D62839'%3E%E2%99%A6%3C/text%3E%3Ctext x='100' y='130' fill='%23163DCC'%3E%E2%99%A3%3C/text%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #061a6c 0%, #020B3D 50%, #01051f 100%);
  background-repeat: no-repeat, repeat, no-repeat;
  padding: 8px !important;
  overflow: hidden;
  position: relative;
  border: 2px solid #F2C94C;
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    inset 0 0 40px rgba(22, 61, 204, 0.15);
}
.bet-screen-v3 .content {
  padding: 10px 14px !important;
  gap: 14px !important;
  align-items: stretch;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
}

/* ---------- HEADER ---------- */
.bet-header {
  position: relative;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  padding: 10px 14px !important;
  margin: 2px 0 4px;
  background: linear-gradient(180deg, #1D2FD1 0%, #0A1E63 60%, #06154a 100%);
  border: 3px solid #F2C94C;
  border-radius: 18px;
  box-shadow:
    0 0 0 2px #000,
    0 0 24px rgba(43, 77, 255, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    inset 0 -3px 0 rgba(0, 0, 0, 0.45);
  overflow: hidden;
  min-height: 78px;
}
.bet-header__suit {
  position: absolute;
  font-size: 42px;
  color: #2B4DFF;
  opacity: 0.13;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(43, 77, 255, 0.5);
}
.bet-header__suit--1 { top: 4px;  left: 30%;  transform: rotate(-10deg); }
.bet-header__suit--2 { top: 4px;  right: 32%; color: #ff6b8a; transform: rotate(10deg); }
.bet-header__suit--3 { bottom: 4px; left: 40%; color: #ff6b8a; transform: rotate(12deg); }
.bet-header__suit--4 { bottom: 4px; right: 28%; transform: rotate(-6deg); }

.bet-header__title {
  flex: 1;
  text-align: center;
  font-family: 'jay-gothic-urw', 'Cinzel', 'Archivo Black', sans-serif !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  letter-spacing: 0.22em !important;
  line-height: 1 !important;
  background: linear-gradient(180deg, #ffffff 0%, #FFD84D 35%, #F2C94C 60%, #c89f08 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 12px rgba(255, 216, 77, 0.55));
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.bet-header__spade {
  font-family: Georgia, serif;
  font-size: 24px;
  -webkit-background-clip: text;
  background-clip: text;
  /* Inherits gradient text-fill */
}

.bet-header__credits {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif;
  position: relative;
  z-index: 1;
  min-width: 84px;
}
.bet-header__credits-lbl {
  font-size: 14px;
  letter-spacing: 0.28em;
  color: #FFD84D;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
  text-transform: uppercase;
  opacity: 0.9;
  line-height: 1;
}
.bet-header__credits strong {
  font-size: 30px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #ffffff 0%, #FFD84D 35%, #F2C94C 70%, #c89f08 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 10px rgba(255, 216, 77, 0.45));
  line-height: 1;
}

/* ---------- CHOOSE YOUR BET TITLE ---------- */
.bet-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 4px;
}
.bet-title-row__star {
  font-size: 28px;
  color: #FFD84D;
  filter: drop-shadow(0 0 10px rgba(255, 216, 77, 0.85));
  animation: emblem-sparkle 2.2s ease-in-out infinite;
  font-family: Arial, sans-serif;
}
.bet-title-row__star:last-child { animation-delay: 1.1s; }

.bet-screen-v3 .bet-prompt {
  font-family: 'jay-gothic-urw', 'Cinzel', 'Archivo Black', sans-serif;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0.22em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #FFD84D 35%, #F2C94C 60%, #c89f08 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 14px rgba(255, 216, 77, 0.55));
  text-align: center;
}

/* ---------- CHIP RACK ---------- */
.casino-chip-rack {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  justify-items: center !important;
  padding: 8px 0 12px;
}

#bet.bet-screen-v3 .casino-chip,
#bet.bet-screen-v3 .casino-chip.bet-coin {
  width: 96px !important;
  height: 96px !important;
  min-height: 96px !important;
  border-radius: 50% !important;
  border: 5px dashed #FFD84D !important;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.22) 0%, transparent 55%),
    linear-gradient(180deg, #2B4DFF 0%, #1D2FD1 50%, #0A1E63 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  position: relative;
  padding: 0 !important;
  box-shadow:
    inset 0 0 0 2px #061133,
    inset 0 4px 6px rgba(255, 255, 255, 0.22),
    inset 0 -5px 8px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 216, 77, 0.18),
    0 0 22px rgba(43, 77, 255, 0.55),
    0 6px 12px rgba(0, 0, 0, 0.6) !important;
  transition: transform 0.12s ease, box-shadow 0.12s, border-color 0.12s, filter 0.12s, background 0.15s !important;
  flex-direction: row !important;
}
.casino-chip__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.bet-screen-v3 .casino-chip__num {
  font-family: 'jay-gothic-urw', 'Archivo Black', 'Cinzel', sans-serif !important;
  font-size: 38px !important;
  font-weight: 900 !important;
  color: #061133 !important;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35),
    0 -1px 0 rgba(0, 0, 0, 0.2) !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}
.bet-screen-v3 .casino-chip__max {
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif !important;
  font-size: 13px !important;
  letter-spacing: 0.16em !important;
  font-weight: 900 !important;
  color: #061133 !important;
  margin-top: 2px !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  line-height: 1 !important;
}

/* The 5 MAX chip: same shape, just slightly different glow halo */
#bet.bet-screen-v3 .casino-chip--max {
  box-shadow:
    inset 0 0 0 2px #061133,
    inset 0 4px 6px rgba(255, 255, 255, 0.22),
    inset 0 -5px 8px rgba(0, 0, 0, 0.45),
    0 0 0 1px #FFD84D,
    0 0 24px rgba(255, 216, 77, 0.45),
    0 6px 12px rgba(0, 0, 0, 0.6) !important;
}

/* Selected state — charcoal core + solid gold ring + brighter glow */
#bet.bet-screen-v3 .casino-chip.is-selected {
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 216, 77, 0.18) 0%, transparent 55%),
    linear-gradient(180deg, #2E2E2E 0%, #1a1a1a 55%, #050505 100%) !important;
  border-style: solid !important;
  border-color: #FFD84D !important;
  box-shadow:
    inset 0 0 0 2px #061133,
    inset 0 3px 4px rgba(255, 255, 255, 0.12),
    inset 0 -5px 8px rgba(0, 0, 0, 0.6),
    0 0 0 3px rgba(255, 216, 77, 0.55),
    0 0 32px rgba(255, 216, 77, 0.85),
    0 6px 14px rgba(0, 0, 0, 0.7) !important;
  transform: translateY(-2px) !important;
}
#bet.bet-screen-v3 .casino-chip.is-selected .casino-chip__num,
#bet.bet-screen-v3 .casino-chip.is-selected .casino-chip__max {
  color: #FFD84D !important;
  text-shadow:
    0 2px 0 #000,
    0 0 12px rgba(255, 216, 77, 0.85) !important;
}

/* D-pad focus — white inner ring + gold outer ring + lift */
#bet.bet-screen-v3 .casino-chip:focus {
  outline: none !important;
  border-color: #ffffff !important;
  box-shadow:
    inset 0 0 0 2px #061133,
    inset 0 4px 6px rgba(255, 255, 255, 0.25),
    inset 0 -5px 8px rgba(0, 0, 0, 0.5),
    0 0 0 5px #ffffff,
    0 0 0 9px rgba(255, 216, 77, 0.95),
    0 0 0 13px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(255, 216, 77, 0.9),
    0 6px 14px rgba(0, 0, 0, 0.7) !important;
  transform: translateY(-4px) scale(1.05) !important;
  z-index: 3 !important;
  filter: brightness(1.06) !important;
}
#bet.bet-screen-v3 .casino-chip.is-selected:focus {
  border-color: #ffffff !important;
}
#bet.bet-screen-v3 .casino-chip:active {
  transform: translateY(0) scale(1) !important;
  filter: brightness(0.95) !important;
}

/* Disabled (can't afford this bet) */
#bet.bet-screen-v3 .casino-chip[disabled] {
  opacity: 0.32;
  filter: grayscale(0.55);
  pointer-events: none;
}

/* ---------- BOTTOM FLOURISH ---------- */
.bet-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
}
.bet-flourish__line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 216, 77, 0.4) 20%,
    #F2C94C 50%,
    rgba(255, 216, 77, 0.4) 80%,
    transparent 100%);
  box-shadow: 0 0 8px rgba(255, 216, 77, 0.4);
}
.bet-flourish__suits {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1;
  color: #FFD84D;
  text-shadow: 0 1px 0 #000, 0 0 10px rgba(255, 216, 77, 0.5);
}
.bet-flourish__suit--red {
  color: #D62839;
  text-shadow: 0 1px 0 #000, 0 0 10px rgba(214, 40, 57, 0.55);
}

/* ============================================================ */
/* PREMIUM CASINO GAMEPLAY SCREEN — v3                           */
/* Scoped under .game-screen-v3                                  */
/* ============================================================ */

.game-screen-v3 {
  background: transparent !important;
  padding: 8px !important;
  overflow: hidden;
  position: relative;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
/* Hide the gold corner ornaments on the play screen — pure black canvas */
.game-screen-v3 .menu-corner { display: none !important; }
.game-screen-v3 .play {
  flex: 1;
  display: flex !important;
  flex-direction: column !important;
  padding: 8px !important;
  gap: 6px !important;
  background: transparent !important;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* ---------- PAYTABLE PANEL (compact) ---------- */
#paytable-game.paytable--arcade {
  background:
    linear-gradient(180deg, #000B4F 0%, #02061f 100%) !important;
  border: 2px solid #FFD84D !important;
  border-radius: 10px !important;
  padding: 5px 10px !important;
  box-shadow:
    0 0 0 1px #000,
    0 0 16px rgba(255, 216, 77, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 24px rgba(0, 11, 79, 0.55) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  flex-shrink: 0;
}
.paytable__row {
  display: flex !important;
  align-items: baseline;
  gap: 6px;
  padding: 0 2px;
  position: relative;
  font-family: 'jay-gothic-urw', 'Archivo Black', 'Cinzel', sans-serif !important;
  font-size: 13px;
  line-height: 1.16;
  text-transform: uppercase;
}
.paytable__name {
  color: #FFF400 !important;
  letter-spacing: 0.08em;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85), 0 0 8px rgba(255, 244, 0, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
  background: none !important;
  border-radius: 0 !important;
}
.paytable__leader {
  flex: 1;
  border-bottom: 2px dotted rgba(255, 216, 77, 0.45);
  position: relative;
  top: -5px;
  min-width: 18px;
}
.paytable__pay {
  color: #FFF400 !important;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85), 0 0 8px rgba(255, 244, 0, 0.25);
  background: none !important;
  border-radius: 0 !important;
}
.paytable__row--royal .paytable__name,
.paytable__row--royal .paytable__pay {
  color: #FFD84D !important;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.9),
    0 0 14px rgba(255, 216, 77, 0.85) !important;
}
.paytable__row--royal .paytable__leader {
  border-bottom-color: rgba(255, 216, 77, 0.7);
}
.paytable__row.is-highlight {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 216, 77, 0.22) 20%,
    rgba(255, 216, 77, 0.32) 50%,
    rgba(255, 216, 77, 0.22) 80%,
    transparent 100%);
  border-radius: 4px;
  margin: -1px -4px;
  padding-left: 8px;
  padding-right: 8px;
  box-shadow: 0 0 14px rgba(255, 244, 0, 0.45);
}
.paytable__row.is-highlight .paytable__name,
.paytable__row.is-highlight .paytable__pay {
  color: #ffffff !important;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.85),
    0 0 12px rgba(255, 244, 0, 1) !important;
}

/* ---------- CARDS — refined polish ---------- */
.game-screen-v3 .hand-row {
  display: flex !important;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  padding: 0;
  position: relative;
  z-index: 1;
}
.game-screen-v3 .card {
  width: 96px !important;
  height: 132px !important;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f4f0 60%, #d8d8d8 100%) !important;
  border-radius: 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.55) !important;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 1px 0 rgba(255, 255, 255, 0.85) inset !important;
}
.game-screen-v3 .card__img {
  /* Subtle horizontal sheen overlay so the cards feel glossy */
  position: relative;
}
.game-screen-v3 .card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0) 18%,
    rgba(255, 255, 255, 0) 65%,
    rgba(255, 255, 255, 0.12) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Held cards — bigger gold ring + thicker frame, premium feel */
.game-screen-v3 .card-slot.is-held .card {
  border: 2px solid #FFD84D !important;
  box-shadow:
    0 0 0 4px #FFD84D,
    0 0 22px rgba(255, 216, 77, 0.85),
    0 6px 14px rgba(0, 0, 0, 0.7),
    inset 0 0 0 2px rgba(255, 255, 255, 0.55) !important;
}
.game-screen-v3 .card-slot.is-held .card-toggle:hover,
.game-screen-v3 .card-slot.is-held .card-toggle:focus {
  box-shadow:
    0 0 0 5px #ffffff,
    0 0 0 9px #FFD84D,
    0 0 0 13px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(255, 216, 77, 1),
    0 16px 22px rgba(0, 0, 0, 0.75),
    inset 0 0 0 2px rgba(255, 255, 255, 0.55) !important;
}

/* Premium HOLD label below held cards */
.game-screen-v3 .hold-indicator {
  position: absolute;
  top: auto !important;
  bottom: -28px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: 0.22em !important;
  color: #061133 !important;
  background: linear-gradient(180deg, #FFE17a 0%, #FFD84D 50%, #c89f08 100%) !important;
  border: 2px solid #06154A !important;
  border-radius: 6px !important;
  padding: 2px 10px !important;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2),
    0 0 12px rgba(255, 216, 77, 0.6) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
.game-screen-v3 .card-slot.is-held:has(.card-toggle:focus) .hold-indicator,
.game-screen-v3 .card-slot.is-held:has(.card-toggle:hover) .hold-indicator {
  transform: translateX(-50%) translateY(-22px) !important;
  filter: brightness(1.1);
}

/* ---------- BOTTOM METERS (WIN / BET / CREDITS) ---------- */
.game-screen-v3 .play-meters {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 8px !important;
  padding: 0;
  flex-shrink: 0;
}
.game-screen-v3 .meter-chip {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 6px 6px !important;
  background: linear-gradient(180deg, #1D2FD1 0%, #0A1E63 60%, #06154a 100%) !important;
  border: 2px solid #FFD84D !important;
  border-radius: 10px !important;
  box-shadow:
    0 0 0 1px #000,
    0 0 12px rgba(43, 77, 255, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    inset 0 -3px 0 rgba(0, 0, 0, 0.4) !important;
  min-height: 0;
}
.game-screen-v3 .meter-chip__label {
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.2em !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7) !important;
  line-height: 1 !important;
  margin-bottom: 2px;
}
.game-screen-v3 .meter-chip__value {
  font-family: 'jay-gothic-urw', 'Archivo Black', monospace !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: 0.04em !important;
  line-height: 1 !important;
  color: #FFF400 !important;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.7),
    0 0 10px rgba(255, 244, 0, 0.45) !important;
}

/* WIN box: dimmer until a win lands */
.game-screen-v3 .meter-chip--win .meter-chip__value {
  color: #ffffff !important;
}
.game-screen-v3 .meter-chip--win.is-win-flash {
  border-color: #5edc8a !important;
  box-shadow:
    0 0 0 1px #000,
    0 0 24px rgba(94, 220, 138, 0.7),
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    inset 0 -3px 0 rgba(0, 0, 0, 0.4) !important;
  animation: win-flash 0.6s ease-in-out infinite alternate;
}
.game-screen-v3 .meter-chip--win.is-win-flash .meter-chip__value {
  color: #5edc8a !important;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.7),
    0 0 12px rgba(94, 220, 138, 0.9) !important;
}
@keyframes win-flash {
  from { filter: brightness(1); }
  to   { filter: brightness(1.18); }
}

/* CREDITS: the headline number — yellow fill, red outline, hot drop shadow */
.game-screen-v3 .meter-chip--credits {
  background: linear-gradient(180deg, #0a1e63 0%, #02061f 100%) !important;
  border-color: #E60012 !important;
  box-shadow:
    0 0 0 1px #000,
    0 0 22px rgba(230, 0, 18, 0.55),
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -3px 0 rgba(0, 0, 0, 0.45) !important;
}
.game-screen-v3 .meter-chip--credits .meter-chip__label {
  color: #ffd84d !important;
}
.game-screen-v3 .meter-chip--credits .meter-chip__value {
  font-size: 26px !important;
  color: #FFF400 !important;
  text-shadow:
    -1px -1px 0 #E60012,
    1px -1px 0 #E60012,
    -1px 1px 0 #E60012,
    1px 1px 0 #E60012,
    0 3px 0 rgba(0, 0, 0, 0.7),
    0 0 14px rgba(230, 0, 18, 0.7) !important;
}

/* ---------- DRAW / DEAL BUTTON ---------- */
.game-screen-v3 .play-draw-bar {
  display: flex !important;
  gap: 8px;
  padding: 0;
  margin-top: 0;
  flex-shrink: 0 !important;   /* never let the DRAW button get squished out */
  width: 100%;
}
#game.game-screen-v3 .play-draw-bar .act--deal {
  flex: 1 !important;
  min-height: 68px !important;
  height: 68px !important;
  border-radius: 16px !important;
  border: 3px solid #06154a !important;
  background:
    linear-gradient(180deg, #FFE17a 0%, #FFD84D 30%, #F2C94C 65%, #b78d10 100%) !important;
  color: #061133 !important;
  font-family: 'jay-gothic-urw', 'Archivo Black', sans-serif !important;
  position: relative;
  cursor: pointer;
  box-shadow:
    0 0 0 2px rgba(255, 216, 77, 0.6),
    inset 0 -5px 0 rgba(0, 0, 0, 0.25),
    inset 0 4px 0 rgba(255, 255, 255, 0.6),
    0 5px 0 #06154a,
    0 9px 18px rgba(0, 0, 0, 0.6),
    0 0 28px rgba(255, 216, 77, 0.4) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  transition: transform 0.1s ease, box-shadow 0.1s, filter 0.1s, border-color 0.1s !important;
}
.game-screen-v3 .play-draw-bar .act--deal::before,
.game-screen-v3 .play-draw-bar .act--deal::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #061133 50%, transparent);
  transform: translateY(-50%);
  pointer-events: none;
  border-radius: 2px;
}
.game-screen-v3 .play-draw-bar .act--deal::before { left: 14%; }
.game-screen-v3 .play-draw-bar .act--deal::after  { right: 14%; }

.game-screen-v3 .play-draw-bar .act__label {
  font-family: 'jay-gothic-urw', 'Archivo Black', 'Cinzel', sans-serif !important;
  font-size: 32px !important;
  font-weight: 900 !important;
  letter-spacing: 0.2em !important;
  color: #061133 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  line-height: 1 !important;
  position: relative;
  z-index: 1;
}

#game.game-screen-v3 .play-draw-bar .act--deal:focus,
#game.game-screen-v3 .play-draw-bar .act--deal:hover {
  outline: none !important;
  border-color: #ffffff !important;
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 8px rgba(255, 216, 77, 0.95),
    0 0 0 12px rgba(0, 0, 0, 0.6),
    inset 0 -5px 0 rgba(0, 0, 0, 0.25),
    inset 0 4px 0 rgba(255, 255, 255, 0.6),
    0 5px 0 #06154a,
    0 0 36px rgba(255, 216, 77, 0.9) !important;
  transform: translateY(-2px) !important;
  filter: brightness(1.05) !important;
}
#game.game-screen-v3 .play-draw-bar .act--deal:active {
  transform: translateY(3px) !important;
  filter: brightness(0.95) !important;
}

/* EXIT button — slimmer, dark with red trim, sits next to DRAW */
#game.game-screen-v3 .play-draw-bar .act--exit {
  flex: 0 0 110px !important;
  min-height: 76px !important;
  border-radius: 16px !important;
  border: 3px solid #06154a !important;
  background: linear-gradient(180deg, #E60012 0%, #a8202f 100%) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 -5px 0 rgba(0, 0, 0, 0.3),
    inset 0 4px 0 rgba(255, 255, 255, 0.35),
    0 5px 0 #06154a,
    0 9px 18px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(230, 0, 18, 0.4) !important;
}
#game.game-screen-v3 .play-draw-bar .act--exit .act__label {
  font-size: 26px !important;
  color: #ffffff !important;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7) !important;
}
#game.game-screen-v3 .play-draw-bar .act--exit:focus {
  border-color: #ffffff !important;
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 8px rgba(230, 0, 18, 0.85),
    0 0 0 12px rgba(0, 0, 0, 0.6),
    inset 0 -5px 0 rgba(0, 0, 0, 0.3),
    inset 0 4px 0 rgba(255, 255, 255, 0.4),
    0 5px 0 #06154a,
    0 0 32px rgba(230, 0, 18, 0.85) !important;
  transform: translateY(-2px) !important;
}
